http://stackoverflow.com/comment/38135965
comment on: http://stackoverflow.com/a/24610260
type: Comment
score: 0
type: AnswerComment
has text: I changed "onchange" to "onclick" and it works like a charm now.

http://stackoverflow.com/a/24596905
answers question: http://stackoverflow.com/q/24596768
has body: You are defining words in function a() scope so it's not accessible out of that scope. Modify your code defining words in global scope and remove the var keyword in function a() so it wont override the global words Your code should be like this: Javascript Arrays Implementation of Sort and Reverse Functions Enter number of Elements PS : You can use developer tools in your browser to inspect errors in Javascripts console. PS2: Keep your code tidy and clean.
score: 0
type: Answer

http://stackoverflow.com/comment/38289795
comment on: http://stackoverflow.com/a/24692081
type: AnswerComment
has text: Still not working. Why does the document.location works in the plunker as you can see?
score: 0
type: Comment

http://stackoverflow.com/q/24674259
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/24674341
has answer: http://stackoverflow.com/a/24674341
accepted answer: http://stackoverflow.com/a/24674338
has title: Javascript syntax error - missing )
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
has body: I keep getting an error in Firebug regarding the onClick event. I've tried various different combinations of " and ' but to no avail. This worked fine before the onClick event was added. Can anybody spot what I might be doing wrong? addPhoneLogo: function (n) { if (i.phoneLogoLink.length > 1) var t = e(' '); else var t = e(' '); n.append(t) },
answer count: 3
has answer: http://stackoverflow.com/a/24674338
has answer: http://stackoverflow.com/a/24674383

http://stackoverflow.com/comment/38285157
score: 0
has text: Thanks! How do I show the date in the exact same way as it is fed? like 2012-12-31 ?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24675059

http://stackoverflow.com/q/24599437
has comment: http://stackoverflow.com/comment/38113169
type: Question
has answer: http://stackoverflow.com/a/24599530
has comment: http://stackoverflow.com/comment/38113720
tagged with: javascript
has comment: http://stackoverflow.com/comment/38113555
score: 0
has comment: http://stackoverflow.com/comment/38113192
has comment: http://stackoverflow.com/comment/38113296
has comment: http://stackoverflow.com/comment/38113145
has comment: http://stackoverflow.com/comment/38113081
answer count: 1
has comment: http://stackoverflow.com/comment/38113123
has comment: http://stackoverflow.com/comment/38113076
has comment: http://stackoverflow.com/comment/38113452
accepted answer: http://stackoverflow.com/a/24599530
has comment: http://stackoverflow.com/comment/38113337
favorite count: 0
has comment: http://stackoverflow.com/comment/38113502
has body: function test() { a = 10; alert(a); if (false) { var a; } } test(); From the above code, you can see I have declared one variable inside a falsy if statement, meaning the code inside it would not executed. See, now that variable is unnecessary hoisted, why is it so..? It would unnecessarily allocate memory. Isn't the compiler clever enough to identify it..? Or would those variables get collected in a garbage like java.? The given code block would get interpreted as, function test() { var a; a = 10; alert(a); if (false) { } } test(); Logically what's the use of hoisting a variable away from a falsy statement.? If var a; allocates any memory internally, then this is not an optimized one right..?
has comment: http://stackoverflow.com/comment/38113248
has comment: http://stackoverflow.com/comment/38113187
has title: Unnecessary Hoisting is happening.! why?
has comment: http://stackoverflow.com/comment/38113148
has comment: http://stackoverflow.com/comment/38113159
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38113374
has comment: http://stackoverflow.com/comment/38113339
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/24654409
tagged with: underscore.js
score: 1
type: Question
tagged with: javascript
has body: I'm trying to use underscore's flatten() and wondering if it's possible to compare multiple properties. I have array of objects with these properties: { type: type startId: startId endId: endId dateCreated: dates.dateCreated dateEffectiveStart: dates.dateEffectiveStart dateEffectiveEnd: dates.dateEffectiveEnd } I want to compare the startId and the endId and if I see another object with the same start and end Id I want to ignore it. Thank you!
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38220420
has comment: http://stackoverflow.com/comment/38221422
has answer: http://stackoverflow.com/a/24654636
accepted answer: http://stackoverflow.com/a/24654636
type: AnsweredQuestion
has title: Can I _.flatten based on multiple properties?
downvote count: 0

http://stackoverflow.com/q/24600653
has body: Meteor has this live templating feature where when data changes it can update the HTML in the page automagically. How can I use this feature client side only? Using pseudo code the simplest example might be a clock. Effectively I want to do something like this {{time}} Then completely on the client side I effectively want to be able to do something like this function publishTheTime() { var timeStr = (new Date()).toString(); Meteor.somePublishFunction({time: timeStr}); } setTimeout(publishTheTime, 5000); And have meteor update the time in the html. Once I get that working I'd like to take it a step further. Imagine I have clocks by city. You can think of this as a database of Cities where the _id for each is the name of the city and the only other field is its time. Again 100% on the client side, I'd like to be able to show the times updated live for N countries. Something like {{#each cities}} {{> city}} {{/each}} name: {{_id}} time: {{time}} Can I do this 100% on the client? There's no need for full database and nothing needs to be on the server but I still need to able to select cities as in Cities.find({_id: {$in: ["Vancover", "New York City", "London"]}}) and all similar stuff.
answer count: 1
downvote count: 1
tagged with: meteor
favorite count: 0
has title: Meteor client side only publish subscribe
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/24601186
accepted answer: http://stackoverflow.com/a/24601186
has comment: http://stackoverflow.com/comment/38115929
type: Question
tagged with: javascript
score: -1

http://stackoverflow.com/q/24597263
score: 0
answer count: 5
has title: jQuery: Editing tag only works once
has comment: http://stackoverflow.com/comment/38109505
possible better answer: http://stackoverflow.com/a/24597344
has answer: http://stackoverflow.com/a/24597344
linked to: http://stackoverflow.com/q/8110934
has answer: http://stackoverflow.com/a/24597587
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24597324
has body: I want to make a tag editable by clicking it. My problem: It can only be edited once. After a second click, I get an error message in my console. See the fiddle here: http://jsfiddle.net/LnD8d/1/ HTML: Click to add description JAVASCRIPT: function editDiv(element_to_be_edited, update_description) { var divHtml = element_to_be_edited.text(); var editableText = $(" "); editableText.val(divHtml); element_to_be_edited.replaceWith(editableText); editableText.focus(); // setup the blur event for this new textarea editableText.on('blur', function() { var html = $(this).val(); var viewableText = $(" "); viewableText.html(html); $(this).replaceWith(viewableText); // setup the click event for this new div viewableText.click(editDiv); // if update_description=true, update description ... if (update_description == true) { console.log('description has been updated'); } }); } // /function editDiv(); $(document).ready(function() { $('#profile_description p').on('click', function() { console.log('click on p tag'); var element_to_be_edited = $(this); var update_description = true; editDiv(element_to_be_edited, update_description); }); }); Can anyone see the reason why the tag can only be edited once and not on a second click?
has answer: http://stackoverflow.com/a/24597917
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24597324
has answer: http://stackoverflow.com/a/24597366

http://stackoverflow.com/q/24660955
has body: I have a web page with several iframes. From the context of one of the parent iframe I can generate a selector to any of the children iframes: $sel = $("#iframe-"+id).contents().find("#"+key); My problem is to make the reverse process. I want to get the window viewport of a given $sel that I have obtained this way. I have tried this without success: $(window, $sel) Note that the variable $sel may be used in any context, the parent or any of the children.
has comment: http://stackoverflow.com/comment/38230718
has comment: http://stackoverflow.com/comment/38230693
has comment: http://stackoverflow.com/comment/38230748
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38230925
has comment: http://stackoverflow.com/comment/38230762
has comment: http://stackoverflow.com/comment/38230860
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: How to get the window viewport from a jquery selector?
score: 0
tagged with: iframe

http://stackoverflow.com/comment/38164741
type: AnswerComment
has text: Yeah sure. Depends what you want. A cirlce (radius), map bounds or custom defined boundaries. Good luck!
type: Comment
comment on: http://stackoverflow.com/a/24612947
score: 0

http://stackoverflow.com/comment/38207034
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24648386
has text: Do you have a StackTrace? I assume that the error comes from $.each()?
score: 0

http://stackoverflow.com/comment/38173390
score: 1
has text: What have you tried so far? Can you show us some code? You can start by checking the settimeout method in javascript https://developer.mozilla.org/en-US/docs/Web/API/window.setTimeout for the delay...
type: QuestionComment
comment on: http://stackoverflow.com/q/24630694
type: Comment

http://stackoverflow.com/q/24738070
tagged with: three.js
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/38379901
type: Question
downvote count: 0
tagged with: javascript
has body: I have some 3D objects within a rotating parent object. I'm adding a set of 2D "hotspots" which follow these object's screen position. I got this to successfully convert the child object's position to 2D: // HOTSPOTS // var v1,m1,p,hotspotX,hotspotY; v1 = new THREE.Vector3(); m1 = new THREE.Matrix4(); m1 = childObject.matrixWorld; v1.setFromMatrixPosition(m1); p = projector.projectVector(v1, camera1); hotspotX = (p.x + 1) / 2; hotspotY = (-p.y + 1) / 2; The problem is that rather than using the child object's origin as the hotspot location, I'd like to set it relative of it, i.e the hotspot's y might be childObject.y-10. I think this needs to happen prior to converting to matrix. Is there a way to do the same as matrixWorld, but from a vector instead of an object? I could just create extra empty objects for each hotspot and set their positions exactly where I want them, however seeing as the childObjects are already there I'd rather use those if I can. All previous examples I've found use functions which are now deprecated. Hope this makes sense, I'm new to matrices. Thanks!
has comment: http://stackoverflow.com/comment/38380362
favorite count: 0
answer count: 0
type: UnansweredQuestion
has title: 2D screen position from 3D position using three.js

http://stackoverflow.com/comment/38130636
comment on: http://stackoverflow.com/a/24608138
type: AnswerComment
score: 0
type: Comment
has text: I hadn't had time to see if they're easy to fix but there are two problems : 1) it doesn't give the right answer if you put the caret at the begining of the second line 2) it doesn't work at end of first line with [this text](http://jsbin.com/hacicitu/1/edit)

http://stackoverflow.com/q/24638314
accepted answer: http://stackoverflow.com/a/24644111
has comment: http://stackoverflow.com/comment/38189256
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24644111
has title: How to save a file from a URL in Parse.com using Javascript
type: Question
has comment: http://stackoverflow.com/comment/38199012
tagged with: javascript
has comment: http://stackoverflow.com/comment/38199044
has body: I know the syntax for saving files in Parse.com (https://www.parse.com/docs/js_guide#files-classes), but now I have a URL instead of a local file - http://graph.facebook.com/{FacebookID}/picture, how can I save it in Parse? Thanks!
answer count: 1
downvote count: 0
tagged with: facebook-javascript-sdk
tagged with: facebook-graph-api
favorite count: 0
tagged with: parse-platform
upvote count: 2

http://stackoverflow.com/q/24703921
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29387963
tagged with: javascript
tagged with: gulp
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29387963
has title: Gulp-livereload error when run gulp task
has answer: http://stackoverflow.com/a/39449540
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/39449540
type: Question
has body: Running gulp-livereload + tiny-lr, in two projects, i have an error only at last project, when i use the same gulpfile.js, tried run only one per once, but not work, only my last project got the error: ... Uhoh. Got error listen EADDRINUSE ... Error: listen EADDRINUSE at errnoException (net.js:904:11) at Server._listen2 (net.js:1042:14) at listen (net.js:1064:10) at Server.listen (net.js:1138:5) at Server.listen (/var/www/havikhunting/node_modules/gulp-livereload/node_modules/tiny-lr/lib/server.js:138:15) at Function.exports.listen (/var/www/havikhunting/node_modules/gulp-livereload/gulp-livereload.js:68:12) at Function.exports.changed (/var/www/havikhunting/node_modules/gulp-livereload/gulp-livereload.js:88:20) at Transform.reload._transform (/var/www/havikhunting/node_modules/gulp-livereload/gulp-livereload.js:24:13) at Transform._read (_stream_transform.js:179:10) at Transform._write (_stream_transform.js:167:12) [gulp] Starting 'compileStyles'... [gulp] Finished 'compileStyles' after 52 ms [15:06:10] gulp-ruby-sass: directory [15:06:11] gulp-ruby-sass: error ./style.scss (Line 1: File to import not found or unreadable: ../partials/base. Load path: /tmp/gulp-ruby-sass) my gulpfile: var gulp = require('gulp'), sass = require('gulp-ruby-sass'), minifycss = require('gulp-minify-css'), refresh = require('gulp-livereload'), server = require('tiny-lr')(); gulp.task('default', function() { // Tarefas }); gulp.task('compileStyles', function() { gulp.src('public/assets/css/style.scss') .pipe(sass({ noCache : true, precision : 4, unixNewlines : true })) .pipe(minifycss()) .pipe(gulp.dest('public/assets/css')) .pipe(refresh(server)); }); gulp.task('watch', function() { server.listen(35729, function( err ) { if ( err ) { return console.log( err ); } gulp.watch('public/assets/css/**/*.{sass,scss}', [ 'compileStyles' ]); }); });

http://stackoverflow.com/a/24681107
has body: So to be clear, sending mail works as it sends correctly to others. In the case of sending mail to yourself (why exactly are you doing this? is this really needed as opposed to say just using messages.insert?) then it appears in only SENT but not also INBOX label. You only get one copy of the mail, that's the same irregardless of API or using web UI. The problem is that the web UI also puts that message in INBOX as well as SENT. (As you can tell, sending to yourself is a bit of a special case due to things like dupe-detection based on the Message-Id header, etc.)
score: 1
has comment: http://stackoverflow.com/comment/38512537
downvote count: 0
has comment: http://stackoverflow.com/comment/38340912
answers question: http://stackoverflow.com/q/24666489
has comment: http://stackoverflow.com/comment/38329161
type: Answer
upvote count: 1

http://stackoverflow.com/a/24655041
has comment: http://stackoverflow.com/comment/38220258
has comment: http://stackoverflow.com/comment/38220390
type: Answer
has comment: http://stackoverflow.com/comment/38219477
downvote count: 0
score: 1
has body: This function: function indexWord(index, word, letters) { var letter; if (!letters) letters = word.split(""); while (letters.length) { letter = letters.shift().toLowerCase(); if (!(letter in index)) index[letter] = {_items: []}; index[letter]._items.push(word); indexWord(index[letter], word, letters); } } called like this: var store = ["Alaska", "Alabama", "North Korea", "South Korea"], index = {}, i; for (i = 0; i &lt; store.length; i++) { indexWord(index, store[i]); } gives you the following index: { a: { _items: ["Alaska", "Alabama"], l: { _items: ["Alaska", "Alabama"], a: { _items: ["Alaska", "Alabama"], s: { _items: ["Alaska"], k: { _items: ["Alaska"], a: { _items: ["Alaska"] } } }, b: { _items: ["Alabama"], a: { _items: ["Alabama"], m: { _items: ["Alabama"], a: { _items: ["Alabama"] } } } } } } }, n: { _items: ["North Korea"], o: { _items: ["North Korea"], r: { _items: ["North Korea"], t: { _items: ["North Korea"], h: { _items: ["North Korea"], " ": { _items: ["North Korea"], k: { _items: ["North Korea"], o: { _items: ["North Korea"], r: { _items: ["North Korea"], e: { _items: ["North Korea"], a: { _items: ["North Korea"] } } } } } } } } } } }, s: { _items: ["South Korea"], o: { _items: ["South Korea"], u: { _items: ["South Korea"], t: { _items: ["South Korea"], h: { _items: ["South Korea"], " ": { _items: ["South Korea"], k: { _items: ["South Korea"], o: { _items: ["South Korea"], r: { _items: ["South Korea"], e: { _items: ["South Korea"], a: { _items: ["South Korea"] } } } } } } } } } } } } where either index["a"]["l"]._items or index.a.l._items can be used to access ["Alaska", "Alabama"].
answers question: http://stackoverflow.com/q/24654432
has comment: http://stackoverflow.com/comment/38220662
has comment: http://stackoverflow.com/comment/38219990
upvote count: 1

http://stackoverflow.com/a/24695550
accepted answer of: http://stackoverflow.com/q/24681907
has body: In this first parameter is success call back and second one is fail callback. instead of null and null you have to do like this navigator.callslog.show = function () { cordova.exec (successcb, failcb, "callslog", "show", []);}; function successcb(s){ console.log(s);//what you passed from Java code } function failcb(e){ console.log("Err cb"); }
upvote count: 2
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24681907
score: 2
downvote count: 0

http://stackoverflow.com/a/24643806
score: 0
answers question: http://stackoverflow.com/q/24643739
has comment: http://stackoverflow.com/comment/38198798
type: Answer
has comment: http://stackoverflow.com/comment/38198845
has body: For a sake of "meaningfulness": $http.get(...).success(function(data) { ... }).error(function(data) { ... }); In this case, each function needs the original $http data, since those callbacks are totally independent each other. More coding style, is there a good reason not to replace the code here by this one? => You wouldn't be able to do the code just above since it would break this independency. Indeed, it would mean that error should have triggered only if success was triggered => perfect non-sense. You can't do this "conditional flow" with regular "low-level" promise as distinct/explicitly as above. Indeed, you would do: $http.get(...).then(function(data){ whenSucceed }, function(data) { whenError }); But you will easily notice that it is exactly what the success/error code makes under the hood: using the then(null, whenError) for a rejection and then(data) for the resolve. In my opinion, it's a matter of taste to use one over the other.

http://stackoverflow.com/comment/38194447
score: 0
type: Comment
type: QuestionComment
has text: I still don't see why it would make a difference if there were 250,000 functions, if you can just change all of them by just going to the constructor and changing the this keywords value in the constructor and then going to file->save all 250,000 would be updated. Likewise, if I were to overwrite the prototype itself it would change it for all 250,000 instances. I could also change each individual property in either case as well, hence my curiosity. The only two things I can think of that would be of benefit would be that it might save memory or that it's just housekeeping.
comment on: http://stackoverflow.com/q/24641544

http://stackoverflow.com/q/24594473
tagged with: grid
type: Question
has answer: http://stackoverflow.com/a/24809746
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24809746
score: 2
downvote count: 0
answer count: 1
has body: I have EXT JS grid with width greater then screen width. I have to drag columns to change its order, but when I drag column header to edge of screen - container not scroll. So a need to scroll in manually first and then drad column to right place. How can I make container autoscroll left or right when I drag column? I try containerScroll with gridviewdragdrop plugin but it works only when i drag rows: viewConfig: { plugins: { ptype: 'gridviewdragdrop', containerScroll: true }, }
favorite count: 0
tagged with: extjs
has title: EXT JS auto scroll container when drag grid column
type: AnsweredQuestion
upvote count: 2

http://stackoverflow.com/comment/38286206
type: AnswerComment
type: Comment
has text: Hey, could you help me with why is it needed? Isn't the current URL default? To test routing tabs, I downloaded this [plunker](http://plnkr.co/edit/fuVb0mzhmDCKr1xKp7Rn). I downloaded as a zip and ran it as it is, but its not working, but its running on the fiddle. Something to do with the location url?
comment on: http://stackoverflow.com/a/24674237
score: 1

http://stackoverflow.com/comment/38142892
score: 0
comment on: http://stackoverflow.com/q/24613536
type: Comment
type: QuestionComment
has text: Is this how it works? user enters value - form is submitted - codebehind does calculation - display new page with gauge.

http://stackoverflow.com/comment/38268372
type: QuestionComment
comment on: http://stackoverflow.com/q/24681296
score: 0
has text: Check this link first (explains essential JSON): http://www.mkyong.com/javascript/how-to-access-json-object-in-javascript/
type: Comment

http://stackoverflow.com/a/24719038
score: 1
answers question: http://stackoverflow.com/q/24718992
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24718992
type: AcceptedAnswer
has body: You have syntax error in your blarg function definition. The syntax of declaring a function should be function name() { // function code here } Complete example: document.write(blarg()); //function blarg{(Math.floor(Math.random()*(10-2))+1))} function blarg() { return Math.floor(Math.random() * (10 - 2) + 1); } Please note your function must return a value to document.write() so that the random number can be displayed.
has comment: http://stackoverflow.com/comment/38340310
type: Answer
downvote count: 0

http://stackoverflow.com/q/24620522
downvote count: 0
has comment: http://stackoverflow.com/comment/38157692
has comment: http://stackoverflow.com/comment/38155433
has comment: http://stackoverflow.com/comment/38154713
has comment: http://stackoverflow.com/comment/38156228
favorite count: 0
has comment: http://stackoverflow.com/comment/38155038
possible better answer: http://stackoverflow.com/a/24622145
accepted answer: http://stackoverflow.com/a/24622591
has answer: http://stackoverflow.com/a/24622145
upvote count: 1
has comment: http://stackoverflow.com/comment/38155748
has comment: http://stackoverflow.com/comment/38156346
has comment: http://stackoverflow.com/comment/38154767
has comment: http://stackoverflow.com/comment/38155823
has comment: http://stackoverflow.com/comment/38155327
has comment: http://stackoverflow.com/comment/38155894
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24635310
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I have developed a powershell script which generates a JSON file which am trying to parse using JQuery. var mydata = jQuery.parseJSON(w3wp); w3wp = '[{"Pid" : "6724" , "Apppool" : "myapppool1" , "Usage" : "229.328125"},{"Pid" : "6808" , "Apppool" : "myapppool2" , "Usage" : "152" }]'; There are no issues found when the JSON data is in a single line like above, the script works fine. If the json data is formatted like below i am getting "undefined error in w3wp." w3wp = '[{"Pid" : "6724" , "Apppool" : "myapppool1" , "Usage" : "229.328125"}, {"Pid" : "6808" , "Apppool" : "myapppool2" , "Usage" : "152" }]'; The representation above is with very minimal data in real time scenario the number of app pools are huge and power-shell word wraps in 2.0 and am having issues with the JSON file. Is there any way to format this Json file so i can use this for parsing ? Based on request here is the powershell script $host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size 5512,100 function get-apppool { [regex]$pattern="-ap ""(.+)""" $contentx="w3wp = '[" gwmi win32_process -filter 'name="w3wp.exe"' | % { $name=$_.name $cmd = $pattern.Match($_.commandline).Groups[1].Value $procid = $_.ProcessId $cpuper = get-process | where-object {$_.id -like $procid} | select -Expand CPU $contentx = $contentx + "{""Pid"" : ""$procid"" , ""Apppool"" : ""$cmd"" , ""Usage"" : ""$cpuper"" }" $contentx = $contentx + "," } $contentx = $contentx -replace ".$" $contentx = $contentx + "]';" write-host -nonewline $contentx &gt; dsdf.json } get-apppool
type: Question
has title: Formatting Json Object values in Json File
has comment: http://stackoverflow.com/comment/38155622
linked to: http://stackoverflow.com/q/9294221
has comment: http://stackoverflow.com/comment/38156078
tagged with: powershell
tagged with: javascript
has comment: http://stackoverflow.com/comment/38154889
has answer: http://stackoverflow.com/a/24622591
has comment: http://stackoverflow.com/comment/38155515
has comment: http://stackoverflow.com/comment/38155102
has comment: http://stackoverflow.com/comment/38156093
answer count: 3
has comment: http://stackoverflow.com/comment/38155134

http://stackoverflow.com/a/24744938
type: Answer
has comment: http://stackoverflow.com/comment/38414714
has comment: http://stackoverflow.com/comment/59554317
has body: on-mouseover and on-mouseout are correct, here's a demo as a Stack Snippet: A humble button hovered: {{hovered}} It's possible that your element doesn't have a myHoverHandler property. Perhaps there's a typo? As for whether to use Polymer event binding vs other methods, you can absolutely do this with vanilla js or jquery or whatever. Polymer handles a bit of the busy work, like making sure that the event handler is registered in conditional and repeated templates, binding this to the element which is usually what you want, and deregistering the handlers when their elements are removed from the DOM. There are times though when doing it manually makes sense too though.
accepted answer of: http://stackoverflow.com/q/24743518
answers question: http://stackoverflow.com/q/24743518
has comment: http://stackoverflow.com/comment/38415172
upvote count: 22
type: AcceptedAnswer
downvote count: 0
score: 22

jquery
tags question: http://stackoverflow.com/q/24599534
tags question: http://stackoverflow.com/q/24662037
tags question: http://stackoverflow.com/q/24632712
tags question: http://stackoverflow.com/q/24635546
tags question: http://stackoverflow.com/q/24737478
tags question: http://stackoverflow.com/q/24700278
tags question: http://stackoverflow.com/q/24646041
tags question: http://stackoverflow.com/q/24660889
tags question: http://stackoverflow.com/q/24634832
tags question: http://stackoverflow.com/q/24746217
tags question: http://stackoverflow.com/q/24657699
tags question: http://stackoverflow.com/q/24598604
tags question: http://stackoverflow.com/q/24734017
tags question: http://stackoverflow.com/q/24638369
tags question: http://stackoverflow.com/q/24731139
tags question: http://stackoverflow.com/q/24747603
tags question: http://stackoverflow.com/q/24642775
tags question: http://stackoverflow.com/q/24608162
tags question: http://stackoverflow.com/q/24650338
tags question: http://stackoverflow.com/q/24648777
tags question: http://stackoverflow.com/q/24731314
tags question: http://stackoverflow.com/q/24708712
tags question: http://stackoverflow.com/q/24614100
tags question: http://stackoverflow.com/q/24597764
tags question: http://stackoverflow.com/q/24681436
tags question: http://stackoverflow.com/q/24596300
tags question: http://stackoverflow.com/q/24731375
tags question: http://stackoverflow.com/q/24722884
tags question: http://stackoverflow.com/q/24639311
tags question: http://stackoverflow.com/q/24647930
tags question: http://stackoverflow.com/q/24719558
tags question: http://stackoverflow.com/q/24739585
tags question: http://stackoverflow.com/q/24682288
tags question: http://stackoverflow.com/q/24611458
tags question: http://stackoverflow.com/q/24694502
tags question: http://stackoverflow.com/q/24591492
tags question: http://stackoverflow.com/q/24727796
tags question: http://stackoverflow.com/q/24710319
tags question: http://stackoverflow.com/q/24722356
tags question: http://stackoverflow.com/q/24659531
tags question: http://stackoverflow.com/q/24716751
tags question: http://stackoverflow.com/q/24671861
tags question: http://stackoverflow.com/q/24731906
tags question: http://stackoverflow.com/q/24611292
tags question: http://stackoverflow.com/q/24601447
tags question: http://stackoverflow.com/q/24669823
tags question: http://stackoverflow.com/q/24699689
tags question: http://stackoverflow.com/q/24708525
tags question: http://stackoverflow.com/q/24709180
tags question: http://stackoverflow.com/q/24645489
tags question: http://stackoverflow.com/q/24651431
tags question: http://stackoverflow.com/q/24723502
tags question: http://stackoverflow.com/q/24643266
tags question: http://stackoverflow.com/q/24697009
tags question: http://stackoverflow.com/q/24589189
tags question: http://stackoverflow.com/q/24662735
tags question: http://stackoverflow.com/q/24671152
tags question: http://stackoverflow.com/q/24721314
tags question: http://stackoverflow.com/q/24630612
tags question: http://stackoverflow.com/q/24730067
tags question: http://stackoverflow.com/q/24689260
tags question: http://stackoverflow.com/q/24654077
tags question: http://stackoverflow.com/q/24719217
tags question: http://stackoverflow.com/q/24683264
tags question: http://stackoverflow.com/q/24711679
tags question: http://stackoverflow.com/q/24653064
tags question: http://stackoverflow.com/q/24720971
tags question: http://stackoverflow.com/q/24612175
tags question: http://stackoverflow.com/q/24681891
tags question: http://stackoverflow.com/q/24704357
tags question: http://stackoverflow.com/q/24734505
tags question: http://stackoverflow.com/q/24690114
tags question: http://stackoverflow.com/q/24605799
tags question: http://stackoverflow.com/q/24732159
tags question: http://stackoverflow.com/q/24623837
tags question: http://stackoverflow.com/q/24602815
tags question: http://stackoverflow.com/q/24648401
tags question: http://stackoverflow.com/q/24633831
tags question: http://stackoverflow.com/q/24612746
tags question: http://stackoverflow.com/q/24588728

http://stackoverflow.com/q/24726006
has title: What's the purpose of _.extend({})
type: AnsweredQuestion
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/38353732
has comment: http://stackoverflow.com/comment/38353560
has comment: http://stackoverflow.com/comment/38353450
type: Question
has comment: http://stackoverflow.com/comment/38353521
tagged with: javascript
has comment: http://stackoverflow.com/comment/38353480
score: 0
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/24726162
has body: I've seen the following Underscore extend usage: _.extend({}) Wouldn't the result be just the same empty object? Is there a reason for doing this?
has comment: http://stackoverflow.com/comment/38353427
has comment: http://stackoverflow.com/comment/38353597
has answer: http://stackoverflow.com/a/24726162

http://stackoverflow.com/comment/38158350
type: Comment
type: QuestionComment
score: 0
has text: @joshboley I'm saying I want to create a prototype that inherits the method `logDependencies()` from it's own prototype. A special prototype that inherits certain methods. No, I don't want the methods to be global.
comment on: http://stackoverflow.com/q/24622383

http://stackoverflow.com/q/24644562
has title: Is there a way to keep an index value local to a function in javascript
type: Question
has body: Is there any way to keep index from being a global variable in this example: var arr = [1, 2, 3, 4, 5]; var index = 0; function run() { console.log(arr[index]); if(++index == arr.length) index = 0; } It seems like it has to be global in order to be checked each time but I was wondering if there are any clever tricks to get around the global variables.
has answer: http://stackoverflow.com/a/24644572
accepted answer: http://stackoverflow.com/a/24644572
tagged with: closures
has answer: http://stackoverflow.com/a/24644612
tagged with: javascript
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/111102
tagged with: scope
linked to: http://stackoverflow.com/q/8774425
possible better answer: http://stackoverflow.com/a/24644612
type: AnsweredQuestion
tagged with: global-variables

http://stackoverflow.com/a/26415266
type: Answer
score: 0
has body: Like you said in your own answer, the problem was that you weren't waiting for the page to load. I really don't like the method name for driver.wait, because it implies that it will wait the specified amount of time before continuing, but that's not the case. It's only a timeout if your promise does not resolve. To wait, you should use driver.sleep(1000). Then you can add your expectations, like so: driver.sleep(1000).then(function () { return driver.getTitle().then(function (title) { expect(title).toBe('webdriver - Google Search'); done(); }); }); (Since you were using done in your question, I'm assuming Jasmine 2.0 and done) Hope this helps.
answers question: http://stackoverflow.com/q/24651231

http://stackoverflow.com/comment/38114655
type: Comment
type: QuestionComment
has text: @eicto: Thanks for the suggestion! That does reduce the amount of code a bit, but it also seems to increase the complexity of the function and does not (at least to my non-ternary-operator-comfortable eyes) seem to contribute to readability. Do you think it's better to shore up the code with ternary operators in this instance, or would you prefer more code and less complexity?
score: 0
comment on: http://stackoverflow.com/q/24599890

http://stackoverflow.com/comment/38253894
type: Comment
type: QuestionComment
has text: sorry i never use that one i just go through the document.
comment on: http://stackoverflow.com/q/24673601
score: 0

http://stackoverflow.com/q/24737457
has comment: http://stackoverflow.com/comment/38375109
has comment: http://stackoverflow.com/comment/38375095
tagged with: javascript
has body: How can I get all keys with values of an array of objects as an array? For example I want to have all the src keys as array for an assetloader: images = [ {"name":"an image","src":"http://source.png"}, {"name":"an image2","src":"http://source2.png"}, {"name":"an image3","src":"http://source3.png"} ]; //the solution code here.. console.log(solution); // Output: // ["http://source.png", "http://source.png2","http://source3.png"] I can loop through the images array and push all the 'src' tags into the solution var, but I think this is not an good practise in terms of performance. Also I can't use the original image.src tag, the assetloader is from an framework and accepts only an array with sources.
answer count: 2
has comment: http://stackoverflow.com/comment/38375275
has comment: http://stackoverflow.com/comment/38375564
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/38375195
favorite count: 0
type: UnansweredQuestion
has title: javascript get all key with values of an array of object as array
has comment: http://stackoverflow.com/comment/38375131
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38375053
has answer: http://stackoverflow.com/a/73987770
has answer: http://stackoverflow.com/a/24737549
type: Question
has comment: http://stackoverflow.com/comment/38375173

http://stackoverflow.com/q/24595852
tagged with: caching
type: AnsweredQuestion
answer count: 1
has comment: http://stackoverflow.com/comment/38106626
tagged with: angularjs
type: Question
has title: Trying to use $cachefactory throws an [$injector:unpr] error
score: 0
has comment: http://stackoverflow.com/comment/38106477
has answer: http://stackoverflow.com/a/24596274
has body: I'm trying to use $cachefactory in my angular project. I've created a cache service: services.js var AppServices = angular.module('Test.services', []) .factory('testCache', function($cachefactory){ return $cachefactory('test'); }); and I'm trying to inject it in my controller like this: TestController.js var TestController =function($scope, $http, testCache) { var cache = testCache.get('test'); if(cache) { $scope.test = cache; } else { var value = "Test Value"; $scope.test = value; cache.put('test', value); } }; However when I run the application and try to retrieve data I get: Error: [$injector:unpr] http://errors.angularjs.org/1.2.17/$injector/unpr?p0=%24cachefactoryProvider%20%3C-%20%24cachefactory%20%3C-%20testCache u/&lt;@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:6:443 ec/l.$injector&lt;@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:36:139 c@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:34:195 ec/p.$injector&lt;@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:36:209 c@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:34:195 d@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:34:409 ec/p.$injector&lt;@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:36:222 c@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:34:195 d@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:34:409 f/&lt;.instantiate@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:35:101 Od/this.$get&lt;/&lt;@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:66:463 $ViewDirectiveFill/&lt;.compile/&lt;@https://rawgit.com/angular-ui/ui-router/0.2.10/release/angular-ui-router.js:2797:1 N@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:54:85 g@https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:47:55 v/&lt;@https://ajax.googleapis.co…
accepted answer: http://stackoverflow.com/a/24596274
tagged with: javascript
has comment: http://stackoverflow.com/comment/38107051

http://stackoverflow.com/comment/38332409
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24714796
has text: Where, precisely, are you stuck? Incidentally that seems to be jQuery (which is a JavaScript *library*), you may want to add that tag to your question.
score: 0

http://stackoverflow.com/comment/38118085
type: Comment
has text: Thank you for your help, too. This is much more readable! I'll play around with this
comment on: http://stackoverflow.com/a/24601692
type: AnswerComment
score: 0

http://stackoverflow.com/q/24603292
answer count: 2
has comment: http://stackoverflow.com/comment/38121324
has comment: http://stackoverflow.com/comment/38121391
has comment: http://stackoverflow.com/comment/38121315
possible better answer: http://stackoverflow.com/a/24603428
has answer: http://stackoverflow.com/a/24603428
has title: Change textbox value in javascript
has answer: http://stackoverflow.com/a/24603311
accepted answer: http://stackoverflow.com/a/24603311
has body: I want to update the value of text box from where I'm getting initial value to add product to cart. Now I'm applying round function &amp; I want to update the value of text box that is because I'm using ajax &amp; if I'm applying round function, user must know how system calculated everything. Here's my simple code: &lt;script&gt; $(document).ready(function(){ $(document).delegate('.purchasenow','click', function(e){ var buynow=this; var productid = $(this).attr('id'); var quantity = $('.quo_'+productid).val(); var quantity = Math.round(quantity); alert(quantity); //This gives the value $('.quo_'+productid).value = quantity; //This is not working }); }); Can anyone tell why it's not working? It's very simple but I'm not able to find out the cause.
has comment: http://stackoverflow.com/comment/38121404
type: Question
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/38121343
score: 0

http://stackoverflow.com/comment/38237760
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24664706
has text: Your fiddle isn't setup right, http://jsfiddle.net/jTu93/3/

http://stackoverflow.com/comment/38281711
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24671100
score: 0
has text: i've tried but by all i can see it looks like its working it gets to the end of the script and runs the correct function just nothing happens

http://stackoverflow.com/comment/38335838
type: AnswerComment
score: 0
has text: @user3608176 check browser console for errors. `doesn't work` isn't very informative. WHat does or doesn't happen?
type: Comment
comment on: http://stackoverflow.com/a/24716770

http://stackoverflow.com/comment/38214165
type: AnswerComment
type: Comment
has text: Thank you so much. You literally helped me a huge amount. Thank you.
comment on: http://stackoverflow.com/a/24611821
score: 0

http://stackoverflow.com/a/24747737
answers question: http://stackoverflow.com/q/24744989
upvote count: 5
has body: Just extend from both classes. You can provide any object to .extend, not just an object literal. Extend your own class from Deepmodel, then extend a new class from RelationalModel, providing the Deepmodel-extended class's prototype: var MyModel = Backbone.Deepmodel.extend({ ... }) MyModel = Backbone.RelationalModel.extend(MyModel.prototype);
score: 5
accepted answer of: http://stackoverflow.com/q/24744989
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38394639

http://stackoverflow.com/comment/38334170
type: Comment
has text: @DavidSpence can leave it out, has not been known to be a problem and for some reason have seen it recommended not to use it
type: AnswerComment
comment on: http://stackoverflow.com/a/24715552
score: 0

http://stackoverflow.com/a/24742287
has comment: http://stackoverflow.com/comment/38385521
score: 2
has comment: http://stackoverflow.com/comment/38385216
has comment: http://stackoverflow.com/comment/38384370
downvote count: 0
has body: You can't read a file directly from javascript for security reasons. Browsers shouldn't let you access a file directly from disk. You can put the file inside an IIS or other web server and access the URL. For example: copy the file to C:\Inetpub\wwwroot\YourFile.xml Access from http://localhost:80/YourFile.xml Test in a web browser before you test from the API to make sure that the file is accessible.
has comment: http://stackoverflow.com/comment/38385624
has comment: http://stackoverflow.com/comment/38385010
type: Answer
has comment: http://stackoverflow.com/comment/38385589
upvote count: 2
has comment: http://stackoverflow.com/comment/38384559
answers question: http://stackoverflow.com/q/24739642

http://stackoverflow.com/comment/38389875
type: Comment
type: QuestionComment
has text: Make sure all of your plugins / dependencies are compatible with IE8. Make sure you have no calls to things like `console` hanging around unless you specify them as a function. Try http://www.jslint.com/ to help find things like trailing commas `{1:one,2:two,}` that ie errors on.
comment on: http://stackoverflow.com/q/24744895
score: 0

http://stackoverflow.com/comment/38289831
type: Comment
comment on: http://stackoverflow.com/a/24691270
type: AnswerComment
has text: How are you debugging it?
score: 0

http://stackoverflow.com/a/71354212
type: Answer
score: 0
has body: In my projects I make an endpoint on my API that return the enum in json. Them I store it with redux to not recall it on each time I visit the page. If you don't use a JS framework, you can still make an url that is triggered by an ajax request and feed your javascript. You can too make a json file that is stored in a public directory and import it in javascript and file get contents in your backend language
answers question: http://stackoverflow.com/q/24647721

http://stackoverflow.com/a/24597917
has body: Demo try this, your viewableText.click(editDiv); not calling your function back. viewableText.click(function(){ editDiv($("#profile_description p"), true); });
answers question: http://stackoverflow.com/q/24597263
score: 0
type: Answer

http://stackoverflow.com/q/24615272
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38144254
score: -2
tagged with: css
favorite count: 0
downvote count: 2
accepted answer: http://stackoverflow.com/a/24615356
answer count: 1
has title: External css not being applied in angular project
has body: I'm going over some tutorials to better learn angularJS but I can't seem to get my external css to apply. I can apply both inline and internal css but external is out of the question it seems. Has anyone had any similar problems in the past? My html looks like Learing angular Home Projects Map ThreeJS the variable active is null You are in the {{active}} section {{inputValue}} and my css looks like #menuBar { font-size: 24px; text-align: center; } #section { font-weight: bold; font-size: 26px; } nav{ display:inline-block; margin:60px auto 45px; background-color:#5597b4; box-shadow:0 1px 1px #ccc; border-radius:2px; } Nothing fancy, just super simple stuff but I'm drawing a blank as to why I can use external css. Thanks for any help.
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24615356
has comment: http://stackoverflow.com/comment/38144371
tagged with: angularjs

http://stackoverflow.com/q/24623365
tagged with: http://stackoverflow.com/tag/html
tagged with: vb.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38160220
type: Question
has comment: http://stackoverflow.com/comment/38160145
has comment: http://stackoverflow.com/comment/38160137
tagged with: javascript
has body: A common way of displaying a list is by making a table in html. I have made a table in html and using the <% %> tags to put the values for the list. like so (example), First Name LastName Phone <% for each item in employees %> <% =item.FirstName %> <% =item.LastName %> <% =item.Phone %> <% next %> Now I don't want to do this each time I post back or click buttons. Therefore I used if autopostback = false then execute the code. What I want to do is hit a specific button to execute this piece of client-side code. I am new to using asp.net, vb.net is my primary language but I have also done some php.
has comment: http://stackoverflow.com/comment/38160249
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38160324
has title: Asp.net executing html code on button press
has answer: http://stackoverflow.com/a/24623890
tagged with: asp.net
has comment: http://stackoverflow.com/comment/38160275
has answer: http://stackoverflow.com/a/24623535

http://stackoverflow.com/q/24711361
type: Question
has body: I'm parsing an xml using jQuery (app in cordova/phonegap). To do so, I'm following this tutorial. It all works fine but when it comes to nested tags. I have this example XML: ..... El cielo es azul? SI NO Eso esta bien No esta bien Desarrolla por favor: PUEDE Gracias por participar Gracias por participar una vez mas .... As you can see, I have 2 elements nested, and they can have different number of tags. When I try this in my js: .... x=xmlhttp.response; xmlDoc = $.parseXML( x ); $(xmlDoc).find("preguntas").each(function() { alert($(this).text()); // This shows contents of all "pregunta" correctly alert($(this).find("enunciado").text()); // This shows ALL "enunciado" as one single string } .... How can I make it so it selects one "respuesta" at a time so I can get contents separately? Thanks
has answer: http://stackoverflow.com/a/24712013
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
tagged with: cordova
accepted answer: http://stackoverflow.com/a/24712013
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has title: jQuery XML Parsing not working with nested tags

http://stackoverflow.com/q/24593444
has body: I need generate ratings. Rating it is integer value beetwen 0 - 15. Rating have levels. (5 stars: bronze, silver, gold) So i need such html ... I had add directive Now i have problems: "i" tags count is not refreshing on rating changes via input (no add, no remove) - see example on http://jsfiddle.net/AdKd8/1/ need raw html, no unsafe (ng-bind-html-unsafe not works in example) App code: http://jsfiddle.net/AdKd8/1/ HTML: rating: need simular result: e.g 1 CSS: i{ background-color: #f093f0; height: 10px; width: 10px; margin: 5px; display:block; } .cap i{ background-color: red; } .crown i{ background-color: green; } .blue i{ background-color: blue; } JS: function RateCtrl($scope) { $scope.rating = 14; } angular.module('myapp', []). directive('myrating', function() { var directive = { restrict: 'E', replace: true, scope: { rating: '=' } }; directive.template = " {{stars}} "; directive.link = function(scope, element, attributes) { function gen_html(rating_value){ if(!rating_value){ return } scope.class_value = ""; var stars_count = 0; var step = 5 var class_arr = ["blue", "cap", "crown"]; for(var i=0; i<3; i++){ if(rating_value > step){ scope.class_value = class_arr[i]; stars_count = rating_value - step; } step+=5; } scope.stars = ""; for(var i=0;i<stars_count;i++){ scope.stars+=""; } } gen_html(scope.rating); } return directive; }) Example: http://jsfiddle.net/AdKd8/1/
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/24594978
accepted answer: http://stackoverflow.com/a/24594978
type: AnsweredQuestion
has title: Refresh html for directive accord model changes
has comment: http://stackoverflow.com/comment/38102989
has comment: http://stackoverflow.com/comment/38101957
type: Question

http://stackoverflow.com/a/24691117
type: Answer
answers question: http://stackoverflow.com/q/24690970
has body: JavaScript is an event driven language. Using setInterval can work. But there are event driven solutions as well: Use events from awe. I don't have an experience with awe but maybe there is a load or ready event you can listen to. MutationObservers. This is a native API (supported by all modern browsers). It allows you to listen to changes to the DOM. Look for your node in the change list.
upvote count: 1
has comment: http://stackoverflow.com/comment/38286756
score: 1
has comment: http://stackoverflow.com/comment/38286386
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24690970
downvote count: 0
has comment: http://stackoverflow.com/comment/38287071
has comment: http://stackoverflow.com/comment/38286860
has comment: http://stackoverflow.com/comment/38286840

http://stackoverflow.com/comment/80035965
type: Comment
has text: I tried this with res.redirect --> it does not seem to work on Chrome Version 61. router.get('/logout', function (req, res) { res.cookie('jwtToken', '', {expires: new Date(0)}); res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate'); res.header('Expires', '-1'); res.header('Pragma', 'no-cache'); res.redirect('/vendor/login'); });
type: AnswerComment
comment on: http://stackoverflow.com/a/24591864
score: 0

http://stackoverflow.com/comment/38258151
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24676137
has text: Is there a specific reason you don't want to use JQuery? It's straight forward to use JQuery.

http://stackoverflow.com/comment/38312476
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24704793
type: Comment
has text: You're not animating the scroll. Look at this SO question - http://stackoverflow.com/questions/6677035/jquery-scroll-to-element

http://stackoverflow.com/comment/50024502
has text: @user3677331 `chrome.downloads` is only available to extensions, not apps. See https://code.google.com/p/chromium/issues/detail?id=274673
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24673271

http://stackoverflow.com/comment/38155757
score: 0
has text: Better but still not good enough... Is that Advanced Custom Fields Plugin from advancedcustomfields.com, or did you write your own code? And if you wrote your own, isn't the codex command get_field_id(). Also, its not clear how you divide a post into part 1 and part 2? Is part one the title and thumbnail, with part2 being the content? Or is this a page 1, content continued on page 2 issue ? (have you played with the ` ` thing yet? )
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24620954

http://stackoverflow.com/q/24678553
has comment: http://stackoverflow.com/comment/38286704
has comment: http://stackoverflow.com/comment/38289755
type: Question
tagged with: jquery-plugins
score: 0
has comment: http://stackoverflow.com/comment/38287147
has comment: http://stackoverflow.com/comment/38263545
has title: jQuery Context Menu only appears on the first ten tr elements
tagged with: javascript
tagged with: jquery
has body: On my webpage I am using this Simple Context Menu Plugin for showing a little contextmenu by rightclicking a table row in some html tables, who are made with Datatables Plugin. Now to my question. The context menu appears on every table only by the first ten rows. For me it doesn't seem that I made anything else in the first rows than in the rows after row ten. Attached some code from my webpage: A table example: ID Vorname Nachname Kunde Von Bis Weiterbildung Ausbilder Achievment Beschreibung Zertifikat 11 Kraemer Test hjadfkjas 24.06.2014 24.06.2014 test hp Test HP TitelDesZertifikates TestZertifikat 16 ölakdsjfölk jfdaölfjd fneionffoefneofef 25.06.2014 25.06.2014 test hp Test HP adf TestZertifikat 18 adfadf adfadsf fneionffoefneofef 25.06.2014 25.06.2014 test hp Test HP Test TestZertifikat 19 adfadsf afdafd fneionffoefneofef 25.06.2014 25.06.2014 test hp Test HP TestZertifikat 20 adfadsf Test fneionffoefneofef 25.06.2014 25.06.2014 test hp Test HP TestZertifikat 21 adfadsf Test fneionffoefneofef 25.06.2014 25.06.2014 test hp Test HP TestZertifikat 22 jflajslfökj sjdflsdkjfl hjadfkjas 25.06.2014 25.06.2014 test hp Name TelefonZertifikat 23 Luger Christian hjadfkjas 26.06.2014 30.06.2014 aslökdfj Name TitelDesZertifikates 24 Meier Hans EPC 02.06.2014 06.06.2014 test hp Althammer Walter teilgenommen irgedwas TestZertifikat 25 Krämer Sebastian hjadfkjas 07.07.2014 07.07.2014 aslökdfj Althammer Walter Test Test Bachmann Basic Training 27 Kraemer Sebastian EPC 07.07.2014 07.07.2014 Laser Grundlagen Teil 1 Althammer Walter Bachmann Basic Training 28 ecececsececec Krämer EPC 09.07.2014 13.07.2014 Laser Grundlagen Teil 1 Althammer Walter Bachmann Basic Training 29 Sebastian Krämer EPC 07.07.2014 07.07.2014 Laser Grundlagen Teil 1 Sebastian Krämer Bachmann Basic Training 30 Sebastian Krämer EPC 08.07.2014 08.07.2014 Laser Grundlagen Teil 1 Althammer Walter Bachmann Basic Training The context menu: $(function() { $('.contextmenu').contextPopup({ title: 'Optionen', items: [ …
tagged with: contextmenu
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/49800388
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25093269
has text: I received the error when trying to make an ImageShack image I uploaded the og:share image. So apparently Facebook blacklists ImageShack.
score: 0

http://stackoverflow.com/q/24693353
tagged with: css
accepted answer: http://stackoverflow.com/a/24693388
type: AnsweredQuestion
has body: I have some js code that resizes a div id according to window size function resize() { var heights = window.innerHeight; document.getElementById("somediv").style.height = heights + "px"; } resize(); window.onresize = function() { resize(); }; This is great but I want it to resize several divs with the same class. I tried using getElementByClass but that didn't work.
type: Question
possible better answer: http://stackoverflow.com/a/24693411
has answer: http://stackoverflow.com/a/24693411
has answer: http://stackoverflow.com/a/24693534
score: 0
has answer: http://stackoverflow.com/a/24693388
tagged with: javascript
tagged with: jquery
has title: Resize all divs with certain class using javascript
has answer: http://stackoverflow.com/a/24693430
has answer: http://stackoverflow.com/a/24693408
answer count: 5
has comment: http://stackoverflow.com/comment/38290187
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38364336
comment on: http://stackoverflow.com/q/24731490
type: Comment
score: 1
has text: I didn't see anything about the new div to show in your fiddle. Here's my [fork of it, for what it's worth](http://jsfiddle.net/amullins/WuN6X/1/).
type: QuestionComment

http://stackoverflow.com/q/24635546
has comment: http://stackoverflow.com/comment/38182755
has answer: http://stackoverflow.com/a/24635661
accepted answer: http://stackoverflow.com/a/24635661
has comment: http://stackoverflow.com/comment/38182726
has comment: http://stackoverflow.com/comment/38182808
score: -3
type: Question
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/38183190
has body: I've got a problem I don't understand. I want to create a datepicker with JQUERY (UI-1.9.1 + JQ 1.8.2) I define the DateSelClickHere "DateSelClickHere" should be a picture later on. If you now click to the empty datefield, it just works fine. If you click to the text (or image),I get this: [object Object] Sample here: http://jsfiddle.net/3DH3L/ I don't get it?!? PS: I will try it with the property "image" - but - this is the crap - it's not my code and I just start with this project, so I first search for the "easy way" to fix the errors.
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: JQUERY: ID not found, just defined before

http://stackoverflow.com/comment/38320217
type: Comment
comment on: http://stackoverflow.com/a/24708558
score: 0
type: AnswerComment
has text: Both inputs toogle my div, so if i put any value in first field my div shows, and if i click on second input and put an value my div close...Both inputs are same, i can set any time to toggle again? like just 1 toggle per 4 seconds?

http://stackoverflow.com/comment/38200141
comment on: http://stackoverflow.com/q/24644595
type: Comment
type: QuestionComment
score: 0
has text: "The keypress event is fired when a key is pressed down and that key **normally produces a character value**" -- https://developer.mozilla.org/en-US/docs/Web/Events/keypress

http://stackoverflow.com/q/24681659
has comment: http://stackoverflow.com/comment/38272058
has body: I'm trying to run a node.js app locally, I installed all the dependencies by npm install I have mongodb running in a separate console tab, showing something like [~/apps/Mi aguila]$ sudo mongod rvm:ruby-2.1.1 mongod --help for help and startup options 2014-07-10T10:40:16.096-0500 [initandlisten] MongoDB starting : pid=7067 port=27017 dbpath=/data/db 64-bit host=localhost 2014-07-10T10:40:16.097-0500 [initandlisten] 2014-07-10T10:40:16.097-0500 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 2014-07-10T10:40:16.097-0500 [initandlisten] db version v2.6.3 2014-07-10T10:40:16.097-0500 [initandlisten] git version: nogitversion 2014-07-10T10:40:16.097-0500 [initandlisten] build info: Darwin minimavericks.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100. 13~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 2014-07-10T10:40:16.097-0500 [initandlisten] allocator: tcmalloc 2014-07-10T10:40:16.097-0500 [initandlisten] options: {} 2014-07-10T10:40:16.099-0500 [initandlisten] journal dir=/data/db/journal 2014-07-10T10:40:16.100-0500 [initandlisten] recover : no journal files present, no recovery needed 2014-07-10T10:40:16.133-0500 [FileAllocator] allocating new datafile /data/db/local.ns, filling with zeroes... 2014-07-10T10:40:16.133-0500 [FileAllocator] creating directory /data/db/_tmp 2014-07-10T10:40:16.203-0500 [FileAllocator] done allocating datafile /data/db/local.ns, size: 16MB, took 0.068 secs 2014-07-10T10:40:16.271-0500 [FileAllocator] allocating new datafile /data/db/local.0, filling with zeroes... 2014-07-10T10:40:16.383-0500 [FileAllocator] done allocating datafile /data/db/local.0, size: 64MB, took 0.111 secs 2014-07-10T10:40:16.449-0500 [initandlisten] build index on: local.startup_log properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "local.startup_log" } 2014-07-10T10:40:16.455-0500 [initandlisten] added index to empty collection 2014-07-10T10:40:16.458-0500 [initandli…
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38270383
has comment: http://stackoverflow.com/comment/57692221
has comment: http://stackoverflow.com/comment/38272092
type: Question
has title: throw er; // Unhandled 'error' event Error: listen EADDRNOTAVAIL
score: 0
tagged with: mongodb
has comment: http://stackoverflow.com/comment/38269199
tagged with: javascript
tagged with: web

http://stackoverflow.com/q/24690384
answer count: 1
has title: No saving or outputting is possible in Javascript?
has body: In this question I just learned how to illicit one desired element out of a Google translate page. There I have also learned that placing anything into clipboard in Javascript is literately impossible (you can do it by prompting a window asking a user to save some value into the clipboard - but you can't do that automatically), which is a rather sad thing to me as I really need to save that element out of a Google translate page automatically. I wonder if it's at least possible in Javascript to save some values in a separate file on my computer? In the w3schools.com tutorial on Javascript it is stated that "JavaScript does not have any print or output functions". Does that mean that saving info on my computer is absolutely impossible in Javascript?
type: AnsweredQuestion
tagged with: save
tagged with: output
accepted answer: http://stackoverflow.com/a/24690878
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24690878
score: 0
linked to: http://stackoverflow.com/q/24668363

http://stackoverflow.com/comment/38385428
score: 0
comment on: http://stackoverflow.com/q/24729649
has text: `UI.renderWithData` returns a string and I think it does exactly what you want. Still need an example?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38213939
type: Comment
has text: yes that's my purpose, but I want first to show a print preview page
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24647895

http://stackoverflow.com/q/24739642
tagged with: url
tagged with: javascript
tagged with: asp.net
has body: I'm working on a ASP.Net MVC application. In my project, I have a third party JavaScript library which dynamically saves data in a xml format. Using some C# server code, I read this xml data and save it to a local file on my computer. I will then need to load this said data using the same JavaScript library as before. The library has a load function which, will load xml data from a http URL (cannot give it a local file path) My question is how do place my file on a local server, so I may call an http URL of the file? Here is the question I had posted on the third party tool's forum: http://forum.dhtmlx.com/viewtopic.php?f=6&amp;t=37252&amp;p=115601#p115601 Any help would be appreciated, thanks! the javascript function: scheduler.load("http://localhost/Tasks.xml", "xml"); Error:
score: 0
type: UnansweredQuestion
tagged with: http
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/24742287
has title: asp.net mvc add local file to web server
has answer: http://stackoverflow.com/a/24742345
answer count: 2

http://stackoverflow.com/comment/38124861
type: AnswerComment
comment on: http://stackoverflow.com/a/24603642
score: 0
type: Comment
has text: Running a local web server did make Chrome and Safari's behaviour consistent but the problem is not resolved. see update to the question above.

http://stackoverflow.com/q/24694665
has body: I'm trying to send data from db to client with this code: On server side: $prep = $pdo-&gt;prepare("SELECT * FROM user WHERE id=?"); $prep-&gt;execute([$_POST['id']]); $user = $prep-&gt;fetch(); echo json_encode($user); Client side $.ajax({ url : '/path/to/myaction', data : {id : id}, complete : function(data){ console.log(JSON.parse(data)); } }); The result is something like: {id : 101,name : "Fudatura",birthdate : "1995/02/03",email : "fudatura@gmail.com"} Everything is fine. I'm just a little worried about publishing the column structure. Is this a security problem? Do I need to worry about this?
tagged with: security
score: 0
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/24694864
downvote count: 1
has answer: http://stackoverflow.com/a/24694799
favorite count: 0
has comment: http://stackoverflow.com/comment/38292649
possible better answer: http://stackoverflow.com/a/24694799
has answer: http://stackoverflow.com/a/24695275
tagged with: php
accepted answer: http://stackoverflow.com/a/24695275
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38292613
has title: what can a potential attacker do if he knows the column names in my database
type: Question
tagged with: javascript

http://stackoverflow.com/q/24681339
has body: I'M trying to split a value only if the delimiter is not escaped. I have read many question on StackOverflow on this but nothing works for me. I have this value: InvalidMsg(this,'error with this caracter \', please change your value.'); the keyword here is: \' I want to get the error message so I try something like: var str = "InvalidMsg(this,'error with this caracter \', please change your value.');"; matches = str.match(/([^']|\\')+/g); alert(matches[1]); //error with this caracter I need to get the full message.. the full message is: error with this caracter ', please change your value any idea? thank you
has title: Javascript Split regex escaped delimiter
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24681573
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24681573
accepted answer: http://stackoverflow.com/a/24682116
favorite count: 0
type: Question
answer count: 2
tagged with: regex
score: 0
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/24682116

http://stackoverflow.com/comment/38096428
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24590044
score: 1
has text: Got it, I also thought a directive would be a good idea as this piece of logic could be applied to multiple pages potentially, what are your thoughts?

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

http://stackoverflow.com/q/24593539
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have been trying different things for a while now, but I'm still unable to get one DIV to fade out, and have another one fade in. I have searched the site, but I'm still new to jQuery, so I don't understand certain syntax and whatnot. If someone could explain the easiest way to have my code check to see if a DIV is already in-view (probably with an if statement)--if not, having the DIV selected by the user fade in. If one is already in view, have it fade that DIV out, and fade in the newly selected one. Thanks, again!
tagged with: css
has answer: http://stackoverflow.com/a/24593585
downvote count: 1
has comment: http://stackoverflow.com/comment/38102357
type: Question
has title: How can I get an effect to fade out before another fades in, with an "if/else" statement in jQuery?
tagged with: if-statement
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/24593602
has comment: http://stackoverflow.com/comment/38102131

http://stackoverflow.com/q/24733903
has comment: http://stackoverflow.com/comment/38388657
score: 2
tagged with: firefox
downvote count: 0
tagged with: javascript
has body: I've have found a bug on an old Firefox extension I wrote. The extension is not build with the new SDK. I've tested this extension on Firefox v 30 and 29. The issue: When I shrink Firefox, an arrow appears that contain all extensions buttons (like in the screenshot). When I click on my extension button a popup appears relative to my extension button, instead of being relative to the arrow button. So far I couldn't find a way to solve it. What is the right way to write an extension button with popup? (not with SDK) The code: browser.xul <image id="button-1-image" src="/skin/button1.png" width="19" height="19" /> javascript var browser = document.getElementById("popup_browser"); browser.addProgressListener(myListener); browser.setAttribute("src", "/skin/popup.html");
tagged with: firefox-addon
tagged with: xul
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38402397
has comment: http://stackoverflow.com/comment/38387912
has title: Firefox extension - popup panel position issue
type: Question

http://stackoverflow.com/comment/38178453
comment on: http://stackoverflow.com/q/24629767
score: 0
type: Comment
has text: That's a bit odd. It makes sense but shouldn't because I've got another function being called at the bottom. Maybe the grid is rendered before the rest of the page...
type: QuestionComment

http://stackoverflow.com/a/24671128
has body: You likely want Object.preventExtensions: The Object.preventExtensions() method prevents new properties from ever being added to an object (i.e. prevents future extensions to the object). Simply call Object.preventExtensions(my_obj) whenever you want to lock the properties. Unlike Object.seal, this will still allow existing properties to be deleted. Note that this will only work in modern browers; in particular, IE 8 and below do not support it.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38249322
type: Answer
score: 1
answers question: http://stackoverflow.com/q/24671016
upvote count: 1
has comment: http://stackoverflow.com/comment/38249450
accepted answer of: http://stackoverflow.com/q/24671016

http://stackoverflow.com/comment/38132131
comment on: http://stackoverflow.com/a/24609238
type: Comment
has text: It dosn't work, but you might be close. What about LogGrid (the table id). Don't I need that? Remember defaultSelectedLogId is the Id that would match one of the rows in the grid.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38380713
comment on: http://stackoverflow.com/q/24740369
has text: If geocoder.geocode is an asynchronous call, when you get to $.when your `markers` is still an empty array, so I think it isn't a deferred object like $.when is expecting?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38136053
has text: I mean the call to the function need to be given on some event. I was not talking about inline events. Thanks
type: Comment
comment on: http://stackoverflow.com/a/24609759
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38175455
type: QuestionComment
type: Comment
has text: @Cerbrus you're conveniently ignoring the prepended "for the simple injection of a stringified object into a certain element". HTML is not a regular language, but that doesn't mean that as the sole author of such a document, I can't apply some regular principles to the desired placeholder of the data. But if I was to run-scared from using RegEx in this instance, do you have any alternative solutions to the problem at hand?
score: 0
comment on: http://stackoverflow.com/q/24630666

http://stackoverflow.com/q/24743518
has body: I figured I would need to do something like: blah because handling clicks looks like this: blah I've tried using the way shown in the documentation here: declarative event mapping , but on-mouseenter and on-mouseover aren't working as expected. I'm also having trouble passing parameters to my handlers, but that's a different story.
answer count: 3
has comment: http://stackoverflow.com/comment/38386626
has comment: http://stackoverflow.com/comment/38386900
accepted answer: http://stackoverflow.com/a/24744938
upvote count: 11
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38386546
has answer: http://stackoverflow.com/a/37990969
has title: How can I handle a hover the Polymer way without external libraries?
has comment: http://stackoverflow.com/comment/38386685
has comment: http://stackoverflow.com/comment/38387760
downvote count: 1
type: Question
tagged with: polymer
score: 10
has comment: http://stackoverflow.com/comment/38387995
has comment: http://stackoverflow.com/comment/38386521
possible better answer: http://stackoverflow.com/a/34189066
has comment: http://stackoverflow.com/comment/38387859
has answer: http://stackoverflow.com/a/34189066
tagged with: javascript
has comment: http://stackoverflow.com/comment/38386818
favorite count: 0
has answer: http://stackoverflow.com/a/24744938

http://stackoverflow.com/q/24600998
tagged with: semantic-ui
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38124828
score: 1
tagged with: coffeescript
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24605134
downvote count: 0
tagged with: javascript
has title: Async operations in modal callback
answer count: 1
tagged with: meteor
has body: I'm using the semantic-ui modal to allow users to insert data. It has an onApprove callback which allows you to return false to keep the modal open if there are any problems. My data is inserted into a DB, which returns false if there's any error. What's the best way of keeping the modal open if there's an error during this async operation? Here's my code (coffeescript): $('#verification-modal') .modal('setting', { detachable: false, onApprove: validateVerificationForm closable: false }) validateVerificationForm = () -&gt; formData = $('.form').serializeArray() formatted = format($formData); ID_Details.insert(formatted, (errs, id) -&gt; if errs false else true Obviously the anonymous function is returning true/false into the context of the function. What's the best way to return it to the modal?
favorite count: 0

http://stackoverflow.com/comment/38456093
type: AnswerComment
comment on: http://stackoverflow.com/a/24759655
score: 0
has text: I was thinking you might have to move the method around, but maybe not. Give it a try in your controller create action like so: http://pastie.org/9396355
type: Comment

http://stackoverflow.com/comment/38389602
score: 0
type: Comment
has text: that's not really what i need, your code requires parsing every JS file as php script right? I think it's not as fast as solution mentioned above.
comment on: http://stackoverflow.com/a/24730890
type: AnswerComment

http://stackoverflow.com/a/24624479
has comment: http://stackoverflow.com/comment/38182784
answers question: http://stackoverflow.com/q/24622120
has comment: http://stackoverflow.com/comment/50251807
has comment: http://stackoverflow.com/comment/49530830
has comment: http://stackoverflow.com/comment/50251559
has comment: http://stackoverflow.com/comment/49529329
has comment: http://stackoverflow.com/comment/38188129
has comment: http://stackoverflow.com/comment/42041604
has comment: http://stackoverflow.com/comment/50252144
score: 35
upvote count: 35
downvote count: 0
has body: I've created a plunker, demonstrating that ui-router feature reloadOnSearch is working as documented here: reloadOnSearch: Boolean (default true). If false will not retrigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload. So, what this says, that if we do have state like this .state('index.detail', { url: '/detail/:id', reloadOnSearch : false, ... }) navigating to the ui-sref="index.detail({id:1})" will load this state, while navigating to ui-sref="index.detail({id:any-other-id})" will do nothing. But! If we would introduce new (e.g. sibling) state defined like this: .state('index.other', { url: '/other/:id', reloadOnSearch : false, ... }) navigating to below sequence will always re-trigger state reload, not because the param change, but because the state change &lt;a href="#/index/detail/1" ... &lt;a href="#/index/other/1" ... // will relaod &lt;a href="#/index/detail/2" ... // because the state &lt;a href="#/index/other/2" ... // is changing See that all in action here...
has comment: http://stackoverflow.com/comment/49534593
has comment: http://stackoverflow.com/comment/38182938
type: Answer

javascript
tags question: http://stackoverflow.com/q/24602783
tags question: http://stackoverflow.com/q/24676642
tags question: http://stackoverflow.com/q/24628126
tags question: http://stackoverflow.com/q/24590371
tags question: http://stackoverflow.com/q/24696311
tags question: http://stackoverflow.com/q/24670397
tags question: http://stackoverflow.com/q/24648158
tags question: http://stackoverflow.com/q/24594878
tags question: http://stackoverflow.com/q/24684358
tags question: http://stackoverflow.com/q/24725161
tags question: http://stackoverflow.com/q/24667041
tags question: http://stackoverflow.com/q/24739047
tags question: http://stackoverflow.com/q/24732442
tags question: http://stackoverflow.com/q/24594108
tags question: http://stackoverflow.com/q/24630412
tags question: http://stackoverflow.com/q/24748887
tags question: http://stackoverflow.com/q/24720837
tags question: http://stackoverflow.com/q/24691802
tags question: http://stackoverflow.com/q/24661635
tags question: http://stackoverflow.com/q/24603581
tags question: http://stackoverflow.com/q/24710955
tags question: http://stackoverflow.com/q/24744913
tags question: http://stackoverflow.com/q/24624607
tags question: http://stackoverflow.com/q/24725447
tags question: http://stackoverflow.com/q/24597643
tags question: http://stackoverflow.com/q/24659625
tags question: http://stackoverflow.com/q/24748020
tags question: http://stackoverflow.com/q/24709817
tags question: http://stackoverflow.com/q/24701710
tags question: http://stackoverflow.com/q/24673918
tags question: http://stackoverflow.com/q/24728440
tags question: http://stackoverflow.com/q/24744210
tags question: http://stackoverflow.com/q/24733780
tags question: http://stackoverflow.com/q/24705343
tags question: http://stackoverflow.com/q/24719384
tags question: http://stackoverflow.com/q/24626850
tags question: http://stackoverflow.com/q/24594606
tags question: http://stackoverflow.com/q/24638492
tags question: http://stackoverflow.com/q/24628947
tags question: http://stackoverflow.com/q/24648194
tags question: http://stackoverflow.com/q/24743096
tags question: http://stackoverflow.com/q/24635896
tags question: http://stackoverflow.com/q/24748367
tags question: http://stackoverflow.com/q/24723508
tags question: http://stackoverflow.com/q/24748109
tags question: http://stackoverflow.com/q/24722287
tags question: http://stackoverflow.com/q/24604236
tags question: http://stackoverflow.com/q/24743901
tags question: http://stackoverflow.com/q/24722204
tags question: http://stackoverflow.com/q/24678815
tags question: http://stackoverflow.com/q/24666163
tags question: http://stackoverflow.com/q/24646205
tags question: http://stackoverflow.com/q/24610545
tags question: http://stackoverflow.com/q/24668296
tags question: http://stackoverflow.com/q/24674937
tags question: http://stackoverflow.com/q/24721226
tags question: http://stackoverflow.com/q/24663411
tags question: http://stackoverflow.com/q/24699514
tags question: http://stackoverflow.com/q/24602998
tags question: http://stackoverflow.com/q/24633368
tags question: http://stackoverflow.com/q/24608257
tags question: http://stackoverflow.com/q/24673447
tags question: http://stackoverflow.com/q/24691066
tags question: http://stackoverflow.com/q/24617605
tags question: http://stackoverflow.com/q/24707222
tags question: http://stackoverflow.com/q/24703210
tags question: http://stackoverflow.com/q/24653832
tags question: http://stackoverflow.com/q/24605434
tags question: http://stackoverflow.com/q/24660992
tags question: http://stackoverflow.com/q/24706800
tags question: http://stackoverflow.com/q/24725975
tags question: http://stackoverflow.com/q/24614256
tags question: http://stackoverflow.com/q/24652398
tags question: http://stackoverflow.com/q/24747765
tags question: http://stackoverflow.com/q/24706020
tags question: http://stackoverflow.com/q/24680655
tags question: http://stackoverflow.com/q/24746405
tags question: http://stackoverflow.com/q/24696405
tags question: http://stackoverflow.com/q/24629412
tags question: http://stackoverflow.com/q/24640446

converters
tags question: http://stackoverflow.com/q/24626343
tag name: converters
tags question: http://stackoverflow.com/q/24594535
tags question: http://stackoverflow.com/q/24689568
type: Tag

http://stackoverflow.com/comment/120889129
has text: this CSS might help someone ... scroll-behavior: smooth;
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/56391657
type: Comment

http://stackoverflow.com/comment/38242216
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24666439
has text: Thank you very much. I have a question. where do I put the code snippet for "db connection"? Is it inside the body tag of the view file? because what I understood is, it must be called again and again to get the latest coordinates.

http://stackoverflow.com/q/24744989
type: AnsweredQuestion
score: 3
downvote count: 0
type: Question
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/24747737
accepted answer: http://stackoverflow.com/a/24747737
answer count: 1
favorite count: 0
tagged with: backbone.js
has title: How to use multiple extensions in Backbone.Model.extend?
has body: I am working on a project that creates models in such a manner. Backbone.DeepModel.extend({ ... }); This deepmodel allows for deeply nested attributes to be refereed via sytax such as containerGrid.get('cols')[0]['content'] Now I have to implement nested models in a one-to-many format. Deep model doesn't support this, but a library called backbone-relational.js does. The syntax for this library is Backbone.RelationalModel.extend({ ... }); The functionality for these libraries does not overlap, and it is not possible for me to rewrite all of the code currently implemented with the Backbone.Deepmodel syntax. Is there another library I can use which supports both functionalities or another workaround you might recommend? Thank you very much for reading, I really appreciate your time and effort!
tagged with: node.js

http://stackoverflow.com/comment/38248640
has text: what do you mean by " I want to click on the image '#escape' and passback the source of the image '#myimg2' onclick" ?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24671034

http://stackoverflow.com/a/29333202
type: Answer
has body: I used a array in array for the purpose, like this: {{person[1]}}
answers question: http://stackoverflow.com/q/24664916
score: 0

http://stackoverflow.com/comment/38187116
score: 0
type: AnswerComment
has text: So, each pair of fields repeats for each payroll - i.e. a gross payroll and an employee count for Payroll 1, and for Payroll 2, and so on. Do you know if fetching them by ID will still work in that context? Would I have to do something like get the parent and then from there get the sibling value, as I might do in jQuery?
type: Comment
comment on: http://stackoverflow.com/a/24637407

http://stackoverflow.com/comment/38110976
score: 0
comment on: http://stackoverflow.com/q/24598191
type: Comment
type: QuestionComment
has text: What is the question?

http://stackoverflow.com/a/28360003
type: Answer
answers question: http://stackoverflow.com/q/24607923
has body: If you're using Sublime Text, you can select HTML, or JavaScript and it will highlight your syntax. Better, you can install Package Control and via Package Control, you can install handlebars related syntax highlighting on Sublime Text.
score: 0

http://stackoverflow.com/comment/38303442
has text: yes and ajax to send the data and recieve the result if it was success or not
type: AnswerComment
comment on: http://stackoverflow.com/a/24700290
score: 0
type: Comment

http://stackoverflow.com/comment/38129986
comment on: http://stackoverflow.com/q/24608162
type: QuestionComment
score: 1
has text: You are using `createElement` wrong, it takes the name of an element not a class selector. So: `"div"`,`"span"`,`"iframe"`,etc are valid, `"btn btn-file"` is not, unless you are using custom elements even then `btn btn-file` would cause your script to throw an error, not to mention you are not doing anything with them after creating them.
type: Comment

http://stackoverflow.com/comment/38146683
score: 0
comment on: http://stackoverflow.com/a/24616308
type: AnswerComment
has text: how do I refer to the onload of the second page? Would this work? window.open("www.example.com"); window.onload = myFunction1();
type: Comment

http://stackoverflow.com/q/24698323
has body: I have a table, which is dynamically filled using Knockout.js. The (somewhat simplified) body of the table looks like this: I want the a tag to become a link to the file (typically a .doc) behind the generated table row. The problem is (you can assume the link etc. is set correctly) that the link returns JSON, which looks like this: JSON: { "version":{ "major":1, "minor":1, "build":-1, "revision":-1, "majorRevision":-1, "minorRevision":-1 }, "content":{ "headers":[ { "key":"Content-Type", "value":[ "application/octet-stream" ] }, { "key":"Content-Disposition", "value":[ "attachment; filename=foo.doc" ] } ] }, "statusCode":200, "reasonPhrase":"OK", "headers":[ ], "requestMessage":null, "isSuccessStatusCode":true } As you can see, it contains an attachment "foo.doc" (let's assume this is the name $data.name generated). My question is the following: When I click the td element, I want to trigger a download prompt to download the file specified in the JSON. How can I do this? Thanks in advance for the help.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38299692
score: 2
tagged with: http://stackoverflow.com/tag/json
tagged with: knockout.js
type: Question
has title: Generate download link from JSON data using Knockout.JS
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38299738
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25271021
has comment: http://stackoverflow.com/comment/38299638
upvote count: 2

http://stackoverflow.com/comment/38158424
type: Comment
type: QuestionComment
has text: There appears an InfoWindow for you when you click on a bus-icon in http://jsfiddle.net/doktormolle/dT84b/ ? For me nothing happens.
comment on: http://stackoverflow.com/q/24619723
score: 0

http://stackoverflow.com/comment/38202777
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24646067
score: 0
has text: @Jack: is this behavior IE only?

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/24622625
tags question: http://stackoverflow.com/q/24611662
tags question: http://stackoverflow.com/q/24731079
tags question: http://stackoverflow.com/q/24735760
tags question: http://stackoverflow.com/q/24618124
tags question: http://stackoverflow.com/q/24588194
tags question: http://stackoverflow.com/q/24714796
tags question: http://stackoverflow.com/q/24627987
tags question: http://stackoverflow.com/q/24630819
tags question: http://stackoverflow.com/q/24723463
tags question: http://stackoverflow.com/q/24748766
tags question: http://stackoverflow.com/q/24653613
tags question: http://stackoverflow.com/q/24689051
tags question: http://stackoverflow.com/q/24603046
tags question: http://stackoverflow.com/q/24608591
tags question: http://stackoverflow.com/q/24735946
tags question: http://stackoverflow.com/q/24640754
tags question: http://stackoverflow.com/q/24597656
tags question: http://stackoverflow.com/q/24691593
tags question: http://stackoverflow.com/q/24609989
tags question: http://stackoverflow.com/q/24623968
tags question: http://stackoverflow.com/q/24687199
tags question: http://stackoverflow.com/q/24735777
tags question: http://stackoverflow.com/q/24706676
tags question: http://stackoverflow.com/q/24689467
tags question: http://stackoverflow.com/q/24666911
tags question: http://stackoverflow.com/q/24621877
tags question: http://stackoverflow.com/q/24601059
tags question: http://stackoverflow.com/q/24613524
tags question: http://stackoverflow.com/q/24611981
tags question: http://stackoverflow.com/q/24675789
tags question: http://stackoverflow.com/q/24650768
tags question: http://stackoverflow.com/q/24599175
tags question: http://stackoverflow.com/q/24650295
tags question: http://stackoverflow.com/q/24693509
tags question: http://stackoverflow.com/q/24732492
tags question: http://stackoverflow.com/q/24699507
tags question: http://stackoverflow.com/q/24596286
tags question: http://stackoverflow.com/q/24735553
tags question: http://stackoverflow.com/q/24736131
tags question: http://stackoverflow.com/q/24680408
tags question: http://stackoverflow.com/q/24617490
tags question: http://stackoverflow.com/q/24679556
tags question: http://stackoverflow.com/q/24667114
tags question: http://stackoverflow.com/q/24645145
tags question: http://stackoverflow.com/q/24650298
tags question: http://stackoverflow.com/q/24604911
tags question: http://stackoverflow.com/q/24732530
tags question: http://stackoverflow.com/q/24692132
tags question: http://stackoverflow.com/q/24720701
tags question: http://stackoverflow.com/q/24723730
tags question: http://stackoverflow.com/q/24590044
tags question: http://stackoverflow.com/q/24711231
tags question: http://stackoverflow.com/q/24621232
tags question: http://stackoverflow.com/q/24639956
tags question: http://stackoverflow.com/q/24708665
tags question: http://stackoverflow.com/q/24738233
tags question: http://stackoverflow.com/q/24696870
tags question: http://stackoverflow.com/q/24740927
tags question: http://stackoverflow.com/q/24701371
tags question: http://stackoverflow.com/q/24690651
tags question: http://stackoverflow.com/q/24597496
tags question: http://stackoverflow.com/q/24665155
tags question: http://stackoverflow.com/q/24677344
tags question: http://stackoverflow.com/q/24588701
tags question: http://stackoverflow.com/q/24691389
tags question: http://stackoverflow.com/q/24744698
tags question: http://stackoverflow.com/q/24591034
tags question: http://stackoverflow.com/q/24635355
tags question: http://stackoverflow.com/q/24664954
tags question: http://stackoverflow.com/q/24607978
tags question: http://stackoverflow.com/q/24640246
tags question: http://stackoverflow.com/q/24685894
tags question: http://stackoverflow.com/q/24687884
tags question: http://stackoverflow.com/q/24655801
tags question: http://stackoverflow.com/q/24626008
tags question: http://stackoverflow.com/q/24720638
tags question: http://stackoverflow.com/q/24680108
tags question: http://stackoverflow.com/q/24639571
tags question: http://stackoverflow.com/q/24748419

http://stackoverflow.com/q/24677113
accepted answer: http://stackoverflow.com/a/24677695
has comment: http://stackoverflow.com/comment/38260632
downvote count: 0
has title: Cache static pages and content nodejs
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
linked to: http://stackoverflow.com/q/3956455
has body: I have a static content to cache using nodejs, as far I know there are two ways: This can be done using nodejs: app.use(express.static(path.join(__dirname, 'public'), { maxAge: oneDay })); Add x.appcahe file with static contents to cache, then add manifest attribute in html tag: &lt;html manifest="x.appcache"&gt; So my question is what is the diffrence between both ways?
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38263023
upvote count: 5
has answer: http://stackoverflow.com/a/24677695
has comment: http://stackoverflow.com/comment/38261015
has comment: http://stackoverflow.com/comment/38261098
score: 5

http://stackoverflow.com/comment/38349770
comment on: http://stackoverflow.com/q/24723502
score: 0
type: Comment
has text: I am wondring if this is caused by the conflict of the scripts?
type: QuestionComment

http://stackoverflow.com/q/24676331
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26427838
score: 1
tagged with: angularjs-animation
upvote count: 1
has body: I am trying to do a slider with multiple images and the code works for going right, but going left the ng-move class is applied to all the elements in the array which is not desirable. My Controller: $scope.slides = [ {image: 'http://lorempixel.com/121/75/transport/', number: 1}, {image: 'http://lorempixel.com/131/75/transport/', number: 2}, {image: 'http://lorempixel.com/122/75/transport/', number: 3} ]; $scope.slide = function(dir){ var vehArr = $scope.slides, vehicle = {}; if (dir === 'left') { vehicle = vehArr.splice(0,1); // vehicle = vehArr.shift(); vehArr.push(vehicle); } else { vehicle = vehArr.pop(); vehArr.unshift(vehicle); } } My css: .slider { width: 100%; height: 100px; overflow: hidden; } .slide { float: left; height: 100px; } .slide.ng-move, .slide.ng-enter, .slide.ng-leave { -webkit-transition: 1s ease all; transition: 1s ease all; } .slide.ng-move, .slide.ng-enter, .slide.ng-leave.ng-leave-active{ margin-left: -150px; } .slide.ng-enter, .slide.ng-leave, .slide.ng-move.ng-move-active { margin-left: 0px; } My Html: {{slide.number}} Left Right http://plnkr.co/edit/rJfOH9zxJLGf4rKPJtS4?p=preview Any opinion or different way of doing it would be helpfull
answer count: 1
tagged with: slideshow
tagged with: javascript
has comment: http://stackoverflow.com/comment/38444214
favorite count: 0
has comment: http://stackoverflow.com/comment/38259666
tagged with: angularjs
tagged with: css
has title: AngularJS slider with ng-repeat and ng-move
downvote count: 0

http://stackoverflow.com/a/24593154
has comment: http://stackoverflow.com/comment/38102410
has body: Binding to an attribute of the scope directly is almost a bad idea, because many directives define their own scope, and if your widget (the select box) is inside such a directive, you will in fact bind to an attribute of the child scope rather than binding to an attribute of the controller scope. The rule of thumbs is thus: always have a dot in your ng-model. The form controls should modify an object of your scope, and not your scope directly. In your controller: $scope.selection = {}; In your view: &lt;select ng-model="selection.category" ...&gt; Also, note that you're using the same ID to identify two select boxes. That will make your DOM invalid. An ID identifies an element uniquely.
score: 5
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24592752
answers question: http://stackoverflow.com/q/24592752
upvote count: 5
has comment: http://stackoverflow.com/comment/87163053
type: Answer
downvote count: 0

http://stackoverflow.com/comment/38194750
comment on: http://stackoverflow.com/a/24641324
has text: My best guess is that OP might be using JSON.parse to determine if the entered JSON-string is correct (on the other hand he can use json_decode to do that). Overall though - nice write up.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/38176286
type: QuestionComment
has text: I am sorry, I was not able to find this answer before posting my question.
type: Comment
comment on: http://stackoverflow.com/q/24630612
score: 1

http://stackoverflow.com/q/24646149
score: 3
tagged with: oop
upvote count: 3
type: Question
has title: Subclass factory in AngularJS with member variables
answer count: 2
linked to: http://stackoverflow.com/q/16539999
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24646380
has answer: http://stackoverflow.com/a/26069264
has answer: http://stackoverflow.com/a/24646380
tagged with: angularjs
has body: I have tens of AngularJS Factories which have a lot in common. So I'm trying to make a base class and subclass it. But I've noticed that the subclasses are sharing member variables of the base class. I've made an example on http://jsbin.com/doxemoza/2/edit, the code is also posted here: HTML: JS Bin ChildService: {{value1}} AnotherChildService : {{value2}} JavaScript: angular.module('demo', []); var demo = angular.module('demo').controller('MainCtrl', function ($scope, ChildService, AnotherChildService) { $scope.value1 = ChildService.getPrivateVar(); $scope.value2 = AnotherChildService.getPrivateVar(); }); var Base = function () { var Service = {}; Service.privateVar = 0; Service.setPrivateVar = function (value) { Service.privateVar = value; } Service.getPrivateVar = function () { return Service.privateVar; } return Service; }; demo.factory('BaseService', Base) demo.factory('ChildService', function (BaseService) { var ChildService = Object.create(BaseService); ChildService.setPrivateVar(1); return ChildService; }); demo.factory('AnotherChildService', function (BaseService) { var AnotherChildService = Object.create(BaseService); AnotherChildService.setPrivateVar(2); return AnotherChildService; }); My expected output is: ChildService: 1 AnotherChildService : 2 But instead I get: ChildService: 2 AnotherChildService : 2 I think ChildService and AnotherChildService are sharing the same privateVar, so I got the same value for them. How should I change the code to make them use different instance of privateVar? Thanks
favorite count: 0
accepted answer: http://stackoverflow.com/a/26069264
type: AnsweredQuestion

http://stackoverflow.com/comment/38335631
type: QuestionComment
has text: One more thing, if each MenuItem can get some unique ID, you could use an Objects (key/value pairs) instead of Arrays to hold the individual items. Then it's just `delete this.foods[food.id]`, where `this` is the Menu, and `food` is the food object to be removed.
comment on: http://stackoverflow.com/q/24716658
score: 0
type: Comment

http://stackoverflow.com/q/24658590
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3749231
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/16514509
tagged with: extjs
has comment: http://stackoverflow.com/comment/38226312
score: 0
has body: Im working in an application that uses java + spring on the server side aswell as extdirectspring. On the client side it uses extjs/javascript. I want to poke a method on the serverside and retrieve a file from the database. If the file doesn't exist then I'd like to display an error in some way. The attempt to retrieve the file and the check it exists need to happen in the same call - the file could be deleted in between calls. The way I can see people have done it in the current application is using spring controllers + request mappings and a window.open("someUrl/filename.blah"); with the server returning the file from the mapped method. This doesnt seem to let you handle the case where the file doesn't exist though. Ideally I'd just like to send some json back from the server which has the file data (possibly null) and sucess/failure. When I get the response I can then either show some information about the failure or open the file. Unfortunately I can't observe the current failure mode because something somewhere is caching the files - if I delete them from the database then they appear to still exist and you can still download them! By 'open' I mean show the standard 'what do you want to do with this file open/save' dialog. I'm not trying to parse the file or do anything with it - I just want to serve it up to the browser/user. Is there a way to do that without using a url and window.open? Eg some method that takes a blob of data and a file name or similar? Update The transfer of the data/json isn't the problem I'm trying to solve. As I'm using extdirect I'll probably just do it like this: public class SomeClass { @ExtDirectMethod public AFile getFile(Long id) throws Exception { //do stuff } } Then on the clientside you just do: someClass.getFile(id, function(file){ if(file.found){ SomeHowGiveThisToTheUser(file.name,file.data); ???? return; } ReportCouldntFind(file.name); }); The bit I dont know how to do is the give the file to the user. Further update I dont …
answer count: 1
has answer: http://stackoverflow.com/a/24658647
has comment: http://stackoverflow.com/comment/38226217
has title: In javascript how do you open a file from the server?
has comment: http://stackoverflow.com/comment/38250138

http://stackoverflow.com/comment/47263308
comment on: http://stackoverflow.com/a/27338862
type: Comment
has text: Nice, but the demo is probably outdated.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38375735
has text: Thank you very much. I don't want to throw my question out there for a quick answer. This platform is intended to record questions and answers so that others can learn from it as well. And I this is my way of attributing to it :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24736591

http://stackoverflow.com/q/24685331
downvote count: 0
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/7462766
linked to: http://stackoverflow.com/q/1129216
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24685514
has title: Populate the dropdown in order
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24685514
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/24685457
type: Question
has comment: http://stackoverflow.com/comment/38275970
possible better answer: http://stackoverflow.com/a/24685457
tagged with: javascript
has body: I'm trying to populate my drop down in certain order (alphabetical order/alpha numeric order), but my code doesn't seems to be working. It is populating the value but not in order. Here is my code function dropdown(){ var html = html + " All "; var colValue = getColumn("COLUMN"); for( var i = 0; i < colValue.length; i++ ) { var valueRow = colValue[i]; html = html + " " + valueRow.c + "-" + valueRow.v + " "; } $('#id').append(html); } here, COLUMN is the key that holds the value A1,A2,A3,B1 this code populate my drop down in the order A3,A1,A2,B1 I want my drop down to populate in the order A1,A2,A3,B1 while i did alert(html);i get the result All "; A3-a3Value "; A1-a2Value "; A2-a1Value "; B1-b1Value "; and it is populating exactly in the same order. My question is, what i need to do, to populate my dropdown in order? I'm still in the beginner phase in java script and Jquery. Appreciate your help Thanks
answer count: 3
has answer: http://stackoverflow.com/a/24685591

http://stackoverflow.com/q/24687633
has comment: http://stackoverflow.com/comment/38281649
has answer: http://stackoverflow.com/a/24689110
has comment: http://stackoverflow.com/comment/38281304
has comment: http://stackoverflow.com/comment/38282194
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/38281128
score: 1
has comment: http://stackoverflow.com/comment/38281439
favorite count: 0
tagged with: parsing
has body: How do I parse my JSON with external middleware now that Express doesn't carry a body parser? For a while, I was using Express bodyParser to receive and respond to JSON posts to the server. Each time I started up the server, express said something about bodyParser being removed soon, and sure enough, I've updated and now JSON requests seem to be showing null. So I didn't understand how middleware worked, and had followed an express tutorial to use the body parser. Now, using separate body parser middleware, it seems I'm doing it wrong. Before, my syntax was: app.use(express.bodyParser()); Now, with the module body-parser as middleware, it's like this: app.use(bodyParser.json()); And an example as a whole: var express = require('express'); var bodyParser = require('body-parser'); var app = express(); function listen() { app.use(bodyParser.json()); app.post('/login', function (req, res) { var username = req.body.username; var password = req.body.password; console.log('User ' + username + ' is attempting login...'); validate(username, password, function (err, result) { if (err) loginFail(req, res, err); else loginSucceed(req, res, result); }); }); app.listen(3333); } listen(); I tried express.json() as the middleware, but that triggers the fatal error: Error: Most middleware (like json) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware. That link leads to the body-parser middleware that I'm using via app.use(bodyParser.json()). Update: Using bodyParser.json() results in no error, but the data values are null: User undefined is attempting login... My client code should be fine, but here it is for completeness: function sendLogin() { popLogCreds(creds); var loginCredentials = { "username": creds.username, "password": creds.password }; console.log("Sending login credentials: " + JSON.stringify(loginCredentials, null, 4)); request = $.ajax({ url: "http://54.186.131.77:3333/login", type: "POST", c…
has comment: http://stackoverflow.com/comment/38283096
type: Question
has title: How do I parse my JSON with external middleware now that Express doesn't carry a body parser?
tagged with: node.js
accepted answer: http://stackoverflow.com/a/24689110
tagged with: http://stackoverflow.com/tag/json
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/38280453
has comment: http://stackoverflow.com/comment/38280897
possible better answer: http://stackoverflow.com/a/49582314
tagged with: javascript
has answer: http://stackoverflow.com/a/49582314
tagged with: express
has comment: http://stackoverflow.com/comment/38281028

http://stackoverflow.com/q/24680345
has title: Browser-update message Internet Explorer 8
has answer: http://stackoverflow.com/a/42656344
favorite count: 0
has comment: http://stackoverflow.com/comment/38266879
has answer: http://stackoverflow.com/a/24680631
type: AnsweredQuestion
has body: The browser update script causes the page to load very slowly in IE11 and the message doesn't display when I hit F12 for developer tools and select IE8, or on another computer that is running IE8. I'm not sure what I'm doing wrong. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;DS Arts&lt;/title&gt; &lt;script type="text/javascript" src="jquery-2.1.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="jquery.cycle.all.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $('#slider').cycle({ fx: 'fade', timeout: 3000, next: '#next', prev: '#prev' }); &lt;/script&gt; &lt;script type="text/javascript"&gt; var $buoop = {vs:{i:8,f:15,o:12.1,s:5.1}}; $buoop.ol = window.onload; window.onload=function(){ try {if ($buoop.ol) $buoop.ol();}catch (e) {} var e = document.createElement("script"); e.setAttribute("type", "text/javascript"); e.setAttribute("src", "//browser-update.org/update.js"); document.body.appendChild(e); } &lt;/script&gt; &lt;style type="text/css"&gt; #hero { height: 500px; margin: auto; width: 700px; position: relative; } #slider { position: relative; } #slidewrap { position: absolute; height: 20px; } .myCaption { color: #F6F0E2; backface-visibility: visible; background: #000000; font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: small; width: 685px; display: block; padding-top: 10px; z-index: 99; padding-left: 15px; top: -35px; position: relative; padding-bottom: 10px; } #next { width: 50px; height: 50px; text-align: center; line-height: 50px; position: absolute; top: 225px; right: 0px; z-index: 99; cursor: pointer; opacity: 0; padding-right: 10px; } #prev { widows: 50px; height: 50px; text-align: center; line-height: 50px; position: absolute; top: 225px; left::0px; z-index: 99; cursor: pointer; opacity: 0; padding-left: 10px; }…
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/38266706
upvote count: 1
has comment: http://stackoverflow.com/comment/38266754
downvote count: 1
has comment: http://stackoverflow.com/comment/38266814
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/24680631
has comment: http://stackoverflow.com/comment/38266656
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/42656344

http://stackoverflow.com/a/24648054
answers question: http://stackoverflow.com/q/24626698
accepted answer of: http://stackoverflow.com/q/24626698
upvote count: 1
type: AcceptedAnswer
has body: I find a very trick solution here: http://davidwalsh.name/detect-node-insertion So I let my outer element with animation property of css3 keyframes elementChanged { from {opacity: 1}; to {opacity: 1}; } myOuterElement { animation: elementChanged } Then I bind the animationEnd event to my element, so no matter what happens to Dom tree structure that related with my element I can have a callback and do something I want. Here is the javascript code: document.getElementById('elementId').addEventListener('animationEnd', function() { // do something I like... }, false);
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/24637343
has comment: http://stackoverflow.com/comment/38187134
score: 2
answers question: http://stackoverflow.com/q/24637255
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: If I correctly understood what you need this should work: $("#id").val(calEvent.id); if(calEvent.status == 'open') { $('#append .appact').remove(); $('#append').append("&lt;div class='appact'&gt;&lt;form id='update'&gt;&lt;input type='hidden' name='id' id='"+calEvent.id+"'&gt;&lt;br/&gt;&lt;input type='submit' name='submit'&gt;&lt;/form&gt;&lt;/div&gt;"); }
accepted answer of: http://stackoverflow.com/q/24637255
has comment: http://stackoverflow.com/comment/38186908

http://stackoverflow.com/a/24695275
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24694665
type: Answer
has body: The question is: what can a potential attacker do if he knows the column names in your database? ... Hopefully nothing. It's just arbitrary names. Who cares what those names are? That in itself still doesn't give anybody access to anything they shouldn't have access to. Having said that, if you have a vulnerability in your application which does allow someone access to something he shouldn't have access to, e.g. an SQL injection vulnerability, knowing the database structure can speed things up in using that vulnerability for something really bad. But, just obfuscating your column names will not add any actual security, it may just slow an attacker down a little bit and force them to poke around in the dark just a little longer. See this very nice walkthrough of an attack from the attacker's point of view to understand the possibilities. The bottom line is: don't bother, it just makes it unnecessarily harder for yourself without actually adding any actual security. Your real vulnerabilities are elsewhere.
accepted answer of: http://stackoverflow.com/q/24694665
upvote count: 5
score: 5
has comment: http://stackoverflow.com/comment/38293830

http://stackoverflow.com/a/24595524
upvote count: 2
answers question: http://stackoverflow.com/q/24592140
has body: In the last line you are adding the listview element dinamically to the DOM, but you are not calling the method to enhance it with jQuery Mobile: $('#quizList ul').listview(); If you later change its content, you have to refresh it: $('#quizList ul').listview('refresh');
score: 2
downvote count: 0
type: Answer

http://stackoverflow.com/q/24610545
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24611208
has comment: http://stackoverflow.com/comment/38134976
tagged with: jquery
has comment: http://stackoverflow.com/comment/38134758
has answer: http://stackoverflow.com/a/24610761
has comment: http://stackoverflow.com/comment/38134861
type: AnsweredQuestion
has body: Scenario: I am matching cases up via using the distance between two points (using lat and long). Everything is done in a table. I get a list of 'tds' with class 'city', and make an array. Then I sort the array based on 'data-distance' attribute I then highlight the top ten, and if two 'data-distance' has the same value, highlight them both, and then highlight, lets say 11 instead of 10, because two have the same 'data-distance' This is a screenshot of what I currently have, and an overview: At the moment, it currently highlights the top ten, and if two values are the same, highlight them the same color, but it does not hightlight another one after 10. Current Code var c_tds = $('td.city'); var c_arr = $.makeArray(c_tds); c_arr.sort(function(a,b) { var A = $(a).attr('data-distance'); var B = $(b).attr('data-distance'); return B - A; }); for ( var i = 1; i &lt;= 5; i++ ) { var A1 = $(c_arr[c_arr.length-i]); var A2 = $(c_arr[c_arr.length-(i-1)]); if(A1.attr('data-distance') == A2.attr('data-distance')){ console.log(A1); } A1.addClass('success'); } for ( var i = 6; i &lt;= 10; i++ ) { var B1 = $(c_arr[c_arr.length-i]); var B2 = $(c_arr[c_arr.length-(i-1)]); if(B1.attr('data-distance') == B2.attr('data-distance')){ console.log(i); if(i == 6) { B1.addClass('success'); } else { B1.addClass('warning'); } } else { B1.addClass('warning'); } } Question How can I get it so that if two values are the same, then add an extra one to highlight (keeping the minimum highlight count of 10)
type: Question
has title: jQuery - Sort an array and add a class to values with the same attribute, and the top 10
tagged with: arrays
accepted answer: http://stackoverflow.com/a/24610761
tagged with: javascript
has answer: http://stackoverflow.com/a/24611208

http://stackoverflow.com/a/24746408
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/38392052
accepted answer of: http://stackoverflow.com/q/24715102
answers question: http://stackoverflow.com/q/24715102
has body: I fixed like this: HTML JAVASCRIPT $('[data-toggle=offcanvas]').click(function() { $('.row-offcanvas-left').toggleClass('active'); }); $('[data-toggle=offcanvasa]').click(function() { $('.row-offcanvas-right').toggleClass('active'); });

http://stackoverflow.com/comment/38114390
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24599843
score: 0
has text: Are you sure object is not frozen? What is the result of `Object.isFrozen(result)`?

http://stackoverflow.com/comment/38212184
has text: No. You have one form per set of options. You then put the currently selected options from other forms in as hidden inputs. e.g. ` etc`
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24635406

http://stackoverflow.com/comment/38099641
score: 0
type: AnswerComment
type: Comment
has text: wait now i understood what you want!
comment on: http://stackoverflow.com/a/24592194

http://stackoverflow.com/comment/38196465
comment on: http://stackoverflow.com/a/24636611
has text: Wow, this thinking looks incredible, in practice it doesn't work for me for some reason. Diagnosing it now. By default my rightColumn is completely empty when the page first loads, could this have to do with why its not working for me? I want to rule that out as a possibility before delving in deeper to diagnose my specific issue
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38241962
has text: @Qantas94Heavy: that could very well be! I ran a couple of tests recently and noticed that there are differences in chrome at least when dealing with large arrays and objects, with and with consecutive keys. But it didn't make a difference in node at all. I just imagined that chrome can't do its hidden class thing with objects like this one. I'm not very familiar with optimizations, so I should probably not even have mentioned it. But it's too late now :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24666758

http://stackoverflow.com/comment/38201899
type: AnswerComment
comment on: http://stackoverflow.com/a/24645701
score: 0
type: Comment
has text: Huh? He is using it, and you can't clear it with 'this'.

http://stackoverflow.com/a/24598492
has body: The first part can be simplified to this: $j('.dropdown-menu').click(function() { $j('.dropdown-menu').not(this).children('ul').slideToggle(2000); }); Also, try wrapping the hidden content in a div and giving it a width. When you click on the div, it actually pulls it out of position to measure it before quickly replacing it because JQuery doesn't know the dimensions of your hidden div until it's displayed. So . This could make the whole animation laggy! Another suggestion: ID is faster than class. Part of the reason is that ID is supposed to be unique, so the API stops searching after the ID is found in the DOM. If you must use a class or attribute selector, you can improve performance by specifying the optional context parameter. Credits
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/24598379
score: 2
has comment: http://stackoverflow.com/comment/38113239

http://stackoverflow.com/q/24656352
score: 0
answer count: 1
tagged with: promise
has body: Use Case I have an $resource call that executes a then followed by a finally to clean up. While waiting for the server, the user may interact with the system and I would like to add more then methods before the finally method. How can one add a then method to an existing $promise chain that executes before a predefined finally? Sample Code Below is a simplified code sample for the desired use case. Adding the then method to the existing chain could be triggered by an $on, $watch, or some routine. function ctrl($scope, $timeout) { var a = $timeout(function() { console.log("Time out complete"); return this; }, 1000).finally(function() { console.log("Finally called!"); }); // some logic // some events // some stuff happens // then something might insert this // into the promise chain. a.then(function() { console.log("Another then!"); }); }; Result Desired results: &gt; Time out complete &gt; Another then! &gt; Finally called! Current results: &gt; Time out complete &gt; Finally called! &gt; Another then! Demo jsFiddle
tagged with: angularjs
tagged with: angular-promise
has answer: http://stackoverflow.com/a/24656543
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24656543
type: Question
has title: Adding "then" methods into a $promise chain before a predefined "finally" method
tagged with: javascript

http://stackoverflow.com/comment/38316956
has text: Have you decelerated isolated scope? You can have access to it by calling `element.isolateScope()`
type: QuestionComment
comment on: http://stackoverflow.com/q/24705343
score: 0
type: Comment

http://stackoverflow.com/comment/38369053
score: 0
type: Comment
has text: Storage is still storing values of "Null". I want them to store the input values of the fields. JSFiddle is coming up
type: QuestionComment
comment on: http://stackoverflow.com/q/24734017

http://stackoverflow.com/comment/38144767
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24615452
has text: https://docs.angularjs.org/api/ng/filter/currency

http://stackoverflow.com/a/24598530
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24598347
type: Answer
has comment: http://stackoverflow.com/comment/38111687
has comment: http://stackoverflow.com/comment/38111664
has comment: http://stackoverflow.com/comment/38111579
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38111463
upvote count: 2
has body: I suggest to exchange the position of what you are appending and where you are appending to. This way, you retain the appended object, and should be able to work with it as a standard jQuery selector. From your code i commented out the .button() and the .append() lines, because i'm not sure what you want to do with them. Should you need help adding those lines, just drop a comment to my answer ;) Oh, i almost forgot: i use var i to simulate different contents for username and userType data. A JSFiddle for you is here: http://jsfiddle.net/cRjh9/1/ Example code (html part): add button Example code (js part): var i = 0; $('#addButton').on('click', function() { $(' '+ 'username' + i + ' ').appendTo('#buttonList') //.button() .find('.itemButton') .data('type', 'userType'+i) .click(function(e) { alert($(this).data('type')); }) //.append(' Edit ') ; i++; });
accepted answer of: http://stackoverflow.com/q/24598347

http://stackoverflow.com/comment/38159962
has text: Yes it was a constant within the main module and this one was separate. I made adminFilters part of the same module though and it now works! Thanks.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24620869

http://stackoverflow.com/q/24717193
has body: i need to add a new option button when the 'add heading' clicked and it should get updated in the existing options. when i look for options on the select, it should be there, How i can achieve this in javascript. Any Idea? New update: Hi, Here i've changed my code, now, when i press the 'Add chapter' button, then, it should add the user entered chapter head to both chapter's select, there are two chapter places, so, whenever i click the 'add chapter' button, then the entered value should be updated in two places[both places]. But, When i press the add chapter' button, after entering the value on the prompt box, it showing error. I want to make this happen. Any idea? pls &lt;html&gt; &lt;head&gt;&lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form&gt; &lt;div id="mainsec1" style="border: 1pt solid; width: 40%;padding: 10pt"&gt; &lt;div id="sec1"&gt; &lt;span class="head1"&gt;Chapter&lt;/span&gt;&amp;#x00A0;&amp;#x2009;&lt;select name="startype" id="starselect"&gt; &lt;option selected="selected"&gt; &lt;/option&gt; &lt;option value="Aquila"&gt;Aquila&lt;/option&gt; &lt;option value="Centaurus"&gt;Centaurus&lt;/option&gt; &lt;option value="Canis Major"&gt;Canis Major&lt;/option&gt; &lt;/select&gt; &lt;span class="head1"&gt;&lt;input type="button" class="buttonit" value="Delete" onclick="Delerow();"/&gt;&lt;/span&gt; &lt;/div&gt; &lt;div id="sec2"&gt; &lt;span class="head1"&gt;Heading&lt;/span&gt;&amp;#x00A0;&lt;select name="startypeHead" id="starheading"&gt; &lt;option selected="selected"&gt; &lt;/option&gt; &lt;option value="Aquila"&gt;Aquila Heading&lt;/option&gt; &lt;option value="Centaurus"&gt;Centaurus Heading&lt;/option&gt; &lt;option value="Canis Major"&gt;Canis Major Heading&lt;/option&gt; &lt;/select&gt; &lt;span class="head1"&gt;&lt;input type="button" class="buttonit" value="Delete" onclick="Delerowsub();"/&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="button" class="buttonit" value="Add Heading" onclick="AddHead();"/&gt;&lt;/div&gt; &lt;div id="m…
accepted answer: http://stackoverflow.com/a/24717412
answer count: 1
type: AnsweredQuestion
type: Question
has title: Need to add a new option button when the 'add heading' clicked and it should get updated in the existing options
tagged with: javascript
has answer: http://stackoverflow.com/a/24717412
score: 0

http://stackoverflow.com/a/24725299
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24724911
answers question: http://stackoverflow.com/q/24724911
has body: You're binding to the Submit event multiple times. Before frm.submit() use: frm.unbind("submit");
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/24659861
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38228525
has comment: http://stackoverflow.com/comment/38228441
downvote count: 1
has body: I am attempting to see that my currentMedia variable (which is in the DOM) can be found in my array media, then return i which should be 0 not -1. if I run console.log(media[0]); and console.log(currentMedia); the results are the same but you will notice the colors in chrome, media[0] looks like live html where as currentMedia returns the exact same text but is greyed out. my html looks like this: &lt;div class="slideshow"&gt; &lt;div class="media"&gt; &lt;img src="http://placehold.it/112x112" style="opacity: 0;"&gt; &lt;/div&gt; &lt;/div&gt; This is a link to the image of the code that is bawking - https://i.sstatic.net/6jatc.jpg you will see that the console.log values of media[0] and currentMedia appear to be the same but the currentImageKey(); function does not return 0 as it should but instead returns -1 function currentImageKey(i) { currentMedia = $(".media").children()[0].outerHTML i = $.inArray(currentMedia, media) return i; }; this should return 0 function currentImageKey(i) { currentMedia = $(".media").children()[0].outerHTML i = $.inArray(currentMedia, media) return i; }; currentImageKey(); if (currentMedia === $(".media").children()[0].outerHTML ) { console.log("equal"); } if(jQuery.inArray(currentMedia, media) != -1) { console.log("is in array"); } else { console.log("is NOT in array"); } All this retuns equal is NOT in array and undefined
has title: $.inArray() returns false -1 even though the variable matches array
has comment: http://stackoverflow.com/comment/38228660
upvote count: 0
has comment: http://stackoverflow.com/comment/38228508
has comment: http://stackoverflow.com/comment/38228594
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24668815
has comment: http://stackoverflow.com/comment/38263835
score: -1
has comment: http://stackoverflow.com/comment/38228783
type: Question
tagged with: arrays
answer count: 1

http://stackoverflow.com/q/24637317
upvote count: 1
tagged with: vb.net
score: 1
type: Question
has title: AjaxControlToolkit ToolkitScriptManager throws JS error - "ProjectName is not defined"
has comment: http://stackoverflow.com/comment/38186150
has comment: http://stackoverflow.com/comment/38186109
downvote count: 0
tagged with: javascript
tagged with: ajax
has body: Occasionally I get a javascript error when I try to call a webservice method. At the top of my page: &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="abc" %&gt; Later on... &lt;abc:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" LoadScriptsBeforeUI="false" EnablePageMethods="true"&gt; &lt;Services&gt; &lt;asp:ServiceReference Path="getThing.asmx" /&gt; &lt;/Services&gt; &lt;/abc:ToolkitScriptManager&gt; And later down the page, the javascript is in the page: try { ret = ProjectName.getThing.GetTheThing(id, oncomplete); } catch(e) { alert(e.message); } Not always but sometimes I get this javascript alert: "ProjectName is undefined" Is there anything I'm missing?
favorite count: 0
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38278636
score: 0
type: AnswerComment
has text: There was several other steps that led to this example can't print it all out. but basically we ended up with two arrays that we needed to determine which was larger. It doesn't have to be the most compact or shortest code, yet a good example of how to use a Math.max function to determine the winner.
type: Comment
comment on: http://stackoverflow.com/a/24686578

http://stackoverflow.com/comment/38279981
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24687456
has text: My guess: somewhere along your processing pipeline the linefeeds in the `PositionDescription` value has already been converted to `&lt;br /&gt`. Try looking at e.data in a javascript debugger.

http://stackoverflow.com/q/24676555
has title: Multipeer connectivity using Titianium
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/24690608
type: AnsweredQuestion
tagged with: titanium
has answer: http://stackoverflow.com/a/24690608
has body: I am trying to implement the multipeer connectivity recently launched by Apple using Titanium.I did find a module from Logical Labs. But the documentation provided by them is not clear enough to get me started, neither did I get any demo apps or examaple apps created by them in the same. Can anybody please help me in finding if there is any sample app as such in titanium that I can use to get my work started? Thanks :)
type: Question
tagged with: ios7
tagged with: multipeer-connectivity
score: 0
upvote count: 1
answer count: 1
downvote count: 1

http://stackoverflow.com/q/24722832
accepted answer: http://stackoverflow.com/a/24723024
tagged with: javascript
has answer: http://stackoverflow.com/a/24723024
downvote count: 3
has title: JavaScript- searching element withing an object
answer count: 1
has comment: http://stackoverflow.com/comment/38347162
favorite count: 0
has comment: http://stackoverflow.com/comment/38347169
score: -3
type: AnsweredQuestion
upvote count: 0
has body: Say I have a ul with the class name 'images' cotaining various li objects. I have the list pointed by a JS variable using var list = document.GetElementsByClassName("images")[0]; //single 'images' exist in document How do I search all li elements within the list pointed by var list? Searching on the Internet gave this- var list = document.getElementsByClassName("images")[0]; var list = *!*element.*/!*getElementsByTagName("li"); // getting syntax error at this line Is there a way to do this without jQuery?
type: Question

http://stackoverflow.com/a/24610185
type: Answer
accepted answer of: http://stackoverflow.com/q/24606968
answers question: http://stackoverflow.com/q/24606968
type: AcceptedAnswer
score: 0
has body: It actually turns out the problem was something completely different to what I thought- long story short, it was actually telling the truth and it was caused by another problem I already knew about and was easily fixed. I probably should've trusted MVC more. Thanks anyway for the help. There are generally better ways than what I was trying to do (removing validation instead of just fixing the problem), so the question was a bit stupid.

http://stackoverflow.com/comment/38656662
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24696728
type: Comment
has text: Hi Ethan, yes I did. It's not the ideal, but it works. The only thing is that stayed better in the **playlist[].description** option, as showed in the red highlight line: ![Image](http://www.imagesup.net/?di=12140603035812).

http://stackoverflow.com/comment/38341742
has text: Daniel's library is a direct port from Java to JavaScript. The test code above is JavaScript.
comment on: http://stackoverflow.com/q/24719898
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38237252
score: 0
type: Comment
has text: @JukkaK.Korpela Yes I know that. But I don't care if `<di>` elements are `HTMLUnknownElement`s, I prefer them because I think they are necessary and that not including them in HTML5 was an error. But `` or ` ` elements make no sense inside ` `.
type: AnswerComment
comment on: http://stackoverflow.com/a/24656285

http://stackoverflow.com/q/24641403
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/38193839
has comment: http://stackoverflow.com/comment/38193961
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/24641444
possible better answer: http://stackoverflow.com/a/24641508
has answer: http://stackoverflow.com/a/24641508
has title: Check if passwords are equal jQuery
tagged with: javascript
answer count: 6
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24641466
has answer: http://stackoverflow.com/a/24641572
has answer: http://stackoverflow.com/a/24641443
has answer: http://stackoverflow.com/a/70384621
has comment: http://stackoverflow.com/comment/38193840
downvote count: 1
has body: I am trying to validate whether two entered passwords are the same or not. But I can't seem to get it working. No matter what values I enter in my input fields, the result is always "true". Can you see what I am doing wrong? HTML: &lt;div class="form-group" id="password"&gt; &lt;input type="password" class="form-control" placeholder="Password" name="password"&gt; &lt;/div&gt; &lt;div class="form-group" id="repassword"&gt; &lt;input type="password" class="form-control" placeholder="Confirm Password" name="repassword"&gt; &lt;/div&gt; jQuery: //Check if password is set $('input[name=password]').blur(function() { if($(this).val().length == 0){ $('#password').addClass('has-error'); } else { $('#password').addClass('has-success'); } }); //Check if repassword is set $('input[name=repassword]').blur(function() { if($(this).val().length == 0){ $('#repassword').addClass('has-error'); } else { $('#repassword').addClass('has-success'); } }); //Check if password and repassword are equal $('input[name=password]').blur(function() { if ($(this).attr('value') !== $('input[name=repassword]').attr('value')) { $('#password').addClass('has-error'); $('#repassword').addClass('has-error'); } else { $('#password').addClass('has-success'); $('#repassword').addClass('has-success'); } });
accepted answer: http://stackoverflow.com/a/24641466

http://stackoverflow.com/a/24693280
answers question: http://stackoverflow.com/q/24693210
has body: The best way is to create a little function that will call both of these as it improves the code separation. function doBoth(e, t) { var result = AllowNumericOnly(e, t) callMethod() return result; } Then your ASP code would read &lt;asp:TextBox ID="txtTest" runat="server" MaxLength="7" onkeypress="return doBoth(event, this);" AutoPostBack="true"&gt;&lt;/asp:TextBox&gt; Or an alternative approach would be to add multiple handlers in jQuery, again this could be done in a single function but this is just to illustrate. In your case it would make your return value a bit harder $("#txtTest").keypress(function() { AllowNumericOnly(); }) $("#txtTest").keypress(function() { callMethod(); })
has comment: http://stackoverflow.com/comment/38290729
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/38154889
type: QuestionComment
comment on: http://stackoverflow.com/q/24620522
has text: Well,. am unable to print a single line in powershell, despite using System.Management.Automation.Host.Size the value still warps and the output file has multiple lines which am unable to parse,. if there is a way to split these then i would implement this logic in powershell to format the JSON file.
score: 0
type: Comment

http://stackoverflow.com/comment/38348199
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24708460
has text: Well it does work correctly for me. There's only a small typo in your code, the button in ``div.right-slider-button`` should call the ``scrollDiv`` method with a -3 value for the ``depl`` argument (in the code you gave us, both buttons were scrolling in the same direction). Otherwise it works nicely for me on FF, Safari and Opera Next.

http://stackoverflow.com/comment/38145043
has text: not understand what you mean? Explain with code #Sanjay Kumar N S
comment on: http://stackoverflow.com/a/24606570
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/24746274
type: Question
has comment: http://stackoverflow.com/comment/38392564
has body: New Code: var totalEval = function (attendanceAverage, assignmentAverage, quizAverage) { return (quizAverage * .25 + assignmentAverage * .65 + attendanceAverage * .1 ); }, courseGrade = function (percent) { if (percent &gt;= .90 ){return "A";} else if(percent &gt;= .80){return "B";} else if(percent &gt;= .70){return "C";} else if(percent &gt;= .60){return "D";} else {return "F";} }; Call: var projectedGrade = courseGrade(totalEval(attendanceAverage, assignmentAverage, quizAverage)); window.document.getElementById('currentGrade').innerHTML = projectedGrade; Now it's not calling it correctly; I get no result at all. Edit: After much talking about it and demonstrating the following code, here's my question in a nutshell: How do I take the numerical value in totalEval and use it to create the letter grade in courseGrade? Edit: New code, still doing the same thing, but now drawing on the function that holds the numberical score I'm trying to work with. Still giving everyone F's: var courseGrade = function(totalEval){ if (totalEval &gt;= .90 ){return "A";} else if(totalEval &gt;= .80){return "B";} else if(totalEval &gt;= .70){return "C";} else if(totalEval &gt;= .60){return "D";} else {return "F";} }; Easy question, I'm very sure, but I can't seem to get it. For a simple program to take a numerical score and translate it into a letter grade, I have the following: var courseGrade = function(percent){ if (percent &gt;= .90 ){return "A";} else if(percent &gt;= .80){return "B";} else if(percent &gt;= .70){return "C";} else if(percent &gt;= .60){return "D";} else {return "F";} }; The issue is, how do I draw the previously determined result into this function? To clarify, if the function I've used to collect all assignment/test/etc grades into one total average is called "totalAverage", how does one take totalAverage and input whatever the result is inside this given function? The code creating the totalSum from which I'm drawing the numerical score to become the letter grade, …
has comment: http://stackoverflow.com/comment/38392186
tagged with: javascript
has comment: http://stackoverflow.com/comment/38391891
has comment: http://stackoverflow.com/comment/38391977
has comment: http://stackoverflow.com/comment/38392076
has comment: http://stackoverflow.com/comment/38391743
has comment: http://stackoverflow.com/comment/38392207
has comment: http://stackoverflow.com/comment/38393283
upvote count: 1
tagged with: function
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38392356
favorite count: 0
has comment: http://stackoverflow.com/comment/38391899
has answer: http://stackoverflow.com/a/24747948
accepted answer: http://stackoverflow.com/a/24747948
type: AnsweredQuestion
has title: How to draw the results of a previous function into a new function in JavaScript
has comment: http://stackoverflow.com/comment/38392444
has comment: http://stackoverflow.com/comment/38391906
has comment: http://stackoverflow.com/comment/38393138
has comment: http://stackoverflow.com/comment/38392240
score: 1
has comment: http://stackoverflow.com/comment/38392513
has comment: http://stackoverflow.com/comment/38392796
has comment: http://stackoverflow.com/comment/38392192
has comment: http://stackoverflow.com/comment/38391853
has comment: http://stackoverflow.com/comment/38392742

http://stackoverflow.com/q/24658666
has title: Replace a field in a javascript Object? with splice and push, indexOf to splice is returning -1 value?
type: Question
accepted answer: http://stackoverflow.com/a/24659116
score: 0
tagged with: loops
tagged with: indexing
tagged with: object
tagged with: arrays
has comment: http://stackoverflow.com/comment/38226808
tagged with: javascript
type: AnsweredQuestion
answer count: 1
has answer: http://stackoverflow.com/a/24659116
has body: I have an array that at any point may contain any combination of the following values: var positions = ['first', 'second', 'third', 'fourth']; The goal is to rebuild a Javascript Object that, by default, is set to: currentPositioning = { 'positioning': [ { 'first': false }, { 'second': false }, { 'third': false }, { 'fourth': false } ] }; The positions array is looped through to rebuild the currentPositioning Object: positions.forEach(setPositions); function setPositions(element, index, array) { if (element == 'first') { // define objSplice object var objSplice = {}; // set object of 'array.element' to false .. {'element': false} objSplice[element] = false; console.log('objSplice = ' + JSON.stringify(objSplice)); // find index that matches {'element': false} var index = currentPositioning["positioning"].indexOf( objSplice ); console.log('index = ' + index); if (index &gt; -1) { // remove index that matches {'element': false} currentPositioning["positioning"].splice(index, 1); } // define obj object var obj = {}; // set obj object of 'array.element' to true .. {'element': true} obj[element] = true; // add {'element': true} to array currentPositioning["positioning"].push( obj ); } if (element == 'second') { ... Basically, if one of the positions is in the positions array, then that position in the currentPositioning Object should be set to true ..otherwise it should remain false The idea is that..when.. var positions = ['first', 'second', 'third']; ..then.. currentPositioning = { 'positioning': [ { 'first': true }, { 'second': true }, { 'third': true }, { 'fourth': false } ] }; For some reason though, right now the index = -1 .. every time .. so the result keeps turning to something like this!? : currentPositioning = { 'positioning': [ { 'first': false }, { 'second': false }, { 'third': false }, { 'fourth': false }, { 'first': true }, { 'second': true }, { 'third': true }, ] };

http://stackoverflow.com/q/24677368
favorite count: 0
has comment: http://stackoverflow.com/comment/38260739
has comment: http://stackoverflow.com/comment/38260661
tagged with: http://stackoverflow.com/tag/html
has body: I am new to jquery and can't even assume how deeply this issue can go. When the external page (in this case shop.php) is loaded into index.php, by Jquery function .load(); , it falls apart. Many jquery commands and plugins, that are applied to the shop.php page, aren't working. This confuses me, because some of js commands and plugins still works. Obviously i can't say that files are not loaded completely, just majority of them are not working. When I paste shop.php content into index.php, it works perfect. Also when i add desired js code into shop.php (wrapped into script tag), it works as well. I really don't expect from anyone to look deeply into this problem. I just wanna know if this is common issue, and is there simple explanation for it ? If not i'll seek for some different approach. My code: index.php <?php include("top-bar.php"); ?> <?php include("home.php"); ?> top-bar.php Home About Us Services asdasd asdasdas derwer Shop Portfolio Gallery Contact Us shop.php Jquery: $(document).ready(function(){ $(function() { $("a.menuLink").on("click", function(e) { e.preventDefault(); $("#pageWraper").load(this.href); }); }); }); Hope this helps Thanks, Update : I added: on top of shop.php page, dont know how right this is, but its working now. Only thing that bugs me is if i remove jquery.touchcarousel-1.2.js from index.php head, page falls apart. It is like, only working if both of them are loaded ????
tagged with: load
tagged with: php
upvote count: 0
has title: js not working properly on page which is loaded by jquery .load()
has answer: http://stackoverflow.com/a/24677729
accepted answer: http://stackoverflow.com/a/24677729
downvote count: 1
has comment: http://stackoverflow.com/comment/38260970
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38260802
tagged with: javascript
score: -1
type: Question
has comment: http://stackoverflow.com/comment/38261124
answer count: 1
has comment: http://stackoverflow.com/comment/38261237
tagged with: jquery
has comment: http://stackoverflow.com/comment/38260951

http://stackoverflow.com/q/24654534
accepted answer: http://stackoverflow.com/a/24668272
favorite count: 0
has answer: http://stackoverflow.com/a/24668880
possible better answer: http://stackoverflow.com/a/24668880
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: jasmine-maven-plugin
type: Question
tagged with: phantomjs
has answer: http://stackoverflow.com/a/24668272
has body: I have multiple tests that need to share the same common utilities script. I wouldn't want to place this file in the source folder structure, since it's only relevant for testing. So my source folder is: ${project.basedir}/src/main/js and my test source: src/test/js In src/test/js I have a testUtil.js file that I need to load in other jasmine tests. Is it possible to access such files from within a jasmine test? describe('Load Util Module', function() { it('check util is loaded', function() { //load testUtil.js }); });
tagged with: javascript
answer count: 2
has title: jasmine-maven-plugin load some other test utilities common script
downvote count: 0
tagged with: jasmine

http://stackoverflow.com/comment/38237221
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24664288
has text: my apologies: the error is "ASP in_makepayment_aspx does not contain a definition for 'myDate2' and no extension method 'myDate2'

http://stackoverflow.com/q/24677898
downvote count: 0
has answer: http://stackoverflow.com/a/24678006
score: 1
has answer: http://stackoverflow.com/a/24678009
has answer: http://stackoverflow.com/a/24678200
accepted answer: http://stackoverflow.com/a/24678009
has comment: http://stackoverflow.com/comment/38261819
type: AnsweredQuestion
type: Question
answer count: 3
has title: What is the regex for "A float with 2 decimal places, and only allows increments of 0.25"
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38261856
has comment: http://stackoverflow.com/comment/38261836
favorite count: 0
has comment: http://stackoverflow.com/comment/38261698
tagged with: regex
has body: I need a regex to match the following inputs: .25 .50 .75 1.25. 1.50, 1.75 are allowed (increments of .25) (2.0/2.00, 3.0/3.00, 4.0/4.00, 5.0/5.00 - not allowed) The integer parts allowed are 1-9 Hence 10.00 or 10.25... are not allowed Special inputs not allowed are: 0, 0.0 The whole numbers 1,2,3,4,5,6, 7, 8 and 9 are allowed while 1.0/1.00, 2.0/2.00, 3.0/3.00...and so on are not allowed Also, no, positive or negative signs before the number are allowed. Hence 0.25, 0.50, 0.75 should not be allowed (of course after .75, only 1 is allowed) so far the regular expression(s) that I have to satisfy the above conditions is: /^[-+]?[0-9](\.[2|5|7]{1}[5|0]{1})?$/; In my javascript I have: var catchfloat5 = /^[-+]?[0-9](\.[2|5|7]{1}[5|0]{1})?$/; var catchint2 = /^[1-9]$/; the second regular expression is for matching integers 1-9. and in the code I do: if(inputHours.match(catchfloat5) || inputHours.match(catchint2) ) { //alert("Correct, you entered float or an int"); return true; } The above code appears to do the job, but fails, because it allows the following inputs: 0.25 0.50 0.75 It does match 1.25, 1.50, 1.75 and so on. How would I correct my regular expression to match: .25, .50 and .75? I think the problem I have is: I do have a regular expression that might match negative decimal numbers also. When I try to get rid of the positive and negative symbols, I am breaking the expression. I do have trouble understanding the role of the ? character also. And my research comes from: http://www.regular-expressions.info/quickstart.html What I am trying to accomplish is: A regular expression that matches the inputs I described above and also to learn a few fundaments of regular expressions in the process.
possible better answer: http://stackoverflow.com/a/24678006
has comment: http://stackoverflow.com/comment/38261935
has comment: http://stackoverflow.com/comment/38261679

http://stackoverflow.com/q/24739183
tagged with: php
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has body: I would need to return a 2D array with several individual variables from a PHP script to JavaScript client. The script is called via AJAX call. I have been experimenting with this a lot, but I simply can not find a solution. The code below shows how to return a plain 2D array. That works fine. But how to add, please, say three individual variables (say $var1, $var2, $var3) to the $outputArray and return them together? I would like to use json_encode() to return the information from the server to the client. // prepare output array $outputArray = array(); // construct 2D array while($row = mysqli_fetch_assoc($result)) { // add row to array $outputArray[] = $row; } // close database connection mysqli_close($dbc); // construct and output JSON echo json_encode($outputArray); I use: - PHP v5.5.8 - MySQL v5.6.15 - JavaScrip on the client side - HTML 5 I hope the information provided is sufficient to illustrate what I am looking for. Thank you in advance.
accepted answer: http://stackoverflow.com/a/24739286
has answer: http://stackoverflow.com/a/24739360
score: 0
answer count: 2
has title: PHP: Returning Both a 2D Array and Individual Variables Together
possible better answer: http://stackoverflow.com/a/24739360
has answer: http://stackoverflow.com/a/24739286
tagged with: ajax

http://stackoverflow.com/comment/38168830
score: 0
has text: The declaration for the show toast is at the bottom. I know the code works because it works when I initiate in from within the HTML. However, what I want to do is have it inject through the java and run that way.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24627917

http://stackoverflow.com/q/24593794
score: 1
accepted answer: http://stackoverflow.com/a/24594110
favorite count: 0
has title: How can I fill ng-model query for filtering data using a javascript?
tagged with: angularjs
upvote count: 1
has body: I use AngularJS for storing data in JSON and want to filter shown on the page items. Each item includes country code as a property: [ { "id": "1", "code": "us" }, { "id": "2", "code": "ca" } ] I want to use Jquery VMap to filter items. When I click to the region, the list of items should be filtered. When I use simple "input" field, the list is filtered. But when I use following code that is executed when I click to the county, nothing happens: onRegionClick: function(element, code, region) { document.getElementById("query").value = code; function updateQuery($scope) { $scope.query = code; $scope.$digest(); } } How can I make Angular knows about the change of "query" or is there any better solution? Link to the fiddle: http://jsfiddle.net/47RLz/4/
tagged with: jqvmap
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38102678
has comment: http://stackoverflow.com/comment/38103052
type: Question
has answer: http://stackoverflow.com/a/24594110
tagged with: angular-ngmodel
tagged with: javascript
has comment: http://stackoverflow.com/comment/38102819
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/38369904
type: Comment
has text: Is the function being fired? Is the problem that the fields values aren't changing? Maybe the JSON you receive contains more than just one object in which case you have to choose which object values to display.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24734353

http://stackoverflow.com/q/24600861
has body: I have some collection of data which I show using ng-repeat directive: myApp.controller("MyCtrl", function ($scope) { $scope.products = [...]; // data from server }); &lt;tr ng-repeat="product in products"&gt; &lt;td&gt;{{product.name}}&lt;/td&gt; &lt;td&gt;{{product.price}}&lt;/td&gt; &lt;/tr&gt; Also I have some filter buttons: "Newest", "Popular" etc. And I want to filter my data when clicking on this buttons. Currently I think I can just define separate event-handler for each of this button in controller, and programmatically filter the products variable: myApp.controller("MyCtrl", function ($scope) { $scope.products = [...]; // data from server $scope.showNewest = function() { // here modify the $scope.products varialbe so changes will be reflected in UI } }); But I think it's ugly solution. And I feel that better way is to define custom filter, but now I haven't any ideas how new filter should look. So what is idiomatic/better way to accomplish my task?
has comment: http://stackoverflow.com/comment/38116128
has title: Idiomatic way of filtering data in Angular JS
has comment: http://stackoverflow.com/comment/38116223
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38116245
has comment: http://stackoverflow.com/comment/38116376
type: Question
has comment: http://stackoverflow.com/comment/38116129
tagged with: javascript
has comment: http://stackoverflow.com/comment/38116204
has comment: http://stackoverflow.com/comment/38116257
score: 0

http://stackoverflow.com/q/24681345
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/38268405
has comment: http://stackoverflow.com/comment/38268533
has answer: http://stackoverflow.com/a/24682490
type: AnsweredQuestion
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/38268390
type: Question
tagged with: href
possible better answer: http://stackoverflow.com/a/24681578
answer count: 2
has answer: http://stackoverflow.com/a/24681578
has comment: http://stackoverflow.com/comment/38268392
tagged with: javascript
has title: Split website link into 2 href link?
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/24682490
has body: On my website public: http://abv.mk/company.aspx?id=40056 , i want to split http://www.donholding.com.mk & http://www.webklinika.mk to be separate links (and separate clickable like two different links - hrefs). But in my admin-panel for the field website i only have 1 field available, where i input 2 web site links splited with "," So is it possible in the public asp-file "company.aspx", to edit the file and insert some Javascript code, so i split the link from 1 href to 2 hrefs ? www.donholding.com.mk, www.webklinika.mk | donholding@live.com

http://stackoverflow.com/a/32739259
answers question: http://stackoverflow.com/q/24656488
has body: I run into a close situation, need to get JSON with Cross-site HTTP requests and fixed it by using jQuery request, instead of angularjs $.getJSON('http://www.host.com/test.json', '', function (data) { if (meta) { console.log("jq success :" + JSON.stringify(data)); } console.log("jq success, but empty JSON"); }) .done(function () { console.log("jq second success"); }) .fail(function (data) { console.log("jq fail " + JSON.stringify(data)); }) .always(function () { console.log("jq complete"); }); I used Amazon S3 CDN, and OPTIONS requests didn't work well with it, so this saved me. The answer from S3 server was: This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests.
upvote count: 3
score: 3
downvote count: 0
type: Answer

http://stackoverflow.com/a/24647154
answers question: http://stackoverflow.com/q/24646284
has body: Two ways: 1- `ng-change: &lt;input type="number" ng-change="tires = bikes * 2" min="0" ng-model="bikes" placeholder="Bikes" id = "bikes"/&gt; Or.... 2- $watch: app.controller('MyCtrl', function($scope) { $scope.$watch('bikes', function(newValue, oldValue) { if(newValue === oldValue) { return; // Angular calls watch at initialization with no change } $scope.tires = $scope.bikes * 2; }); });
score: 0
type: Answer

http://stackoverflow.com/q/24644334
has comment: http://stackoverflow.com/comment/38199477
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38199494
has answer: http://stackoverflow.com/a/24644344
has body: I'm looking for a regex for my JavaScript password function which checks that the user's password is at least 8 characters long with at least 1 number in it. Thank you!
tagged with: javascript
has comment: http://stackoverflow.com/comment/38199499
accepted answer: http://stackoverflow.com/a/24644344
type: Question
has title: Regex for min 8 characters and at least 1 number
tagged with: regex
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38199505
upvote count: 7
answer count: 1
linked to: http://stackoverflow.com/q/7844359
downvote count: 6
tagged with: expression
has comment: http://stackoverflow.com/comment/38199502
duplicate of: http://stackoverflow.com/q/7844359

http://stackoverflow.com/q/24682119
has answer: http://stackoverflow.com/a/24682291
has title: Add active on parent li only
has body: I know onlu basic jQuery. I want to add active class on parent li by jQuery. Live site- http://www.arif-khan.net/other/active/page1.html Go to there then go to page2 under Support menu(http://www.arif-khan.net/other/active/page2.html). You can see code add active class on all li also with parent li(Support). I need to modify that code so parent li(Support) will get active class instead of parent+all child li. Code- Home OverView Technical Info End Device Info Register To Service Rates Support Page2 Terms Of Service Contact Us Skype jQuery-
score: 0
downvote count: 1
has comment: http://stackoverflow.com/comment/38269719
type: Question
has answer: http://stackoverflow.com/a/24682462
tagged with: javascript
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/38270156
has comment: http://stackoverflow.com/comment/38270159
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css

http://stackoverflow.com/comment/38279514
score: 0
type: AnswerComment
has text: foo isn't being defined. You're also adding I. I has nothing to do with the numbers being passed in. If you change the numbers you'll end up with 15 still.
comment on: http://stackoverflow.com/a/24687233
type: Comment

http://stackoverflow.com/a/24590068
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/24590047
score: 1
has body: for(var x in nyc) { // x refers to the current property name. console.log(x); // To look up the *value* of that property, use the [] notation console.log(nyc[x]); }

http://stackoverflow.com/comment/88335499
comment on: http://stackoverflow.com/a/24766157
type: AnswerComment
score: 0
type: Comment
has text: firebase version 3 doesnt support those keys any longer

http://stackoverflow.com/a/24748941
answers question: http://stackoverflow.com/q/24748911
has comment: http://stackoverflow.com/comment/38418287
downvote count: 0
has body: Try the following: table { height: 1px; } td { vertical-align: top; height: 100%; } div{ border:1px solid red; padding: 2px 4px; box-sizing: border-box; } /* My Attempt: close, but the padding throws out the borders */ div{ display:block; height: 100%; } See demo: http://jsfiddle.net/audetwebdesign/AkjND/ The trick is to specify a height on the table, any small value will do the trick. If you want to apply vertical padding to the inner div, you need to use box-sizing: border-box, which may work as far back as IE8. Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing
has comment: http://stackoverflow.com/comment/38398766
type: Answer
has comment: http://stackoverflow.com/comment/38416498
score: 1
upvote count: 1

http://stackoverflow.com/q/24689780
tagged with: php
has comment: http://stackoverflow.com/comment/38284469
answer count: 0
has title: Jquery Autosuggest formatting
type: UnansweredQuestion
tagged with: mysql
has comment: http://stackoverflow.com/comment/38284811
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38320386
has comment: http://stackoverflow.com/comment/38304973
tagged with: jquery
has body: Good morning everyone ! Just after some quick(?) help in formatting Jquery autosuggest options (Background colors). Here's the sitrap: Page1.php Contains the search input field, and the Jquery code like so: &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#headerSearch").autocomplete({ source:'includes/searchAutocomplete.php', minLength:3, select: function (event, ui) { document.getElementById("headerSearch").innerHTML = ""; //empty out the box so student ID cannot be seen if(ui.item.value &gt; 0) { var label = ui.item.label; var value = ui.item.value; var id = ui.item.id; //This is where I can maybe store a color value? window.location='somePage.php?Profile=' + value; } } }); }); &lt;/script&gt; Then of course, I have searchAutocomplete.php, which runs mysql queries to determine what the user is after. Depending on the available results, I want them to be coloured independently.. eg; User searches for "johndoe". searchAutocomplete.php finds that 'johndoe' is present in 3 things; a users email address, and 2 users usernames. One of the usernames belongs to an account that is disabled. So it should be coloured differently to the active account. Likewise the email address that matched 'johndoe' should also be coloured differently as it was an email-match. I'm pretty great with PHP, but jquery is still pretty new to me. I'm sure I need to set another value, perhaps 'ui.item.id' on the searchAutocomplete.php page, then colour it accordingly on the original page.. or maybe I'm wrong here and that's why it won't work. Any assistance in getting this sorted would be greatly appreciated !

http://stackoverflow.com/q/24601245
accepted answer: http://stackoverflow.com/a/24601313
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/503093
tagged with: mysql
type: Question
has body: Within a webpage I'm trying to implement a button to prompt for the users password in order to logout. What I want to do is to use a javascript prompt to ask for it and then via AJAX send it to a php file which will verify if the password is correct and if it is it will return to index. What I've tried till now is the following: HTML: &lt;button style="" type="submit" class="" onclick='checkPass()'&gt; Logout &lt;/button&gt; &lt;script&gt; function checkPass() { var usr = "&lt;?php echo $usr = $_POST['usr']; ?&gt;"; var pass=prompt("Please write your password",""); if (pass!=null &amp;&amp; pass!="") { $.post("check.php", {pass: pass, usr:usr}); } } &lt;/script&gt; Check.php: &lt;?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $pass = mysql_escape_string($_POST['pass']); $usr = mysql_escape_string($_POST['usr']); $sql = mysql_query("SELECT * FROM USERS WHERE Usr='$usr' and Password='$pass'"); $count=mysql_num_rows($sql); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ header("location:index.php"); } else { } ?&gt; This is what I have but nothing is happening (I am getting no response)... :( Thanks for your help!
tagged with: prompt
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38116993
tagged with: ajax
has answer: http://stackoverflow.com/a/24601313
has title: Use ajax to verify password with javascript prompt
score: 0
has comment: http://stackoverflow.com/comment/38116946
has comment: http://stackoverflow.com/comment/38116976
has comment: http://stackoverflow.com/comment/38116955
tagged with: php

http://stackoverflow.com/a/24613379
accepted answer of: http://stackoverflow.com/q/24613202
has comment: http://stackoverflow.com/comment/38142191
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24613202
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38142473
score: 1
has comment: http://stackoverflow.com/comment/38149276
upvote count: 1
has body: It works but my question is if i can write it better. Yes. You can write promise chain. The advantage is: Error propagates, you can catch it on the end of the chain and its not piramide like async call in Javascript See flow example bellow: [EDIT] if the order is not critical you can use $q.all that gets list of promises and notify you when all of them resolved successfully. It should be something like: $q.all([ ProductsService.getPrice(product.Code), ProductsService.getQuantity(product.Code) ]) .then(function(result){ viewModelProduct.Price = result[0].data.Info.Price; iewModelProduct.Quantity = result[1].data.Info.Quantity; }, function(error) { alert(error.message); }); or even: var promises = []; promises.push(ProductsService.getPrice(product.Code)); promises.push(ProductsService.getQuantity(product.Code)); $q.all(promises).then(function(result){ viewModelProduct.Price = result[0].data.Info.Price; iewModelProduct.Quantity = result[1].data.Info.Quantity; }, function(error) { alert(error.message); });
has comment: http://stackoverflow.com/comment/38149334

http://stackoverflow.com/comment/38314408
comment on: http://stackoverflow.com/a/24705782
type: Comment
score: 0
type: AnswerComment
has text: tried that there, it is still not doing anything. Is there other typo's I wonder?

http://stackoverflow.com/q/24711663
has title: How to show query results in html options box?
type: Question
has answer: http://stackoverflow.com/a/24711765
tagged with: javascript
has answer: http://stackoverflow.com/a/24711823
possible better answer: http://stackoverflow.com/a/24711721
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/24711721
tagged with: jquery
has comment: http://stackoverflow.com/comment/38325863
tagged with: parse-platform
accepted answer: http://stackoverflow.com/a/24711823
tagged with: http://stackoverflow.com/tag/html
has body: Using parse.com and JavaScript. This query returns my results correctly, I know want to make those results via the options box on the html page. I thought I could just pass "friends" into the second code block to achieve this, but it doesn't work. Do I need to save the results first, before using them in the (2) code block? 1....... query.find({ success: function(results) { var friends = []; for (var i = 0; i < results.length; i++) { friends.push({ username: results[i].get('toUser').get('username'), userId: results[i].get('toUser').id }); } 2 $(document).ready(function() { var select = document.getElementById("selectNumber"); var options = (friends); for(var i = 0; i < options.length; i++) { var opt = options[i]; var el = document.createElement("option"); el.textContent = opt; el.value = opt; select.appendChild(el); } }); 3 HTML Choose a number
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38325827

http://stackoverflow.com/comment/38395465
type: AnswerComment
has text: i had in my mind that he would also want to display his `<c:set>` block. so my solution came out to this. you can always provide a better answer if have one in mind though.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24748286

http://stackoverflow.com/a/24616443
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24616179
has body: There are no real asynchronous is javascript, thus no multi thread or anything like that. There is a way to make long running function not freeze the browser in certain cases though. You can use the setInterval or setTimeout function to do small bits of your long running task at a time, thus each bit takes a fraction of a second and then the ui becomes responsive again for a fraction of a second until the next bit runs. This functionally makes the ui stay responsive and does not add much time (if any) onto the processing of the code. For example. long running code function doSomething(){ for(var x = 0; x &lt; 10000; x++){ // do something } } // doing it like this could take forever and lock up the browser broken up code var total = 0; setTimeout(doSomething, 4); function doSomething(){ for(total = total; total + 100 &lt; 100; total++){ // do something } if(total &lt; 10000){ setTimeout(doSomething, 4); } } // doing it like this stops the browser from freezing but does not save any time. A few things, I put a time of 4 ms into the setTimout because that is actually the lowest value js will except, even if you put 1 it defaults to 4. I used a setTimeout pattern instead of a setInterval to prevent the next interval from running before the previous on finishes. And lastly this pattern does not work for everything. It lends itself best to loop and sequence based operations. Hope it helps
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38146989
has comment: http://stackoverflow.com/comment/38147338
accepted answer of: http://stackoverflow.com/q/24616179

http://stackoverflow.com/q/24727177
score: 0
tagged with: canvas
answer count: 1
tagged with: web
has body: I am making a game that takes place on a soccer field and you are able to move around as a soccer player. The field will draw but the player won't draw onto the screen and I am not sure why, also it doesn't return an error in the console. Perhaps it is something to do with the namespace? code is here: http://pastebin.com/uUm8w265 , var canvas = document.getElementById("cvs"), context = canvas.getContext("2d"), GAME = GAME || {}, fps = 10, drawInterval, playersImg = new Image(), keysDown = {}; playersImg.src = "source/img/players.png"; canvas.width = 800, canvas.height = 400; // Disable blurring when images get resized context.webkitImageSmoothingEnabled = false; context.mozImageSmoothingEnabled = false; context.imageSmoothingEnabled = false; // The game namespace GAME = { gen: { x: canvas.width, y: canvas.height }, player: { x: canvas.width /2, y: canvas.height /2, X: 13 }, players: { messi: [75, 25], ronaldo: [50, 50], balotelli: [25, 75] }, team1: { goals: 0 }, team2: { goals: 0 }, func: { // Draws the soccer field drawField: function (x, y) { // Drawing grass context.beginPath(); context.rect(0, 0, x, y); context.fillStyle = "#526F35"; context.fill(); context.closePath(); // Drawing middle white circles context.beginPath(); context.arc(x / 2, y / 2, 50, 0, 2 * Math.PI, false); context.moveTo(x / 2, y / 2); context.arc(x / 2, y / 2, 5, 0, 2 * Math.PI, false); // Drawing all the white lines context.moveTo(800, 100); context.lineTo(725, 100); context.lineTo(725, 300); context.lineTo(800, 300); context.moveTo(0, 100); context.lineTo(75, 100); context.lineTo(75, 300); context.lineTo(0, 300); context.moveTo(x / 2, 0); context.lineTo(x / 2, y); // How all the lines and circles are styled context.lineWidth = 5; context.strokeStyle = "#ffffff"; context.stroke(); context.closePath(); }, drawPlayer: function (x, y, posX, posY) { context.drawImage(playersImg, x, y, 6, 8, posX, posY, 24, 32); }, checkInput: function (e) { if (keysDown[e] === 65) { GAME.player.x = GAME.player.…
has answer: http://stackoverflow.com/a/24727257
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38355679
has title: HTML5 Canvas won't draw my image to the screen (without an error)
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24727257
type: Question
tagged with: javascript
tagged with: image

ajax
tags question: http://stackoverflow.com/q/24739183
tags question: http://stackoverflow.com/q/24654734
tags question: http://stackoverflow.com/q/24677445
tags question: http://stackoverflow.com/q/24643112
tags question: http://stackoverflow.com/q/24651277
tags question: http://stackoverflow.com/q/24707914
tags question: http://stackoverflow.com/q/24631067
tags question: http://stackoverflow.com/q/24747374
tags question: http://stackoverflow.com/q/24735501
tags question: http://stackoverflow.com/q/24651714
tags question: http://stackoverflow.com/q/24662788
tags question: http://stackoverflow.com/q/24648299
tags question: http://stackoverflow.com/q/24685973
tags question: http://stackoverflow.com/q/24689034
tags question: http://stackoverflow.com/q/24694561
tags question: http://stackoverflow.com/q/24702593
tags question: http://stackoverflow.com/q/24642501
tags question: http://stackoverflow.com/q/24657948
tags question: http://stackoverflow.com/q/24743815
tags question: http://stackoverflow.com/q/24639868
tags question: http://stackoverflow.com/q/24736181
tags question: http://stackoverflow.com/q/24612411
tags question: http://stackoverflow.com/q/24614899
tags question: http://stackoverflow.com/q/24639382
tags question: http://stackoverflow.com/q/24731375
tags question: http://stackoverflow.com/q/24653863
tags question: http://stackoverflow.com/q/24637109
tags question: http://stackoverflow.com/q/24659901
tags question: http://stackoverflow.com/q/24603708
tags question: http://stackoverflow.com/q/24670610
tags question: http://stackoverflow.com/q/24630612
tags question: http://stackoverflow.com/q/24657807
tags question: http://stackoverflow.com/q/24713317
tags question: http://stackoverflow.com/q/24633399
tags question: http://stackoverflow.com/q/24704897
tags question: http://stackoverflow.com/q/24681291
tags question: http://stackoverflow.com/q/24657657
tags question: http://stackoverflow.com/q/24675534
tags question: http://stackoverflow.com/q/24708187
tags question: http://stackoverflow.com/q/24643605
tags question: http://stackoverflow.com/q/24654478
tags question: http://stackoverflow.com/q/24696984
tags question: http://stackoverflow.com/q/24713986
tags question: http://stackoverflow.com/q/24655983
tags question: http://stackoverflow.com/q/24738133
tags question: http://stackoverflow.com/q/24593831
tags question: http://stackoverflow.com/q/24598832
tags question: http://stackoverflow.com/q/24693091
tags question: http://stackoverflow.com/q/24727047
tags question: http://stackoverflow.com/q/24674813
tags question: http://stackoverflow.com/q/24635189
tags question: http://stackoverflow.com/q/24651631
tags question: http://stackoverflow.com/q/24683907
tags question: http://stackoverflow.com/q/24734152
tags question: http://stackoverflow.com/q/24618099
tags question: http://stackoverflow.com/q/24614315
type: Tag
tags question: http://stackoverflow.com/q/24716727
tags question: http://stackoverflow.com/q/24601245
tags question: http://stackoverflow.com/q/24641909
tags question: http://stackoverflow.com/q/24679531
tags question: http://stackoverflow.com/q/24743145
tags question: http://stackoverflow.com/q/24608836
tags question: http://stackoverflow.com/q/24648781
tags question: http://stackoverflow.com/q/24604735
tags question: http://stackoverflow.com/q/24710444
tags question: http://stackoverflow.com/q/24720363
tags question: http://stackoverflow.com/q/24694780
tags question: http://stackoverflow.com/q/24719000
tags question: http://stackoverflow.com/q/24721674
tags question: http://stackoverflow.com/q/24664454
tags question: http://stackoverflow.com/q/24698534
tags question: http://stackoverflow.com/q/24743427
tags question: http://stackoverflow.com/q/24595917
tags question: http://stackoverflow.com/q/24705967
tags question: http://stackoverflow.com/q/24637317
tags question: http://stackoverflow.com/q/24686891
tags question: http://stackoverflow.com/q/24622420
tags question: http://stackoverflow.com/q/24607944
tags question: http://stackoverflow.com/q/24639522

http://stackoverflow.com/a/24686025
has comment: http://stackoverflow.com/comment/38277780
upvote count: 10
downvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/24686001
has body: You can use the "short circuit" &amp;&amp; operator: if (myObject &amp;&amp; myObject.myProperty) { ... } If myObject is "falsey" (e.g. undefined) the &amp;&amp; operator won't bother trying to evaluate the right-hand expression, thereby avoiding the attempt to reference a property of a non-existent object. The variable myObject must have course already have been declared, the test above is for whether it has been assigned a defined value.
answers question: http://stackoverflow.com/q/24686001
has comment: http://stackoverflow.com/comment/38278108
score: 9
has comment: http://stackoverflow.com/comment/38279313
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38278494

http://stackoverflow.com/comment/38201510
type: QuestionComment
comment on: http://stackoverflow.com/q/24633254
has text: Then why it is overflowing and moving out of the column bar area ?? I have much expectations from you, my dear friend, as you have helped me twice previously ! :)
score: 0
type: Comment

http://stackoverflow.com/comment/38356773
type: Comment
comment on: http://stackoverflow.com/a/24702545
type: AnswerComment
has text: Although your approach is correct, I am still wondering what `XML` has to do with the question
score: 0

http://stackoverflow.com/a/24687488
score: 1
downvote count: 0
has body: Try the following in Modal Javascript: var map; var location = new google.maps.LatLng(-34.397, 150.644); var marker = new google.maps.Marker({ position : location }); function initialize() { var mapOptions = { ... }; map = new google.maps.Map(document.getElementById("gmap"), mapOptions); marker.setMap(map); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map, marker); }); }; google.maps.event.addDomListener(window, 'load', initialize); google.maps.event.addDomListener(window, "resize", resizingMap()); $('#ajax-modal-1').on('show.bs.modal', function() { resizeMap(); }) function resizeMap() { if(typeof map =="undefined") return; setTimeout( function(){resizingMap();} , 400); } function resizingMap() { if(typeof map =="undefined") return; var center = map.getCenter(); google.maps.event.trigger(map, "resize"); map.setCenter(center); } HTML: Launch Modal ... ...
has comment: http://stackoverflow.com/comment/38279933
type: Answer
answers question: http://stackoverflow.com/q/24687069
upvote count: 1

http://stackoverflow.com/comment/38324127
score: 0
type: Comment
has text: I tried to remove any of the rows after 9th but same problem, its problem is with any row after 9th, no matters what its content is
comment on: http://stackoverflow.com/a/24710614
type: AnswerComment

http://stackoverflow.com/comment/38148831
type: Comment
has text: Still unparseable ... and update the code to get more in the context.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24617433

http://stackoverflow.com/a/24645413
answers question: http://stackoverflow.com/q/24645321
score: 0
type: Answer
has body: Just try this $(function(){ $("button").click(function(){ var data = $("#enteredFormName").val(); $("#fixedFormName").val(data); }); })

http://stackoverflow.com/comment/38363901
has text: @DannyF247 See this [canonical question](http://stackoverflow.com/questions/2844565/is-there-a-jquery-dom-change-listener). Inject at start, listen for changes.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24728162

http://stackoverflow.com/q/24646741
has body: I have a JSON object that I use as a theme (It's for Appcelerator, but really, it doesn't matter since this is more of a JSON question.) I do have have access to underscore.js if that helps with traversals/functions...but pure JS would work as well. I need to traverse the JSON tree and move a child objects properties to it's parents if that key is a certain value, but also omit that object if it it's key another value. This needs to happen at multiple levels of the JSON tree. So I need some sort of recursive function. For an example, let's say I need to move all properties of a child object with a key of ANDROID to it's parent object, but ignore the object and properties if a key is IOS: Original Object var theme = { Form: { LabelTop: { backgroundColor: 'red', fieldBorderColor: '#cacacf', rowHeight: 40, hintText: { font: { fontSize: 12 }, colorOn: '#3accf1', colorOff: '#cacacf', ANDROID: { width: 200 } }, } }, Modal: { id: 'md', backgroundColor: '#fff', IOS: { color: 'red' } } }; I'd like to be able to call something like this: var newTheme = parsePlatform(theme, 'ANDROID', 'IOS'); Where theme is the object to search, ANDROID is the key to merge and IOS is the key to skip With this example I'm moving/replacing all properties of a parent object with the child properties if the key is ANDROID, but I'm not including any with a parent key of IOS. In this example I would expect the output to be this: Modified Object var theme = { Form: { LabelTop: { backgroundColor: '#fff', // replaced fieldBorderColor: '#cacacf', rowHeight: 40, hintText: { font: { fontSize: 12 }, colorOn: '#3accf1', colorOff: '#cacacf', width: 200 // 'ANDROID' prop moved } } }, Modal: { // IOS removed id: 'md', backgroundColor: '#fff' } }; Notice Modal doesn't have a color property because i'm only looking for ANDROID, not IOS I've been able to get the results i'm looking for if I know the JSON depth and hard code it in. Once I move to a recursive function everything blow up. Any help would be appreciat…
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24647115
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24647115
answer count: 1
downvote count: 0
favorite count: 0
has title: Traverse json object and move child obj properties to parent based on key name
has comment: http://stackoverflow.com/comment/38203952
type: AnsweredQuestion

http://stackoverflow.com/comment/38210463
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24650087
type: Comment
has text: @MilindAnantwar have you look my answer .now i updated.. again you have to look rendered dom element ..i think it is good compared to your post

http://stackoverflow.com/a/24638058
type: Answer
has body: A little bit of javascript in iframe1.php is required to do auto submit. index.php iframe1.php <?php if(isset($_POST['lala'])):?> <input type="hidden" name="lili" value="<?php echo $_POST['lala']; ?>" /> <?php else:?> Nonthing posted <?php endif;?> foo.php <?php echo $_POST['lili']; ?>
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24637846
answers question: http://stackoverflow.com/q/24637846
has comment: http://stackoverflow.com/comment/38188009

http://stackoverflow.com/q/24693658
favorite count: 0
has comment: http://stackoverflow.com/comment/38290751
has comment: http://stackoverflow.com/comment/38290700
has comment: http://stackoverflow.com/comment/38290876
has comment: http://stackoverflow.com/comment/38290905
possible better answer: http://stackoverflow.com/a/24693831
has comment: http://stackoverflow.com/comment/38290734
has title: Specific iteration using for loop in javascript
has comment: http://stackoverflow.com/comment/38290803
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38291146
has body: I have an ajax call which returns same data obj[0],obj[1],obj[2],obj[3],obj[4],obj[5],obj[6],obj[7],obj[8],obj[9],obj[10],obj[11].... So i want to take only obj[0]-obj[3] and obj[4]-obj[7] and obj[8]-obj[11]... var iterate=0; for(i=0 ;i&lt;obj.length ; i++) { alert(obj[iterate].mydata); iterate=iterate+3; } here the issue is , it iterates each time so i cant get valjue of obj[4] after obj[3] Any idea ?
type: Question
has comment: http://stackoverflow.com/comment/38292431
has comment: http://stackoverflow.com/comment/38291105
tagged with: javascript
has answer: http://stackoverflow.com/a/24693831
has answer: http://stackoverflow.com/a/24694016
accepted answer: http://stackoverflow.com/a/24694016
has comment: http://stackoverflow.com/comment/38291465
upvote count: 3
score: 0
has comment: http://stackoverflow.com/comment/38291672
has comment: http://stackoverflow.com/comment/38291219
answer count: 3
downvote count: 3
has comment: http://stackoverflow.com/comment/38290739
has answer: http://stackoverflow.com/a/24693885

http://stackoverflow.com/a/24656370
type: Answer
has comment: http://stackoverflow.com/comment/38223327
downvote count: 0
has comment: http://stackoverflow.com/comment/38221971
score: 1
has body: The problem is that new added item is not wrapped into tag. Hence .next() can't get this element and can't get its text (next considers element nodes and skips text nodes). So to fix it you should append a new item inside addItem method like this: $("ul").append(" Done "+ " " + $("#new_todo_item").val() + " " + " "+ " Star "); (the same as in checkLocalStorageExistingData method). Demo: http://jsfiddle.net/csTS7/46/
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24655969
answers question: http://stackoverflow.com/q/24655969

http://stackoverflow.com/comment/38363533
comment on: http://stackoverflow.com/a/24731134
score: 1
type: AnswerComment
has text: @LearnerAlways:Just add `width:100%;` to the `fixed` `class`
type: Comment

http://stackoverflow.com/comment/38211786
type: QuestionComment
score: 1
has text: Mayve better will be using highstock which group data and chart will be more clearful \http://www.highcharts.com/stock/demo
comment on: http://stackoverflow.com/q/24647435
type: Comment

http://stackoverflow.com/q/24639615
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24649445
upvote count: 2
answer count: 1
favorite count: 0
tagged with: angularjs
tagged with: nvd3.js
type: UnansweredQuestion
score: 2
downvote count: 0
has body: Hi I am using a line chart exactly like this: http://cmaurer.github.io/angularjs-nvd3-directives/cumulative.line.chart.html but I was wonder if there was a way to edit the y axis max and min values (and the values in the tooltip) so they don't display these super long decimals. I went into the nvd3 file and found them there and manage to round them using Math.round...but I was wondering if there was a way to fix this so I don't have to modify the actual nvd3 file.
has title: Rounding nvd3 angularJS percentages for cummulative line chart

http://stackoverflow.com/q/24717467
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/24717556
tagged with: razor
linked to: http://stackoverflow.com/q/7902213
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38336799
has body: In internet I found many samples of code in JS like this: window.location.href = "@Url.Action('Index', 'Home')"; People use HTML helpers in javascript code, for example see that. But when I want to do it I get a simple string: http://localhost:28832/@Url.Action('Index',%20'Home') Why are my HTML helpers not being processed?
score: 3
has comment: http://stackoverflow.com/comment/38336735
upvote count: 3
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/38337097
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/11599995
answer count: 1
has answer: http://stackoverflow.com/a/24717556
has title: Url.Action in JS don't work

http://stackoverflow.com/comment/38095098
type: QuestionComment
comment on: http://stackoverflow.com/q/24589866
has text: Sorry, I misread your answer. I see what you are saying. I'll try checking that. Thanks.
score: 0
type: Comment

http://stackoverflow.com/comment/38288399
has text: I agree, in this situation type conversion might actually be useful and not harmful. However being consistent is good as well. But imagine what happens if the user provides a non-numerical input (which might be possible depending in the browser). The value would be converted to `NaN` which does not equal 0. Would that be the expected behavior?
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24691981
type: Comment

http://stackoverflow.com/a/24689761
has body: Here is one way to do it. You need to get the table object using jquery selector. Then you need to loop the results property of the json data using for keyword. For each object of the result, get the property of subject, date and time_start using property accessor. Create a row string such as "&lt;tr&gt;&lt;td&gt;" + val1 + "&lt;/td&gt;&lt;td&gt;" + val2 + "&lt;/td&gt;&lt;td&gt;" + val3 + "&lt;/td&gt;&lt;/tr&gt;" and append it to the table object using jquery append. UPDATE You need to loop the results property instead. $.getJSON("http://127.0.0.1:8000/ajax/list/?page=1&amp;format=json", function( data ) { $.each(data.results, function() { $.each( this, function( i, v ) { console.log( v ); }); }); });
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24689690
type: Answer
accepted answer of: http://stackoverflow.com/q/24689690
has comment: http://stackoverflow.com/comment/38284208

google-maps-api-3
tags question: http://stackoverflow.com/q/24597643
tags question: http://stackoverflow.com/q/24637362
tags question: http://stackoverflow.com/q/24660992
tags question: http://stackoverflow.com/q/24680247
tags question: http://stackoverflow.com/q/24604087
tags question: http://stackoverflow.com/q/24710546
tags question: http://stackoverflow.com/q/24697284
tags question: http://stackoverflow.com/q/24698393
tags question: http://stackoverflow.com/q/24650351
tags question: http://stackoverflow.com/q/24712965
tags question: http://stackoverflow.com/q/24682641
tags question: http://stackoverflow.com/q/24659660
tags question: http://stackoverflow.com/q/24736342
tags question: http://stackoverflow.com/q/24633472
tags question: http://stackoverflow.com/q/24747488
tags question: http://stackoverflow.com/q/24622737
tags question: http://stackoverflow.com/q/24633889
tags question: http://stackoverflow.com/q/24625633
tags question: http://stackoverflow.com/q/24746622
tags question: http://stackoverflow.com/q/24619723
tags question: http://stackoverflow.com/q/24714071
tags question: http://stackoverflow.com/q/24611321
tags question: http://stackoverflow.com/q/24635625
tags question: http://stackoverflow.com/q/24629603
tags question: http://stackoverflow.com/q/24699861
tags question: http://stackoverflow.com/q/24631894
tags question: http://stackoverflow.com/q/24702440
tags question: http://stackoverflow.com/q/24701124
tags question: http://stackoverflow.com/q/24590112
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/24731435
tags question: http://stackoverflow.com/q/24625205
tags question: http://stackoverflow.com/q/24735562
type: Tag
tags question: http://stackoverflow.com/q/24660628
tags question: http://stackoverflow.com/q/24702029
tags question: http://stackoverflow.com/q/24646827
tags question: http://stackoverflow.com/q/24730075
tags question: http://stackoverflow.com/q/24627924
tags question: http://stackoverflow.com/q/24702489
tags question: http://stackoverflow.com/q/24625487
tags question: http://stackoverflow.com/q/24647813
tags question: http://stackoverflow.com/q/24659841
tags question: http://stackoverflow.com/q/24734950
tags question: http://stackoverflow.com/q/24726077
tags question: http://stackoverflow.com/q/24691318
tags question: http://stackoverflow.com/q/24601633
tags question: http://stackoverflow.com/q/24660391
tags question: http://stackoverflow.com/q/24682859
tags question: http://stackoverflow.com/q/24682597
tags question: http://stackoverflow.com/q/24602728
tags question: http://stackoverflow.com/q/24717206
tags question: http://stackoverflow.com/q/24687069
tags question: http://stackoverflow.com/q/24715611
tags question: http://stackoverflow.com/q/24695101

http://stackoverflow.com/a/45436098
has body: Following answer can help in this and other similar situations like synchronous AJAX call - Working example waitForMe().then(function(intentsArr){ console.log('Finally, I can execute!!!'); }, function(err){ console.log('This is error message.'); }) function waitForMe(){ // Returns promise console.log('Inside waitForMe'); return new Promise(function(resolve, reject){ if(true){ // Try changing to 'false' setTimeout(function(){ console.log('waitForMe\'s function succeeded'); resolve(); }, 2500); } else{ setTimeout(function(){ console.log('waitForMe\'s else block failed'); resolve(); }, 2500); } }); }
upvote count: 2
answers question: http://stackoverflow.com/q/24655851
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/24668389
has body: Try this: http://jsfiddle.net/K6Lf4/ $.each(data.entities, function(index,option){ $("#city").append(' '+option.name+' '); });
score: 1
answers question: http://stackoverflow.com/q/24668296
downvote count: 0
upvote count: 1
type: Answer

http://stackoverflow.com/comment/38295055
comment on: http://stackoverflow.com/a/24695517
type: AnswerComment
has text: @Prashant Your answer and Maulik's answer isn't same. I agree that you'r code works very well in jsfiddle but Maulik's code is better which replaces class NORMAL with class MAIN on hover. Any ways, many thanks for your help and efforts.
score: 0
type: Comment

http://stackoverflow.com/a/24685041
score: 0
has body: in this situation the only thing that changes is the view of the controller, for a simple case I would do the following //... /** * @Route("/index.{format}", defaults={"format" = "html"}) */ public function indexAction($format) { return $this-&gt;render("ByteinCoffeeWebBundle:Frontend/User:index.$format.twig"); } //... but if this is a common thing in your application i guess better take a look in this package: https://github.com/FriendsOfSymfony/FOSRestBundle
answers question: http://stackoverflow.com/q/24681291
type: Answer

http://stackoverflow.com/a/24673068
has comment: http://stackoverflow.com/comment/38253197
score: 0
type: AcceptedAnswer
has body: The latter is unnecessary. It's just extra cruft. $.when is useful for converting values to promises and for aggregation. Here is an average $.when use case: $.when($.get(...),$.get(...)).then(function(firstResult,secondResult){ // access both results here }); You can use both results here, both have finished. As for the first question - basically B. The first option is the deferred anti pattern and is better avoided. See the link to it question on why.
type: Answer
has comment: http://stackoverflow.com/comment/38253993
accepted answer of: http://stackoverflow.com/q/24672983
answers question: http://stackoverflow.com/q/24672983

http://stackoverflow.com/a/24710325
answers question: http://stackoverflow.com/q/24710175
has body: Here the height of the section will depend on the image height. If the height calculation logic is called on window.load() event it must work fine. Once you navigate back to homepage and then back to page in question the images are cached hence it works fine.Try this $(window).load(function(){ $('.section').eqHeights(); }); The window load event is called after all the images are loaded.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38423279
has comment: http://stackoverflow.com/comment/38334119
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24710175
has comment: http://stackoverflow.com/comment/38441484

http://stackoverflow.com/a/24616904
has comment: http://stackoverflow.com/comment/38179801
has comment: http://stackoverflow.com/comment/38180245
has comment: http://stackoverflow.com/comment/38149323
accepted answer of: http://stackoverflow.com/q/24616635
score: 4
answers question: http://stackoverflow.com/q/24616635
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: As Ehsan said in the comments, it appears that clicking the icon while it has already been clicked once fires both click() and blur() events. I just added in a variable to represent the state of clicked/unclicked and it works for me! Also in the updated fiddle below is what I believe you intended to do that Jacob mentioned in the comments-the class name is 'focused' not '.search-box focused'. Updated JSFiddle Link Here is the JS Code: var clicked = false; $('.search-icon').click( function () { if (clicked) { $('.search-box ').removeClass('focused'); clicked = false; } else { $('.search-box ').addClass('focused'); clicked = true; } }); $('.search-box').blur( function () { $('.search-box').removeClass('focused');
type: Answer

http://stackoverflow.com/comment/120744279
has text: @dreamLo read on a little and it says Chrome suspended the deprecation. That was some years ago and they haven't tried to deprecate it since. SMIL is much much more powerful than CSS animation. You can chain animations, animate attributes rather than just CSS properties etc.
type: AnswerComment
comment on: http://stackoverflow.com/a/24693145
score: 0
type: Comment

http://stackoverflow.com/q/24743108
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24743953
has comment: http://stackoverflow.com/comment/38386172
type: Question
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/38385915
has comment: http://stackoverflow.com/comment/38386089
tagged with: javascript
tagged with: date
tagged with: jquery-ui-datepicker
has body: i hope you can help me, i have this code on datepicker: EDIT: the full code $(document).ready(function () { $("#entrada").datepicker({ firstDay: 1, monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], monthNamesShort: ['Ene','Feb','Mar','Abr', 'May','Jun','Jul','Ago','Sep', 'Oct','Nov','Dic'], dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sabado'], dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], weekHeader: 'Sm', numberOfMonths: 1, onSelect: function (selected) { var selectedDate = new Date(selected); var dateMin = new Date(selectedDate); var daystoAdd = 1; dateMin.setDate(dateMin.getDate() + daystoAdd); var dd = dateMin.getDate(); var mm = dateMin.getMonth() + 1; var y = dateMin.getFullYear(); var dateMinFormatted = mm + '/'+ dd + '/'+ y; $("#salida").datepicker("option", "minDate", dateMinFormatted) } }).datepicker('setDate', 'today');//dia de inicio, default HOY $("#salida").datepicker({ firstDay: 1, monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], monthNamesShort: ['Ene','Feb','Mar','Abr', 'May','Jun','Jul','Ago','Sep', 'Oct','Nov','Dic'], dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sabado'], dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], weekHeader: 'Sm', numberOfMonths: 1, onSelect: function (selected) { $("#entrada").datepicker("option", "maxDate", selected) } }); }); i have this problem, i need the date like this "dd-mm-yy" but in the var function i cant change the "/" to "-" cause the datepicker writes a "2020" year and gets wacky. Its only this, change the dateminformatted if you see when i pick the "entrada" date the "salida" show the next day and block the "before" dates, thats why i cannot chang…
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38385728
has answer: http://stackoverflow.com/a/24743953
tagged with: jquery
has title: How to change date format variable
possible better answer: http://stackoverflow.com/a/24743405
has answer: http://stackoverflow.com/a/24743405
has comment: http://stackoverflow.com/comment/38385614

http://stackoverflow.com/comment/38258342
comment on: http://stackoverflow.com/q/24670803
score: 0
has text: Because if I do append without remove, it will append multiple text elements on each update. I am afraid I am doing it the wrong way and if I did it properly I wouldn't have to do these workarounds.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24606259
answers question: http://stackoverflow.com/q/24605461
score: 4
accepted answer of: http://stackoverflow.com/q/24605461
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38126964
has comment: http://stackoverflow.com/comment/38126532
type: Answer
has body: I have read your code and tried to run it. Now you have 2 points to fix: Your selector $j(this).children(ul) can't find the list. The list ul is a sibling element of your #clicker, so you can use the method siblings('ul') or next() to select the list, but not children() the event 'blur' can't be triggered now. Generally, the event blur could only be triggered on input or textarea, so if you want to trigger the blur on &lt;img&gt; or &lt;div&gt;, you may set an attribute like tabindex="-1" to it. As I tried, it runs successfully after the fix. Here is the link: http://jsfiddle.net/edisonator/kfcB9/ Thanks, Edison
has comment: http://stackoverflow.com/comment/38126902
has comment: http://stackoverflow.com/comment/38129490
upvote count: 4

http://stackoverflow.com/q/24635584
has comment: http://stackoverflow.com/comment/38183301
has body: I don't speak English very well. My company has developed a web application for internet explorer that very strenuously uses the function showModalDialog and waits for the result. We are planning to extend the use of the application to other browsers (Firefox, Chrome), and I need to replace "showModalDialog logic" with a logic that will work well on all browsers. I originally tried using an ajaxcontroltoolkit modalpopup with an iframe inside. My problem is that, after I have showed the modalpopup, I cannot wait for the user to close the popup window without freezing the web interface. function OpenDialog() { var result = window.showModalDialog("page1.html", "input_parameter", "width:100px; height:100px"); //When the popup went closed alert("result: " + result); } //Override showModalDialog function for compatibility with other browser function myShowModalDialog(url, pars, options) { //show a jquery modalpopup or ajaxcontroltoolkit modalpopup with an iframe .... iframe.src = url; //I need to wait here until the modal popup closed //HOW? //get the value from popup var res = ???????; return res; } window.showModalDialog = myShowModalDialog; I cannot change the logic for every page in the webapp. I searched for a method to override the showModalDialog function and recreate the same logic (wait until the popup is closed and get the result that the popup provides for the caller). Any ideas? Thanks to all
type: Question
score: 2
has comment: http://stackoverflow.com/comment/38183463
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Javascript -- wait for user interaction without freezing the browser
has answer: http://stackoverflow.com/a/24635986
has answer: http://stackoverflow.com/a/24635878
has comment: http://stackoverflow.com/comment/38183252
has comment: http://stackoverflow.com/comment/38208153
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25130940
has comment: http://stackoverflow.com/comment/38183865
has comment: http://stackoverflow.com/comment/38183056
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38183355
has answer: http://stackoverflow.com/a/24637550

http://stackoverflow.com/comment/38290100
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24691790
score: 0
has text: have you configured to use your grid/node? As in error message, local webdriver starts vs your script sends requests to Remote Server

http://stackoverflow.com/comment/38303743
type: Comment
has text: @rack_nikesh, its printing an header :(
comment on: http://stackoverflow.com/a/24669755
type: AnswerComment
score: 0

http://stackoverflow.com/q/24642228
favorite count: 0
upvote count: 6
tagged with: angularjs
score: 6
has body: I want a button to be disabled unless text is present in a textarea. Here is what I have tried: However, the button is enabled no matter what.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24642294
accepted answer: http://stackoverflow.com/a/24642294
has title: Angular.js idiom for disabling button when textarea is blank
type: Question
tagged with: validation
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/24727116
type: Question
type: AnsweredQuestion
has title: Blueimp jQuery File Upload - hide file from queue after upload done responce
tagged with: javascript
tagged with: blueimp
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24841637
tagged with: jquery-file-upload
has body: I'm using Blueimp jQuery File Upload plugin and my configuration is: $('#fileupload').fileupload({ // Uncomment the following to send cross-domain cookies: //xhrFields: {withCredentials: true}, url: 'assets/plugins/jquery-file-upload/server/php/', done: function (e, data) { //some code } }); When one file upload is done, I need to hide this file from list in done: event, but I cant get index of this file in queue list. Any ideas?
has answer: http://stackoverflow.com/a/24841637

http://stackoverflow.com/q/24630076
type: Question
tagged with: c#
has body: I have some JSON generated in my asp.net codebehind. Initially this data was stored in a Page property string and accessed in the javascript like so: var myjson = '&lt;%= PageProperty %&gt;' However, on a postback of the updatepanel, the properties are updated, but the previous values are retained in the javascript variables. What I ended up doing was assign the json to the Text attribute of a hidden asp:TextBox then retrieving that in javascript like so: ASP markup: &lt;asp:TextBox ID="jsonData" runat="server" Text="" style="display: none" /&gt; Javascript: var myjson = $('#&lt;%= jsonData.ClientID %&gt;').val(); This seems messy (note: there are 15 of these fields removed for simplicity). Is there are better way of doing this (without 15 ajax calls)? Why are the updated Page properties not picked up after postbacks?
tagged with: javascript
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/301471
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has title: Change javascript variable from asp.net codebehind on updatepanel refresh
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/24632784
linked to: http://stackoverflow.com/q/12917821

http://stackoverflow.com/a/24727904
downvote count: 0
type: Answer
has body: I don't think something like this is possible, because it's as if pushing with a URL. You can store a URL within Firebase. For this circumstance you can add an event listener for an anchor tag. When it is clicked you can set the data to Firebase. If you also attach a listener for the users location in Firebase you can append those links to the page in realtime. Below is an example done with jQuery, but it can easily be adapted to which ever process or framework you use. Plunker Demo var fbRef = new Firebase('https://firenode.firebaseio.com/'), userRef = fbRef.child('users'), appUrlBase = 'https://myapp.firebaseapp.com/', links = $('#people-list &gt; li a'), urlList = $('#url-list'); // create click handlers for every link $.each(links, function(key, link) { var $link = $(link), name = $link.text(), url = appUrlBase + name; $link.on('click', function(e) { userRef.child(name).set({ approvedUrl: url // &lt;- this is a URL }); }); }); // helper function for creating lis with a tags function createLi(url) { var li = $('&lt;li&gt;&lt;/li&gt;'); li.append('&lt;a href="' + url + '"&gt;' + url + '&lt;/a&gt;'); return li; } // listen for the additions to the users location // when items are added we can append to the list userRef.on('child_added', function(snap) { var url = snap.val().approvedUrl; elem = createLi(url); urlList.append(elem); });
accepted answer of: http://stackoverflow.com/q/24722916
score: 2
answers question: http://stackoverflow.com/q/24722916
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/24627422
has comment: http://stackoverflow.com/comment/38170307
tagged with: jquery
has comment: http://stackoverflow.com/comment/38178484
has body: I have list of restaurants and I have to append pictures of each restaurant, which is coming from a database. For this I made div's id dynamic but the pictures not append on that div. If I make the div's id static then it shows the picture coming from the server. The problem is with making the div id dynamic. Please help me. Here is my sample code: $("#list").empty(); $.each(data, function (i, item) { if (data[i].has_logo == 1) { $('#pic' + i).css("background-image", "url('http://www.thefoodhive.com/web_root/provider_uploads/" + data[i].id + "/logo.jpg')"); } if (data[i].has_menu == 0) { status = 'Call Now'; } else { status = 'Order Now'; } if (data[i].from_time == '' || data[i].from_time == null) { data[i].from_time = 'NA'; data[i].to_time = ''; } content = ' ' + data[i].name + ' Address:' + data[i].address + ',Timing:' + data[i].from_time + '-' + data[i].to_time + ' ';
tagged with: ajax
has comment: http://stackoverflow.com/comment/38220508
has comment: http://stackoverflow.com/comment/38170146
score: 0
has comment: http://stackoverflow.com/comment/38170813
answer count: 1
has comment: http://stackoverflow.com/comment/38169841
has comment: http://stackoverflow.com/comment/38220681
has comment: http://stackoverflow.com/comment/38170652
has answer: http://stackoverflow.com/a/24655887
tagged with: cordova
has comment: http://stackoverflow.com/comment/38170622
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38170097
has comment: http://stackoverflow.com/comment/38172234
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38169920
has comment: http://stackoverflow.com/comment/38168312
has comment: http://stackoverflow.com/comment/38173670
has comment: http://stackoverflow.com/comment/38172180
has comment: http://stackoverflow.com/comment/38167878
accepted answer: http://stackoverflow.com/a/24655887
type: Question
has title: Dynamic Pictures are Not Showing up
has comment: http://stackoverflow.com/comment/38217287
has comment: http://stackoverflow.com/comment/38167681
tagged with: javascript

http://stackoverflow.com/comment/38312781
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24704962
has text: Repeat after me: *eval* is *evil* :)
type: AnswerComment

http://stackoverflow.com/q/24706138
downvote count: 0
has comment: http://stackoverflow.com/comment/38315648
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24728325
favorite count: 0
has comment: http://stackoverflow.com/comment/38315090
has comment: http://stackoverflow.com/comment/38315436
has title: Turn JSON (as String) into Multidimensional Array
has comment: http://stackoverflow.com/comment/38315175
has comment: http://stackoverflow.com/comment/38315162
has comment: http://stackoverflow.com/comment/38315464
has comment: http://stackoverflow.com/comment/38315850
upvote count: 1
has answer: http://stackoverflow.com/a/24728325
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38315334
score: 1
has body: I'm trying to take a hideous JSON string - it shows up in the console like this: "[[\"a\",1],[\"b\",2],[\"c\",3],[\"d\",4]]" ... and turn it into a multidimensional array for use in Flot.js. Flot.js will take in input like this just fine: var data = [["January", 10], ["February", 8], ["March", 4], ["April", 13], ["May", 17], ["June", 9]]; But not my code ... var data = "[[\"a\",1],[\"b\",2],[\"c\",3],[\"d\",4]]"; var parsedData = JSON.parse(data); ... nor this ... var data = [\"a\",1],[\"b\",2],[\"c\",3],[\"d\",4]; var parsedData = JSON.parse(data); ... etc. What approach should I be taking?
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38315146
type: Question
has comment: http://stackoverflow.com/comment/38315216
answer count: 1
tagged with: flot

http://stackoverflow.com/comment/38224714
score: 0
type: AnswerComment
type: Comment
has text: Sorry I mean intersection, difference is the opposite
comment on: http://stackoverflow.com/a/24657817

http://stackoverflow.com/comment/124729489
type: Comment
score: 0
comment on: http://stackoverflow.com/a/67923821
type: AnswerComment
has text: Ah, the perfect solution, no extra JS. This works beautifully when your header bar is floating and so hides the entire top part of the anchored position.

http://stackoverflow.com/comment/38359245
comment on: http://stackoverflow.com/q/24728633
type: Comment
type: QuestionComment
has text: [Pssst...](http://stackoverflow.com/questions/976613/get-post-data-in-c-asp-net). Also, I like how you have named the function `httpGet` when it actually performs a _POST_.
score: 1

http://stackoverflow.com/comment/38524152
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24728955
type: Comment
has text: This may or may not help, but I have a blog post about binding to functions that return different data sets: http://codingwithspike.wordpress.com/2013/04/13/binding-kendo-listviews-to-the-result-of-a-function/ In your case, in the cases where you need to bind to a list of all skills, I would make a function on your ViewModel that returns a DataSource that iterates over the properties (skills) and returns them in a new array or DataSource.

http://stackoverflow.com/comment/68795833
has text: Hi @FrenchyNZ do you recall what the solution to this was? I think I have the same problem and can't figure it out. Thanks!
comment on: http://stackoverflow.com/q/24665155
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38150700
has text: We're looking in to that now.
comment on: http://stackoverflow.com/q/24617006
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/54478940
score: 3
downvote count: 0
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/24621940
has body: we can create a dbconnection file like dbconnection.js const MongoClient = require('mongodb').MongoClient const mongo_url = process.env.MONGO_URL; module.exports = { connect: async function(callback) { var connection; await new Promise((resolve, reject) =&gt; { MongoClient.connect(mongo_url, { useNewUrlParser: true }, (err, database) =&gt; { if (err) reject(); else { connection = database; resolve(); } }); }); return connection; } }; and then use this file in the your app like var connection = require('../dbconnection'); and then use like this inside your async function db = await connection.connect(); hope this will work

http://stackoverflow.com/a/24706279
downvote count: 0
has body: You are nearly there. Your addCondition is fine. The problem seem to be that you are confusing the classic Angular controller syntax and the newer 'controller as' syntax. Classic syntax the controller function gets the $scope as a parameter and adds members to it the controller is attached to the view with ng-controller="controllerName" members of $scope are accessible to the view transparently (no prefix) .controller('controllerName', function ($scope) { $scope.thing = 1 }) &lt;div ng-controller="controllerName"&gt;{{thing}}&lt;/div&gt; 'Controller As' Syntax the controller function does not need the $scope, instead it assigns members to this the controller is attached to the view with ng-controller="controllerName as somePrefix" members of the controller's this are accessible to the view through somePrefix.fieldName .controller('controllerName', function () { this.thing = 1 }) &lt;div ng-controller="controllerName as ctrl"&gt;{{ctrl.thing}}&lt;/div&gt; You use the classic syntax in your first two controllers but then switch to the 'controller as' syntax, which is OK but you forgot to specify the as prefix part in ng-controller="AddConditionCtrl". Don't forget to update your binding to match the prefix you choose. For example, ng-controller="AddConditionCtrl as addCondition" means you need ng-model="addCondition.condition.hcc". The Angular team recommends using the 'controller as' syntax because it makes the bindings more explicit since you can immediately see which field comes from which controller. EDIT: I assume that your form element is a descendant of an element that has either ng-controller="PatientExtConditionCtrl" or ng-controller="PatientConditionCtrl", so that the patient variable is available when the ng-submit executes addCondition(patient). EDIT: the details about both syntaxes can be found in the official documentation for the ngController directive.
answers question: http://stackoverflow.com/q/24671137
accepted answer of: http://stackoverflow.com/q/24671137
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/38319403
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/24709675
has body: I am new in javaScript. I have one textbox that i want to use like timepicker. when I run application with using Firefox working fine but not woking in crome and any other browser Javascript Code:- $("#MainContent_txtShipFrom").keyup(function () { $('#MainContent_txtShipFrom').blur(function () { var validTime = $(this).val().match(/^(0?[1-9]|1[012])(:[0-5]\d)$/); if (!validTime) { if ($(this).val() == '') $(this).css('background', 'transparent'); else $(this).css('background', '#FF0055'); } else { $(this).css('background', 'transparent'); } }); var Value = $("#MainContent_txtShipFrom").val(); if (Value.length &gt; 1 &amp;&amp; Value.length &lt; 3) { if (Value.contains(':')) { $("#MainContent_txtShipFrom").val("0" + Value); } else { $("#MainContent_txtShipFrom").val(Value + ":"); } } }); Problem ValidTime script is working perfect but Add " : " script is not working in crome
favorite count: 0
has title: JavaScript is not working in Chrome
linked to: http://stackoverflow.com/q/19196337
downvote count: 2
tagged with: google-chrome
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25032670
type: Question
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/38322004
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25032670
has comment: http://stackoverflow.com/comment/38322035
tagged with: asp.net
has comment: http://stackoverflow.com/comment/38322144
has comment: http://stackoverflow.com/comment/38322022
has comment: http://stackoverflow.com/comment/38322127

recursion
type: Tag
tags question: http://stackoverflow.com/q/24629917
tags question: http://stackoverflow.com/q/24647818
tag name: recursion
tags question: http://stackoverflow.com/q/24656845
tags question: http://stackoverflow.com/q/24665466
tags question: http://stackoverflow.com/q/24737420
tags question: http://stackoverflow.com/q/24741373
tags question: http://stackoverflow.com/q/24743815

http://stackoverflow.com/comment/38359838
comment on: http://stackoverflow.com/q/24728920
score: 0
type: QuestionComment
type: Comment
has text: @jfriend00" If, for some reason, these Ajax calls are set to be synchronous, then you need to change them to asynchronous" How do i do that, where to check?

http://stackoverflow.com/a/24686114
answers question: http://stackoverflow.com/q/24685895
score: 2
upvote count: 2
has body: 500,000 x 500,000 is 250 billion values. Each number in javascript is 8 bytes (according to a quick Google search at least). In order to just store only the numbers in memory, you'll need over 1862.65 GB of memory (not counting any of the overhead involved in having the array, the browser, the javascript engine, etc). Even server-side solutions would have issues with that much data. You should spend time re-evaluating your problem, and finding ways to reduce your data set earlier on.
downvote count: 0
type: Answer

http://stackoverflow.com/a/38481022
type: Answer
answers question: http://stackoverflow.com/q/24730217
has body: You probably have conflicts with bundles in _Layout.cshtml on the bottom of the page: @Scripts.Render("~/bundles/jquery") You can try to add fullcalendar scripts to this bundle or remove bundle or do something else
score: 0

http://stackoverflow.com/q/24634283
has body: I'm struggling to get this working but I may be going completely off track with this. I'm creating a jquery mobile webapp and I'm trying to use a variable that is declared when a popup is created, in a different on click function. The way that I thought to do this is: click here to run function LoadCancelReservationPopup and pass some id's to the JQ Cancel Run this function function LoadCancelReservationPopup(sizecode,unit) { var sizecode = (sizecode); var unit = (unit); $("#cancelReservationSizecode").html(sizecode); $("#cancelReservationUnit").html(unit); $("#reservationCancelPopup").popup("open"); $("#reservationCancelPopup").trigger('create'); }; That function opens this popup and the ids that were passed are now being displayed in the divs Cancel Reservation Are you sure you want to cancel this reservation? Yes Cancel Reservation No Return to Customer Details The problem I'm having is that when the loadCancelCustomerReservation function is called, the popups that I expected to contain the jquery variables are empty, these variables will eventually be passed to PHP via ajax but I can't figure out how I can use these variables in my 2 different functions. Is it not possible to pass jquery variables in this way? $("#loadCancelCustomerReservation").click(function(){ var sizecode = $('#cancelReservationSizecode').val(); var unit = $('#cancelReservationUnit').val(); window.alert(sizecode); window.alert(unit); });
accepted answer: http://stackoverflow.com/a/24634538
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: AnsweredQuestion
has title: Pass Jquery variable to HTML so it can be picked up in multiple functions
has answer: http://stackoverflow.com/a/24634538
type: Question
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24684793
type: Answer
answers question: http://stackoverflow.com/q/24684696
has comment: http://stackoverflow.com/comment/38279368
upvote count: 2
score: 2
has body: The .isInModalState property is actually tagged [noscript], so it is not available in Javascript, only C++. .enterModalState() doesn't do what you think it does. It does not make a window UI-modal (like an alert dialog). It just essentially suspends scripts and event processing in the window.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24684696

http://stackoverflow.com/a/52384155
answers question: http://stackoverflow.com/q/24731884
downvote count: 0
score: 1
has body: In the AMD-loader that I wrote, I simply use the following (optional) definition of require(): function require(deps, callback) { define(1, deps, callback); } Due to an implementation detail in the lockandload AMD-loader using 1 as the first argument to define() results in a functional equivalence with require(). IOW: if people want a require() it's cheap to create once you have define(). I cannot imagine the difference being much larger in other loaders. It also implies that there is no pressing need to pollute the global space with yet another function, unless you consider it improves readability of the code.
upvote count: 1
type: Answer

http://stackoverflow.com/comment/38397557
has text: As cookie monster said, if the function returns `null`, then either you are calling the function too early (doesn't seem to case here) or the element with that ID really doesn't exist. Not much else we can do about it.
comment on: http://stackoverflow.com/q/24749183
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38335967
type: AnswerComment
has text: Hi, This does't seem to help: This is how it looks like series: [{ name: 'Delivered per month', data: '7/2014',3000,'6/2014',5163,'5/2014',23882,'4/2014',26471,'3/2014',82172,'2/2014',31283,'1/2014',637400,'12/2013',86420,'11/2013',119150,'10/2013',49093, ... It doesn't get rendered.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24715477

http://stackoverflow.com/comment/38181538
type: Comment
type: QuestionComment
has text: Thanks. Without that we had no clue it was XML driven.
comment on: http://stackoverflow.com/q/24634694
score: 0

http://stackoverflow.com/comment/38107671
type: Comment
comment on: http://stackoverflow.com/q/24596316
has text: An example would be appreciated. Not very familiar with this method.
score: 0
type: QuestionComment

http://stackoverflow.com/q/24613865
has answer: http://stackoverflow.com/a/24663716
type: Question
possible better answer: http://stackoverflow.com/a/45090566
tagged with: google-apps-script
answer count: 2
has answer: http://stackoverflow.com/a/45090566
downvote count: 0
has body: I am writing a script for my company that will automatically make a copy of a file in my own drive, then transfer ownership of the copy to a list of users from a spreadsheet. The script works completely except for that the file is created in the user's "All Files" and doesn't show up in their My Drive! Transferring ownership is not the problem I'm having, the problem is the location of the transferred file in the new owner's Drive. I've tried sending it to their root folder but that didn't work, I'm not sure why? It sends it to My Drive for me, but it is copied into a folder that is already in My Drive for me (because I copy the file from a file that is in a folder in my drive already) but for anybody else on the list that the file is newly shared and transferred to, moving it to root does nothing and it remains in All Files without any labels on the file. Does anybody have an idea how to move it automatically? Here is the code that I've been using that works for my own My Drive but nobody else's on the list: //Take new file out of parent folders var folders = newDoc.getParents(); //get parents for (var j = 0; i &lt; folders.length; i++){ //loop through &amp; delete parents DocsList.getFileById(newDocId).removeFromFolder(folders[i]); //using DocsList } var root = DocsList.getRootFolder(); //Get root DocsList.getFileById(newDocId).addToFolder(root); //add to my drive edit: I was told that transferring ownership should automatically put it into the My Drive file but that isn't happening?? edit 2: I've tried using "addFile()" which SHOULD add it to My Drive folder in the user's folders, but it only adds it to the my drive of the person running the script and the rest of the users STILL get it only in their "All Items" folder. This is driving me nuts, someone please help ;C
tagged with: javascript
has comment: http://stackoverflow.com/comment/38178390
accepted answer: http://stackoverflow.com/a/24663716
score: 1
has title: Move a shared file into My Drive using Google Script?
favorite count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/38183809
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38185168

http://stackoverflow.com/a/24684863
upvote count: 1
type: Answer
has body: If i understood, you want to skip 5 on each step: var array = 'abcdefghijklmnopqrstuvwxyz'.split(''); // something that generates an array just to show an example var i = 0; for (; i &lt; array.length;) { console.log(i, array[i]); i += 5; } see fiddle
answers question: http://stackoverflow.com/q/24684746
downvote count: 0
score: 1

http://stackoverflow.com/q/24626850
tagged with: vector
has comment: http://stackoverflow.com/comment/38175242
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38167481
answer count: 0
tagged with: openlayers
tagged with: drag-and-drop
type: Question
has comment: http://stackoverflow.com/comment/38168605
has title: Drag feature openLayers
has body: I need your help to find the problem i can't drag my feauture, however i use the same code on this link http://openlayers.org/dev/examples/drag-feature.html Thank you in advance ^^, after i have to find a way when i drag my feauture to another one i have to change the icon of the first one and deplace it at the first location i mean coordinates var renderer = OpenLayers.Util.getParameters(window.location.href).renderer; renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers; vectors = new OpenLayers.Layer.Vector("Vector Layer", { renderers: renderer }); //********************************************** map.addLayer(vectors); //**************************************************************************** controls = { point: new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.Point), line: new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.Path), polygon: new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.Polygon), drag: new OpenLayers.Control.DragFeature(vectors) }; for(var key in controls) { map.addControl(controls[key]); } document.getElementById('noneToggle').checked = true; function toggleControl(element) { for(key in controls) { var control = controls[key]; if(element.value == key && element.checked) { control.activate(); } else { control.deactivate(); } } } navigate draw point draw line draw polygon drag feature
has comment: http://stackoverflow.com/comment/38175125
has comment: http://stackoverflow.com/comment/38173663
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38174107

http://stackoverflow.com/q/24691592
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38287246
upvote count: 2
type: UnansweredQuestion
tagged with: php
has title: CURL: Variables not getting sent
tagged with: curl
score: 2
has body: I am trying to convert a javascript (Node.js) script to a PHP script. // Send POST request $http({ method: 'POST', url: 'someurl', data: $.param($scope.formData), headers: {'Content-Type': 'application/x-www-form-urlencoded'} }) That is the javascript. I have tried to replicate by it by using this code $url = 'something'; $formData = array( 'code'=&gt;$var); $var = 'somethinghere'; $ch = curl_init( $url ); curl_setopt( $ch, CURLOPT_POST, 1); curl_setopt( $ch, CURLOPT_POSTFIELDS, $formData); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt( $ch, CURLOPT_HEADER, 'Content-type: application/x-www-form-urlencoded'); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec( $ch ); echo $response; However, it doesn't work. It doesn't display the data i wanted. It is an external php file (Not hosted by me), i don't understand what i'm doing wrong.
type: Question
has comment: http://stackoverflow.com/comment/38289971
tagged with: javascript
has answer: http://stackoverflow.com/a/24691723
has comment: http://stackoverflow.com/comment/38287232
has comment: http://stackoverflow.com/comment/38287325

http://stackoverflow.com/comment/38340216
has text: np, I was going to suggest taking a different approach mentioned below with $q.all but I didn't want to add more complexity until you had figured out the callback errors. G'luck.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24705741
score: 0

http://stackoverflow.com/comment/38230394
type: Comment
has text: That does make sense. Though I was under the impression that the page ran top to bottom, in the order that it was seen, but everything was asynchronous. I've avoided putting scripts at the bottom because I was taught that it is hit or miss. For instance, if you have a lot of HTML, it might not all finish rendering by the time it gets to the javascript, and that can cause issues. This is why I was taught to wrap all of my JS in the `$(document).ready` function. So that is not true?
type: AnswerComment
comment on: http://stackoverflow.com/a/24659776
score: 0

http://stackoverflow.com/a/24730530
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24719184
type: Answer
accepted answer of: http://stackoverflow.com/q/24719184
score: 1
has body: The image is not loading because the url to the image is i.imgur.com/kMT4mOH.png. So the page is searching for the file on locally. ie. http://fiddle.jshell.net/VsWb9/2331/show/i.imgur.com/kMT4mOH.png. To get the file from its external location you would use http://i.imgur.com/kMT4mOH.png, but you then get the problem of cross domain restrictions on webgl textures, so this will also not work also. I don't see any problem with your code so if you run it from a server where the texture image and the image file are both on the same server, it should work. Read more about cross domain webgl images at: http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html There seems there may be a work around if you really need it to work in a jsfiddle, it is outlined on this other stackoverflow question: cross-domain image for three.js (canvas/webGL), proxy?

http://stackoverflow.com/q/24685895
tagged with: performance
has answer: http://stackoverflow.com/a/24686117
has comment: http://stackoverflow.com/comment/38277014
has answer: http://stackoverflow.com/a/24686144
has comment: http://stackoverflow.com/comment/38277259
tagged with: javascript
has comment: http://stackoverflow.com/comment/38277080
has comment: http://stackoverflow.com/comment/38301543
has comment: http://stackoverflow.com/comment/38276995
upvote count: 1
tagged with: arrays
favorite count: 0
has comment: http://stackoverflow.com/comment/38277191
answer count: 5
has answer: http://stackoverflow.com/a/24699297
has comment: http://stackoverflow.com/comment/38277181
has answer: http://stackoverflow.com/a/24685957
has comment: http://stackoverflow.com/comment/38277290
downvote count: 0
type: UnansweredQuestion
score: 1
has body: I'm trying to construct such array ( Matrix ): var arr = []; var matrix_size = 100000; var start_time = Math.round(new Date().getTime()) / 1000.0; for( var i = 0; i &lt; matrix_size ; i++ ) { var row = []; for( var j = 0; j &lt; matrix_size; j++ ) { row.push( 0 ); } arr.push( row ); if ( counter % 10 == 0 ) { var stop_time = Math.round(new Date().getTime()) / 1000.0; var speed_time = stop_time - start_time; var speed = i / speed_time; // m / s var remain = matrix_size - i; var remain_time = remain / speed; console.log("Ready: " + i + " rows; remain: " + remain + "; speed: " + speed + "; remain_time: " + remain_time + "s."); } } var stop_time = Math.round(new Date().getTime()) / 1000.0; var speed_time = stop_time - start_time; console.log( "Time: " + speed_time + " s. "); matrix_size 1000 - 0.1700000762939453 seconds matrix_size 10000 - 8.978000164031982 seconds matrix_size 100000 - stuck Ready: 1020 rows; remain: 98980; speed: 40.255742648097055; remain_time: 2458.7796296605875s. Is it really such large? What is the right math for power of browser in such case? Actually, me needs 500,000 x 500,000 array. Not with just zeros, but real float values. Am I need to use server side in this situation?
has title: Javascript array 100000 x 100000 - kill my browser
type: Question
has answer: http://stackoverflow.com/a/24686114

http://stackoverflow.com/q/24616719
tagged with: kendo-ui
upvote count: 1
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38147876
has title: Kendo UI for loop in grid column template causing infinite loop
favorite count: 0
has answer: http://stackoverflow.com/a/26485271
type: UnansweredQuestion
tagged with: kendo-asp.net-mvc
has body: I have a ajax bound Kendo UI grid where I am building a select list in a client template using code like- &lt;select name='@propertyName' required='@required'&gt; # for (var t = 0, length = 7; t &lt; length; t++) { console.log(t); } #&lt;/select&gt; This is obviously not the finished template, but a stripped down test case to bug fix an apparent infinite loop when rendering the grip which is causing the browser tab to crash (and/or be caught and stopped by the tab manager - depending on the browser used). The value of "t" as shown in the console will continue to increment indefinitely, even with a hardcoded length value as shown here. The string is assigned as a C# string to the ColumnSettings ClientTemplate string property within a BoundColumnContainer (as we need to order the grid columns based on user preferences). It is intact (with the ++ in place) after assignment and at the point the method exits (returning a Kendo UI GridBuilder object). The issue appears to be that the plus plus operator is being stripped out on the client when the template is decoded, leaving the code- &lt;select name='TemplateId'&gt; # for (var t = 0, length = 7; t &lt; length; t ) { console.log(t); } #&lt;/select&gt; This was extracted from the column object using the Firefox dev tools after stopping the script when it stopped responding (failed to exit from the loop in a timely manner). Clearly the missing plus symbols are not incrementing the variable, and this is going to result in the loop never exiting, which is consistent with what is happening here. The encoded template is as follows in the Fiddler trace- {"title":"Template","width":"166px","template":"\u003cselect name=\u0027TemplateId\u0027\u003e# for (var t = 0, length = 7; t \u003c length; t ) { console.log(t); } #\u003c/select\u003e", "field":"TemplateId","filterable":{},"encoded":true} Note that the ++ is already missing here. Can anyone suggest how I can include the ++ in the template without it being removed in the encodin…
score: 1
type: Question
tagged with: asp.net-mvc-5
tagged with: kendo-grid
tagged with: javascript

http://stackoverflow.com/q/24658332
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24694810
favorite count: 0
type: AnsweredQuestion
has title: Highcharts Custom display of tooltips, based on data series values
upvote count: 3
type: Question
score: 3
has answer: http://stackoverflow.com/a/24694810
answer count: 1
tagged with: highcharts
has body: I could explain better if you can focus on the image attached here: Can the hover line height be shown only up to the max line height (Please see the image below) I do not want to show the hover values for first and last week. (I mean on hover of 'week 0', I do not want to show the hover boxes, same as for 'week 7') Can I set the floor and ceiling for the each series data, Some thing like series: [{ name: 'CPM', data: [5,524,4,1,4,1,3,20,3], color: 'rgb(87, 188, 0)' //floor: 5, //ceiling: 524, },{ ....} }] Is there any such floor/min and max/ceil for the each data set. Such that the other two series data gets visible in the chart. please refer this fiddle How to show All Data Series Fiddle jsfiddle.net/4vzEt/21/
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/38358593
type: Comment
has text: at onChange -- if I call it at onClick it just opens a new window (with the correct text added to it) but it is not embedded(parsed?) into the newWindow I have already made.
comment on: http://stackoverflow.com/q/24728499
score: 0
type: QuestionComment

http://stackoverflow.com/a/24732706
score: 2
upvote count: 2
has body: Not from within JavaScript. The language provides no tools to directly manage memory. Memory management is the responsibility the runtime environment. Some environments may provide you with some of that information to help with debugging / performance optimisation. Chrome Developer Tools, for example, has a Heap Snapshot feature in the profiles tab.
downvote count: 0
answers question: http://stackoverflow.com/q/24732659
type: Answer

http://stackoverflow.com/q/24713272
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38328959
has answer: http://stackoverflow.com/a/24714141
tagged with: ajax
answer count: 3
has comment: http://stackoverflow.com/comment/38329057
downvote count: 0
has comment: http://stackoverflow.com/comment/38329176
has answer: http://stackoverflow.com/a/24715799
favorite count: 0
has title: Assigning Code to a specific button
has body: I have three forms on a page with submit buttons in each, there is a code which is suppose to changes the value of a button in a particular form when clicked but when i click on that submit button all the values in the various forms buttons changes, but i want to change the value based on the form i click &lt;script language="javascript"&gt; /** * Disable submit button */ $(function(){ $('input:submit').click(function(){ $(this).val('Request Placed...'); $(this).attr('disabled', 'disabled'); $(this).parents('form').submit(); }); }); $(window).load(function(){ $('input:submit').removeAttr('disabled'); }); &lt;/script&gt;
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38329429
score: 3
has comment: http://stackoverflow.com/comment/38329569
has comment: http://stackoverflow.com/comment/38329018
upvote count: 3
accepted answer: http://stackoverflow.com/a/24715799
has comment: http://stackoverflow.com/comment/38328844
type: Question
possible better answer: http://stackoverflow.com/a/24714094
has comment: http://stackoverflow.com/comment/38329245
has answer: http://stackoverflow.com/a/24714094

http://stackoverflow.com/q/24729175
has title: Issue when creating cross-domain SignalR connection
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24777375
type: AnsweredQuestion
has body: I have sites on 2 domains: a.com b.com b.com hosts the SignalR Hub, and a.com tries to create a connection to b.com. client JS: var connection = $.hubConnection('http://b.com/'); var notificationHubProxy = connection.createHubProxy('notificationHub'); $.connection.hub.logging = true; notificationHubProxy.client.resultReceived = function (result) { console.log(result);object. } server eventHub: public class NotificationHub : Hub { public void Hello() { Clients.All.hello(); } public string Echo() { return "Notification hub is running normally"; } } But I always get the following error on the client page: SCRIPT5007: Unable to set property 'resultReceived' of undefined or null reference. As I checked, the 'notificationHubProxy.client' is undefined. Where is wrong?
tagged with: signalr
accepted answer: http://stackoverflow.com/a/24777375
type: Question
tagged with: signalr.client

http://stackoverflow.com/comment/38213290
type: QuestionComment
comment on: http://stackoverflow.com/q/24651829
score: 1
has text: Could you not just add `max-width: 100%` to the images in CSS?
type: Comment

http://stackoverflow.com/comment/38253389
type: Comment
type: QuestionComment
score: 0
has text: So you want to keep the possible uppercase characters the user has typed in the textbox and not make a simple javascript to convert them to lowercase as they are entered?
comment on: http://stackoverflow.com/q/24673504

http://stackoverflow.com/q/24722487
has comment: http://stackoverflow.com/comment/38346661
has comment: http://stackoverflow.com/comment/38346881
has answer: http://stackoverflow.com/a/24722845
has comment: http://stackoverflow.com/comment/38346562
has comment: http://stackoverflow.com/comment/38346614
has body: I am having large rails form when submit button is clicked the There should be js confirmation dialog box but in my case it is not i cant understand why ?? Fill up your academic details <%= form_for @academic, url: user_dashboard_academic_creator_path , method: :post do |f| %> <% if @academic.errors.any? %> <%= pluralize(@academic.errors.count, "error") %> prohibited this candidate from being saved: <% @academic.errors.full_messages.each do |message| %> <%= message %> <% end %> <% end %> <%= f.label :tenth_roll %> <%= f.number_field :tenth_roll %> <%= f.label :tenth_board %> <%= f.text_field :tenth_board %> <%= f.label :tenth_year_pass %> <%= f.text_field :tenth_year_pass %> <%= f.label :tenth_marks_percent %> <%= f.number_field :tenth_marks_percent %> <%= f.label :hs_roll %> <%= f.number_field :hs_roll %> <%= f.label :hs_board %> <%= f.text_field :hs_board %> <%= f.label :hs_year_pass %> <%= f.text_field :hs_year_pass %> <%= f.label :hs_marks_percent %> <%= f.number_field :hs_marks_percent %> <%= f.label "Stream" %> <%= select("academic", "subject_streams_id", SubjectStream.all.collect {|c| [c.subject_stream, c.id]}) %> 12th/Higher Secondary Subjects Subject 1 - 8 compulsory <%= f.label "Subject 1" %> <%= f.text_field :sub1 , class: "sub-input" %> <%= f.label "Subject 1 Marks" %> <%= f.number_field :sub1_marks , class: "sub-input" %> <%= f.label "Subject 2" %> <%= f.text_field :sub2 , class: "sub-input" %> <%= f.label "Subject 2 Marks" %> <%= f.number_field :sub2_marks , class: "sub-input" %> <%= f.label "Subject 3" %> <%= f.text_field :sub3 , class: "sub-input" %> <%= f.label "Subject 3 Marks" %> <%= f.number_field :sub3_marks , class: "sub-input" %> <%= f.label "Subject 4" %> <%= f.text_field :sub4 , class: "sub-input" %> <%= f.label "Subject 4 Marks" %> <%= f.number_field :sub4_marks , class: "sub-input" %> <%= f.label "Subject 5" %> <%= f.text_field :sub5 , class: "sub-input" %> <%= f.label "Subject 5 Marks" %> <%= f.number_field :sub5_marks , class: "sub-input…
tagged with: ruby-on-rails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38347003
has comment: http://stackoverflow.com/comment/38346990
accepted answer: http://stackoverflow.com/a/24722845
type: Question
linked to: http://stackoverflow.com/q/15771582
tagged with: javascript
score: 0
has title: Confirm dialog not working in rails from
answer count: 1
has comment: http://stackoverflow.com/comment/38346609

http://stackoverflow.com/q/24691909
tagged with: parse-platform
type: UnansweredQuestion
has body: Hi all need your guys help, I building new mobile application and I have problem to send notification to my mobile app using parse using javascript. I upload below code in cloud code Parse.Cloud.define("hello", function(request, response) { Parse.Push.send({channels: [ "AppJSTest" ],data: { alert: "Quit Your Jibba Jabba"}}, { success: function() { alert: "success function"},error: function(err) { alert: "fail function"}}); response.success("Hello world!");}); Below my file in mobile application main.js: $(document).ready(function() { Parse.initialize(PARSE_APP, PARSE_JS); NoteObject = Parse.Object.extend("NoteObject"); function getNotes() { var query = new Parse.Query(NoteObject); query.find({ success:function(results) { console.dir(results); var s = ""; for(var i=0, len=results.length; i<len; i++) { var note = results[i]; s += " "; s += ""+note.get("title")+" "; s += "Written "+note.createdAt + " "; s += note.get("body"); s += " "; } $("#notes").html(s); }, error:function(error) { alert("Error when getting notes!"); } }); } $("#addNoteBtn").on("touchend", function(e) { e.preventDefault(); //Grab the note details, no real validation for now var title = $("#noteTitle").val(); var body = $("#noteBody").val(); var note = new NoteObject(); note.save({title:title, body:body}, { success:function(object) { console.log("Saved the object!"); $("#noteTitle").val(""); $("#noteBody").val(""); getNotes(); }, error:function(object,error) { console.dir(error); alert("Sorry, I couldn't save it."); } }); }); //call getNotes immediately getNotes();}); and I trigger to parse manually with below script from parse command line: curl -X POST \ -H "X-Parse-Application-Id:kNZ1hmD7KFUdf7zcKQG8t19ZPC04itHpcnIrqAqz" \ -H "X-Parse-REST-API-Key:EDrUjXegE1ec01MmlWYo4IqjrG1sphFd3Vkk8OKR" \ -H "Content-Type: application/json" \ -d '{}' \ https://api.parse.com/1/push/hello what wrong with my code?
has title: unable to send push notification to mobile-Failed connect to notification:80
has answer: http://stackoverflow.com/a/24693762
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/38191492
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24639225
has text: Send only access_token (`res.authResponse.accessToken` in your `FB.login` callback ) and get user data server-side.
score: 0

http://stackoverflow.com/q/24665011
accepted answer: http://stackoverflow.com/a/24665277
has comment: http://stackoverflow.com/comment/38238235
has title: Alternating colors not showing in web browser
possible better answer: http://stackoverflow.com/a/24665116
has body: I'm trying to create a table with alternating colors using javascript. However, I ran into some trouble. I would like to have the header black, and the rows alternate blue and gray. However, whenever I run the page in a web browser, the header is black and the rows remain white. The code does work on JSFiddle though displaying the rows with alternating colors. Here's the code I used for the alternate row colors and the JSFiddle var tblrows = document.getElementsByTagName('tr'); for(i=0;i&lt;tblrows.length;i++){ if(i%2==0) tblrows[i].style.backgroundColor = '#0000FF'; else tblrows[i].style.backgroundColor = '#C0C0C0'; }
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24665277
has comment: http://stackoverflow.com/comment/38238255
tagged with: javascript
score: -1
answer count: 2
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38238273
has comment: http://stackoverflow.com/comment/38238934
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/24665116
upvote count: 0

http://stackoverflow.com/q/24674717
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have these buttons in html: Home About Me Portofolio As you see, these buttons call functions functions: This function needs to move down and to the left, as a result, the "slideHome" function get's a extra line of code to move it back as well. The problem is, that in the "slidePorto"function, it skips the first transition, it moves, but not smoothly, so it quickly moves to the bottum, and then the transition to the left fires. Same problem for the "slideHome" function when I want to move back to top:0px; How do I get these to transitions together? Thanks in advance!
has answer: http://stackoverflow.com/a/24675913
type: Question
tagged with: css
answer count: 1
has comment: http://stackoverflow.com/comment/38256550
score: 0
accepted answer: http://stackoverflow.com/a/24675913
tagged with: transition
has title: javascript, css transition functions
has comment: http://stackoverflow.com/comment/38256328
tagged with: javascript
has comment: http://stackoverflow.com/comment/38255951

http://stackoverflow.com/comment/38149835
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24618115
has text: Thank you so much! This is exactly the kind of information I was needing!
score: 0

http://stackoverflow.com/q/24628211
answer count: 3
has body: HTML: &lt;div class="parent"&gt; &lt;div class="child"&gt;&lt;/div&gt; &lt;/div&gt; jQuery: $(".parent").on('click', callback); The problem is that depends on the styling (specifically where the mouse pointer clicks) the click event is fired on .child or .parent depending on the location of the mouse. Is there a way of getting the event always from .parent even if it was clicked on .child? How I used to solve this issue is by checking the id or class of $(event.target) and if it was not the .parent then I would do $(event.target).parent() but I need a solution that works for several scenarios rather than a fix.
score: 1
has title: How to capture jQuery event always on the parent element
accepted answer: http://stackoverflow.com/a/24628290
has comment: http://stackoverflow.com/comment/38169702
linked to: http://stackoverflow.com/q/448981
linked to: http://stackoverflow.com/q/2457246
upvote count: 1
has answer: http://stackoverflow.com/a/24628350
has comment: http://stackoverflow.com/comment/38168987
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/24628614
has answer: http://stackoverflow.com/a/24628614
has answer: http://stackoverflow.com/a/24628290
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/24639602
score: -1
has comment: http://stackoverflow.com/comment/38190888
answer count: 2
has comment: http://stackoverflow.com/comment/38190521
downvote count: 1
has comment: http://stackoverflow.com/comment/38191219
tagged with: javascript
has comment: http://stackoverflow.com/comment/38190455
has body: I have a simple function which is member of a class, ImageUtils, that loads an image: this.loadSingleImage = function( path, callbackComplete, callbackFail ) { var img = new Image(); img.src = path; img.onload = callbackComplete; img.onerror = callbackFail; return img; } I'm trying to understand how to be able to access variables outside the callback function's scope, from within the callback function. I've read up on call() and apply() but none of it is making sense to me in regards to the function above. Right now the scope of the callback function is ImageUtils. I need it to be the same scope as where I called ImageUtils.loadSingleImage(). Edit to provide additional details: Consider the following: var Image_Utils = new function() { this.loadSingleImage = function( path, callbackComplete, callbackFail ) { var img = new Image(); img.src = path; trace( ' load image: ' + path ); img.onload = callbackComplete; img.onerror = callbackFail; return img; } } var SomeOtherClass = new function() { this.init = function() { Image_Utils.loadSingleImage( 'somepath', SomeOtherClass.onImageLoaded, SomeOtherClass.onImageFailed ); } this.onImageLoaded = function() { // console.log( this ); // returns Img, not SomeOtherClass // why? } this.onImageFailed = function() { // console.log( this ); // returns Img, not SomeOtherClass // why? } }
tagged with: callback
has comment: http://stackoverflow.com/comment/38190404
has comment: http://stackoverflow.com/comment/38191232
favorite count: 0
has title: How to preserve scope of callback function in Javascript
tagged with: scope
has comment: http://stackoverflow.com/comment/38191333
has comment: http://stackoverflow.com/comment/38190602
possible better answer: http://stackoverflow.com/a/24639772
has comment: http://stackoverflow.com/comment/38191114
has answer: http://stackoverflow.com/a/24639772
has comment: http://stackoverflow.com/comment/38190485
has comment: http://stackoverflow.com/comment/38190409
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/24639769
has comment: http://stackoverflow.com/comment/38190791
has comment: http://stackoverflow.com/comment/38190518
has comment: http://stackoverflow.com/comment/38191003
type: Question
has answer: http://stackoverflow.com/a/24639769
has comment: http://stackoverflow.com/comment/38190675
has comment: http://stackoverflow.com/comment/38190550
has comment: http://stackoverflow.com/comment/38190713
has comment: http://stackoverflow.com/comment/38191148

http://stackoverflow.com/comment/56049707
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29446588
type: AnswerComment
has text: By simple code - do you mean callbacks? The asynchronous nature of your code and libraries dictates what should be used.

http://stackoverflow.com/comment/38310327
has text: You need to run a webserver to access local files. See [the wiki](https://github.com/mbostock/d3/wiki) (under "Using").
type: Comment
score: 1
comment on: http://stackoverflow.com/q/24703761
type: QuestionComment

http://stackoverflow.com/comment/38330320
score: 0
comment on: http://stackoverflow.com/a/24698841
type: AnswerComment
type: Comment
has text: PaulBinder, thanx for explaining that. I understood that all this was because of renaming elements. I decided to solve it a bit easier then you suggested: I change elements names with jquery when update partial view..

http://stackoverflow.com/q/24663694
score: 0
has title: isotope + select + filtering + search
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24664068
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm trying to get myself a selector that will work with both the search and filtering together, right now it works from the beginning if you choose the selector at start. But choose something else after and the filtering on counteries/serach will break. I also have a small problem, when I am searching at my tag TE, I will get up all tags starting with the letters TE. I just want the tags how have TE in thier name pops up and If I search for another tag like "SKATE" I only want the tags with "SKATE" in their names shows up, if it is possible. Like, Te = only stores with TE in thier tagname shows up Skate = only stores with SKATE in their tagname shows up etc.. Right know = searching on Te, Te and &amp; Skate shows up... $('select').on( 'change', function() { var filterValue = this.value; $container.isotope({ filter: filterValue }); return false; }); here is a Jsfiddle grateful for answers.
accepted answer: http://stackoverflow.com/a/24664068
linked to: http://stackoverflow.com/q/3446170

http://stackoverflow.com/comment/38125450
has text: Thank you. Well I need a way to identify the client on the server side to measure the API request. It does not necessary need to be "secure". Sorry if I mixed this up.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24605361
score: 0

http://stackoverflow.com/comment/38155976
score: 0
type: QuestionComment
has text: Any reason you would do `$("#homepage-fold").each`? It's an ID, it should just be on your page once. Even if it was a class and there were multiple elements with it, you could omit it and do `$('.myclass').css('height', $(window).height()); $(window).on('resize', ...);`.
type: Comment
comment on: http://stackoverflow.com/q/24620389

http://stackoverflow.com/comment/38331672
type: Comment
score: 0
type: AnswerComment
has text: I also forgot to update the link of fiddle... i didnt know it changes the link... my fault... AND I wrote as you did, but it still doesnt work on Y...
comment on: http://stackoverflow.com/a/24714193

http://stackoverflow.com/comment/38382527
comment on: http://stackoverflow.com/q/24741144
type: QuestionComment
type: Comment
has text: @user1305626 No, I just have it sitting in my view folder.
score: 0

http://stackoverflow.com/comment/38259537
has text: Add a leading slash to the URL, so that you have `url: '/api/JobData/GetSitesByClientId',`.
score: 3
comment on: http://stackoverflow.com/q/24676859
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38310184
type: Comment
type: QuestionComment
has text: Post the full code and make a http://www.jsfiddle.net
score: 1
comment on: http://stackoverflow.com/q/24703698

http://stackoverflow.com/q/24631337
answer count: 1
has comment: http://stackoverflow.com/comment/38174527
has title: CoffeeScript 'public' keyword not allowed
accepted answer: http://stackoverflow.com/a/24631497
tagged with: coffeescript
has body: In CoffeeScript the public keyword seems to be a reserved, why? public.foo => can't compile foo.public => foo["public"] (doesn't use regular dot syntax)
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
linked to: http://stackoverflow.com/q/18749831
has answer: http://stackoverflow.com/a/24631497

http://stackoverflow.com/comment/38091860
score: 0
type: Comment
type: QuestionComment
has text: can I ask why you're not serializing the key/values using something more standardized, like JSON?
comment on: http://stackoverflow.com/q/24588120

http://stackoverflow.com/comment/38204235
score: 0
type: Comment
type: QuestionComment
has text: If you need "*Sjax*," forgoing the asynchronous default, then you'll have to use `$.ajax({ async: false })`. `$.get()` doesn't offer a way to specify a synchronous request that blocks until the response arrives.
comment on: http://stackoverflow.com/q/24646800

http://stackoverflow.com/comment/38332326
type: Comment
type: QuestionComment
has text: ooh neat. @FelixKling I think I was getting mixed up with `$.post()`. Thanks for the clarification.
comment on: http://stackoverflow.com/q/24715051
score: 0

http://stackoverflow.com/q/24697235
accepted answer: http://stackoverflow.com/a/24697512
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/24697591
type: AnsweredQuestion
type: Question
has title: Auto-submit after switch value
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24697512
score: 0
has body: I want to auto-submit after switch value the codes look like this. Index.php Leviathan foo.php <?php if(isset($_POST['foo'])){echo $_POST['foo'];} ?> the code i want is switch value from button to input then submit. with above code it switch the value but it doesn't submit anything to foo.php. how to do this?
has comment: http://stackoverflow.com/comment/38297533
has answer: http://stackoverflow.com/a/24697583
has answer: http://stackoverflow.com/a/24697843
has comment: http://stackoverflow.com/comment/38297433
possible better answer: http://stackoverflow.com/a/24697583

http://stackoverflow.com/comment/38197877
type: Comment
type: QuestionComment
has text: is your question (a) given a string returned from mongodb how do I get the path portion of the URL or (b) how do I return only the path portion of the string from MongoDB? Or something else?
comment on: http://stackoverflow.com/q/24630313
score: 0

http://stackoverflow.com/q/24613607
has comment: http://stackoverflow.com/comment/38142838
has comment: http://stackoverflow.com/comment/38141541
type: Question
has comment: http://stackoverflow.com/comment/38141992
tagged with: javascript
has title: Use node's request to get RSS feed
score: 0
tagged with: mongodb
has comment: http://stackoverflow.com/comment/38142579
tagged with: angularjs
has body: I am currently using node's request package (https://github.com/mikeal/request) to get the http content from an iTunes App Store review link and scraping through it to get the reviews. I noticed that iTunes has an RSS feed available to get customer reviews for apps and that seems to be the more appropriate thing to use. How would one go about using request to get JSON data from an RSS feed (and possible store in MongoDB)? Are there better options like loading the RSS feed data directly into AngularJS? The problem is going to my localhost/appstore tries to redirect to an RSS feed reader. I just need to get the JSON data out of the request. Here is the snippet of code that uses request. app.get('/appstore', function(req, res) { var options = { url: 'https://itunes.apple.com/us/rss/customerreviews/id=662900426/sortBy=mostRecent/json', json: true, headers: { 'User-Agent': 'request' } }; function callback(error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { var info = JSON.parse(body); console.log(info); } } request(options, callback); });
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38142940
answer count: 0
tagged with: rss
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/38184372
has text: actually you accidentally write item-multi="item" instead of item-multi="items" (s in the end). the item is not knows at this point but the items does.
type: Comment
comment on: http://stackoverflow.com/a/24635283
score: 0
type: AnswerComment

http://stackoverflow.com/a/24840319
has comment: http://stackoverflow.com/comment/38572912
has comment: http://stackoverflow.com/comment/38629625
has comment: http://stackoverflow.com/comment/38617655
upvote count: 3
has comment: http://stackoverflow.com/comment/38629718
has body: What you want to do is entirely possible, and I don't agree with Kato that you should use a different kind of login. This is all you need: "rules": { "users": { //".write": "!data.exists()", /* Edit: removed, as it always returned false */ "$user": { ".read": "$user == auth.id", ".write": "$user == auth.id", ".validate": "newData.hasChildren(['name', 'picture'])" } } } New users can add an $user entry for themselves. No user can read from a $user other than their own. No user can write to a $user other than their own (including when they create it in the first place, which ensures valid entries). $user entries must have name and picture. (Note that I moved your validate rule.) Protip: Use the simulator in Firebase to test the security rules. It's a great and simple tool. Edit I did a test to see if you really do need a read rule to check if data exists. (Answer: you don't.) With the following security rules "test": { ".write": "!data.child(auth.id).exists()", "$user": { ".validate": "newData.hasChildren(['name', 'picture']) &amp;&amp; $user == auth.id", ".read": "$user == auth.id", ".write": "$user == auth.id" } } Tried to write a new user: Attempt to write {"name":"Beardinator","picture":"i.imgur.com/axXz9sr.jpg"} to /test/1337 with auth={"id":"1337"} /:.write: "root.child('adminPanel').child('admins').child(auth.uid).val() != null" 20:67: child() expects a string argument. =&gt; false /test:.write: "!data.child(auth.id).exists()" =&gt; true /test/1337:.validate: "newData.hasChildren(['name', 'picture']) &amp;&amp; $user == auth.id" =&gt; true /test/1337:.validate: "newData.hasChildren(['name', 'picture']) &amp;&amp; $user == auth.id" =&gt; true Write was allowed. In my test I can check whether data exists just fine without a .read rule on "users".
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38632073
answers question: http://stackoverflow.com/q/24655892
has comment: http://stackoverflow.com/comment/38645343
type: Answer
has comment: http://stackoverflow.com/comment/38573102
has comment: http://stackoverflow.com/comment/38588247
accepted answer of: http://stackoverflow.com/q/24655892

http://stackoverflow.com/comment/38097799
score: 0
has text: Are you *sure* that first request is XML? It looks more like JSON. Where exactly does the error get thrown? When constructing the data for the second request? When sending the second request? When receiving the response from the second request? What is the response? It looks like a view, what do you plan to do with the response? Currently your `success` handler does nothing.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24591175

http://stackoverflow.com/a/24734802
has comment: http://stackoverflow.com/comment/38370757
has body: If Time schedules are fixed then use this. Table-1 TimeID, Time Table-2 RoomID, ROom Table-3 ID, Date, TimeID, RoomID If Schedules are not fixed Table-1 TimeID, StartDate, EndDate, ArrivedTime, DepartureTime Table-2 RoomID, Room Table-3 ID, TImeID, RoomID Hope this will solve your problem booking-table customerno, bookingno, bookingDateStart, timeStart, timeEnd room-table RoomID, Room Relation-table RelationID, bookingno, RoomID Assuming bookingno is unique. You can get room occupied by joining (INNER JOIN) booking-table and relation-table using bookingno based on date. The remaining room will be available.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38372560
answers question: http://stackoverflow.com/q/24734737
upvote count: 1
type: Answer

http://stackoverflow.com/comment/38151816
comment on: http://stackoverflow.com/q/24600548
score: 0
has text: Most likely the time-out is in the sending of the email, a Cloud Function is limited to 15 seconds before it is killed. If the Mandrill service takes too long for some reason you will get a time-out exception.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38195384
comment on: http://stackoverflow.com/q/24641909
has text: @Adeel, I just updated my post to reflect where human_time_diff() is called. It's in the second block of code in the div class "timestamp."
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38328385
comment on: http://stackoverflow.com/q/24712887
type: Comment
type: QuestionComment
score: 1
has text: The previous fiddle that I added has some problems. Ignore that and have a look at [this one](http://codepen.io/hari_shanx/pen/maKpi). I have added the width also to a div below for reference. Keep it exactly at 768px, comment out the media query and you would see that the color is still black whereas when you include media query it becomes red.

http://stackoverflow.com/q/24597802
answer count: 1
accepted answer: http://stackoverflow.com/a/24597872
tagged with: javascript
type: AnsweredQuestion
tagged with: submit
has answer: http://stackoverflow.com/a/24597872
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has body: Why does this form not update the values that the items in my session? The session seems to keep track of the value fine, before the form tries to allow users to edit the value. Here's what I wrote out form submit: <?php if(isset($_POST['submit'])){ foreach($_POST['quantity'] as $key => $val) { if($val==0) { unset($_SESSION['Cart'][$key]); }else{ $_SESSION['Cart'][$key]['quantity']=$val; } } } ?> And here's the form: <?php $sql="SELECT * FROM products where Product_ID IN ("; foreach($_SESSION['Cart'] as $id => $value){ $sql.=$id.","; } $sql=substr($sql, 0, -1).") ORDER BY Category ASC"; $query=mysql_query($sql); $totalquantity=0; while($row=mysql_fetch_array($query)){ $subtotal=$_SESSION['Cart'][$row['Product_ID']['quantity']]['quantity']; $totalquantity+=$subtotal; ?> <?php echo $row['Name'] ?> <input = type="text" name="Quantity [<?php echo $row['Product_ID'] ?>]" size="5" value="<?php echo $_SESSION['Cart'][$row['Product_ID']['quantity']]['quantity'] ?>"/> <?php } ?> And of course, the submit button is just Update selection It looks like it should all work out properly, but it doesn't update.
score: 0
has title: Value not updating when form submitted(PHP, beginner level)
tagged with: forms

http://stackoverflow.com/a/24645411
downvote count: 0
has comment: http://stackoverflow.com/comment/38201692
score: 3
has body: http://jsfiddle.net/dwebexperts/U68ny/2/ Replace this: $(document).ready(function(){ //when the &lt;submit&gt; button is clicked $('button').click(function(){ //store the user's entry in a variable var enteredName = document.getElementById('enteredFormName').value; //update the html in the second form to show the user's entered name $('#fixedFormName').value(enteredName); }); } with this:- $(document).ready(function(){ //when the &lt;submit&gt; button is clicked $('button').click(function(){ //store the user's entry in a variable var enteredName = document.getElementById('enteredFormName').value; //OR var enteredName = $('#enteredFormName').val(); //update the html in the second form to show the user's entered name $('#fixedFormName').val(enteredName); }); }); You also have an issue at the closing of " $(document).ready(function(){ ", you are closing it with } this only whereas, it requires }); at the end.
has comment: http://stackoverflow.com/comment/38201923
upvote count: 3
answers question: http://stackoverflow.com/q/24645321
type: Answer

http://stackoverflow.com/q/24695340
has title: Worklight 6.0 Android Hybrid Application not going to the login page
answer count: 1
favorite count: 0
tagged with: cordova
upvote count: 2
type: UnansweredQuestion
tagged with: android
tagged with: ibm-mobilefirst
score: 2
has body: We have developed a hybrid application for Android using worklight 6.0. The application invokes a query for which form-based authentication is required. Device authentication and worklight authentication as well are used in application. When invoking the query, the app will call the worklight server using web service and pass the login page html as the response - This is not working in Android device since the response is not reaching the app and the app gets hung after a timeout without being able to redirect to the login page. We are using Server level authentication where the WebSphere is integrated with LDAP. The User authentication happens successfully with LDAP and the session gets authenticated. The resources are secured with predefined Worklight security tests for XSRF, Remote Disable etc. Also the resources are secured with Device Auto Provisioning and Application Authentication. Once the user gets authenticated with LDAP, the device authentication fails and the application hangs The same application is working fine in iOS. Logs 07-10 19:45:13.241: I/chromium(25549): [INFO:CONSOLE(978)] "processMessage failed: Stack: TypeError: undefined is not a function 07-10 19:45:13.241: I/chromium(25549): at invokeProcedure (file:///data/data/com.MOIKuwait/files/www/default/wlclient/js/wlclient.js:1686:23) 07-10 19:45:13.241: I/chromium(25549): at file:///data/data/com.MOIKuwait/files/www/default/js/common.js:2737:40 07-10 19:45:13.241: I/chromium(25549): at captureReturnValue (file:///data/data/com.MOIKuwait/files/www/default/wlclient/js/cordova.js:852:20) 07-10 19:45:13.241: I/chromium(25549): at Object.cordova.callbackFromNative (file:///data/data/com.MOIKuwait/files/www/default/wlclient/js/cordova.js:293:54) 07-10 19:45:13.241: I/chromium(25549): at processMessage (file:///data/data/com.MOIKuwait/files/www/default/wlclient/js/cordova.js:971:21) 07-10 19:45:13.241: I/chromium(25549): at Function.androidExec.processMessages (file:///data/data/com.MOIKuwait/files/www/…
has comment: http://stackoverflow.com/comment/39715587
has answer: http://stackoverflow.com/a/26853723
type: Question
has comment: http://stackoverflow.com/comment/39794051
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/38104698
score: 1
has text: IMHO, please don't consider `w3Schools` as a valid source.
comment on: http://stackoverflow.com/q/24594878
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24740306
type: Answer
downvote count: 0
has body: Please refer the code in the jsfiddle. JS Fiddle Example &lt;input type="button" class="button2" value="New" onClick="hideShow('new');"&gt; &lt;form action="some url" id="new" method="post" enctype="multipart/form-data" style="display:none;"&gt; &lt;input type="text" name="vm" value="5" class="button3"&gt; &lt;input type="submit" class="button2" value="Submit"&gt; &lt;/form&gt; &lt;script&gt; function hideShow(object) { element = document.getElementById(object); if (element.style.display === "none") { element.style.display = "inline-block"; } else { element.style.display = "none"; } } &lt;/script&gt; I hope it solves your problem. And if not, then please provide further details and comments for the same. Regards.
score: 1
accepted answer of: http://stackoverflow.com/q/24739722
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24739722

http://stackoverflow.com/a/24662152
has body: Building off of what Karl-André posted, you can also use a switch statement: $('td').each(function() { switch ($('td').css('background-image')) { case 'url(_layouts/images/content2_top_left.JPG)': //do something using $(this) as your object of choice break; case 'url(_layouts/images/content2_top_middle.jpg)': //do something... break; case 'url(_layouts/images/content2_top_right.JPG)': //do something... break; } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24661710

firefox
tags question: http://stackoverflow.com/q/24686443
tags question: http://stackoverflow.com/q/24670444
tags question: http://stackoverflow.com/q/24666741
tags question: http://stackoverflow.com/q/24719256
tags question: http://stackoverflow.com/q/24668363
tags question: http://stackoverflow.com/q/24643653
tags question: http://stackoverflow.com/q/24725447
tags question: http://stackoverflow.com/q/24693756
tags question: http://stackoverflow.com/q/24644595
tags question: http://stackoverflow.com/q/24640246
tags question: http://stackoverflow.com/q/24640389
tag name: firefox
tags question: http://stackoverflow.com/q/24684696
tags question: http://stackoverflow.com/q/24745095
tags question: http://stackoverflow.com/q/24682455
tags question: http://stackoverflow.com/q/24651431
tags question: http://stackoverflow.com/q/24617757
tags question: http://stackoverflow.com/q/24711069
tags question: http://stackoverflow.com/q/24728512
tags question: http://stackoverflow.com/q/24688294
tags question: http://stackoverflow.com/q/24674670
type: Tag
tags question: http://stackoverflow.com/q/24692669
tags question: http://stackoverflow.com/q/24716650
tags question: http://stackoverflow.com/q/24595198
tags question: http://stackoverflow.com/q/24632069
tags question: http://stackoverflow.com/q/24613261
tags question: http://stackoverflow.com/q/24727572
tags question: http://stackoverflow.com/q/24673612
tags question: http://stackoverflow.com/q/24733903
tags question: http://stackoverflow.com/q/24669751
tags question: http://stackoverflow.com/q/24720181
tags question: http://stackoverflow.com/q/24669558
tags question: http://stackoverflow.com/q/24695101
tags question: http://stackoverflow.com/q/24625254
tags question: http://stackoverflow.com/q/24677005
tags question: http://stackoverflow.com/q/24671390
tags question: http://stackoverflow.com/q/24680750
tags question: http://stackoverflow.com/q/24619104
tags question: http://stackoverflow.com/q/24674925
tags question: http://stackoverflow.com/q/24740773
tags question: http://stackoverflow.com/q/24607396
tags question: http://stackoverflow.com/q/24737403
tags question: http://stackoverflow.com/q/24738265
tags question: http://stackoverflow.com/q/24623500

http://stackoverflow.com/comment/38262457
comment on: http://stackoverflow.com/a/24676674
score: 0
type: AnswerComment
has text: It's very annoying. I even tried a setInterval to hide the element after a few seconds as a test and that didn't work. Total garbage!
type: Comment

http://stackoverflow.com/a/24718790
accepted answer of: http://stackoverflow.com/q/24718524
upvote count: 3
type: Answer
has body: TDD is to unit testing - unit - small methods with mocks, stubs and spies. Manipulation on the DOM should be done by methods and you want to tests those methods. Instead of testing jQuery engine selector and method 'append' call some method. In the test create spy that will be expecting that your methods was called. To check DOM manipulation you can use Jasmine jQuery matcher -https://github.com/velesin/jasmine-jquery
downvote count: 0
has comment: http://stackoverflow.com/comment/62458182
score: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24718524
has comment: http://stackoverflow.com/comment/62461891

http://stackoverflow.com/comment/38144453
has text: Good point - updated.
type: Comment
comment on: http://stackoverflow.com/a/24615356
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38116189
type: AnswerComment
has text: Well, it's your answer and needless complexity, so fair enough.
type: Comment
comment on: http://stackoverflow.com/a/24600400
score: 0

http://stackoverflow.com/comment/38367397
type: Comment
type: QuestionComment
has text: Oh yes. you might want to look into some custom scroll plugins...
comment on: http://stackoverflow.com/q/24733257
score: 0

http://stackoverflow.com/comment/108909063
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24641907
has text: It works. Thanks. It may not be a good idea, but for quick fix for footer page includes, worked great.
type: AnswerComment

http://stackoverflow.com/q/24675751
tagged with: ruby
type: UnansweredQuestion
tagged with: ruby-on-rails
downvote count: 1
has title: Using javascript method in rails
score: -1
type: Question
answer count: 2
upvote count: 0
has body: I need to call method: :delete on a custom url where I will pass a parameter id in that link_to method. My controller name is "boxelements" and controller method will be "ruin", the javascript method is "delete" It will be similar like this &lt;%= link_to image_tag('delete.png'),url,method: :delete, data: { confirm: 'Are you sure?'} %&gt; I need to define "url" variable here What should I do?
tagged with: javascript
has answer: http://stackoverflow.com/a/24675944
has answer: http://stackoverflow.com/a/24675797
favorite count: 0

http://stackoverflow.com/comment/38137703
comment on: http://stackoverflow.com/q/24611759
score: 0
type: Comment
type: QuestionComment
has text: @Popnoodles It is minified and combined with other JS files. I can see that the script works without the appended slides.

http://stackoverflow.com/q/24691981
has body: Here's the code: &lt;input type="number" value="0" id="input"&gt; &lt;script&gt; if (document.getElementById('input').value == 0) { alert('Hello, world!'); } &lt;/script&gt; DEMO And here's the JSLint error: Expected '===' and instead saw '=='. But when I listen to the advice and change == to ===, the alert stops appearing.
accepted answer: http://stackoverflow.com/a/24692014
tagged with: jslint
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38288196
has comment: http://stackoverflow.com/comment/38293626
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24692014
upvote count: 1
has comment: http://stackoverflow.com/comment/38287844
has title: Comparison with 0 and JSLint error
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38288399
score: 1
type: Question

http://stackoverflow.com/a/24696688
answers question: http://stackoverflow.com/q/24696625
score: 0
has body: Pay attention to indentation - messy indentation and formatting makes code obscure and you easily overlook a mistake, like in your case. After you format your code properly, you get: function doAlertings() { var inputlabels = $('.inputLabel').each(function(i, obj) { // do nothing }); alert(inputlabels); } So, you clearly see, you are calling the alert function just once. If your intent is to alert contents of the labels, this would be the way: function doAlertings() { var inputlabels = $('.inputLabel').each(function(i, obj) { alert( $(obj).html() ); }); }
type: Answer

http://stackoverflow.com/a/24598303
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/24598283
has comment: http://stackoverflow.com/comment/38110963
type: Answer
upvote count: 3
has body: Use this password.val().length Because at the moment, you're using length property of a jQuery Object. Which won't be the thing you're needing to be used right now.

http://stackoverflow.com/comment/38184386
has text: Also, you might try not assigning the reference element to the href, but the li container.
type: Comment
comment on: http://stackoverflow.com/a/24619912
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38150375
type: Comment
type: QuestionComment
has text: send/get when and what(a HTML-Element may not be sended via HTTP)?...
comment on: http://stackoverflow.com/q/24618319
score: 0

http://stackoverflow.com/comment/38308214
type: QuestionComment
comment on: http://stackoverflow.com/q/24702627
has text: I don't see ads on home page on my mobile phone too (not using same wi-fi), so I'm pretty sure the error does occur..
score: 0
type: Comment

http://stackoverflow.com/a/24646850
has comment: http://stackoverflow.com/comment/38204333
has body: you could do: var someContent = "this is a JS variable"; div = document.querySelector(".someContent"); div.innerHTML = window[div.className]; demo:: jsFiddle but there are better ways to do it as suggested by @dfsq Note:: usage of window[div.className] assumes the variable is in global scope
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24646740

http://stackoverflow.com/q/24608553
score: 0
type: Question
tagged with: canvas
has title: Make game canvas high res (retina)
tagged with: javascript
tagged with: retina
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: The goal is to make a game canvas high res / retina. I'm working with a software called Gamemaker and I want to make this canvas high res / retina. Though I have no real idea how to implant this. Here are two links who explain the problem very clearly http://www.smashingmagazine.com/2012/08/20/towards-retina-web/ and http://www.html5rocks.com/en/tutorials/canvas/hidpi/ This is the code the html5 page uses to launch the game: &lt;canvas id="canvas" width="640" height="480"&gt; &lt;script type="text/javascript" src="html5game/GameMaker_HTML.js?AHMYB=1445354237"&gt;&lt;/script&gt; The game's javascript file is unreadable. How do I achieve making the whole javascript canvas high res / retina?
tagged with: game-maker
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27747665

http://stackoverflow.com/q/24654704
has comment: http://stackoverflow.com/comment/38248783
tagged with: javascript
tagged with: esri
has body: I am stuck, trying to draw a simple circle buffer using ArcGIS. Here is how I set up my base map: dojo.require("esri.map"); dojo.require("esri.tasks.servicearea"); dojo.require("dijit.dijit"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri/layers/FeatureLayer"); dojo.require("esri/symbols/SimpleMarkerSymbol"); var mapLayers = new Array(); var map; var GL = null; function setMap() { function init() { require( [ "esri/map", "dojo/dom-construct", "dojo/domReady!", "esri/tasks/GeometryService" ], function ( Map, domConstruct ) { map = Map("map-canvas", { //infoWindow: popup }); map.setZoom(1); coreFunctions(); }); } dojo.ready(init); dojo.connect(map, "onClick", addCircle); } function coreFunctions() { try { addLayersToMap(); } catch (err) { console.log(err); } } function addLayersToData() { var layer = new esri.layers.ArcGISTiledMapServiceLayer("https://www.onemap.sg/ArcGIS/rest/services/BASEMAP/MapServer"); mapLayers.push(layer); var layer2 = new esri.layers.ArcGISTiledMapServiceLayer("http://www.onemap.sg/ArcGIS/rest/services/LOT_VIEW/MapServer"); mapLayers.push(layer2); layer2.hide(); } function addLayersToMap() { addLayersToData(); for (var a = 0; a &lt; mapLayers.length; a++) { map.addLayer(mapLayers[a]); } map.setZoom(1); } So here is another method where I try to draw a circle graphic on the map: function addCircle(e) { sym = new esri.symbol.SimpleFillSymbol().setColor(new dojo.Color([180, 0, 180, 1.0])); console.log("clicked the map: ", e); var pt, radius, circle, ring, pts, angle; pt = e.mapPoint; circle = new esri.geometry.Polygon(map.spatialReference); ring = []; // point that make up the circle pts = 40; // number of points on the circle angle = 360 / pts; // used to compute points on the circle for (var i = 1; i &lt;= pts; i++) { // convert angle to raidans var radians = i * angle * Math.PI / 180;; // add point to the circle ring.push([pt.x + radius * Math.cos(radians), pt.y + radius * Math.sin(ra…
score: 0
accepted answer: http://stackoverflow.com/a/24689086
tagged with: arcgis
tagged with: buffer
has comment: http://stackoverflow.com/comment/38241703
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24729945
has comment: http://stackoverflow.com/comment/38241450
has answer: http://stackoverflow.com/a/24729945
has title: ArcGIS Circle Buffer
type: Question
has comment: http://stackoverflow.com/comment/38245514
answer count: 2
has answer: http://stackoverflow.com/a/24689086
tagged with: arcgis-js-api

http://stackoverflow.com/a/24725840
answers question: http://stackoverflow.com/q/24722906
score: 0
type: Answer
has body: You are recreating the regular expression every time you do searchTerm = new RegExp(...);, so it will only ever match the last word, unless you're using the expression within the loop, which you claim you are, but it doesn't look like it. I'm still only guessing what you want, but if you want to construct a single regular expression that matches all of the words, you'll need to put all the words in one expression joined with |. Also, the flags like gi must be passed to the RegExp constructor, not the match method. var array = ['mak', 'mind', 'mass']; var searchTerm = new RegExp('\\b(' + array.join('|') + ')(e|er)?\\b', 'gi'); var match = testText.match(searchTerm);

http://stackoverflow.com/comment/38092039
type: Comment
has text: are you trying to create a new ` ` along with the contents..?
comment on: http://stackoverflow.com/q/24588153
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38117954
has text: @David Thomas: I don't believe it. Try it on a someone who doesn't know the original task.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24601683
type: AnswerComment

http://stackoverflow.com/comment/38238551
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24664832
has text: How are you running it? Do you have additional code after the query block?

http://stackoverflow.com/q/24593372
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has title: How to move scroll bar to a certain place by jQuery
has body: I have a list in item, with a scroll bar. Also there is a button. So when the button is pressed, the scroll moves to the given id to make it visible. I looked at similar solution, but could not make mine working. Here is my code: function next() { $("#example").css("background", "red"); } function goToByScroll(id) { // Reove "link" from the ID // Scroll $('ul').animate({ scrollTop: $("#" + id).offset().top() }, 'slow'); } $("button").click(function (e) { // Prevent a page reload when a link is pressed e.preventDefault(); // Call the scroll function goToByScroll("example"); }); HTML: Name1 Name2 Name3 Name4 Name5 Name6 Name7 Name8 Name9 Name10 Next http://jsfiddle.net/danials/f2UZT/ Any idea to make it working? It must work as a function, so the function value will be an id, so it moves to the element holding the id.
accepted answer: http://stackoverflow.com/a/24593401
has answer: http://stackoverflow.com/a/24593582
possible better answer: http://stackoverflow.com/a/24593582
has comment: http://stackoverflow.com/comment/38101852
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24593401
type: Question

http://stackoverflow.com/a/24626043
upvote count: 7
score: 7
downvote count: 0
has body: I wrote my own directive (plnkr): &lt;ol dnd-list="wrap.names"&gt; &lt;li ng-repeat="name in wrap.names"&gt;{{name}} is {{$index}}&lt;/li&gt; &lt;/ol&gt; // directive for a single list app.directive('dndList', function() { return function(scope, element, attrs) { // variables used for dnd var toUpdate; var startIndex = -1; // watch the model, so we always know what element // is at a specific position scope.$watch(attrs.dndList, function(value) { toUpdate = value; },true); // use jquery to make the element sortable (dnd). This is called // when the element is rendered $(element[0]).sortable({ items:'li', start:function (event, ui) { // on start we define where the item is dragged from startIndex = ($(ui.item).index()); }, stop:function (event, ui) { // on stop we determine the new index of the // item and store it there var newIndex = ($(ui.item).index()); var toMove = toUpdate[startIndex]; toUpdate.splice(startIndex,1); toUpdate.splice(newIndex,0,toMove); // we move items in the array, if we want // to trigger an update in angular use $apply() // since we're outside angulars lifecycle scope.$apply(scope.model); }, axis:'y' }) } });
type: Answer
answers question: http://stackoverflow.com/q/24624807

http://stackoverflow.com/comment/38395887
type: QuestionComment
comment on: http://stackoverflow.com/q/24744693
has text: Have a look at this post from Mike Bostock: [Let's Make a Map](http://bost.ocks.org/mike/map/). He walks you through the whole process... getting the data, using the command line tools for topojson, loading it in d3, styling the regions, adding labels, etc.
score: 0
type: Comment

http://stackoverflow.com/comment/38211438
comment on: http://stackoverflow.com/q/24650469
type: Comment
type: QuestionComment
has text: Yeah,I would like a label with an answer to be inserted between the inputs whenever I call the views object.Is this now correct? inputs[i].insertBefore(lbl) Or is my logic somehow flawed?
score: 0

http://stackoverflow.com/comment/38311859
comment on: http://stackoverflow.com/a/24704530
type: AnswerComment
has text: Can you explain the `?2:1` functionality to me. I've never used that before and just started Perl recently. Also, can I use words instead of `2:1` like `<img src="/images/icons/mail<%= @post_regular ? closed : open %>.png" />`
score: 0
type: Comment

http://stackoverflow.com/comment/38366960
comment on: http://stackoverflow.com/q/24732698
score: 0
type: QuestionComment
has text: Too broad/recommend find tool or library/no effort.
type: Comment

http://stackoverflow.com/a/24687420
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38280049
has comment: http://stackoverflow.com/comment/38279907
accepted answer of: http://stackoverflow.com/q/24687377
has comment: http://stackoverflow.com/comment/38279914
type: Answer
answers question: http://stackoverflow.com/q/24687377
has body: How about this? var string = 'Hello World today is Thursday'; string.match(/\b[A-Z]/g); // \b matches the beginning of the word // [A-Z] matches only capital letters // g makes it a greedy search that searches the entire string for all matches, rather than just first. // returns ['H','W','T'] And if you're looking to get the full word, rather than just the first letter, you can add \w+ to match all non-whitespace characters after each capital. var string = 'Hello World today is Thursday'; string.match(/\b[A-Z]\w+/g); // returns ['Hello', 'World', 'Thursday']
upvote count: 2
has comment: http://stackoverflow.com/comment/38280077
has comment: http://stackoverflow.com/comment/38279835
has comment: http://stackoverflow.com/comment/38280832
score: 2

http://stackoverflow.com/comment/38373048
comment on: http://stackoverflow.com/q/24736232
score: 0
type: Comment
type: QuestionComment
has text: And then "event is undefined". Try some debugger to fix it.

http://stackoverflow.com/q/24661030
has answer: http://stackoverflow.com/a/24661261
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/24661261
tagged with: filereader
type: AnsweredQuestion
has body: Following the code MDN for using files from web applications: function handleFiles(files) { for (var i = 0; i &lt; files.length; i++) { var file = files[i]; var imageType = /image.*/; if (!file.type.match(imageType)) { continue; } var img = document.createElement("img"); img.classList.add("obj"); img.file = file; preview.appendChild(img); // Assuming that "preview" is a the div output where the content will be displayed. var reader = new FileReader(); reader.onload = (function(aImg) { return function(e) { aImg.src = e.target.result; }; })(img); reader.readAsDataURL(file); } } focusing on this line: reader.onload = (function(aImg) { return function(e) { aImg.src = e.target.result; }; })(img); What is the reason behind the self executing function? I understand that the img is passed to the function and used inside the method of the returning function, but why do they not just reference it like so: reader.onload = function(e) { img.src = e.target.result; };
has title: Why is FileReader.onload handler set with a self executing function
score: 1
upvote count: 1
type: Question
tagged with: javascript
answer count: 1

http://stackoverflow.com/comment/38167609
type: AnswerComment
type: Comment
has text: @ParagGangil If I remember correctly, `document.body` is not yet constructed at that point..
comment on: http://stackoverflow.com/a/24627067
score: 1

http://stackoverflow.com/comment/48045603
has text: Hi @RichardB ! Were you able to embed the PDF.JS Viewer into a Durandal Widget? I have written my own PDF.JS Viewer, but in comparison to the pre-built one, it lacks quite some functionality e.g. text selection, zooming, on-resizing. So I am curious if it's even possible to embed the pre-built Viewer instead?
comment on: http://stackoverflow.com/a/24589984
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38272371
score: 0
has text: @Teemu, indeed i was a little confused by the stringify part and thought OP knows that with "data" i meant the "theReturnedData". Going to edit my answer.
type: Comment
comment on: http://stackoverflow.com/a/24683393
type: AnswerComment

http://stackoverflow.com/a/65346590
downvote count: 0
has comment: http://stackoverflow.com/comment/116593203
has comment: http://stackoverflow.com/comment/116528619
has comment: http://stackoverflow.com/comment/116528735
has body: Magic [...8337503854730415241050377135811259267835n.toString(36)] // chrome &amp; firefox let a1 = [...8337503854730415241050377135811259267835n.toString(36)]; console.log(a1); // version working on all browsers (without using BigInt) let a2 = [...[37713647386641440,2196679683172530,53605115].map(x=&gt;x.toString(36)).join``]; console.log(a2);
has comment: http://stackoverflow.com/comment/116596509
type: Answer
score: 7
upvote count: 7
answers question: http://stackoverflow.com/q/24597634

http://stackoverflow.com/comment/38353480
score: 0
type: Comment
type: QuestionComment
has text: @Emissary Underscore.js is not like jQuery, it doesn't wrap its data. It's just a bunch of convenience functions for working with native JS objects and arrays.
comment on: http://stackoverflow.com/q/24726006

font-family
tags question: http://stackoverflow.com/q/24712110
tag name: font-family
type: Tag

http://stackoverflow.com/q/24681013
answer count: 1
accepted answer: http://stackoverflow.com/a/24681014
has comment: http://stackoverflow.com/comment/38279602
has body: The question of how to make an asynchronous JSONP call has been asked a few times. In my case I require this functionality in an event queue. I'm using jQuery.bind-first in order to get my event handler to the start of the queue. I need to make a jsonp call in my handler and have the result from that call used in a subsequent user defined handler. Edit for clarity of question: How do you make an asynchronous ajax jsonp request inside an event handler, ensuring that the rest of the event queue will not be executed until the ajax request has completed? EDIT: I just found this which is nearly identical. In this method events like form submission happen because the final submit event on a form which calls the action is not in the event queue.
has comment: http://stackoverflow.com/comment/38275910
tagged with: jsonp
has title: How to make an asynchronous jsonp call in an event queue
upvote count: 0
linked to: http://stackoverflow.com/q/12978566
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24681014
type: AnsweredQuestion
score: -2
tagged with: asynchronous
favorite count: 0
type: Question
downvote count: 2

http://stackoverflow.com/comment/38142562
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24614212
has text: Also, debugging this in Firebug or similar would show you exactly what's happening.
score: 0

events
tags question: http://stackoverflow.com/q/24606002
tags question: http://stackoverflow.com/q/24701124
tags question: http://stackoverflow.com/q/24659784
tags question: http://stackoverflow.com/q/24589084
tags question: http://stackoverflow.com/q/24596499
tags question: http://stackoverflow.com/q/24687834
tags question: http://stackoverflow.com/q/24679881
tags question: http://stackoverflow.com/q/24601059
tags question: http://stackoverflow.com/q/24740433
tags question: http://stackoverflow.com/q/24686987
tag name: events
tags question: http://stackoverflow.com/q/24717529
tags question: http://stackoverflow.com/q/24653273
tags question: http://stackoverflow.com/q/24689347
tags question: http://stackoverflow.com/q/24724600
tags question: http://stackoverflow.com/q/24745231
tags question: http://stackoverflow.com/q/24622508
type: Tag
tags question: http://stackoverflow.com/q/24607730
tags question: http://stackoverflow.com/q/24717739

http://stackoverflow.com/a/24685733
has comment: http://stackoverflow.com/comment/84584467
score: 128
upvote count: 131
has comment: http://stackoverflow.com/comment/84290632
has comment: http://stackoverflow.com/comment/84590096
type: Answer
accepted answer of: http://stackoverflow.com/q/24685664
downvote count: 3
answers question: http://stackoverflow.com/q/24685664
has comment: http://stackoverflow.com/comment/38277108
has comment: http://stackoverflow.com/comment/84252701
has body: Try using ng-required="!color". This makes it so that the field is only required when the value is not set. If a value is set, then required is removed and it will pass validation. &lt;input type="radio" ng-model="color" value="red" ng-required="!color"&gt; Red &lt;br/&gt; &lt;input type="radio" ng-model="color" value="green" ng-required="!color"&gt; Green &lt;br/&gt; &lt;input type="radio" ng-model="color" value="blue" ng-required="!color"&gt; Blue &lt;br/&gt; Here is an updated plunker that demonstrates that the form now validates correctly: http://plnkr.co/edit/EdItU2IIkO1KIsC052Xx?p=preview Update e-cloud's answer is simple and doesn't require an additional directive. I suggest everyone use that method if possible. Leaving this answer here as it does provide a working solution and demonstrates the use of the ng-required directive.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/84192331

http://stackoverflow.com/q/24714227
has comment: http://stackoverflow.com/comment/38330567
has body: I have a small JS function running to change a gif on mouseover. It basically works like this: in the bottom layer there's a gif looping that is switched on mouseenter to a different one. There is another gif layered above that one, that shows the transition between those two states, wich is also switchend on mouseenter. This second gif does not loop and ends on a transparent frame, to reveal the gif underneath - sounds a bit complicated, so just have a look at my jsfiddle: http://jsfiddle.net/Njw95/ now it's working perfectly in safari and firefox, but there's a small problem with chrome: just before the upgrade animation is supposed to play, there's a millisecond of a random frame blinking. I could identify this frame to be the first frame of the "downgrade" animation. I changed th first frame of the downgrade animation to be black. Now in chrome, there's a black flash on mouseenter and mouseleave... in other browsers only on mouseleave... $(document).ready(function () { $(".col1").mouseenter(function () { $("#levelup").attr('src', 'http://studio-bonsei.de/bilder/upgrade.gif'); $("#mainpic").attr('src', 'http://studio-bonsei.de/bilder/level2.gif'); }); $(".col1").mouseleave(function () { $("#levelup").attr('src', 'http://studio-bonsei.de/bilder/downgrade_tr.gif'); $("#mainpic").attr('src', 'http://studio-bonsei.de/bilder/standard.gif'); }); });
has comment: http://stackoverflow.com/comment/38331295
has comment: http://stackoverflow.com/comment/38331373
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24715783
type: Question
upvote count: 1
answer count: 1
tagged with: css
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/24715783
has title: jQuery image swap - strange behavior in chrome
has comment: http://stackoverflow.com/comment/38331285
has comment: http://stackoverflow.com/comment/38330669
downvote count: 0
has comment: http://stackoverflow.com/comment/38331218
has comment: http://stackoverflow.com/comment/38330516
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/24611727
upvote count: 5
tagged with: bootstrap-tabs
tagged with: http://stackoverflow.com/tag/html
has title: Remove data-toggle attribute when disabled
has answer: http://stackoverflow.com/a/24611820
has comment: http://stackoverflow.com/comment/38137353
accepted answer: http://stackoverflow.com/a/24611820
has answer: http://stackoverflow.com/a/24611859
type: AnsweredQuestion
downvote count: 0
tagged with: twitter-bootstrap
type: Question
has comment: http://stackoverflow.com/comment/38163232
has comment: http://stackoverflow.com/comment/38141804
possible better answer: http://stackoverflow.com/a/24611859
answer count: 2
score: 5
has body: I have a list of tabs with elements that can be disabled - i.e. non-clickable. And when 'disabled' is added as a class, then the mouse over on the element is indicating that the tab is non-clickable. Unfortunately the element is clickable. I am trying to remove the datatoggle="tab" from the element when the element is disabled, but my jQuery skills aren't sufficient. I have a ul of class="nav nav-tabs" with id="myTabs" And I'm trying to remove the data-toggle attribute with this jQuery statement: $('#myTabs a').is('.disabled').removeAttr('data-toggle'); Bootply example
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/38381103
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24740668
has text: if it's already checked and you click on it there is no change. Also user not likely to click on it either for same reason.
score: 0

http://stackoverflow.com/a/24718615
score: 1
has comment: http://stackoverflow.com/comment/38339304
downvote count: 0
has body: How about: $scope.value = _.pluck(items, 'id').join(','); &lt;input value="value"&gt;
type: Answer
answers question: http://stackoverflow.com/q/24718592
has comment: http://stackoverflow.com/comment/38339267
upvote count: 1
has comment: http://stackoverflow.com/comment/38339754

http://stackoverflow.com/comment/38167808
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24626929
type: AnswerComment
has text: how to set value for selectedDoctor?

http://stackoverflow.com/comment/38337213
type: Comment
comment on: http://stackoverflow.com/a/24707611
score: 0
type: AnswerComment
has text: One issue I had with your answer, I receive an error with the .error portion of the resultsPromise above. The error states "Object doesn't support property or method 'error' ". I resolved this with: .then(function(data){ // success logic }, function (error) { // handle the error $log.error = error; });

indy
type: Tag
tags question: http://stackoverflow.com/q/24694019
tag name: indy

http://stackoverflow.com/comment/54644950
has text: @GabrielHautclocq how would I access this from my route? appreciate it!
type: Comment
comment on: http://stackoverflow.com/a/28325154
score: 2
type: AnswerComment

http://stackoverflow.com/comment/38284966
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24690203
has text: @nightingalez: Why not use React, angluar, knockout.js, prototype.js, or any other of these kind of libraries? These "why not use jQuery" comments don't add any value to figuring out the problem.
type: Comment

http://stackoverflow.com/comment/38454781
comment on: http://stackoverflow.com/a/24761492
score: 0
type: AnswerComment
has text: actually the functionality is i want to upload image in canvas with dragable and resizable text in canvas and canvas should be resize according to image size
type: Comment

http://stackoverflow.com/comment/64527832
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27623682
has text: Another thing to note is that this doesn't fix the issue where one wants to bind on the `$touched` or `$dirty` property of `ng-model`, but there is a workaround (at least for `$dirty`) where `ng-form` can be nested and referred to. See similar question here - http://stackoverflow.com/questions/22181462/angularjs-radio-buttons-not-marked-dirty-until-last-button-selected

http://stackoverflow.com/a/24709517
answers question: http://stackoverflow.com/q/24709487
score: 2
accepted answer of: http://stackoverflow.com/q/24709487
has body: Try this out: $(document).ready(function() { $("#screenAsLayer").show(); $("#screenAsLayer_content").show(); }); Working Fiddle
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38321769
upvote count: 2
type: Answer

http://stackoverflow.com/q/24730923
score: -2
type: Question
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38363260
has answer: http://stackoverflow.com/a/24731039
upvote count: 0
accepted answer: http://stackoverflow.com/a/24731039
has body: I am working on image directory in PHP , and i need image's height width in PHP to use in HTML, I try using javascript but it not give actual value of height width of image. Give me alternate solution of this in php or in javascript.
has title: PHP : get height width of all image in directory
downvote count: 2
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/comment/42391915
comment on: http://stackoverflow.com/q/24604966
score: 0
has text: Sorry brother but I'm still waiting for the answer.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24642398
tagged with: paypal
has title: How to use PayPal Payment Buttons JavaScript API?
score: 2
type: Question
has answer: http://stackoverflow.com/a/25460880
has body: I'd like to use paypal.button.create from the JavaScript API of PayPal Payment Buttons. I'm wondering if there is a file on paypalobjects.com where I can access the API? It doesn't seem to be part of www.paypalobjects.com/js/external/paypal-button.min.js or www.paypalobjects.com/js/external/paypal-button-minicart.min.js. Baring that any info on how I can go about using paypal.button.create would be appreciated. I'm a JavaScript newb.
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/24642469
tagged with: java
tagged with: flexjson
has answer: http://stackoverflow.com/a/24671780
type: Question
has body: I have successfully created a: Gridx using JSONStore Server-side paging using 'Range : items=0-99' header Server-side sorting using 'sort(+name)' ... but after much effort and searching I haven't been able to setup the Filterbar module to perform Server-side filtering. I have used 'filterSetupQuery' to pull information out of JSON (on the client) and append to the get URL for very basic filters, but with complicated filters it seems to make more sense to process the JSON in the Java based controller on the server. What would this Java class and FlexJson deserializer even look like? Does someone have a reference implementation of Server-side filtering, or even an example to show how to deserialize this object in Java? Here is a simple JSON object that is sent back to the controller: { "op":"and", "data":[{ "op":"or", "data":[{"op":"contain","data":[{"op":"string","data":"1","isCol":true}, {"op":"string","data":"john"}]}, {"op":"contain","data":[{"op":"string","data":"2","isCol":true}, {"op":"string","data":"john"}]}, {"op":"contain","data":[{"op":"string","data":"3","isCol":true}, {"op":"string","data":"john"}]}, {"op":"contain","data":[{"op":"string","data":"4","isCol":true}, {"op":"string","data":"john"}]} ]}]} Any help is greatly appreciated! Thank you Chris
has title: Gridx Server-side filtering - reference? example?
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: spring
tagged with: dojo.gridx

http://stackoverflow.com/comment/38341684
has text: `with` is a nightmare. don't use it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24719843
score: 0

http://stackoverflow.com/q/24596606
type: Question
score: 0
has answer: http://stackoverflow.com/a/24596668
answer count: 3
has answer: http://stackoverflow.com/a/24596627
has body: I created a JavaScript function to knock out items in an array and return the final item. However this is actually removing items from the main array when it shouldn't be. Function: function oneRemaining(arr) { tmp = arr; while (tmp.length &gt; 1) { tmp.splice(~~(Math.random() * tmp.length), 1); } return tmp[0]; } So after running this, the array that went in should still be the same because it was never altered however when I run this in console, only 1 item is in it. Why does the input array get altered?
has comment: http://stackoverflow.com/comment/38107931
tagged with: javascript
type: UnansweredQuestion
has title: Unexpected result from array.splice
has comment: http://stackoverflow.com/comment/38107878
tagged with: arrays
has answer: http://stackoverflow.com/a/24596632

http://stackoverflow.com/q/24588516
answer count: 2
has comment: http://stackoverflow.com/comment/38092200
favorite count: 0
accepted answer: http://stackoverflow.com/a/24588613
has body: I am having problem how to use regex and it's been half day searching the commands, I hope anyone can help me with this issue. the string: ProductTable ChairStyleNewproductLocationUnited Kingdom What I want is, get the words: Table Chair, Newproduct and the last is United Kingdom. FYI there are few spaces in the string. Thank you
tagged with: regex
has title: Find 3 words from a string
type: AnsweredQuestion
upvote count: 1
possible better answer: http://stackoverflow.com/a/24588617
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24588617
has comment: http://stackoverflow.com/comment/38092724
has comment: http://stackoverflow.com/comment/38092304
has comment: http://stackoverflow.com/comment/38092941
tagged with: javascript
has answer: http://stackoverflow.com/a/24588613
score: 0

http://stackoverflow.com/q/24666758
has body: Currently I have an array using an increasing index: var idx = 1; var a = []; a[idx++] = "apple"; a[idx++] = "orange"; ... console.log(a[2]); And only accessing it by [], not using array specific functions, like length, indexOf, ... Apparently following is also working in this case: var a = {}; So, which one should I prefer in such case? For example any performance difference between them?
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/38241893
upvote count: 8
has comment: http://stackoverflow.com/comment/38241939
type: Question
has title: Should I use curly brackets {} or square brackets [] in this case?
has answer: http://stackoverflow.com/a/24666773
accepted answer: http://stackoverflow.com/a/24666773
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24666863
has comment: http://stackoverflow.com/comment/38241962
answer count: 2
has answer: http://stackoverflow.com/a/24666863
favorite count: 0
downvote count: 5
has comment: http://stackoverflow.com/comment/38241827
has comment: http://stackoverflow.com/comment/38241719

http://stackoverflow.com/a/24705802
answers question: http://stackoverflow.com/q/24705747
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38314412
has body: You have made a typo in your CSS selector. Just fix it by changing this: var $active = $('#cycler.active'); into the following: var $active = $('#cycler .active');

http://stackoverflow.com/a/24660537
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24656340
answers question: http://stackoverflow.com/q/24656340
has body: The issue was fixed by adding height of the grid. Once I did that filtering and sorting got fixed. Here is how my grid looks like now: var grid = Ext.create('Ext.grid.Panel', { store: store, columns: [{ text: 'Name', dataIndex: 'FullName', flex: 1, width: 440, sortable: true, filter: 'string' }, { text: 'Department', dataIndex: 'DepartmentName', flex: 1, width: 200, sortable: true, filter: 'string' }, { text: 'Direct Phone', dataIndex: 'PhoneNumber', flex: 1, width: 240, sortable: true, filter: 'string' }, { text: 'Notification Email', dataIndex: 'EmailAddr', flex: 1, sortable: true, filter: 'string' }], forceFit: true, split: true, renderTo: 'employeesSearchGrid', height: 210, frame: true, plugins: ['gridfilters'] });
type: AcceptedAnswer

http://stackoverflow.com/q/24721207
has comment: http://stackoverflow.com/comment/38344297
has body: I am trying to make an xp kind of bar with javascript and how im thinking of doing this is if the required xp number is 1000, and you start with 0 of course, i need the earned xp number (0 so far or for example you have earned 20 out of 1000) to be calculated into a percentage of the 1000 so it knows how much percent of the 1000 you have earned. not just the example 20 but every number from 0 to the required amount. Sorry this is hard to explain.
has answer: http://stackoverflow.com/a/24721277
has title: Javascript How would i get the percentage of 2 numbers?
score: 1
downvote count: 3
type: AnsweredQuestion
tagged with: math
accepted answer: http://stackoverflow.com/a/24721277
tagged with: percentage
has comment: http://stackoverflow.com/comment/38344326
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/38344289
answer count: 1
has comment: http://stackoverflow.com/comment/38344587
tagged with: javascript
has comment: http://stackoverflow.com/comment/38398007
favorite count: 0

http://stackoverflow.com/comment/38296036
has text: @Shikez, are you running it locally? from your disk and not from a web-server ?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24695458
type: Comment

http://stackoverflow.com/comment/38249388
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24671390
has text: you dont need all this code. just use jquery placeholder plugin for older ie's..
score: 0

http://stackoverflow.com/q/24682595
downvote count: 4
tagged with: algorithm
upvote count: 0
has answer: http://stackoverflow.com/a/24683374
tagged with: javascript
tagged with: jquery
tagged with: sorting
has comment: http://stackoverflow.com/comment/38284449
possible better answer: http://stackoverflow.com/a/24683374
has comment: http://stackoverflow.com/comment/38271710
favorite count: 0
has body: I am looking for a neat way to do the following but have a brain freeze: User can add (and subsequently remove) a type to a shopping basket. For each add or remove, I need to see if there is a type higher in the hierarchy that can be suggested instead. The highest type is preferable (note it has the same price as the penultimate type but b6 should be preferred over b5) Examples: 2 x type1 (100+100) -> 1 x type2 type1 + type3 (100+300) -> 1 x type4 type3 + type4 (300+400) -> 1 x type6 + 1 x type2 1 type6 + 1 type2 + 1 type1 -> 1 x type6 + 1 x type3 and so on. So if the total is 0, just add whatever is clicked. If not, see if the total plus the new click can be resolved in a better combination starting from the top. If user declines the suggestion, ignore the add. Code so far (tagged jQuery since the code is using it - map and filter are welcome) I have not posted my attempts of the recalc, since I want to avoid the X/Y problem. jsFiddle var types= { b1: {price:100,quantity:0}, b2: {price:200,quantity:0}, b3: {price:300,quantity:0}, b4: {price:400,quantity:0}, b5: {price:500,quantity:0}, b6: {price:500,quantity:0} } function getTotal() { var total = 0; $.each(types,function(typeId,type) { total+=type.quantity*type.price; }); return total } $(function() { var cont = $("#container"); $.each(types,function(typeId,type) { $(' Add to '+typeId+' 0 Remove from '+typeId+' 0 ').appendTo(cont); }); $(".add").on("click",function() { var id = this.id.replace("add",""),type=types[id]; type.quantity++; var subTotal = type.quantity*type.price; $("#"+id+"val").text(type.quantity); $("#"+id+"total").text(subTotal); $("#total").text(getTotal()); }); $(".remove").on("click",function() { var id = this.id.replace("remove",""),type=types[id]; if (type.quantity>0) type.quantity--; var subTotal = type.quantity*type.price; $("#"+id+"val").text(type.quantity); $("#"+id+"total").text(subTotal); $("#total").text(getTotal()); }); });
has answer: http://stackoverflow.com/a/24683366
score: -4
has comment: http://stackoverflow.com/comment/109805075
type: AnsweredQuestion
has title: Choose the highest combo
has comment: http://stackoverflow.com/comment/92188921
accepted answer: http://stackoverflow.com/a/24683366
type: Question
has comment: http://stackoverflow.com/comment/38270803
answer count: 2

http://stackoverflow.com/comment/38318975
has text: @Braj: the only problem with your pattern is that it will fail with a string like `" abcdefg hijklmno "` since it will match the entire string instead of ` abcdefg ` because the quantifier `*` is greedy. About, regex101 steps (or the regexbuddy steps): It is usefull to see how many steps are necessary to make your pattern succeed or fail. But keep in mind that this information is not always related to the real pattern performance. The only way to be sure is a timer.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24707168
type: Comment

http://stackoverflow.com/comment/38193176
comment on: http://stackoverflow.com/q/24639803
score: 0
type: Comment
type: QuestionComment
has text: Sorry for not displaying code but when i format it corectly it still wont allow me to post it for some reason, also the images are not important i just posted relative code.

http://stackoverflow.com/q/24679851
accepted answer: http://stackoverflow.com/a/24680656
tagged with: javascript
score: 0
has body: How can i bind new scope to the directive? For exmaple we have product catalog and if you click the product - popup will be shown. The main part is that i don't want to create 100 popups that will be hidden, and open the, by something like model.id All i want to do is to bind some model to the popup on click on the product thumb. &lt;li ng-repeat="product in products"&gt; &lt;button ng-click="openPopup(product)"&gt;&lt;/button&gt; &lt;/li&gt; // Some controller ... $scope.openPopup = function(product) { var popup = angular.element('&lt;popup product="product"&gt;&lt;/popup&gt;'); // Of course is not working because i want to bind this `product` argument $compile(popup)($scope); } Could someone tell me how to deal with it? Thanks
answer count: 1
has comment: http://stackoverflow.com/comment/38265752
tagged with: angularjs
has title: Angular bind directive scope dynamically
has comment: http://stackoverflow.com/comment/38265615
has answer: http://stackoverflow.com/a/24680656
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38266126
tagged with: angularjs-scope
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/comment/38103955
has text: Welcome to StackOverflow! Did you try checking out existing messaging systems? Google for it and learn from the existing. Try not to reinvent the wheel...
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24594500

listbox
tags question: http://stackoverflow.com/q/24666632
tag name: listbox
type: Tag

http://stackoverflow.com/comment/38282645
type: Comment
comment on: http://stackoverflow.com/a/24688599
type: AnswerComment
has text: `.then(openInNewTab())` works because `openInNewTab()` is called immediately, which is equivalent to the first working button in the demo. The question is why it doesn't work if called **later**, inside a callback, for example. This answer doesn't really answer the question.
score: 0

http://stackoverflow.com/comment/38248344
has text: @NikhilTalreja I did that but no luck
comment on: http://stackoverflow.com/q/24666893
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24693887
type: Answer
has comment: http://stackoverflow.com/comment/38293765
downvote count: 0
score: 1
has body: Ya the ternary method seems like as clean as it gets - &lt;%= foo ? foo : '' %&gt;. It's probably best to handle defaults for you missing properties like underscore with it's _.defaults().
upvote count: 1
answers question: http://stackoverflow.com/q/24692847

http://stackoverflow.com/comment/38371806
score: 0
comment on: http://stackoverflow.com/q/24691170
type: Comment
type: QuestionComment
has text: You might want to add these to your original post. Would be much more readable:)

http://stackoverflow.com/comment/39627031
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25335494
type: AnswerComment
has text: Interesting. That should sufficiently confuse developers... ;) Of course, this still means that you cannot detect resizes of the body. But at least you can think that you do.

http://stackoverflow.com/a/24618617
has comment: http://stackoverflow.com/comment/38236940
accepted answer of: http://stackoverflow.com/q/24600991
score: 2
answers question: http://stackoverflow.com/q/24600991
upvote count: 2
has comment: http://stackoverflow.com/comment/38199974
has comment: http://stackoverflow.com/comment/38237093
has body: When you start the History, make sure to pass {silent: true} as an option to let Backbone know that you've already loaded a complete page. This will prevent the router from replacing the DOM when the view is already preloaded (the first time). From the Backbone.js docs: If the server has already rendered the entire page, and you don't want the initial route to trigger when starting History, pass silent: true. So, your code should look like: Backbone.history.start({pushState: true, silent:true});
has comment: http://stackoverflow.com/comment/38153247
has comment: http://stackoverflow.com/comment/38229188
has comment: http://stackoverflow.com/comment/38235042
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38198982
has comment: http://stackoverflow.com/comment/38198339
has comment: http://stackoverflow.com/comment/38187959
type: Answer

http://stackoverflow.com/comment/38175645
type: QuestionComment
has text: *Yes, it is possible.* [**But please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained [and are officially deprecated](http://j.mp/XqV7Lp). See the [**red box**](http://j.mp/Te9zIL)? Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).
score: 1
comment on: http://stackoverflow.com/q/24631917
type: Comment

http://stackoverflow.com/comment/38342291
type: QuestionComment
has text: can you please create jsFiddle?
comment on: http://stackoverflow.com/q/24720017
score: 0
type: Comment

http://stackoverflow.com/q/24596099
tagged with: http://stackoverflow.com/tag/csv
tagged with: node.js
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has title: Where does d3.js search the files
upvote count: 1
has answer: http://stackoverflow.com/a/24597387
type: Question
has body: I'am working with node.js and d3.js. My d3.js script load a csv file. I call this d3.js script from a node.js. I don't know where d3.js search the csv file. More information about my code is: The path in the node.js program is: path /home/cloudera/proyecto/nodejs/node-v0.10.17/node_modules/ejemplos The files of this directory are: /home/cloudera/proyecto/nodejs/node-v0.10.17/node_modules/ejemplos [cloudera@localhost ejemplos]$ ls *.csv totalbicis1.csv totalbicis2.csv totalbicis.csv The code of d3.js d3.csv("totalbicis.csv", type, function(error,data) { x.domain([0, d3.max(data, function(d) {return d.value; })]); The error message in the browser is GET http://localhost:8000/totalbicis.csv 404 (Not Found) d3.v3.min.js:1 Uncaught TypeError: Cannot read property 'length' of undefined d3.v3.min.js:3 Why don't d3.js find the csv file? The server-code is var express = require('express'); var app = express(); var d3 = require('d3'); app.engine('.html', require('ejs').__express); ap p.set('views',__dirname); app.set('view engine','html'); //var fixtureData = require('./fixture_data.json'); //app.locals.barChartHelper = require('./bar_chart_helper'); app.get('/', function(req, res) { console.log('en raiz '); var absolute_path = __dirname; console.log('path '+absolute_path); res.render('grafico1'); res.end(); }); app.listen(8000); Thanks your answer
has comment: http://stackoverflow.com/comment/38107380
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/38108014
favorite count: 0

http://stackoverflow.com/comment/38153213
type: QuestionComment
score: 2
has text: All properties of the `window` object are global variables, so as such you can access them as regular variables without the `window`. However, you can define a local `document` variable that references something else, so in that case you'd need to be explicit by using `window.document`... unless of course `window` has also been redefined locally.
type: Comment
comment on: http://stackoverflow.com/q/24619764

http://stackoverflow.com/q/24713009
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38328484
score: -1
accepted answer: http://stackoverflow.com/a/24713086
type: Question
has comment: http://stackoverflow.com/comment/38328472
upvote count: 0
has comment: http://stackoverflow.com/comment/38328410
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24713086
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/1091661
has body: Is there a way I can alert if the text inside has changed? Start: Shopping bag (0) on Click Changes to Shopping bag (1) Therefore if the number inside the () has changed display alert
has comment: http://stackoverflow.com/comment/38328576
has comment: http://stackoverflow.com/comment/38328439
has comment: http://stackoverflow.com/comment/38328496
has comment: http://stackoverflow.com/comment/38328399
has title: Alert if text inside span has changed
has comment: http://stackoverflow.com/comment/38328449
downvote count: 1

http://stackoverflow.com/a/24697397
downvote count: 0
has comment: http://stackoverflow.com/comment/38403989
score: 3
has body: Your code always returns the index.html file, independent of what document the client requests. So if the client received the index.html and tries to render it, the client will detect that there is a reference to a resource scripts/script.js, and send a HTTP GET request for it to your server. But the server ignores the name of the requested resource (which is given in the RequestInfo parameter), reads the index.html file again and returns its content instead of the JavaScript file. The client expected a valid JavaScript document, and receives a HTML document instead. To fix it, check the ARequestInfo.Document property, and return the content of the requested resource.
has comment: http://stackoverflow.com/comment/38371236
has comment: http://stackoverflow.com/comment/38313813
has comment: http://stackoverflow.com/comment/38406904
has comment: http://stackoverflow.com/comment/38371079
has comment: http://stackoverflow.com/comment/38370929
answers question: http://stackoverflow.com/q/24694019
upvote count: 3
has comment: http://stackoverflow.com/comment/38370427
type: Answer

http://stackoverflow.com/comment/38241872
type: AnswerComment
has text: I don't know a hell of a lot about this stuff. But I believe that setting a cache header is about caching the content of the HTML, nothing to do with cookies/local data & whether or not your browser remembers that you are logged in (or not). If your code uses sessions at all, I think you need to look into that - not header caching.
comment on: http://stackoverflow.com/a/24644048
type: Comment
score: 0

http://stackoverflow.com/comment/38376599
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24738179
has text: @IvyLynx: In jQuery you would never iterate to connect event handlers!
score: 0

http://stackoverflow.com/a/24663315
type: Answer
has comment: http://stackoverflow.com/comment/97602938
has comment: http://stackoverflow.com/comment/45813470
has comment: http://stackoverflow.com/comment/104230135
has comment: http://stackoverflow.com/comment/84179468
has body: What's the difference? The .then() call will return a promise that will be rejected in case the callback throws an error. This means, when your success logger fails, the error would be passed to the following .catch() callback, but not to the fail callback that goes alongside success. Here's a control flow diagram: To express it in synchronous code: // some_promise_call().then(logger.log, logger.log) then: { try { var results = some_call(); } catch(e) { logger.log(e); break then; } // else logger.log(results); } The second log (which is like the first argument to .then()) will only be executed in the case that no exception happened. The labelled block and the break statement feel a bit odd, this is actually what python has try-except-else for (recommended reading!). // some_promise_call().then(logger.log).catch(logger.log) try { var results = some_call(); logger.log(results); } catch(e) { logger.log(e); } The catch logger will also handle exceptions from the success logger call. So much for the difference. I don't quite understand its explanation as for the try and catch The argument is that usually, you want to catch errors in every step of the processing and that you shouldn't use it in chains. The expectation is that you only have one final handler which handles all errors - while, when you use the "antipattern", errors in some of the then-callbacks are not handled. However, this pattern is actually very useful: When you want to handle errors that happened in exactly this step, and you want to do something entirely different when no error happened - i.e. when the error is unrecoverable. Be aware that this is branching your control flow. Of course, this is sometimes desired. What's wrong with the following? some_promise_call() .then(function(res) { logger.log(res) }, function(err) { logger.log(err) }) That you had to repeat your callback. You rather want some_promise_call() .catch(function(e) { return e; // it's OK, we'll just log it }) .done(function(res) { logge…
score: 262
downvote count: 3
has comment: http://stackoverflow.com/comment/97604039
has comment: http://stackoverflow.com/comment/45813301
answers question: http://stackoverflow.com/q/24662289
upvote count: 265

masonry
tags question: http://stackoverflow.com/q/24722202
type: Tag
tag name: masonry

http://stackoverflow.com/q/24624451
has body: I am fetching values from web service. And I have to insert those values into the table in Web SQL database. I have 4 records. I have inserted the following code into the loop, but only the last record is added in database and not the first 3 records. for(var t=0;t&lt;main_category.length;t++){ db.transaction(function(tx){ var insertStatement="INSERT INTO main_menu(catId,catName,catImage) VALUES(?,?,?)"; tx.executeSql(insertStatement, [menu_id, menu_name, menu_img]); console.log("values inserted "+ t); }); } I tried many solutions, following link has one of them, Web SQL Database + Javascript loop But, it did not work. Please suggest me how can I populate the table with dynamic values.
accepted answer: http://stackoverflow.com/a/24624521
tagged with: javascript
linked to: http://stackoverflow.com/q/4825455
has title: Adding values dynamically to the table in Web SQL database using javascript
tagged with: web-sql
has answer: http://stackoverflow.com/a/24624521
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question

http://stackoverflow.com/comment/38194160
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24640682
has text: I see. Thanks. setTimeout works OK for now. My extension needs to add tab when browser starts up, too. In this case, previous session windows have lots of tabs and windows are loading pretty late, e.g. 5 or 10 seconds. But is it safe to use setTimeout(..., 0) for the windows that have 50 tabs or so? I mean does race condition happen here?
type: AnswerComment

http://stackoverflow.com/q/24605950
answer count: 1
has title: Creating a session without using cookie
has answer: http://stackoverflow.com/a/24606545
type: UnansweredQuestion
tagged with: ruby-on-rails
has body: I want to create application similar to faebook's "like". In Facebook, once you logged in Facebook, all the website with "like" plugin can access that facebook login and fetch necessary data(e.g. you have liked or not or how many your friends/people liked that page or whatever). But, to maintain session facebook uses cookies to store session on browser. If you close/delete cookie, it won't work. Is there any technology or any approach to maintain session on server or not dependent on cookies? Thanks.
tagged with: cookies
type: Question
tagged with: jakarta-ee
tagged with: session
tagged with: javascript
score: 0

http://stackoverflow.com/a/24685086
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38277337
has comment: http://stackoverflow.com/comment/38308558
has comment: http://stackoverflow.com/comment/38276238
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24684853
answers question: http://stackoverflow.com/q/24684853
type: Answer
has body: postbacks work with .name, not id, try changing to __doPostBack(selectlist.name, ''); and see if that helps As for the warning message, you have to attach the event handler to the input elements inside the radio button list. The radio button list itself is a table of options. So off the top of my head, something like this should work $('#&lt;%=RadioButtonList1.ClientID%&gt; input').click(function(){ var $rb = $(this); if ($rb.val() == "YES"){ ... } }); EDIT: I added a code sample demonstrating a working confirm box NOT using jquery: &lt;asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"&gt; &lt;asp:listitem value="0"&gt;Yes&lt;/asp:listitem&gt; &lt;asp:listitem value="1" selected="True"&gt;No&lt;/asp:listitem&gt; &lt;/asp:RadioButtonList&gt; &lt;script&gt; (function () { //without jquery var rbl = document.getElementById('&lt;%=RadioButtonList1.ClientID%&gt;'); var chks = rbl.getElementsByTagName('input'); for (var x = 0; x &lt; chks.length; x++) { var chk = chks[x]; chk.onclick = function () { var that = this; if (that.value == "0") { //selected yes if (confirm("Are you sure?")) { //confirmed yes __doPostBack(rbl.name, ''); } else { //confirmed no } } else { //selected no } } } })(); &lt;/script&gt;

http://stackoverflow.com/comment/38396029
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24736539
type: AnswerComment
has text: Did you tried the second solutions to give box-sizing content-box to .row and .col

http://stackoverflow.com/comment/38257654
score: 0
type: AnswerComment
has text: Thank you, it worked! I don't know why I had the impression that you can only use have submit button in a form... Probably because I'm a noob :) Thanks again
comment on: http://stackoverflow.com/a/24675363
type: Comment

http://stackoverflow.com/q/24620354
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/38154568
has answer: http://stackoverflow.com/a/24620937
downvote count: 1
has answer: http://stackoverflow.com/a/24620680
has comment: http://stackoverflow.com/comment/38154527
possible better answer: http://stackoverflow.com/a/24620680
has comment: http://stackoverflow.com/comment/38154685
has comment: http://stackoverflow.com/comment/38154750
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24620937
has comment: http://stackoverflow.com/comment/38154660
has comment: http://stackoverflow.com/comment/38154474
tagged with: javascript
has comment: http://stackoverflow.com/comment/38154612
tagged with: jquery
has body: I have a PHP/Ajax function that returns a list of countries with the given characters in a textbox. Ofcourse Ajax updates this list everytime the textbox gets edited. Index.PHP calls all the other files, classes and HTML. But when the textbox gets updated, Ajax sends a POST variable to index.PHP because this is where the Search.PHP file with the class name SearchEngine gets called. But because he sends this to the index.php everything keeps getting reloaded and the HTML will be returned twice. Index.php <?php require_once("cgi_bin/connection.php"); require_once("Database_Handler.Class.php"); require_once("HTML_Page.Class.php"); require_once("search.php"); $hostname_conn = "localhost"; $database_conn = "ajax"; $username_conn = "root"; $password_conn = ""; $db = new DatabaseHandler(); $conn = $db->openConnection($hostname_conn, $username_conn, $password_conn, $database_conn); $IndexPage = new page(); echo $IndexPage->render(); $SearchEngine = new SearchEngine($conn); ?> Please ignore the poor and unsecure database connection. I am currently transforming all my code to PDO and refining it but that is for later. Search.PHP <?php class SearchEngine{ private $html; public function __construct($conn){ $this->html = ' NameReplace '; if (isset($_POST["query"])) { $search_string = $_POST['query']; } //$search_string = mysql_real_escape_string($search_string); if (strlen($search_string) >= 1 && $search_string !== ' ') { $query = 'SELECT * FROM country WHERE name LIKE "%' . $search_string . '%"'; $result = $conn->prepare($query); $result->execute(); $result_array = $result->fetchAll(); foreach ($result_array as $result) { $display_name = preg_replace("/" . $search_string . "/i", "" . $search_string . "", $result['name']); $display_url = 'sadf'; $output = str_replace('NameReplace', $display_name, $this->html); $output = str_replace('ULRReplace', $display_url, $output); echo($output); } } } } ?> And as final the Javascript $(document).ready(function() { function search() { var qu…
has comment: http://stackoverflow.com/comment/38154528
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38154601
type: Question
has comment: http://stackoverflow.com/comment/38154523
has comment: http://stackoverflow.com/comment/38154658
has title: PHP Ajax returning HTML twice
has comment: http://stackoverflow.com/comment/38154635
has comment: http://stackoverflow.com/comment/38154424
score: 0
answer count: 2

http://stackoverflow.com/q/24637070
tagged with: jquery
has comment: http://stackoverflow.com/comment/38185575
has comment: http://stackoverflow.com/comment/38185586
answer count: 2
accepted answer: http://stackoverflow.com/a/24637487
score: 1
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24637425
has answer: http://stackoverflow.com/a/24637487
has body: The following example page appends three tags based on the foo object, and when clicked, I expect them to output the values in foo. For example, clicking on the button with ID btn1, I expect to get the output Title:baz, ID:7198. However, every button press outputs Title:whizbang, ID:7119. I believe the culprit is in the event handler for the buttons ($("#btn" + i).click(function()), but I'm not sure. I've stepped through it and when clicked, the value of i is 2, no matter which button is pressed. How do I accomplish the behavior I am looking for? jQuery is not a requirement, but what I happen to be using.
type: Question
possible better answer: http://stackoverflow.com/a/24637425
downvote count: 0
has comment: http://stackoverflow.com/comment/38185880
has title: Adding event handlers to dynamically added elements
tagged with: javascript

http://stackoverflow.com/comment/38388502
has text: The code should work. What does `titleProjects();` do? Does it change the style? Have you tried removing it?
comment on: http://stackoverflow.com/q/24744178
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24694028
type: Answer
has body: Depends on how you want to display the info. You could use jQuery or some other library to dynamically update a &lt;div&gt; elements content for example. Have a look at this JSFiddle: http://jsfiddle.net/eCy58/1/
score: 0
answers question: http://stackoverflow.com/q/24693634

http://stackoverflow.com/comment/38312717
comment on: http://stackoverflow.com/q/24704940
has text: What do you mean "does not work"?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/51749160
has text: "I think it is possible to include native JS file into compiled output with TextResource." I can cofirm that: I just managed to rewrite my own code the way you proposed above, and it works.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24629783
type: AnswerComment

http://stackoverflow.com/comment/38225240
has text: thanks both, will spend some time checking links, solution works well
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24657768
type: Comment

http://stackoverflow.com/comment/38282822
has text: the code above actually has syntax errors. also chrome.tabs don't have that listener event.
type: Comment
comment on: http://stackoverflow.com/a/24688157
score: 0
type: AnswerComment

http://stackoverflow.com/q/24632474
has answer: http://stackoverflow.com/a/24641635
tagged with: node.js
type: AnsweredQuestion
has title: checking if busboy finish event has already occured or not
accepted answer: http://stackoverflow.com/a/24641635
type: Question
answer count: 1
tagged with: javascript
tagged with: express
has body: I have a form in which I am expected to do some file processing which takes some time, so I want that finish event executes only after the processing is complete, right now node is processing the file and while it is processing the file and executes commands node if finds finish event it fires it. so, how do i make sure that the finish event is fired only after processing of all files. busboy.on('file', function(fieldname, file, filename,transferEncoding,mimeType) { var fName = uuid.v4(); var fileext = filename.substr(filename.lastIndexOf('.') + 1); var filepath = path.normalize(__dirname + '/../../'); var fstream = fs.createWriteStream(filepath+'/server/uploads/'+fName+'.'+fileext); var uploadFileCompletion = file.pipe(fstream); uploadFileCompletion.on('finish',function(){ console.log('uploaded now'); var cmd = 'libreoffice --headless --convert-to pdf --outdir '+ filepath + 'server/uploads ' + filepath + 'server/uploads/' + fName + '.' + fileext; exec(cmd, function(error,stdout,stderr){ sys.puts(stdout); var encryptCmd = 'java -jar server/uploads/pdfbox-app-1.8.6.jar Encrypt -canAssemble false -canExtractContent false -canExtractForAccessibility false ' + '-canModify false -canModifyAnnotations false -canPrint false -canPrintDegraded false server/uploads/' + fName + '.' + 'pdf' + ' ' + 'server/uploads/' +fName + '.' + 'pdf'; exec(encryptCmd, function(error,stdout,stderr){ fs.unlink(filepath+'server/uploads/'+fName + '.' + fileext, function(){ console.log("removed " +filepath+'server/uploads/'+fName + '.' + fileext); actualFileName.push(filename); storedFileName.push(fName+'.'+'pdf'); }); }); }); }); }); busboy.on('field', function(fieldname, val, valTruncated,keyTruncated) { noteData = JSON.parse(val); }); busboy.on('finish',function(){ noteData.uploader = req.user.username; noteData.actualFileName = actualFileName; noteData.storedFileName = storedFileName; noteData.noteId = uuid.v4(); Campusnotes.create(noteData,function(err,note){ if(err){ res.status(400); return…
score: 0
has comment: http://stackoverflow.com/comment/38179054

http://stackoverflow.com/comment/38213249
comment on: http://stackoverflow.com/a/24651713
score: 0
type: AnswerComment
has text: TnX, but @Arvind i wanna when I scroll and Item enter too veiwPort that become visible...
type: Comment

http://stackoverflow.com/q/24677570
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38261390
has comment: http://stackoverflow.com/comment/38261633
has title: Global vars in prototypes?
linked to: http://stackoverflow.com/q/944273
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38261227
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38261923
has comment: http://stackoverflow.com/comment/38260948
has comment: http://stackoverflow.com/comment/38261454
has answer: http://stackoverflow.com/a/24677634
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38261593
has comment: http://stackoverflow.com/comment/38260989
has comment: http://stackoverflow.com/comment/38261758
upvote count: 1
has comment: http://stackoverflow.com/comment/38261581
has comment: http://stackoverflow.com/comment/38261673
has body: How can I set and access a global var in a prototype way? var app; (function(){ "use strict"; var App = function() { }; App = App; }(window)); $(function() { app = new App(); });
has comment: http://stackoverflow.com/comment/38260985
score: 0
has comment: http://stackoverflow.com/comment/38260900

http://stackoverflow.com/q/24703386
score: 0
downvote count: 1
has title: Javascript form calculations return NaN until last entry
has answer: http://stackoverflow.com/a/24703481
tagged with: nan
has comment: http://stackoverflow.com/comment/38309603
type: Question
type: AnsweredQuestion
has body: JavaScript newbie. I'm trying to create a simple calculator with displayed values that dynamically update as the user enters more info. My problem: The "rate" displayed in the green circle always displays as "NaN" until the user enters the final form value (all the values). I tried using .value, parseFloat, etc. I'd be grateful for any suggestions or corrections--I know the JS isn't very elegant (and not working well, either). JSFiddle here: http://jsfiddle.net/thinkhuman/8ftuw/ Thanks! UPDATE: A poster solved the NaN problem below, but the other half of the problem is: the "rate" value (in the green cirlce) doesn't update when the associated_costs and nonbillable values change. Any advice on that part? What's My Rate? What's My Rate? Calculate your real-world freelance rate for web design/development. Target salary (yearly): Associated costs (%): Time off (hours/year): Non-billable time (%): Desired profit (%): per hour For a detailed explanation of why calculating your real-world rate is critical, see Neil Tortorella's excellent blog post on Teamtreehouse.com. The CSS: body { /* font-family: 'Nunito', sans-serif; */ color: #384047; font-family: Arial,Helvetica, sans-serif; } .calcwrapper{ max-width: 700px; height: 250px; margin: 10px auto; padding: 10px 10px; background: #f4f7f8; border-radius: 8px; border: 2px solid black; } .entries{ max-width: 400px; padding: 10px 20px; float:left; } .ratedisplay{ background-color: #5fcf80; float: right; color: #fff; height: 150px; width: 150px; font-size: 4.0em; border: 1px solid #3ac162; margin-right: 150px; margin-bottom:30px; line-height: 30px; text-align: center; border-radius: 100%; box-shadow: 0 -5px 0 rgba(255,255,255,0.1) inset; } .ratesubtitle{ font-size: 0.4em; color: black; margin-top: 10px; } .rate{ color: #FFF; text-align: center; margin-bottom: 10px; vertical-align:middle; text-shadow: 0 3px 0 rgba(255,255,255,0.2); } .title{ margin: auto; text-align: center; } input{ display: inline-block; border: none; margin-b…
tagged with: forms
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: calculator
accepted answer: http://stackoverflow.com/a/24703481
favorite count: 0
has comment: http://stackoverflow.com/comment/38309927

http://stackoverflow.com/a/24643949
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24643759
has body: Now oacData is objects within an array within an array. That's why Chart.js can't parse your data. Just omit the brackets like: var oacData = $.each(ChartData, function(i, item) { { value: ChartData[i].totalTonne; color: "#F7464A"; highlight: "#FF5A5E"; label: ChartData[i].wasteType; } }); And you will have an array with objects.

http://stackoverflow.com/comment/38386319
score: 0
type: AnswerComment
has text: Straight to the point with simple, working solutions. Thank you very much!
type: Comment
comment on: http://stackoverflow.com/a/24743424

http://stackoverflow.com/comment/38115717
type: Comment
type: QuestionComment
has text: Haha, I recognize the fog of war codepen you borrowed some pieces of code from.
comment on: http://stackoverflow.com/q/24600164
score: 0

http://stackoverflow.com/comment/38250285
type: Comment
has text: This is an awesome answer! Thank you for the added alert. I didn't really know how to go about that part. Thanks!
score: 0
comment on: http://stackoverflow.com/a/24659450
type: AnswerComment

http://stackoverflow.com/comment/38209067
comment on: http://stackoverflow.com/a/24639901
type: AnswerComment
has text: Thanks for taking your time to help, I moved the nav outside of its wrapper and positioned it absolutely and it worked! :) Now I can de-stress haha.
score: 0
type: Comment

http://stackoverflow.com/a/24661826
has body: This should get you there as far as layout is concerned. If the images you wish to display aren't dynamic, you can use simple img tags and supply the path to your image on the server as appropriate. Suggestions Provide Suggestions for users Heading Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. View details » some text If they're dynamic, then you'll need to know Javascript, I'm afraid.
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/24661503

http://stackoverflow.com/q/24683830
has comment: http://stackoverflow.com/comment/38273781
has comment: http://stackoverflow.com/comment/38273193
has comment: http://stackoverflow.com/comment/38279712
has comment: http://stackoverflow.com/comment/38273488
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has title: Passing callback to anonymous functions
has comment: http://stackoverflow.com/comment/38273239
has body: I have been dealing with for the whole day. "sendResponse" is a callback function. Since I am dealing with ajax request, I have to use it to retreive the data after request. I just can't get it passed in side an anonymous function that handles the ajax response. What would be the solution here? runningTimeEntry: function (sendResponse) { TogglButton.ajax('/time_entries/current', { method: 'GET', onLoad: function (xhr) { var responseData = JSON.parse(xhr.responseText); sendResponse(responseData.data); // this line doesn't work } }); }, ajax: function (url, opts) { var xhr = new XMLHttpRequest(), method = opts.method || 'GET', baseUrl = opts.baseUrl || TogglButton.$newApiUrl; xhr.open(method, baseUrl + url, true); if (opts.onLoad) { xhr.addEventListener('load', function () { opts.onLoad(xhr); }); } if (TogglButton.$user) { xhr.setRequestHeader('Authorization', 'Basic ' + btoa(TogglButton.$user.api_token + ':api_token')); } xhr.send(JSON.stringify(opts.payload)); }, In short, this returns {test:"test"}: runningTimeEntry: function (sendResponse) { TogglButton.ajax('/time_entries/current', { method: 'GET', onLoad: sendResponse({ test: 'test' }); }); }, And this doesn't: runningTimeEntry: function (sendResponse) { TogglButton.ajax('/time_entries/current', { method: 'GET', onLoad: function (xhr) { sendResponse({ test: 'test' }); // this line doesn't work } }); },
answer count: 0
type: UnansweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/20077487
score: 1

http://stackoverflow.com/comment/38311285
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24701888
has text: Apply the form classes to your elements: http://getbootstrap.com/css/#forms
score: 0

http://stackoverflow.com/comment/38605123
type: Comment
has text: Thank you.I made this work and exactly this way.So thanks a lot for your tip.
comment on: http://stackoverflow.com/a/24829397
type: AnswerComment
score: 0

http://stackoverflow.com/comment/138278649
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/78308642
has text: You can use `'a'.charCodeAt(0)` instead of the "magic number" `97` or `'A'.charCodeAt(0)` for uppercase
type: Comment

http://stackoverflow.com/comment/38103551
score: 0
has text: I don't think it's possible if you don't "own" the iframe :( i.e. if it's not from the same domain: http://stackoverflow.com/questions/17142285/access-iframe-content-from-parent-jquery
comment on: http://stackoverflow.com/q/24594280
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24629814
favorite count: 0
has answer: http://stackoverflow.com/a/24629956
has comment: http://stackoverflow.com/comment/38171757
downvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38171632
score: -4
has title: how to check null json array
type: Question
tagged with: javascript
has body: I have a function function successCallback(responseObj) { //alert(JSON.stringify(responseObj)); $.each(responseObj.mname, function (i, mname) { var array=responseObj.mname[i].rname; }); here JSON.stringify(responseObj) contains json response like {"mname": [{ "mName":"abc", "url":"abc.com", "pname":[{ "mName":"abc" }], "rname":null }] } here i want to check the value of rname for null value. i tried using var array=responseObj.mname[i].rname; if( !$.isArray(array) || !array.length ) { alert("currently no referral program available from this brand "); } but its for empty value .how can i check for null value..?
upvote count: 1
has comment: http://stackoverflow.com/comment/38172321
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/24640501
tagged with: javascript
favorite count: 0
has title: Javascript document.cookie remove "name" and "value"
type: UnansweredQuestion
tagged with: session-cookies
upvote count: 1
has answer: http://stackoverflow.com/a/24641851
tagged with: cookies
score: 1
type: Question
has body: In my Javascript I have a cookie with several names and values: "Token=23432112233299; sessionuid=abce32343234" From server when I download a file a Add a Cookie so the new document cookie will look: "Token=23432112233299; sessionuid=abce32343234; fileDownload=true" How can I remove the fileDownload name and value from cookie and update document.cookie? UPDATE: This is the code I have done so far but its not working: if (document.cookie.indexOf("fileDownload=true;") != -1) { document.cookie = document.cookie.replace("fileDownload=true;", ""); } else { document.cookie = document.cookie.replace("fileDownload=true", ""); }
has comment: http://stackoverflow.com/comment/38192114
answer count: 2
has answer: http://stackoverflow.com/a/30405887
downvote count: 0

http://stackoverflow.com/a/24646649
has comment: http://stackoverflow.com/comment/38205431
accepted answer of: http://stackoverflow.com/q/24646574
answers question: http://stackoverflow.com/q/24646574
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38204110
type: Answer
has body: instead of .each() you should use $.each(): $.each(orgs.Body, function(i,el) { var new_orgs = '&lt;div&gt;' + el.itemDisplayName + '&lt;/div&gt;'; $('#response-getItemSummaries').append(new_orgs); }); Description for $.each(): A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. The $.each() function is not the same as $(selector).each(), which is used to iterate, exclusively, over a jQuery object. The $.each() function can be used to iterate over any collection, whether it is an object or an array. In the case of an array, the callback is passed an array index and a corresponding array value each time. (The value can also be accessed through the this keyword, but Javascript will always wrap the this value as an Object even if it is a simple string or number value.) The method returns its first argument, the object that was iterated. Fiddle Demo what if I wanted to use $.each() to parse nested arrays such as itemData -> accounts -> cardTransactions -> plainTextDescription form the data feed that I provided? Oh its a late reply for your comment but this is what you should do with jQuery: $.each(orgs.Body, function (i, el) { if (el.itemData.accounts !== undefined) { $.each(el.itemData.accounts, function (i, el) { if (el.cardTransactions !== undefined) { $.each(el.cardTransactions, function (i, el) { if (el.plainTextDescription !== undefined) { $('body').append(el.plainTextDescription + '&lt;br/&gt;'); } }); } }); } }); Get the plainTextDescription this way with jQuery
downvote count: 0
score: 1

http://stackoverflow.com/comment/38236877
comment on: http://stackoverflow.com/a/24664225
has text: What is "cat"? Can you explain a little bit more, what I need to do?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24712785
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24713638
tagged with: ajax
answer count: 3
favorite count: 0
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/38327947
has body: Hello Send 50 to the URL without refresh page by click above span
type: Question
has answer: http://stackoverflow.com/a/24713355
has title: Send span tag id to the URL without refresh page
downvote count: 4
has answer: http://stackoverflow.com/a/24712890

http://stackoverflow.com/q/24715102
tagged with: javascript
has comment: http://stackoverflow.com/comment/38333567
has comment: http://stackoverflow.com/comment/38334530
score: 0
has body: I have this template that initially shows: Sidebar1 - Content - Sidebar2 But when the user is in mobile view, I need to disappear the two sidebars and that this can be opened by a button, one at a time... Button1 - opens sidebar1 to the right. Button2 - opens sidebar2 to the left. Anyone know if this is possible or has it done? Code Link Link Link Link Link Link Filters Details Hello, world! This is an example to show the potential of an offcanvas layout pattern in Bootstrap. Try some responsive-range viewport sizes to see it in action. Link Link Link Link Link Link Javascript $('[data-toggle=offcanvas]').click(function () { $('.row-offcanvas').toggleClass('active'); }); $('[data-toggle=offcanvas1]').click(function () { $('.row-offcanvas').toggleClass('active'); });
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/24719504
has title: Bootstrap3: How to use two off-canvas sidebars?
has answer: http://stackoverflow.com/a/24746408
tagged with: css
accepted answer: http://stackoverflow.com/a/24746408
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/38353076
answer count: 2
possible better answer: http://stackoverflow.com/a/24719504

http://stackoverflow.com/a/24594283
has comment: http://stackoverflow.com/comment/84847635
answers question: http://stackoverflow.com/q/24592827
accepted answer of: http://stackoverflow.com/q/24592827
has comment: http://stackoverflow.com/comment/101141815
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: So if anyone is interested, this is how I have it working for now until I find a better solution. First what I did was had javascript open my window by assigning it to a variable so it had a reference name. var checkWindow = false; var fbAuthWindow; function openFBAuth(url) { fbAuthWindow=window.open(url); checkWindow = true; setTimeout(function() { checkAuthWindow('fb'); }, 1000); } That also sets a timeout to run every second while checkWindow == true to check if the window is closed. If the window is closed (my script closes the window when authentication is complete), then the page reloads ultimately setting checkWindow back to false. function checkAuthWindow(win){ if(checkWindow == true){ if(win == 'fb'){ if(fbAuthWindow.closed){ window.location.reload(); } else { setTimeout(function() { checkAuthWindow('fb'); }, 1000); } } } } It isn't the prettiest or by any means a best practice to have the checking the window every second, but for now it will work until i find a better solution.

http://stackoverflow.com/a/24651415
upvote count: 2
type: Answer
has body: cd into [PROJECT]/node_modules/assemble and run npm install resolve-dep@0.4.1 This is a temporary fix, as described here.
answers question: http://stackoverflow.com/q/24645233
score: 2
downvote count: 0

http://stackoverflow.com/q/24599308
tagged with: css
linked to: http://stackoverflow.com/q/24472909
tagged with: jssor
score: 2
type: AnsweredQuestion
has title: Scale full-width-slider till to the browsers bottom
downvote count: 0
accepted answer: http://stackoverflow.com/a/24604184
has comment: http://stackoverflow.com/comment/38122830
type: Question
has answer: http://stackoverflow.com/a/24599504
tagged with: javascript
has answer: http://stackoverflow.com/a/24604184
tagged with: jquery
has comment: http://stackoverflow.com/comment/38114060
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/24599504
tagged with: http://stackoverflow.com/tag/html
has body: I have a two body divs: The first one is for navigation and the second one is the "slider1_container" from jssor. Now my Problem is that i want to scale the "slider1_container" till to the bottom like in this question, but not in full-screen. My code is: // HTML &lt;div id="nav"&gt; &lt;div class="nav-bar"&gt; ... &lt;/div&gt; &lt;/div&gt; &lt;!-- SLIDER CODE --&gt; &lt;!-- http://www.jssor.com/demos/full-width-slider.html --&gt; &lt;div id="slider1_container"&gt; ... &lt;/div&gt; // CSS #nav { min-width: 900px; height: 100px; } ... Any advice?
favorite count: 0
linked to: http://stackoverflow.com/q/23350831
has comment: http://stackoverflow.com/comment/38112878

http://stackoverflow.com/comment/38302139
has text: i want to make my code straight-forward to minimize size html. i know i can achieve it with label element but it make the code mess. so i want to using a div directly. thank you
comment on: http://stackoverflow.com/q/24699546
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24666636
has answer: http://stackoverflow.com/a/24667108
tagged with: stylesheet
tagged with: dom
has comment: http://stackoverflow.com/comment/38242271
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24667108
has body: I'd like to add a method to a module (think web-component) that detects whether a height has been set to its root element and if not - calculates its height based on other factors. This module has some absolute positioning and other 'fancy' stuff so normal flow is out of the question. I was thinking of looping through document.styleSheets and checking for the id or class of the root element in the selectorText of each cssRule then parsing the cssText or looking for a non-empty key of 'height' inside the style object. Is there a better (or standard) way of doing this? PS - I might have just solved it while formulating the question, so if you run into the same issue - here ya go!
type: AnsweredQuestion
has title: Find out if element has a declared value
has comment: http://stackoverflow.com/comment/38241757
type: Question
tagged with: detection
score: 0
tagged with: css
answer count: 1

http://stackoverflow.com/q/24672573
score: 1
type: Question
has comment: http://stackoverflow.com/comment/38251609
tagged with: javascript
has answer: http://stackoverflow.com/a/24672665
has comment: http://stackoverflow.com/comment/38251393
upvote count: 1
answer count: 1
favorite count: 0
has body: I am writing a PhoneGap/Cordova application using JQMobile. I have a function that uses an object to push differences into an array like this: alert( JSON.stringify(allAdj) ); //{"manche":"manch", "wollte","wollt"} diffs = {}; for(key in allAdj) { diff = key.slice(allAdj[key].length); diffs.push(diff); } This works fine in this instance.so I used it again later with another function: alert( JSON.stringify(derP) ); //{"manche":"manch", "wollte","wollt"} diffs = {}; for(key in derP) { diff = key.slice(derP[key].length); alert(diff); diffs.push(diff); } But now it doesn't work! If I comment out the line "diffs.push(diff);" the diffs are alerted but if I don't comment it out only the first diff is shown and then the app stops. For Javascript/jQuery bug finding I usually use Firebug but with a PhoneGap/Cordova app that is not possible. Can anyone recommend a debugging tool for PhoneGap/Cordova?
type: UnansweredQuestion
has title: Object.push doesn't seem to work
tagged with: cordova
downvote count: 0

http://stackoverflow.com/q/24724417
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38350143
has title: PHP & Javascript event handling
tagged with: php
tagged with: css
has comment: http://stackoverflow.com/comment/38350163
has answer: http://stackoverflow.com/a/24724444
has comment: http://stackoverflow.com/comment/38351402
downvote count: 1
has comment: http://stackoverflow.com/comment/38350156
type: Question
has answer: http://stackoverflow.com/a/24724508
has body: I know that php is a server-side language. However I am confused on how to hook up a html button event to a page that uses php. I understand this will probably involve Javascript, some css and html and maybe Ajax. I've been looking at some examples but they don't explain the important pieces I am looking for. In summary I want to see the code for the click event and how php gets notified there was a click. I apologize if this is a strange question. I'm used to old application programming and I'm trying to understand some of these newer practices.
has comment: http://stackoverflow.com/comment/38350162
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
favorite count: 0
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/comment/38137665
type: AnswerComment
has text: oh, yeah that's it - didn't know that it get's passed on like that. Thanks for help!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24611958

http://stackoverflow.com/q/24624232
has comment: http://stackoverflow.com/comment/38174646
has answer: http://stackoverflow.com/a/24633312
has body: I'm having problem with my Chrome extension when I try adding cookies permission. First, the manifest file is like this "permissions": [ "cookies", "https://api.box.com/*", "https://www.box.com/api/*", "https://dl.boxcloud.com/*", "tabs", "identity", ], But when I click to the permission properties of my extension in chrome://extensions/, there is no cookies permission showing up. I'm not sure whether it is problematic or not, please help me clarify. The main problem is, when I run the code: getCookies("https://www.box.com", "tokens", function(tokens){ console.log("Token returned"); }); function getCookies(domain, name, callback) { console.log("Getting cookies..."); chrome.cookies.get({"url": domain, "name": name}, function(cookie) { if(callback){ console.log("Done getting cookies, calling back..."); callback(cookie.value); } }); } The callback function is never called, thus the Token returned message is never printed. I could see the "Done getting cookies, calling back.. message in the console. So why is this happening? Please help me resolve it...
type: AnsweredQuestion
tagged with: cookies
has comment: http://stackoverflow.com/comment/38169720
has comment: http://stackoverflow.com/comment/38169014
tagged with: google-chrome
type: Question
upvote count: 4
accepted answer: http://stackoverflow.com/a/24633312
downvote count: 0
has title: Cookies permission in Chrome extension doesn't work
tagged with: javascript
score: 4
tagged with: google-chrome-extension
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/38334020
type: Comment
comment on: http://stackoverflow.com/a/24715998
type: AnswerComment
score: 0
has text: What kind of browser do you use?

http://stackoverflow.com/comment/38363939
type: Comment
has text: well according to first requirement that OP told mine was correct then OP said that he wants to fade all once together, well its not matter who's answer is acccepted
comment on: http://stackoverflow.com/a/24722831
type: AnswerComment
score: 0

http://stackoverflow.com/comment/66663368
type: QuestionComment
comment on: http://stackoverflow.com/q/24678136
score: 0
has text: Looking this over more, I'd have to agree with @jme11 that you should just use Bootstrap tabs with nav-pills. Here's a version I styled to style the nav-pills like a button-group: http://jsfiddle.net/9H2gL/8/
type: Comment

http://stackoverflow.com/comment/38164422
type: Comment
type: QuestionComment
has text: your code works fine on firefox, http://jsbin.com/maloveqe/1/edit
comment on: http://stackoverflow.com/q/24625585
score: 1

http://stackoverflow.com/a/24673844
upvote count: 2
answers question: http://stackoverflow.com/q/24673505
accepted answer of: http://stackoverflow.com/q/24673505
has body: The computed is calculating stuff for you - you can perform some action on the write, but it isn't in itself a variable you can write to. To clear the computed, you'd have to clear the underlying data ... self.resetValueToZero = function () { for (var i = 0; i &lt; self.computedValues().length; i++) { self.computedValues()[0].value(0); } }; Fiddle Demo
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38254441

http://stackoverflow.com/comment/38343650
has text: @Dr.Molle I'm sorry but I can't understand what you exactly mean. Could you help me a bit more please? Thank you in advance.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24714071

css
tags question: http://stackoverflow.com/q/24736804
tags question: http://stackoverflow.com/q/24705717
tags question: http://stackoverflow.com/q/24661503
tags question: http://stackoverflow.com/q/24712357
tags question: http://stackoverflow.com/q/24663775
tags question: http://stackoverflow.com/q/24682119
tags question: http://stackoverflow.com/q/24626888
tags question: http://stackoverflow.com/q/24657748
tags question: http://stackoverflow.com/q/24596570
tags question: http://stackoverflow.com/q/24622286
tags question: http://stackoverflow.com/q/24670252
tags question: http://stackoverflow.com/q/24640219
tags question: http://stackoverflow.com/q/24679053
tags question: http://stackoverflow.com/q/24719807
tags question: http://stackoverflow.com/q/24705310
tags question: http://stackoverflow.com/q/24656975
tags question: http://stackoverflow.com/q/24715102
tags question: http://stackoverflow.com/q/24643526
tags question: http://stackoverflow.com/q/24738681
tags question: http://stackoverflow.com/q/24712887
tags question: http://stackoverflow.com/q/24593727
tags question: http://stackoverflow.com/q/24610170
tags question: http://stackoverflow.com/q/24630972
tags question: http://stackoverflow.com/q/24608116
tags question: http://stackoverflow.com/q/24704517
tags question: http://stackoverflow.com/q/24657569
tags question: http://stackoverflow.com/q/24612621
tags question: http://stackoverflow.com/q/24588346
tags question: http://stackoverflow.com/q/24654192
tags question: http://stackoverflow.com/q/24743660
tags question: http://stackoverflow.com/q/24723736
tags question: http://stackoverflow.com/q/24728927
tags question: http://stackoverflow.com/q/24600756
tags question: http://stackoverflow.com/q/24719721
tags question: http://stackoverflow.com/q/24739858
tags question: http://stackoverflow.com/q/24693353
tags question: http://stackoverflow.com/q/24732560
tags question: http://stackoverflow.com/q/24718435
tags question: http://stackoverflow.com/q/24701619
tags question: http://stackoverflow.com/q/24660478
tags question: http://stackoverflow.com/q/24718999
tags question: http://stackoverflow.com/q/24680291
tags question: http://stackoverflow.com/q/24666636
tags question: http://stackoverflow.com/q/24594870
tags question: http://stackoverflow.com/q/24589779
tags question: http://stackoverflow.com/q/24611662
tags question: http://stackoverflow.com/q/24735760
tags question: http://stackoverflow.com/q/24618124
tags question: http://stackoverflow.com/q/24719652
tags question: http://stackoverflow.com/q/24588194
tags question: http://stackoverflow.com/q/24740089
tags question: http://stackoverflow.com/q/24615188
tags question: http://stackoverflow.com/q/24603747
tags question: http://stackoverflow.com/q/24741502
tags question: http://stackoverflow.com/q/24689467
tags question: http://stackoverflow.com/q/24611981
tags question: http://stackoverflow.com/q/24639883
tags question: http://stackoverflow.com/q/24650295
tags question: http://stackoverflow.com/q/24596286
tags question: http://stackoverflow.com/q/24617490
tags question: http://stackoverflow.com/q/24657246
tags question: http://stackoverflow.com/q/24645145
tags question: http://stackoverflow.com/q/24604911
tags question: http://stackoverflow.com/q/24732530
tags question: http://stackoverflow.com/q/24609084
tags question: http://stackoverflow.com/q/24735722
tags question: http://stackoverflow.com/q/24708665
tags question: http://stackoverflow.com/q/24695332
tags question: http://stackoverflow.com/q/24691136
tags question: http://stackoverflow.com/q/24675616
tags question: http://stackoverflow.com/q/24715553
tags question: http://stackoverflow.com/q/24596458
tags question: http://stackoverflow.com/q/24635355
tags question: http://stackoverflow.com/q/24664954
tags question: http://stackoverflow.com/q/24613256
tags question: http://stackoverflow.com/q/24614885
tags question: http://stackoverflow.com/q/24678581
tags question: http://stackoverflow.com/q/24720638
tags question: http://stackoverflow.com/q/24748419
tags question: http://stackoverflow.com/q/24709644

http://stackoverflow.com/comment/38330167
type: QuestionComment
comment on: http://stackoverflow.com/q/24714048
score: 3
has text: [This](http://xkcd.com/221/) may be why.
type: Comment

http://stackoverflow.com/a/24615966
has comment: http://stackoverflow.com/comment/38150962
has comment: http://stackoverflow.com/comment/38148120
has comment: http://stackoverflow.com/comment/38146358
has comment: http://stackoverflow.com/comment/38146584
has comment: http://stackoverflow.com/comment/38180489
has comment: http://stackoverflow.com/comment/38179541
has comment: http://stackoverflow.com/comment/38148002
has comment: http://stackoverflow.com/comment/38146888
has comment: http://stackoverflow.com/comment/38174894
has comment: http://stackoverflow.com/comment/38179010
has comment: http://stackoverflow.com/comment/38147297
accepted answer of: http://stackoverflow.com/q/24613836
has comment: http://stackoverflow.com/comment/38183224
has comment: http://stackoverflow.com/comment/38150348
answers question: http://stackoverflow.com/q/24613836
upvote count: 5
has comment: http://stackoverflow.com/comment/38179339
score: 5
has comment: http://stackoverflow.com/comment/38148868
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38180815
has comment: http://stackoverflow.com/comment/38148492
has body: It looks like you need to add a js file to your http://66.172.12.238/ts3.php See fiddle here of your page and the example of the plugin page. You need to add this js file: &lt;script type="text/javascript" src="http://davidjbradshaw.com/iframe-resizer/js/iframeResizer.contentWindow.min.js"&gt;&lt;/script&gt; I dont know if you have any knowledge on how to load extra js files to Wordpress. If not, read here http://codex.wordpress.org/Function_Reference/wp_enqueue_script Adding js files to Wordpress I would add this to a js file on it's own to execute the resizer, I'll name it iframe.js: iFrameResize({ log : true, // Enable console logging enablePublicMethods : true, // Enable methods within iframe hosted page }); Add this to your functions.php file of your theme: function theme_name_scripts() { wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/iframeResizer.min.js ', array(), '1.0.0', true ); wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/iframe.js ', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); Make sure you add the iframeResizer.min.js and iframe.js in your themefolder/js/ folder. You can edit the iframe.js script as you dont need the extra options for the plugin!
has comment: http://stackoverflow.com/comment/38181632
type: Answer
has comment: http://stackoverflow.com/comment/38149594

http://stackoverflow.com/a/24664203
has body: var myString = "some where is something at something, I am, something " var temp = myString.replace(",","\n"); alert("Temp is: " + temp); http://jsfiddle.net/ZsQ5y/
type: Answer
answers question: http://stackoverflow.com/q/24664029
score: 0

http://stackoverflow.com/comment/38285303
comment on: http://stackoverflow.com/q/24690230
has text: For **downvote lovers**, if you are knowledgeable enough to provide a simple answer, then you should provide here that damn simple answer. Down voting only signifies your ignorance and non-acceptance of truth.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24683275
favorite count: 0
has title: Ember Data not serializing record id on save(), resulting in PUT with no id?
linked to: http://stackoverflow.com/q/25521859
has answer: http://stackoverflow.com/a/24685337
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/27076910
downvote count: 0
has answer: http://stackoverflow.com/a/27076910
has body: I have a route that creates a new record like so: App.ServicesNewRoute = Ember.Route.extend({ model : function() { return this.store.createRecord('service'); }, setupController: function(controller, model) { controller.set('model', model); }, }); Then I bind that model's properties to the route's template using {{input type="text" value=model.serviceId ... }} which works great, the model gets populated as I fill up the form. Then I save record: App.ServicesNewController = Ember.ObjectController.extend({ actions : { saveService : function() { this.get('model').save(); // =&gt; POST to '/services' } } }); Which works too. Then I click the save button again, now the save method does a PUT as expected since the model has an id set (id: 102): But then when I look at the PUT request in Dev Tools, I see that the id attribute was not serialized: As a result, a new instance is created in the backend instead of updating the existing one. Please ignore the serviceId property, it is just a regular string property unrelated to the record id which should be named just id. I don't know why the id is not being serialized... I cannot define an id property on the model of course since Ember Data will not allow it, it is implicit. So I don't know what I am missing... Any help is greatly appreciated!
type: Question
has comment: http://stackoverflow.com/comment/39877233
tagged with: ember-data
has comment: http://stackoverflow.com/comment/39876804
tagged with: javascript
has answer: http://stackoverflow.com/a/24683397
upvote count: 3
answer count: 3
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/24685337

http://stackoverflow.com/comment/38337269
type: QuestionComment
comment on: http://stackoverflow.com/q/24715213
has text: you can use the update $inc operator: db.coll.update({criteria:here},{$inc:{counter:1}}) will increment the counter by 1 if it exists and set it to 1 if it doesn't exist (i.e. increment it from implicit value of 0 when it doesn't exist). That sounds like it's sufficient for what you described and then you don't need to do any adding after the fact.
score: 0
type: Comment

http://stackoverflow.com/comment/38372045
has text: instead of creating 2 ids, you can use 1 class...
comment on: http://stackoverflow.com/q/24735760
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38108908
has text: Sorry, the .menu class in the media query what a remanent from cut and paste. Basically all it says that if the window/viewport is less than 480px, if the element's class starts with col-xs-, make it just take up the entire width of the container.
comment on: http://stackoverflow.com/a/24596847
score: 0
type: AnswerComment
type: Comment

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

http://stackoverflow.com/comment/38388079
score: 0
type: QuestionComment
type: Comment
has text: @drew_w thank you, this is a good idea and the documentation about scope is really interesting.
comment on: http://stackoverflow.com/q/24741092

http://stackoverflow.com/q/24699368
has body: By directive, I add a leading zero to an input field on blur, which makes the field valid. The problem I'm having is that the field still comes back as invalid. Something like this may work AngularJS: How do I manually set input to $valid in controller? But I would assume the form would have to be checked also. Any easy way of getting this to work? EDIT: Here is the directive .directive('leadingZero', function() { return { restrict: 'A', link : function (scope, elem, attr) { elem.bind('blur', function() { var leadingZero = parseInt(attr["leadingZero"], 10); var len = parseInt(elem[0].value.length, 10); if(len &lt; leadingZero) { while(parseInt(elem[0].value.length, 10) &lt; leadingZero) { elem[0].value = '0'+elem[0].value; }; }; }); } } }) You would use it like this : &lt;input name="month" leading-zero="2" type="text" /&gt; Which would change a "5" into "05"
has title: Check validity of input on blur (Angular)
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24699982
has answer: http://stackoverflow.com/a/24702163
has comment: http://stackoverflow.com/comment/38302060
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/15437435
tagged with: javascript
has comment: http://stackoverflow.com/comment/38302069
score: 0
tagged with: validation

http://stackoverflow.com/q/24684619
accepted answer: http://stackoverflow.com/a/24684667
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/38274673
has comment: http://stackoverflow.com/comment/38274577
score: 0
has comment: http://stackoverflow.com/comment/38274743
has body: I'm trying to create an array in Javascript with a size that is equivalent to the number of times a certain class is found in the DOM, and then iterate through it to grab the text from an input field present in that class. I can easily do this like so: var count = 0; $('.className').each(function() { count++; }); var classes = new Array(count); count = 0; $('.className input[type=text]').each(function() { classes[count++] = $(this).val(); }); This looks like a lot of code for what seems to be a relatively simple task. Is there a more efficient or less lengthy way of doing this? Thanks
has comment: http://stackoverflow.com/comment/38274582
has answer: http://stackoverflow.com/a/24684681
has title: Better way to create arrays in javascript?
answer count: 5
has answer: http://stackoverflow.com/a/24684680
has answer: http://stackoverflow.com/a/24684667
has answer: http://stackoverflow.com/a/24684682
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24684678
possible better answer: http://stackoverflow.com/a/24684680
type: Question
has comment: http://stackoverflow.com/comment/38274618

http://stackoverflow.com/a/24928933
has comment: http://stackoverflow.com/comment/38754343
has comment: http://stackoverflow.com/comment/38760588
has body: The main issue is that you are reading binary data as text. Note that the server responds with Content-Type: application/octet-stream which doesn't specify the encoding explicitly - in that case the browser will typically assume that the data is encoded in UTF-8. While the length will mostly be unchanged (bytes with values 0 to 127 are interpreted as a single character in UTF-8 and bytes with higher values will usually be replaced by the replacement character �), your binary file will certainly contain a few valid multi-byte UTF-8 sequences - and these will be combined into one character. That explains why responseText.length doesn't match the number of bytes received from the server. Now you could of course force some specific encoding using request.overrideMimeType() method, ISO 8859-1 would make sense in particular because the first 256 Unicode code points are identical with ISO 8859-1: request.overrideMimeType("application/octet-stream; charset=iso-8859-1"); That should make sure that one byte will always be interpreted as one character. Still, a better approach would be storing the server response in an ArrayBuffer which is explicitly meant to deal with binary data. var request = new XMLHttpRequest(); request.open(...); request.responseType = "arraybuffer"; request.send(); ... var array = new Uint8Array(request.response); alert("First byte has value " + array[0]); alert("Array length is " + array.length); According to MDN, responseType = "arraybuffer" is supported starting with Chrome 10, Firefox 6 and Internet Explorer 10. See also: Typed arrays. Side-note: Firefox also supports responseType = "moz-chunked-text" and responseType = "moz-chunked-arraybuffer" starting with Firefox 9 which allow receiving data in chunks without resorting to ranged requests. It seems that Chrome doesn't plan to implement it, instead they are working on implementing the Streams API. Edit: I was unable to reproduce your issue with Chrome lying to you about the response headers, at le…
downvote count: 0
answers question: http://stackoverflow.com/q/24745095
score: 6
type: Answer
has comment: http://stackoverflow.com/comment/38763217
upvote count: 6
has comment: http://stackoverflow.com/comment/38802245

http://stackoverflow.com/a/24737858
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38376001
has body: You can achieve the effect by doing the below. Effectively we have to find out what is the current item using a counter and then keep traversing through it. As an additional point, you can also avoid repetitions in the arrow boxes by assigning it a class='arrow' and providing all common properties under it. $(document).ready(function() { var i = 0; // Counter variable to keep track of the current item $("#arrow-right").on('click', function() { $(".character").eq(i).fadeOut('fast'); // Quickly fade out the current element i = i < 3 ? i + 1 : 0; // Increment counter till it reaches 3 (because element index is from 0 to 3). If it reaches 3 then we reset to 0 to loop back again. $(".character").eq(i).fadeIn('slow'); // Slowly fade in the next element. Note i here is the next element because we have already incremented the counter. }); $("#arrow-left").on('click', function() { $(".character").eq(i).fadeOut('fast'); i = i > 0 ? i - 1 : 3; // Same as for the right click except here the logic is reverse as we have to go back. $(".character").eq(i).fadeIn('slow'); }); }); #characters { width: 100%; height: 100px; position: relative; /* Need because the characters would be absolutely positioned relative to their parent box */ } .character { /* Created this class to put in all common properties to avoid repetition */ height: 50px; width: 50px; position: absolute; /* This is required because all elements have to be positioned one on top of another */ left: 50%; /* Required for positioning the boxes */ top: 50%; /* Required for positioning the boxes */ } #one { display: block; background-color: green; } #two { display: none; background-color: blue; } #three { display: none; background-color: purple; } #four { display: none; background-color: black; } .arrow { /* Common class for common properties */ height: 25px; width: 25px; display: block; background-color: black; } #arrow-left { float: left; } #arrow-right { float: right; } Fiddle Demo
answers question: http://stackoverflow.com/q/24736591
accepted answer of: http://stackoverflow.com/q/24736591
type: Answer

http://stackoverflow.com/comment/38199659
comment on: http://stackoverflow.com/a/24625419
score: 0
type: Comment
has text: Hi, when I create a new files and copy your scripts, and run the html file, the map is not working :(
type: AnswerComment

http://stackoverflow.com/a/26116857
has body: It does not need to be set, because you have defaultAllDayEventDuration option. Also forceEventDuration does not apply to all day events (see here) If you don't want end to be null, then just set it manualy.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24596587
score: 1
downvote count: 0

http://stackoverflow.com/q/24712907
has answer: http://stackoverflow.com/a/24718372
tagged with: meteor
tagged with: subscription
type: AnsweredQuestion
has body: I'm still struggling to understand how to access Meteor.users as a foreign key from another collection query. I understand that only the current user is published by default so I have a publication on the server as Meteor.publish('itemOwner', function(userId) { check(userId, String); var user = Meteor.users.find({id: userId}); return user; // return Meteor.users.find({id: userId}, { // fields: {'profile': 1} }); }); I then have a Deps.autorun on the client.. Deps.autorun(function () { var itemOwnerId = Session.get("itemOwnerID"); if (itemOwnerId) { debugger var ID = Session.get("itemOwnerID"); Meteor.subscribe('itemOwner', Session.get("itemOwnerID")); } }); I set the session ID on a modal form load, and display it in the template by calling the ownerProfile helper (or try to) Template.showQuoteModalInner.helpers({ getQuote: function () { // Get the quote ID from the session var var quote = Session.get("quoteID"); if(quote) { debugger; var ID = quote.user._id; Session.set("itemOwnerID", quote.user._id); return quote; } }, ownerProfile: function() { debugger; var quote = Session.get("quoteID"); if(quote) { var ID = quote.user._id; var theUser = Meteor.users.find({_id: quote.user._id}); return theUser; }; } }); Now, I can trace the user ID at each stage and see it getting correctly passed to the autorun and the helpers. If I stop the program at the debugger in the ownerProfile helper and in the console put in Meteor.user.fetch({_id: "the id here"}).fetch() I get the correct user back.. but, in the handler itself the Meteor.users.find returns null??? What am I missing?
accepted answer: http://stackoverflow.com/a/24718372
type: Question
has title: Meteor Users collection and Deps.autorun problems
tagged with: javascript
score: 0
answer count: 1

asynchronous
tags question: http://stackoverflow.com/q/24715509
tags question: http://stackoverflow.com/q/24619664
tags question: http://stackoverflow.com/q/24674384
tags question: http://stackoverflow.com/q/24606519
tags question: http://stackoverflow.com/q/24600526
tags question: http://stackoverflow.com/q/24681013
tags question: http://stackoverflow.com/q/24697713
type: Tag
tags question: http://stackoverflow.com/q/24645789
tags question: http://stackoverflow.com/q/24694185
tag name: asynchronous
tags question: http://stackoverflow.com/q/24616179
tags question: http://stackoverflow.com/q/24694317
tags question: http://stackoverflow.com/q/24730125
tags question: http://stackoverflow.com/q/24620480
tags question: http://stackoverflow.com/q/24711805
tags question: http://stackoverflow.com/q/24629629
tags question: http://stackoverflow.com/q/24679881
tags question: http://stackoverflow.com/q/24683833
tags question: http://stackoverflow.com/q/24611559
tags question: http://stackoverflow.com/q/24723374
tags question: http://stackoverflow.com/q/24600811
tags question: http://stackoverflow.com/q/24748345
tags question: http://stackoverflow.com/q/24624607
tags question: http://stackoverflow.com/q/24637048
tags question: http://stackoverflow.com/q/24608370
tags question: http://stackoverflow.com/q/24703969
tags question: http://stackoverflow.com/q/24699689
tags question: http://stackoverflow.com/q/24623572
tags question: http://stackoverflow.com/q/24690969

html5-canvas
tags question: http://stackoverflow.com/q/24690337
tags question: http://stackoverflow.com/q/24621810
tags question: http://stackoverflow.com/q/24606179
tags question: http://stackoverflow.com/q/24714941
tags question: http://stackoverflow.com/q/24622235
tags question: http://stackoverflow.com/q/24639990
tags question: http://stackoverflow.com/q/24689278
tags question: http://stackoverflow.com/q/24588146
tags question: http://stackoverflow.com/q/24692743
tags question: http://stackoverflow.com/q/24676390
tags question: http://stackoverflow.com/q/24713822
tags question: http://stackoverflow.com/q/24685061
tags question: http://stackoverflow.com/q/24679053
tags question: http://stackoverflow.com/q/24685322
tags question: http://stackoverflow.com/q/24732492
tags question: http://stackoverflow.com/q/24702372
tags question: http://stackoverflow.com/q/24699049
tag name: html5-canvas
tags question: http://stackoverflow.com/q/24676874
tags question: http://stackoverflow.com/q/24685624
type: Tag
tags question: http://stackoverflow.com/q/24694629
tags question: http://stackoverflow.com/q/24720603
tags question: http://stackoverflow.com/q/24661239

http://stackoverflow.com/comment/38303898
score: 0
type: AnswerComment
type: Comment
has text: Are you sure that the error is caused by this line?
comment on: http://stackoverflow.com/a/24695923

socket.io
tags question: http://stackoverflow.com/q/24611316
tags question: http://stackoverflow.com/q/24738026
tags question: http://stackoverflow.com/q/24726437
tags question: http://stackoverflow.com/q/24673040
type: Tag
tags question: http://stackoverflow.com/q/24593279
tags question: http://stackoverflow.com/q/24609991
tags question: http://stackoverflow.com/q/24645315
tag name: socket.io
tags question: http://stackoverflow.com/q/24736089
tags question: http://stackoverflow.com/q/24683224
tags question: http://stackoverflow.com/q/24664816
tags question: http://stackoverflow.com/q/24721199
tags question: http://stackoverflow.com/q/24683572
tags question: http://stackoverflow.com/q/24738530
tags question: http://stackoverflow.com/q/24665907
tags question: http://stackoverflow.com/q/24606520
tags question: http://stackoverflow.com/q/24677203

http://stackoverflow.com/comment/38304886
has text: Thanks, this is a really useful answer and _Parasitic Inheritance_ was the term I needed to be able to figure out more about the process.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24700415
type: Comment

http://stackoverflow.com/comment/38143615
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24614923
has text: No identical id's. And no console errors. :( To give more info..I am appending the contents including the slider to a div based on a condition. Is it because that it is dynamically added?

http://stackoverflow.com/a/24739208
score: 7
upvote count: 7
accepted answer of: http://stackoverflow.com/q/24739141
downvote count: 0
has comment: http://stackoverflow.com/comment/38378599
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24739141
type: Answer
has body: You can add a function stub to call your function when the event fires: window.addEventListener('resize', function(e) { writeMSG(X, Y); }); The way you were trying to do it, you were calling writeMSG() immediately and passing its return value to addEventListener() which was certainly not what you wanted (that's why it was only getting called once).

http://stackoverflow.com/comment/38336009
type: Comment
comment on: http://stackoverflow.com/a/24716973
score: 0
type: AnswerComment
has text: It's not changing the currently image. Somehow the css can prevent this change?

http://stackoverflow.com/comment/38331371
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24714671
has text: can't really help without seeing more scope . try logging `data` to console to see what it is
score: 0

node.js
tags question: http://stackoverflow.com/q/24720171
tags question: http://stackoverflow.com/q/24640628
tags question: http://stackoverflow.com/q/24645711
tags question: http://stackoverflow.com/q/24588710
tags question: http://stackoverflow.com/q/24665184
tags question: http://stackoverflow.com/q/24621339
tags question: http://stackoverflow.com/q/24675606
tags question: http://stackoverflow.com/q/24746508
tags question: http://stackoverflow.com/q/24706203
tags question: http://stackoverflow.com/q/24638342
tags question: http://stackoverflow.com/q/24703921
tags question: http://stackoverflow.com/q/24662320
tags question: http://stackoverflow.com/q/24738973
tags question: http://stackoverflow.com/q/24617820
tags question: http://stackoverflow.com/q/24678468
tags question: http://stackoverflow.com/q/24716316
tags question: http://stackoverflow.com/q/24667122
tags question: http://stackoverflow.com/q/24601848
tags question: http://stackoverflow.com/q/24683224
tags question: http://stackoverflow.com/q/24748887
tags question: http://stackoverflow.com/q/24620480
tags question: http://stackoverflow.com/q/24666163
tags question: http://stackoverflow.com/q/24684597
tags question: http://stackoverflow.com/q/24638077
tags question: http://stackoverflow.com/q/24683447
tags question: http://stackoverflow.com/q/24654479
tags question: http://stackoverflow.com/q/24664816
tags question: http://stackoverflow.com/q/24708047
tags question: http://stackoverflow.com/q/24734347
tags question: http://stackoverflow.com/q/24659796
tags question: http://stackoverflow.com/q/24588588
tags question: http://stackoverflow.com/q/24635108
tags question: http://stackoverflow.com/q/24712182
tags question: http://stackoverflow.com/q/24623113
tags question: http://stackoverflow.com/q/24624963
tags question: http://stackoverflow.com/q/24738347
tags question: http://stackoverflow.com/q/24604847
tags question: http://stackoverflow.com/q/24616499
tags question: http://stackoverflow.com/q/24711805
tags question: http://stackoverflow.com/q/24691717
tags question: http://stackoverflow.com/q/24704427
tags question: http://stackoverflow.com/q/24597806
tags question: http://stackoverflow.com/q/24665573
tags question: http://stackoverflow.com/q/24639912
tags question: http://stackoverflow.com/q/24632474
tags question: http://stackoverflow.com/q/24706065
tags question: http://stackoverflow.com/q/24675125
tags question: http://stackoverflow.com/q/24668372
tags question: http://stackoverflow.com/q/24721199
tags question: http://stackoverflow.com/q/24666696
tags question: http://stackoverflow.com/q/24614741
tags question: http://stackoverflow.com/q/24727520
tags question: http://stackoverflow.com/q/24619290
tags question: http://stackoverflow.com/q/24700047
tags question: http://stackoverflow.com/q/24638464
tags question: http://stackoverflow.com/q/24600596
tags question: http://stackoverflow.com/q/24660096
tags question: http://stackoverflow.com/q/24747652
tags question: http://stackoverflow.com/q/24689245
tags question: http://stackoverflow.com/q/24635563
tags question: http://stackoverflow.com/q/24596099
tags question: http://stackoverflow.com/q/24609526
tags question: http://stackoverflow.com/q/24592777
tags question: http://stackoverflow.com/q/24599843
tags question: http://stackoverflow.com/q/24736852
tags question: http://stackoverflow.com/q/24666331
tags question: http://stackoverflow.com/q/24682656
tags question: http://stackoverflow.com/q/24733263
tags question: http://stackoverflow.com/q/24707406
tags question: http://stackoverflow.com/q/24701279
tags question: http://stackoverflow.com/q/24644477
tags question: http://stackoverflow.com/q/24622151
tags question: http://stackoverflow.com/q/24719397
tags question: http://stackoverflow.com/q/24738530
tags question: http://stackoverflow.com/q/24686987
tags question: http://stackoverflow.com/q/24675917
tags question: http://stackoverflow.com/q/24682808
tags question: http://stackoverflow.com/q/24635322
tags question: http://stackoverflow.com/q/24727475
tags question: http://stackoverflow.com/q/24623520

http://stackoverflow.com/q/24640517
has comment: http://stackoverflow.com/comment/38197253
has comment: http://stackoverflow.com/comment/38192688
has body: I am creating a directive that moves an element to the right. In each click, the item is moved to the right, but I would like that the element moves as long I am keeping the button pressed. .directive("car", function(){ return { restrict:"A", link:function(scope,element,attrs,controller){ var left=0; var car = angular.element(element[0].querySelector('.car')); var move = function(e){ left+=10; car[0].style.left = left+"px"; }; element.on("click", move); } }; }) So how can I detect when the button is being pressed each half second and recall the move function again? Is it possible to have a smooth movement? There is a interactive demo here: http://jsfiddle.net/vtortola/2m8vD/ I cannot use jQuery for this, but I may use AngularJS modules like ngTouch or whatever.
has comment: http://stackoverflow.com/comment/38195733
tagged with: angularjs-directive
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24641608
downvote count: 0
has comment: http://stackoverflow.com/comment/38210343
type: Question
has comment: http://stackoverflow.com/comment/38197625
answer count: 2
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/24641608
has title: Trigger click events while button is pressed
upvote count: 4
has comment: http://stackoverflow.com/comment/38192204
has answer: http://stackoverflow.com/a/24650764
accepted answer: http://stackoverflow.com/a/24650764
has comment: http://stackoverflow.com/comment/38193316
tagged with: angularjs

http://stackoverflow.com/comment/38362242
type: AnswerComment
comment on: http://stackoverflow.com/a/24729878
score: 0
type: Comment
has text: Great ! Thanks a lot :) ..Can i add transition as well using jquery? e.g: i want the other image to overlap it slowly..

http://stackoverflow.com/comment/38262919
has text: While your solution is technically right, take a look at its application to the code provided. Does it make sense to you?
type: Comment
score: 2
comment on: http://stackoverflow.com/a/24678557
type: AnswerComment

http://stackoverflow.com/comment/38365086
score: 1
type: QuestionComment
has text: Have you seen this: https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub
type: Comment
comment on: http://stackoverflow.com/q/24731967

http://stackoverflow.com/q/24650338
upvote count: 0
tagged with: save
type: Question
has body: I'v made a js color picker in my xenforo forum, and it works, but after reloading the page all the changes will be reset. is there any way to save these changes? js color picker: http://www.eyecon.ro/colorpicker/ my codes: $('#colorSelector').ColorPicker({ color: '#0000ff', onShow: function (colpkr) { $(colpkr).fadeIn(500); return false; }, onHide: function (colpkr) { $(colpkr).fadeOut(500); return false; }, onChange: function (hsb, hex, rgb) { $('#colorSelector div').css('backgroundColor', '#' + hex); $('.VietXfAdvStats h3').css('backgroundColor', '#' + hex); } });
has answer: http://stackoverflow.com/a/24650515
has title: How save js color picker changes
score: -1
downvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/24598664
has body: How can I make my Script working with WebWorker $.getJSON(url, function(data) { var x=""; for (i=0;i&lt;data.sturi.length;i++) { $("#stdjgls ul").append("&lt;li itemid="+i+"&gt;&lt;a href=#vl&gt;"+data.sturi[i]+"&lt;/a&gt;&lt;/li&gt;"); stdge[i]=data.sturi[i]; }
has comment: http://stackoverflow.com/comment/38113906
has comment: http://stackoverflow.com/comment/38124501
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/38144164
type: Question
has answer: http://stackoverflow.com/a/24598803
has title: GetJson with WebWorker
score: -1
has comment: http://stackoverflow.com/comment/85736644
upvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38113969
favorite count: 0
has comment: http://stackoverflow.com/comment/38111622

plugins
tags question: http://stackoverflow.com/q/24603119
tags question: http://stackoverflow.com/q/24664934
tags question: http://stackoverflow.com/q/24671062
tags question: http://stackoverflow.com/q/24734010
tags question: http://stackoverflow.com/q/24684339
tag name: plugins
tags question: http://stackoverflow.com/q/24722357
type: Tag
tags question: http://stackoverflow.com/q/24604252
tags question: http://stackoverflow.com/q/24610189

http://stackoverflow.com/q/24650282
accepted answer: http://stackoverflow.com/a/24651833
tagged with: android
type: AnsweredQuestion
has body: I am trying to use a javascript injection to retrieve the element id of the button clicked. I then want to save this id to a string that I have created and then have it display into a toast that i have created. code is below: public static final String INJECTED_CODE = "javascript:" + "(function getClickedElement (id) { " + "Test = document.getElementById(id)" + "document.addEventListener('click', function(){Android.showToast(\'" + Test +"\');});" + "})()"; I know that this works without adding in the getClickedElement bit. Any help would be appreciated.
type: Question
has title: Trouble with javascript injection
tagged with: javascript
tagged with: code-injection
score: 0
has answer: http://stackoverflow.com/a/24651833
answer count: 1

http://stackoverflow.com/comment/38322124
type: Comment
comment on: http://stackoverflow.com/a/24703783
score: 0
type: AnswerComment
has text: @Parh Trivedi THank you so much for detailed explanation.. IF `dd/mm/yy` is not corrrect format I even tried with `dd.mm.yy` but again its setting back to `mm.dd.yy` .. :(

http://stackoverflow.com/q/24707824
tagged with: http://stackoverflow.com/tag/html
has title: onclick find text on page and scroll to it
tagged with: css
has answer: http://stackoverflow.com/a/24707876
score: 2
downvote count: 0
tagged with: scrolltop
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/53368322
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/24708016
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38336519
type: UnansweredQuestion
has body: I have a website with an online store that is embedded and automatically populated so I have no access to actual code. When the store populates, it compiles all my items together with headings for seperate item categories. My idea is to build a menu that uses the onclick function to find some text on the page (the item category headings) and scroll down to that category since I can't simply use or scroll to div by id. Here is the site as it sits right now: www.monumentalmarketingllc.com/storetest I'm currently trying to get this to work without any luck: BEER

http://stackoverflow.com/q/24700888
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38304930
tagged with: http://stackoverflow.com/tag/html
has body: This is my HTML page: 'Chart.js' and 'Chart1.js' contains same content. I used 'Chart.js' only once but it didn't work. So I tried with two. The above HTML page is displaying only one pie chart. The other pie chart is not displayed but occupying the space in the page. What changes should be made so that two pie charts can be displayed? Thanks in advance.
accepted answer: http://stackoverflow.com/a/24701093
has answer: http://stackoverflow.com/a/36621560
type: AnsweredQuestion
tagged with: chart.js
score: 1
possible better answer: http://stackoverflow.com/a/24701185
has title: How to create two pie charts using Chart.js API?
upvote count: 1
has answer: http://stackoverflow.com/a/24701185
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24701093
answer count: 3
tagged with: pie-chart

http://stackoverflow.com/a/24636698
score: 0
type: Answer
has body: Try this: var current = 3; var numImages = $('.gallery-li').length; jQuery('a.navLeft').click(function () { move(); }); jQuery('a.navRight').click(function () { move("right"); }); function move(d){ if(d == "right"){ current += 3; $(".gallery-li").animate({left: "-=380px",}, "slow" ); }else{ current -= 3; $(".gallery-li").animate({left: "+=380px",}, "slow" ); } $(".navRight, .navLeft").show(); if(current == 0) $(".navLeft").hide(); if(current &gt;= numImages) $(".navRight").hide(); } http://jsfiddle.net/Tfy8h/22/
answers question: http://stackoverflow.com/q/24636229

http://stackoverflow.com/q/24618546
upvote count: 2
score: 0
downvote count: 2
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/572897
has title: When should we define functions on an object's prototype vs. in the object itself?
has answer: http://stackoverflow.com/a/24618640
has comment: http://stackoverflow.com/comment/38150806
accepted answer: http://stackoverflow.com/a/24618640
duplicate of: http://stackoverflow.com/q/572897
has comment: http://stackoverflow.com/comment/38151113
type: AnsweredQuestion
has body: Specifically, I don't understand why some methods require a .prototype in front of them but others to not. I was practising a code where a correct answer was var Foo = function(value) { this.val = value; } Foo.prototype.valueOf = function() { return this.val; } and I am wondering why the prototype in Foo.prototype.valueOf was needed, why can you not simply just do Foo.valueOf? It is what I did before with other prototypes. For example, I do x.slice(2,4) and not x.prototype.slice(2,4).
has comment: http://stackoverflow.com/comment/38159183
has comment: http://stackoverflow.com/comment/38150940
type: Question
linked to: http://stackoverflow.com/q/16063394
tagged with: javascript

http://stackoverflow.com/a/24808633
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38508995
accepted answer of: http://stackoverflow.com/q/24744178
type: Answer
answers question: http://stackoverflow.com/q/24744178
has comment: http://stackoverflow.com/comment/38509070
has comment: http://stackoverflow.com/comment/38509190
has body: Turns out I found a solution myself: it's as simple as redirecting to the full URL path with my redirection page. Instead of redirecting to [domain]/site I redirected to [domain]/site/index.html. It's no longer giving me any trouble.
score: 0

http://stackoverflow.com/comment/38137485
comment on: http://stackoverflow.com/q/24611662
score: 0
type: QuestionComment
type: Comment
has text: Are you sure that the foundation library is loaded?

http://stackoverflow.com/q/24694482
tagged with: javascript
has answer: http://stackoverflow.com/a/24694640
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/38292617
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
tagged with: java
has title: How to receive data from server (server written by java, to HTML file)
type: Question
score: -2
has body: So on HTML, I'm trying to use the 'String' that server sends. the 'Server' will contain the plain json-formatted string I know that because HTML itself is not a programming language but a mark-up language I need to use external as javascript or someother language. This is server side code, i'm modifying a code from other service given to me to start with. public static void main(String[] args) { HttpServer server; try { server = HttpServer.create(new InetSocketAddress(8080), 0); server.createContext("/", new HttpHandler() { @Override public void handle(HttpExchange he) throws IOException { System.out.println("[HIT] " + (new SimpleDateFormat("yyyy/MM/dd_HH:mm:ss") .format(Calendar.getInstance().getTime()))); if (he.getRequestMethod().equals("POST")) { // read POST request body BufferedReader br = new BufferedReader( new InputStreamReader(he.getRequestBody())); String queryStr = ""; String line; while ((line = br.readLine()) != null) { queryStr += line; } System.out.println(queryStr); } } }); server.setExecutor(Executors.newCachedThreadPool()); server.start(); System.out.println("HTTP Listening on port " + server.getAddress().getPort()); } catch (IOException e) { e.printStackTrace(); } } } What should I do for: Send POST request on HTML, (I tried but seems it doesn't work) Send String data from server to client, (How to use Outputstream?) Process that string data on HTML file? currently on HTML I just put the sample data as var asdf = {json contents}

http://stackoverflow.com/comment/38170397
comment on: http://stackoverflow.com/a/24620191
type: AnswerComment
has text: I've changed that since to go back to document.write from parent.document.write because only rewriting the frame is less of a nuisance that what parent.document.write was doing
score: 0
type: Comment

http://stackoverflow.com/comment/38239419
comment on: http://stackoverflow.com/q/24665423
type: Comment
type: QuestionComment
has text: @M.chaudhry - `visibility: hidden` counts as visible since it takes up space.
score: 1

http://stackoverflow.com/comment/38169121
score: 0
type: Comment
has text: @endeka `$` is not defined because you haven't linked jquery library (notice dropdown in the top left corner). As your current question has nothing to do to the original one I recommend you to post a new question. :)
type: QuestionComment
comment on: http://stackoverflow.com/q/24605317

http://stackoverflow.com/q/24658782
tagged with: angularjs
has title: JavaScript XDate on Mac not recognizing local Time Zone
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24661884
has body: I'm using the JavaScript XDate plugin on our AngularJS, Cordova PhoneGap application. We are developing in XCode. We have a function that does a REST service call to retrieve a timestamp from our SQL Server database. When the value gets returned, it's in this format: "2014-07-09T11:12:13.123" In order to populate our XDate variable correctly, I had to do this: var date = new XDate(dateString.substring(1, 20)); That removes the quotes, and the milliseconds from the actual date value. But, I found out that this was saving it as the UTC time. After reading up, I found that just adding the "true" parameter to the XDate constructor as the last parameter will specify to use the current timezone, so I updated it to this: var date = new XDate(dateString.substring(1, 20), true); Perfect! All is well...........on my machine. A co-worker just updated his Mac OS to 10.9.4 (I'm running 10.8.5). On his machine, when he reads his in, it still thinks the variable is in UTC time. I just had another developer test this as well (she's on 10.9.3) and her's says the correct CDT timezone. Is this a Mac OS issue since it's only breaking on his machine, and no other developers?
type: Question
tagged with: javascript
score: 0
tagged with: datetime
answer count: 1
has answer: http://stackoverflow.com/a/24661884
tagged with: macos
tagged with: cordova

http://stackoverflow.com/a/24631987
answers question: http://stackoverflow.com/q/24631894
type: Answer
has body: :) results is object you can follow on this site :) in here you can see it: http://jsfiddle.net/HoangHieu/x8dSP/3631/ function reverseGeocodeResult(results, status) { currentReverseGeocodeResponse = results; if (status == 'OK') { if (results.length == 0) { $('#id of element').val(results[0].formatted_address); } } like { "address_components": [{ "long_name": "192", "short_name": "192", "types": ["street_number"] }, { "long_name": "An Dương Vương", "short_name": "An Dương Vương", "types": ["route"] }, { "long_name": "phường 3", "short_name": "phường 3", "types": ["sublocality_level_1", "sublocality", "political"] }, { "long_name": "Ho Chi Minh City", "short_name": "Ho Chi Minh City", "types": ["locality", "political"] }, { "long_name": "Quận 5", "short_name": "Quận 5", "types": ["administrative_area_level_2", "political"] }, { "long_name": "Hồ Chí Minh", "short_name": "Hồ Chí Minh", "types": ["administrative_area_level_1", "political"] }, { "long_name": "Vietnam", "short_name": "VN", "types": ["country", "political"] }], "formatted_address": "192 An Dương Vương, phường 3, Quận 5, Hồ Chí Minh, Vietnam", "geometry": { "bounds": { "xa": { "k": 10.7576423, "j": 10.7576594 }, "pa": { "j": 106.6744804, "k": 106.67448660000002 } }, "location": { "k": 10.7576423, "B": 106.67448660000002 }, "location_type": "RANGE_INTERPOLATED", "viewport": { "xa": { "k": 10.7563018697085, "j": 10.7589998302915 }, "pa": { "j": 106.67313451970847, "k": 106.67583248029155 } } }, "types": ["street_address"] } enter link description here
downvote count: 2
upvote count: 1
score: -1

http://stackoverflow.com/q/24598177
has title: creating simple JS with PHP
type: AnsweredQuestion
has body: I am trying to recreate the JS below with PHP. The reason is that the numbered classes and values are actually IDs pulled from a mysql database. I have an area where say a report is creating, the code below shows and hides rules for that report. Since different reports have different rules, it shows and hides rules dependent on the grouping, determined in the code below as #rule_who. When trying to recreate the following I was trying to use while loops however it got pretty ridiculous. Is there a more efficient way in JavaScript or AJAX to show and hide divs that would be better suited to using a large number of divs? The 2,3,4, and so on shouldn't be an incrementing number as it would rely on IDs and thus some numbers will disappear over time as reports are deleted. Any help would be appreciated. Thanks &lt;script&gt; //&lt;![CDATA[ $(window).load(function(){ $(".2").hide(); $(".3").hide(); $(".4").hide(); $('#rule_who').on('change', function () { if(this.value === "2"){ $(".2").show(); $(".3").hide(); $(".4").hide(); } else if(this.value === "3"){ $(".2").hide(); $(".3").show(); $(".4").hide(); } else if(this.value === "4"){ $(".2").hide(); $(".3").hide(); $(".4").show(); } else { $(".2").hide(); $(".3").hide(); $(".4").hide(); } }); });//]]&gt; &lt;/script&gt; EDIT: Thanks everyone for the help. What I ended up using was the following: &lt;script type='text/javascript'&gt;//&lt;![CDATA[ $(window).load(function(){ $("#rule_who").change(function() { $("div.specific_rules").hide(); var targetId = $(this).val(); console.log($(targetId).html()); // show the new selected one $("#"+targetId).show(); }); });//]]&gt; &lt;/script&gt;
type: Question
possible better answer: http://stackoverflow.com/a/24598613
tagged with: javascript
has answer: http://stackoverflow.com/a/24598613
has answer: http://stackoverflow.com/a/24598245
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/24598245
tagged with: ajax

http://stackoverflow.com/q/24657421
has comment: http://stackoverflow.com/comment/38228126
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38224722
has title: Binding the correct function
has comment: http://stackoverflow.com/comment/38225084
has comment: http://stackoverflow.com/comment/38224663
answer count: 0
has comment: http://stackoverflow.com/comment/38223979
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38224589
has body: I'm having some trouble with this website I am building. I am modifying the existing pre-loader to have a button before continuing on to the home page. The issue is I can't point the button click to the correct function for a reason that i really can't figure out. Here is the appropriate code: Revision: Just to clarify, I'm aiming to get this button click to replicate the function performed in the final code extract: this.parent.endLoader(); but am not having any success. The click: &lt;script&gt; $(document).on('click', '.qLbtns', function(){ $(this).EndLoader(); }); &lt;/script&gt; The js bind: $.fn.EndLoader = function(){ return this.each(function(){ this.endLoader(); }); }; The function i am trying to point to: QueryLoader2.prototype.endLoader = function () { this.destroyed = true; this.onLoadComplete(); }; Which is effective within this function: PreloadImage.prototype.completeLoading = function () { this.parent.imageDone++; var percentage = (this.parent.imageDone / this.parent.imageCounter) * 100; this.parent.overlayLoader.updatePercentage(percentage); if (this.parent.imageDone == this.parent.imageCounter || percentage &gt;= 100) { this.parent.endLoader(); } };
tagged with: jquery
has comment: http://stackoverflow.com/comment/38223976

http://stackoverflow.com/q/24691465
tagged with: jquery
tagged with: oracle-apex
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: oracle-database
upvote count: 1
has title: Parent Page refresh when child window close in oracle apex
score: 1
has answer: http://stackoverflow.com/a/24904323
has body: i have make a interactive report with form now the interactive report is the - page no- 2 - parent page form page is the - page no 3- child page in parent page i have written a java script to open a modal page(form page -page no3 )- link is ** &lt;script type="text/javascript"&gt; function MWindow(a,b) { if (window.showModalDialog) { window.showModalDialog ("f?p=&amp;APP_ID.:3:&amp;SESSION.:POP:NO::P3_KEY,P3_E_KEY:"+a+","+b+":","name","dialogWidth:700px;dialogHeight:400px"); } else { window.open("f?p=&amp;APP_ID.:3:&amp;SESSION.:POP:NO::P3_E_KEY:P5_ELEMENT_ID:","name","height=400,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes"); } } &lt;/script&gt; ** ON PAGE NO- 2 I HAVE GIVEN FOLLOWING LINKS on create button -javascript function is calling - javascript:MWindow(',&amp;P5_ELEMENT_ID.'); ON EDIT LINK - JAVASCRIPT FUNCTION IS CALLING- javascript:MWindow(#R_KEY#,#R_ELMT_KEY#); now child page is opening and ON THAT i can create the RECORD and apply changes ON the record (CREATE BUTTON AND APPLY CHANGES BUTTON) in the process also i have created the process that when any changes happen the pop window close (Close popup window) event given . all process is working i want to know when popup window (page no 3)close , it must refresh the page of parent window (page no 2) - (UPDATED RECORD MUST SHOWN THERE)
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38096639
score: 1
has text: directive makes sense
comment on: http://stackoverflow.com/q/24590044
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38107241
type: QuestionComment
score: 0
has text: Turns out you do have that line in your source after all - it's in your `$(document).ready() call in the 'contact form' section. Note that you've got to use `.modalbox` instead of `.fancybox` as the selector, as that's your link name. I think the new docs are [here](http://fancyapps.com/fancybox/#instructions).
comment on: http://stackoverflow.com/q/24594889
type: Comment

http://stackoverflow.com/comment/38201409
has text: this is reload not refresh
comment on: http://stackoverflow.com/a/24645400
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38372567
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24731490
has text: @Vikram: I have tried something [here](http://jsfiddle.net/vLvXF/11/). It might not be the exact solution you are looking for, but you could get something to move on.
score: 1

http://stackoverflow.com/comment/38275514
comment on: http://stackoverflow.com/q/24685106
score: 0
has text: Wouldn't it be better if you just have the 2 images in the markup and then show/hide constantly?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24625697
tagged with: javascript
tagged with: jwplayer
has answer: http://stackoverflow.com/a/24636676
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38255606
has comment: http://stackoverflow.com/comment/38165208
has title: jwplayer not playing video on some phones, error code 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/24636676
type: Question
tagged with: android
score: 4
has comment: http://stackoverflow.com/comment/39062707
has comment: http://stackoverflow.com/comment/38255428
downvote count: 1
answer count: 1
has body: I am getting on one of android phones error from jwplayer: Error playing media: MediaError { code 4 } Tried to search what does it mean, but cannot find. Video works on other android devices, and on desktop computers. Tried chrome and default browser in android. Update http://jsfiddle.net/HCH8Q/3/ jwplayer('myElement').setup({ file: 'http://video.oitlabs.com/dogs6_2mb/mr6d_1047.mp4', // works // file: 'http://videos-jp.jwpsrv.com/zWLy8Jer/videos/i8oQD9zd-1753142.mp4?77c801d752d5207784c49e7ed80fb953798fae0fcca03ecf79558597ab74bd0b969af6ee1babdc6fac893174bba3c1bbb98ef7c2e4c6b3c59a812b4ed2c9abb29c61117869dbacbbb7caced845a8994ff297cc03a4', height: 360, image: '/uploads/example.jpg', width: 640 }); So video from their site works, but my video does not. But when I run that video not in jw player but directly in the address bar its url, it plays. So it means browser is able to play that video. This happens btw on LG L7 P710 phone Update: Tried now to upload to my server the video from jw site, and it works on that phone. http://jsfiddle.net/HCH8Q/5/ So this is encoding issue. Then the question comes - how should I solve it? I used Handbrake program to convert videos, it has many of settings but I am not sure what should I set to convert so it would work on every phone which supports mp4 files? Update: Finally made it work by this site instructions: http://www.broken-links.com/2010/07/30/encoding-video-for-android/ The first is cross-platform, using Handbrake. What I did with this was to use the iPhone &amp; iPod Touch preset, check the Web Optimized option, and change the Average bitrate option (in the Quality section) to ~1000kbps (you should then save this as a new preset called Android). You’ll also need to change the size of the output video in the Picture Settings options — I changed mine to 480 wide (keeping the aspect ratio) and they came out really crisp and sharp. You can see the result of that below (if your browser supports it). It looks like everything I done s…
upvote count: 5

http://stackoverflow.com/q/24671390
tagged with: firefox
tagged with: javascript
score: 0
answer count: 1
has title: JQuery focus works weird on password fields in firefox
tagged with: jquery
has answer: http://stackoverflow.com/a/24671449
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38249526
has comment: http://stackoverflow.com/comment/38249388
accepted answer: http://stackoverflow.com/a/24671449
has body: I made a login form with username and password. The Username and password fields have placeholders. and I fixed the IE problem of not recognizing the placeholder attribute, by using Jquery to remove textbox value on focus. and for the password I made a hidden input type=password textbox, and I made a textbox with input type=text with value="password" that when clicked it hides and the password field is shown. here's the form's html code: &lt;form method="post" action="check.php"&gt; &lt;input type="text" class="login-textbox" id="enter-username" placeholder="Username" maxlength="50"/&gt; &lt;input type="text" class="login-textbox" id="password-placeholder" placeholder="Password" maxlength="50"/&gt; &lt;input type="password" class="login-textbox" id="enter-password" maxlength="50"/&gt; &lt;input type="submit" class="button" value="Login" /&gt; &lt;/form&gt; here's the JQuery code: $(function(){ $("#enter-username").val("Username"); $("#password-placeholder").val("Password"); $("#enter-username").focus(function(){ if($(this).val()=="Username"){ $(this).val("");$(this).css("color","#000000"); } $(this).css("border","2px solid #00A2E8"); }); $("#enter-username").blur(function(){ if($(this).val()==""){ $(this).val("Username");$(this).css("color","#808080"); } $(this).css("border","2px solid #D8D8D8"); }); $("#password-placeholder").focus(function(){ $(this).hide();$("#enter-password").show(); $("#enter-password").focus(); }); $("#enter-password").focus(function(){ $("#enter-password").css("border","2px solid #00A2E8"); }); $("#enter-password").blur(function(){ if($(this).val()==""){ $(this).hide();$("#password-placeholder").show(); } $(this).css("border","2px solid #D8D8D8"); }); }); This works fine on chrome and internet explorer, but on firefox, when I click (focus) on the password text box the password field shows with text in it. like this: The password field should be empty when I click on it. anybody knows how can I fix this?
type: Question

http://stackoverflow.com/q/24749080
answer count: 3
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/24749401
type: Question
has answer: http://stackoverflow.com/a/24749401
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/24762215
accepted answer: http://stackoverflow.com/a/24762215
has body: I don't understand why margin-bottom isn't working as expected in .leftBar_fundo. I tried in all divs inside #div_leftBar, but it still doesn't work. When I open two or more divs in the leftBar, they expand and end up overlapping the footer. I want to when I expand the div the footer goes down as well. But margin-bottom isn't really working. I used jQuery to make the content appear and disappear. HTML code: Example Example Example Example Example Example Example Example Example Example OPENS Example Example Example Example Example OPENS Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example OPENS Example Example Example Example Example Example Example 14 Título de exemplo Ullam dictum felis eu pede mollis pretium. Integer tincidunt.Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretiuLorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede molliUllam dictum felis eu pede mollis pretium. Integer tincidunt.Lorem ipsum dolor sit amet. Lorem Ipsum Dolor Example: Example Example Example Example: Example Example Example Example: Example Example Example And Css code: body{ margin:0px; padding:0px; background-color:#ffcc66; font-size:18px; } .body_container { position: relative; height:1000px; } #div_header { background-color:#0000ff; width:100%; height:25%; padding:0px; margin-bottom:3%; } /* Nav bar at the top of the pa…
has answer: http://stackoverflow.com/a/24749673
upvote count: 3
has title: Why isn't margin-bottom:[value]% working?

http://stackoverflow.com/comment/38138231
type: AnswerComment
comment on: http://stackoverflow.com/a/24612195
type: Comment
has text: I'm sorry I don't understand your last comment. You need to run netstat from a shell on the server, which is usually accomplished via ssh.
score: 0

http://stackoverflow.com/comment/38311068
comment on: http://stackoverflow.com/a/24704076
type: Comment
has text: Ah, should have mentioned that a problem here is that inside deleteThis() is a redirect. So the second click handler won't get a chance to fire because the window will have already been redirected. (updating question now)
score: 0
type: AnswerComment

http://stackoverflow.com/a/24632795
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You need to wrap $.get in a closure. $('#countdown_items .topitembox').each(function () { var itmID = $(this).attr('class').replace(/[^0-9]/g, ''); $(this).append('&lt;div id="countdown' + itmID + '"&gt;&lt;/div&gt;'); (function (itmID) { //Notice Here $.get(getTimeLeft, function (data) { var Day = data.Day, Hours = data.Hour, Mins = data.Min, Secs = data.Sec, dayH = Day * 24, Hours = Hours + dayH; //Now itmID is accesible here $('#countdown' + itmID).countdowntimer({ //Notice Here hours: Hours, minutes: Mins, seconds: Secs, timeUp: timeisUp }); }, "json"); })(itmID);//Notice Here });
type: Answer
accepted answer of: http://stackoverflow.com/q/24632712
answers question: http://stackoverflow.com/q/24632712

http://stackoverflow.com/a/24728073
type: Answer
has body: You need to change your for loop to: for(names.end(); names.currPos() &gt; 0; names.prev())
answers question: http://stackoverflow.com/q/24728020
score: 0
has comment: http://stackoverflow.com/comment/38357661

http://stackoverflow.com/comment/38368121
score: 0
type: Comment
type: QuestionComment
has text: No, there's no way to do like that.
comment on: http://stackoverflow.com/q/24733723

jquery-animate
tags question: http://stackoverflow.com/q/24663279
tags question: http://stackoverflow.com/q/24682486
tags question: http://stackoverflow.com/q/24746405
tag name: jquery-animate
tags question: http://stackoverflow.com/q/24592738
tags question: http://stackoverflow.com/q/24707539
tags question: http://stackoverflow.com/q/24728111
tags question: http://stackoverflow.com/q/24608202
tags question: http://stackoverflow.com/q/24729847
tags question: http://stackoverflow.com/q/24737789
tags question: http://stackoverflow.com/q/24701821
type: Tag

http://stackoverflow.com/comment/38221062
comment on: http://stackoverflow.com/q/24655851
has text: You may want to read stuff about "callbacks". Check this out for example: http://recurial.com/programming/understanding-callback-functions-in-javascript/ It's tricky to understand but powerful, and certainly a good solution for your problem.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/24593439
score: 5
upvote count: 5
has body: You can use a DOMParser to parse the HTML and get the content of the tags. By not using a regex, the markup can be anything as long as the selectors match, which is usually what you want as regex isn't really capable of parsing HTML. Then use localeCompare to compare the strings, this avoids issues with case sensitivity and special characters that you would have with &lt; or &gt; arr.sort(function(a,b) { var docA = new DOMParser().parseFromString(a, "text/html"); var docB = new DOMParser().parseFromString(b, "text/html"); var txtA = docA.querySelector('a').innerHTML; var txtB = docB.querySelector('a').innerHTML; return txtA.localeCompare(txtB); }); FIDDLE
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24593371
answers question: http://stackoverflow.com/q/24593371
type: Answer

http://stackoverflow.com/a/38003741
upvote count: 10
answers question: http://stackoverflow.com/q/24660096
downvote count: 0
has comment: http://stackoverflow.com/comment/63862089
type: Answer
has comment: http://stackoverflow.com/comment/63861909
has body: Given asyncFn function array of items Required promise chaining .then()'s in series (in order) native es6 Solution let asyncFn = (item) =&gt; { return new Promise((resolve, reject) =&gt; { setTimeout( () =&gt; {console.log(item); resolve(true)}, 1000 ) }) } // asyncFn('a') // .then(()=&gt;{return async('b')}) // .then(()=&gt;{return async('c')}) // .then(()=&gt;{return async('d')}) let a = ['a','b','c','d'] a.reduce((previous, current, index, array) =&gt; { return previous // initiates the promise chain .then(()=&gt;{return asyncFn(array[index])}) //adds .then() promise for each item }, Promise.resolve())
has comment: http://stackoverflow.com/comment/75229318
score: 10

http://stackoverflow.com/a/24599335
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38113378
accepted answer of: http://stackoverflow.com/q/24599290
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/24599290
score: -1
has body: The obvious answer for me would be - jquery SORTABLE added to your tabs elements. Refer to jquery docs - http://jqueryui.com/sortable/. But if tabs are saved in interface for user(after login the order is maintaned) you would have to set up database access and save the positions of tabs into it.
upvote count: 0

http://stackoverflow.com/q/24658905
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24659450
tagged with: onclick
has title: How to go to a page on onclick depending on combobox value using Javascript?
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/24659489
has body: I have a combobox and a button. When I click the button, it uses the value from the combobox and goes to another page. My question is, how do I alter it so that, if, for example, the value in the combobox is currently 6, you don't get directed to a page, but rather get a warning on the same page that you can't use value 6 from the combobox? If it's any value other than 6, it just does the same onclick function it always does. I'm also relatively new to Javascript, so that's why I can't currently wrap my head around this.
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38226834
has answer: http://stackoverflow.com/a/24659450
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24659489
tagged with: combobox
has comment: http://stackoverflow.com/comment/38226800

http://stackoverflow.com/comment/38155748
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24620522
type: QuestionComment
has text: Point taken,. ive made changes but still it doesnt work here is my script section http://jsfiddle.net/y5V6R/2/

http://stackoverflow.com/a/24656342
answers question: http://stackoverflow.com/q/24655807
accepted answer of: http://stackoverflow.com/q/24655807
has body: Try something like this: var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var perc = 0.1; var maxWidth = 200; var maxHeight = 100; $(document).ready(function() { $("#my_input").keyup(function(event) { // Allow only backspace and delete if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 37) { //$("#myCanvas").animate({ opacity: 0.25 }); } else { // Ensure that it is a number and stop the keypress if (event.keyCode &lt; 48 || event.keyCode &gt; 57) { event.preventDefault(); } } perc = Number.parseInt($("#my_input").val()) / 100 ; draw(); }); function draw(){ // clear context.clearRect(0, 0, 1000, 1000); var x = 188; var y = 50; // outline context.beginPath(); context.rect(x, y, maxWidth, maxHeight); context.lineWidth = 7; context.strokeStyle = 'black'; context.stroke(); // fill context.beginPath(); context.fillStyle = 'yellow'; context.rect(x, y, maxWidth * perc, maxHeight); context.fill(); } draw(); });
has comment: http://stackoverflow.com/comment/38250977
has comment: http://stackoverflow.com/comment/38231738
has comment: http://stackoverflow.com/comment/38250883
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38231368
type: Answer

http://stackoverflow.com/a/24726839
type: AcceptedAnswer
type: Answer
has body: Why don't you call geocode in the xhr.onreadystatechange event? xhr.onreadystatechange = function() { if(xhr.readyState == 4 &amp;&amp; xhr.status == 200) { text = xhr.responseText; lines = text.split("\n"); address = lines[numberAddress]; numberAddress = numberAddress + 1; doGeocode(); } } And the logic of doGeocode function is not modified function doGeocode() { geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert('Geocode was not successful for the following reason: ' + status); } }); PS: I really suggest you to do the Ajax stuffs with jQuery if feasible. Reinventing the wheel is not good most of the time. http://learn.jquery.com/ajax/
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24726770
answers question: http://stackoverflow.com/q/24726770
upvote count: 1

http://stackoverflow.com/comment/38104997
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24591380
score: 0
has text: Yeah, that's exactly what I meant. Except I only want to get the coordinates of the crop's top/left position. Because then I'll pass the info to my PHP script.

http://stackoverflow.com/q/24686210
type: Question
has answer: http://stackoverflow.com/a/24689272
answer count: 1
tagged with: javascript
score: 0
tagged with: ember.js
has body: Handlebars templates in ember.js applications are within "script" tags. Third party widgets, ads, and whatnot often is another "script" which document.writes something in the place it's inserted. Script withing a script tag will not work, so is there a way to handle then within ember applications?
has title: Handling JavaScript script-tag widgets within ember.js applications
type: UnansweredQuestion

http://stackoverflow.com/comment/38335016
type: Comment
comment on: http://stackoverflow.com/q/24716469
score: 0
type: QuestionComment
has text: @Dwza I'm constructing this page with 3 different PHP views - the wrapper has the overall "stuff" identifier I need to use.

http://stackoverflow.com/q/24724600
linked to: http://stackoverflow.com/q/28682104
has title: Polymer core-header-panel and on-scroll
tagged with: events
has comment: http://stackoverflow.com/comment/46537483
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: polymer
type: Question
has comment: http://stackoverflow.com/comment/65158180
downvote count: 0
tagged with: javascript
has body: I'm using &lt;core-drawer-panel/&gt; and &lt;core-header-panel/&gt; to layout my app. Inside &lt;core-header-panel/&gt; I have &lt;core-toolbar/&gt; and &lt;div/&gt; elements. Now, when I set a content into DIV element (which is a list of element) it becomes scrollable. I want to load next part of content automatically when the user scrolls down to the last element. The problem is that I can't access to scroll event on &lt;core-header-panel/&gt;. Event is fired inside this element on #mainContainer div. I can't access this event from &lt;core-header-panel/&gt;. Does anyone have a workaround for this issue?
favorite count: 0

http://stackoverflow.com/comment/38095206
type: Comment
has text: far too much use of `each` . Can perform most jQuery methods on the whole collection. `$(selector)` creates an array of the elements within the jQuery object
type: QuestionComment
comment on: http://stackoverflow.com/q/24589969
score: 0

http://stackoverflow.com/q/24702918
has body: Okay, so I'm totally new to everything website-related, and I'm trying to figure out how to make it so that when a link is clicked in my header navbar, the link will be underlined. Here's my HTML, including the CSS for the active link. Now, for the javascript - to make the link active - what file do I use (I'm using Bootstrap 3.2.0 btw)? Do I use bootstrap.js, or do I create my own - like I did for my CSS. If you could walk me through it, that would be great. Thanks. edit: HTML: 1 2 3 3.1 3.2 4 CSS: .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #ffffff; /* text color for active */ background-color: #ff0000; /*text-decoration: underline;*/ }
has answer: http://stackoverflow.com/a/24703072
tagged with: underline
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38338209
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24703104
has title: Underlining link upon click using javascript
has comment: http://stackoverflow.com/comment/38308583
linked to: http://stackoverflow.com/q/11098462
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24703104
tagged with: twitter-bootstrap-3
possible better answer: http://stackoverflow.com/a/24703072

http://stackoverflow.com/comment/38308868
type: AnswerComment
type: Comment
has text: Just looked at the site and it looks like the OP fixed the code, it loaded fine for me.
comment on: http://stackoverflow.com/a/24702985
score: 0

http://stackoverflow.com/a/24615243
has body: You want to create this kind of directive: .directive('ngVisible', function () { return function (scope, element, attr) { scope.$watch(attr.ngVisible, function (visible) { element.css('visibility', visible ? 'visible!important' : 'hidden!important'); }); }; }) You will choose between ng-visible and ng-show/ng-hide, regarding your use case.
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/24615188
score: 0
type: Answer

http://stackoverflow.com/a/25291809
has comment: http://stackoverflow.com/comment/43842812
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/43883534
downvote count: 0
answers question: http://stackoverflow.com/q/24644993
has comment: http://stackoverflow.com/comment/45742829
has body: I don't know if it's the same issue I had: when using &lt;core-pages&gt; it was scrolling beyond the content of the smaller tabs. Each pages had the same size as the biggest page. Nothing worked except replacing &lt;core-pages&gt; with &lt;animated-core-pages&gt; which made the problem magically disappear. I had a similar problem with &lt;core-scaffold&gt; from the starter project which was different from the version downloaded by bowser (the same day). A bug disappeared when using the latter. Tldr: Maybe the starter project is not up-to-date. PS: this fixed the pages size problem not the fact that the scroll position is keeped across pages.
score: 4

http://stackoverflow.com/q/24746175
accepted answer: http://stackoverflow.com/a/24760703
upvote count: 6
tagged with: javascript
has title: How can I "disable" require.js at runtime?
has comment: http://stackoverflow.com/comment/38397091
has comment: http://stackoverflow.com/comment/38394420
downvote count: 0
answer count: 1
favorite count: 0
has body: My team and I have an AngularJS app that does not use RequireJS but is loaded within the context of an existing site which uses RequireJS. During the build process I am minifying/concatenating all our scripts into a single JS file which includes certain vendor libs like Lodash, Moment, etc. Running the site isolated from the parent is fine, but within the context of the parent application I get the well-documented error: Uncaught Error: Mismatched anonymous define() module: function () { return _; } I don't have control of the parent application, is there a way at runtime to "disable" RequireJS or configure it to ignore my scripts? The current solution we have is to modify the vendor libs and remove the AMD code, but this is undesired because we use Bower (with grunt-bower-install) and would like to just update dependencies automatically rather than rely on manual processes and custom hacks.
tagged with: angularjs
score: 6
tagged with: requirejs
has comment: http://stackoverflow.com/comment/38394403
type: AnsweredQuestion
tagged with: amd
has comment: http://stackoverflow.com/comment/38396255
type: Question
has answer: http://stackoverflow.com/a/24760703

http://stackoverflow.com/comment/38368936
comment on: http://stackoverflow.com/q/24734153
has text: What do you mean "according to the parent child" ??
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24712398
upvote count: 4
tagged with: iphone
downvote count: 0
tagged with: ios
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have a single page application built in Phonegap and I had been having problems with iOS device (not android) whilst using: document.querySelector('page').scrollTop = 0; If i navigate to a different page and the view I just came from had scrollTop //38 it would keep the same scrollTop //38 as I only changed content inside of page. So I would use the above jS to edit the scroll top, so doing this: document.querySelector('page').scrollTop //outputs 38 Fantastic, however when i touch the screen it would jump down 38pxand resetting scrollTop = 38. If i remove page { -webkit-overflow-scrolling: touch; } Then this problem would no longer occur, but also smooth scrolling would stop and would only scroll so long as your were touching the screen. Does anybody now how I can use scrollTop correctly whilst keeping this sliding effect natively active?
tagged with: css
score: 4
has comment: http://stackoverflow.com/comment/43350920
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24712792
linked to: http://stackoverflow.com/q/2863547
type: Question
has title: scrollTop doesn't work with -webkit-overflow-scrolling: touch

http://stackoverflow.com/q/24707539
has title: JQuery .animate() doesn't animate. Instead, it waits duration and immediately makes the change
has comment: http://stackoverflow.com/comment/38318292
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38317831
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38317951
tagged with: animation
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/38317900
has body: This is the most frustrating thing ever. Instead of animating smoothly like it's supposed to, for some reason, it waits for the full duration of the animation (1000ms) and then immediately sets the height of my .nowGone div. I'm using IE 11. Here's my HTML: Show Here's my CSS: .more { width: 100%; text-align: center; padding: 10px 0; position: relative; display: block; } .nowGone { display: none; overflow: hidden; height: auto; } Here's my JQuery: $(function () { $(".nowGone").css('display', 'block'); var goneheight = $(".nowGone").css('height'); $(".nowGone").css('height', '0px'); $(".more").find("a").mousedown(function() { $(".nowGone").animate({ height : goneheight }, 1000); }); });
type: Question
tagged with: jquery-animate

http://stackoverflow.com/a/24595927
has comment: http://stackoverflow.com/comment/38108172
has body: In prepareAutocomplete("path/to/script/that/returns/results", ['listID' =&gt; 'employee_list', 'hiddenID' =&gt; 'employee']); I am not sure I understand what you mean by ['listID' =&gt; 'employee_list', 'hiddenID' =&gt; 'employee']. I think you meant to write [{'listID': 'employee_list', 'hiddenID': 'employee'}] which means that per your design, if you want to work with multiple autocomplete binds, you would have to call the function as follows: prepareAutocomplete("path/to/script/that/returns/results", [{'listID': 'employee_list1', 'hiddenID': 'employee1'}, {'listID': 'employee_list2', 'hiddenID': 'employee2'}, {'listID': 'employee_list3', 'hiddenID': 'employee3'}]); Then your for loop need a closure as follows: for(var key in idArray){ (function( arr ) { $('#' + arr.listID).autocomplete({ source: items, messages: { noResults : '', results: function(){} }, select: function(event, ui){ this.value = ui.item.label; return false; }, change: function(event, ui){ if(this.value == '' || this.value == null){ $("#" + arr.hiddenID).val(''); }else if(ui.item != null){ $("#" + arr.hiddenID).val(ui.item.value); } } }); })( idArray[key] ); }
has comment: http://stackoverflow.com/comment/38108178
type: Answer
has comment: http://stackoverflow.com/comment/38107652
answers question: http://stackoverflow.com/q/24595655
has comment: http://stackoverflow.com/comment/38108089
accepted answer of: http://stackoverflow.com/q/24595655
has comment: http://stackoverflow.com/comment/38108042
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/38366889
comment on: http://stackoverflow.com/a/24732869
type: AnswerComment
score: 0
type: Comment
has text: `document.body` does **not** yet exist at `document_start`. If I remember correctly, `document.documentElement` does.

webrtc
tags question: http://stackoverflow.com/q/24624993
tags question: http://stackoverflow.com/q/24671308
tags question: http://stackoverflow.com/q/24731913
tags question: http://stackoverflow.com/q/24677005
type: Tag
tag name: webrtc

http://stackoverflow.com/comment/38273036
type: Comment
type: QuestionComment
has text: In which event do you assign value for `hiddenOriginalStatus`?. Any reason why don't you trigger the `onchange` from the code behind?
comment on: http://stackoverflow.com/q/24683173
score: 0

http://stackoverflow.com/comment/38280997
comment on: http://stackoverflow.com/a/24687401
type: Comment
has text: Oh my gosh, I knew it would be something silly but that was too stupid of me. I figured that hypothetically even if the logic was flawed, if it always returned false (I edited it in one of my tests) the form shouldn't go through so I was really confused. Well, not like I've studied more than a few hours of JS before today, so I guess this was bound to happen haha. Thank you, wish I could upvote!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/94153243
type: Comment
has text: Thanks. My answer responds not a slightly larger scope than the issue we're looking at here, which is that callbacks can be difficult to debug, or read, so I wanted to mention this solution as a a better, IMHO, implementation of asynchronous coding, which in turn may help to debug the current issue more easily.
comment on: http://stackoverflow.com/a/53630406
type: AnswerComment
score: 0

http://stackoverflow.com/a/24686578
type: Answer
has comment: http://stackoverflow.com/comment/38278364
has comment: http://stackoverflow.com/comment/38278438
upvote count: 1
answers question: http://stackoverflow.com/q/24686498
score: 1
has comment: http://stackoverflow.com/comment/38278595
downvote count: 0
has body: Try this. (I haven't tested it yet, but it makes sense!) function returnLargestArray(a, b) { if (a.length &gt; b.length) { return console.log("winner: "+ a.name); } else { return console.log("winner: "+ b.name); } } If they're the same length that will fail, but you get the idea.
has comment: http://stackoverflow.com/comment/38278415
has comment: http://stackoverflow.com/comment/38278636
has comment: http://stackoverflow.com/comment/38278502

http://stackoverflow.com/comment/38293787
has text: ya i can understood, for that you can use ajax to get the data and create this datalist in javascript
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24695236
type: Comment

http://stackoverflow.com/q/24719217
answer count: 1
has comment: http://stackoverflow.com/comment/38340590
tagged with: jquery
type: UnansweredQuestion
has title: How to open Fancybox without trigger('click')?
has comment: http://stackoverflow.com/comment/38354550
tagged with: fancybox
has answer: http://stackoverflow.com/a/33393415
tagged with: triggers
has comment: http://stackoverflow.com/comment/38340728
type: Question
tagged with: javascript
has body: Can't found way to open Fancybox window http://fancyapps.com/fancybox/ with options, and callbacks. Without trigger('click') => this is working WRONG. If try to click usual link in opened fancy window - it just reopend. This is bug. You can see fancy greeting window here: http://noveogroup-test.esy.es/# CODE: setTimeout(function(){ if (!$.cookie('greeting')) { $.cookie('greeting', true); $('.greeting').fancybox({ 'beforeLoad': function(){$('.body').css('-webkit-filter', 'blur(6px)')}, 'afterClose': function(){$('.body').css('-webkit-filter', 'blur(0px)')}, 'openSpeed': 1000, 'closeSpeed': 500, 'padding': 20 }).trigger('click'); } }, 1000);
score: 0
has comment: http://stackoverflow.com/comment/38340766

http://stackoverflow.com/a/24675720
answers question: http://stackoverflow.com/q/24675318
has body: You can set different context.lineWidth to set the cursor size. I've updated the code with that. function redraw() { clickSize.length = 0; context.clearRect(0, 0, context.canvas.width, context.canvas.height); //context.strokeStyle = "#df4b26"; context.lineJoin = "round"; //context.lineWidth = 5; for (var i = 0; i &lt; clickX.length; i++) { context.beginPath(); if (clickDrag[i] &amp;&amp; i) { context.moveTo(clickX[i - 1], clickY[i - 1]); } else { context.moveTo(clickX[i] - 1, clickY[i]); } context.lineTo(clickX[i], clickY[i]); context.closePath(); context.strokeStyle = clickColor[i]; context.lineWidth = cursorSize; //alert('radius is'+context.lineWidth) context.stroke(); } } $('#choosesmall').click(function () { curSize = "small"; cursorSize = 1; }); $('#choosenormal').click(function () { curSize = "normal"; cursorSize = 3; }); $('#chooselarge').click(function () { curSize = "large"; cursorSize = 5; }); $('#choosehuge').click(function () { curSize = "huge"; cursorSize = 7; }); See the Fiddle Edit $(document).ready(function () { /* Declaration global Variables */ var clickX = new Array(); var clickY = new Array(); var clickDrag = new Array(); var paint; var context; var canvas; var colorPurple = "#cb3594"; var colorGreen = "#659b41"; var colorYellow = "#ffcf33"; var colorBrown = "#986928"; var colorRed = "#ff0000"; var curColor = colorPurple; var clickColor = new Array(); var clickSize = new Array(); var curSize = 1; /* End of Declaring Global Variables */ context = document.getElementById('myNewCanvasColumn').getContext("2d"); var canvasDiv = document.getElementById('canvasDiv'); canvas = document.createElement('canvas'); canvas.setAttribute('width', 700); canvas.setAttribute('height', 300); canvas.setAttribute('id', 'canvas'); canvasDiv.appendChild(canvas); if (typeof G_vmlCanvasManager != 'undefined') { canvas = G_vmlCanvasManager.initElement(canvas); } var radius; var i = 0; context = canvas.getContext("2d"); /* Event Handlers for drawing */ $('#canvas').mousedow…
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24675318
has comment: http://stackoverflow.com/comment/38285704
type: Answer
has comment: http://stackoverflow.com/comment/38258123
score: 0

http://stackoverflow.com/q/24689690
has comment: http://stackoverflow.com/comment/38284444
accepted answer: http://stackoverflow.com/a/24689761
tagged with: javascript
downvote count: 5
upvote count: 0
answer count: 1
tagged with: jquery
has body: I want to get the simple table format from the json(results array) below, I wish to use jquery .each. I tried this code but how to get the object? I tried v.subject but doesn't work. $.getJSON( "http://127.0.0.1:8000/ajax/list/?page=1&format=json", function( data ) { $.each( data, function() { $.each( this, function( i, v ) { console.log( v ); }); }); }); result of console.log(v) Object { subject="ronald birthday", date="2014-06-13", time_start="11:17 PM"} Object { subject="ronald birthday", date="2014-06-19", time_start="7:17 PM"} This is the format table Rita Birthday Oct. 18, 2014 11:27 PM This is the json but only the results array should be in the table: {"count": 18, "next": "http://www.nothingonlytest.com/ajax/list/?page=2&format=json", "previous": null, "results": [{"subject": "ronald birthday", "date": "2014-06-13", "time_start": "11:17 PM"}, {"subject": "ronald birthday", "date": "2014-06-19", "time_start": "7:17 PM"}, {"subject": "Rita Birthday", "date": "2014-10-18", "time_start": "11:27 PM"}, {"subject": "tt", "date": "2014-06-27", "time_start": "10:31 PM"}, {"subject": "tt", "date": "2014-06-13", "time_start": "10:31 PM"}, {"subject": "group event", "date": "2014-06-14", "time_start": "3:31 AM"}, {"subject": "test message", "date": "2014-06-17", "time_start": "3:32 AM"}, {"subject": "test event message", "date": "2014-06-14", "time_start": "3:34 AM"}, {"subject": "fd", "date": "2014-06-20", "time_start": "3:36 AM"}, {"subject": "fdf", "date": "2014-06-14", "time_start": "3:38 AM"}]}
favorite count: 0
has title: jquery json inside array to html table
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24689761
type: AnsweredQuestion
score: -5
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/q/24688439
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/24691372
has body: Having some trouble getting validation to work for Email and Phone on an input field. Basically I'm after validation on the email input when it is selected. Phone validation - mainly to check for numbers used. I found jQuery Validate and referenced that in my demo. This is my first time to Reg Ex Validation and got a little confused so was hoping someone could help me on that front. The phone validation is working however, I can't seem to figure out how to meet the requirements of the field when testing. It's also asking email as a required field. Ultimately, a user has to input either a valid email or phone number so validation or error handling will need to be done for that too which I can do. DEMO HERE Here is my jQuery: var ebuForm = { init : function() { ebuForm.showInput(); ebuForm.validatePhone(); }, showInput : function(e) { var radioInput = $("input[type='radio']"), emailRadio = $("input[value='email']"); radioInput.change(function(){ var emailInput = $('.email-input'), phoneInput = $('.phone-input'); if($(this).val() =="email") { emailInput.show(); phoneInput.hide(); console.log('Email Enabled'); } else { emailInput.hide(); phoneInput.show(); console.log('Phone Enabled'); } }); emailRadio.prop('checked', true).trigger("change"); }, validatePhone : function() { $('#myform').validate({ rules: { phone: { phoneUS: true, required: true } }, submitHandler: function(form) { // for demo alert('valid form'); return false; } }); } }; $(function() { ebuForm.init(); });
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38281999
has title: Email Address and Phone Validation | jQuery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38282278

arrays
tags question: http://stackoverflow.com/q/24739935
tags question: http://stackoverflow.com/q/24731270
tags question: http://stackoverflow.com/q/24629299
tags question: http://stackoverflow.com/q/24601062
tags question: http://stackoverflow.com/q/24718423
tags question: http://stackoverflow.com/q/24731435
tags question: http://stackoverflow.com/q/24739291
tags question: http://stackoverflow.com/q/24713174
tags question: http://stackoverflow.com/q/24727047
tags question: http://stackoverflow.com/q/24682843
type: Tag
tags question: http://stackoverflow.com/q/24717560
tags question: http://stackoverflow.com/q/24666758
tags question: http://stackoverflow.com/q/24684619
tags question: http://stackoverflow.com/q/24616463
tags question: http://stackoverflow.com/q/24711252
tags question: http://stackoverflow.com/q/24743516
tags question: http://stackoverflow.com/q/24736157
tags question: http://stackoverflow.com/q/24662764
tags question: http://stackoverflow.com/q/24627008
tags question: http://stackoverflow.com/q/24744381
tags question: http://stackoverflow.com/q/24726279
tags question: http://stackoverflow.com/q/24648386
tags question: http://stackoverflow.com/q/24605893
tags question: http://stackoverflow.com/q/24683200
tags question: http://stackoverflow.com/q/24619829
tags question: http://stackoverflow.com/q/24644490
tags question: http://stackoverflow.com/q/24626070
tags question: http://stackoverflow.com/q/24703098
tags question: http://stackoverflow.com/q/24688520
tags question: http://stackoverflow.com/q/24615766
tags question: http://stackoverflow.com/q/24728020
tags question: http://stackoverflow.com/q/24594241
tags question: http://stackoverflow.com/q/24609013
tags question: http://stackoverflow.com/q/24659861
tags question: http://stackoverflow.com/q/24596316
tags question: http://stackoverflow.com/q/24690986
tags question: http://stackoverflow.com/q/24655055
tags question: http://stackoverflow.com/q/24670397
tags question: http://stackoverflow.com/q/24728440
tags question: http://stackoverflow.com/q/24589969
tags question: http://stackoverflow.com/q/24722238
tags question: http://stackoverflow.com/q/24652134
tags question: http://stackoverflow.com/q/24744596
tags question: http://stackoverflow.com/q/24628109
tags question: http://stackoverflow.com/q/24726196
tags question: http://stackoverflow.com/q/24658302
tags question: http://stackoverflow.com/q/24685293
tags question: http://stackoverflow.com/q/24635150
tags question: http://stackoverflow.com/q/24716160
tags question: http://stackoverflow.com/q/24643590
tags question: http://stackoverflow.com/q/24712625
tags question: http://stackoverflow.com/q/24703288
tags question: http://stackoverflow.com/q/24666030
tags question: http://stackoverflow.com/q/24622138
tags question: http://stackoverflow.com/q/24595005
tags question: http://stackoverflow.com/q/24710546
tags question: http://stackoverflow.com/q/24625790
tags question: http://stackoverflow.com/q/24627026
tags question: http://stackoverflow.com/q/24594429
tags question: http://stackoverflow.com/q/24746785
tags question: http://stackoverflow.com/q/24718014
tag name: arrays
tags question: http://stackoverflow.com/q/24609185
tags question: http://stackoverflow.com/q/24674748
tags question: http://stackoverflow.com/q/24710306
tags question: http://stackoverflow.com/q/24716429
tags question: http://stackoverflow.com/q/24611754
tags question: http://stackoverflow.com/q/24738208
tags question: http://stackoverflow.com/q/24689140
tags question: http://stackoverflow.com/q/24683044
tags question: http://stackoverflow.com/q/24615999
tags question: http://stackoverflow.com/q/24722489
tags question: http://stackoverflow.com/q/24596606
tags question: http://stackoverflow.com/q/24731337
tags question: http://stackoverflow.com/q/24708688
tags question: http://stackoverflow.com/q/24610545
tags question: http://stackoverflow.com/q/24679256
tags question: http://stackoverflow.com/q/24658666
tags question: http://stackoverflow.com/q/24738765

http://stackoverflow.com/q/24699694
has answer: http://stackoverflow.com/a/24699906
answer count: 3
downvote count: 3
tagged with: validation
has comment: http://stackoverflow.com/comment/38302918
favorite count: 0
has comment: http://stackoverflow.com/comment/38302430
accepted answer: http://stackoverflow.com/a/24699763
has title: Javascript validation - Min/Max number of characters AND must contain number
has comment: http://stackoverflow.com/comment/38302980
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38302436
has answer: http://stackoverflow.com/a/24699763
has comment: http://stackoverflow.com/comment/38302295
type: Question
has body: I have the following problem: I need to validate an input (password field) with Javascript / jQuery The rules are: it must be 8 to 32 characters it must contain letters AND at least one number So my logic is the following but I can't seem to be able to implement it be 8 to 32 if it's NOT 8 to 32 characters and doesn't have numbers { jQuery('#passwordfield').addClass('error'); } I tried the following (just with 0 as number, for test purposes) if(((jQuery('#passwordfield').val().length &lt;= 7) || (jQuery('#passwordfield').val().length &gt;= 33)) &amp;&amp; ((jQuery('#passwordfield').val().indexOf("0") == -1))) { jQuery('#passwordfield').addClass('error'); } The problem with the above code is that it returns true if you type enough characters (8 to 32) and NOT contain a number since the first part of the &amp;&amp; is true
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24699909
possible better answer: http://stackoverflow.com/a/24699906
upvote count: 3
score: 0

http://stackoverflow.com/comment/38201536
has text: Everything you need to know about [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).
comment on: http://stackoverflow.com/q/24645449
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24657590
has body: I think's it's quite an easy one but I can't find a way to solve it myself. I'd like to access the value of a variable in my Server.R file (I'm using Shiny) in my javascript file. My var "i" in myFile.js should take the value of my R variable "number". How should I proceed ? Example : Server.R ... number &lt;- 5 ... myFile.js ... var i = ??? // var i = number *is not working* ... Thanks for your help, Matt
answer count: 1
has title: Accessing a value from Server.R into .js file
favorite count: 0
tagged with: shiny
accepted answer: http://stackoverflow.com/a/24658346
has comment: http://stackoverflow.com/comment/38228540
upvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38226699
downvote count: 0
has answer: http://stackoverflow.com/a/24658346
linked to: http://stackoverflow.com/q/20948302
type: Question
has comment: http://stackoverflow.com/comment/38225352
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/38225387
has comment: http://stackoverflow.com/comment/38224232
has comment: http://stackoverflow.com/comment/38226506
tagged with: http://stackoverflow.com/tag/r

http://stackoverflow.com/q/24594689
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38104460
has body: When I try to console.log an object in Chrome, it states in the first line of the console.log (where you see Object { small summary here } that my posts array is of length 0 (posts: Array[0]). However when I expand the post it shows that it has 27 items in it (which is what I need). This happens to me randomly and I got no idea why it is happening, anybody experienced this before? Screenshot: Update: This happens in all browsers, so it is probably not chrome related
upvote count: 6
has answer: http://stackoverflow.com/a/24595077
favorite count: 0
score: 6
has comment: http://stackoverflow.com/comment/38104446
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24595077
has comment: http://stackoverflow.com/comment/38104726
type: Question
possible better answer: http://stackoverflow.com/a/24597534
answer count: 2
has title: Weird behaviour in chrome object console.log
has answer: http://stackoverflow.com/a/24597534
tagged with: arrays

http://stackoverflow.com/q/24633451
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24633628
has comment: http://stackoverflow.com/comment/38179061
tagged with: ajax
has title: Call a jquery function on ajax returned html
has body: I have a scenario where I have a code like this HTML &lt;input type="submit" value="" name="submit" id="slider1"&gt; SCRIPT $(document).ready(function() { $("#slider1").Slider(); }); when document loads, some stuff is done to my input box by my Slider() function. The issue am facing is that, am replacing the same input box html on ajax return and can't get my Slider() called. AJAX RETURN ... success: function(data) { // This was removing the wrapper element, all the other calls // to $('#slider1') were doing nothing //$("#slider1").remove(); $("#slider1").html('&lt;input type="submit" value="{{ some variable }}" name="submit" id="slider1"&gt;'); } ... I was thinking of calling the Slider() function inside the input box so that it will be called, something like: $("#slider1").html('&lt;input type="submit" callSliderFunction="Slider()" value="{{ some variable }}" name="submit" id="slider1"&gt;'); Is it possible to call it there? If not How can I achieve this? Thanks
answer count: 3
has comment: http://stackoverflow.com/comment/38180252
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24633578
possible better answer: http://stackoverflow.com/a/24633578
has answer: http://stackoverflow.com/a/24633628
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38181177
has comment: http://stackoverflow.com/comment/38180311
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/24633722
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38124365
comment on: http://stackoverflow.com/q/24604839
type: Comment
score: 0
has text: actually i have few functions which are wrapped around `$(document).ready(function() { /*code here*/ });`. My be `jquery.cookie.js` is not being called properly
type: QuestionComment

validation
tags question: http://stackoverflow.com/q/24607375
tags question: http://stackoverflow.com/q/24731412
tags question: http://stackoverflow.com/q/24744440
tags question: http://stackoverflow.com/q/24695419
tags question: http://stackoverflow.com/q/24670947
tags question: http://stackoverflow.com/q/24696062
tags question: http://stackoverflow.com/q/24746707
tags question: http://stackoverflow.com/q/24598879
tags question: http://stackoverflow.com/q/24716988
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/24642228
tags question: http://stackoverflow.com/q/24738031
tags question: http://stackoverflow.com/q/24659515
tags question: http://stackoverflow.com/q/24727841
tags question: http://stackoverflow.com/q/24695593
tags question: http://stackoverflow.com/q/24732745
tags question: http://stackoverflow.com/q/24607756
tags question: http://stackoverflow.com/q/24716516
tags question: http://stackoverflow.com/q/24687208
tags question: http://stackoverflow.com/q/24661844
tags question: http://stackoverflow.com/q/24637740
tags question: http://stackoverflow.com/q/24693722
tags question: http://stackoverflow.com/q/24689152
tags question: http://stackoverflow.com/q/24596063
tags question: http://stackoverflow.com/q/24746351
tags question: http://stackoverflow.com/q/24699368
tags question: http://stackoverflow.com/q/24644595
tags question: http://stackoverflow.com/q/24593234
tags question: http://stackoverflow.com/q/24637228
tags question: http://stackoverflow.com/q/24699694
tags question: http://stackoverflow.com/q/24681696
tags question: http://stackoverflow.com/q/24737098
tags question: http://stackoverflow.com/q/24707258
tags question: http://stackoverflow.com/q/24720369
tags question: http://stackoverflow.com/q/24746719
tags question: http://stackoverflow.com/q/24741308

http://stackoverflow.com/a/24650183
has body: Try using: window.location.href = link; MDN source
downvote count: 0
answers question: http://stackoverflow.com/q/24650136
type: Answer
score: 11
upvote count: 11

http://stackoverflow.com/q/24663431
has comment: http://stackoverflow.com/comment/38235405
downvote count: 0
score: 1
has body: I know I can check to see if an object contains any instances of a prototype like this: for (var key in obj) { if ((obj[key] instanceof head) || (obj[key] instanceof body)) { console.log("Key Accepted: " + obj[key]); } } And I know I can check to see if an object is a member of a list of objects: var fruitBasket = ["Banana", "Orange", "Apple", "Mango"]; if (fruitBasket.indexOf("Apple") !== -1) { console.log("There's an apple in this fruit basket!"); } But how can I check to see if an object is an instance of a certain set of prototypes?
type: Question
has answer: http://stackoverflow.com/a/24663555
accepted answer: http://stackoverflow.com/a/24663555
tagged with: indexof
tagged with: javascript
tagged with: prototype
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38236056
favorite count: 0
type: AnsweredQuestion
has title: How can I check to see if an object is an instance of a certain set of prototypes in JavaScript?

http://stackoverflow.com/a/24643708
has body: Maybe I'm missing something but does this solve your problem? http://jsfiddle.net/p4s6z/2/ HTML: Select a manufacturer Brother Javascript: $('select').on('change',function(){ $('.select-widget').click(); }); EDIT updated to use on, thanks @jme11
has comment: http://stackoverflow.com/comment/38198391
upvote count: 1
has comment: http://stackoverflow.com/comment/38198443
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24643578

http://stackoverflow.com/q/24670692
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24671159
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/38248480
answer count: 2
tagged with: printing
possible better answer: http://stackoverflow.com/a/62026564
has answer: http://stackoverflow.com/a/62026564
downvote count: 0
tagged with: jquery
tagged with: asp.net
favorite count: 0
has body: Html: @Html.Raw(Model.Content) Print Javascript: function Print() { alert("working"); $("#printDiv").printThis(); } When i click to Print button , i want to print div content.However if i click to button, i get below exception for javascript code. Uncaught TypeError: undefined is not a function I do not have any idea Where i miss exactly ? Any help will be appreciated. Thanks.
accepted answer: http://stackoverflow.com/a/24671159
has title: Javascript print div content in asp.net mvc
score: 1

http://stackoverflow.com/a/24617477
type: Answer
upvote count: 1
score: 1
has body: $("#ctlPerson, #ctlPerson2, #ctlPerson3" ).change(); http://api.jquery.com/multiple-selector/
downvote count: 0
answers question: http://stackoverflow.com/q/24617422

http://stackoverflow.com/q/24634540
tagged with: jsp
tagged with: javascript
tagged with: jquery
has title: AJAX using Jquery not working across JSP pages
tagged with: ajax
answer count: 2
has answer: http://stackoverflow.com/a/24634965
accepted answer: http://stackoverflow.com/a/24634965
has body: I am developing a dynamic web application using the following technologies on Eclipse Luna : JSP for server-side scripting, Apache Tomcat v7.0, Oracle 11g as my database and Jquery. Below is my first .jsp page which is an elementary registration page : <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> Welcome <%@include file="Home.jsp" %> User Name Email ID Password This page gathers user credentials and on form submission the following javascript is triggered: $(document).ready(function() { $('#submit').click(function() { var result=validateForm(); if(result===false) return result; else checkUsername(); });} ); function validateForm() { //does usual validation like empty string etc.. } function checkUsername() { $.ajax( { url:"RegisterProcess.jsp", data:$("#login").serialize(), type:"post", dataType:"json", success:function(data) { $("#unamecheck").text(data); }, error: function( xhr, status, errorThrown ) { alert( "Sorry, there was a problem!" + status + errorThrown); console.log( "Error: " + errorThrown ); console.log( "Status: " + status ); console.dir( xhr ); }, complete:function(xhr,status) { alert( "The request is complete!" ); } }); } The jsp page being referenced is : <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> Processing <%@page import="bean.RegisterDao"%> <jsp:useBean id="obj" class="bean.User"/> <jsp:setProperty name="obj" property="*"/> <% final int status=RegisterDao.register(obj); if(status>0) out.print("You are successfully registered"); else out.print("Username already exists!"); %> When I press submit the form, I get the alert message :"Sorry, there was a problem!error" followed by "The request is complete!" and then I'm redirected to the page RegisterProcess.jsp, which outputs the correct thing :"Username already exists" or "Registration successful". I have used Firebug to debug but could not decipher much. Any help would be much appreciated as I co…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24634935
score: 0
type: Question
possible better answer: http://stackoverflow.com/a/24634935

http://stackoverflow.com/comment/38358635
type: QuestionComment
has text: @Mike—concatenate all the text into one value, then write it using one *document.write* statement. There is no need for *document.open*, *document.write* calls that if required (keep *document.close*).
score: 0
comment on: http://stackoverflow.com/q/24728499
type: Comment

http://stackoverflow.com/comment/38123136
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24604310
score: 1
has text: That depend on where you have place the script. If your script is in head tag, you should wrap it in dom ready. If you script is placed after those elements, you needn't use dom ready.

http://stackoverflow.com/q/24624807
has comment: http://stackoverflow.com/comment/38162906
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38163487
has comment: http://stackoverflow.com/comment/38162985
has body: I am working on Angular UI for making my menus sortable, sometimes the code works and sometimes its breaks like duplicating the entries or filling the blank menus when I am re arranging items. Following is the full code - Angular Sortable Demo {{item}} {{item}} Also If someone could help me while creating this in JSFiddle as I tried this but unable to set it as a fiddle - Fiddle Link EDIT- This is how it becomes at times Screenshot (Menu Items duplicated)
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/38163036
possible better answer: http://stackoverflow.com/a/24626043
has title: Angular UI Sortable not working properly
accepted answer: http://stackoverflow.com/a/24625172
has answer: http://stackoverflow.com/a/24626043
type: Question
score: 3
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/24625172
tagged with: javascript
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/38163544
has comment: http://stackoverflow.com/comment/38163271
tagged with: angular-ui

http://stackoverflow.com/comment/38355670
comment on: http://stackoverflow.com/q/24727093
type: Comment
type: QuestionComment
has text: The minified version of that library does not seem to have been rebuilt after the `.filter()` facility was added. If you load the unminified version into your JSBin, it works.
score: 1

http://stackoverflow.com/q/24709798
tagged with: ruby-on-rails-3
tagged with: assets
favorite count: 0
has answer: http://stackoverflow.com/a/24711063
type: UnansweredQuestion
score: -1
downvote count: 1
has body: I load the jQuery plugin in the head, Then run the function when DOM ready, However, I always got the TypeError: $(...).jSlots is not a function index.html.haml %head = javascript_include_tag "application" %script{charset: "utf-8", src: asset_path("jslot/jquery.jSlots.js"), type: "text/javascript"} jslot/jquery.jSlots.js (function($){ $.jSlots = function(el, options){ ~~~ index.js.coffescript $(document).ready -&gt; $('.fancy .slot').jSlots number : 1, winnerNumber : 1, spinner : '#playFancy', easing : 'easeOutSine', time : 7000, loops : 6, onStart: -&gt; $('.slot').removeClass('winner') onWin: (winCount, winners) -&gt; $.each winners, -&gt; @addClass "winner" return if winCount==1 console.log "hi" else if winCount &gt; 1 console.log "hi" return
type: Question
tagged with: javascript
upvote count: 0
answer count: 1
has title: TypeError: $(...).is not a function, how to execute the function after the jQuery plugin loaded
tagged with: jquery

http://stackoverflow.com/comment/38246126
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/24669717
has text: Events are not HTML, they're _javascript_. [This page](http://www.w3schools.com/jsref/event_onblur.asp) should tell you what these events are and how to use them.

kendo-ui
tags question: http://stackoverflow.com/q/24602910
tags question: http://stackoverflow.com/q/24622908
tags question: http://stackoverflow.com/q/24611267
type: Tag
tags question: http://stackoverflow.com/q/24631441
tags question: http://stackoverflow.com/q/24662960
tag name: kendo-ui
tags question: http://stackoverflow.com/q/24712387
tags question: http://stackoverflow.com/q/24739079
tags question: http://stackoverflow.com/q/24727545
tags question: http://stackoverflow.com/q/24687456
tags question: http://stackoverflow.com/q/24616719
tags question: http://stackoverflow.com/q/24655578
tags question: http://stackoverflow.com/q/24625254
tags question: http://stackoverflow.com/q/24722893
tags question: http://stackoverflow.com/q/24688540

http://stackoverflow.com/comment/38181795
type: Comment
comment on: http://stackoverflow.com/a/24634904
has text: So by this point, shouldn't it be fluid? If you're constraining, you risk the potential of it working across all iPads and not just the one you have, unless you have them all (or iOS simulator.) :D And you only need one media query to work for all selectors. In fact you don't need any, if you're strictly building it for the iPad. Percentages would work great too, then you wouldn't need to worry about landscape/portrait rotation. :) Anyway, answer is there. It __should__ work.
score: 0
type: AnswerComment

http://stackoverflow.com/a/24606213
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24605893
has body: You can use this helper function: function findInDict(dict, predicate) { for (var prop in dict) { if (dict.hasOwnProperty(prop) &amp;&amp; predicate(dict[prop], prop, dict)) { return prop; } } return null; }; } Then perform the search: // find property on main dictionary var prop = findInDict(dict, function(value, name) { // name is property name // value is property value return value[0].socketid == 'bVLmrV8I9JsSyON7AAAA'; }); if (prop === null) { // prop doesn't exist, so create one? }

http://stackoverflow.com/a/24595370
has body: First, you need to parse the incoming string as below: temp_arr = JSON.parse(json_string); Just loop over the temp_arr array, and in each iteration of loop you'll have one object (tobj). For example, like this: {"humidity":"40.9000","stationtime":"2014-07-06 21:21:03","temp":"22.6000","timestamp":"2014-07-06T11:20:27.231Z"} All you have to do is, access it like tobj.temp and use it to display on page. I have written a jquery implementation at: http://jsfiddle.net/DNH5n/2/
score: 2
has comment: http://stackoverflow.com/comment/38105600
answers question: http://stackoverflow.com/q/24595322
downvote count: 0
has comment: http://stackoverflow.com/comment/38118830
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/38105587

http://stackoverflow.com/q/24643508
duplicate of: http://stackoverflow.com/q/9011758
has comment: http://stackoverflow.com/comment/38197738
type: Question
has body: I have a string the represents a time "2014-07-03T11:47:00" I would like to covert this time to milliseconds and I think it should look something like the following. var myTime = Date.parse("2014-07-03T11:47:00"); var myTimeMs = myTime.getTime(); Any suggestions about how to get the value in milliseconds on any browser?
answer count: 1
tagged with: javascript
score: 0
has title: how do I convert date to milliseconds
has answer: http://stackoverflow.com/a/24643528
has comment: http://stackoverflow.com/comment/38197829
has comment: http://stackoverflow.com/comment/38198145
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38197776
linked to: http://stackoverflow.com/q/9011758
has comment: http://stackoverflow.com/comment/38197759

http://stackoverflow.com/a/36860493
score: 0
answers question: http://stackoverflow.com/q/24627076
type: Answer
has body: ?? And to toggle the iron-collapse elements inside the dom-repeat I use _showdetail: function(e){ Polymer.dom(e.currentTarget).querySelector('#collapse').toggle(); },

http://stackoverflow.com/comment/38315575
type: Comment
comment on: http://stackoverflow.com/a/24705819
has text: I used your script and the form sent the data directly to the PHP script
type: AnswerComment
score: 0

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

http://stackoverflow.com/q/24693089
has answer: http://stackoverflow.com/a/24693137
has answer: http://stackoverflow.com/a/24693286
type: Question
accepted answer: http://stackoverflow.com/a/24693286
has body: I need to perform a non-ajax post by clicking the submit of a form. Before submiting I have to add some additional form parameters. Here is how I do this: $("#my_form").on("submit", function (e) { e.preventDefault(); var data = $(this).serializeArray(); data.push({"name": "extra data1", "value": "extra value 1"}); var params = $.param(data); //what's next? //$.post($(this).attr("action"), data: params); // ajax request, I don't need an ajax request }); But how do I actually submit the form so it will send not only its parametes, but the additional ones I've added to it as well? Obviously, $(this).submit(); won't do this.
tagged with: javascript
tagged with: jquery
has title: Submitting a form (post, NOT ajax) with some additional parameters
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/24693161
downvote count: 0
linked to: http://stackoverflow.com/q/2408043
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24693161
score: 1
tagged with: forms

http://stackoverflow.com/comment/38263161
type: Comment
type: QuestionComment
has text: where are you running this code?
comment on: http://stackoverflow.com/q/24678730
score: 0

http://stackoverflow.com/q/24630625
has title: contensis cms adding a javascript file to template
has answer: http://stackoverflow.com/a/24660084
type: UnansweredQuestion
type: Question
tagged with: content-management-system
tagged with: javascript
has body: I'm working on the Contensis CMS system and I would like to know how to apply a javascript file to a template? I've tried to create a new template within the cms but it seems there isn't a way of using javascript. Thank you.
score: 0
answer count: 1

http://stackoverflow.com/comment/38169236
score: 0
type: Comment
has text: I have mentioned that my textbox is empty. . .but in html it shows the value and i am trying to access the value in document.getready function
type: QuestionComment
comment on: http://stackoverflow.com/q/24628351

http://stackoverflow.com/a/24597387
type: Answer
answers question: http://stackoverflow.com/q/24596099
score: 0
has body: It doesn't work because you haven't used static middleware (its usage described in the app.use section). To fix this error, create a directory (you may call it "static"), and put your .csv files there. Then add one of these lines to the server-side code: app.use(express.static(__dirname + '/static')); or app.use('/csv', express.static(__dirname + '/static')); If you choose the second line, you will have to specify d3.csv("/csv/totalbicis.csv", ... on the client-side.

http://stackoverflow.com/comment/38506191
type: Comment
has text: It worked – thanks for checking in. I am having some trouble in my code can see that I am repeating code because I am unsure of how to put it in a function and still make it still work. If you have time I could show you where I am stuck.
type: AnswerComment
comment on: http://stackoverflow.com/a/24708889
score: 0

http://stackoverflow.com/a/24652185
type: Answer
accepted answer of: http://stackoverflow.com/q/24652121
has body: Well, you don't need the .form in this case. $(function() { $('#candidate_filter').change(function() { this.submit(); }); });
downvote count: 0
answers question: http://stackoverflow.com/q/24652121
score: 5
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/q/24661008
accepted answer: http://stackoverflow.com/a/24661068
has body: I'm trying to build a WebSite but i'm running into some porblems when it comes down to use 2 versions of jquery qith the bootstrap system (also with bootstrap validator). First of all, i do already know there is a lot of questions in here about 2 versions of jquery, but i spent the last 2 days reading and trying to make this work, but i just can't! This is why i'm here. So, in my head tag i had set up the 2 versions i need to run. 1- is to make the bootstrap scripts work, like the dropdown menu and the form validation. 2- is to run the magnific popup script. This is my head code so far: &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="validator/vendor/jquery/jquery-1.10.2.min.js"&gt;&lt;/script&gt; the part of the script i'm trying to use with the noConflict () but i had no success. This is what i did. *the script i need to change the version of the jquery is for the magnificpopup &lt;script&gt; jq1111 = jQuery.noConflict(true); &lt;/script&gt; &lt;script type="text/javascript"&gt; jq1111(document).ready(function() { jq1111('.zoom-gallery').magnificPopup({ delegate: 'a', type: 'image', closeOnContentClick: false, closeBtnInside: false, mainClass: 'mfp-with-zoom mfp-img-mobile', image: { verticalFit: true, titleSrc: function(item) {} }, gallery: { enabled: true }, zoom: { enabled: true, duration: 500, // don't foget to change the duration also in CSS opener: function(element) { return element.find('img'); } } }); }); &lt;/script&gt; Can anyone please help me? Because i'm out of ideas and i'm not that advanced in jquery, of course. Thanks!
has comment: http://stackoverflow.com/comment/38230774
has title: Bootstrap + 2 versions of jquery
type: AnsweredQuestion
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/24661512
has comment: http://stackoverflow.com/comment/38231077
has comment: http://stackoverflow.com/comment/38230985
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24661512
has answer: http://stackoverflow.com/a/24661068

http://stackoverflow.com/q/24700549
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38304826
accepted answer: http://stackoverflow.com/a/24700912
tagged with: animation
tagged with: bind
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38304162
score: 1
has comment: http://stackoverflow.com/comment/38304718
upvote count: 1
has body: I currently have a jQuery animation attached to a back button and I'm using the bind command to prevent the next page from loading before the animation completes. Sadly even with the bind command the animation still gets cut off pretty quickly.Is there any way to ensure the animation plays entirely or a way to add a delay or pause after the animation yet before the next page load? Heres my jQuery: $(document).ready(function () { $(".back").click(function () { $(".back") .addClass('magictime vanishOut') .bind("animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd", function () {}); }); });
type: Question
tagged with: delay
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24700912
has title: jQuery Delay After Animation

twitter-bootstrap
tags question: http://stackoverflow.com/q/24588942
tags question: http://stackoverflow.com/q/24700204
tags question: http://stackoverflow.com/q/24747646
tags question: http://stackoverflow.com/q/24650538
tags question: http://stackoverflow.com/q/24696888
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/24645819
tags question: http://stackoverflow.com/q/24592292
tags question: http://stackoverflow.com/q/24607497
tags question: http://stackoverflow.com/q/24654839
tags question: http://stackoverflow.com/q/24676576
tags question: http://stackoverflow.com/q/24620741
tags question: http://stackoverflow.com/q/24729385
tags question: http://stackoverflow.com/q/24715102
tags question: http://stackoverflow.com/q/24636294
tags question: http://stackoverflow.com/q/24657699
tags question: http://stackoverflow.com/q/24632871
tags question: http://stackoverflow.com/q/24610665
tags question: http://stackoverflow.com/q/24669823
tags question: http://stackoverflow.com/q/24720971
tags question: http://stackoverflow.com/q/24677349
tags question: http://stackoverflow.com/q/24744762
tags question: http://stackoverflow.com/q/24748766
tags question: http://stackoverflow.com/q/24607917
tags question: http://stackoverflow.com/q/24610818
tags question: http://stackoverflow.com/q/24661008
tags question: http://stackoverflow.com/q/24659976
tags question: http://stackoverflow.com/q/24659820
tags question: http://stackoverflow.com/q/24711231
tags question: http://stackoverflow.com/q/24731067
tags question: http://stackoverflow.com/q/24666387
tags question: http://stackoverflow.com/q/24617723
tags question: http://stackoverflow.com/q/24620234
tags question: http://stackoverflow.com/q/24714010
tags question: http://stackoverflow.com/q/24593868
tags question: http://stackoverflow.com/q/24626316
tags question: http://stackoverflow.com/q/24645971
tags question: http://stackoverflow.com/q/24659530
tags question: http://stackoverflow.com/q/24664619
tags question: http://stackoverflow.com/q/24608880
tags question: http://stackoverflow.com/q/24615781
tags question: http://stackoverflow.com/q/24664494
tags question: http://stackoverflow.com/q/24733434
tags question: http://stackoverflow.com/q/24653888
tags question: http://stackoverflow.com/q/24643139
tags question: http://stackoverflow.com/q/24644601
tags question: http://stackoverflow.com/q/24726741
tags question: http://stackoverflow.com/q/24639311
tags question: http://stackoverflow.com/q/24613051
tags question: http://stackoverflow.com/q/24621394
tags question: http://stackoverflow.com/q/24629463
tags question: http://stackoverflow.com/q/24620425
tags question: http://stackoverflow.com/q/24630487
tags question: http://stackoverflow.com/q/24589391
tags question: http://stackoverflow.com/q/24739165
tags question: http://stackoverflow.com/q/24737496
tags question: http://stackoverflow.com/q/24732397
tags question: http://stackoverflow.com/q/24748804
tags question: http://stackoverflow.com/q/24731307
tags question: http://stackoverflow.com/q/24735327
tags question: http://stackoverflow.com/q/24734419
tags question: http://stackoverflow.com/q/24626353
tags question: http://stackoverflow.com/q/24611727
type: Tag
tags question: http://stackoverflow.com/q/24604966
tags question: http://stackoverflow.com/q/24642962
tags question: http://stackoverflow.com/q/24743730
tags question: http://stackoverflow.com/q/24595436
tags question: http://stackoverflow.com/q/24710686
tags question: http://stackoverflow.com/q/24607929
tags question: http://stackoverflow.com/q/24741710
tags question: http://stackoverflow.com/q/24589773
tags question: http://stackoverflow.com/q/24655406
tags question: http://stackoverflow.com/q/24730893
tags question: http://stackoverflow.com/q/24595847
tags question: http://stackoverflow.com/q/24602021
tags question: http://stackoverflow.com/q/24744401
tags question: http://stackoverflow.com/q/24599045
tags question: http://stackoverflow.com/q/24664592
tags question: http://stackoverflow.com/q/24616350

http://stackoverflow.com/comment/38235770
has text: Thanks, Let's say I use curl, do I have to write in a cache file ? Or could I call from a script a `dorequest.php` page which would `echo` the content I need ? Doing this, will my steamAPI key could be visible to users ?
type: Comment
comment on: http://stackoverflow.com/a/24663331
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38322624
comment on: http://stackoverflow.com/a/24709825
type: Comment
has text: @EasyBB Hmm, then perhaps it might be an idea to call a predefined function from within the observer that sets up the whole apparatus :)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38422551
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24746978
score: 2
has text: Sorry, I disagree. That is a disproportionate stance to take. We must agree to disagree.

http://stackoverflow.com/q/24675838
type: UnansweredQuestion
tagged with: three.js
upvote count: 1
answer count: 0
has body: Thanks to ";" I was lost my last 2 days; Seemingly, after void main() {}, should not insert ; character.. anyway, I finally can draw curve through shader and try a new thing; attribute float sov; attribute float pl; attribute float oi; attribute vec3 color; varying vec3 vColor; void main() { // Convert pl, oi to degree; float u = radians(pl); float v = radians(oi); // Rotation Transform // Make xy-plane rotation matrix; mat3 plMat; plMat[0][0] = cos(u); plMat[0][1] = -sin(u); plMat[1][0] = sin(u); plMat[1][1] = cos(u); // Make line-base rotation matrix; by Rodriges mat3 oiMat; oiMat[0][0] = cos(v)-(cos(v) - 1.0)*sin(u)*sin(u); oiMat[0][1] = (1.0 - cos(v))*(-sin(u)*cos(u)); oiMat[0][2] = sin(v)*cos(u); oiMat[1][0] = -sin(u)*cos(u)*(1.0 - cos(v)); oiMat[1][1] = cos(v)-(cos(v)-1.0)*cos(u)*cos(u); oiMat[1][2] = sin(u)*sin(v); oiMat[2][0] = -sin(v)*cos(u); oiMat[2][1] = -sin(u)*sin(v); oiMat[2][2] = cos(v); vec3 plPosition = plMat * position; vec3 oiPosition = oiMat * position; vColor = color; gl_Position = projectionMatrix * modelViewMatrix * vec4(oiPosition, 1.0); } I'v tried to rotate vertex position and I got this; // Uncaught TypeError: Cannot read property 'length' of undefined Is this problem related to index of position? If I read GLSL reference correctly, for array like 'position' must have it's index and maybe transform override this? .. Please help me.
tagged with: webgl
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38282649
tagged with: matrix
downvote count: 0
score: 1
favorite count: 0
tagged with: position
has title: Three.js; I've used Matrix for rotational transformation and it doesn't work

http://stackoverflow.com/comment/38387859
type: Comment
type: QuestionComment
score: 0
has text: The documentation there describes some compelling reasons for using them. You did say that you wanted the Polymer way.
comment on: http://stackoverflow.com/q/24743518

http://stackoverflow.com/comment/38178209
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24620981
has text: wow i would have never thought to put () around it. do you know why that makes it work?
score: 0

http://stackoverflow.com/comment/38186403
comment on: http://stackoverflow.com/a/24637244
score: 0
type: AnswerComment
has text: resp does nothing... Why ? :S I tested the php and its send me "1" but resp don't receives nothing
type: Comment

http://stackoverflow.com/comment/38290905
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24693658
score: 0
has text: i edited it . please take a look at it

http://stackoverflow.com/q/24624149
has body: I have the following HTML: <?php get_the_image(); ?> <?php get_the_image(); ?> Some image, and a bit of text are staring at you. Some image, and a bit of text are staring at you. My goal is to use jQuery to find the ID value for every , then use that ID to set a .click() event that will trigger a .show() function on the elements. So far I have this: var clasid = $(".thumbnav").attr("id"); $("#" + clasid).click(function () { $("." + clasid).show(); }); Which works, but only for the first . So I was wondering if there is a way to make this script work for all the spans, I read the jQuery documentation and they suggest using either .map() or .each(), but I haven't been able to figure it out. Also it would be great if anyone could give me a hint on how to hide a that was active when a new is being displayed. Thanks!
has comment: http://stackoverflow.com/comment/38161601
type: AnsweredQuestion
has title: Using jquery to get attribute value for multiple elements. Then use them
type: Question
has answer: http://stackoverflow.com/a/24624202
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24624202
tagged with: jquery
has answer: http://stackoverflow.com/a/24624196
accepted answer: http://stackoverflow.com/a/24624196
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24730611
accepted answer: http://stackoverflow.com/a/24731023
has body: HI I am beginner in rails noe I am working with a music player application in rails 4 using jplayer and to create a play list I am using Ajax function $.ajax({ type: 'GET', url:"../albums.json", success: function(data){ myPlaylist.add({title:$(this).attr("names")}) }, error: function(xhr,status,error){ alert(error); } }); what I want is to pass single album like albums/3.json to Ajax URL when I click the particular album to play ...any ideas will be welcome
upvote count: 1
tagged with: ruby-on-rails
has title: Rails AJax get dynamic URL
answer count: 1
has comment: http://stackoverflow.com/comment/38362625
tagged with: javascript
has comment: http://stackoverflow.com/comment/38362953
has answer: http://stackoverflow.com/a/24731023
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38363087
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/38363432

http://stackoverflow.com/a/24718040
has comment: http://stackoverflow.com/comment/38338066
has comment: http://stackoverflow.com/comment/38337993
has comment: http://stackoverflow.com/comment/38338087
has comment: http://stackoverflow.com/comment/38338118
answers question: http://stackoverflow.com/q/24718014
downvote count: 0
has comment: http://stackoverflow.com/comment/38338164
has body: I think you are looking for the "concat" function Join two arrays: var hege = ["Cecilie", "Lone"]; var stale = ["Emil", "Tobias", "Linus"]; var children = hege.concat(stale); The values of the children array will be: Cecilie,Lone,Emil,Tobias,Linus Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat
type: Answer
has comment: http://stackoverflow.com/comment/38338078
has comment: http://stackoverflow.com/comment/38338062
has comment: http://stackoverflow.com/comment/38338034
upvote count: 3
has comment: http://stackoverflow.com/comment/38338110
has comment: http://stackoverflow.com/comment/38337996
has comment: http://stackoverflow.com/comment/38338061
score: 3
has comment: http://stackoverflow.com/comment/38338133

http://stackoverflow.com/comment/38155088
type: Comment
comment on: http://stackoverflow.com/a/24620680
has text: And how should i call autocomplete since its not a class anymore etc.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38154474
type: Comment
type: QuestionComment
has text: @developerwjk Well, how would i start to solve this problem? because what you told me is what i already figured out.
comment on: http://stackoverflow.com/q/24620354
score: 0

http://stackoverflow.com/comment/38259022
type: Comment
score: 2
has text: OP probably wants `.length + 1`, also, there is no need to `parseInt` an int
type: AnswerComment
comment on: http://stackoverflow.com/a/24676659

http://stackoverflow.com/q/24677646
accepted answer: http://stackoverflow.com/a/24677766
upvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38261180
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24677867
has answer: http://stackoverflow.com/a/24677867
has comment: http://stackoverflow.com/comment/38261712
downvote count: 3
score: -3
has answer: http://stackoverflow.com/a/24677766
has title: How to parse this JSON in PhoneGap
type: Question
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/4935632
has body: JSON data : { "response": { "latitude": { "1": "28.5700", "2": "28.5700" }, "longitude": { "1": "77.329999", "2": "77.3200" }, "gps_location_look_up": { "1": "1", "2": "1" } } } How can one parse this json data and get these values (latitude,longitude) using JavaScript? How can one retrieve value of other keys?
answer count: 2

http://stackoverflow.com/comment/38286721
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24691197
has text: Great Answer, can you take a look at my update, I've changed AWE to an object and added a ready property.
type: AnswerComment

http://stackoverflow.com/comment/38294560
type: QuestionComment
comment on: http://stackoverflow.com/q/24695512
score: 0
has text: @Vladislav Qulin: Already noted in answer. Well spotted though :)
type: Comment

http://stackoverflow.com/comment/38104220
has text: hmm...thats a very good suggestion. I guess I will have to handle the ajax response breaking in any scenario anyways...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24594606

http://stackoverflow.com/q/24620741
has answer: http://stackoverflow.com/a/51130003
accepted answer: http://stackoverflow.com/a/24620764
has comment: http://stackoverflow.com/comment/38155170
tagged with: twitter-bootstrap
has title: Get selected item value from Bootstrap DropDown with specific ID
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/47488147
has body: I am "creating" my own "ComboBox" using Bootstrap 3 and JavaScript. Here is the JSFiddle for what I have so far: HTML: A B C JavaScript: $(document).on('click', '.dropdown-menu li a', function() { $('#datebox').val($(this).html()); }); This approach works great untill I want to repeat this "ComboBox" several times on the page. The issue is with the JQuery function looking for ANY/ALL '.dropdown-menu li a'. How can I change my JQuery to look only for UL with ID demolist and get its selected value? I have tried the following without success: I tried '#demolist .dropdown-menu li a' but that will not fire the function: $(document).on('click', '#demolist .dropdown-menu li a', function() { $('#datebox').val($(this).html()); }); I tried calling the Click of #demolist but #datebox gets the HTML of ALL list item of #demolist and not the selected innerHTML of item: $('#demolist').on('click', function(){ $('#datebox').val($(this).html()); }); UPDATE: The working solutions are: $('#demolist li a').on('click', function(){ $('#datebox').val($(this).html()); }); OR $('#demolist li').on('click', function(){ $('#datebox').val($(this).text()); });
type: Question
has answer: http://stackoverflow.com/a/24620764
upvote count: 36
has answer: http://stackoverflow.com/a/24620767
has comment: http://stackoverflow.com/comment/79467856
tagged with: javascript
has answer: http://stackoverflow.com/a/35236284
tagged with: jquery
possible better answer: http://stackoverflow.com/a/54670404
favorite count: 0
has answer: http://stackoverflow.com/a/54670404
score: 35
has comment: http://stackoverflow.com/comment/38155152
has answer: http://stackoverflow.com/a/51762978
tagged with: http://stackoverflow.com/tag/html
answer count: 7

http://stackoverflow.com/a/24721426
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/24720820
answers question: http://stackoverflow.com/q/24720820
has comment: http://stackoverflow.com/comment/38346085
has comment: http://stackoverflow.com/comment/38346050
has comment: http://stackoverflow.com/comment/38348260
score: 0
has body: You are opening the wrong document in the link on your dataTable. You want to open the response document but instead you are opening currentDocument.getDocument().getParentDocumentUNID() which is the parent of the Organiation document (which doesn't exist as far as I understand your data model). Instead you want to use the document id of the response document in question. Assuming that your dataTable uses a var called responseDoc you should do the following: &lt;xp:link escape="true" id="link1"&gt; &lt;xp:this.text&gt;&lt;![CDATA[#{javascript:contactView.getColumnValue("contactName")}]]&gt; &lt;/xp:this.text&gt; &lt;xp:eventHandler event="onclick" submit="true" refreshMode="complete"&gt; &lt;xp:this.action&gt; &lt;xp:openPage name="/contact.xsp" target="openDocument" documentId="#{javascript:responseDoc.getUniversalID()}"&gt; &lt;/xp:openPage&gt; &lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xp:link&gt; Update: I see that you have updated your question. As far as I understand your problem is not creating the response document in the first place but rather that opening the response document from the dataTable and then saving the response document takes you to a wrong parent document. Please see my answer above on using the correct document id when going back to the parent document.

http://stackoverflow.com/q/24746931
score: 0
linked to: http://stackoverflow.com/q/601790
has body: How can I minimize any browser window using a code (for example 'javascript') ? I would like to minimize browser in infokiosk.
has comment: http://stackoverflow.com/comment/38392946
duplicate of: http://stackoverflow.com/q/601790
has title: Minimize browser window javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38392991
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38393232
has comment: http://stackoverflow.com/comment/38393050
answer count: 0
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38393203
tagged with: javascript
has comment: http://stackoverflow.com/comment/38402414

http://stackoverflow.com/comment/38299460
type: QuestionComment
has text: I was wrong about the global sessions timeout value, see my answer.
score: 1
comment on: http://stackoverflow.com/q/24695419
type: Comment

http://stackoverflow.com/comment/38285733
comment on: http://stackoverflow.com/a/24656978
score: 0
type: AnswerComment
has text: Generally if you get the answer to any problems for your question, it is a general way to answer your own question and mark it as accepted answer. Since you had syntax errors in your code, I am adding that code here itself and if you want you can mark it as accepted or create your own correct answer. This will help any other future readers to follow solution in this post.
type: Comment

http://stackoverflow.com/a/60265922
has body: This happened with me because I was using Next JS which has server side rendering. When you are using server side rendering there is no browser. Hence, there will not be any variable window or document. Hence this error shows up. Work around : If you are using Next JS you can use the dynamic rendering to prevent server side rendering for the component. import dynamic from 'next/dynamic' const DynamicComponentWithNoSSR = dynamic(() =&gt; import('../components/List'), { ssr: false }) export default () =&gt; &lt;DynamicComponentWithNoSSR /&gt; If you are using any other server side rendering library. Then add the code that you want to run at the client side in componentDidMount. If you are using React Hooks then use useEffects in the place of componentsDidMount. import React, {useState, useEffects} from 'react'; const DynamicComponentWithNoSSR = &lt;&gt;Some JSX&lt;/&gt; export default function App(){ [a,setA] = useState(); useEffect(() =&gt; { setA(&lt;DynamicComponentWithNoSSR/&gt;) }); return (&lt;&gt;{a}&lt;&gt;) } References : https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr https://reactjs.org/docs/hooks-effect.html
has comment: http://stackoverflow.com/comment/135496521
has comment: http://stackoverflow.com/comment/139186322
answers question: http://stackoverflow.com/q/24647839
score: 70
downvote count: 0
upvote count: 70
type: Answer

http://stackoverflow.com/q/24660579
has comment: http://stackoverflow.com/comment/38230194
has comment: http://stackoverflow.com/comment/38230160
tagged with: javascript
score: 0
type: UnansweredQuestion
has body: I'm looking to set up a Google Analytics experiment where we test two pages and tack if a user clicks one of a set of links (don't really care which one of the set). However, the links will all go off-site and I was hoping to avoid adding a redirect somewhere in between. What I'd love to do is have a bit of javascript that's called and is counted as a 'conversion' in the experiment, that way I could call it any time one of the buttons is pressed. I don't really care which button, just looking to track the total. I'm testing this with the following code on two page: Tracked Link This is supposed to correspond to a goal I set up like this: So far after three hours (and I've been clicking the link) there are no results howing up in the test.
tagged with: google-analytics-api
has title: Track 'conversion' based on callback with Google Experiments
answer count: 0
has comment: http://stackoverflow.com/comment/38230257
has comment: http://stackoverflow.com/comment/38229989
type: Question
has comment: http://stackoverflow.com/comment/38230220

http://stackoverflow.com/a/24703783
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38323186
has comment: http://stackoverflow.com/comment/38322124
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24666893
answers question: http://stackoverflow.com/q/24666893
score: 3
has body: The problem is because dd/mm/yy is not a valid format according to struts2 jquery. Valid format is dd.mm.yy or dd-mm-yy Valid Formats according to this link are: Click here dd.mm.yy mm/dd/yy DD, d MM yy d M, yy dd-mm-yy They say displayFormat --> A pattern used for the visual display of the formatted date, e.g. yy- mm-dd , dd.mm.yy But pattern dd/mm/yy is not working. They also did not specified /(Slash) in dd/mm/yy description of displayFormat. They specified . (Dot) and - (Dash) only. I have also tried with dd//mm//yy which is working!!! But not working with dd/mm/yy :( Reason: datepicker can't parse a string value dd/mm/yy. It is treating dd/mm/yy as mm/dd/yy. For some values it fails in which it treats maximum value between day and month as day when both of them are less than 12. For Example: Input: 02/07/2014 09:30:41 displayFormat: dd/mm/yy Actual Day : 2 Actual Month : 7 Actual Time: 09:30:41 Parsedday : 7 Parsedmonth : 2 Parsedtime : : 00:00:00 Output: 07/02/2014 00:00:00 This is an issue which is open and still not solved. Struts2 Jquery Team have accepted that this is an issue. The status is accepted of this issue. Here is the issue link Issue 1057 in struts2-jquery: datepicker can't parse a string value with a time component Solution I will suggest you to use displayFormat="dd-mm-yy" to solve your problem or wait for the issue 1057 to get solved. According to my research Following function needs to be debugged with alert(err); Actual function that parses is //####################################################################################### // Splits datetime string into date ans time substrings. // Throws exception when date can't be parsed // If only date is present, time substring eill be '' //####################################################################################### var splitDateTime = function(dateFormat, dateTimeString, dateSettings) { try { var date = $.datepicker._base_parseDate(dateFormat, dateTimeString, dateSettings); } catch …

http://stackoverflow.com/a/24729536
has body: While that is possible, it will be very difficult. Using the server-side language of your choice, and honestly, any of them could do it, you would simply load the data that was saved and embed it on the page. If you want to render it, as if the JavaScript ran, you might want to look at node.js which is a server-side JavaScript engine and see if you can generate the needed HTML. PHP also has some kind of HTML tools to generate markup, but I know very little about it. All in all, I really doubt it is worth the effort. Who is running without JavaScript in today's world?
type: Answer
has comment: http://stackoverflow.com/comment/38368298
accepted answer of: http://stackoverflow.com/q/24726880
has comment: http://stackoverflow.com/comment/38368200
has comment: http://stackoverflow.com/comment/38369798
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38368987
has comment: http://stackoverflow.com/comment/38368841
score: 0
answers question: http://stackoverflow.com/q/24726880

http://stackoverflow.com/comment/38210179
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24650166
has text: Come on.. Explanation, link to API... Something ...

http://stackoverflow.com/comment/38283944
score: 0
comment on: http://stackoverflow.com/q/24689568
type: Comment
type: QuestionComment
has text: mmm, why do you want to do that?

http://stackoverflow.com/a/24601186
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24600653
answers question: http://stackoverflow.com/q/24600653
type: Answer
upvote count: 1
score: 1
has body: What you are looking for is called an unmanaged local collection. It's a collection that you define on the client which is not synchronized with the server, but otherwise retains the same properties as a normal collection. For more details, have a close look at the collections section of the docs. You can do something like this: Cities = new Meteor.Collection(null); Cities.insert({_id: 'Seattle', time: new Date}); console.log(Cities.findOne());

http://stackoverflow.com/comment/38191188
type: AnswerComment
has text: Then you can use the native bind() method of js
type: Comment
comment on: http://stackoverflow.com/a/24639769
score: 0

http://stackoverflow.com/comment/38350765
has text: Can you show a specific set of sample data, the expected result, and the actual result you're getting instead?
comment on: http://stackoverflow.com/q/24724673
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24668759
tagged with: jquery
linked to: http://stackoverflow.com/q/14994391
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: forms
has body: I have a form that i am trying to submit with angular JS One of the field requires generation of an ethiopian calendar , so i am using an external javascript library to show this date - available here http://keith-wood.name/calendarsRef.html To show the date picker one creates an input text as below: &lt;input type="text" id="ethiopianDOB" ng-model='Ethiopian' And corresponding javascript $( "#ethiopianDOB" ).calendarsPicker({ calendar: $.calendars.instance('ethiopian') }); However this interferes with my ng-model binding and hence cannot access my variable in $scope (I reviewed the object on form submission and i have no item like $scope.Ethiopian I am looking for ways to either 1. Retain the binding of the ng-model OR 2. Not require the javascript to instantiate the calendar OR 3. Improvement on my approach to this problem Thanks
has title: formatting form input field unbinds my ng-model
has answer: http://stackoverflow.com/a/24668801
upvote count: 1
answer count: 1

http://stackoverflow.com/q/24744693
downvote count: 0
tagged with: javascript
has title: Defining Regions in a US Map Using D3.js
has body: I am displaying a very basic map of the US; just the states. What I'm looking for is a good method for dividing the map into regions, with a single hover (all the states in the region change color) and click listener. So far the best option if found is here: How/Where do I get geoJSON data for states, provinces, and administrative regions of non-US countries? That seems like a lot more work than it should be. Anyone have suggestions for a better method than importing 50 different shape files, and manually editing them into regions?
favorite count: 0
has comment: http://stackoverflow.com/comment/38535437
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25317561
tagged with: geojson
score: 3
has comment: http://stackoverflow.com/comment/38395887
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/38389724
linked to: http://stackoverflow.com/q/17267248
answer count: 1

http://stackoverflow.com/a/24639563
type: Answer
has body: Why not include a "source" parameter? e.g. data: {check: val, source: 'from_button_A' } and then you check if($_POST['source'] == 'from_button_A') and go from there.
has comment: http://stackoverflow.com/comment/38190410
has comment: http://stackoverflow.com/comment/38190394
answers question: http://stackoverflow.com/q/24639522
upvote count: 4
has comment: http://stackoverflow.com/comment/38190369
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/24639522
has comment: http://stackoverflow.com/comment/38190352

http://stackoverflow.com/a/24697227
answers question: http://stackoverflow.com/q/24697009
has body: var heroElements = document.getElementsByTagName("hero_text"); for(var i = 0; i &lt; heroElements.length; i++) { var text = heroElements[i].innerText; text = text .replace(/\s/, '&lt;br/&gt;'); heroElements[i].innerHTML = text; }
score: 0
type: Answer

http://stackoverflow.com/q/24694020
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24694423
tagged with: php
has comment: http://stackoverflow.com/comment/38316024
upvote count: 2
has comment: http://stackoverflow.com/comment/38316365
answer count: 1
has comment: http://stackoverflow.com/comment/38291473
has body: I have two web pages: index.php and handler.php index.php has a form, that submits to handler.php like this: handler.php?input=some+data My goal is to do something so that browser's back button takes me to index.php?input=some+data instead of simply index.php. How can I do that? Ideally, I'd prefer to do as much as possible using php instead of js Solution: I added submit handler that does this: function onFormUpdate() { window.history.replaceState({} , '', 'index.php?' + document.forms[0].serialize()); } this way, form will be submitted not from index.php, but from index.php?input=some+data. That is, back button will bring me back to index.php?input=some+data.
has comment: http://stackoverflow.com/comment/38316415
has comment: http://stackoverflow.com/comment/38291759
has comment: http://stackoverflow.com/comment/38313132
has answer: http://stackoverflow.com/a/24694423
has title: insert browser's history entry before submitting the form

http://stackoverflow.com/q/24743137
accepted answer: http://stackoverflow.com/a/24743201
score: 1
has title: Trouble adding buttons to tables
type: Question
has comment: http://stackoverflow.com/comment/38386757
answer count: 2
has comment: http://stackoverflow.com/comment/38386047
has comment: http://stackoverflow.com/comment/38385905
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24743225
has answer: http://stackoverflow.com/a/24743225
has comment: http://stackoverflow.com/comment/38386233
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24743201
upvote count: 1
has body: I am trying to add several buttons to a table using javascript, however I keep being offered this result with [objectHTMLInputElement] Here is my code: function createDiseaseTable(country){ var displayCountry = document.getElementById("countrySelected"); displayCountry.innerHTML = country.name; var diseaseTable = document.getElementById("diseases"); diseaseTable.innerHTML = ""; for (var i = 0; i&lt;country.diseases.length; i++) //////////////////////////////////// { var changeDisease = document.createElement('input'); changeDisease.type = 'button'; changeDisease.name = "x" changeDisease.onclick = hi(); var row = diseaseTable.insertRow(i); var cell1 = row.insertCell(0) var cell2 = row.insertCell(1) var cell3 = row.insertCell(2) var cell4 = row.insertCell(3) var cell5 = row.insertCell(4); cell1.innerHTML = OurDiseases[i].name; cell2.innerHTML = OurDiseases[i].cureLevel; cell3.innerHTML = OurDiseases[i].killLevel; cell4.innerHTML = OurDiseases[i].cured; cell5.innerHTML = changeDisease; console.log(changeDisease); } var row = diseaseTable.insertRow(); var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var cell3 = row.insertCell(2); var cell4 = row.insertCell(3); var cell5 = row.insertCell(4); cell1.innerHTML = "Disease"; cell2.innerHTML = "Level needed to cure"; cell3.innerHTML = "Deaths each year"; cell4.innerHTML = "Cured"; cell5.innerHTML = "More Info"; } Note: I'm not concerned about not running a function yet upon click, i just want the actual button to appear
type: AnsweredQuestion

http://stackoverflow.com/a/24664255
answers question: http://stackoverflow.com/q/24647910
score: 0
type: Answer
upvote count: 1
downvote count: 1
has body: Just save the initial state in a variable: React.createClass({ initialState: { foo: 'bar' }, getInitialState : function () { return this.initialState; }, componentWillMount: function () { this.setState({ foo: 'foo' }) }, componentDidMount : function () { console.log(this.initialState.foo); // Logs 'bar' } });

http://stackoverflow.com/comment/38373062
type: Comment
score: 0
type: AnswerComment
has text: Yes it runs with html. But creating problem with server.
comment on: http://stackoverflow.com/a/24736253

http://stackoverflow.com/comment/38313619
has text: I think I might just use `localStorage` for this
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24705250

http://stackoverflow.com/comment/38388383
type: Comment
has text: your question is too vague. What defines "new data" ? What "last id" ?
comment on: http://stackoverflow.com/q/24744423
score: 0
type: QuestionComment

http://stackoverflow.com/a/24716315
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24716240
has body: Just put an id to your submit button and do: document.getElementById("submit").onclick=function(){ var name=document.forms["theform"]["fname"].value; window[name]= new Person(); console.log(window[name]) }
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/38205007
type: QuestionComment
comment on: http://stackoverflow.com/q/24646986
score: 1
has text: You could use a function that has a return of true. So your code then return true then you can do something like. `function ifFinished(){if(codeExecuted==true){ $(form).submit() } ` I'm on my phone so its not perfect but hope you get it.
type: Comment

http://stackoverflow.com/a/62918983
score: 1
has body: As this has recently been revived, I think it's worth pointing out again that we should generally treat objects as unordered collections of properties. Although ES6 did specify key traversal order (mostly first-added to last-added properties, but with a twist for integer-like keys), depending on this feels as though you're misusing your type. If it's ordered, use an array. That said, if you are determined to do this, then it's relatively simple with ES6: const sortKeys = (o) =&gt; Object (o) !== o || Array .isArray (o) ? o : Object .keys (o) .sort () .reduce ((a, k) =&gt; ({...a, [k]: sortKeys (o [k])}), {}) const input = {Memo: {itemAmount1: "5", taxName1: "TAX", productPrice1: "10", accountName1: "Account Receivable (Debtors)"}, Footer: {productDescription2: "Maggie", itemQuantity2: "49.5", accountName2: "Account Receivable (Debtors)", taxName2: "TAX"}, Header: {itemDiscount3: "10", accountName3: "Account Receivable (Debtors)", productPrice3: "10", taxName3: "TAX"}} console .log ( sortKeys(input) ) .as-console-wrapper {min-height: 100% !important; top: 0} Note that there is a potential performance issue here as described well by Rich Snapp. I would only spend time fixing it if it turned out to be a bottleneck in my application, but if we needed to we could fix that issue with a version more like this: const sortKeys = (o) =&gt; Object (o) !== o || Array .isArray (o) ? o : Object .keys (o) .sort () .reduce ((a, k) =&gt; ((a [k] = sortKeys (o [k]), a)), {}) While this works, the addition of the comma operator and the use of property assignment make it uglier to my mind. But either one should work.
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24629917

http://stackoverflow.com/q/24748419
has answer: http://stackoverflow.com/a/24748492
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38395730
tagged with: http://stackoverflow.com/tag/html
has body: I want to get an element for a specific row in my HTML table. Here is my table. &lt;tr class="inner2-top"&gt; &lt;/tr&gt; I fill this table using Javascript for the following class: &lt;td class="ddu-orl"&gt; So far I have around 9 rows. I was wondering how I would get the data for a specific row. So far I have the following code but it seems to log all of the data for that class. What about for a specific row? function removeRoute() { var objectId = $(".inner2-top").find(".ddu-orl").text(); console.log(objectId); } I run the following code using the following HTML: &lt;td class="status1"&gt;&lt;img src="images/cross.png" href="#" onclick="removeRoute()" width="12" height="12" alt="cross"&gt;
tagged with: css
has title: Getting Table Element
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24748492
type: Question
has comment: http://stackoverflow.com/comment/38395788

http://stackoverflow.com/comment/38391080
comment on: http://stackoverflow.com/q/24745899
score: 1
type: QuestionComment
has text: `not()` won't match parent and children. Is pretty hard for anyone to help without being able to test against live html to see where your issues are. A demo on jsfiddle.net would help
type: Comment

http://stackoverflow.com/comment/38404283
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24748459
has text: 1) did you check that the image was loaded by drawing it to a visible canvas ? could be a cross origin issue. 2) i guess you want to call toDataURL inside the onload handler of the image.
score: 0

http://stackoverflow.com/comment/38121391
has text: Well yes; of course it does: that's because `.val(quantity)` is a jQuery method. Which *is available to* a jQuery object...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24603292

http://stackoverflow.com/comment/38197249
type: Comment
has text: when I search on Te, Skate shows up to. I look in my console and I got this when I searched on "skate" "undefined /skate/gi"
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24590321

http://stackoverflow.com/comment/38255873
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24674745
has text: I tried to use toggle but it just worked for a while and then the effect just worked for a while and be gone, guess i have used the wrong syntax, i'll try to use this one. btw what is the use of .not?
type: AnswerComment

http://stackoverflow.com/comment/38156523
comment on: http://stackoverflow.com/a/24620934
has text: In the fiddle you created jquery is not included hence, that creates a problem in jsfiddle, i've updated it and divided them: http://jsfiddle.net/ra4Jy/1/
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24592317
upvote count: 1
linked to: http://stackoverflow.com/q/750486
has answer: http://stackoverflow.com/a/24592360
type: Question
tagged with: javascript
tagged with: asynccallback
has title: I have a node async function example. Callbacks returning not expected values
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/24592360
favorite count: 0
duplicate of: http://stackoverflow.com/q/750486
has body: I have made up the following example to test asynchronous callback events in node.js. The fact is that the error is not returning me a parameter. Why is that? var maxtime = 1000; var evenDoubler = function(v, callback) { var waitTime = Math.floor(Math.random() * (maxtime + 1)); if (v%2) { setTimeout(function() { callback(new Error("Odd input")); }, waitTime); } else { setTimeout(function() { callback(null, v*2, waitTime); }, waitTime); } } for (i=1;i&lt;=10;i++) { evenDoubler(i, function (error, result, waitTime) { if (error){ console.log(error + " by number " + i); } else { console.log("The number is even, and its double is " + result + " (in " + waitTime + " miliseconds)."); } }); } the returned output is (why is returning me the values 11 on the odd numbers?) Error: Odd input by number 11 Error: Odd input by number 11 The number is even, and its double is 20 (in 266 miliseconds). The number is even, and its double is 12 (in 444 miliseconds). Error: Odd input by number 11 The number is even, and its double is 4 (in 492 miliseconds). The number is even, and its double is 16 (in 578 miliseconds). The number is even, and its double is 8 (in 710 miliseconds). Error: Odd input by number 11 Error: Odd input by number 11
tagged with: node.js
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/25136020
type: Answer
score: 8
accepted answer of: http://stackoverflow.com/q/24598529
has comment: http://stackoverflow.com/comment/52633854
has comment: http://stackoverflow.com/comment/62727850
answers question: http://stackoverflow.com/q/24598529
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/62728179
downvote count: 0
upvote count: 8
has body: I've had the same challenge as you are describing, my solution looks like this: function setConnectionLabel(connection, label) { connection.bind("mouseenter", function(conn) { conn.addOverlay(["Label", { label: label, location:0.5, id: "connLabel"} ]); }); connection.bind("mouseout", function(conn) { conn.removeOverlay("connLabel"); }); } So in your case this should do the trick: JSPLUMB_INSTANCE.bind("connection", function (info) { setConnectionLabel(info.connection, "Labeltext"); }); let me know if it works out for you, cheers! Update: Use "mouseover" instead of "mouseenter" New Documentation
has comment: http://stackoverflow.com/comment/61581428

http://stackoverflow.com/q/24625979
answer count: 2
has comment: http://stackoverflow.com/comment/38165273
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38165058
has body: I have this JQuery code: function JQueryPopup(value) { $(value).toggle(); $('#JQueryClose').click(function(){ $(value).hide(); }); $( document ).on( 'click', function ( e ) { $(value).hide(); }); $( document ).on( 'keydown', function ( e ) { if ( e.keyCode === 27 ) { // ESC $(value).hide(); } }); } and a HTML button that calls this function, it doesn't seem to be showing the popup window/div. here is a fiddle with my full code: http://jsfiddle.net/XHLY8/3/ P.S. i do have this code on another page, i call the function like this: which works fine.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24626342
has comment: http://stackoverflow.com/comment/38164881
type: Question
has comment: http://stackoverflow.com/comment/38165141
has title: Popup window not showing div
has answer: http://stackoverflow.com/a/24626235
accepted answer: http://stackoverflow.com/a/24626235
tagged with: javascript
has comment: http://stackoverflow.com/comment/38164936
upvote count: 2
has answer: http://stackoverflow.com/a/24626342
score: 0
downvote count: 2

http://stackoverflow.com/comment/38327159
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24712303
score: 0
has text: are you sure you are passing url: url_interface + '/QSData.aspx?currTarjama='+currTarjama+'&b_s='+b_s ?

http://stackoverflow.com/comment/38281314
type: Comment
comment on: http://stackoverflow.com/a/24666445
score: 0
type: AnswerComment
has text: @amylynn83 left any problems?

http://stackoverflow.com/comment/38254379
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24615097
has text: I'm sorry I have to push this topic, but something on my website has changed. The select options aren't loaded by PHP anymore, now they get inserted by jQuery (with `.appendTo()`). Unfortunately your script doesn't seem to work with jQuery inserted options, any idea on how to fix that? :)

http://stackoverflow.com/comment/38190566
score: 0
type: Comment
has text: add box-sizing:border-box; to the table a {}
type: AnswerComment
comment on: http://stackoverflow.com/a/24638839

http://stackoverflow.com/comment/38349133
comment on: http://stackoverflow.com/q/24723868
score: 0
has text: you are delving into security issues that you wouldn't want anonymous access to and therefore can't access with JS
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38157285
has text: @islanddave ^^. Sorry if I wasn't clear enough
type: QuestionComment
comment on: http://stackoverflow.com/q/24621857
type: Comment
score: 0

http://stackoverflow.com/q/24649846
favorite count: 0
has body: I have this string: #{id:123}#{id:456} and I am searching for matches using this regular expression: /([a-z0-9\:#{}])/ It returns a match from the string, but it only returns one result instead of two.
has comment: http://stackoverflow.com/comment/38209689
has answer: http://stackoverflow.com/a/24649911
has comment: http://stackoverflow.com/comment/38239952
tagged with: regex
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38209761
accepted answer: http://stackoverflow.com/a/24649911
tagged with: javascript
score: 0
has title: RegEx returns as one result instead of two
answer count: 1

http://stackoverflow.com/q/24657304
answer count: 1
downvote count: 0
has title: Multi-level polymorphism in javascript, polymorphic Object.extend
tagged with: polymorphism
has answer: http://stackoverflow.com/a/24776188
favorite count: 0
type: UnansweredQuestion
score: 3
tagged with: parametric-polymorphism
type: Question
tagged with: javascript
tagged with: inheritance
upvote count: 3
has body: I'd like to implement multi-level inheritance supporting polymorphism implemented by extend method executed on object being extended (not by external utility or function - from the point of view of object being extended). tl;dr jsfiddle here: http://jsfiddle.net/arzo/VLkF7/ What I want? var MyObj = {name: 'object', toString: function() {return this.name;}}; MyObj.extend = function(objectToBeMerged) { var objs=[this, objectToBeMerged], newobj={}, obj; for(var i in objs) { for(var k in (obj=objs[i]) ) if (obj.hasOwnProperty(k)) newobj[k]=obj[k]; } return newobj; } console.assert(MyObj.extend, 'ERROR: this should pass'); var ActionObj = MyObj.extend({name: 'action abstract object', exec: 'implemtation', undo: 'implementation of opposite action here'}); var DragNDrop = ActionObj.extend({name: 'drag&amp;drop action', exec: function(){console.log('did d&amp;d');}}) //unfortunately following assert will not get through, because MyObj.extend cannot iterate over ActionObj properties if(DragNDrop.toString) console.info('MyObj.extend iterated over MyObj\'s properties') console.assert(DragNDrop.undo, 'but MyObj.extend did not iterate over ActionObj properties, undo action is missing in this object:', DragNDrop) ; What is problem with code above? If this was regular, e.g. C++ inheritance, then DragNDrop would have undo method, but it does not, because var objs=[this, objectToBeMerged] evaluates this only to MyObj, but I would like to have it evaluated to any object on which extend is executed (so in case of executing ActionObj.extend, I would like to have keyword this in function extend evaluated to ActionObj, not MyObj) Solution to this problem could be using _.extend of jQuery.extend, which look like: //add here code in previous quote in this post... MyUtils = {} MyUtils.extend = function(objectToBeMerged, parent) { var objs=[parent || this, objectToBeMerged], newobj={}, obj; for(var i in objs) { for(var k in (obj=objs[i]) ) if (obj.hasOwnProperty(k)) newobj[k]=obj[k]; } retur…

http://stackoverflow.com/q/24725704
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/24725797
accepted answer: http://stackoverflow.com/a/24725797
type: Question
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has body: I am trying to add a overlay which does a semi block of the background page while the popup in in view. So far this is what I have... HTML: a href="#" id="loginButton">Add Item Item: Wine Shot Beer Quantity: Price: CSS: * Login Button */ #loginButton { display:inline-block; float:right; background:#d2e0ea url(images/buttonbg.png) repeat-x; border:1px solid #899caa; border-radius:3px; -moz-border-radius:3px; position:relative; z-index:30; cursor:pointer; } /* Login Button Text */ #loginButton span { color:#445058; font-size:14px; font-weight:bold; text-shadow:1px 1px #fff; padding:7px 29px 9px 10px; display:block; } /* Login Box */ #loginBox { position:absolute; top:50%; right:50%; margin-top: -157px; margin-right: -131px; display:none; z-index:29; } #overlay { left: 0; top: 0; width: 100%; height: 100%; display: none; z-index: 28; background: url('overlay_transparent.png') repeat 0 0; } /* If the Login Button has been clicked */ #loginButton.active { border-radius:3px 3px 0 0; } #loginButton.active span { background-position:53px -76px; } /* A Line added to overlap the border */ #loginButton.active em { position:absolute; width:100%; height:1px; background:#d2e0ea; bottom:-1px; } /* Login Form */ #loginForm { width:248px; border:1px solid #899caa; border-radius:3px 0 3px 3px; -moz-border-radius:3px 0 3px 3px; margin-top:-1px; background:#d2e0ea; padding:6px; } #loginForm fieldset { margin:0 0 12px 0; display:block; border:0; padding:0; } fieldset#body { background:#fff; border-radius:3px; -moz-border-radius:3px; padding:10px 13px; margin:0; } #loginForm #checkbox { width:auto; margin:1px 9px 0 0; float:left; padding:0; border:0; *margin:-3px 9px 0 0; /* IE7 Fix */ } #body label { color:#3a454d; margin:9px 0 0 0; display:block; float:left; } #loginForm #body fieldset label { display:block; float:none; margin:0 0 6px 0; } /* Default Input */ #loginForm input { width:92%; border:1px solid #899caa; border-radius:3px; -moz-border-radius:3px; color:#3a454d; font-weight:bo…
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to create an overlay to be used under a pop up

http://stackoverflow.com/q/24707406
has comment: http://stackoverflow.com/comment/39459416
favorite count: 0
type: Question
tagged with: browserify
score: 10
tagged with: node.js
has comment: http://stackoverflow.com/comment/39425523
tagged with: browserify-shim
has body: Some brief background: I'm using browserify and browserify-shim (and gulp to build) to create a web app. Prior to this issue, I was requireing jquery from npm so I had no issues. Once I started doing some optimization, I realized how massive the bundle was with jQuery included. So now I'm grabbing jQuery from a CDN with the script tag and placing it before the bundle.js file. But I'm having issues declaring jQuery as a global and properly shimming my jQuery plugins in browserify and browserify-shim. When I run gulp to build, I keep getting the same error: [gulp] gulp-notify: [Compile Error] module "jquery" not found from "/Volumes/Chetan/Users/cshenoy/Projects/urbanstems-node/app/plugins/jquery.inview.js" It seems like browserify-shim isn't picking up on jQuery being a global. For reference, I'm using the inview plugin. Here's my package.json with the relevant parts "browser": { "inview": "./app/plugins/jquery.inview.js" }, "browserify-shim": { "jquery": "global:jQuery", "inview": { "depends": [ "jquery" ] } } Let me know what else I can include to help diagnose the error.
upvote count: 10
has answer: http://stackoverflow.com/a/24766760
answer count: 1
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24766760
downvote count: 0
tagged with: jquery
has title: Using Browserify with jQuery Plugins

http://stackoverflow.com/comment/38555007
comment on: http://stackoverflow.com/a/24804036
type: AnswerComment
score: 0
has text: P.S. It seems like only “one word” tags are supported. If the tag is made up of two or more words it doesn´t work. It´s not a big deal but I think it´s important to mention.
type: Comment

http://stackoverflow.com/comment/38372882
type: Comment
type: QuestionComment
has text: Can you give us the out put of `console.log( html )` in the success callback.
comment on: http://stackoverflow.com/q/24736181
score: 0

http://stackoverflow.com/q/24657743
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/24658913
score: 0
tagged with: filter
tagged with: random
answer count: 1
tagged with: jquery
has title: How to achieve a sorted but random list with javascript/jquery
favorite count: 0
has body: I currently use this code to randomly sort my list of items and it works quite well: $(document).ready(function () { (function ($) { $.fn.randomize = function (childElem) { return this.each(function () { var $this = $(this); var elems = $this.children(childElem); elems.sort(function () { return (Math.round(Math.random()) - 0.5); }); $this.remove(childElem); for (var i = 0; i &lt; elems.length; i++) $this.append(elems[i]); }); }; })(jQuery); (function ($) { if (window.location.href.indexOf("st=") &gt; -1) { } else { $('#itemBlock').randomize('.list_1'); } })(jQuery); }); However, I am stumped when it comes to figuring out a way to modify this script to randomly return results in a certain order. For instance, the list I use this with returns all of a specific type of item from all of 5 stores. So if someone is looking for an apron it will show all of the aprons we have at each of our 5 stores. The code above surely randomizes the list, but I don't know how to take into account the store location. So right now a search for aprons would initially return from stores A, B, C, D, and E a list like this: BCDAEBCDDDCEABBACACABCDAA But what we want to achieve is a return like this: ABCDEABCDEABCDEABCDEABCDE Not necessarily in exactly that order but someway to modify the function so that a result from each store is loaded before more results are loaded. So there wouldn't be 3 in a row from one store, or one store would be represented more than others. Do I go about this by using the filter or sort function? Or would pure javascript handle this more efficiently?
accepted answer: http://stackoverflow.com/a/24658913

http://stackoverflow.com/a/24725048
has body: fadeIn takes second argument "callback" - see the docs: http://api.jquery.com/fadein/ It can be any function, and it's called when the animation is done. Just pass an anonymous function there. $(".img6").delay(16200).fadeIn(600, function(){ alert("It's over, it's done!"); });
answers question: http://stackoverflow.com/q/24725023
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38351460
upvote count: 1
has comment: http://stackoverflow.com/comment/38351676
score: 1

http://stackoverflow.com/comment/38373394
score: 0
type: Comment
type: QuestionComment
has text: i did try to use iframe after setting the src dynamically from codebehind ,the redirect happens but the pdf download doesnt.
comment on: http://stackoverflow.com/q/24735819

http://stackoverflow.com/comment/38091673
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24588204
has text: Use the `focusin` event.
type: Comment

http://stackoverflow.com/a/24687874
answers question: http://stackoverflow.com/q/24682716
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: Firstly, I would recommend against doing this by manipulating innerHTML. It's inefficient and error-prone (think of the case where the content contains an element with a class of "highlight", for example). Here's an example of doing this using DOM methods to manipulate the text nodes directly: https://stackoverflow.com/a/10618517/96100 Maintaining the caret position can be achieved a number of ways. You could use a character offset-based approach, which has some disadvantages due to not considering line breaks implied by &lt;br&gt; and block elements but is relatively simple. Alternatively, you could use the selection save and restore module of my Rangy library, which may be overkill for your needs, but the same approach could be used. Here is an example using the first approach: http://jsbin.com/suwogaha/1
accepted answer of: http://stackoverflow.com/q/24682716

http://stackoverflow.com/a/24600849
score: 0
type: Answer
has body: OK, so the key was twofold. I needed to purposely delay the "Loading" feedback I was providing. I presume that is so that it was called after the updating elements were actually finished rendering. I used the underscore delay function like so: _.delay removeUpdating, 500 removeUpdating just removes a class on each table cell 'updating'. And then at the beginning of this same helper method I add those classes to all the cells. The delay coupled with a nice CSS3 background animation gives the user a nice cue that the fields are updating when they navigate! I'd prefer not to be adding a delay manually, nor using jQuery to add and remove classes, so any better suggestions are appreciated!
answers question: http://stackoverflow.com/q/24598867

http://stackoverflow.com/comment/38945584
comment on: http://stackoverflow.com/a/24725552
type: Comment
has text: Ah np then, you should +1 when you think it's a qualitatively good answer, and accept if it answers your specific question. Questions without answers are quicker to be deleted, so that's why I'm saying it.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38351803
type: Comment
has text: I get 443 if I remove all duplicate names from `names.txt` first.
comment on: http://stackoverflow.com/q/24724673
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38298013
comment on: http://stackoverflow.com/a/24668357
type: AnswerComment
has text: Does these lines add test.c.d = one; test.c.e.push(two,three); the structure of one to c.d and structure of two and three to c.e? if not what do they actually mean?
score: 0
type: Comment

http://stackoverflow.com/comment/38167512
has text: Seems, that the reason behind it is comma. If you just print `console.log(links);` at same place, then you get the expected result.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24627407

http://stackoverflow.com/a/24707444
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24707258
has body: Yes it is possible , and it's just basics. More things are possible See jQuery API - http://api.jquery.com/ Sample: this is div1 this is div2 button1 button2 or you can assign a common class to the common you want to hide or show and do $(".yourclassname").hide(); or $(".yourclassname").show();
accepted answer of: http://stackoverflow.com/q/24707258
type: AcceptedAnswer

http://stackoverflow.com/comment/38260396
comment on: http://stackoverflow.com/q/24676035
has text: Can you create a plunker? My guess though is that you are not injecting ngTable into your module like this http://bazalt-cms.com/ng-table/example/1.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24717821
type: Answer
has body: What you are asking for is an application/json encoding type for HTML form submissions. This type is not currently specified for HTML, which, as of version 5, specifies three encoding types: application/x-www-form-urlencoded multipart/form-data text/plain And of course, if it were supported, there is no guarantee that it would serialize the data in the format you've specified.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24717741
score: 1
answers question: http://stackoverflow.com/q/24717741
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/38246365
type: QuestionComment
has text: I suggest to use google translate api in your application https://developers.google.com/translate/v2/using_rest
score: 1
comment on: http://stackoverflow.com/q/24668363
type: Comment

http://stackoverflow.com/comment/38310844
has text: Do you have the street names in an array? If not, how do you plan on getting them?
comment on: http://stackoverflow.com/q/24704023
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24624852
has comment: http://stackoverflow.com/comment/38163091
has body: I have written a script remove the # from URL &amp; scroll to the particular div. Its working for the normal url like 10.0.1.22/dev/pg/blog/all/ But its not working for the URL like 10.0.1.22/dev/pg/search/?tag=a&amp;entity_subtype=blog&amp;entity_type=object&amp;search_type=entities#39531 Its not removing the # from URL &amp; also the scrolling also not working. Script jQuery(document).ready(function($) { $(".full_view_btn").live('click', function(){ var divid = $(this).attr('data-id'); var long_desc = "#inner_descrip" + divid; var short_desc = "#listing_desp" + divid; var shw_mre_btn = "#full_view" + divid; if($(long_desc).is( ':hidden' )){ $('.long_desc').hide(); $('.short_desc').show(); $(long_desc).show(); $(short_desc).hide(); $('.full_view_btn').text('Show more'); $(shw_mre_btn).text('Show less'); } else{ $(long_desc).hide(); $(short_desc).show(); $(shw_mre_btn).text('Show more'); } if (location.pathname.replace('/^\//','') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[id=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top-60 }, 500); target.parent().find('#highlight_div'+divid).css("box-shadow", "0 0 2px 1px #cccccc"); setTimeout(function() { target.parent().find('#highlight_div'+divid).css("box-shadow", "none"); }, 1000); return false; } } }); }); Any idea guys how to fix this ? I cant find where is the error ?
has comment: http://stackoverflow.com/comment/38163198
has comment: http://stackoverflow.com/comment/38166429
has comment: http://stackoverflow.com/comment/38163400
has comment: http://stackoverflow.com/comment/38163121
has comment: http://stackoverflow.com/comment/38163033
has comment: http://stackoverflow.com/comment/38163573
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38163243
has title: Remove '#' from a URL in JQuery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/38163378
has comment: http://stackoverflow.com/comment/38163349
has answer: http://stackoverflow.com/a/24625227
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38163325
type: Question
has comment: http://stackoverflow.com/comment/38163231
has comment: http://stackoverflow.com/comment/38162903
score: 3

http://stackoverflow.com/q/24606968
has answer: http://stackoverflow.com/a/24610185
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38128523
has body: I've got a little drag-and-drop thing going on, where a hidden field is populated using JavaScript. The idea is that this hidden field's modified property will go back to the server as normal. The problem is that the ModelState hasn't recognised that the value has changed- I've got an error saying the value's null when it's clearly not (it doesn't actually have a required flag on it, but it's an int, so the mere fact that it's null causes MVC to throw a tantrum). So I was just wondering if, in JavaScript, I can modify the ModelState's errors to get rid of the error.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38128106
has comment: http://stackoverflow.com/comment/38127820
tagged with: asp.net-mvc-3
linked to: http://stackoverflow.com/q/14992132
has title: Modify ModelState from JS
type: Question
accepted answer: http://stackoverflow.com/a/24610185
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript

http://stackoverflow.com/a/24703656
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38310007
accepted answer of: http://stackoverflow.com/q/24703570
has body: var a = "12349568483"; a = a.split('').reverse().join('').replace(/([0-9]{3})/g, "$1 ").split('').reverse().join('');
answers question: http://stackoverflow.com/q/24703570

http://stackoverflow.com/a/24698829
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38302458
has body: Please see here http://jsbin.com/yodeg/1/edit?html,js,output HTML: &lt;input type="text" ng-model="search"/&gt; &lt;ul&gt; &lt;li ng-repeat="site in SiteLocs |filter : search "&gt;{{site.name}}&lt;/li&gt; &lt;/ul&gt; js: $scope.SiteLocs = [ { "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": "3747 Ocean Dr, Vero Beach, FL 32963", "styleUrl": "#waypoint", "Point": { "coordinates": "-80.358248,27.659094,0" } }]; });
type: Answer
has comment: http://stackoverflow.com/comment/38310746
answers question: http://stackoverflow.com/q/24698647
has comment: http://stackoverflow.com/comment/38310344
accepted answer of: http://stackoverflow.com/q/24698647
has comment: http://stackoverflow.com/comment/38301929
has comment: http://stackoverflow.com/comment/38307680
has comment: http://stackoverflow.com/comment/38302159
has comment: http://stackoverflow.com/comment/38311205
score: 0

http://stackoverflow.com/q/24719495
favorite count: 0
tagged with: data-visualization
has title: What are the arguments to Conrec.contour in concec.js?
has answer: http://stackoverflow.com/a/24719518
tagged with: d3.js
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: contour
answer count: 1
downvote count: 0
has body: I'm trying to build a contour plot with d3.js and conrec.js In Jason's example code for conrec.js, I can't interpolate what each argument to the contour() attribute of a Conrec object should be. Here is his example from the github README: var data = [[0, 1, 0], [1, 2, 1], [0, 1, 0]]; var c = new Conrec; c.contour(data, 0, 2, 0, 2, [1, 2, 3], [1, 2, 3], 3, [0, 1, 2]); // c.contours will now contain vectors in the form of doubly-linked lists. // c.contourList() will return an array of vectors in the form of arrays. It's unclear what the arguments to c.contour should be in the general case because the semantic meanings of zeroes and twos are overloaded here. Can I get a general description of each argument?
tagged with: javascript

http://stackoverflow.com/comment/38304330
comment on: http://stackoverflow.com/q/24700432
type: Comment
type: QuestionComment
has text: `typeof list[i] === null` is true
score: 0

http://stackoverflow.com/q/24593685
upvote count: 7
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
downvote count: 0
has answer: http://stackoverflow.com/a/24594461
score: 7
type: Question
has answer: http://stackoverflow.com/a/24593941
answer count: 2
has title: Uncaught ReferenceError : angular is not defined (Using testem)
tagged with: javascript
tagged with: jquery
has body: Error is found in line 1 of 2 files: - controllers.js - app.js Which is attached below together with html. The app appears when I start up local server but I am unable to login or signup by clicking the sign up button after entering my details. Is it a 404 error? I also tried to add these 2 lines into the index.html file (I thought was some items I didnt define) but did not work. index.html file * * * * Back controllers.js file (Error in first line) angular.module('bucketList.controllers', []) .controller('SignInCtrl', [ '$scope', '$rootScope', '$firebaseAuth', '$window', app.js file (Error in first line) angular.module('bucketList', ['ionic', 'firebase', 'bucketList.controllers'])

http://stackoverflow.com/comment/38318292
has text: works fine here http://jsfiddle.net/K8f28/
comment on: http://stackoverflow.com/q/24707539
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24589510
tagged with: ember.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24589549
score: 1
upvote count: 1
type: Question
has body: I've been learning Ember.js and decided to work on a simple application called Finance app in which a user can add an item, for example 'car insurance', to be displayed. The item's date, title, description, and amount are displayed for each item. My question is about using bind-attr to bind disabled=isNotComplete to a button. I don't want the button functional if the user has not filled out the text-fields. The problem is that the only attribute bound to the button is data-bindattr-3='3'. I defined isNotComplete in finances_controller.js and added a 'newTitle' property. I've searched on stackoverflow and google for solutions, but I'm doing something wrong. index.html finance.js - Finance Model Finances.Finance = DS.Model.extend({ title: DS.attr('string'), dateof: DS.attr('string'), amount: DS.attr('string'), description: DS.attr('string') }); Finances.Finance.FIXTURES = [ { id: 1, title: 'Rent', dateof: 'July 4, 2014', amount: '$60.00', description: 'Exum studio rent money.' }, { id: 2, title: 'Tuition', dateof: 'June 22, 2014', amount: '$500.00', description: 'Palomar College tuition.' }, { id: 3, title: 'Car Registration', dateof: 'June 10, 2014', amount: '$120.00', description: 'Toyota Tacoma registration payment.' } ]; finances_controller.js - Finances Controller Finances.FinancesController = Ember.ArrayController.extend({ actions: { createFinance: function() { var dateof = this.get('newDate'); var title = this.get('newTitle'); var description = this.get('newDescription'); var amount = this.get('newAmount'); // create the new Finance model var finance = this.store.createRecord('finance', { dateof: dateof, title: title, description: description, amount: amount }).save(); // Clear the "New Finance" text field this.set('newDate', ''); this.set('newTitle', ''); this.set('newDescription', ''); this.set('newAmount', ''); }, createItem: function() { var elem = document.getElementById("createItemForm"); elem.style.display = "block"; }, isNotComplete: function() { return…
tagged with: javascript
has answer: http://stackoverflow.com/a/24589549
answer count: 1
tagged with: button
downvote count: 0
has title: Ember.js 1.5.1 bind-attr disabled to button
favorite count: 0

http://stackoverflow.com/q/24747599
type: AnsweredQuestion
score: 2
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/24747616
possible better answer: http://stackoverflow.com/a/24747836
has comment: http://stackoverflow.com/comment/38394144
tagged with: javascript
has answer: http://stackoverflow.com/a/24747836
has comment: http://stackoverflow.com/comment/38394189
answer count: 2
tagged with: while-loop
downvote count: 0
accepted answer: http://stackoverflow.com/a/24747616
favorite count: 0
has body: as a first project after doing the code-academy course I'm making a rock/paper/scissors game but I can't see where I'm going wrong with my loop here. while (userChoice !== "ROCK" | "PAPER" | "SCISSORS" | "LIZARD" | "SPOCK") { var userChoice = prompt("Invalid choice. Please pick ROCK, PAPER, SCISSORS, LIZARD or SPOCK."); var userChoice = userChoice.toUpperCase(); } Apologies if it's mundane.
has title: Can't get out of my while loop (Javascript)

http://stackoverflow.com/a/24704678
accepted answer of: http://stackoverflow.com/q/24700072
has comment: http://stackoverflow.com/comment/38324406
upvote count: 1
type: AcceptedAnswer
has body: You need to base64 encode all of the image data at once. Concatenating chunks before and after base64 encoding usually doesn't yield the same result. Take a look at this example: btoa("12" + "34") -&gt; "MTIzNA==" btoa("12") + btoa("34") -&gt; "MTI=MzQ="
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38321124
answers question: http://stackoverflow.com/q/24700072

http://stackoverflow.com/a/24631104
accepted answer of: http://stackoverflow.com/q/24622504
has comment: http://stackoverflow.com/comment/38198416
answers question: http://stackoverflow.com/q/24622504
has comment: http://stackoverflow.com/comment/38207151
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38362471
type: Answer
has body: For updating the title value use below code: Plunkr d3.select("svg").selectAll("title") .data(dataset) .text(function(d, i) { return d[0] + "\n" + "Year: " + d[1] + "\n" + "Defects: " + tooltipformatPercentage(d[2]) + "\n" + "Process Audits: " + tooltipformatPercentage(d[3]) + "\n" + "FOB: " + d[4]; }); });

http://stackoverflow.com/q/24735246
type: Question
tagged with: object
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24735277
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24735414
has body: this is an example function: function processFanGrowth() { console.log('fanGrowth'); } and an object "data" which has a property name "FanGrowth" for(var property in data) { // here i'm trying to generate the function name. funcName = "process" + property; funcName(); } i'm getting this error: Uncaught TypeError: string is not a function
has answer: http://stackoverflow.com/a/24735414
has comment: http://stackoverflow.com/comment/38371038
linked to: http://stackoverflow.com/q/359788
has answer: http://stackoverflow.com/a/24735277
type: AnsweredQuestion
has title: How to assemble function name in javascript?
duplicate of: http://stackoverflow.com/q/359788
has comment: http://stackoverflow.com/comment/38371111
has comment: http://stackoverflow.com/comment/38370948

http://stackoverflow.com/comment/38395164
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24748140
has text: Thanks I'll give it a go. Once this is working I would then have to go from .php file to a .txt file?

http://stackoverflow.com/q/24715018
has answer: http://stackoverflow.com/a/24715146
has title: Receive multiple value from php file via ajax call
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/24715131
downvote count: 0
has answer: http://stackoverflow.com/a/24715113
favorite count: 0
has body: Below is my ajax call code. I want to send one data in .php file via ajax call and want to get two values from .php file. This two values I want to set in different 'input' tags whose id are 'course_name' and 'course_credit'. Here my ajax call return correct value(real value from DB table) of 'course_name' input tag. But 'MY PROBLEM IS' the value of input tag whose id is 'course_credit' shows 'success'. How can I get the correct value(real value from DB table) of id 'course_credit' ? I have a 'select' tag which id is 'c_select' HTML: &lt;input type="text" name="course_name" id="course_name" value=""/&gt; &lt;input type="text" name="course_credit" id="course_credit" value=""/&gt; AJAX : $('#c_select').change(function(){ $.ajax({ type:'post', url:'get_course_info_db.php', data: 'c_id='+ $(this).val(), success: function(reply_data1,reply_data2){ $('#course_name').val(reply_data1); $('#course_credit').val(reply_data2); } }); }); get_course_info_db.php &lt;?php include('db_connection.php'); $c_id = $_POST['c_id']; $result = mysql_query("SELECT * FROM course WHERE c_id = '$c_id'"); $all_course_data = mysql_fetch_array($result); $c_name = $all_course_data['c_name']; $c_credit = $all_course_data['c_credit']; echo $c_name,$c_credit; exit(); ?&gt;
upvote count: 2
has comment: http://stackoverflow.com/comment/38331921
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/24715088
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/24715113
possible better answer: http://stackoverflow.com/a/24715146
type: Question

http://stackoverflow.com/q/24690114
has title: How to convert html elements and properties to something else with jquery
upvote count: 1
has comment: http://stackoverflow.com/comment/38285061
has comment: http://stackoverflow.com/comment/38284835
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/7093417
linked to: http://stackoverflow.com/q/8584098
has answer: http://stackoverflow.com/a/24690281
downvote count: 0
answer count: 1
favorite count: 0
duplicate of: http://stackoverflow.com/q/8584098
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24690281
has body: Nothing major, but I need to know if there is a way for me to change html elements with containing properties to something else with jquery. What I actually want to do is to change the following piece of markup after a page load: &lt;div class="stretchMe" data-stretch="@Url.Content("Images/img1.jpg")"&gt;&lt;/div&gt; to &lt;img class="stretchMe" src="@Url.Content("Images/img1.jpg")" /&gt; How to do something like this?
score: 1

http://stackoverflow.com/comment/38335803
comment on: http://stackoverflow.com/q/24716865
score: 0
type: Comment
type: QuestionComment
has text: What do you mean by name of background image? Url?

post
tags question: http://stackoverflow.com/q/24635019
tags question: http://stackoverflow.com/q/24675172
tag name: post
tags question: http://stackoverflow.com/q/24602203
tags question: http://stackoverflow.com/q/24721986
type: Tag
tags question: http://stackoverflow.com/q/24685996
tags question: http://stackoverflow.com/q/24629020
tags question: http://stackoverflow.com/q/24738526
tags question: http://stackoverflow.com/q/24691866
tags question: http://stackoverflow.com/q/24690711
tags question: http://stackoverflow.com/q/24727769
tags question: http://stackoverflow.com/q/24606584
tags question: http://stackoverflow.com/q/24742637

http://stackoverflow.com/a/24605029
has comment: http://stackoverflow.com/comment/38124456
has comment: http://stackoverflow.com/comment/38124716
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38124473
has comment: http://stackoverflow.com/comment/38124758
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38125263
has body: You need to use Control.ClientID, it gets the control ID for HTML markup that is generated by ASP.NET. Also value is a property not a function. Use alert(document.getElementById('&lt;%= hdTotalCount.ClientID %&gt;').value);
answers question: http://stackoverflow.com/q/24604973
accepted answer of: http://stackoverflow.com/q/24604973
has comment: http://stackoverflow.com/comment/38125676

http://stackoverflow.com/comment/38321473
has text: @ÓscarPalacios ok let this question open. May you will get a better answer.
comment on: http://stackoverflow.com/a/24689523
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24719864
type: UnansweredQuestion
has body: Why is this THREE.Mesh() object undefined when it is clearly defined in a THREE.JSONLoader()? Here is my code... 1: var player; 2: var playerCallback = function(geo, mats){ 3: player = new THREE.Mesh(geo, new THREE.MeshFaceMaterial(mats)); 4: console.log("Loaded Model: " + 'resources/models/Player.js'); 5: } 6: JSONLoader.load('resources/models/Player.js', playerCallback); 7: player.position.set(0, 20, 20); 8: player.physics = false; 9: scene.add(player); The error I am getting is directed at line "7" as saying that player is undefined. Before that "Loaded Model: resources/models/Player.js" is displayed just as It should be.
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: callback
has title: Why does this very clearly defined (in callback to JSONLoader) object read as undefined?
has answer: http://stackoverflow.com/a/24720420
tagged with: three.js

http://stackoverflow.com/comment/38316202
type: AnswerComment
has text: _Why_ are you trying to use `slide()`? If the result is the same, what am I missing? Is there logic behind your desire to use `slide()`, or is it just a whim?
comment on: http://stackoverflow.com/a/24706483
type: Comment
score: 0

http://stackoverflow.com/q/24588193
has body: Say I have a dictionary website, and in one div, I display the word, its definition and an example. I need to refer to those strings somewhere else. Is it generally acceptable to just pull them out of the div (find element by Id, get value), or is it better to create an object representing everything in that div, and avoid the DOM when I need to query its values? Further Explanation: Someone can click on an element on the page (the element just displays the word), and in another div, it displays the definition and example of that word(the element is associated with an object that contains all of this information). In that other div, there are textareas which display the definition and example. I want someone to be able to edit the text there, and for it to then update the values in the word object. Should I just get the text from those textareas and send it to the word object, or should I have an "edit div" object, containing the strings in the text areas, and just send the values between the two objects?
has title: Is it considered bad practice to store and retrieve information only from the DOM?
has comment: http://stackoverflow.com/comment/38092754
has comment: http://stackoverflow.com/comment/38091619
answer count: 1
tagged with: javascript
score: 4
upvote count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/38091975
has answer: http://stackoverflow.com/a/24588682
accepted answer: http://stackoverflow.com/a/24588682
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/38092407
type: Question

http://stackoverflow.com/q/24647307
type: Question
has body: I have a JavaScript function which returns a set of objects: return Func("{{id}}", "{{name}}") I have a problem with passing strings containing quotes, for instance "Dr.Seuss' "ABC""BOOk"" is invalid syntax. I tried but to no avail. Any solution for this?
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24647377
accepted answer: http://stackoverflow.com/a/24647377
has title: Escaping string parameters in Django templates for a JavaScript function
tagged with: django
tagged with: python
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/comment/38277344
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24685471
score: 0
has text: Could you please elaborate on how you place that new content, e.g. do you use $.ajax or $().load?

http://stackoverflow.com/q/24606002
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I'm loading remote content into several divs and want to measure them and compare the results when all have loaded. What is the best way to get this event? pseudo code: $("#div1").load("www.foo.com/1"); $("#div2").load("www.foo.com/2"); $("#div3").load("www.foo.com/3"); function div1_and_div2_loaded(){ alert("Success!"); }
answer count: 1
downvote count: 0
tagged with: load
tagged with: jquery
favorite count: 0
has title: jQuery .lastLoad of several events
tagged with: events
has answer: http://stackoverflow.com/a/24606061
accepted answer: http://stackoverflow.com/a/24606061
type: AnsweredQuestion

http://stackoverflow.com/comment/38140340
score: 3
has text: Could you have an element with id fieldmeta ? Paste the html snippet please
comment on: http://stackoverflow.com/q/24613343
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38327152
type: Comment
has text: @Harold: So long as you understand the limits of the solution. For instance, it fails on `function (a, b) { this.super('__construct', a, b); return { foo: {ka: "boom"}, bar: this.ParentFunctionAdd }; }` (http://regex101.com/r/nF6mT1/2) and `function (a, b) { this.super('__construct', a, b); return { foo: "bo{}om", bar: this.ParentFunctionAdd }; }` (http://regex101.com/r/nF6mT1/3). (Nothing against hex's working within the scope, just highlighting the limits.)
score: 1
comment on: http://stackoverflow.com/a/24712165
type: AnswerComment

http://stackoverflow.com/comment/38117717
has text: so hint here - use state based logic, not dom based, keep the current article number, change it with controls and evrytime you change it - render current state (make menu item active, hide or show buttons, etc)
comment on: http://stackoverflow.com/q/24599890
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24658787
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38226662
tagged with: promise
has body: I have some each iteration by data response from some jquery post action. My question is how to check that this itaration ends? $.each(data, function(key, value){ // }).promise().done(function(){ setTimeout(function(){ submitBtn.removeClass('buttonInProgress'); }, time); }); This is my code, what is wrong? I have an error undefined is not a function.
type: UnansweredQuestion
has title: How to check each() iteration ends with promise()
has comment: http://stackoverflow.com/comment/38226436
score: 2
has comment: http://stackoverflow.com/comment/38226979
upvote count: 3
has answer: http://stackoverflow.com/a/24659024
linked to: http://stackoverflow.com/q/2358205
downvote count: 1
tagged with: each
type: Question
has comment: http://stackoverflow.com/comment/38226423
has comment: http://stackoverflow.com/comment/38226544
has comment: http://stackoverflow.com/comment/38226656
has comment: http://stackoverflow.com/comment/38234015

http://stackoverflow.com/comment/38215173
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24651368
has text: @secretlm The link is OK now. I tested your code with my IE8 browser and a JQuery 1.4.2 and everything is good. Pay attention that the codes in your fiddle and in your post are differents now. (why?) Try to clean the cache, it may cause lots of problems...

http://stackoverflow.com/comment/38219091
has text: There is no way to get information about arbitrary servers from your JavaScript. Do the check from your server instead. You could create a webservice that does it and access that from JS.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24654592
type: Comment

http://stackoverflow.com/a/24694088
has comment: http://stackoverflow.com/comment/38292055
has comment: http://stackoverflow.com/comment/38292990
answers question: http://stackoverflow.com/q/24693509
has body: Your load event was not firing in the samples I tried. Instead of your current event registration try this: JSFiddle: http://jsfiddle.net/j9SR5/1/ // jQuery DOM ready shortcut event handler (with locally scoped $) jQuery(function($){ // Register for window resize $(window).resize(resizeFrame); // Do initial resize resizeFrame(); }); Update: http://jsfiddle.net/TrueBlueAussie/j9SR5/5/ You are setting a fixed height, so the next time you resize the height is as specified previous (and will not change). The new JSFiddle resets the heights to their natural state first. // Revert to height based on content target.each(function () { $(this).css("height", ''); });
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/24693509

http://stackoverflow.com/a/24694361
accepted answer of: http://stackoverflow.com/q/24694237
has comment: http://stackoverflow.com/comment/38292010
answers question: http://stackoverflow.com/q/24694237
type: Answer
has body: I would use input[type=submit] selector for the search as in this fiddle: $("input[type=submit]").val("New value"); As far as I know, jQuery uses the same selectors as CSS does (and many others)!
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38292028

php
tags question: http://stackoverflow.com/q/24617723
tags question: http://stackoverflow.com/q/24716727
tags question: http://stackoverflow.com/q/24688185
tags question: http://stackoverflow.com/q/24618319
tags question: http://stackoverflow.com/q/24677368
tags question: http://stackoverflow.com/q/24615395
tags question: http://stackoverflow.com/q/24601245
tags question: http://stackoverflow.com/q/24641909
tags question: http://stackoverflow.com/q/24608836
tags question: http://stackoverflow.com/q/24613976
tags question: http://stackoverflow.com/q/24710444
tags question: http://stackoverflow.com/q/24719000
tags question: http://stackoverflow.com/q/24701853
tags question: http://stackoverflow.com/q/24721674
tags question: http://stackoverflow.com/q/24722019
tags question: http://stackoverflow.com/q/24734278
tags question: http://stackoverflow.com/q/24701802
tags question: http://stackoverflow.com/q/24622420
tags question: http://stackoverflow.com/q/24642043
tags question: http://stackoverflow.com/q/24639522
tags question: http://stackoverflow.com/q/24718294
tags question: http://stackoverflow.com/q/24746406
tags question: http://stackoverflow.com/q/24722995
tags question: http://stackoverflow.com/q/24733722
tags question: http://stackoverflow.com/q/24589471
tags question: http://stackoverflow.com/q/24641133
tags question: http://stackoverflow.com/q/24713819
tags question: http://stackoverflow.com/q/24630694
tags question: http://stackoverflow.com/q/24705715
tags question: http://stackoverflow.com/q/24649249
tags question: http://stackoverflow.com/q/24613632
tags question: http://stackoverflow.com/q/24734065
tags question: http://stackoverflow.com/q/24699546
tags question: http://stackoverflow.com/q/24730673
tags question: http://stackoverflow.com/q/24740379
tags question: http://stackoverflow.com/q/24628855
tags question: http://stackoverflow.com/q/24732124
tags question: http://stackoverflow.com/q/24694081
tags question: http://stackoverflow.com/q/24606058
tags question: http://stackoverflow.com/q/24739677
tags question: http://stackoverflow.com/q/24647601
tags question: http://stackoverflow.com/q/24610694
tags question: http://stackoverflow.com/q/24653712
tags question: http://stackoverflow.com/q/24673005
tags question: http://stackoverflow.com/q/24694796
tags question: http://stackoverflow.com/q/24701922
tags question: http://stackoverflow.com/q/24675172
tags question: http://stackoverflow.com/q/24588952
tags question: http://stackoverflow.com/q/24703132
tags question: http://stackoverflow.com/q/24713701
tags question: http://stackoverflow.com/q/24637950
tags question: http://stackoverflow.com/q/24657341
tags question: http://stackoverflow.com/q/24641997
tags question: http://stackoverflow.com/q/24632835
tags question: http://stackoverflow.com/q/24651381
tags question: http://stackoverflow.com/q/24668958
tags question: http://stackoverflow.com/q/24647417
tags question: http://stackoverflow.com/q/24703308
tags question: http://stackoverflow.com/q/24669210
tags question: http://stackoverflow.com/q/24604299
tags question: http://stackoverflow.com/q/24673187
tags question: http://stackoverflow.com/q/24601642
tags question: http://stackoverflow.com/q/24659501
tags question: http://stackoverflow.com/q/24647180
tags question: http://stackoverflow.com/q/24688539
tags question: http://stackoverflow.com/q/24660827
tags question: http://stackoverflow.com/q/24738989
tags question: http://stackoverflow.com/q/24716674
tags question: http://stackoverflow.com/q/24648377
tags question: http://stackoverflow.com/q/24669670
tags question: http://stackoverflow.com/q/24716516
tags question: http://stackoverflow.com/q/24725860
tags question: http://stackoverflow.com/q/24715599
tags question: http://stackoverflow.com/q/24726639
tags question: http://stackoverflow.com/q/24659978
tags question: http://stackoverflow.com/q/24633399
tags question: http://stackoverflow.com/q/24647721
tags question: http://stackoverflow.com/q/24643827
tags question: http://stackoverflow.com/q/24594748
tags question: http://stackoverflow.com/q/24730923

http://stackoverflow.com/comment/38250192
has text: URL is on same server. I am reading it from session only and after that I try to add it as request parameter. This must be available in request for xyz.jsp
score: 0
comment on: http://stackoverflow.com/q/24646313
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38282454
comment on: http://stackoverflow.com/a/24688792
score: 1
type: AnswerComment
has text: But my point is there is nothing to learn from what you are doing other than it is a very bad idea and has no place in any system.
type: Comment

http://stackoverflow.com/q/24734736
tagged with: http-post
type: AnsweredQuestion
favorite count: 0
tagged with: ajax
has title: Passing file with filename and other parameters to upload files using jquery
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/24734823
has answer: http://stackoverflow.com/a/24735143
score: 0
answer count: 2
downvote count: 2
possible better answer: http://stackoverflow.com/a/24734823
tagged with: file
has body: I am using Jquery to upload files. The problem I intend to pass some more parameters with the selected file. But, I experienced that processData attribute value should be set to false if passed data is not to be processed as string. When I do that, I cannot pass any other values with data passed with jquery ajax. Below is the code I am using: $.ajax({ url: 'php/upload.php', data: data, // here I want to pass more data like { filedata:data, op1 : val1, op2:val2 } cache: false, contentType: false, processData: false, type: 'POST', success: function(data){ alert(data); } }); Please share your ideas if you have been able to find a workaround for this situation. Or if you know any other way of passing data. Please share.
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24735143

http://stackoverflow.com/a/24641218
has comment: http://stackoverflow.com/comment/38195094
answers question: http://stackoverflow.com/q/24641150
score: 0
has comment: http://stackoverflow.com/comment/38194747
type: Answer
has comment: http://stackoverflow.com/comment/38193996
has body: Here is how I would do it if I were you : for (var i = 0; i &lt; array1.length; i++) { if (array1[i] &lt;= array2[i]) { //Do something } } forEach works just as well. For your concerns with var link = ... so long as it is a valid path and you don't forget to put the ; at the end you are good.
has comment: http://stackoverflow.com/comment/38194043
has comment: http://stackoverflow.com/comment/38195325
has comment: http://stackoverflow.com/comment/38193928

http://stackoverflow.com/comment/38111489
score: 0
type: Comment
has text: `$('#buttonList').append(' '+ username + ' ')` seems to work fine for me, and multiple list items are added. The issue is trying to turn these buttons into jQuery-UI buttons.
comment on: http://stackoverflow.com/a/24598440
type: AnswerComment

http://stackoverflow.com/comment/38172133
score: 1
has text: As pointed out in this answer: http://stackoverflow.com/a/5525812/2964675 it's not in the ECMAScript spec. If you want some sort of order, try Array Objects.
type: QuestionComment
comment on: http://stackoverflow.com/q/24629917
type: Comment

http://stackoverflow.com/comment/38201011
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24645183
has text: that is invalid html syntax

http://stackoverflow.com/q/24739047
type: Question
tagged with: javascript
answer count: 2
has body: This is my code: $("#myform").ajaxForm({ beforeSend: function() { var abcd = "hahah"; }, success: function(data){ alert(abcd); } }); How can I have the variable in beforesend to be accessible in success? I want the variable to be local so it does not mess with global variable. As soon as after success, that variable should be no longer in use anymore.
has answer: http://stackoverflow.com/a/24739078
has title: Javascript pass variable between beforesend & success
tagged with: variables
favorite count: 0
accepted answer: http://stackoverflow.com/a/24739078
has answer: http://stackoverflow.com/a/24739378
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24739378
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/24704530
answers question: http://stackoverflow.com/q/24704480
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24704480
has comment: http://stackoverflow.com/comment/38312170
has comment: http://stackoverflow.com/comment/38312123
type: Answer
downvote count: 0
has body: Just add logic to your img src: &lt;img src="/images/icons/mail&lt;%= @post_regular ? 2 : 1 %&gt;.png" /&gt; Similar functionality can be used to adjust the styling, but I'd probably recommend injecting a secondary class to set the background color instead of hardcoding the style.
score: 3
has comment: http://stackoverflow.com/comment/38311859
type: AcceptedAnswer

http://stackoverflow.com/q/24653538
has comment: http://stackoverflow.com/comment/38216371
score: 0
has body: Hey guys I am having some trouble finding a simple way to add a transition to a very basic javascript image slide show: //variable that will increment through the images var step=1 var whichimage=1 function slideit(){ //if browser does not support the image object, exit. if (!document.images) return document.images.slide.src=eval('image'+step+'.src') whichimage=step if (step&lt;3) step++ else step=1 //call function 'slideit()' every 5 seconds setTimeout('slideit()',5000) } slideit() function slidelink(){ if (whichimage==1) window.location='page1.php' else if (whichimage==2) window.location='page1.php' else if (whichimage==3) window.location='index.php' } How can i add in a fade or swipe transition?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38261022
has comment: http://stackoverflow.com/comment/38216703
has comment: http://stackoverflow.com/comment/38219814
has title: Transition to simple javascript slideshow
tagged with: image
tagged with: transition
type: Question
has comment: http://stackoverflow.com/comment/38241550
tagged with: slideshow
tagged with: javascript

http://stackoverflow.com/comment/38279958
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24684722
type: Comment
has text: thanks i know id but it was the only thing working but thanks again i can not tell you how much this helped me

http://stackoverflow.com/comment/38375411
has text: pls do check this http://stackoverflow.com/questions/24731932/calling-android-function-using-jscript
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24737269

http://stackoverflow.com/a/24698137
has comment: http://stackoverflow.com/comment/38300061
answers question: http://stackoverflow.com/q/24698005
has body: Use value of key pressed $('#inputbox').keypress(function(e) { var code = e.keyCode || e.which; }); following are desired values tab => 9 enter => 13 According to it's docs you can use Event **beforeTagAdded (function, Callback)** To check the value of input before adding it. Check if it is one of the values you require.If it is return true else false
score: -1
has comment: http://stackoverflow.com/comment/38355435
downvote count: 2
type: Answer
upvote count: 1

http://stackoverflow.com/comment/134754376
comment on: http://stackoverflow.com/a/76410805
type: AnswerComment
score: 0
type: Comment
has text: Looks good logically and can be easily adjusted to work over any sequence of chars. Would be interesting to see memory, CPU and garbage collection implications of the different ways to build the output

http://stackoverflow.com/a/25271021
has comment: http://stackoverflow.com/comment/39435800
type: Answer
score: 2
downvote count: 0
has body: Like Matt Burland said, the problem is on the server side. In my app I have a similar case where I have an &lt;a&gt; tag that has its href generated. On the backend, you have to make sure to properly build your response so that the browser understands that you are currently downloading a file. For example this is a response header that my application has when I trigger a download of a word document: HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Content-Length: 141312 Content-Type: application/octet-stream Content-Encoding: UTF-8 Expires: -1 Server: Microsoft-IIS/7.5 Content-Disposition: attachment; filename="I-C1-1.1%20MJ%20JB%20E%20(2012-07-16)%20.doc" Charset: UTF-8 X-AspNet-Version: 4.0.30319 X-UA-Compatible: IE=8 Date: Tue, 12 Aug 2014 17:46:34 GMT For the server side, here is the code I have for downloading the document (the response header I pasted) FileStream fileStream = fileProvider.Open(filePath); var response = new HttpResponseMessage(); response.Content = new StreamContent(fileStream); response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = Uri.EscapeDataString(fileName); response.Content.Headers.Add("Content-Encoding", "UTF-8"); response.Content.Headers.Add("Charset", "UTF-8"); response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); response.Content.Headers.ContentLength = fileProvider.GetLength(filePath);//new FileInfo(filePath).Length; return response; For response.Content.Headers.ContentDisposition.FileName you don't have to escape the filename unless you have special characters which is my case since our application manages French documents. If you need any more explanations or have any comments on my answer, feel free to reply.
upvote count: 2
answers question: http://stackoverflow.com/q/24698323

http://stackoverflow.com/a/24718680
answers question: http://stackoverflow.com/q/24718349
score: 35
has body: In ECMA-262, 5th edition, you could use Array.prototype.some for this. var array = [ 'I', 'hAve', 'theSe', 'ITEMs' ]; var query = 'these'.toLowerCase(); var index = -1; array.some(function(element, i) { if (query === element.toLowerCase()) { index = i; return true; } }); // Result: index = 2
type: Answer
has comment: http://stackoverflow.com/comment/38340035
downvote count: 1
has comment: http://stackoverflow.com/comment/38339598
upvote count: 36

http://stackoverflow.com/comment/38232218
type: QuestionComment
score: 0
has text: @Quentin sooo how do I do some kind of comparison? For the strings.
comment on: http://stackoverflow.com/q/24661797
type: Comment

http://stackoverflow.com/a/24739746
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38393834
has body: I don't understand why you need two pieces of criteria (WHERE tableLinkRef=? AND tableARef=?',theID,theTableAItemClicked) for a DELETE and only one piece of criteria for the UPDATE (WHERE tableLinkRef=? AND tableARef=?',theID,theTableAItemClicked) db3.execute('DELETE FROM tableB WHERE tableLinkRef=? AND tableARef=?',theID,theTableAItemClicked); // fixed by adding another comparison. //db3.execute('UPDATE tableB SET titleColumn=? WHERE tableLinkRef=?',testTitle,theID); // this DOES update the titleColumn in matching rows/items when the code is active and the previous is commented out Since you are saying that the update is working on the correct rows, you would just take the WHERE clause from that command. db3.execute('DELETE FROM tableB WHERE tableLinkRef=?',theID); It appears confusing because tableLinkRef appears to be a reference to tableA's id and tableARef seems to describe that as well.
upvote count: 1
answers question: http://stackoverflow.com/q/24724554

http://stackoverflow.com/q/24737169
tagged with: soap
has comment: http://stackoverflow.com/comment/38539038
answer count: 0
has comment: http://stackoverflow.com/comment/38538693
has comment: http://stackoverflow.com/comment/38374534
type: Question
has body: I'm an intern software engineer and have been asked to write a soap script/ REST call that reaches one of our company servers abroad in order to get a session id and a ticket. I've written the script in JS and have been struggling with the request headers. Our server needs basic Auth of username and password, the headers are as follows: MAN-user-id, MAN-user-password. xmlhttp.onreadystatechange = function() {if (xmlhttp.readyState == 4) alert('It worked')}; xmlhttp.setRequestHeader("Access-Control-Request-Headers", "Origin, x-requested-with, Content-Type, Accept"); xmlhttp.setRequestHeader("Access-Control-Allow-Credentials", true); xmlhttp.setRequestHeader("Access-Control-Allow-Origin", "url"); xmlhttp.setRequestHeader("MAN-user-id", "username"); xmlhttp.setRequestHeader("MAN-user-password", "password"); upon setting my custom headers I get a 550 response from my server saying I'm missing the username and password and my request headers do not set. I'm using the GET method yet Fiddler shows me using the OPTIONS method (although the "allow-control-request-method" header displays the correct method.) It seems like every header I set displays as values of the 'Access-Control-Request-Header' i.e: 'Access-Control-Request-Headers: access-control-allow-origin, man-user-id, man-user-password' Can someone please explain to me why that is happening? Thank you
tagged with: javascript
score: 0
has title: HTTP Request Headers not being accepted by server
has comment: http://stackoverflow.com/comment/38374558
tagged with: ajax
tagged with: rest
type: UnansweredQuestion

http://stackoverflow.com/comment/38128490
type: QuestionComment
has text: Because the AJAX image loader will load picture asynchronously, you need to make sure that all pictures have been loaded properly before you append them to the container DOM.
score: 0
comment on: http://stackoverflow.com/q/24606519
type: Comment

http://stackoverflow.com/q/24682808
tagged with: promise
tagged with: node.js
score: 2
possible better answer: http://stackoverflow.com/a/38087874
type: AnsweredQuestion
tagged with: bluebird
has answer: http://stackoverflow.com/a/24682928
has answer: http://stackoverflow.com/a/38087874
upvote count: 2
has body: I have followed the post Correct way to write loops for promise. to create loops for promise successfully. However, it seems that this method doesn't work with nested loop The loop I want to simulate: var c = 0; while(c &lt; 6) { console.log(c); var d = 100; while(d &gt; 95) { console.log(d); d--; } c++; } Promised (note that I simplified the logic of promFunc() here, so do not assume it is useless) : var Promise = require('bluebird'); var promiseWhile = Promise.method(function(condition, action) { if (!condition()) return; return action().then(promiseWhile.bind(null, condition, action)); }); var promFunc = function() { return new Promise(function(resolve, reject) { resolve(); }); }; var c = 0; promiseWhile(function() { return c &lt; 6; }, function() { return promFunc() .then(function() { console.log(c); // nested var d = 100; promiseWhile(function() { return d &gt; 95; }, function() { return promFunc() .then(function() { console.log(d); d--; }); })// .then(function(){c++}); I put increment here as well but no dice... c++; }); }).then(function() { console.log('done'); }); Actual result: 0 100 1 99 100 2 98 99 100 3 97 98 99 100 4 96 97 98 99 100 5 96 97 98 99 100 96 97 98 99 96 97 98 96 97 done 96 Any solutions?
accepted answer: http://stackoverflow.com/a/24682928
type: Question
linked to: http://stackoverflow.com/q/24660096
has title: Nested while loop for promise
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/24624607
answer count: 1
has comment: http://stackoverflow.com/comment/38162882
has body: I have a task that registred in grunt config: grunt.registerTask('test_Branches', 'Run Branches check on windows', require('PATH').check); And in my branches.test.js I have method check(): this.check = function () { 'use strict'; console.log("Execution started\n"); exec('git for-each-ref --sort=-committerdate refs/remotes/origin/ --format='%(committername)', {cwd: currentDir}, function (error, stdout, stderr) { console.log('started 1.1'); if (stderr) { console.log('stderr: ' + stderr + "\n"); } else { console.log("Authors has been received\n"); } if (error !== null) { console.log('Execution command error: ' + error + "\n"); } }); }; But when I'm trying to execute my task through command line with command: grunt test_Branches I got: C:\PATH&gt;grunt test_Branches Running "test_Branches" task Execution started Done, without errors. What's the problem with my 'exec' method?
tagged with: node.js
score: 0
accepted answer: http://stackoverflow.com/a/24661720
has title: Method 'exec' doesn't work in grunt task
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/38162817
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38162801
tagged with: exec
tagged with: asynchronous
type: Question
has answer: http://stackoverflow.com/a/24661720

http://stackoverflow.com/comment/104580220
comment on: http://stackoverflow.com/a/58714347
type: AnswerComment
type: Comment
has text: You should use `scrollTo` not on `element` but on `window`
score: 1

http://stackoverflow.com/q/24687456
has comment: http://stackoverflow.com/comment/38302833
tagged with: jquery
favorite count: 0
tagged with: kendo-ui
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/24700326
has body: I have a string stored in a SQL database that has carriage returns in it. I can see the carriage returns via NotePad++. When I display that string in a kendo template, everything is one long string with no carriage returns. I have tried a string replace to replace \r\n with . When I do this, I now see where the line breaks should be. I thought this was the correct syntax to render HTML tags: Position Description : #= PositionDescription # And here are the related definitions in my jquery kendo grid: detailTemplate: kendo.template($("#detail-template").html()), detailInit: function(e) { kendo.bind(e.detailRow, e.data); }, But I get this: I have also tried using #: #, but then I get: And here is where I do the replacement (in the Model entity class) position.PositionDescription = position.PositionDescription.ToString().Replace("\r\n", " "); UPDATE: here is the console logging for e.data:
has answer: http://stackoverflow.com/a/24700326
accepted answer: http://stackoverflow.com/a/24703263
has comment: http://stackoverflow.com/comment/38279981
type: AnsweredQuestion
downvote count: 0
tagged with: asp.net-mvc
score: 1
has answer: http://stackoverflow.com/a/24703263
has title: Render HTML tags in kendo template as HTML
type: Question
answer count: 2
upvote count: 1
tagged with: javascript

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

http://stackoverflow.com/q/24688294
tagged with: localhost
type: Question
has title: How do I allow Cross-Origin Requests from greasemonkey scripts in Firefox?
score: 15
tagged with: cross-domain
tagged with: firefox
answer count: 1
downvote count: 1
upvote count: 16
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38281427
has answer: http://stackoverflow.com/a/24690446
has body: I'm developing a Greasemonkey script that implements a couple of tools onto a webpage. This script makes a request for data from http://localhost/chess/heartbeat.php Now currently in Firefox I am getting this console error which totally stops my jQuery AJAX request for data. Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/chess/heartbeat.php. This can be fixed by moving the resource to the same domain or enabling CORS. I am able to work around this using Google Chrome. When I have it as a simple browser extension for chrome, I'm able to have it do the same thing as Greasemonkey and I can add the following permissions to the manifest file for the plugin which allows me to make the same data request which Firefox blocked: "permissions": [ "&lt;all_urls&gt;" ] Anyway, this works on chrome, but I want to achieve the same effect on Firefox. I've been researching this issue and I can't find a simple answer.
type: UnansweredQuestion
tagged with: google-chrome

http://stackoverflow.com/q/24717560
has comment: http://stackoverflow.com/comment/38337001
tagged with: push
tagged with: arrays
tagged with: javascript
score: 0
has title: What is the simplest way break text into single strings to be modified and joined again using JS?
upvote count: 1
has body: For example, I am am working on a Pig Latin translator. I want a for loop to change the text to an array and allow the rest of my code to change single words and put it back together again as a result. var pigLatinTranslator = function(firstWord) { firstWord = firstWord.toLowerCase(); var splitText = firstWord.split(' '); var finalResult = []; for (var i = 0; i &lt; splitText.length; i++) { var singleWord = splitText[i]; if (singleWord.charAt(0) !== "a" &amp;&amp; singleWord.charAt(0) !== "e" &amp;&amp; singleWord.charAt(0) !== "i" &amp;&amp; singleWord.charAt(0) !== "o" &amp;&amp; singleWord.charAt(0) !== "u") { var consonantsVar; for (var i = 0; i &lt; singleWord.length; i++) { var chr = singleWord.charAt(i); if ((chr === 'q') &amp;&amp; (singleWord.charAt(i + 1) === 'u')) { consonantsVar = (singleWord.slice(i + 2) + singleWord.slice(0, i) + "quay"); break; } else if (chr === 'a' || chr === 'e' || chr === 'i' || chr === 'o' || chr === 'u') { consonantsVar = (singleWord.slice(i) + singleWord.slice(0, i) + "ay"); break; } } return consonantsVar; } else { return (singleWord + "ay"); } return splitText.join(' '); } };
downvote count: 1
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/38336927
has comment: http://stackoverflow.com/comment/38337089
type: UnansweredQuestion
type: Question
tagged with: for-loop

http://stackoverflow.com/comment/38600942
score: 0
comment on: http://stackoverflow.com/a/24718336
type: Comment
has text: That page indicates where to add the two functions: to your theme's functions.php file
type: AnswerComment

http://stackoverflow.com/comment/38859522
type: Comment
has text: I've updated [the example fiddle](http://jsfiddle.net/cKf65/2/), now each row contains a remove button.
type: AnswerComment
comment on: http://stackoverflow.com/a/24762587
score: 0

http://stackoverflow.com/comment/99883448
type: Comment
comment on: http://stackoverflow.com/a/24718843
score: 3
has text: @donutguy640 Suppose I have created a folder "ABC". That "ABC" folder does not contains any other files yet. In that scenario you cannot select the folder name.
type: AnswerComment

http://stackoverflow.com/q/24590047
has answer: http://stackoverflow.com/a/24590061
tagged with: javascript
favorite count: 0
has body: I'm following Code Academy's Javascript tutorial. Here's the lesson, I'm having trouble with: Use a for-in loop to print out all the properties of nyc. Here's my code: var nyc = { fullName: "New York City", mayor: "Bill de Blasio", population: 8000000, boroughs: 5 }; for(var x in nyc) { console.log(nyc[x]); } When I execute this, Code Academy gives me the following error: Oops, try again. It looks like you didn't print nyc's fullName I used Chrome's developer tools to run this code and I seem to be getting the appropriate output: New York City Bill de Blasio 8000000 5 What am I doing wrong here? Edit: I took Pointy's advice on changing the inside of the for-in loop to console.log(x). I still got the same error until I closed the Code Academy tab and opened up a new one.
has title: Printing out the properties of an object
has comment: http://stackoverflow.com/comment/38095399
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38095519
has comment: http://stackoverflow.com/comment/38095378
has comment: http://stackoverflow.com/comment/38095473
has answer: http://stackoverflow.com/a/24590068
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38095291
has comment: http://stackoverflow.com/comment/38095424
score: -1
answer count: 2
upvote count: 0

http://stackoverflow.com/comment/38256798
score: 0
has text: I usually solve this problem (the passing stuff from PHP one) by having two javascript objects. One of them is hard-coded in the javascript and contains anything that won't be changing... that's formatter functions, most of the setup for the chart, etc. I have another javascript object that contains changing values (e.g., the data, labels, etc.) that need to be generated by PHP. I then merge the two objects together before rendering the chart. See here for how to do that. http://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24660807

http://stackoverflow.com/a/24661128
type: Answer
has comment: http://stackoverflow.com/comment/38232640
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24660239
accepted answer of: http://stackoverflow.com/q/24660239
has comment: http://stackoverflow.com/comment/38233463
type: AcceptedAnswer
downvote count: 0
has body: Have you looked into Request, CasperJS, or PhantomJS? I think they may be just what you're looking for. Phantom is a headless browser that can browse webpages for you (useful for testing, taking screenshots, and taking actions on pages for you). CasperJS can help you out with that, as well, and Request allows you to make http requests from your server, rather than client. If you need to search/ traverse the page your server gets back, you can also use Cheerio, which is pretty much jQuery for your server. Hope that helps!

http://stackoverflow.com/q/24742037
has answer: http://stackoverflow.com/a/24765527
tagged with: https
type: Question
score: 0
tagged with: api
has title: Google Contacts API without HTTPS
answer count: 1
tagged with: javascript
tagged with: google-content-api
has body: I would like to import my Google contacts to my web application which is build in JavaScript. I used the Google Contacts API version 3.0 to do this, but it requires HTTPS permissions. Is there a way to import my Google contacts in a developing environment with HTTPS?
tagged with: google-contacts-api
type: UnansweredQuestion

http://stackoverflow.com/a/24721053
type: Answer
upvote count: 1
score: 1
has body: Javascript have objects which can be represented as key-value pair. The key must be and will be converted to a string. Here is an object { name: "Moo", age: 20 } You can already represent a Binary Tree by using this notation, though not as pretty as C/C++/Java counterpart. { node: 20, left: { node: 10, left: null, right: null }, right: { node: 30, left: null, right: null } } You can obtain the value of the field using someObject.field or someObject["field"], both are equivalent!. List and Arrays can be represented using javascript Arrays, however they are also an object. Observe this. var myArray = [2,3,5]; myArray[0]; // 2 myArray["0"]; // 2 myArray["push"]; // function push()..... etc etc Does this means myArray also an object? well yes. It just happened that your browser is smart enough that when you console.log it, it shows the data and hides the methods properly.
downvote count: 0
answers question: http://stackoverflow.com/q/24720872

http://stackoverflow.com/comment/38351123
type: Comment
type: QuestionComment
has text: thanks for the comments, my assumption was based on these cases - could you tell me what the distinction is? http://stackoverflow.com/questions/2722159/javascript-how-to-filter-object-array-based-on-attributes
comment on: http://stackoverflow.com/q/24724718
score: 0

http://stackoverflow.com/a/24713014
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24712954
type: Answer
answers question: http://stackoverflow.com/q/24712954
upvote count: 1
has body: jQuery isn't designed to use XPath as it's selectors. Once you wrap xml in jQuery object, think of the tags the same way you would html tags and use exact same jQuery selector and methods approach Assuming you have multiple &lt;Record&gt; try: var $records = $(xml).find("Record");/* create collection of all Record tags */ $records.each(function(){ var $children=$(this).children(); /* or to access specific elements*/ var mailFreq= $(this).find('MailFrequency').text(); })
score: 1
has comment: http://stackoverflow.com/comment/38345601
has comment: http://stackoverflow.com/comment/38330710
type: AcceptedAnswer

http://stackoverflow.com/q/24625839
has title: Two Javascript Date Variables
answer count: 3
has body: I don't seem to be able to get my head around the syntax required to have two date variables. var videodate = new Date(2014,7,5); var previousdate = videodate.getDate()-1; This would allow me to have two links on the page: &lt;a href="today.mp4"&gt;{videodate}&lt;/a&gt; &lt;a href="yesterday.mp4"&gt;{previousdate}&lt;/a&gt; What I am finding is that the solutions I've hunted around for use: videodate.setDate(videodate.getDate()-1) but that then changes the 'videodate' variable. I just want to be able to read 'videodate' in order to specify the 'previousdate'!? So something like: var previousdate = new Date(videodate.getDate()-1)
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24625900
accepted answer: http://stackoverflow.com/a/24626042
has answer: http://stackoverflow.com/a/24626046
possible better answer: http://stackoverflow.com/a/24625900
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24626042
tagged with: javascript
tagged with: date

http://stackoverflow.com/comment/38273462
comment on: http://stackoverflow.com/q/24683678
has text: no the delete exists outside of the ng-grid unfortunately
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38278148
type: Comment
comment on: http://stackoverflow.com/a/24686315
score: 0
type: AnswerComment
has text: `jQuery` answer to a `CSS` question... maybe this would work, but is not what OP is after.

gruntjs
tags question: http://stackoverflow.com/q/24612438
tags question: http://stackoverflow.com/q/24699996
tags question: http://stackoverflow.com/q/24643492
tags question: http://stackoverflow.com/q/24645233
tags question: http://stackoverflow.com/q/24594804
tags question: http://stackoverflow.com/q/24631744
tags question: http://stackoverflow.com/q/24674691
tags question: http://stackoverflow.com/q/24685379
tags question: http://stackoverflow.com/q/24620982
tags question: http://stackoverflow.com/q/24738243
tags question: http://stackoverflow.com/q/24736707
tags question: http://stackoverflow.com/q/24647722
type: Tag
tags question: http://stackoverflow.com/q/24645027
tags question: http://stackoverflow.com/q/24656041
tags question: http://stackoverflow.com/q/24627450
tags question: http://stackoverflow.com/q/24600611
tags question: http://stackoverflow.com/q/24588083
tags question: http://stackoverflow.com/q/24734812
tags question: http://stackoverflow.com/q/24718246
tags question: http://stackoverflow.com/q/24646162
tags question: http://stackoverflow.com/q/24745832
tags question: http://stackoverflow.com/q/24666210
tag name: gruntjs
tags question: http://stackoverflow.com/q/24624607

http://stackoverflow.com/comment/38202669
type: AnswerComment
has text: Try implementing webclient :)
type: Comment
comment on: http://stackoverflow.com/a/24604913
score: 0

http://stackoverflow.com/comment/38367201
type: QuestionComment
has text: You should use older jquery or migration plugion, which supports ie8. http://jquery.com/download/
score: 1
comment on: http://stackoverflow.com/q/24731369
type: Comment

http://stackoverflow.com/a/24655311
type: Answer
score: 2
upvote count: 2
has body: That is the infamous world of closure that you are dealing with. While you are binding event on the tag, the variable cEvent is getting incremented, which mean that each event will have the last instance of cEvent as id. You can use a self closing function : (function(cEvent){ $('ul.popuptabslist li#tab' + (cEvent + 1)).on('click', function(){ // Remove Active Class on Click $('ul.popuptabslist li.tab').removeClass(options.activeClass); $(this).parent().parent().find('ul.popuptabsoutput li.tabcontent').removeClass(options.activeClass); // Add Active Class to Clicked Tab and Corresponding Content $(this).addClass(options.activeClass); $('ul.popuptabsoutput li#content' + (cEvent + 1)).addClass(options.activeClass); $(this).parent().parent().find('ul.popuptabsoutput li#content' + (cEvent + 1)).addClass(options.activeClass); console.log($(this).attr('id').toUpperCase() + ' clicked'); }); })(cEvent); Fiddle : http://jsfiddle.net/B8e8W/1/
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24655142
answers question: http://stackoverflow.com/q/24655142

http://stackoverflow.com/q/24623679
has answer: http://stackoverflow.com/a/24623750
type: AnsweredQuestion
has title: How to replace a class by using javascript when multiple classes present
score: 1
has comment: http://stackoverflow.com/comment/38160744
has body: Um using this Javascript to replace a specific class conditionally ,but I found out that it is cascading . How to remove a class and add a class by only using javascript and to make it work on IE8? "&lt;script type='text/javascript'&gt;" + "var elem = document.getElementById('manage-footer');" + "elem.onclick = function() { " + "if (hasClass(elem, 'footer-expand')) {" + " elem.className.replace(/(?:^|s)footer-expand(?!S)/g , '');" + " elem.className = elem.className + ' footer-diminish';" + "} else if (hasClass(elem, 'footer-diminish')) {" + " elem.className.replace(//(?:^|s)footer-diminish(?!S)/g, '');" + " elem.className = elem.className + ' footer-expand';" + "}" + "" + "" + "};" + "function hasClass(element, cls) {" + "return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') &gt; -1;" + "}" +
accepted answer: http://stackoverflow.com/a/24623750
type: Question
upvote count: 1
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/24695292
has body: I'm creating a website for a client that sells stuff. I haven't made anything yet, this is the concept stage. The idea is that x products are shown. Each product has it's own value. So let's say we have 4 products Product 1 = $10 Product 2 = $25 Product 3 = $50 Product 4 = $100 The user doesn't see the values and the amount he is allowed to spent. Let's say the user has a total ammount of $150 to spent. If he clicks product 4 he has a total amount of $50 left. The trick is now to only show the proucts that are $50 or less. Does anybody know what the smartest way of approaching this is? I think Javascript but love to hear your opinion. I can't be the first to do this so are there any examples/tutorials/freebies/etc ...?
has title: Javascript show/hide items based on value
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/24695356
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38293655
has comment: http://stackoverflow.com/comment/38297436

http://stackoverflow.com/q/24596091
downvote count: 0
has answer: http://stackoverflow.com/a/24599338
favorite count: 0
has title: Javascript Targeting Child Elements in a ID
answer count: 4
type: AnsweredQuestion
has body: i'm currently learning javascript and had a question. I am trying to target only the h1 tag in the div id=title i tried a few ways using this as a reference site amongst others: http://www.ibm.com/developerworks/library/wa-jsanddom-pr/sidefile1.html but nothing seems to be working, i get back the value "undefined" esentially what i want to do is only target the h1 and change the text to something else. how do i do that? is this along the right path or is there a different way to do it? Javascript Lesson 1 The basics any help is greatly appreciated. Thanks.
has answer: http://stackoverflow.com/a/24596130
tagged with: dom
type: Question
score: 5
has answer: http://stackoverflow.com/a/51818397
has comment: http://stackoverflow.com/comment/38107262
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/38107071
possible better answer: http://stackoverflow.com/a/24596188
accepted answer: http://stackoverflow.com/a/24596130
has answer: http://stackoverflow.com/a/24596188

http://stackoverflow.com/a/24616334
accepted answer of: http://stackoverflow.com/q/24613031
has comment: http://stackoverflow.com/comment/38200570
answers question: http://stackoverflow.com/q/24613031
type: Answer
has comment: http://stackoverflow.com/comment/38196198
has body: Assuming sliderClass is a class on the container div, all you should need to do is insert a space between .sliderClass and .google... in the CSS: .sliderClass .google-visualization-controls-slider-thumb { background-color: #14894e; border: 1px solid #14894e; } .sliderClass .google-visualization-controls-rangefilter-thumblabel { color: #14894e; }
has comment: http://stackoverflow.com/comment/38152091
has comment: http://stackoverflow.com/comment/38153708
score: 0
has comment: http://stackoverflow.com/comment/38150585
has comment: http://stackoverflow.com/comment/38195628
type: AcceptedAnswer

http://stackoverflow.com/q/24669288
type: Question
upvote count: 2
answer count: 1
downvote count: 1
has body: I'm currently learning Express JS from the scratch. My goal is to become proficient with Node and Express. While trying out some examples online, I ran into this interesting scenario. I'm building simple http server. The code is as follows. var express = require("express"); var port = 8080; var app = express(); app.get("*",function(req,res){ res.end("Hello World!"); }); app.listen(port,function(){ console.log("Listening on Port: %s",port); }); If I run this by hitting http://localhost:8080, it outputs Hello World!. Perfect, Great. Then I tried to pass some parameters through URL with this code var express = require("express"); var port = 8080; var app = express(); app.get("/name/:user_name",function(req,res){ res.status(200); res.set('Content-type','text/html'); res.end(" Hello "+req.params.user_name+"!!! "); }); app.get("*",function(req,res){ res.end("Hello World!"); }); app.listen(port,function(){ console.log("Listening on Port: %s",port); }); Then I run it by hitting http://localhost/name/Maverick, It outputs Hello Maverick!!!. Great, Perfect. But here is the interesting part, when I switch the order of app.get("*") and app.get("/name/:user_name") the output changes. For example, if I change app.js code to look like var express = require("express"); var port = 8080; var app = express(); app.get("*",function(req,res){ // <<<<--------- app.get("*") is first in this case res.end("Hello World!"); }); app.get("/name/:user_name",function(req,res){ res.status(200); res.set('Content-type','text/html'); res.end(" Hello "+req.params.user_name+"!!! "); }); app.listen(port,function(){ console.log("Listening on Port: %s",port); }); And if I run it hitting http://localhost:8080/name/Maverick then it outputs Hello World. The question is, does the order of app.get() routes matter? Even when I have defined the route for /name/:user_name why it doesn't get called? Is there any way to make the code independent of the order in which app.get() routes are defined?
tagged with: javascript
favorite count: 0
tagged with: express
has comment: http://stackoverflow.com/comment/38245480
has answer: http://stackoverflow.com/a/24669454
accepted answer: http://stackoverflow.com/a/24669454
has title: Express.js : Interesting result
tagged with: node.js
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/24588953
type: Answer
score: 1
upvote count: 1
has body: Browsers should be already pretty aggressive on caching images: Chrome often shows multiple requests, but if you check from the second on usually they're all satisfied using the cache. In case you want to cache internally in your JS code, try to cache images by URL like the following: // use this as JS cache var images = {}; function loadCarousels(carouselLoc, carouselId) { $("li").find(carouselLoc).each(function (index) { var img = this; var outer = 0; // cache it if(!images[img.src]){ images[img.src] = document.createElement("img"); // if the user disable the cache, this should prevent another request images[img.src].src = img.src; } $(carouselId).find("ul").each(function (innerIndex) { var liX = document.createElement("li"); $(this).append(liX); // retrieve from the cache var imgInner = images[img.src]; $(imgInner).appendTo(liX); console.log($(this)); }); }); }
downvote count: 0
answers question: http://stackoverflow.com/q/24588728

http://stackoverflow.com/a/24710697
has body: Meteor actives the subscriptions you tell it to. So a subscription like: Meteor.subscribe('posts'); Will subscribe to posts as soon as the client starts running, and will always keep the subscription open. On the other hand, if you have an autorun like: Tracker.autorun(function() { Meteor.subscribe('comments', Session.get('currentPostId')); }); The subscription will again activate when the client starts, but it will rerun whenever the currentPostId session variable is updated. Note that a common idiom is to initiate some subscriptions as soon as the user logs in. For example: Tracker.autorun(function() { if (Meteor.userId()) Meteor.subscribe('friends'); }); In all of the above cases, the subscriptions are activated independent of where the user is in the app. It's extremely common to use iron-router's waitOn hook to activate the subscriptions relevent to the current route. For example: Router.map(function () { this.route('dashboard', { waitOn: function () { return Meteor.subscribe('news'); } }); }); Whenever the user navigates to the dashboard route, he will also subscribe to news. When he navigates away, the subscription will stop (with some caveats) and new subscriptions will start depending on how the router is configured. Side note: Subscriptions Manager is an interesting optimization to the problem of constantly starting and stopping your subscriptions when navigating between routes. Finally, I'll note that it's perfectly reasonable to have a mix of global and route-specific subscriptions. Feel free to mix and match as appropriate for your application.
score: 0
has comment: http://stackoverflow.com/comment/38336309
accepted answer of: http://stackoverflow.com/q/24710156
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24710156
has comment: http://stackoverflow.com/comment/38330597

http://stackoverflow.com/comment/38391016
type: Comment
comment on: http://stackoverflow.com/q/24745664
has text: Of course you can add content to a page without writing HTML. Use dom manipulation methods: `document.body.appendChild(document.createElement("div"));` No HTML, but new div element created in the current document.
score: 1
type: QuestionComment

http://stackoverflow.com/q/24642157
downvote count: 1
has answer: http://stackoverflow.com/a/28696563
has answer: http://stackoverflow.com/a/24708194
tagged with: javascript
score: 6
possible better answer: http://stackoverflow.com/a/28696563
type: AnsweredQuestion
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/24708194
tagged with: http://stackoverflow.com/tag/html
has title: Workaround for iframe/mousewheel bug in Safari 6.1/7.0
tagged with: safari
has body: I've found a bug affecting Safari 6.1 and 7.0 (it is fine in Safari 5.1 and 6.0). I've reported it to Apple. The test case is here: http://tremby.net/dump/iframe-safari/ The code is very simple. The parent page just has an iframe, and the iframe has a listener for the mousewheel event which fires an alert. The iframe's contents are smaller than the iframe itself (more on that later). If you refresh this page by clicking in the location bar and pressing enter, the mousewheel events in the iframe will not fire (you see no alerts). But if you refresh with the refresh button they will. What I need is a workaround to this. One we have already found is to make the iframe's contents overflow the iframe's bounds. Mousewheel events now fire, but it's not acceptable to have a scrollbar and the contents moving. (Never mind why the choice of using an iframe at all -- that's not up to me.) Any ideas?
answer count: 2
upvote count: 7

http://stackoverflow.com/q/24738141
type: Question
has comment: http://stackoverflow.com/comment/38376410
tagged with: javascript
has title: Initialize Class without a variable
score: 0
has answer: http://stackoverflow.com/a/24738229
has answer: http://stackoverflow.com/a/24738222
has comment: http://stackoverflow.com/comment/138317421
has comment: http://stackoverflow.com/comment/38376464
has body: Lets say i have a class with a few methods inside. Usually i initialize it like this: var myClassObj = new MyClass("Hello World"); myClassObj.SomeMethod(); I'm a little confused because I've seen examples where people just do this: new MyClass("Hello World").SomeMethod(); Without using a variable, Now can someone help me understand why they do that? and what is the difference?
has answer: http://stackoverflow.com/a/24738280
possible better answer: http://stackoverflow.com/a/24738229
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24738219
accepted answer: http://stackoverflow.com/a/24738222

http://stackoverflow.com/comment/38179861
score: 1
has text: As the other question, clicking twice on an item no longer toggles
type: AnswerComment
comment on: http://stackoverflow.com/a/24634040
type: Comment

http://stackoverflow.com/a/24671223
upvote count: 3
has comment: http://stackoverflow.com/comment/38249416
has comment: http://stackoverflow.com/comment/38249696
has body: This syntax does not create a property when in a function: compute: ko.computed(function() { return _compute(1); // fail }); You have to use = instead of :. Try this var vm = function() { var self = this; var _compute = function(e) { return e; } this.compute = ko.computed(function() { return _compute(1); }); } Also note that this is not how you should use a computed observable. It should contain calls to other observables! From doc: What if you’ve got an observable for firstName, and another for lastName, and you want to display the full name? That’s where computed observables come in - these are functions that are dependent on one or more other observables, and will automatically update whenever any of these dependencies change.
score: 3
has comment: http://stackoverflow.com/comment/38249017
has comment: http://stackoverflow.com/comment/38249738
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24671152
answers question: http://stackoverflow.com/q/24671152
type: Answer
has comment: http://stackoverflow.com/comment/38249202
has comment: http://stackoverflow.com/comment/38249218
has comment: http://stackoverflow.com/comment/38249845

http://stackoverflow.com/comment/38414940
score: 0
comment on: http://stackoverflow.com/a/24714734
type: Comment
type: AnswerComment
has text: Awesome Mick that worked great! So I was missing Angular routing, and listening on a port.

http://stackoverflow.com/comment/38252504
has text: u tried anything yet ???
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24673178

http://stackoverflow.com/comment/38305704
comment on: http://stackoverflow.com/q/24701412
score: 0
type: Comment
type: QuestionComment
has text: Could be done with a pseudo element and data-atrribute in CSS

inline
tags question: http://stackoverflow.com/q/24722086
tag name: inline
tags question: http://stackoverflow.com/q/24697006
type: Tag
tags question: http://stackoverflow.com/q/24703584

http://stackoverflow.com/comment/125674790
score: 0
type: AnswerComment
has text: can we decide about the order in `name()`, in case we want to receive same result with any order?
type: Comment
comment on: http://stackoverflow.com/a/24719203

http://stackoverflow.com/comment/38246025
has text: Can you try to create a minimalistic example with which you reproduce the issue on Chrome in jsfiddle.net or jsbin.com? I tried to create one but it seems to work fine, even with .after(). There must be additional CSS style settings that we cannot know about without the relevant code
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24641112
type: Comment

http://stackoverflow.com/comment/38255951
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24674717
has text: Can you give a JSFiddle link please?
score: 0

http://stackoverflow.com/q/24614800
has comment: http://stackoverflow.com/comment/38143595
tagged with: push
has comment: http://stackoverflow.com/comment/38143222
has title: different results from Array.join()
possible better answer: http://stackoverflow.com/a/24614959
has comment: http://stackoverflow.com/comment/38143341
has answer: http://stackoverflow.com/a/24614959
has comment: http://stackoverflow.com/comment/38143821
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38143699
tagged with: join
type: Question
has answer: http://stackoverflow.com/a/24615229
accepted answer: http://stackoverflow.com/a/24615229
tagged with: javascript
has comment: http://stackoverflow.com/comment/38143270
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38143359
has body: Look at the following code: var words = []; var temp_words =[]; var div = document.getElementById('div'); document.onkeypress = function(evt) { evt = evt.keyCode; var event = String.fromCharCode(evt); // alert(event); temp_words.push(event); var w = temp_words.join(""); words.push(w); } HTML Now in google console I see the results. If I type in the textarea sanmevg saini then the words array returns: ["s", "sa", "san", "sanm", "sanme", "sanmev", "sanmevg", "sanmevg ", "sanmevg s", "sanmevg sa", "sanmevg sai", "sanmevg sain", "sanmevg saini"] not ["sanmevg saini"] and if I write [''a,'b','c', ' ','d' ].join('') then it returns the expected results i.e. ['abc d']. So what's the problem in my code?

http://stackoverflow.com/q/24707713
score: 0
has title: Jquery, hide divs in div blocks
tagged with: css
has answer: http://stackoverflow.com/a/24708017
accepted answer: http://stackoverflow.com/a/24708017
has comment: http://stackoverflow.com/comment/38318161
possible better answer: http://stackoverflow.com/a/24707764
has comment: http://stackoverflow.com/comment/38318254
has comment: http://stackoverflow.com/comment/38318668
type: Question
has body: I want to hide the divs except the first one in each of the div blocks with a unique class name. I am doing this because I have multiple carousels and I am shifting each one except the first one off the screen except the first div. This works great for a single carousel but when I introduce multiple ones, it hides all the divs except the first one. original code for single carousel was: $("div.hero-featureSwap:not(:first)").css({ "left" : "2000px" }); but now I want to show the first "hero-featureSwap" of each carousel. Is there a hack around this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24707764
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38330253
comment on: http://stackoverflow.com/q/24714048
type: Comment
type: QuestionComment
has text: Yes, clearly it's "impsoibble", just because you haven't gotten an answer in the first 5 minutes. You're asking strangers for help. Rather than throw your hands up and cry "It's impossible", wait a while. Better yet, fix your code: Provide us with the **smallest** complete example that can reproduce your problem, rather than your entire program. Make it easy for us to help and you'll get better help, faster.
score: 1

forms
tags question: http://stackoverflow.com/q/24637846
tags question: http://stackoverflow.com/q/24704842
tags question: http://stackoverflow.com/q/24669913
tags question: http://stackoverflow.com/q/24597057
tags question: http://stackoverflow.com/q/24674772
tags question: http://stackoverflow.com/q/24606333
tags question: http://stackoverflow.com/q/24713994
tags question: http://stackoverflow.com/q/24683564
tags question: http://stackoverflow.com/q/24588242
tags question: http://stackoverflow.com/q/24741365
type: Tag
tags question: http://stackoverflow.com/q/24633299
tags question: http://stackoverflow.com/q/24689366
tags question: http://stackoverflow.com/q/24650295
tags question: http://stackoverflow.com/q/24729467
tags question: http://stackoverflow.com/q/24673989
tags question: http://stackoverflow.com/q/24667114
tags question: http://stackoverflow.com/q/24687208
tags question: http://stackoverflow.com/q/24711203
tags question: http://stackoverflow.com/q/24740927
tags question: http://stackoverflow.com/q/24744698
tags question: http://stackoverflow.com/q/24598569
tags question: http://stackoverflow.com/q/24646923
tags question: http://stackoverflow.com/q/24593234
tags question: http://stackoverflow.com/q/24678871
tags question: http://stackoverflow.com/q/24651313
tags question: http://stackoverflow.com/q/24736820
tags question: http://stackoverflow.com/q/24659923
tags question: http://stackoverflow.com/q/24685208
tags question: http://stackoverflow.com/q/24638492
tags question: http://stackoverflow.com/q/24611120
tags question: http://stackoverflow.com/q/24592149
tags question: http://stackoverflow.com/q/24633823
tags question: http://stackoverflow.com/q/24668759
tags question: http://stackoverflow.com/q/24597710
tags question: http://stackoverflow.com/q/24685664
tags question: http://stackoverflow.com/q/24662792
tags question: http://stackoverflow.com/q/24609370
tags question: http://stackoverflow.com/q/24709180
tags question: http://stackoverflow.com/q/24610920
tags question: http://stackoverflow.com/q/24653064
tags question: http://stackoverflow.com/q/24594791
tags question: http://stackoverflow.com/q/24595809
tags question: http://stackoverflow.com/q/24641959
tags question: http://stackoverflow.com/q/24723730
tags question: http://stackoverflow.com/q/24635355
tags question: http://stackoverflow.com/q/24746719
tags question: http://stackoverflow.com/q/24724322
tags question: http://stackoverflow.com/q/24703386
tags question: http://stackoverflow.com/q/24712360
tags question: http://stackoverflow.com/q/24728499
tags question: http://stackoverflow.com/q/24597802
tags question: http://stackoverflow.com/q/24662620
tags question: http://stackoverflow.com/q/24591664
tags question: http://stackoverflow.com/q/24597246
tags question: http://stackoverflow.com/q/24747374
tags question: http://stackoverflow.com/q/24618038
tags question: http://stackoverflow.com/q/24717741
tags question: http://stackoverflow.com/q/24682455
tags question: http://stackoverflow.com/q/24656381
tags question: http://stackoverflow.com/q/24727796
tags question: http://stackoverflow.com/q/24599990
tags question: http://stackoverflow.com/q/24606584
tags question: http://stackoverflow.com/q/24645183
tags question: http://stackoverflow.com/q/24606470
tags question: http://stackoverflow.com/q/24746707
tags question: http://stackoverflow.com/q/24608998
tags question: http://stackoverflow.com/q/24640331
tags question: http://stackoverflow.com/q/24598879
tags question: http://stackoverflow.com/q/24747805
tags question: http://stackoverflow.com/q/24732423
tags question: http://stackoverflow.com/q/24593205
tags question: http://stackoverflow.com/q/24664393
tags question: http://stackoverflow.com/q/24614315
tags question: http://stackoverflow.com/q/24693089
tags question: http://stackoverflow.com/q/24694353
tags question: http://stackoverflow.com/q/24698534
tag name: forms
tags question: http://stackoverflow.com/q/24646891
tags question: http://stackoverflow.com/q/24721771

http://stackoverflow.com/a/24696119
score: 0
accepted answer of: http://stackoverflow.com/q/24695922
has body: You need to remove the line: pointer-events: none; from CSS section that is defined for node--leaf. This line prevents onclick events from executing, even if you have correct JavaScript code.
answers question: http://stackoverflow.com/q/24695922
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/38296864
has comment: http://stackoverflow.com/comment/38298352
has comment: http://stackoverflow.com/comment/38298253

http://stackoverflow.com/a/24610168
upvote count: 1
has comment: http://stackoverflow.com/comment/38137151
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38136957
downvote count: 0
answers question: http://stackoverflow.com/q/24610051
accepted answer of: http://stackoverflow.com/q/24610051
has body: It would loop through desiredOrder and for each value it would do a lookup of that value in the productsSelected hash. It would then push a hash with key desiredOrder[i] and value result of lookup in productsSelected to the array, right? Yes, that's just how to do it. With underscore: function convertHashToArray(hashTable, desiredOrderArray){ return _.map(desiredOrderArray, function(key) { return _.object([[key, hashTable[key]]]); }); }
type: Answer

http://stackoverflow.com/comment/38256019
type: Comment
comment on: http://stackoverflow.com/a/24674453
has text: Sure.. I saw your profile.. do u really think PHP is better than Ruby..??
type: AnswerComment
score: 0

http://stackoverflow.com/q/24592867
accepted answer: http://stackoverflow.com/a/24593410
has comment: http://stackoverflow.com/comment/38167631
type: Question
tagged with: canvas
tagged with: javascript
has title: HTML5 Canvas: Thousand of moving Images = Huge FPS loss
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/38101405
has answer: http://stackoverflow.com/a/24593410
has comment: http://stackoverflow.com/comment/38103246
has comment: http://stackoverflow.com/comment/38110075
has comment: http://stackoverflow.com/comment/38236004
has body: I'm trying to build an HTML5 Game with Canvas 2D (Only for Computer as device). But there's a Problem, I have thousands of moving images and with around 4000+ Images (Enemys) I dont get more then 10 FPS. With Java2D it's working fine, now I'm trying to import the Game to HTML5. Did anyone have some tips to realize this in HTML5? Some Code optimization? For any help I would be very grateful. http://jsfiddle.net/LtlFdl/tzd8z/ ctx.clearRect(0, 0, 320, 320); // &lt;- Maybe just Clear the Enemy Square Position? btw.: on the Fiddle is just ONE playerfield, at the end there 4 playerfields (rotated 90, 180 and 270 degress), a background image, towers and a lot of effects. So I have to multiple everything with 4.
has comment: http://stackoverflow.com/comment/38106270
type: AnsweredQuestion
tagged with: 2d

http://stackoverflow.com/comment/38372760
type: Comment
has text: I guess it's complicated because I reported the bug 3 months ago to the company, and they didn't manage to fix it yet..
comment on: http://stackoverflow.com/a/24735349
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38447933
has text: Anyway, if my answer was helpfull to your problem even though you ended up doing it another way, please accept it. Thanks!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24741331
type: Comment

http://stackoverflow.com/comment/38106504
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24595750
type: Comment
has text: Why are you creating classes with variable name..? classes are meant to be common (*to be applied for multiple elements*)... If you're trying to distinguish a particular element, i suggest using an id instead...

http://stackoverflow.com/comment/38218605
comment on: http://stackoverflow.com/q/24652519
type: QuestionComment
score: 0
has text: @DiptiSheth: I couldn't reproduce the error using the data which you posted. Try [the demo](http://www.ok-soft-gmbh.com/jqGrid/DiptiSheth.htm).
type: Comment

http://stackoverflow.com/q/24647041
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38204617
has comment: http://stackoverflow.com/comment/38286620
has title: Scroll content of second div to end of first div
tagged with: javascript
has answer: http://stackoverflow.com/a/24647476
type: Question
score: 0
answer count: 2
has body: I have a fixed div on top of my page (it gets fixed only when we scroll upto it) containing base information and a dropdown for selection and another div below it containing the content. Now when a user selects a content name from this drop down, that section should expand and page should scroll upto a level that the heading of this expanded section should start appearing exactly where the fixed div ends. I am able to scroll this section to top of page using function ScrollToElement(element) { $('html,body').animate({ scrollTop: $("#" + element).position().top }, 'slow'); } but I want to scroll it to end of first div not top of the page. I have tried adding/subtracting the height/outerheight of the fixed div but that does not works. Please help me in achieving this. I have created a fiddle for it : http://jsfiddle.net/eranjali08/b7W95/
tagged with: jquery
has comment: http://stackoverflow.com/comment/38286607
has answer: http://stackoverflow.com/a/24647163
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/43882695
type: Comment
has text: I've also noted that setting ```privateVar``` directly like ```ChildService.privateVar = 5``` also works fine, as long as you also access like like ```ChildService.privateVar```. That is, your code works fine if not using getter and setter.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26069264

http://stackoverflow.com/comment/38146887
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24616250
has text: @FelixKling How does google autofill for forms work? That is what I am trying to accomplish.

http://stackoverflow.com/q/24646284
has answer: http://stackoverflow.com/a/24646471
has comment: http://stackoverflow.com/comment/38203153
type: Question
has title: AngularJS: Two-Way Data Binding with Number Inputs
tagged with: javascript
has body: I'm trying to use angular for data-binding input type="number" elements, but I can't seem to figure out how to get the binding working. For example, when I update any of the values, I expect the value binded to it to also update. JSBin: http://jsbin.com/kiqivule/3/edit Any help would be appreciated.
has answer: http://stackoverflow.com/a/24647382
answer count: 5
has answer: http://stackoverflow.com/a/24646404
has answer: http://stackoverflow.com/a/24646364
has comment: http://stackoverflow.com/comment/38203580
has comment: http://stackoverflow.com/comment/38229123
has comment: http://stackoverflow.com/comment/38239171
tagged with: angularjs
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24647154
has comment: http://stackoverflow.com/comment/38203235

http://stackoverflow.com/q/24695093
has body: I have a nodejs + express project. I want to mount controller and view, but I dont know how. In my app.js I have var stats = require('./controllers/stats'); and app.use(stats); My folder controllers: stats/index.js and my views: stats/index.jade. when I try to access localhost:1200/stats --> Cannot GET /stats Are routes needed? I use express"3.2.6" My app.js /** * Module dependencies. */ var express = require('express') , routes = require('./routes') , user = require('./routes/user') , http = require('http') , path = require('path'); var app = express(); //modulos **var stats = require('./controllers/stats');** // all environments app.set('port', process.env.PORT || 3000); app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use(express.favicon()); app.use(express.logger('dev')); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'))); // development only if ('development' == app.get('env')) { app.use(express.errorHandler()); } app.get('/', routes.index); app.get('/users', user.list); //rutas **app.use(stats);** var server = app.listen(1200); console.log('Express server listening on port 1200'); In my controller var express = require('express'); var app = module.exports = express(); app.set('views', __dirname + '/views'); app.get('/views/stats', function(request, response) { response.render('index', { title: 'Estamos en el controlador stats' }); }); In my view extends layout block content h1= title p Welcome to #{title} p esta es la vista del controlador Stats
has comment: http://stackoverflow.com/comment/38294691
has comment: http://stackoverflow.com/comment/38294475
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26967718
upvote count: 1
tagged with: node.js
score: 1
has title: How can I mount MVC nodejs + express
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/24696730
tagged with: javascript
tagged with: express

http://stackoverflow.com/comment/38259079
score: 0
type: AnswerComment
type: Comment
has text: Oversight on my part; it's done now, with gratitude I might add. I'll try and look into the *label* mystery as well, but would still love to hear from you if you find anything out. Thanks a whole lot!
comment on: http://stackoverflow.com/a/24659921

http://stackoverflow.com/a/24674548
has comment: http://stackoverflow.com/comment/38295098
has comment: http://stackoverflow.com/comment/38295707
score: 0
has comment: http://stackoverflow.com/comment/38255988
accepted answer of: http://stackoverflow.com/q/24674433
has comment: http://stackoverflow.com/comment/38295234
has body: Create new class activeClick for click event as active class will remove on hover out event:- $(function(){ $('.menubutton').click(function(){ $('.menubutton').removeClass('activeClick'); $(this).addClass('activeClick'); }); }); Demo
answers question: http://stackoverflow.com/q/24674433
has comment: http://stackoverflow.com/comment/38302413
has comment: http://stackoverflow.com/comment/38294731
has comment: http://stackoverflow.com/comment/38294437
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38294223
has comment: http://stackoverflow.com/comment/38294612
has comment: http://stackoverflow.com/comment/38294884
type: Answer
has comment: http://stackoverflow.com/comment/38295462

http://stackoverflow.com/a/24649788
answers question: http://stackoverflow.com/q/24649628
has body: Suppose you have following button &lt;input type="button" class="expand" onclick="MyAction(this)" /&gt; Your css class will be .expand { background-image: (Path for Expand icon) } .collaps { background-image: (Path for collaps icon) } and you will have javascript like following &lt;script type="text/javascript"&gt; function MyAction(element) { if(element.className =="expand") { // logic for collaps behavior element.className = "collaps"; } else { // logic for expand behavior element.className = "expand"; } } &lt;/script&gt; You will need some more CSS tricks to fix and align the icon but i hope you can do that easily :)
has comment: http://stackoverflow.com/comment/38217512
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/38211843
has comment: http://stackoverflow.com/comment/38217747
has comment: http://stackoverflow.com/comment/38211725
has comment: http://stackoverflow.com/comment/38213904

http://stackoverflow.com/a/24707894
has comment: http://stackoverflow.com/comment/38318788
score: 1
accepted answer of: http://stackoverflow.com/q/24707812
answers question: http://stackoverflow.com/q/24707812
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Try $(document).ready(myFunction1); myFunction1 () { // on load functions go here $(window).on("load resize", myFunction1); $(window).on("load resize scroll", myFunction2); } function myFunction2(){ // on load and on resize functions go here }; function myFunction3(){ // on load, resize and scroll functions go here };
upvote count: 1

http://stackoverflow.com/comment/38369798
comment on: http://stackoverflow.com/a/24729536
has text: I hoped that that is not the truth :(
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/37115111
has comment: http://stackoverflow.com/comment/136115978
has comment: http://stackoverflow.com/comment/85435095
has body: Just in case anyone else has this problem, finds this page and is as stupid as I am: I had the same symptoms, but then suddenly realised that I was drawing the tooltip on top of the svg element that I was trying to add the tooltip to. Net result: as soon as the tooltip was made visible, the mouseleave event fired; which is of course entirely reasonable since the mouse had just left the underlying svg element, because it was now on top of the tooltip. Solution: make sure that the tooltip is positioned so that it cannot possibly overlap where the mouse is.
has comment: http://stackoverflow.com/comment/61772713
has comment: http://stackoverflow.com/comment/112443435
type: Answer
answers question: http://stackoverflow.com/q/24636602
score: 39
upvote count: 40
has comment: http://stackoverflow.com/comment/116684283
downvote count: 1

http://stackoverflow.com/q/24710478
has body: How i could make this page auto refresh/update every 10 second when there is/isnt data update. Like Twitter when there is a new tweet. Example : This is in first second. You have 1 name with no status Then after 10 second, there is an event that "name" data have been added. You have 2 names with no status what should i do? I've tried with javascript, but it wont refresh the data from controller. this is my actioncheckNames Controller public function actioncheckNames() { //Check Name with No Status $noStat = new CDbCriteria(); $noStat->condition = "status IS NULL"; $noStat->order = "name ASC"; $sums = Name::model()->count($noStat); //End of Check Function return array('sum'=>$sums); } And this is sort of my index on view. <?php if ($sum != 0) { ?> X You Have <?php echo $sum ?> Names With No Status. Check <?php } ?> *Update : create actionCheckNames Controller and add ajax script. but my web wont refresh the data.
upvote count: 1
has answer: http://stackoverflow.com/a/24711293
type: Question
has comment: http://stackoverflow.com/comment/38360357
has comment: http://stackoverflow.com/comment/38335220
tagged with: yii
tagged with: javascript
has title: Auto refresh controller and view Yii
has comment: http://stackoverflow.com/comment/38324080
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38324066
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/a/24610841
answers question: http://stackoverflow.com/q/24610570
upvote count: 1
downvote count: 0
has body: try this $("#WebPartWPQ2").find(".ms-alternatingstrong").parent().not(":contains("+user+")").hide();
type: Answer
score: 1

http://stackoverflow.com/comment/38369271
comment on: http://stackoverflow.com/q/24734278
score: 1
type: Comment
has text: @Max IP addresses are an implementation detail of the data transport mechanism, they were never really suitable for identification. IPv4 has long since stopped being a unique identifier for anything, and IPv6 explicitly includes provisions to *prevent* long-term identification through IPv6 addresses.
type: QuestionComment

http://stackoverflow.com/q/24664393
tagged with: angularjs
type: Question
score: 0
answer count: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/38237332
has comment: http://stackoverflow.com/comment/38237312
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24665999
has title: GET requests with submit forms using angularjs
has comment: http://stackoverflow.com/comment/38237182
has body: So after learning a bit of AngularJS I was able to get a controller to call an API and store the results in a variable, which is then displayed on my page (whew...). If I go to: http://127.0.0.1:3000/#/search I see the page with the submit form but without the results, and if I go to: http://127.0.0.1:3000/#/search?query=deep&learning I see the page with the submit form + the results for the "deep & learning" query. The problem is: I have to enter "?query=deep?learning" manually, I'm unable to use the submit form to get there. I use this code: With this submit form, if I enter "deep & learning" in the form, I get to http://127.0.0.1:3000/?query=deep&learning#/search How do I change my code so entering "deep & learning" would get me to: http://127.0.0.1:3000/#/search?query=deep&learning ? Thank you UPDATE1: code for routes: var myApp = angular.module('myApp', ['ngRoute']) .factory('myQuery', ['$http', function($http) { var doRequest = function(query) { return $http({ method: 'GET', url: 'http://127.0.0.1:3000/api/v0/docs?search=' + query }); }; return { results: function(query) { return doRequest(query); } }; }]); myApp.config(function($routeProvider) { $routeProvider .when('/', { templateUrl : 'pages/home.html', controller : 'mainController' }) .when('/search', { templateUrl : 'pages/search.html', controller : 'searchController' }); }); myApp.controller('mainController', function($scope) { // ... }); myApp.controller('searchController', ['$scope', '$routeParams', 'myQuery', function($scope, $routeParams, myQuery) { myQuery.results($routeParams.query) .success(function(data, status, headers) { $scope.count = data.count; $scope.results = data.results; }); }]);

http://stackoverflow.com/comment/38353260
comment on: http://stackoverflow.com/a/24725795
has text: Well, apparently I was confused and used require('require') instead of require('http') it works now. Thank you for your help.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38364779
comment on: http://stackoverflow.com/q/24731741
has text: Good question but still a bit unclear, you want to check it when change or submit....
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38092367
has text: Ah brilliant, I've never known that. Has solved my problem, will mark as correct answer once the timer is up!
type: AnswerComment
comment on: http://stackoverflow.com/a/24588589
score: 0
type: Comment

http://stackoverflow.com/comment/38234193
has text: Yeah, I am anyways trying to avoid preventDefault(). Let me check and revert with update. Thanks.
comment on: http://stackoverflow.com/q/24662620
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/67340181
type: AnswerComment
has text: should work, but i hoped to find an answer which is more satisfying
type: Comment
score: 1
comment on: http://stackoverflow.com/a/31742647

http://stackoverflow.com/comment/38269409
type: Comment
comment on: http://stackoverflow.com/a/24681976
type: AnswerComment
has text: @Niet the Dark Absol : thanks mate.it didn't cross my mind ;).it.working fine now
score: 0

http://stackoverflow.com/q/24652259
has answer: http://stackoverflow.com/a/24652314
accepted answer: http://stackoverflow.com/a/24652314
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/24652445
has answer: http://stackoverflow.com/a/24652445
has body: How could I implement this code : $("ID5").click(function{ $("#Id1,#Id2" + this).hide(); });
score: 0
has comment: http://stackoverflow.com/comment/38214054
upvote count: 1
downvote count: 1
type: Question
has title: How to add this to $ with other ids ? query
type: AnsweredQuestion

http://stackoverflow.com/comment/38198339
type: Comment
score: 0
type: AnswerComment
has text: Okay, I have a slider in HomeView which is initialized by a method runSlider(). When the HomeView is loaded, I need this method runSlider() to be called. I call it in render but render is not called at the first load (silent:true). But if I also call it in initialize, it will be called on all the views (my router loads all the views in its initialize).
comment on: http://stackoverflow.com/a/24618617

http://stackoverflow.com/comment/38146074
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24616179
has text: What kind of "expensive operation" are we talking about? 5 seconds of processor time on an ordinary modern computer is a LOT of processing.
type: Comment

http://stackoverflow.com/q/24662613
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24662802
score: 0
has title: Parse Cloud query error
has answer: http://stackoverflow.com/a/24662802
tagged with: parse-platform
has body: I am trying to build a simple background job on the Parse Cloud. Right now, I'm just testing, but I am having a problem when performing a query. If I comment out: //query.ascending("createdAt"); the console log shows all the messages and no errors. If I don't comment it out, I get an error. Can anybody explain why this is happening? Is it an authentication error? Parse.Cloud.job("cleanPosts", function(request, status) { var Post = Parse.Object.extend("Post"); var query = new Parse.Query(Post); query.ascending("createdAt"); query.each(function(post) { console.log( "objectId:" + post.get("message") ); }).then(function() { status.success("Success"); }, function(error) { status.error(); }); });
type: AnsweredQuestion
type: Question
tagged with: cloud
answer count: 1

http://stackoverflow.com/comment/38255428
type: QuestionComment
comment on: http://stackoverflow.com/q/24625697
score: 0
has text: In Handbrake, don't mess with the settings. Launch it, accept all of the defaults, but check "Web optimized." The resulting file will almost always be encoded correctly for all platforms. Do NOT overthink this.
type: Comment

http://stackoverflow.com/comment/38352729
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24725447
has text: By the way, your HTML is a little malformed. Your ` ` cell is not enclosed in a ` `, and your ` ` declaration is also in a strange place.
score: 0

http://stackoverflow.com/q/24593247
score: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38103086
has title: How to do nested models in Backbone
linked to: http://stackoverflow.com/q/6535948
type: Question
has comment: http://stackoverflow.com/comment/38101892
tagged with: javascript
tagged with: backbone.js
has body: Possibly related: Nested Models in Backbone.js, how to approach Code snippet: define([ 'jquery', 'backbone', ], function($, Backbone){ var GenreModel = Backbone.Model.extend({ defaults: { currentGenre: null, availableGenres: [] }, initialize: function() {} }); var MusicModel = Backbone.Model.extend({ defaults: { genre: new GenreModel() }, initialize: function() {} }); // Return the model for the module return MusicModel; }); Is the above practice acceptable? I only have one level of nested models MusicModel.get('genre'). The reason I am doing this is that while I want to listen to the changes in the genre model, I don't want to create another view for genre because it's too small. I'd appreciate any suggestions!

http://stackoverflow.com/comment/38261227
type: Comment
has text: possible duplicate of [How to declare a global variable in a .js file](http://stackoverflow.com/questions/944273/how-to-declare-a-global-variable-in-a-js-file)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24677570

http://stackoverflow.com/a/24657669
has comment: http://stackoverflow.com/comment/38288154
score: 0
has body: It should be: var cuboidTexture = new THREE.Texture( test ); cuboidTexture.needsUpdate = true; var material = new THREE.MeshBasicMaterial( { map: cuboidTexture } );
type: Answer
has comment: http://stackoverflow.com/comment/38229242
answers question: http://stackoverflow.com/q/24633835
has comment: http://stackoverflow.com/comment/38229909

http://stackoverflow.com/q/24636171
has body: I'm using Angular UI-Router with a resolve function, but when I minify the resolve function, my whole application breaks because the resolve function syntax is not correct for minification. It needs to be String-Injection based as outlined here. I'm just not sure how to write it. Any suggestions? // Resolves var checkAuthentication = function($q, $location, $rootScope, Users) { if ($rootScope.user) return true; if (!$rootScope.user) { var deferred = $q.defer(); Users.get(null, function(user) { if (!user) { window.location = '/'; return false; } console.log('User fetched: ', user); $rootScope.user = user; deferred.resolve(); }, function() { window.location = '/'; return false; }); return deferred.promise; } }; // Routes angular.module('Dashboard').config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { // For any unmatched url, redirect to '/' $urlRouterProvider.otherwise('/dashboard'); // Now set up the states $stateProvider .state('dashboard', { url: '/dashboard', templateUrl: 'views/content/dashboard.html', resolve: { checkAuthentication: checkAuthentication } })
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38183981
has title: Angular UI-Router Minification Error - How Can I Change Resolve Syntax To Be String Injection Based?
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38184041
has comment: http://stackoverflow.com/comment/38183905
upvote count: 13
has answer: http://stackoverflow.com/a/24636444
accepted answer: http://stackoverflow.com/a/24636444
score: 13
type: AnsweredQuestion
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/38184177
has comment: http://stackoverflow.com/comment/38184017
linked to: http://stackoverflow.com/q/22866183
has comment: http://stackoverflow.com/comment/38183948
type: Question

http://stackoverflow.com/comment/38376312
type: Comment
has text: sorry. but what about validation?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24738097

tilt
tag name: tilt
tags question: http://stackoverflow.com/q/24625633
type: Tag

http://stackoverflow.com/q/24673622
possible better answer: http://stackoverflow.com/a/25456919
tagged with: charts
upvote count: 9
has answer: http://stackoverflow.com/a/25456919
tagged with: javascript
has answer: http://stackoverflow.com/a/28475749
has title: Chart.js - Multiple Line Charts - Only Show Last Chart
downvote count: 0
has answer: http://stackoverflow.com/a/24675646
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/36932771
type: AnsweredQuestion
has body: I am using chart.js to show multiple line charts on one page. However, only the last chart shows even though I have called them #canvas1 and #canvas2. Something must be conflicting somewhere and I've tried most things but not having any joy. Here are two charts, it only shows the last one: Graph One &lt;script type="text/javascript"&gt; var lineChartData = { labels : ["January","February","March","April","May","June","July","August","September","October","November","December"], datasets : [ { label: "Target", fillColor : "rgba(220,220,220,0.2)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", pointHighlightFill : "#fff", pointHighlightStroke : "rgba(220,220,220,1)", data : [160000,175000,185000,180000,185000,185000,185000,195000,200000,0,0] }, { label: "Sales", fillColor : "rgba(151,187,205,0.2)", strokeColor : "rgba(151,187,205,1)", pointColor : "rgba(151,187,205,1)", pointStrokeColor : "#fff", pointHighlightFill : "#fff", pointHighlightStroke : "rgba(151,187,205,1)", data : [&lt;?php echo $stockJanuary ?&gt;,&lt;?php echo $stockFebruary ?&gt;,&lt;?php echo $stockMarch ?&gt;,&lt;?php echo $stockApril ?&gt;,&lt;?php echo $stockMay ?&gt;,&lt;?php echo $stockJune ?&gt;,&lt;?php echo $stockJuly ?&gt;,&lt;?php echo $stockAugust ?&gt;,&lt;?php echo $stockSeptember ?&gt;,&lt;?php echo $stockOctober ?&gt;,&lt;?php echo $stockNovember ?&gt;,&lt;?php echo $stockDecember ?&gt;] } ] } window.onload = function(){ var ctx = document.getElementById("canvas1").getContext("2d"); window.myLine = new Chart(ctx).Line(lineChartData, { responsive: true }); } &lt;/script&gt; Graph Two: &lt;script type="text/javascript"&gt; var lineChartData = { labels : ["January","February","March","April","May","June","July","August","September","October","November","December"], datasets : [ { label: "Target", fillColor : "rgba(220,220,220,0.2)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", pointH…
accepted answer: http://stackoverflow.com/a/24675646
has answer: http://stackoverflow.com/a/38002082
score: 9
type: Question

http://stackoverflow.com/q/24599229
upvote count: 2
has answer: http://stackoverflow.com/a/24600236
has body: I'm using the latest version of Snap.svg to draw and animate a path within a SVG: var s = Snap('#svg'); var getPath = s.path('M15 15L115 115'); var pathLength = getPath.getTotalLength(); getPath.attr({ stroke: '#000', strokeWidth: 5, strokeDasharray: pathLength + ' ' + pathLength, strokeDashoffset: pathLength, strokeLinecap: 'round' }).animate({ strokeDashoffset: 0 }, 1500); While this is working fine (as you can see here), I want to make it a dotted line, animated one dot after another. I've built a quick prototype with circles (which you can see here), to illustrate the look and feel, but technically I want it to base on a custom path. Basically I'm looking for a way to animate a dotted (complex) path; so a path with attributes would be as fine as circles on a path.
type: Question
has title: Animate dotted path, one dot after another
accepted answer: http://stackoverflow.com/a/24600236
answer count: 2
possible better answer: http://stackoverflow.com/a/24599398
downvote count: 0
has answer: http://stackoverflow.com/a/24599398
tagged with: javascript
favorite count: 0
tagged with: animation
type: AnsweredQuestion
score: 2
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/a/24677049
answers question: http://stackoverflow.com/q/24676625
type: Answer
upvote count: 2
score: 1
downvote count: 1
has body: Not sure what you are getting, but it seems that your data is returned as an object d. var dataArray = data.d; for (var i = 0; i &lt; dataArray.length; i++){ var name = dataArray[i].name; var arrivalTime = dataArray[i].arrivalTime; }; BTW, to me, your string array looks like a string, you might want to parse it. var dataArray = JSON.parse(data.d); for (var i = 0; i &lt; dataArray.length; i++){ var name = dataArray[i].name; var arrivalTime = dataArray[i].arrivalTime; };
has comment: http://stackoverflow.com/comment/38260275
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24676625
has comment: http://stackoverflow.com/comment/38261779

http://stackoverflow.com/comment/38152712
type: QuestionComment
has text: @Mathletics - someone else downvoted me, and apparently took back their downvote after my comment, so it seems like it was effective (though it appears you have added a downvote of your own). No problem with the vote to close from me, though juvian's answer seems pretty helpful right now, and I still have some questions about it, so leaving it up for now.
comment on: http://stackoverflow.com/q/24618479
score: 0
type: Comment

http://stackoverflow.com/a/24675847
type: Answer
score: 2
has body: Instead of using jQuery's ajax method's you should use angular's http service. https://docs.angularjs.org/api/ng/service/$http Once the request has successfully completed and the data has been set then call $scope.tableParams.reload(); Working Plunker: http://plnkr.co/edit/GFEPEUzhHR8fKTTSxxyy?p=preview var app = angular.module('plunker', ['ngTable']); app.controller('MainCtrl', function($scope, $filter, $http, ngTableParams) { $scope.datasets = ["1", "2"]; $scope.dataset = "1"; var file,jsonData; $scope.$watch("dataset", function () { if($scope.dataset=="1"){ file = 'json1.json'; } else if($scope.dataset=="2"){ file = 'json2.json'; } $http.get(file).success(function(response){ jsonData = response; $scope.tableParams.reload(); }); }); $scope.tableParams = new ngTableParams({ page: 1, // show first page count: 10, // count per page sorting: { name: 'asc' // initial sorting } }, { total: function () { return jsonData.length; }, // length of data getData: function ($defer, params) { var filteredData = jsonData; var orderedData = params.sorting() ? $filter('orderBy')(filteredData, params.orderBy()) : filteredData; if(orderedData){ $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count())); } }, $scope: { $data: {} } }); });
answers question: http://stackoverflow.com/q/24673918
downvote count: 0
upvote count: 2

https
tags question: http://stackoverflow.com/q/24613630
tags question: http://stackoverflow.com/q/24727159
tags question: http://stackoverflow.com/q/24742037
type: Tag
tag name: https
tags question: http://stackoverflow.com/q/24695079

http://stackoverflow.com/comment/38283178
type: AnswerComment
comment on: http://stackoverflow.com/a/24684839
score: 0
type: Comment
has text: I have actually realized that this isn't achieving the effect that you actually want. Im beginning to think that the data points in the effect you want are intelligently placed so that it wont break on transitions. That, or it is using a d3.force layout to keep the circle connected to the lines. Also, in the example you want to emulate, the circle is moving in a circular motion rather than all over the map which is keeping the lines connected. Anyway, that's as much as I will be able to figure out. Hope you figure it out.

http://stackoverflow.com/comment/38174891
comment on: http://stackoverflow.com/a/24628930
type: AnswerComment
type: Comment
has text: Interesting FACT is that "/a" is only present in JQuery 1.X versions.It is not present in JQuery 2.X versions.
score: 0

http://stackoverflow.com/comment/124667502
type: Comment
comment on: http://stackoverflow.com/a/24749707
has text: Very useful solution for me.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38293737
comment on: http://stackoverflow.com/a/24695236
score: 0
type: AnswerComment
has text: I need to get the options from the backend, so their is no defined list of options for this. So on click or double click it should make the text box editable and the list of options should be populated
type: Comment

http://stackoverflow.com/a/65367434
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: I have fixed this buy removing the "position:relative;" from the parent div of canvas.
answers question: http://stackoverflow.com/q/24703893

http://stackoverflow.com/comment/126306878
comment on: http://stackoverflow.com/a/67020180
has text: Quote "...simple requests,... the request will be executed and if the request was not allowed, then a not-allowed error response will be returned." So you are saying the server will reject the request? Then why is CSRF token still necessary here?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24599370
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24599844
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24599844
has title: CSS3 effects with jQuery only works on chrome debug
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38112992
tagged with: css
type: AnsweredQuestion
has body: I am trying to animate a div object using jQuery and CSS3. But i am obtaining a weird behavior. Effect works on only chrome debug mode. Here is the code var $s = $('#animateMePlease'); $s.css('transition-duration', 0+'ms'); $s.css({ opacity:0, display:'block' }); // debugger; // only works when i stop once code execution here, and release again $s.css('transition-duration', d.duration+'ms'); $s.css({ opacity:1 }); Thanks for any help.

http://stackoverflow.com/comment/38260947
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24677390
has text: You should be using `"50px"` instead of just `50`. (Not the downvoter BTW).

http://stackoverflow.com/comment/42926915
has text: I would give a 100 up-votes If I could. But Still I cannot figure out how it works only by moving the code from head section to body section?
comment on: http://stackoverflow.com/a/24771998
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38186073
has text: How can I use directives to store data across 2 specific pages, but not across any others?
score: 0
comment on: http://stackoverflow.com/q/24636328
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38347638
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24717660
has text: Thank you. So it sounds like I have to do a separate (single) query to get the users using the $in operation - which I guess is fine although I wonder if I could combine the two queries into one (getting the meetings and the user's first and last names)? The reason I'm not just storing the first and last names is that I would have to update those in the rare last of a user changing their name. I imagine that's an ok tradeoff meaning I should just store those and deal with the rare case.

http://stackoverflow.com/q/24616055
has comment: http://stackoverflow.com/comment/38146454
has answer: http://stackoverflow.com/a/24616336
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38146324
downvote count: 2
upvote count: 1
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/24616336
has comment: http://stackoverflow.com/comment/38145867
tagged with: javascript
score: -1
has title: link function inside angularjs directive not working
answer count: 1
has body: I have a js fiddle here Neither the directive is rendering, nor the link function of that directive being called. Code: JS (function() { var app = angular.module("directives", []); app.directive("mySample", function() { return { restric: "E", replace: true, template: " sample directive ", link: function(scope, elem, attrs) { console.log(elem); } }; }); }()); HTML:
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/38390156
has text: Weird. It´s only working partly. It seems like the only thing I can change is the background-color. Other parameters aren’t working. I can´t add images or change the colors of other elements. I already checked jquery and tried different themes but nothing is working. I must have done something wrong, but I can´t figure out what.
comment on: http://stackoverflow.com/a/24723661
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24726828
answers question: http://stackoverflow.com/q/24725877
downvote count: 0
has comment: http://stackoverflow.com/comment/38356765
accepted answer of: http://stackoverflow.com/q/24725877
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
has body: What you want to do is find the target content and determine if the element is within the viewport. If it is then you show the title. With this you won't need to use data-* attributes. You can just put the title in the main content's element, and then use jQuery's .closest method to get the closest parent (the content element). And from there do the tests. HTML Yama Modurra Computer Maru Sushi Sushi Lights Out JS $(window).scroll(checkY); function checkY(){ var top = $(window).scrollTop(); $(".title").each(function(){ var target = $(this).closest(".content"); //The start range value is just offset().top var tTop = target.offset().top; //The end range value is the start range value plus //the content elements height var tBottom = tTop+target.outerHeight(); if(top >= tTop && top <= tBottom){ console.log("Show"); $(this).show(); } else { console.log("Hide"); $(this).hide(); } }); } checkY(); JSFiddle Demo

http://stackoverflow.com/comment/38298545
score: 0
type: AnswerComment
type: Comment
has text: @JacobPedersen: That doesn't change anything, then you'd just have to have *that* function accept a callback. You *cannot* convert an asynchronous result into a function's return value.
comment on: http://stackoverflow.com/a/24697761

http://stackoverflow.com/q/24617040
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: permissions
favorite count: 0
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
score: 2
has answer: http://stackoverflow.com/a/24641267
has body: I plan to build a few apps with sailsjs and angularjs I need help to find a solution to set flexible permissions. It means that I can manage permissions on models (CRUD) and model-functions. It should also be possible to limit access to objects in models (e.g. User can modify only customer in USA but can also read customer in Europe / user has no right to see the address from customer). Does anyone know an existing solution for that? Or can you give me a hint how to implement an own complex permission system? Thank you for help, Nick.
has title: complex permission system for sails.js / angular
type: Question
tagged with: sails.js

http://stackoverflow.com/comment/38322035
type: Comment
type: QuestionComment
has text: also instead of `Value.length > 1 && Value.length < 3` you could just do `Value.length == 2`
comment on: http://stackoverflow.com/q/24709675
score: 0

http://stackoverflow.com/comment/108801679
type: Comment
comment on: http://stackoverflow.com/a/29592127
score: 0
has text: I get an error when I try to run the tests "Block-scoped declarations (let, const, function, class) not yet supported outside strict mode" Do you have an idea?
type: AnswerComment

gis
tags question: http://stackoverflow.com/q/24637265
tag name: gis
type: Tag

http://stackoverflow.com/a/24684028
has comment: http://stackoverflow.com/comment/38274333
answers question: http://stackoverflow.com/q/24683765
upvote count: 1
has comment: http://stackoverflow.com/comment/38273634
score: 1
has comment: http://stackoverflow.com/comment/38274504
has comment: http://stackoverflow.com/comment/38273961
has comment: http://stackoverflow.com/comment/38273675
downvote count: 0
has comment: http://stackoverflow.com/comment/38274672
type: Answer
has body: No. When you don't pass a string to express' res.send but an object (like error), it will call JSON.stringify internally. This will for sure not happen in promise.js (however, Bluebird does weird things to the stacktrace). Try res.send(error.message);
has comment: http://stackoverflow.com/comment/38273531

http://stackoverflow.com/comment/38219832
type: AnswerComment
comment on: http://stackoverflow.com/a/24627179
has text: `I have this error 'Uncaught TypeError: Cannot read property 'selectBookmarks' of null '`. I placed the `editor.getSelection().selectBookmarks(bookmarks);` inside `afterInit`
score: 0
type: Comment

http://stackoverflow.com/q/24651714
has comment: http://stackoverflow.com/comment/38215338
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/24935041
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/38214225
has title: Post ViewModel through Ajax using Knockout
favorite count: 0
has answer: http://stackoverflow.com/a/24935041
upvote count: 1
type: AnsweredQuestion
has body: Here name,abbre,description,weight,sequence are coming from textboxes.I am putting those values in LanguagesVM and while posting it through ajax it is not posting this. I have to find the values of all textboxes in one viewmodel which I have done below but its not posting that viewmodel to the controller. $(function () { function Languages(data) { var self = this; self.name = ko.observable(data.name); self.abbrev = ko.observable(data.abbrev); self.description = ko.observable(data.description); self.sequence = ko.observable(data.sequence); self.weight = ko.observable(data.weight); self.isActive = ko.observable(data.isActive); } function LanguagesVM() { var self = this; self.Languages = new Languages(); ko.applyBindings(LanguagesVM, document.getElementById("CreateLanguage")); self.saveLanguage = function () { alert("Save---"); $.ajax({ type: "Put", url: rootUrl + 'api/my/Language', data: ko.toJSON(self.Languages), contentType: "application/json; charset=utf-8", success: function (result) { console.log(result.d); }, error: function (err) { console.log(err.status + " - " + err.statusText); } }); }; }; }); Here is my html code:-- @using (Html.BeginForm(htmlAttributes: new { @class = "form single-col",@id="CreateLanguage" })) { Name Abbrev Description Sequence Weight Active Create Back to List }
has comment: http://stackoverflow.com/comment/38245639
score: 1

http://stackoverflow.com/comment/38314877
comment on: http://stackoverflow.com/q/24705717
type: QuestionComment
score: 0
has text: Ouch! You want to convert thousands of raster images to vector? Bring a big check to a graphic artist that knows Illustrator.
type: Comment

http://stackoverflow.com/comment/38308226
type: QuestionComment
has text: BTW I've already tried deleting cache and reloading, probably hundreds of times.
score: 0
comment on: http://stackoverflow.com/q/24702627
type: Comment

http://stackoverflow.com/q/24738233
has answer: http://stackoverflow.com/a/24738390
has comment: http://stackoverflow.com/comment/38376525
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
answer count: 4
tagged with: mysql
has title: checking checkbox and then input to a new row
has answer: http://stackoverflow.com/a/24738376
type: Question
has answer: http://stackoverflow.com/a/24738437
has body: How can i insert into the database based on a checkbox result. I have 5 rooms available and a user can book more then 1. How do i insert the data to my bookings table for the rooms selected only. This is what i was trying but it would only work for the 1st room, did try elseif but this didnt work either. if(isset($_POST['room1'])) { $query = "insert into bookings (bookingNo,roomNo) values ('$bookingNo','1')"; $result = mysql_query($query); } This is basicly just to input the roomNo and the details for that room, such as date booked and time. Thanks Form Rooms Youth Cafe Inkwell Main Inkwell Small Kitchen Outside Catering
tagged with: database
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24738455

http://stackoverflow.com/q/24732124
tagged with: mysql
has title: how to send image file through ajax load() function and insert in mysql db display in div through php
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/43909710
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38365369
has comment: http://stackoverflow.com/comment/38366975
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/24735166
has body: This is form i am sending image file to the upload.php script file and image file should display in the 'onsuccessmsg' div &lt;form action="upload.php" method="POST" id="uploadform"&gt; &lt;input type="file" file="file" id="file_to_send"/&gt; &lt;input type="submit" value="Upload"/&gt;&lt;br/&gt;&lt;br/&gt; Message : &lt;div id="onsuccessmsg" style="border:5px solid #CCC;padding:15px;"&gt;&lt;/div&gt; &lt;/form&gt; This is the JavaScript code: &lt;script&gt; $(document).ready(function(){ $("#uploadform").on('submit',function(){ $("#onsuccessmsg").load("upload.php",{},function(res){ }); }); }); &lt;/script&gt; This is the upload.php file: &lt;?php if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST"){ $name = $_FILES['file']['name']; $size = $_FILES['file']['size']; $tmp = $_FILES['file']['tmp_name']; if(move_uploaded_file($tmp, "./uploads/".$imgn)) { echo "File Name : ".$_FILES['file']['name']; echo "&lt;br/&gt;File Temporary Location : ".$_FILES['file']['tmp_name']; echo "&lt;br/&gt;File Size : ".$_FILES['file']['size']; echo "&lt;br/&gt;File Type : ".$_FILES['file']['type']; echo "&lt;br/&gt;Image : &lt;img style='margin-left:10px;' src='uploads/".$imgn."'&gt;"; } } ?&gt; Onsubmit the form how to send the name and id values to the upload.php file and echoing the image file in the onsuccessmsg div, I am confused, please help me.

http://stackoverflow.com/a/24688151
score: 0
accepted answer of: http://stackoverflow.com/q/24687951
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24687951
has body: Here is a simplified example using jquery: JSfiddle $(function(){ $('.thumb').click(function(){ $('.header').css("backgroundImage", "url(" + $(this).attr("src") + ")"); }); }); Update with hover and fade in/out: JSfiddle var url; $(function(){ $('.header').css("backgroundImage", "url( http://lorempixel.com/100/100/abstract/9 )"); $('.thumb').hover(function(){ url = "url(" + $(this).attr("src") + ")"; $('.header').animate({opacity: 0}, 500, function(){ $(this).css("backgroundImage", url).delay(100).animate({opacity: 1}, 500); }); }); });
has comment: http://stackoverflow.com/comment/38281186

http://stackoverflow.com/comment/38173194
has text: Oh, I see. I don't think there is a way around that without Javascript. I think Yharooer's suggestion is worth checking out in that case. You could call the set function he/she proposes every time something changes in your container.
type: AnswerComment
comment on: http://stackoverflow.com/a/24627113
score: 0
type: Comment

http://stackoverflow.com/comment/38326659
comment on: http://stackoverflow.com/a/24711926
has text: thanks. i appreciate it very much. works like a charm!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38223131
type: Comment
score: 2
comment on: http://stackoverflow.com/q/24656998
type: QuestionComment
has text: are you trying to acces form fields on the code-behind? like input element values?

http://stackoverflow.com/q/24638342
favorite count: 0
accepted answer: http://stackoverflow.com/a/24638454
has comment: http://stackoverflow.com/comment/38188106
has comment: http://stackoverflow.com/comment/38188151
has comment: http://stackoverflow.com/comment/38188134
has body: I'm using the module dataformat to get a data from a timestamp but I get an error and I can't understand why. that's the timestamp 1405303200 and I need the Date in this format dd/mm/yyyy That's my code var day=dateFormat(result.request_date, "dd/mm/yyyy"); But what I get is the 1970-01-17 date asd.
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38188180
score: 1
has comment: http://stackoverflow.com/comment/38188038
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24638454
has title: Data conversion using Node JS

http://stackoverflow.com/comment/38251469
type: QuestionComment
comment on: http://stackoverflow.com/q/24672476
has text: That is why you have to add `target="result"` to your `a` tag so it will open in your frame called `result`.
score: 0
type: Comment

http://stackoverflow.com/a/24623419
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24623395
type: Answer
answers question: http://stackoverflow.com/q/24623395
has body: You can use this: /[^\w\sàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏÎŸÇÙÛÜÆŒ]/g You don't need special treatment for the _ as it is included in \w Reference French orthography
score: 0

http://stackoverflow.com/a/24629230
downvote count: 0
has body: To do so $(".content-asset img").attr("src","newimg.jpg"); It means , Change its source attribute to point to newimg.jpg
upvote count: 2
has comment: http://stackoverflow.com/comment/38172046
accepted answer of: http://stackoverflow.com/q/24629202
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38200689
has comment: http://stackoverflow.com/comment/38210138
has comment: http://stackoverflow.com/comment/38171894
answers question: http://stackoverflow.com/q/24629202
type: AcceptedAnswer

http://stackoverflow.com/a/24605304
type: Answer
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24592814
accepted answer of: http://stackoverflow.com/q/24592814
has body: Found the problem after some experimenting. Moved the ng-repeat to the li element as Select images to view <ulclass="dropdown-menu"> {{tag}} ^^^^^^^^^^^^^^^^^^^^^^^

http://stackoverflow.com/q/24642544
answer count: 1
has comment: http://stackoverflow.com/comment/38196236
has comment: http://stackoverflow.com/comment/38196146
tagged with: http://stackoverflow.com/tag/json
has title: How to store text in JSON object and output to div
has comment: http://stackoverflow.com/comment/38196172
has answer: http://stackoverflow.com/a/24642714
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question
has body: I have the following code working in a JSFiddle(http://jsfiddle.net/mattography/E4aqW/), but can't figure out how to get the article under the "Photography" heading stored in a JSON object and output to a div, similar to how I have the menu setup. HTML Photography This is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Related Articles Nature Photography Tilt Shift Technique Night Time Photography CSS ul li { list-style-type: square; text-decoration:none; } #menu { position: relative; top: 30px; } .ui-menu { width: 150px; z-index: 1000; } JQUERY $(function () { var data = { menu: [{ name: 'Cost', link: '0', sub: [{ name: 'Digital', link: '0-0', sub: null }, { name: 'Film', link: '0-1', sub: null }, { name: 'Processing', link: '0-2', sub: null }] }, { name: 'Digital', link: '1', sub: [{ name: 'Cameras', link: '1-0', sub: null }, { name: 'Memory', link: '1-1', sub: null }, { name: 'HDR', link: '1-2', sub: null }] }, { name: 'Film', link: '2', sub: [{ name: 'Types', link: '2-0', sub: null }, { name: 'Processing', link: '2-1', sub: null }, { name: 'ISO', link: '2-2', sub: null }] }, { name: 'Filters', link: '3', sub: [{ name: 'Infrared', link: '3-0', sub: null }, { name: 'UV', link: '3-1', sub: null }, { name: 'Digital', link: '3-2', sub: null }] }, { name: 'Process', link: '4', sub: [{ name: 'Digital', link: '4-1', sub: null }, { name: 'Film', link: '4-2', sub: null }, { name: 'History', link: '4-3', sub: null }] }] }; var getMenuItem = function (itemData) { var item…
score: 0

http://stackoverflow.com/q/24622696
tagged with: javascript
tagged with: jquery
has body: My first problem is when you click on the black or light gray square box i want to change the background of the square and when you click it again, to revert back to the original image. The second problem I am having is you will notice when you click on either of the boxes another window slides out. I want to make it, if you click the black box and have the window come out, then press the gray square it sends the window from the black box back and then opens the window from the gray square. I will have a website linked below so you can go check it out if you don't understand what I need. On the website , you will notice when you click the speaker icon on the left sidebar a window slides out and then if you click on the book icon it send the window from the speaker back, then opens the book window! Please Help! I am still a little new to jQuery and am having a bit of trouble with this! I have tried sprites with jQuery which is difficult because I already use the sprite for hover. I have tried toggleClass and some if/else statements. I might just be making the functions wrong but I can not get anything to work! HTML CSS #sidemenu { width: 60px; max-height: 100%; min-height: 100%; min-width: 60px; max-width: 60px; background-color: #383D3F; background-size: 100% 100%; background-attachment: fixed; position: absolute; left: -60px; transition: left ease-in-out 0.5s; top: 0; } #sidemenu.show { left: 0; } #regionsContainer { width: 60px; height: 100%; min-height: 100%; min-width: 60px; max-width: 60px; max-height: 100%; background-color: #383D3F; position: absolute; top:25%; } #regionsUnitedStates { width: 60px; height: 60px; background-color:#111111; } #regionsUnitedStatesTooltip { opacity:0; background-color:#000; height:60px; width:180px; left:100px; position:absolute; transition:all ease-in-out 0.25s; top:0; visibility:hidden; } #regionsUnitedStates.not-open:hover #regionsUnitedStatesTooltip{ left: 60px; opacity:1; visibility:visible; } #regionsUnitedStates:hover { bac…
score: 0
has answer: http://stackoverflow.com/a/24623033
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24623033
has title: How interact between multiple jQuery Functions and change background image on click with jQuery?
tagged with: css
type: AnsweredQuestion
type: Question
answer count: 1

http://stackoverflow.com/comment/38216788
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24653655
has text: Do you want to redirect to another view?
score: 0

http://stackoverflow.com/comment/38174611
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24631035
type: AnswerComment
has text: i do the same, and my ng-click looks like: `data-ng-click="download(note)"` and i get the `note` as object in the download function in my controller

http://stackoverflow.com/comment/38357870
score: 0
type: Comment
has text: Insightful solution. Thank you.
comment on: http://stackoverflow.com/a/24728044
type: AnswerComment

http://stackoverflow.com/comment/38578386
comment on: http://stackoverflow.com/a/24725962
score: 1
has text: Thankyou for your detailed answer. It is a bit of an overkill to have to do a custom editor but I guess it is the only way to do it.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38193626
has text: Ed Plunkett: I draw the polygons to a canvas with their centroids. I'm sure they are correct. Could it be though that because the screen has scaled too the centroid should be moved? Treeno: I am sure, I have validated it's correct by drawing it to a canvas. Also I need to be able to scale the polygons themselves, not the canvas as I am interacting with them with mouse inputs.
type: Comment
comment on: http://stackoverflow.com/q/24639990
score: 0
type: QuestionComment

opacity
tags question: http://stackoverflow.com/q/24636278
tags question: http://stackoverflow.com/q/24702865
tag name: opacity
type: Tag

http://stackoverflow.com/comment/38212034
type: Comment
comment on: http://stackoverflow.com/a/24648334
type: AnswerComment
has text: Please read my edit. I'm not saying complete is fired before success.
score: 0

http://stackoverflow.com/a/24697573
answers question: http://stackoverflow.com/q/24693756
type: AcceptedAnswer
downvote count: 0
has body: You won't get around using asynchronous, event-based code. pragmatic workarounds to avoid having to re-factor the code manually? You can try a javascript-to-javascript compiler that brings the await keyword to js. It should automatically transpile your code to an asynchronous version. Disclaimer: I haven't used any of these
type: Answer
accepted answer of: http://stackoverflow.com/q/24693756
upvote count: 1
score: 1

http://stackoverflow.com/q/24732686
has answer: http://stackoverflow.com/a/24732995
has answer: http://stackoverflow.com/a/24732972
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/24732972
has answer: http://stackoverflow.com/a/24732904
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38366392
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/24732904
has body: I have this table that receive from the server: (with ajax): $.each(data, function(i, item) { $('#MyTable tbody').append(" "d +" " +data[i].A+ " " +data[i].B +" " + " "); }); C and D are edit text, that the user can change. after the changing by the user I want to "take" the all new data from the table and send it by ajax with JSON. how can I read the data to a JSON? I start to write one but I am stuck on: function saveNewData(){ var newData= ... $.ajax({ type: "GET", url: "save", dataType: "json", data: { newData: newData}, contentType : "application/json; charset=utf-8", success : function(data) { ... }, error : function(jqXHR, textStatus, errorThrown) { location.reload(true); } }); } thank you
tagged with: jquery
tagged with: ajax
has title: Reading data from table (HTML, JAVAscript)
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24649623
upvote count: 1
tagged with: ios7
tagged with: javascript
type: UnansweredQuestion
answer count: 0
downvote count: 0
has body: hi I has searched for this problem all day long my video was directly played in my link, so here is my simple code to control video in javascript.. [_webView stringByEvaluatingJavaScriptFromString:@"video.muted = true;"]; or even [_webView stringByEvaluatingJavaScriptFromString:@"video.volume = o.o;"]; and I also try to write a function for mute in my html, and call it in webview, All of them didn't work out!! but I can control video play/pause as [_webView stringByEvaluatingJavaScriptFromString:@"video.pause();"]; why~~ Can any expert answer it? please~~~ thanks a lot!!
score: 1
tagged with: uiwebview
favorite count: 0
has title: Xcode UIWebView, using javascript to control html5 video's volume
type: Question
tagged with: xcode
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38440126

http://stackoverflow.com/q/24746946
has answer: http://stackoverflow.com/a/24747300
upvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24747300
has body: I have a simple javascript AJAX application that allows search and selection of records. Selection updates the location.hash and loads the associated record detail, and ideally vice-versa also (loading a record when the hash changes). Of course a careless implementation can cause loops and extra panel flashes. I want a predictable and concise implementation of this bidirectional binding. One approach is to only load a record on the hashchange event, and when a record is selected in the UI, set location.hash. This seems most concise, but I'd be concerned this would diminish record-click responsiveness in older browsers with a polled hashchange shim. Another approach is to record a navigating (e.g.) state when selecting a record, and clear it when handling hashchange. That's covered in this question. However, that seems like certain event sequences, like tapping Back multiple times rapidly, might result in inconsistency between the displayed content and URL. Have you seen an implementation that solves these problems?
answer count: 2
has title: Implementing location.hash bound bidirectionally to AJAX record-context
tagged with: hashchange
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
linked to: http://stackoverflow.com/q/6290950
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/24748281
has answer: http://stackoverflow.com/a/24748281

http://stackoverflow.com/a/24605430
has comment: http://stackoverflow.com/comment/38125915
has comment: http://stackoverflow.com/comment/38125660
downvote count: 0
answers question: http://stackoverflow.com/q/24605353
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/38125460
score: 2
has body: You have a return true statement in your loop. So when the first radiobutton is checked, it will not check the other ones. function beforeSubmit(){ var obj = document.quizcreen; var qCount = obj.totQuesHidden.value; var allChecked = true; for (var i=1; i&lt;=qCount; i++){ if(! document.getElementById("ans"+i).checked){ allChecked = false; } } if(! allChecked){ alert("Please select ateleast one option"); // unchecked return false } obj.submit(); return true; }

http://stackoverflow.com/comment/38144841
type: QuestionComment
comment on: http://stackoverflow.com/q/24615395
has text: @andrew That's true. Very good point.
score: 0
type: Comment

http://stackoverflow.com/comment/38215208
has text: Are jqXHR, textStatus, or errorThrown giving you any further details?
score: 0
comment on: http://stackoverflow.com/q/24652861
type: Comment
type: QuestionComment

ionic-framework
tags question: http://stackoverflow.com/q/24697961
type: Tag
tags question: http://stackoverflow.com/q/24679014
tags question: http://stackoverflow.com/q/24721917
tags question: http://stackoverflow.com/q/24593989
tags question: http://stackoverflow.com/q/24589195
tags question: http://stackoverflow.com/q/24608136
tags question: http://stackoverflow.com/q/24590044
tag name: ionic-framework

http://stackoverflow.com/comment/38313570
has text: Fabricio: I'm using ctrl-K and I can't make it work....I've been trying for 20mins now. OK Got it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24704843
score: 0

http://stackoverflow.com/comment/38287016
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24653164
has text: Yes Harpreet you are right "Em" was an example it could be any other word.
score: 0

http://stackoverflow.com/q/24607541
has title: Using JavaScript in a jQuery template
has answer: http://stackoverflow.com/a/24607893
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24607893
type: Question
has comment: http://stackoverflow.com/comment/38128768
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38128787
answer count: 1
tagged with: jquery-templates
has comment: http://stackoverflow.com/comment/38129105
score: 0
has body: I can't get it to work. How do I add JavaScript to a jQuery template? I tried it in the following way without success: Here is my problem on fiddle. edit: I found a different solution. In Infragistics templates you can execute javascript in if statements. {{if YOUR_JAVASCRIPT_GOES_HERE}}Some Text}}{{/if}} And if you want, you can add values to the parameter, to display them later. A little bit hacky, but works.

http://stackoverflow.com/q/24680069
has title: How can I skip an epoch field in a nodeunit deepEqual test on an object?
downvote count: 0
favorite count: 0
has body: I'm running tests on some Javascript objects with nodeunit. At some point, I have a validation that goes like so: test.deepEqual(originalObject, testObject, 'Sentiment validation'); The objects I'm validating look approximately like these: var originalObject = { "sentiments": [ { "sentiment": "negative", "user": { "_id": null, "type": "machine" }, "timestamp": 1404775102 } ] }; var testObject = { "sentiments": [ { "sentiment": "negative", "user": { "_id": null, "type": "machine" }, "timestamp": 1405004493 } ] }; My test is always failing because the timestamp field in the dynamically created object (testObject, in this case) is always different; is there a way to tell the deepEqual method to skip that single field?
type: UnansweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/38283373
type: Question
tagged with: nodeunit
has comment: http://stackoverflow.com/comment/38283215
has answer: http://stackoverflow.com/a/60398737
tagged with: javascript
has answer: http://stackoverflow.com/a/24689523
answer count: 2
score: 3

http://stackoverflow.com/q/24685474
accepted answer: http://stackoverflow.com/a/24685576
tagged with: angularjs
has title: x = x+1 != x++?
upvote count: 4
has comment: http://stackoverflow.com/comment/38276222
has comment: http://stackoverflow.com/comment/38276211
has answer: http://stackoverflow.com/a/24685576
type: AnsweredQuestion
tagged with: angularjs-ng-click
score: 3
possible better answer: http://stackoverflow.com/a/24686645
type: Question
has comment: http://stackoverflow.com/comment/38276308
has comment: http://stackoverflow.com/comment/38276226
tagged with: javascript
has body: I have a really simple angular app. It just adds 1 to the value on ng-click. See JSFiddle THIS WORKS ON CLICK: {{hello}} THIS DOESN'T: {{hello}} I expected to be able to '++' the value of a variable using ng-click, but apparently not. Am I doing something incorrectly?
answer count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/24686645
favorite count: 0

http://stackoverflow.com/a/24703238
has comment: http://stackoverflow.com/comment/38309397
has comment: http://stackoverflow.com/comment/38309333
type: Answer
has comment: http://stackoverflow.com/comment/38312761
downvote count: 0
score: 1
has body: use this: ng-class="{user_has_upvoted : signedIn() &amp;&amp; topic.upvotes[currentUser.username].localeCompare(currentUser.username) === 0}"
upvote count: 1
answers question: http://stackoverflow.com/q/24703098

http://stackoverflow.com/a/24689086
type: AcceptedAnswer
has body: You're very, very close - the only problem is you're never setting the value of your variable radius, so all your coordinates are being calculated as pt.x + (nothing) * Math.cos(radians)....which in javascript is NaN. I added radius = 100; before your for loop and everything works nicely. This is actually a pretty easy error to debug. IMO if you're not using Chrome for ESRI JS development, then you should be - its inbuilt dev tools are excellent for examining object properties. The way I worked out what was going on was simply to dump the map.graphics.graphics array to the console - you can then drill down into the geometry.rings of each array element and very quickly work out that each point has x = NaN and y = NaN, and from there it's obvious that there's something wrong with your calculation.
type: Answer
answers question: http://stackoverflow.com/q/24654704
has comment: http://stackoverflow.com/comment/38358168
accepted answer of: http://stackoverflow.com/q/24654704
score: 0

http://stackoverflow.com/q/24715331
downvote count: 0
type: UnansweredQuestion
tagged with: php
score: 1
has answer: http://stackoverflow.com/a/24931192
has answer: http://stackoverflow.com/a/28719831
tagged with: sugarcrm
type: Question
answer count: 2
has title: Multiselect dependent dropdowns in sugarcrm 7 pro
tagged with: javascript
upvote count: 1
favorite count: 0
has body: I am a beginner at Sugarcrm currently and the documentation does not seem to help with the issue. My problem here is that I need to create an dependent droplist from an initial dropdown. So for example, if the initial dropdown was states, you could pick Florida, and then a second drop is a MULTISELECT in which you can select multiple cities in which you are from. I really do not know how to approach this problem. If you guys can help with this problem that would be great thanks!

http://stackoverflow.com/a/24752780
answers question: http://stackoverflow.com/q/24731490
has body: I tried to solve my own problem with the help of comments provided by others . Here is the solution. Although there is little bit change i.e I changed the div to li that's all SCRIPT $(".fieldset a").click(function () { //var ul_parent= $('li.fieldset').parent(); //$(ul_parent).find('li').each(function(){ //code here }); $('li.fieldset').each(function(){ if ($(this).hasClass('rightSlide')) { }else{ var form = '#'+$(this).attr('id'); var arr = form.split('_'); var menu = '#menu_' + arr[1]; var theClass = form; console.log("The opened id : "+form); toggle(form,menu,theClass); } }); var form = '#'+$(this).closest('li').attr('id'); var arr = form.split('_'); var menu = '#menu_' + arr[1]; var theClass = form; toggle(form,menu,theClass); // console.log(menu); function toggle(form,menu,theClass){ if ($(theClass).hasClass('rightSlide')) { $(form).animate({ "margin-left": "-200px", "margin-right": "200px" }, "slow").removeClass('rightSlide'); $(menu).animate({ "margin-right": "0px" }, "slow"); } else { $(form).animate({ "margin-left": "0px", "margin-right": "0px" }, "slow").addClass('rightSlide'); $(menu).animate({ "margin-right": "-200px" }, "slow"); } } //$('.hidenset').toggle(400); }); HTML List View List 1 Menu 1 List 2 Menu 2 List 3 Menu 3 Page Footer CSS .fieldset { height:100px; background:green; width:100%; margin-bottom: 2px !important; margin-top: 2px !important; color:white; } .hidenset { background:red; margin-top: -103px !important; width:180px; height:100px; margin-bottom: 2px !important; margin-right: -200px; color:white; /*display:none;*/ float:right; } ul { list-style-type: none; padding-left: 0px; } .fieldset a { float:right; margin-right: 0px !important; height: 21px !important; width: 21px !important; padding-right: 20px !important; padding-left: 0px !important; } The UPDATED LINK for JS FIddle
accepted answer of: http://stackoverflow.com/q/24731490
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/38278735
type: AnswerComment
comment on: http://stackoverflow.com/a/24660902
has text: No it had to reset everything to 0, the problem was that the value was the total sum of a computed variable and was having difficiulty 'writing' 0 to that variable.
type: Comment
score: 0

http://stackoverflow.com/a/24620934
has body: You can do something like this: The fiddle. Change your html as: &lt;div class="editor"&gt; &lt;div class="toolbar"&gt; &lt;span id="btnedit-bold" title="Vergedrukte text"&gt;&lt;img src="images/bold.png" /&gt;&lt;/span&gt; &lt;span id="btnedit-italic" title="Italic text"&gt;&lt;img src="images/italic.png" /&gt;&lt;/span&gt; &lt;span id="btnedit-underline" title="Onderstreep text"&gt;&lt;img src="images/underline.png" /&gt;&lt;/span&gt; &lt;span id="divider"&gt;&amp;nbsp;&lt;/span&gt; &lt;span id="btnedit-delete" title="verwijder (doorstreep) text"&gt;&lt;img src="images/delete.png" /&gt;&lt;/span&gt; &lt;span id="divider"&gt;&amp;nbsp;&lt;/span&gt; &lt;span id="btnedit-link" title="Insert link"&gt;&lt;img src="images/link.png" /&gt;&lt;/span&gt; &lt;/div&gt; &lt;textarea name="editor-preview" class="area" placeholder="Uw bericht"&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="editor-preview"&gt;&lt;/div&gt; &lt;div id="prompt"&gt; &lt;div class="prompt-background"&gt;&lt;/div&gt; &lt;div class="prompt-dialog"&gt; &lt;div class="prompt-message"&gt; &lt;p&gt;&lt;b&gt;Insert Hyperlink&lt;/b&gt;&lt;/p&gt; &lt;/div&gt; &lt;form class="prompt-form"&gt; &lt;p&gt;titel&lt;/p&gt; &lt;input id="btnedit-title" type="text" style="display: block; width: 80%; margin-right: auto; margin-left: auto;"&gt; &lt;p&gt;http://example.com/&lt;/p&gt; &lt;input id="btnedit-url" type="text" style="display: block; width: 80%; margin-right: auto; margin-left: auto;"&gt; &lt;button id="btnedit-ok" class="btn-orange" onClick="$('#prompt').show();"&gt;OK&lt;/button&gt; &lt;button id="btnedit-cancel" class="btn-orange" onClick="$('#prompt').hide();"&gt;cancel&lt;/button&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; And add those to your javascript as: $('#btnedit-bold').on("click",function(e) { wrapText('b'); }); $('#btnedit-italic').on("click",function(e) { wrapText('i'); }); $('#btnedit-underline').on("click",function(e) { wrapText('u'); }); $('#btnedit-delete').on…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38156790
has comment: http://stackoverflow.com/comment/38156280
has comment: http://stackoverflow.com/comment/38156437
type: Answer
has comment: http://stackoverflow.com/comment/38156791
upvote count: 4
has comment: http://stackoverflow.com/comment/38155995
has comment: http://stackoverflow.com/comment/38156910
has comment: http://stackoverflow.com/comment/38156718
accepted answer of: http://stackoverflow.com/q/24620523
has comment: http://stackoverflow.com/comment/38156523
answers question: http://stackoverflow.com/q/24620523
has comment: http://stackoverflow.com/comment/38156683
has comment: http://stackoverflow.com/comment/38156637
score: 4
has comment: http://stackoverflow.com/comment/38190619
has comment: http://stackoverflow.com/comment/38156608

http://stackoverflow.com/q/24610509
has answer: http://stackoverflow.com/a/24631020
has body: I'm building a very simple Validation plugin that uses part of the Constraint validation API. I'm using 2 features of the API, valueMissing and patternMismatch like so: var el = $(this)[0]; if ( el.validity.valueMissing || el.validity.patternMismatch ) { $errMsg.show(); } else { $errMsg.hide(); } I'd like to write my own polyfill so these features work in older browsers as opposed to using an entire HTML5 validation library or plugin. So I guess what I'm trying to achieve is something like this: if (!typeof document.createElement( 'input' ).checkValidity == 'function'){ validity.valueMissing = function(){ // check for value } } However, I can't figure out how to go about this, nor how the element is used as the first part of the function: el.validity.valueMissing Thanks in advance for any help or suggestions!
favorite count: 0
has answer: http://stackoverflow.com/a/24614095
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38139993
has comment: http://stackoverflow.com/comment/38141463
score: 2
downvote count: 0
has title: Create a polyfill for HTML5 Validation
type: Question
tagged with: javascript
tagged with: polyfills
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/38107636
type: AnswerComment
has text: You're right, I'm afraid I was called for lunch when I had merely typed the code. I've edited my answer.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/24595952

http://stackoverflow.com/comment/38228655
type: Comment
score: 0
has text: User.Identity.IsAuthenticated is serverside function and while razor code being complied authenticate function will be called and it will be checked with server, not in client side. If i'm wrong so you can blame Microsoft.
type: AnswerComment
comment on: http://stackoverflow.com/a/24620454

http://stackoverflow.com/q/24619636
tagged with: function
tagged with: javascript
tagged with: shortcode
possible better answer: http://stackoverflow.com/a/24619693
score: 0
has answer: http://stackoverflow.com/a/24619693
type: AnsweredQuestion
has title: How to Add HTML & Javascript to Wordpress Shortcode?
tagged with: wordpress
type: Question
has answer: http://stackoverflow.com/a/24619716
accepted answer: http://stackoverflow.com/a/24619716
has body: I have a snippet of HTML that I would like to make into a Wordpress shortcode. This is the snippet. Have Questions? TALK TO US 800.810.8412 Email Us Chat Now I've added this to my functions.php and it outputs the code properly when I add [chat] to a page in Wordpress. // Chat/Email Shortcode function chat_shortcode() { return ' Have Questions? TALK TO US 800.810.8412 Email Us Chat Now '; } add_shortcode('chat', 'chat_shortcode'); However, when I change the live chat link from # to javascript:void(0);" onclick="olark('api.box.expand'), the entire site breaks. How can I make the link work properly?
answer count: 2
has comment: http://stackoverflow.com/comment/38153039

http://stackoverflow.com/comment/38097200
has text: In some cases, JSON needs the name of the properties between quotes. { "prop1": 1, "prop2": "2" }
comment on: http://stackoverflow.com/a/24590775
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38246413
score: 0
type: QuestionComment
type: Comment
has text: click on next or previous arrow. after that it will not slide automatically
comment on: http://stackoverflow.com/q/24669791

http://stackoverflow.com/q/24728433
type: UnansweredQuestion
score: -2
has comment: http://stackoverflow.com/comment/38358667
has answer: http://stackoverflow.com/a/24728492
has comment: http://stackoverflow.com/comment/38358652
type: Question
downvote count: 2
has comment: http://stackoverflow.com/comment/38359191
tagged with: function
answer count: 1
tagged with: button
has comment: http://stackoverflow.com/comment/38358403
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: So, as the title suggested. That's the problem. Below is my code, I would be very thankful for your kind assistance. Thank you! TODO supply a title User: Password: Login Register enter code here Just some additional information: Tried adding a semicolon after function, doesn't work. Tried capitalizing onclick to onClick, doesn't work as well.
has title: Function not being called when button is clicked
upvote count: 0
tagged with: onclick

http://stackoverflow.com/comment/71914221
has text: I like this question and its answers because they are about something specific, but they also remind me of the difference between CSRF and CORS. (I admit those are **not easily confusable** concepts... But I still manage to confuse them.)
comment on: http://stackoverflow.com/q/24680302
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/comment/38281322
type: Comment
comment on: http://stackoverflow.com/a/24680946
has text: Please have a look to some screnshots bellow.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25316950
type: Answer
answers question: http://stackoverflow.com/q/24691941
has body: You could nest the templates directly - or am i missing the point ? {{tab}}
has comment: http://stackoverflow.com/comment/39496537
score: 0

mobile
tags question: http://stackoverflow.com/q/24648401
type: Tag
tags question: http://stackoverflow.com/q/24598379
tags question: http://stackoverflow.com/q/24658876
tags question: http://stackoverflow.com/q/24659841
tags question: http://stackoverflow.com/q/24695365
tags question: http://stackoverflow.com/q/24604975
tags question: http://stackoverflow.com/q/24737994
tags question: http://stackoverflow.com/q/24740875
tags question: http://stackoverflow.com/q/24605461
tags question: http://stackoverflow.com/q/24634117
tags question: http://stackoverflow.com/q/24596163
tag name: mobile
tags question: http://stackoverflow.com/q/24598835
tags question: http://stackoverflow.com/q/24735266

http://stackoverflow.com/a/24703650
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24703584
upvote count: 2
has body: Try this : "Return" stops the stack instruction.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/24703584

filesystemobject
type: Tag
tag name: filesystemobject
tags question: http://stackoverflow.com/q/24626061

http://stackoverflow.com/q/24736820
tagged with: web
tagged with: jquery
favorite count: 0
has title: $(this).attr('id') returns undefined, despite id being defined
has comment: http://stackoverflow.com/comment/38383467
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6346238
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19355791
has answer: http://stackoverflow.com/a/24736862
has comment: http://stackoverflow.com/comment/38381697
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38374211
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24737945
score: -1
tagged with: forms
accepted answer: http://stackoverflow.com/a/24736862
has comment: http://stackoverflow.com/comment/38373924
has answer: http://stackoverflow.com/a/24737945
answer count: 2
upvote count: 0
has body: I am going to have several forms, which all use the same class, on a page. They all work the same way. However, I have issues making things work. There is a that needs to update other fields when the user changes the field. I got this working fine, when there is only one form. However, when i try to have more than one form, it breaks down. I switched from id to class to have the script run, but now I am in situation where jQuery won't give me the ID. Here is what the HTML looks: Koko RTK Määrä Hinta/kpl 18/450 18/600 22/450 22/600 And this is the Jquery: $(".varaosaKoko").ready( function () { var id = $(this).attr('id'); var luokka = $(this).attr("class"); //var parent = $(this).closest('form'); console.log("Valmiina kenttä id:" + $(this).attr('id') + ", luokka: " + luokka); }); Yet, it always gives both id and class as "undefined". In code, as you can see, they are defined. Anyone have any idea what is wrong? The HTML is generated with PHP, since the plan to have more than one form of the same class, so each one gets their own identifier as a number for id. EDIT Clarification, since I forgot this: The JQuery, in full form and not just the part I posted, is: $(document).ready(function(){ $(".varaosaKoko").ready( function () { var id = $(this).attr('id'); var luokka = $(this).attr("class"); //var parent = $(this).closest('form'); console.log("Valmiina kenttä id:" + $(this).attr('id') + ", luokka: " + luokka); }); });

http://stackoverflow.com/a/24619762
has comment: http://stackoverflow.com/comment/38154167
answers question: http://stackoverflow.com/q/24619664
has comment: http://stackoverflow.com/comment/38153461
has comment: http://stackoverflow.com/comment/38188394
score: 0
has comment: http://stackoverflow.com/comment/38153752
has comment: http://stackoverflow.com/comment/38154268
has comment: http://stackoverflow.com/comment/38189821
type: Answer
has comment: http://stackoverflow.com/comment/38153397
has body: That's just how Jasmine works. The question you linked has an answer with a decent explanation: Essentially, the runs() and waitFor() functions stuff an array with their provided functions. The array is then processed by jamine wherein the functions are invoked sequentially. Those functions registered by runs() are expected to perform actual work while those registered by waitFor() are expected to be 'latch' functions and will be polled (invoked) every 10ms until they return true or the optional registered timeout period expires. If the timeout period expires an error is reported using the optional registered error message; otherwise, the process continues with the next function in the array. To sum it up, each waitsFor call must have a corresponding runs call. They work together. Calling waitsFor without a runs call somewhere before it does not make sense. My revised plunker (see comments on this answer): http://plnkr.co/edit/9eL9d9uERre4Q17lWQmw As you can see, I added $rootScope.$apply(); to the the timeout function you were testing with. This makes the console.log inside the promise callback run. HOWEVER it only runs if you ignore the other test with an xit, AND the expect after the console.log does not seem to be recognized as a Jasmine test (though it certainly must run, because the console.log does). Very weird - I don't really understand why this is happening, but I think it has something to do with how Jasmine works behind the scenes, how it registers tests and whatnot. My understanding at this point is if you have an expect inside an async callback, Jasmine won't "recognize" it as a part of the test suite unless the initial async call was made inside a runs. As for why this is, I don't know. I don't think it's worth trying to understand - I would just use runs and waitsFor and not worry about it, but that's just me. You can always dig through the source if you're feeling masochistic. Sorry I couldn't be of more help.
has comment: http://stackoverflow.com/comment/38154542
has comment: http://stackoverflow.com/comment/38153548
has comment: http://stackoverflow.com/comment/38153856

http://stackoverflow.com/comment/38374758
type: Comment
has text: In the `totalPrice` function, `this` keyword would refer to the element that received the click
comment on: http://stackoverflow.com/a/24737064
score: 0
type: AnswerComment

http://stackoverflow.com/q/24622420
favorite count: 0
has answer: http://stackoverflow.com/a/24758824
accepted answer: http://stackoverflow.com/a/24758824
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/24622426
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
has body: I'm building a form for user registration for my website. I had all the php registration process correct without the use of Json through Jquery AJAX. When I specified it as a datatype (so I can get the response more 'educated') the php file doesn't even read the data sent and the return is [object Object] in the .error response. I've searched the internet and SO in order to try and find a solution but none helped. I think it might be a mistake I made but cant find it. Hope you can help me, Thanks in advance. (Please dont mind the english mistakes - I had to write fast. Dont mind the foreigner language comments or titles also.) Form: (HTML) Username O nome de usuário já existe. Preencha esse campo, você o utilizará para fazer o Login no sistema. Password Preencha esse campo. Repeat Password Preencha esse campo, ele é necessário para não registrar sua senha de forma errada. As duas senhas devem ser iguais. Name Preencha esse campo, ele será útil na sua identificação no site. E-mail: Preencha esse campo com um e-mail válido, ele será utilizado para recuperar sua senha caso necessário. Code: Preencha esse campo, para verificar a autenticidade de sua visita. Código Inválido. Success! JS Script: //Form Handler $('#regSub').click(function() { var username = $('input#username').val(); if (username == '') { $('label#userDuv').show(); $('input#username').focus(); return false; } var pass = $('input#senha').val(); if (pass == '') { $('label#passDuv').show(); $('input#senha').focus(); return false; } var repass = $('input#reSenha').val(); if (repass == '') { $('label#repassDuv').show(); $('input#reSenha').focus(); return false; } if (pass != repass) { $('label#passErr').show(); $('input#senha').focus(); return false; } ; var nome = $('input#nome').val(); if (nome == '') { $('label#nomeDuv').show(); $('input#nome').focus(); return false; } var email = $('input#email').val(); if (email == '') { $('label#emailDuv').show(); $('input#email').focus(); return false; } var codReg = $('…
has answer: http://stackoverflow.com/a/24623809
tagged with: javascript
tagged with: jquery
score: -1
tagged with: ajax
possible better answer: http://stackoverflow.com/a/24622426
has answer: http://stackoverflow.com/a/24622448
upvote count: 0
has title: Data not being handled to php form processor through JQuery Ajax (JSON)

http://stackoverflow.com/comment/38260900
type: Comment
type: QuestionComment
has text: I don't think `App = App` is doing what you think it is. `window.App = App` is probably what you're after.
score: 3
comment on: http://stackoverflow.com/q/24677570

http://stackoverflow.com/q/24684532
type: Question
has comment: http://stackoverflow.com/comment/38274483
has answer: http://stackoverflow.com/a/24684857
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/24684628
score: 0
accepted answer: http://stackoverflow.com/a/24684626
possible better answer: http://stackoverflow.com/a/24684857
tagged with: http://stackoverflow.com/tag/html
has title: Accessing inner DIV id
has answer: http://stackoverflow.com/a/24684626
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24684634
has body: I have the following code and i need to access the input text field ID here whose class name is "company". Overview Managers Company Name //i am using following Jquery function $('.addManager').on( 'click', function( event ) { // how can i access the input text field ID here. } Any help would be appreciated. Thanks
has answer: http://stackoverflow.com/a/24684655
has answer: http://stackoverflow.com/a/24684591

http://stackoverflow.com/a/24637490
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24637249
downvote count: 0
has body: What about this: var myArray = ["a:10","a:5","a:25","b:10","b:25","b:20","c:5","c:30","c:15"], output = {}; for (var i = 0; i&lt;myArray.length; i++){ var item = myArray[i].split(":"); var key = item[0]; var value = item[1]; var array = output[key]; if (!array){ array = []; output[key] = array } array.push(value); } Or a more functional way: myArray.map(function(i){ var parts = i.split(":"); return {key:parts[0], value: parts[1]} }) .reduce(function(p,c){ var array = p[c.key]; if (!array){ array = []; p[c.key] = array } array.push(c.value); return p; },{});
type: Answer

http://stackoverflow.com/comment/38295576
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24696238
has text: it works when i pass something like this ng-click="go('aaaaaa')"

http://stackoverflow.com/comment/38381631
comment on: http://stackoverflow.com/a/24728955
has text: To elaborate a bit, the data is stored in `RavenDB` as an `IDictionary<string, T>` where `T` is a certain interface. I need to deserialize this and display it to the screen through kendo ui mvvm. While I can convert it to a normal array, this is not desired. However, I could assign the `key` to a new property `Name` on each item in the array. Would the dynamic change if I were to do that? Would that make it possible? If it was no longer dependent on the key name being the top level part?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38234591
type: Comment
comment on: http://stackoverflow.com/a/24662912
score: 0
has text: If I may make one suggestion to improve this: You are already binding this to the form `submit` event. Instead of `$('form[name="my_awesome_form"]')`, you could use `$(this)`. No need to traverse the DOM when you already have a reference to what you want.
type: AnswerComment

http://stackoverflow.com/q/24691501
linked to: http://stackoverflow.com/q/221294
answer count: 3
tagged with: jquery
favorite count: 0
tagged with: datetime
has answer: http://stackoverflow.com/a/24771994
has answer: http://stackoverflow.com/a/24691681
has answer: http://stackoverflow.com/a/24728163
has comment: http://stackoverflow.com/comment/38414075
score: 8
type: AnsweredQuestion
has title: How to convert datetime-local to datetime while storing and retrieving from database
linked to: http://stackoverflow.com/q/476105
possible better answer: http://stackoverflow.com/a/24691681
has body: I am beating my head around making this possible how do i convert datetime-local which i am using in jquery mobile and store data as datetime as my field is datetime in the database '&lt;input type="datetime-local"' + demodata + ' /&gt;'; I am using jquery mobile and having major issues if($(this).attr('type')==='datetime-local') { var $datevalue =$(this).val(); a[$(this).attr('name')] = $datevalue.toString(); //Have to convert to datetime instead } My datetime-local value is in this format: 2014-07-18T12:12
downvote count: 1
type: Question
upvote count: 9
accepted answer: http://stackoverflow.com/a/24728163
tagged with: javascript

http://stackoverflow.com/q/24676874
tagged with: jquery
has body: I am creating Canvas (I am new to this Canvas) object cylinder this is working fine Chrome &amp; Firefox but when i open the same file in ie9. I am getting error as 'requestAnimationFrame' is undefined When i google the error it says requestAniationFrame won't work on ie9. Can any body help me with this do we have any alternate way to solve this. and here is my code var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); var degreeAngle = 0; requestAnimationFrame(animate); function drawRotatedCylinder(x, y, w, h, degreeAngle) { context.save(); context.translate(x + w / 10, y + h / 10); context.rotate(degreeAngle * Math.PI / 180); drawCylinder(-w / 10, -h / 10, w, h); context.restore(); } function animate() { //requestAnimationFrame(animate); context.clearRect(0, 0, canvas.width, canvas.height); drawRotatedCylinder(100, 100, 180, 180, degreeAngle++); } Kindly help me for the above solution Thanks Regards Maha
favorite count: 0
has answer: http://stackoverflow.com/a/24676948
has comment: http://stackoverflow.com/comment/38259661
has comment: http://stackoverflow.com/comment/38259560
has comment: http://stackoverflow.com/comment/38259503
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/38259617
tagged with: internet-explorer-9
score: 10
tagged with: javascript
upvote count: 10
tagged with: canvas
tagged with: html5-canvas
has title: Error requestAnimationFrame in ie9 any alternate solution
answer count: 1
downvote count: 0

http://stackoverflow.com/q/24681000
answer count: 4
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38267956
score: 1
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38267721
has title: How to get image url which is inside a div
has comment: http://stackoverflow.com/comment/38267889
has answer: http://stackoverflow.com/a/24681055
favorite count: 0
has answer: http://stackoverflow.com/a/24681169
has answer: http://stackoverflow.com/a/24681080
upvote count: 1
has body: Is this possible to get the image URL which is inside a DIV For example &lt;div id="smallImage" style="display: block;"&gt; &lt;img width="270" height="270" alt="Vitra" name="large" src="http://example.com/598441_m2.jpg" style="display: block;"&gt; &lt;/div&gt; I want to read this in a javascript . i.e. in newImg.src &lt;script&gt; var newImg = new Image(); newImg.src = " ?? "; &lt;/script&gt; Can anyone help me with this? Thanks Sheikh
possible better answer: http://stackoverflow.com/a/24681080
accepted answer: http://stackoverflow.com/a/24681055
has answer: http://stackoverflow.com/a/24681088

http://stackoverflow.com/comment/38290318
comment on: http://stackoverflow.com/q/24693378
type: Comment
type: QuestionComment
has text: If you did `.data(this.id)` or anything else that is unique, you could actually remove it, for how do you remove a certain `my` from an array of `my`'s ?
score: 0

http://stackoverflow.com/comment/38180106
score: 0
type: Comment
has text: @Cameron As I said, it's untested :) I can't test it right now, so you'll have to do some trial and error and remove bits of the code one by one to figure out what's causing the error, I'll update my answer later on.
type: AnswerComment
comment on: http://stackoverflow.com/a/24634031

http://stackoverflow.com/a/24617404
type: Answer
has comment: http://stackoverflow.com/comment/38178292
score: 1
upvote count: 1
has body: You could use $scope.$watch and look for the change in your controller like so: http://jsfiddle.net/2R6aN/ var app = angular.module('tagsApp',[]); app.controller('TagsCtrl', function ($scope) { $scope.tag = {conversion_type: 'lead'}; $scope.$watch('conversion_type_custom_value',function(new_val) { if (new_val) { $scope.tag.conversion_type = new_val; } }); });
has comment: http://stackoverflow.com/comment/38166323
answers question: http://stackoverflow.com/q/24615610
downvote count: 0

http://stackoverflow.com/q/24653545
score: 0
type: Question
has comment: http://stackoverflow.com/comment/38216415
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38217158
tagged with: javascript
has title: Loop Div's Jquery
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/24654190
has body: I have been trying to get a loop to work where as one fades in the other fades out. My code so far setInterval(function() { jQuery(".loop").each(function(index, k) { jQuery(this).delay(1200 * index).fadeIn(600, function(){ jQuery(this).fadeOut(600); }); }); }, 1200); Example what happens : http://www.timoleon.co.uk/new/ It seems sometimes it works, sometimes it will show two .loop divs? Any ideas?
accepted answer: http://stackoverflow.com/a/24654190

http://stackoverflow.com/comment/38281767
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24680114
has text: Can you give me an example of how to arrange the codes. And please have a look to some screnshots I posted bellow this page. Thanks in Advance.

http://stackoverflow.com/a/24689828
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24689347
has comment: http://stackoverflow.com/comment/38284529
has body: A browser will definitely "drop" some of mousemove events, basically because it can't just execute your function once for each pixel the cursor has passed through. The frequency of execution depends on the browser itself: The frequency rate of events while the pointing device is moved is implementation-, device-, and platform-specific, but multiple consecutive mousemove events should be fired for sustained pointer-device movement, rather than a single event for each instance of mouse movement. Implementations are encouraged to determine the optimal frequency rate to balance responsiveness with performance. Source: http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mousemove Firefox would probably fire another mousemove event only when the last one is finished, since JavaScript is single threaded and it doesn't want to fill up the stack. You can say Firefox is "blocking" the event, but what I would say is Firefox is firing the event less frequently.
has comment: http://stackoverflow.com/comment/38284565
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24689347
type: Answer
score: 1

http://stackoverflow.com/q/24664199
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/24664225
type: AnsweredQuestion
has body: I been trying to use this solution to load Image. But I am getting an error that my url is not correct. This is what I am trying to load: [binary] What is wrong with it?
accepted answer: http://stackoverflow.com/a/24664225
tagged with: image
type: Question
has title: Javasscript: load image with base64 not working
tagged with: javascript
tagged with: base64
linked to: http://stackoverflow.com/q/10849200

http://stackoverflow.com/comment/38092610
type: Comment
type: QuestionComment
has text: Most browsers store pic in the catch so this should not be an issue
score: 1
comment on: http://stackoverflow.com/q/24588728

http://stackoverflow.com/comment/38310759
has text: It is possible but not with an isolated scope as far as I know.
type: AnswerComment
comment on: http://stackoverflow.com/a/24703746
score: 0
type: Comment

http://stackoverflow.com/a/24693792
upvote count: 1
downvote count: 1
has body: As I said in the comments, if your problem is to detect if localStorage is available, you can do somethinglike if (window.localStorage) { localStorage.setItem("key",value); } else { // localStorage is not available }
answers question: http://stackoverflow.com/q/24693698
type: Answer
has comment: http://stackoverflow.com/comment/38291039
has comment: http://stackoverflow.com/comment/38291129
score: 0

http://stackoverflow.com/comment/38202595
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24646046
score: 3
has text: I'll fix it for only 2 horses (or a camel), but that's my final offer !

http://stackoverflow.com/comment/38134790
comment on: http://stackoverflow.com/a/24608138
score: 0
has text: [there are still problems](http://i.imgur.com/ls5Juh8.png) (tested on chromium/linux)
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24744894
type: Question
has answer: http://stackoverflow.com/a/45244198
has title: How do I retrieve custom marker coordinates in HERE Maps API for Javascript?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24762203
answer count: 4
favorite count: 0
has body: How do I retrieve custom marker coordinates in HERE Maps API for Javascript? This is how I add a custom marker: var marker = new nokia.maps.map.StandardMarker([52.51, 13.4], { text: "Hi!", // Small label draggable: true // Make the marker draggable }); map.objects.add(marker); The problem: I need to get new coordinates when a user drags this marker to another position and clicks 'ok' (so no listeners are needed). Neither var 123 = marker(coordinate); alert(123);nor var 123 = marker.coordinate; alert(123); do the trick. The API seems to be silent about that issue.
upvote count: 1
accepted answer: http://stackoverflow.com/a/24762203
type: AnsweredQuestion
tagged with: here-api
score: 1
possible better answer: http://stackoverflow.com/a/68100858
has answer: http://stackoverflow.com/a/47425660
has answer: http://stackoverflow.com/a/68100858

http://stackoverflow.com/comment/38145541
score: 0
comment on: http://stackoverflow.com/q/24615899
type: Comment
has text: So what's the problem?
type: QuestionComment

http://stackoverflow.com/comment/38338302
score: 0
type: Comment
type: QuestionComment
has text: I just want to ask you one question which isn't related to your issue. Why are you using CSS3 to do that simple task? I would definitely use simple jQuery animation which is also much wider supported
comment on: http://stackoverflow.com/q/24717406

storage
tag name: storage
tags question: http://stackoverflow.com/q/24747237
type: Tag

http://stackoverflow.com/comment/38241532
type: Comment
comment on: http://stackoverflow.com/q/24666532
type: QuestionComment
score: 0
has text: I believe you already have the info you need in your JSON response or that you misunderstand how an AJAX call works. You need to extract the JSON response with $.parseJSON() method. This will give you an array/object which you can iterate over. Use that to get the tracks title

http://stackoverflow.com/comment/38381596
score: 0
type: Comment
has text: You had moment-timezone loaded twice. The "with data" file has the code also. I updated your fiddle and it works.
comment on: http://stackoverflow.com/a/24732445
type: AnswerComment

http://stackoverflow.com/comment/38137018
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24611325
has text: i can see the problem in firebug - there is no flotr mouse value div for the points in question but i don't know why..
score: 0

http://stackoverflow.com/q/24735266
has title: Javascript issues in Safari and Internet Explorer
tagged with: mobile
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/24735602
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: The problem is that the slider on the home and products page only works with firefox chrome and Opera. It just fails to move in either IE or Safari. The second issue is about how the site scales on mobile devices. I've looked into mobile event handling, but with less than great results. http://dextersaltmedia.net78.net/
tagged with: safari
has comment: http://stackoverflow.com/comment/38371053
downvote count: 1
type: Question

http://stackoverflow.com/q/24619021
has answer: http://stackoverflow.com/a/24619135
has comment: http://stackoverflow.com/comment/38151696
tagged with: jquery-events
accepted answer: http://stackoverflow.com/a/24619094
has title: How to Exclude Child Element from jQuery Event Handler?
has comment: http://stackoverflow.com/comment/38151794
favorite count: 0
has body: I am modifying an existing web page. I added a &lt;textarea&gt; to the page, but found that the Enter key doesn't work as expected. After spending considerable time searching, I found the following: $('form').keypress(function (e) { if (e.keyCode == 13) return false; }); I need to leave as much as much of the existing functionality in place as I can. But I need to disable this for my &lt;textarea&gt;. (It appears mine is the only &lt;textarea&gt; on the page. But how can I do this? I thought about adding .not('textarea') to the selector above. But that doesn't work because the handler is on the form, which is not a textarea. I can I exclude &lt;textarea&gt;s from the filter above?
has comment: http://stackoverflow.com/comment/38151885
answer count: 4
has answer: http://stackoverflow.com/a/24619144
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38151858
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/24619096
has answer: http://stackoverflow.com/a/24619096
downvote count: 0
has comment: http://stackoverflow.com/comment/38151804
tagged with: javascript
has answer: http://stackoverflow.com/a/24619094
tagged with: jquery

http://stackoverflow.com/comment/38154174
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24620128
has text: Not sure if this [helps](http://stackoverflow.com/questions/17283697/angularjs-how-to-find-using-jqlite)?

http://stackoverflow.com/q/24675555
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24675757
has body: I have this script: &lt;script&gt; function selectModSetProd(prodId,setId,objControl){ function ifOK(r){ objControl.style.background="'"+r.color+"'"; } function ifError(e){ alert('An error occurred when making the request: '+e.statusText); } function petition(prodId,setId,objControl){ var data = { prod: prodId, set: setId, }; var post = $.post("sql.php", data, ifOK, 'json'); post.error(ifError); } var set = objControl.value; if(confirm("Are you sure to start "+set+"?")) petition(prodId,setId,objControl); } &lt;/script&gt; In laravel 4, but I have this error: "Uncaught TypeError: Cannot read property 'post' of undefined " Someone could help me with this error please?
has comment: http://stackoverflow.com/comment/38257131
tagged with: laravel
type: AnsweredQuestion
has title: Laravel 4 - Uncaught TypeError: Cannot read property 'post' of undefined
has comment: http://stackoverflow.com/comment/38257115
has answer: http://stackoverflow.com/a/24705561
accepted answer: http://stackoverflow.com/a/24705561
has comment: http://stackoverflow.com/comment/38257436
type: Question
tagged with: laravel-4
has answer: http://stackoverflow.com/a/24675757
tagged with: javascript

http://stackoverflow.com/a/24728977
score: 0
has body: You could follow the same strategy in AS3. The main differences would be: To access an element on the stage, instead of document.getElementById("elementId") you would use: this["instanceName"] The property name for the content of the text field isn't value. The property is called text.
type: Answer
answers question: http://stackoverflow.com/q/24727791

http://stackoverflow.com/comment/38262306
comment on: http://stackoverflow.com/a/24678259
has text: Does not work. I cannot manipulate the value of the dropdown items, only their text. However I tried both and neither work.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38159817
score: 0
has text: Depending on your situation, you could also just generate a string with the html and append that all at once.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24623206

http://stackoverflow.com/comment/38156003
comment on: http://stackoverflow.com/a/24602056
score: 0
type: AnswerComment
type: Comment
has text: my bad, see updated answer, if your authors is in root level of your view model, refer it with $root.authors. And $data is not needed to refer AuthorId in current context.

http://stackoverflow.com/a/24715831
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24715702
has body: Data probably are get from server by javascript using web socket so normal tools can't handled this - maybe with headless browser like Selenium you could get that data.

http://stackoverflow.com/comment/38265695
comment on: http://stackoverflow.com/a/24662205
has text: Here is the updated fiddle, it now allows for overflow scrolling and applies a different CSS styling to alternating rows. http://jsfiddle.net/3rqC7/5/
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/24729432
has comment: http://stackoverflow.com/comment/38364895
has body: I want to drag and drop the box1, box2, box3, box4 but it is not working. I think there is something wrong with the JavaScript function . May i know what can i add or change to make the box drag-gable and can drop? Everything is in a php file. Inside the html In JavaScript. { document.getElementById("box1").innerHTML=""+shuffling[0]; document.getElementById("box2").innerHTML=""+shuffling[1]; document.getElementById("box3").innerHTML=""+shuffling[2]; document.getElementById("box4").innerHTML=""+shuffling[3]; } function allowDrop(ev){ ev.preventDefault(); } function dragWord(dragEvent){ dragEvent.dataTransfer.setData("Text", dragEvent.target.textContent+"|"+dragEvent.target.parentNode.id); } function dropWord(dropEvent){ var dropData = dropEvent.dataTransfer.getData("Text"); var dropItems = dropData.split("|"); var prevElem = document.getElementById('body'); prevElem.getElementsByTagName('head')[0].textContent = dropEvent.target.textContent; dropEvent.target.textContent = shuffling[0]; dropEvent.preventDefault(); }
type: Question
has comment: http://stackoverflow.com/comment/38381018
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38360323
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has title: Drag and drop HTML5 using JavaScript
has comment: http://stackoverflow.com/comment/38395817
favorite count: 0
answer count: 0
type: UnansweredQuestion
score: 1

backbone.js-collections
tags question: http://stackoverflow.com/q/24624185
tag name: backbone.js-collections
type: Tag

http://stackoverflow.com/a/53706029
score: 1
type: Answer
has body: Use async and await (es6): function taskAsync(paramets){ return new Promise((reslove,reject)=&gt;{ //your logic after reslove(respoce) or reject(error) }) } async function fName(){ let arry=['list of items']; for(var i=0;i&lt;arry.length;i++){ let result=await(taskAsync('parameters')); } }
upvote count: 1
answers question: http://stackoverflow.com/q/24660096
downvote count: 0

http://stackoverflow.com/comment/38321459
type: QuestionComment
comment on: http://stackoverflow.com/q/24709336
type: Comment
has text: You probably want to have a look at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain. You can't "inherit" local variables (whatever that is supposed to mean anyway).
score: 0

http://stackoverflow.com/comment/38248461
score: 0
type: AnswerComment
has text: Thanks. Here I was thinking my entire understanding of javascript was fundamentally wrong again.
type: Comment
comment on: http://stackoverflow.com/a/24670890

http://stackoverflow.com/comment/38285290
score: 2
type: AnswerComment
type: Comment
has text: Really appreciated mate. It is working and showing results which I was looking for. You have saved my life!! To be honest I'm not good in maths, so I am looking for another favour i.e. if you can help me understand the values like what is in **var ky, kx** or would be great if you can **comment the code**. In JSfiddle example you took 10 as km but is it really acting as **km** or **meters**?
comment on: http://stackoverflow.com/a/24680708

http://stackoverflow.com/a/24615886
accepted answer of: http://stackoverflow.com/q/24615702
has comment: http://stackoverflow.com/comment/38148274
has comment: http://stackoverflow.com/comment/38146017
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/24615702
has body: You are being caught out by the asynchronous nature of Ajax. Ajax does not work in a procedural manner, unfortunately. Your success method is called as and when the Ajax request has completed, which depends on your internet connection speed and how busy the server is. It is entirely possible, the javascript completes its each loop and the first ajax request is still sending or waiting for a response. By when the javascript is ready to do a window.location call. Edit: Added code to check the number of forms, and the number of ajax requests, once they have all run, it will redirect $(document).ready(function () { (function (){ var id = $(document).data('campaign_id'); var numForms = $('form').length; var numAjaxRequests= 0; $(document).on('click', '#save-button', function () { $('form').each(function (){ var data = new FormData(this); var form = $(this); if(!form.parent().hasClass('hideme')) { $.ajax({ url: form.attr('action'), type: 'POST', data: data, mimeType:"multipart/form-data", contentType: false, cache: false, processData:false, success: function(data, textStatus, jqXHR) { console.log('form submitted '+count); numAjaxRequests++; if(numAjaxRequests == numForms) { window.location.replace('/campaign'); } } }); } }); }); })(); //end SIAF });//end document.ready
type: Answer

http://stackoverflow.com/comment/110927255
type: AnswerComment
has text: @PriyaRanjanSingh To be honest, I do not know of any drawbacks, but I am by no means an expert on this. I discovered this method after researching as I found the other methods unweildly and I was after cleaner more understandable code for my own benefit. Hopefully someone more knowledgeable than myself will be able to highlight if there are any drawbacks.I have been using this method without any issue though for a while now and it seems to work well.
score: 1
type: Comment
comment on: http://stackoverflow.com/a/62169321

http://stackoverflow.com/q/24697545
linked to: http://stackoverflow.com/q/24697305
has comment: http://stackoverflow.com/comment/38298290
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/24697764
has comment: http://stackoverflow.com/comment/38298950
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38298566
type: Question
has comment: http://stackoverflow.com/comment/38299043
has title: Prevent click on outer li while clicking on inner link
upvote count: 2
answer count: 2
linked to: http://stackoverflow.com/q/16492254
has comment: http://stackoverflow.com/comment/38298884
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24697646
favorite count: 0
has comment: http://stackoverflow.com/comment/38298050
has body: I have some lis including a links as below SomeText sometext I am using a third party library ('LightGallery') that adds click event on Li, and by Jquery I have add click event to the links to show a dialog. The problem is when I click on link both click event will be fired, my click event handler is $('body').on("click", 'a.entityDetailModal', function (event) { event.preventDefault(); event.stopPropagation(); loadDialog(this, event, '#mainContainer', true, true, false); return false; }); I tried event.stopPropagation() and event.preventDefault(); and return false; in link onclick event handler but they don't work. Sample:http://jsfiddle.net/HuKab/30/ How can I overcome this? Update It seems the problem is the way I add click event handler, using this way it seems that everything is ok $('a.entityDetailModal').click(function (event) { event.preventDefault(); event.stopPropagation(); loadDialog(this, event, '#mainContainer', true, true, false); return false; }); Update 2 Thanks @Huangism, this post stackoverflow.com/questions/16492254/pros-and-cons-of-using-e-stoppropagation-to-prevent-event-bubbling is explaining the reason.
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24725103
has comment: http://stackoverflow.com/comment/38351694
has answer: http://stackoverflow.com/a/24725419
has comment: http://stackoverflow.com/comment/38351884
tagged with: local-storage
type: Question
has title: Cache each JSON search query with localStorage
linked to: http://stackoverflow.com/q/17104265
has body: THE PROMPT: We have a search that connects to an JSON API url. The search query is inside the url, and the API generates a new JSON file for every search term. We also cannot rely on the browser to cache for us, and we can't use PHP or server side caching; we need to use HTML5 LocalStorage (and we don't care that IE7 can't use it) We need to cache every new JSON file for every new search. We want to cut down on requests per minute, so we want to use a cached version of the JSON file for repeated search terms. WHERE I'M STUCK: What has made this difficult is caching a JSON file for each new/different search term. I have been able to cache the first search, but then all subsequent searches use the same cached JSON. We need help rewriting this so each time a new search is made, it checks to see if the term was searched for previously and if so, grabs the corresponding JSON file. Then of course if the search term is new then cache a new JSON file for that specific search term. WHAT I'VE TRIED: In my research I've seen a lot of very complicated solutions and I can't seem to get my head completely around all of it, some of these solutions almost worked, I think I just need a better explanation for this specific case. I think this is the answer but I don't know how to apply it to my situation: jQuery deferred ajax cache This is crazy and it almost works, it writes into the console when it recognizes that I've searched the same thing again, and it does stop a new request, but unfortunately the cached JSON isn't there, it returns no results. Caching a jquery ajax response in javascript/browser WHAT I HAVE SO FAR: MY PSUEDO CODE: var searchTerm = WHATEVER IS TYPED INTO THE SEARCHBOX // The JSON file var url = 'https://api.example.com/fake/json/path/{'+searchTerm+'}'; // Local Storage Caching Promise var cachedData = localStorage.getItem("cachedData"), def = $.Deferred(); if (!cachedData) { def = $.getJSON(url, function(data) { cachedData = data; localStorage.setItem("cachedDa…
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
tagged with: caching
tagged with: search
score: 0
has comment: http://stackoverflow.com/comment/38351645
answer count: 1
has comment: http://stackoverflow.com/comment/38351985
has comment: http://stackoverflow.com/comment/38351869
has comment: http://stackoverflow.com/comment/38352074
linked to: http://stackoverflow.com/q/8960243
type: UnansweredQuestion

http://stackoverflow.com/comment/38335979
type: Comment
has text: Frankly, I'd go with SVG rather than make complicated shapes with messy extra divs & CSS.
score: 0
comment on: http://stackoverflow.com/q/24716980
type: QuestionComment

http://stackoverflow.com/comment/38315719
score: 0
type: AnswerComment
type: Comment
has text: .............. I watched that video at least 4 times! And with the code I wrote up, it makes a smooth scroll. Maybe the problem is related to different jQuery versions... I don't know.
comment on: http://stackoverflow.com/a/24706483

http://stackoverflow.com/comment/38144411
type: AnswerComment
has text: Oh wow, I just asked such a stupid question. Your solution worked perfectly, thank you!
type: Comment
comment on: http://stackoverflow.com/a/24614994
score: 0

http://stackoverflow.com/comment/38324033
type: Comment
score: 0
has text: Thank you for your help! I have been working on this since I posted - your tips will definitely help.
type: AnswerComment
comment on: http://stackoverflow.com/a/24709832

http://stackoverflow.com/a/24738805
answers question: http://stackoverflow.com/q/24738336
has comment: http://stackoverflow.com/comment/38388799
has comment: http://stackoverflow.com/comment/104006750
type: Answer
has body: I think the trickiest part here is dealing with whatever margin the browser will put on the page when it goes to print. Not sure if you can control that. But if you can, try using in as your sizing unit instead of something like px or em. Then, if you calculate that you're going to go over 11in with what you've got, add your page break. Here's a pseudo-code algorithm: var totalHeight = page margin foreach div: totalHeight += calculated height in inches if totalHeight &gt; 11in: insert page break rinse and repeat for further pages
has comment: http://stackoverflow.com/comment/38390159
score: 0

http://stackoverflow.com/comment/38224722
has text: @TCHdvlp No, it's normally there. This is just an extract of the code I thought was appropriate to the question. Should I include it all next time? Sorry! Cheers :)
comment on: http://stackoverflow.com/q/24657421
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24620914
score: 0
answer count: 1
has title: Adobe string to Javascript object
accepted answer: http://stackoverflow.com/a/24620981
tagged with: adobe
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24620981
type: Question
has body: im doing this all through adobe's extend tool kit and i dont have access to JSON which i'd use stringify and parse i need to be able to read a file which comes in as a string and convert it to an object and spit it back out the data that gets read in looks like this and needs to be spit out like this in order for my python script that also reads these files to eval it back to a dictionary data = '{"Other": 0.003986666666136848, "last": {"project": "0414_007_Breakdance_Sample_CINEMATIC", "time": 1400678804.523}, "0414_007_Breakdance_Sample_CINEMATIC": 0.00026972221003638376}' obviously(maybe not) it needs to convert to this: data = {"Other": 0.003986666666136848, "last": {"project": "0414_007_Breakdance_Sample_CINEMATIC", "time": 1400678804.523}, "0414_007_Breakdance_Sample_CINEMATIC": 0.00026972221003638376} which just doesn't have the single quotes i'm not sure how to go about doing this unless i create my own function that seperates and puts it back to an object and yadda yadda thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/38155521

http://stackoverflow.com/comment/38396826
comment on: http://stackoverflow.com/a/24714714
score: 0
type: AnswerComment
has text: What's not working? Any error message? We can't help you if you don't tell us what's wrong.
type: Comment

http://stackoverflow.com/a/24725575
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24724653
upvote count: 3
has comment: http://stackoverflow.com/comment/38367921
has comment: http://stackoverflow.com/comment/38362446
has comment: http://stackoverflow.com/comment/38360038
score: 3
has body: You can calculate area under parametric curve using formula A = Integral[t0..t1] (y(t)*x'(t)*dt) For cubic Bezier: (I don't sure what kind of Bezier curve you are using) Area = Integral[0..1](y(t)*x'(t)*dt)= Integral[0..1]( (P[0].Y*(1-t)^3+3*P[1].Y*t*(1-t)^2+3*P[2].Y*t^2*(1-t)+P[3].Y*t^3)* (P[0].X*(1-t)^3+3*P[1].X*t*(1-t)^2+3*P[2].X*t^2*(1-t)+P[3].X*t^3)'* dt) You have to expand the brackets, differentiate the second line expression, multiply expressions, and integrate the result Maple work (it is hard to copy text without distortions): Note that some expressions are used many times

http://stackoverflow.com/comment/38160977
has text: Make sure that element with id = container is present and the JSON variable processed_json is initialized properly.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24606570

http://stackoverflow.com/comment/38190439
has text: Thanks for the for-loop, I try not to ask such trivial questions, was hoping I was missing some proto function like `forEach`.
comment on: http://stackoverflow.com/a/24639527
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24631917
tagged with: ajax
has comment: http://stackoverflow.com/comment/38175610
answer count: 3
favorite count: 0
has comment: http://stackoverflow.com/comment/38175586
score: -3
has comment: http://stackoverflow.com/comment/38175645
has answer: http://stackoverflow.com/a/24632425
tagged with: php
has comment: http://stackoverflow.com/comment/38175548
type: AnsweredQuestion
has body: I have a cart with products in it. I have a delete button for each product. What I want is to execute mysql_query: mysql_query("DELETE FROM bim_cart WHERE coupon_id = '{$_GET['delete']}' AND session_code = '{$_SESSION['code']}'"); Code for button: &lt;div class="remove"&gt; &lt;a href="&lt;?php echo $address . '/index.php?lang=lv&amp;page=cart&amp;delete=' . $item['id'];?&gt;" class="color2"&gt; &lt;i class="fa fa-trash-o fa-fw color2"&gt;&lt;/i&gt; &lt;/a&gt; It is possible to do without reloading page, but refresh information?
downvote count: 3
tagged with: mysql
type: Question
has title: Execute mysql_query with jQuery
possible better answer: http://stackoverflow.com/a/24632075
has answer: http://stackoverflow.com/a/24634131
has answer: http://stackoverflow.com/a/24632075
upvote count: 0
accepted answer: http://stackoverflow.com/a/24632425
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38274521
comment on: http://stackoverflow.com/q/24684580
score: 1
has text: Too much code, is it really all relevant to the question?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38158588
has text: because it is invalid html to echo text in `head`. Need to rethink what you are returning
comment on: http://stackoverflow.com/a/24622159
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24607510
tagged with: javascript
has title: cannot post form in node.js express
tagged with: express
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38128718
favorite count: 0
has comment: http://stackoverflow.com/comment/38128765
type: UnansweredQuestion
has body: I am very much beginner with node.js. There is a sample form with that I am trying to insert values in database- Here is my test page- &lt;form action="/create" method="POST" class="form-horizontal" enctype="application/x-www-form-urlencoded"&gt; &lt;input type="text" id="username_input" name="username"&gt; &lt;input type="text" id="password_input" name="password"&gt; &lt;input type="submit" name="Submit" value="Insert" class="btn"&gt; &lt;/form&gt; Trying to post it- I created test.js file and writing post method in it- exports.list = function (req, res) { req.getConnection(function (err, connection) { console.log(con) app.post("/create", function (req, res) { var username = req.body.username, password = req.body.password; console.log(username); console.log(password); connection.query('INSERT INTO users(email,password) VALUES', (username, password), function (err, rows) { if (error) { console.log(error.message); } else { console.log('succes'); } }); }); }); } But this didn't work. I tried writing post method in main server.js file also- app.post("/create", function (req, res) { var username = req.body.username, password = req.body.password; console.log(username); console.log(password); connection.query('INSERT INTO users(email,password) VALUES', (username, password), function (err, rows) { if (error) { console.log(error.message); } else { console.log('succes'); } }); }); but this didn't work also. I am following current settings in server.js file- /** * Module dependencies. */ var express = require('express') , routes = require('./routes') , index_form = require('./routes/index_form') , user = require('./routes/user') , test = require('./routes/test') , mysql = require('mysql') , http = require('http') , path = require('path') , mongoose = require('mongoose'); var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: 'pass@123' }); var app =express(); app.configure(function () { app.set('port', process.env.PORT || 3000); app.set('views', …
tagged with: node.js
has comment: http://stackoverflow.com/comment/38129397
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/24638254

http://stackoverflow.com/a/24591697
accepted answer of: http://stackoverflow.com/q/24591140
type: Answer
upvote count: 16
score: 16
has body: Yes, that is fine... but the string name of the Users class is not Users, it's "_Users".. better still: new Parse.Query(Parse.User); var userQuery = new Parse.Query(Parse.User); userQuery.ascending("createdAt"); But... Your user class should not be user queryable. This should be locked down in the class-level permissions section of the data browser, and only Cloud Code using the Master Key should be able to query users.
answers question: http://stackoverflow.com/q/24591140
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24699624
has answer: http://stackoverflow.com/a/24701021
tagged with: content-tag
has title: Polymer: How to watch for change in <content> properties
possible better answer: http://stackoverflow.com/a/24700545
type: Question
tagged with: polymer
upvote count: 5
tagged with: javascript
answer count: 2
tagged with: web-component
accepted answer: http://stackoverflow.com/a/24701021
downvote count: 0
favorite count: 0
score: 5
tagged with: http://stackoverflow.com/tag/html
has body: I'm just starting to learn Polymer. Here is a generic version of my polymer element: <polymer-element name="my-element"> my element <polymer-element> The content tags are both being filled with another custom element (again slightly simplified): <polymer-element name="in-element" attributes="title"> {{title}} <polymer-element> What I want to be able to do is call a function in my-element when the title attribute in (any) in-element (put in the content tag) is changed (by a click event or whatever). I'm not sure how to access this using observe or if I need to use mutationObserver, etc. How is this done/Is it possible?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24700545

http://stackoverflow.com/a/24708362
score: 0
answers question: http://stackoverflow.com/q/24708165
type: Answer
has body: You can use this pattern that uses the fact that "#end" is at the start of a line: /# userid name uniqueid connected ping loss state rate\n((?:.*\n)*?)#end/ But an other efficient way is to split the log into lines and to look at the start and end lines in the resulting list.

http://stackoverflow.com/comment/38375025
comment on: http://stackoverflow.com/a/24684710
score: 0
has text: jrouillard, please know that I really appreciate all your help. I think I may be zeroing-in on the problem. Perhaps JS does not know I want to work with floats? So, following the bouncing ball: ` `, then `read_ratio = pendulum.elements.read_ratio;`, then `const0 = parseFloat(read_ratio);`, then `T = 2 * pi * Math.sqrt(Math.pow(const0.toFixed(1), -1));`, then `result = T.toFixed(2);`, and finally `document.getElementById('output').innerHTML = result;`.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/24701116
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38305398
score: 1
accepted answer of: http://stackoverflow.com/q/24700774
has comment: http://stackoverflow.com/comment/38305588
answers question: http://stackoverflow.com/q/24700774
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/38308832
has comment: http://stackoverflow.com/comment/38306826
has comment: http://stackoverflow.com/comment/38305326
has body: It looks like the call to regex.test(localcat) is eating the first match of the regex. If you remove this line prior to the loop calling regex.exec(localcat) it should include the first match in the loop. var match, regex = /^([a-zA-Z]*): (.*)(?:\s)([^co]+) ([^\s]+) (\w*)$/gm, localcat = ((reader.result).split("\n").reverse().join("\n")); // This line eats the first match of the regex // alert(regex.test(localcat)); while ((match = regex.exec(localcat)) !== null){ alert(match[0]); if(match[1]==="SEVERE"){ document.getElementById("hey").innerHTML+= ("Time: " + match[3] + "&lt;br/&gt;"); } } The description for RegExp.prototype.test() states: As with exec (or in combination with it), test called multiple times on the same global regular expression instance will advance past the previous match.

fill
tags question: http://stackoverflow.com/q/24691066
tag name: fill
type: Tag

http://stackoverflow.com/comment/38330342
type: Comment
type: QuestionComment
has text: Where are missing fields stored in object.data field or only in returned object itself?
comment on: http://stackoverflow.com/q/24703831
score: 0

http://stackoverflow.com/comment/38381576
comment on: http://stackoverflow.com/a/24740856
type: Comment
has text: I didn't mean only this line. You have to keep all your data in double, set the new position, and compute the next one based on the double data and not on the new integer positions.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38199882
has text: really not clear what the question is
comment on: http://stackoverflow.com/q/24644490
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/38216664
type: Comment
has text: so while accessing a member variable of `$scope`, it resolves to `$scope.$parent`, but while writing to a member variable of `$scope`, it creates a new one, is this the same behavior as plain JS prototypal inheritance?
comment on: http://stackoverflow.com/a/24637347
score: 0
type: AnswerComment

http://stackoverflow.com/comment/56648531
score: 0
type: QuestionComment
type: Comment
has text: Possible duplicate of [angular $q, How to chain multiple promises within and after a for-loop](http://stackoverflow.com/questions/21024411/angular-q-how-to-chain-multiple-promises-within-and-after-a-for-loop)
comment on: http://stackoverflow.com/q/24647749

http://stackoverflow.com/q/24647482
has answer: http://stackoverflow.com/a/24647838
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38206158
tagged with: css
tagged with: onload
has body: i am a newb to jquery i have a metro (horizontal layout) first one 1 two 2 second one 1 two 2 third one 1 two 2 The page on ready should start from the third section for that there should be an animation from right to left on the page loads or ready here is the example which is been done if anybody could help!! it will be really great and here is the link for the metro design i am using megametro here is the link for it http://themes.grozav.com/metromega/
has title: on load scroll automatically to div on left in horizontal layout
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38205889
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/38374661
type: AnswerComment
has text: Found it! Doesn't matter what's in the jQuery selector, you just need to have a jQuery object to access the method `.ready()`, then it use a promise and run the function. [Here the revelant part for binding](https://gist.github.com/kagagnon/a13de27760ba1af883c0#file-gistfile1-js-L269) and [here's the revelant par for the resolving promise](https://gist.github.com/kagagnon/a13de27760ba1af883c0#file-gistfile1-js-L917)
type: Comment
comment on: http://stackoverflow.com/a/24736862
score: 1

http://stackoverflow.com/comment/38243547
type: Comment
has text: You can use an array and http://stackoverflow.com/q/16339635/218196. Either way, what *exactly* are you having problems with? You must have tried something.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24667020

http://stackoverflow.com/comment/38117637
comment on: http://stackoverflow.com/q/24601428
type: Comment
type: QuestionComment
has text: I did know that. Just to clarify I am not asking how to accomplish this task as I already have one valid solution using forEach. Rather I am hoping to understand the discrepancy between to methods that should be equivalent
score: 0

http://stackoverflow.com/comment/38385851
type: QuestionComment
comment on: http://stackoverflow.com/q/24740666
has text: I think you need to isolate your code, you can't really expect people to trawl through lots of code. It sounds like you are describing 'gimbal lock' http://en.wikipedia.org/wiki/Gimbal_lock and http://www.youtube.com/watch?v=zc8b2Jo7mno If so, there's a couple of different ways to get around it. None are for the faint hearted without some library, and you may want to look into quaternions.
score: 1
type: Comment

http://stackoverflow.com/a/24652779
has body: Also you will have to update first element anchor: HTML America click me India click me Russia click me Germany click me JS (Same as already suggested) $(".press_me").on('click', function (event) { event.preventDefault(); alert($(this).parent().html()); }); JSFIDDLE DEMO
has comment: http://stackoverflow.com/comment/38215024
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24652653
has comment: http://stackoverflow.com/comment/38217049

http://stackoverflow.com/comment/38155438
has text: On form submit. This JS appears within `jQuery("#form").submit(function() {`
comment on: http://stackoverflow.com/q/24620878
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38363147
type: QuestionComment
has text: I'd really suggest using a single quote instead of escaping the double quote for readability….
type: Comment
comment on: http://stackoverflow.com/q/24722356
score: 0

http://stackoverflow.com/a/24689222
type: Answer
answers question: http://stackoverflow.com/q/24689165
has body: I think we should just put it into simple terms like this if () { } else { } or if () { } else if () { } else if () { } else () { } there isnt semi colons ; after the (), in fact you can most likely just skip all the semi colon in javascript since it will be automatically added, i normaly only puts one right in the beginning of a js file like this ;(function(){})() the other time you would needed is in a loop, for ( ; i &lt; len; i++) {}
score: 0

http://stackoverflow.com/a/49865463
type: Answer
has body: It is faster to apply it directly in javascript: $('#id-element').css('display', 'block'); $('#id-element').css('display', 'none');
answers question: http://stackoverflow.com/q/24594878
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/86747754
score: 0

http://stackoverflow.com/a/24671134
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24671034
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24671034
has comment: http://stackoverflow.com/comment/38248824
score: 1
has body: this.parentNode.getElementsByClassName('myimg2')[0] Demo: http://jsfiddle.net/ENQFX/

jquery-effects
tags question: http://stackoverflow.com/q/24728111
type: Tag
tag name: jquery-effects

http://stackoverflow.com/comment/38204659
type: Comment
has text: can I display graph for slice on click/hover?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24646969

http://stackoverflow.com/q/24661503
has answer: http://stackoverflow.com/a/24662205
has body: I have following structure in a web page: Suggestions Provide Suggestions for users Need to put information I am using bootstrap thanks to some information that I gathered from stackoverflow. From back-end I will be sending list of images and inside above "panel_body" I want to render the images and display it as shown in below wire frame. What is the best way to accomplish this? I don't know javascript but if someone can point towards to similar example I could figure out. I have a feeling javascript can accomplish this but not really sure what I should look up for.
accepted answer: http://stackoverflow.com/a/24662205
tagged with: css
possible better answer: http://stackoverflow.com/a/24661630
tagged with: twitter-bootstrap
has title: Rendering list of items (images) and put in html panels (use javascript etc)
has comment: http://stackoverflow.com/comment/38231616
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/24661826
has answer: http://stackoverflow.com/a/24661630
type: Question
score: 0
answer count: 3
tagged with: jquery

http://stackoverflow.com/comment/38251149
comment on: http://stackoverflow.com/q/24588357
has text: hi, I edited the post.. added link to the Bar Chart.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38312501
has text: And what's your reason for doing this? (Besides making life harder?)
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24704843

http://stackoverflow.com/a/24687762
answers question: http://stackoverflow.com/q/24687344
has comment: http://stackoverflow.com/comment/38591260
score: 2
has comment: http://stackoverflow.com/comment/38580856
downvote count: 0
has comment: http://stackoverflow.com/comment/38582324
upvote count: 2
has comment: http://stackoverflow.com/comment/38580893
has comment: http://stackoverflow.com/comment/38581331
has comment: http://stackoverflow.com/comment/38280695
type: AcceptedAnswer
has body: you can apply a trasformation on your path like so: <animate attributeType="XML" attributeName="stroke-dashoffset" from="0" to="600" dur="2s" repeatCount="1" fill="freeze"/> http://jsfiddle.net/46mH2/1/ The rotation transformation will make it start at 12o'clock and the translate will offset it half the stroke-width so it is inside the viewbox. Make sure you apply the transformation in the right order or you won't get the same result. Update yes, you can avoid both transformations: <animate attributeType="XML" attributeName="stroke-dashoffset" from="0" to="600" dur="2s" repeatCount="1" fill="freeze"/> http://jsfiddle.net/46mH2/3/ set a viewBox on your svg so you can scale the element and still get the whole image visible: <animate attributeType="XML" attributeName="stroke-dashoffset" from="0" to="600" dur="2s" repeatCount="1" fill="freeze"/> If you're not scaling it proportionally check for the use of preserveAspectRatio to see which one suits you
has comment: http://stackoverflow.com/comment/38595424
has comment: http://stackoverflow.com/comment/38582180
type: Answer
accepted answer of: http://stackoverflow.com/q/24687344

http://stackoverflow.com/a/24635673
type: Answer
upvote count: 1
has body: I've updated your fiddle with submit buttons that are hidden if javascript is enabled. Any status ▾ Status 1 Status 2 Any date ▾ Date 1 Date 2 Filtered results go here
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24635355

http://stackoverflow.com/comment/103602211
comment on: http://stackoverflow.com/a/24761865
score: 0
type: AnswerComment
type: Comment
has text: What if I don't have carriage returns?

http://stackoverflow.com/a/24642096
has body: I think you can stopPropagation of the click event in capturing phase of the event. Then you don't have to bind click event to each child link: document.getElementById("asd").addEventListener("click", function(e) { e.stopPropagation(); }, true); Demo: http://jsfiddle.net/QB698/1/
score: 1
accepted answer of: http://stackoverflow.com/q/24642021
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38195487
answers question: http://stackoverflow.com/q/24642021
type: Answer
upvote count: 1

http://stackoverflow.com/comment/38100811
type: AnswerComment
comment on: http://stackoverflow.com/a/24591707
type: Comment
score: 1
has text: Well, I'll mark you as the best answer since you partially fixed it for me, but I found the problem! I accidentally mistyped the casing in `new XMLHttpRequest()`!!! I want to facedesk myself into oblivion now.

http://stackoverflow.com/a/24623890
has comment: http://stackoverflow.com/comment/38161378
has body: The way you are doing it is not client side but here is how I would do it ASP Markup &lt;asp:Table runat="server" name="EmployeesTable"&gt; &lt;asp:TableRow&gt; &lt;asp:TableCell&gt;First Name&lt;/asp:TableCell&gt; &lt;asp:TableCell&gt;Last Name&lt;/asp:TableCell&gt; &lt;asp:TableCell&gt;Phone&lt;/asp:TableCell&gt; &lt;/asp:TableRow&gt; &lt;table&gt; Code Behind Now you should put this in the page load event, in addition you can wrap it in a if statement to check for postBack If Not Page.IsPostBack Then for each item in employees Dim tr = New TableRow() Dim tdFname = New TableCell() Dim tdLname = New TableCell() Dim tdPhone = New TableCell() tdFname.Text = item.FirstName tdLname.Text = item.LastName tdPhone.Text = item.Phone tr.Cells.Add(tdFname) tr.Cells.Add(tdLname) tr.Cells.Add(tdPhone) EmployeesTable.Add(tr) next End If
has comment: http://stackoverflow.com/comment/38161276
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38161321
type: Answer
answers question: http://stackoverflow.com/q/24623365
score: 1

http://stackoverflow.com/q/24602098
has title: Drag and lock inside of the parent
has answer: http://stackoverflow.com/a/24602275
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24602269
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38118934
has body: Online sample http://jsfiddle.net/dhCLd/ A simple drag magnify, (function($) { $.fn.drag = function(opt) { opt = $.extend({ handle: "", cursor:"move"}, opt); if(opt.handle === "") { var $el = this; } else { var $el = this.find(opt.handle); } return $el.css('cursor', opt.cursor).on("mousedown", function(e) { if(opt.handle === "") { var $drag = $(this).addClass('draggable'); } else { var $drag = $(this).addClass('active-handle').parent().addClass('draggable'); } var z_idx = $drag.css('z-index'), native_width = 0, native_height = 0; $drag.css('z-index', 1000).parents('.magnify').on("mousemove", function(e) { if(!native_width &amp;&amp; !native_height){ var image_object = new Image(); image_object.src = $(".small").attr("src"); native_width = image_object.width; native_height = image_object.height; }else{ var magnify_offset = $drag.parents('.magnify').offset(); var mx = e.pageX - magnify_offset.left; var my = e.pageY - magnify_offset.top; var rx = Math.round(mx/$(".small").width()*native_width - $drag.width()/2)*-1; var ry = Math.round(my/$(".small").height()*native_height - $drag.height()/2)*-1; var px = mx - $(".large").width()/2; var py = my - $(".large").height()/2; var bgp = rx + "px " + ry + "px"; $('.draggable').css({left:px, top:py, backgroundPosition: bgp}).on("mouseup", function() { $(this).removeClass('draggable').css('z-index', z_idx); }); } }); e.preventDefault(); }).on("mouseup", function() { if(opt.handle === "") { $(this).removeClass('draggable'); } else { $(this).removeClass('active-handle').parent().removeClass('draggable'); } }); } })(jQuery); How can I make the "magnify" stops at the edges around the .small` image, if outside of the image then undraggable. If someone could help?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24602269
accepted answer: http://stackoverflow.com/a/24602275
type: Question

http://stackoverflow.com/comment/38378386
type: QuestionComment
has text: Unfortunately, asking for JavaScript tutorials is off-topic here - StackOverflow is for actual code question. That other post is left on the site only for historic reference.
comment on: http://stackoverflow.com/q/24738274
score: 0
type: Comment

http://stackoverflow.com/comment/38750400
has text: Yes! I will put the explanation soon. Sorry for the time it is taking me.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24715413
type: QuestionComment

http://stackoverflow.com/a/24589078
answers question: http://stackoverflow.com/q/24588942
has body: because you are using return $(".popover-content").html(); which gets the html of the first element with class .popover-content You need to get the .popover-content element relative to the element that triggered the event. The content callback will have the context of the anchor so you can just wrap it in a jQuery object and use .next: content: function() { return $(this).next(".popover-content").html(); } JSFiddle Demo
type: AcceptedAnswer
score: 4
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24588942

http://stackoverflow.com/comment/38180815
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24615966
has text: Ok it's there! But the js files aren't in the theme folder. It's not loading http://test.greatarchitect.us/wp-content/themes/buddyboss/js/iframe.js?ver=1.0.0

http://stackoverflow.com/q/24641427
upvote count: 2
has answer: http://stackoverflow.com/a/24642540
has comment: http://stackoverflow.com/comment/38193964
has title: Why need apply in memoization function?
type: Question
has comment: http://stackoverflow.com/comment/38194032
linked to: http://stackoverflow.com/q/22578831
accepted answer: http://stackoverflow.com/a/24642540
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I've been toyin with concept of memoization and there are obviously different implementations of it. I put this together and it seems to work fine: Function.prototype.memoized = function(a) { debugger if (typeof cache === "undefined") cache = []; if (cache[a]) { return cache[a]; } else { cache[a] = this(a); return cache[a]; } } Function.prototype.memoize=function() { t=this; return function() { // Resig seems to use this: return t.memoized.apply(t,arguments); // why not simple this: //return t.memoized(arguments[0]); } } myTest = (function fibonacci(n) { return n &lt; 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); }).memoize(); console.log(myTest(2)); My question is however why in some implementations I see return t.memoized.apply(t,arguments); rather than simple return t.memoized(arguments[0]); inside of proptotype.memoize? I cannot see any advantage apart from passing multiple arguments which are not used anyway. I there any advantage to apply? EDIT: Updated the code and I believe this takes care of major problems so cache as global on window (what was I thinking??) and recursive fibonacci not memoizing calls to itself. Are there any other major issue with my implementation? Function.prototype.memoized = function(a) { if (typeof this.cache === "undefined") this.cache = []; if (this.cache[a]) { return this.cache[a]; } else { this.cache[a] = this(a); return this.cache[a]; } } Function.prototype.memoize=function() { t=this; return function() { //return t.memoized.apply(t,arguments); return t.memoized(arguments[0]); } } myTest = (function fibonacci(n) { //return a * 3; return n &lt; 2 ? n : fibonacci.memoized(n - 1) + fibonacci.memoized(n - 2); }).memoize(); console.log(myTest(2)); BTW this is learning experience for me and doing it purely for fun, it's not assignment or anything like that uni related.
tagged with: memoization
type: AnsweredQuestion

http://stackoverflow.com/comment/38212013
score: 0
has text: it's ok the problem is that i'm using express 4.x and bodyparser was replaced by busboy thanks
type: QuestionComment
comment on: http://stackoverflow.com/q/24632074
type: Comment

http://stackoverflow.com/q/24643308
has answer: http://stackoverflow.com/a/24643614
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/38198913
accepted answer: http://stackoverflow.com/a/24643614
type: AnsweredQuestion
has title: Issue with mouse coordinates using HTML5 canvas
score: 0
has body: Fairly new to JavaScript/HTML5 Canvas. Having trouble making a specific area of my background clickable so that it opens up another page. What I want to do is make a selected area of my background clickable, rather then the entire background. Adventures of Balthazar
type: Question
tagged with: canvas
tagged with: javascript

http://stackoverflow.com/comment/38313132
type: QuestionComment
comment on: http://stackoverflow.com/q/24694020
has text: @Max yes, that's exactly what I want it to do. The same data should be sent to index.php when try to come back to index.php. Nicolas: I don't need to modify history, I need to *make* that history. For example, I could submit form to index.php and then somehow redirect to handler.php with the same URL params. This way, back button would take me back to `index.php?input=some+data`... the problem here is that when I actually go to index.php?input=some+data it will redirect me to handler.php?input=some+data
score: 0
type: Comment

http://stackoverflow.com/q/24640233
tagged with: javascript
type: Question
answer count: 2
tagged with: performance-testing
downvote count: 0
has body: How can I create an artificially slow Javascript environment for in-browser testing on my fast Windows machine? Ultimately I'm trying to simulate lagginess and slow behavior that currently manifests in my Angular app only in iOS Safari. (No IE8 jokes, ha ha!)
favorite count: 0
has comment: http://stackoverflow.com/comment/38192034
linked to: http://stackoverflow.com/q/4673706
has answer: http://stackoverflow.com/a/24640756
has title: Create an Artificially Slow Javascript Environment?
has comment: http://stackoverflow.com/comment/93885826
type: UnansweredQuestion
upvote count: 1
duplicate of: http://stackoverflow.com/q/8521683
has answer: http://stackoverflow.com/a/24640676
linked to: http://stackoverflow.com/q/8521683
score: 1
has comment: http://stackoverflow.com/comment/38191631

http://stackoverflow.com/q/24606266
has answer: http://stackoverflow.com/a/24607124
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/24607124
has title: jquery apply strike() method to object
answer count: 1
tagged with: javascript
has body: I am able to getting the selected string value in the following way, if(!window.Kolich){ Kolich = {}; } Kolich.Selector = {}; Kolich.Selector.getSelected = function(){ var t = ''; if(window.getSelection){ t = window.getSelection(); } return t; } Kolich.Selector.mouseup = function(){ var st = Kolich.Selector.getSelected(); // alert(typeof(st)) //showing object var data = st.toString(); data.strike(); } But i need to apply strike() method to the selected string.
type: AnsweredQuestion

http://stackoverflow.com/comment/38381839
type: QuestionComment
comment on: http://stackoverflow.com/q/24739710
type: Comment
has text: Apparently tr does not need to be wraped around th This is code copied from source. table has a heading and then has one row in 2nd case
score: 0

http://stackoverflow.com/a/24717953
has body: I don't run your code, but if you use method Array#filter, context is changed, so this in categoryTextMatches in not Model, but this.question category. For protection use in Model#constructor: return Model.extend({ constructor: function () { _.bindAll(this, 'categoryTextMatches'); } });
has comment: http://stackoverflow.com/comment/38393267
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/38393319
answers question: http://stackoverflow.com/q/24706800

http://stackoverflow.com/a/24730105
has body: You can add resources dynamically if required one is not available. for eg:
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24730021

http://stackoverflow.com/q/24723206
favorite count: 0
upvote count: 0
has body: I am using this code: But when I click on my picture, a black window is shown although I have some white text as this: Today is sunday! What's wrong? Thanks in advance.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24723232
score: -2
type: Question
answer count: 2
downvote count: 2
has title: window.open method doesn't work
has answer: http://stackoverflow.com/a/24723236
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24686794
type: AnsweredQuestion
type: Question
score: 0
has title: AngularJs filtering data In the other Controller
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/17606936
has body: I am using two controllers and a factory service to get the data from it. I want to filter the data in the second controller by input 'ng-model'. So i have written input ng-model in both the controllers (check index.html). Its working if i tried to enter the input data in the second controller input field, but its not working if i try filtering from first controller input ng-app. index.html {{item}} Title : {{panelItem.name }} Channel-Type : {{panelItem.type }} description : {{panelItem.description }} controller.js var app = angular.module("app", ["checkBoxserviceModule"]); app.controller('appCtrl', function($scope){ }); app.controller('checkBoxModuleCtrl', function($scope, externals){ $scope.chkBoxList = []; $scope.init = function(){ $scope.chkBoxList = externals.getCheckBoxList() }; $scope.init(); $scope.checkBoxClickHandler = function(itemIndex, event){ alert(event.currentTarget.value + "will be handling click listener for check box" + itemIndex) } }); app.controller("panelCtrl", function($scope, externals){ $scope.init = function(){ $scope.panelData = externals.getPanelData(); }; $scope.init(); $scope.customFilter = function(panelItem){ return panelItem.toUpperCase; } }); var checkBoxserviceModule = angular.module("checkBoxserviceModule", []); checkBoxserviceModule.factory("externals", function(){ return{ getCheckBoxList : function(){ return [ "sports", "movies", "entertainment", "news" ] }, getPanelData : function(){ //alert("in services") return [ { "name":"cinmax", "type": "movies", "description":"Some Tesxt" }, { "name":"setmax", "type": "sports", "description":"Some Tesxt" }, { "name":"mtv", "type": "entertainment", "description":"Some Tesxt" }, { "name":"ibn news", "type": "news", "description":"Some Tesxt" } ]; } }; });
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38278707
has answer: http://stackoverflow.com/a/24687009
accepted answer: http://stackoverflow.com/a/24687009

http://stackoverflow.com/comment/38136434
comment on: http://stackoverflow.com/a/24606380
type: AnswerComment
score: 0
type: Comment
has text: As far I understand, means that you send a keepalive message each X time, and if the server does not get a such message for you in a period of time, the server will cut the connection. At the same time, if the client fails to send the message, the client can consider the connection cut. I added the link to the answer.

http://stackoverflow.com/a/24652250
score: 1
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/24652121
has body: You can do like this in jQuery. Put a class on your select, and bind the event onchange $('.candidateList').on('change', function(evt){ $('#candidate_filter').submit(); }); http://jsfiddle.net/darksioul/4ygAg/2/

http://stackoverflow.com/comment/38420794
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24745095
has text: all i'm saying is that the Range request header (the 0-5242879 one) you show in your first screenshot might be fooling chrome. why you reply every time about the response i don't know, but i would try changing the request if i were you...
type: Comment

http://stackoverflow.com/comment/38291266
type: QuestionComment
comment on: http://stackoverflow.com/q/24693747
score: 1
has text: One problem I see is that the id attribute needs to be unique across the whole document. Please see: http://www.w3.org/TR/html4/struct/global.html#adef-id Perhaps you could refer to the elements you'd like to update by class name instead and use getElementsByClassName
type: Comment

http://stackoverflow.com/q/24627443
has comment: http://stackoverflow.com/comment/38167532
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24627737
tagged with: angularjs
answer count: 2
has body: In my angular app, I am trying to make a dataAdapter factory where I can quickly switch between the local adapter and the api adapter during development and publishing. My dataAdapter factory looks like this myApp.factory('dataAdapter', function($http, $q){ var dataAdapter = new apiAdapter; //var dataAdapter = new localAdapter; return dataAdapter; }); and my adapter objects (here api adapter) would looks something like this. (This will be located in another file called apiAdapter.js ) var apiAdapter = function(){ return { getData : function(){ $http.get(). ....; } } } Now this isn't working for me, because $http is not available inside apiAdapter object. Now if I move var apiAdapter = function(){....} just before var dataAdapter = new apiAdapter; , it works fine. Is there a way to make the angular services available to apiAdapter without moving it inside the factory? I hope, I have been able to describe my problem clearly.
possible better answer: http://stackoverflow.com/a/24627910
score: 0
has answer: http://stackoverflow.com/a/24627910
has answer: http://stackoverflow.com/a/24627737
tagged with: angularjs-service
has title: How to make angular's services available to independent objects ; Angular JS
tagged with: javascript

http://stackoverflow.com/comment/38253507
type: Comment
has text: No, i'm trying to solve it with GET or POST method..
comment on: http://stackoverflow.com/a/24671951
type: AnswerComment
score: 0

http://stackoverflow.com/a/24623913
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24616991
has comment: http://stackoverflow.com/comment/38199144
type: AcceptedAnswer
has body: One of the ways is to employ FDF or XFDF submits. Basically, browser displays the PDF, user fills it and clicks a submit button. PDF viewer sends information about filled fields to specified URL. You can choose format of the submit while creating the PDF. Following is from the XML Forms Data Format Specification FDF is a simplified version of PDF. PDF and FDF represent information with a key/value pair, also referred to as an entry. This example shows the T and V keys with values enclosed in parentheses: /T(Street)/V(345 Park Ave.) XFDF, on the other hand, represents an entry with an XML element/content or attribute/value pair, as shown in the correspond XFDF: 345 Park Ave. Please make sure that not all PDF viewers might be able to submit forms data.
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38211839
has comment: http://stackoverflow.com/comment/38219443
answers question: http://stackoverflow.com/q/24616991

http://stackoverflow.com/q/24607375
score: 0
has body: &lt;input type="text" pattern="[a-zA-z]" required id="txtBox" /&gt; &lt;input type="submit" /&gt; How do you set "required" attribute from javascript? If I call a javascript event from a submit-type input, how do I check whether that submit request failed due to HTML5 validation errors? Is there a way to force html validation without the submit event happening?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38128476
accepted answer: http://stackoverflow.com/a/24607466
possible better answer: http://stackoverflow.com/a/24607531
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24607531
has answer: http://stackoverflow.com/a/24607466
type: Question
has comment: http://stackoverflow.com/comment/38128757
answer count: 2
has comment: http://stackoverflow.com/comment/38128463
tagged with: validation
tagged with: javascript
tagged with: jquery
has title: HTML5 validations with javascript

http://stackoverflow.com/q/24659531
has comment: http://stackoverflow.com/comment/38228204
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38228359
upvote count: 3
has comment: http://stackoverflow.com/comment/38228529
has answer: http://stackoverflow.com/a/24660303
has comment: http://stackoverflow.com/comment/38229890
type: Question
has title: Creating a jQuery "object" that is available between _layout and views in ASP.NET MVC
score: 3
tagged with: asp.net-mvc
answer count: 2
possible better answer: http://stackoverflow.com/a/24659776
accepted answer: http://stackoverflow.com/a/24660303
downvote count: 0
has answer: http://stackoverflow.com/a/24659776
tagged with: javascript
has comment: http://stackoverflow.com/comment/38230020
tagged with: jquery
has comment: http://stackoverflow.com/comment/38228168
favorite count: 0
has comment: http://stackoverflow.com/comment/38228412
has body: I am coding in ASP.NET MVC 5.2, and using jQuery as my primary script library. I am having a bit of a problem though, with the disparity between _Layout and views that use that layout. Essentially, it goes like this _Layout has some script that needs to run (initial wiring, progress bar, splash screen, etc) Inheriting View has some script that needs to run (unique to that view) _Layout has additional scripts that need to run after the view's unique scripts. I have been trying a lot of ways to solve this, but it is actually proving to be a big problem. I have been frequently told that I should not create objects on the global namespace, so I am wondering if there are any other options to creating a script object that I can access in both views that isn't as damaging as global objects. I have tried promises, and that is getting frustrating. I have tried events, and that doesn't really help because I cannot figure out what to attach the events to. I am told not to attach them to $(document), but that is really one of the only things that will be shared between the view and the layout. I understand that global objects are not considered good in javascript, but at this point I'm not sure what other options I have to make sure things execute in the right order. Update The issue is more about "tooling" than it is about run time. It is true that when the actual view loads and runs, it is all pressed into one big happy page, and would work just fine. The issue is mostly that I have to split up the logic in the tooling (Visual Studio) to keep it from throwing errors and getting confused. So I suppose it is more accurate to say it is a pseudo-problem. I have attempted to split up the logic like this, but I think this is just another way of declaring a global object. I got the idea from the Q.js library. Tasks.js (function(definition) { // assign the task system tasks = definition(); })(function() { var list = []; function tasks() { }; tasks.start = start; tasks.enqueue = enque…
has comment: http://stackoverflow.com/comment/38229372

http://stackoverflow.com/comment/38317364
type: Comment
type: QuestionComment
has text: Please note what Barmar says. Using `||` is fairly common. Using `>>` is uncommon to the point that I have literally never seen it, and I read a ton of source code.
score: 1
comment on: http://stackoverflow.com/q/24707222

http://stackoverflow.com/a/24682228
accepted answer of: http://stackoverflow.com/q/24680798
answers question: http://stackoverflow.com/q/24680798
score: 1
has body: You should use the "$in" operator: $in The $in operator selects the documents where the value of a field equals any value in the specified array. http://docs.mongodb.org/manual/reference/operator/query/in/ Using your example this should work for you: Car.find({"phone_number": { $in: ['0795483297', '07958485375', '07958485378']} }).limit(10).exec(function(err, docs) { res.send(docs); });
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/q/24650469
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38212410
has comment: http://stackoverflow.com/comment/38210856
has body: Ok,so I've been reading up on JS and decided to create a quiz app to practice my new skills.So basically it's going to a fancy app that asks State Capitals one at a time,and gives the correct answer immediately.This is the HTML: The All-Star State Capitals Quiz. How well do you know your state capitals? So my idea was to do a separate JS MVC ish thing to update both the questionArea and answerArea dynamically.the questionarea is easy with ".innerHTML" but the answerArea is giving me a headache because I cannot get it to update the choices using appendChild(i'm using chrome on Mac).This is the js: var view = { displayQuestion:function(quiztion) { var questionArea = document.getElementById("questionArea"); questionArea.innerHTML = quiztion; }, displayAnswers: function(answers) { var answerArea = document.getElementById("answerArea"); var inputs = document.getElementsByName("choices"); for(var i = 0;i<inputs.length;i++) { var answer = answers[i]; var lblTxt = document.createTextNode(answer); var lbl = document.createElement("label").appendChild(lblTxt); inputs[i].appendChild(lbl); } } } view.displayQuestion("1.What is the capital of Massachusetts?"); view.displayAnswers(["A.Boston","B.New Haven","C.Albany","D.Hartford"]); so basically my problem is that I cannot update the choice radio buttons to the displayAnswer test example.Funny thing is I can see the choices in the DOM,without the "label" tag as I wanted.Any help?
type: Question
has comment: http://stackoverflow.com/comment/38210880
score: 0
answer count: 1
has title: appendChild not working?
has comment: http://stackoverflow.com/comment/38211003
has comment: http://stackoverflow.com/comment/38210946
tagged with: appendchild
tagged with: dom
has answer: http://stackoverflow.com/a/24682269
has comment: http://stackoverflow.com/comment/38211438
has comment: http://stackoverflow.com/comment/38212117
tagged with: javascript

http://stackoverflow.com/comment/38182244
type: QuestionComment
type: Comment
score: 1
has text: Found the cause, but cannot post an answer while the question is on hold. Just drop the indexing on `$(el).find("fillet")[i]` e.g. `$(el).find("fillet");` You are accessing child elements based on the parent's index! :) http://jsfiddle.net/TrueBlueAussie/BTHLZ/
comment on: http://stackoverflow.com/q/24634694

http://stackoverflow.com/comment/38169870
score: 3
type: Comment
type: QuestionComment
has text: you've two elements with same Id in fiddle?
comment on: http://stackoverflow.com/q/24628748

http://stackoverflow.com/comment/38130631
score: 0
type: Comment
has text: http://yeoman.io - just a website generator where you have sort of "templates" to start through.
type: AnswerComment
comment on: http://stackoverflow.com/a/24594170

http://stackoverflow.com/comment/38183084
comment on: http://stackoverflow.com/q/24635652
type: Comment
type: QuestionComment
has text: All youtube videos are downloadable. There are loads of browser plugins to do just that without the hassle of looking at the source.
score: 1

http://stackoverflow.com/q/24701050
score: 0
has title: jquery mobile ui becomes visually apparent only after window resize or chrome dev tools being opened or closed
has body: I am working on system that is using JQuery Mobile UI and Knockout.js combination. I haven't seen anything like this, when opening 'Query window' on the page and then cancelling it - expandable list that is Jquery mobile UI collapsible set is being hidden and when shown again. After it is shown again knockout.js model is being refreshed if (PageObj[this.knockoutContextName]) { PageObj[this.knockoutContextName].valueHasMutated(); } after this expectation is that JQuery mobile UI will work but it is not being applied visually. I have checked and knockout.js viewModel has all the data present. Even if I re-aplly collapsibleset() manually it still does not apply it visually (you can see it in the console window in screenshot below). Now the weird part: If I resize the window (without manually replying collapsibleset() the way I did in screenshot example above) or open or close developer tools manually it renders the expandable list properly and applies JQuery Mobile UI as if noting has happened. Bindings change too as if collapsibleset() would be called (Screenshot below), but this time it works. It feels like CSS from JQuery Mobile is not being applied. What sort of mechanism gets triggered on window events that allows it to render properly that does not get triggered when I show and hide the expandable.
tagged with: css
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: jquery-ui
tagged with: knockout.js
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/38307149
has comment: http://stackoverflow.com/comment/38306262

http://stackoverflow.com/comment/38391019
type: QuestionComment
has text: consider using jQuery `data` attributes instead of classes http://api.jquery.com/data/ then you can do something like `$(".modal[data-popup='" + "one" + "']").show()`
score: 1
comment on: http://stackoverflow.com/q/24745844
type: Comment

http://stackoverflow.com/q/24719607
accepted answer: http://stackoverflow.com/a/24719608
upvote count: 5
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/24500641
tagged with: jquery
possible better answer: http://stackoverflow.com/a/24720647
tagged with: scope
has answer: http://stackoverflow.com/a/24720647
answer count: 2
favorite count: 0
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/24719608
tagged with: css
type: AnsweredQuestion
has title: How to scope efficiently javascript et css on a rails appliacation?
has body: I had a lot of trouble to scope my javascript and css files on my rails app. By scoping, I mean : How to deal with java-script and CSS only used in one page or one controller ? I tried some solutions but they were all complicated and not so elegant : I saw some advices like this one : including my .js file directly on my .erb file like so : &lt;% content_for :head do %&gt; &lt;script type="text/javascript"&gt; &lt;% end %&gt; and then yield that in the application layout. But that means doing one more request to the server in order to get the .js file. I think it is important to stay with only one .js file and one .css file for the application, created by the asset pipeline I saw some other advices like testing if my HTML tag was present on the DOM with the .length method of jquery. That's still mean testing on every page if on particular tag is present (knowing it will be present in only one or two pages). I found a solution that's is easy to implement and, in my point of view, elegant.
type: Question
score: 5

http://stackoverflow.com/a/24727922
downvote count: 0
type: Answer
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/24727528
has body: Check the console. Try cjs.Ease.circOut(1.2)
answers question: http://stackoverflow.com/q/24727528
type: AcceptedAnswer

http://stackoverflow.com/a/24613732
answers question: http://stackoverflow.com/q/24613543
score: 0
type: Answer
has body: Try this: var month=["June","July"]; $(function () { $('#container').highcharts({ chart: { type: 'column' xAxis: { categories : month }, ... }); And to get rid of the trailing "," you should substr the last character from the variable in PHP code before outputting it in the JS variable, So if your PHP code had: $month = "["; while(LoopConditionForTwelveMonthNames) { $month .= '"' . $MonthName . '",'; } $month = substr($month, 0, strlen($month)-1); $month .= "]"; Then you may fix it

http://stackoverflow.com/comment/38372249
comment on: http://stackoverflow.com/a/24664023
has text: No. Sorry, but I prefer this solution: http://plnkr.co/edit/Spv26uPwJwkV6oJZSC9r?p=preview
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38186391
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24637463
has text: Updated with console output. I have tried using those options within and outside the $.getJSON.

http://stackoverflow.com/q/24597634
has answer: http://stackoverflow.com/a/51471587
has answer: http://stackoverflow.com/a/70050647
has answer: http://stackoverflow.com/a/31755504
type: Question
has answer: http://stackoverflow.com/a/48359610
has comment: http://stackoverflow.com/comment/38109558
has answer: http://stackoverflow.com/a/64599298
has answer: http://stackoverflow.com/a/78308642
has answer: http://stackoverflow.com/a/67533490
score: 99
has answer: http://stackoverflow.com/a/53670054
has answer: http://stackoverflow.com/a/75204414
has answer: http://stackoverflow.com/a/73258855
has answer: http://stackoverflow.com/a/64599169
tagged with: javascript
has answer: http://stackoverflow.com/a/24597663
has answer: http://stackoverflow.com/a/53596422
has answer: http://stackoverflow.com/a/71855776
favorite count: 0
has answer: http://stackoverflow.com/a/65346590
has answer: http://stackoverflow.com/a/54250206
accepted answer: http://stackoverflow.com/a/24597663
has title: How to generate an array of the alphabet?
has answer: http://stackoverflow.com/a/53219373
has answer: http://stackoverflow.com/a/54295276
has answer: http://stackoverflow.com/a/75205986
downvote count: 2
has answer: http://stackoverflow.com/a/68043062
has answer: http://stackoverflow.com/a/59824435
has answer: http://stackoverflow.com/a/79107845
has answer: http://stackoverflow.com/a/76410805
has answer: http://stackoverflow.com/a/51327534
answer count: 28
has answer: http://stackoverflow.com/a/65944964
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/73301812
has answer: http://stackoverflow.com/a/24597658
upvote count: 101
possible better answer: http://stackoverflow.com/a/31755504
has answer: http://stackoverflow.com/a/62503499
has body: In Ruby I can do ('a'..'z').to_a to get ['a', 'b', 'c', 'd', ... 'z']. Does JavaScript provide a similar construct?

angularjs
tags question: http://stackoverflow.com/q/24703831
tags question: http://stackoverflow.com/q/24715092
tags question: http://stackoverflow.com/q/24653888
tags question: http://stackoverflow.com/q/24706197
tags question: http://stackoverflow.com/q/24680972
tags question: http://stackoverflow.com/q/24590310
tags question: http://stackoverflow.com/q/24679047
tags question: http://stackoverflow.com/q/24685405
tags question: http://stackoverflow.com/q/24655910
tags question: http://stackoverflow.com/q/24643721
tags question: http://stackoverflow.com/q/24709927
tags question: http://stackoverflow.com/q/24732905
tags question: http://stackoverflow.com/q/24595192
tags question: http://stackoverflow.com/q/24663282
tags question: http://stackoverflow.com/q/24663973
tags question: http://stackoverflow.com/q/24738836
tags question: http://stackoverflow.com/q/24596657
tags question: http://stackoverflow.com/q/24656488
tags question: http://stackoverflow.com/q/24592882
tags question: http://stackoverflow.com/q/24591843
tags question: http://stackoverflow.com/q/24687829
tags question: http://stackoverflow.com/q/24617040
tags question: http://stackoverflow.com/q/24692477
tags question: http://stackoverflow.com/q/24666573
tags question: http://stackoverflow.com/q/24660128
tags question: http://stackoverflow.com/q/24629463
tags question: http://stackoverflow.com/q/24624991
tags question: http://stackoverflow.com/q/24684208
tags question: http://stackoverflow.com/q/24730769
tags question: http://stackoverflow.com/q/24686309
tags question: http://stackoverflow.com/q/24653265
tags question: http://stackoverflow.com/q/24696062
tags question: http://stackoverflow.com/q/24697045
tags question: http://stackoverflow.com/q/24675655
tags question: http://stackoverflow.com/q/24640851
tags question: http://stackoverflow.com/q/24606470
tags question: http://stackoverflow.com/q/24671874
tags question: http://stackoverflow.com/q/24714384
tags question: http://stackoverflow.com/q/24622474
tags question: http://stackoverflow.com/q/24655080
tags question: http://stackoverflow.com/q/24726329
tags question: http://stackoverflow.com/q/24713990
tags question: http://stackoverflow.com/q/24713936
tags question: http://stackoverflow.com/q/24588941
tags question: http://stackoverflow.com/q/24679704
tags question: http://stackoverflow.com/q/24746175
tags question: http://stackoverflow.com/q/24656352
tags question: http://stackoverflow.com/q/24733438
tags question: http://stackoverflow.com/q/24678730
tags question: http://stackoverflow.com/q/24612326
tags question: http://stackoverflow.com/q/24606516
type: Tag
tags question: http://stackoverflow.com/q/24646149
tags question: http://stackoverflow.com/q/24699716
tags question: http://stackoverflow.com/q/24676331
tags question: http://stackoverflow.com/q/24673676
tags question: http://stackoverflow.com/q/24674576
tags question: http://stackoverflow.com/q/24636905
tags question: http://stackoverflow.com/q/24668728
tags question: http://stackoverflow.com/q/24615452
tags question: http://stackoverflow.com/q/24664393
tags question: http://stackoverflow.com/q/24687546
tags question: http://stackoverflow.com/q/24601551
tags question: http://stackoverflow.com/q/24619053
tags question: http://stackoverflow.com/q/24679014
tags question: http://stackoverflow.com/q/24700339
tags question: http://stackoverflow.com/q/24653779
tags question: http://stackoverflow.com/q/24736105
tags question: http://stackoverflow.com/q/24604890
tags question: http://stackoverflow.com/q/24733612
tags question: http://stackoverflow.com/q/24626587
tags question: http://stackoverflow.com/q/24615515
tags question: http://stackoverflow.com/q/24642228
tags question: http://stackoverflow.com/q/24703457
tags question: http://stackoverflow.com/q/24689717
tags question: http://stackoverflow.com/q/24607309
tags question: http://stackoverflow.com/q/24694780
tags question: http://stackoverflow.com/q/24718592
tags question: http://stackoverflow.com/q/24591861
tags question: http://stackoverflow.com/q/24702432

http://stackoverflow.com/comment/38306797
comment on: http://stackoverflow.com/a/24701930
score: 0
type: Comment
has text: i have corrrected my code as you mentioned now it is showing me the alert message but the message is '<?php echo json_encode($ab); ?>' not the array which i have stored in $ab in my php page
type: AnswerComment

http://stackoverflow.com/a/24713289
has body: Actually, the documentation of the kendo Object in Kendo API didn't mention about the method navigate. If you are using kendo mobile, you should be able to call it: app.navigate('#some-view-id'); And it work for me on any devices between iOS 6 and iOS 8, and between Android 2.3.6 to Android 4.4. I think they are using this method to navigate, and the rest of the things will be handled by kendo router.
answers question: http://stackoverflow.com/q/24712387
score: 1
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38280777
score: 0
type: Comment
type: QuestionComment
has text: I want this one (as in the question). The plunker should look like what I have posted. I have just tested the link.
comment on: http://stackoverflow.com/q/24687829

http://stackoverflow.com/a/24659615
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38263336
has comment: http://stackoverflow.com/comment/38262338
answers question: http://stackoverflow.com/q/24658543
has body: Your bindings are messed up. The foreach inside template isn't the same as the foreach binding. The after rendered on the template will fire after every child. Try this &lt;ul&gt; &lt;!-- ko template: { name: 'concept-template', foreach: Concepts, afterRender: Rendered } --&gt;&lt;!-- /ko --&gt; &lt;/ul&gt; I have a working example here: http://jsfiddle.net/4t94G/1/
accepted answer of: http://stackoverflow.com/q/24658543
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38247628
type: Answer

http://stackoverflow.com/a/24672828
type: Answer
has body: You can reset a viewmodel using the knockout mapping plugin. Consider this data, which is the data you start with: var initData = { firstInput: "First Init Value", secondInput: "Second Init Value", thirdInput: "Third Init Value", showSecond: false }; First, load the data you want with the plugin: ko.mapping.fromJS(initData, {}, this); Then you can create a reset function that looks like this: this.reset = function () { ko.mapping.fromJS(initData, this); } When you call this function, your viewmodel will be updated with the init data, which will be like a reset. Demo
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24666387
upvote count: 1

http://stackoverflow.com/a/24709157
has comment: http://stackoverflow.com/comment/38321089
has comment: http://stackoverflow.com/comment/38321254
has comment: http://stackoverflow.com/comment/38321127
score: 9
has comment: http://stackoverflow.com/comment/38321108
has comment: http://stackoverflow.com/comment/38321132
has body: If you would like to blur the background, you would need to add a css blur filter to the element that contains all of your normal content. In addition, it looks like you want to grey it out too. Here is a link to the jFiddle: http://jsfiddle.net/edMa4/6/ CSS .blur { filter: blur(5px); -webkit-filter: blur(5px); -moz-filter: blur(5px); -o-filter: blur(5px); -ms-filter: blur(5px); } #overlay { position: fixed; display: none; left: 0px; top: 0px; right: 0px; bottom: 0px; background: rgba(255,255,255,.8); z-index: 999; } JavaScript var myBlurFunction = function(state) { /* state can be 1 or 0 */ var containerElement = document.getElementById('main_container'); var overlayEle = document.getElementById('overlay'); if (state) { overlayEle.style.display = 'block'; containerElement.setAttribute('class', 'blur'); } else { overlayEle.style.display = 'none'; containerElement.setAttribute('class', null); } }; to activate: Blur to disable: No blur These are the basic things you'd need to blur and grey out the content of the main_container element - though you would need to make adjustments depending upon additional functionality you seek.
has comment: http://stackoverflow.com/comment/38329256
upvote count: 9
has comment: http://stackoverflow.com/comment/38329221
answers question: http://stackoverflow.com/q/24709046
type: Answer
downvote count: 0

http://stackoverflow.com/a/60964904
type: Answer
has comment: http://stackoverflow.com/comment/116616557
has body: Fix it in 20 seconds: This solution belongs to @Arseniy-II, I have just simplified it into a function. function _scrollTo(selector, yOffset = 0){ const el = document.querySelector(selector); const y = el.getBoundingClientRect().top + window.pageYOffset + yOffset; window.scrollTo({top: y, behavior: 'smooth'}); } Usage (you can open up the console right here in StackOverflow and test it out): _scrollTo('#question-header', 0); I'm currently using this in production and it is working just fine.
answers question: http://stackoverflow.com/q/24665602
upvote count: 32
score: 30
downvote count: 2

http://stackoverflow.com/comment/38367101
has text: Line 44:
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24727098
type: AnswerComment

http://stackoverflow.com/a/24739038
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: 1) Move app.controller("CommentLstCtrl", function ($scope) { $scope.comments = [ { 'text': 'Fast just got faster with Nexus S.' }, { 'text': 'The Next, Next Generation tablet.' }, { 'text': 'The Next, Next Generation tablet.' } ]; }); outside of ajax call. 2) Use angular.bootstrap(document.querySelector('body'), ['commentApp']) to start application once ajax call succeeds 3) Show rendered content of your partial views. It is happening on the server side, not in the browser.
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24738836
answers question: http://stackoverflow.com/q/24738836

http://stackoverflow.com/comment/116799078
has text: That won't work ("attachment1" field) as you need first to upload the file to the Azure cloud https://developer.yammer.com/docs/upload-files-into-yammer-groups
type: Comment
comment on: http://stackoverflow.com/a/24815670
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38342219
score: 0
type: AnswerComment
type: Comment
has text: [`wrappedJSObject` docs](https://developer.mozilla.org/en-US/docs/wrappedJSObject) show no such change. And AFAICT, Scriptish isn't affected in the same way. That article talks exclusively about the SDK making changes, it does not mention any changes on Firefox itself -- although we know that those 3 `Components.utils` functions are new.
comment on: http://stackoverflow.com/a/24719357

http://stackoverflow.com/a/24675852
type: Answer
score: 2
upvote count: 2
has body: Well, just need to set responseType to arraybuffer for the ajax request. Since, the jQuery does not supports that dataType, have to use traditional Javascript Ajax For more Info see Sending and Receiving Binary Data function ajaxFileStream() { var url = "/Home/GetFileStream"; var oReq = new XMLHttpRequest(); oReq.open("GET", url, true); oReq.responseType = "arraybuffer"; oReq.onload = function (oEvent) { console.log(oReq.response); var blob = new Blob([oReq.response], { type: "application/pdf" }); var win = window.open('', '_blank'); var URL = window.URL || window.webkitURL; var dataUrl = URL.createObjectURL(blob); win.location = dataUrl; }; oReq.send(); } Thanks, bUKaneer that linked helped a lot.
accepted answer of: http://stackoverflow.com/q/24672900
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24672900
has comment: http://stackoverflow.com/comment/38258769

http://stackoverflow.com/q/24606519
has comment: http://stackoverflow.com/comment/38128322
has answer: http://stackoverflow.com/a/24607754
has body: I've been following this answer in an attempt to write good asynchronous js - but I can't quite figure out what's going wrong for me. I'm using autocomplete to request a specific set of files from the server, but for some datasets these files may not exist (i.e, there may be one, or up to four files). If they do exist, I want to append .html to include them. The images don't load unless I add async: false to the .ajax call, which makes the callback redundant. for (var i = 1; i < 5; i++) { (function (counter) { // define function with the callback argument function ajaxTest(callback) { $.ajax({ type: "GET", url: counter + "_1.jpg", success: function (result) { callback(counter); } }); } // call the function ajaxTest(function (num) { var image_temp = ' Image' + num + ' '; console.log(image_temp); //check readout image_html += image_temp; }); })(i); } Then image_html contains html for only those images that exist. $('#outputcontent').html(outer_html + image_html + outer_html_end); Can anyone explain to my misunderstanding here please? Why isn't image_html being populated? EDIT: 'full' code below. I use jquery autocomplete to pull from the stellar_comp array, then for those with properties that exist (some are blank), html is generated. Within that is the ajax call. $(function () { var stellar_comp = [ { value:'X0005-28', data: { set0: { aperture:'X2105-28', secat:'X025-18', set:'1', run:'r06', continuumFilter:'J', narrowBandFilter:'638/28', numberOfSources:'1', priorityCode:'1' etc... etc ... }, }, ]; $('#autocomplete').autocomplete({ lookup: stellar_comp, onSelect: function (suggestion) { var path_Value = 'data/' + suggestion.value + '/'; var outer_html = ' ' + suggestion.value + ' '; var outer_html_end = ' '; for (var category in suggestion.data) { if (suggestion.data.hasOwnProperty(category)) { if (suggestion.data[category].aperture) { summary_table_contents = ' ' + suggestion.data[category].set + ' ' + suggestion.data[category].run + ' ' + suggestion.data[category]…
has comment: http://stackoverflow.com/comment/38128486
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/38158849
tagged with: callback
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/38128364
has comment: http://stackoverflow.com/comment/38164342
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38131089
possible better answer: http://stackoverflow.com/a/24607754
has comment: http://stackoverflow.com/comment/38128490
type: Question
has comment: http://stackoverflow.com/comment/38128986
answer count: 2
has comment: http://stackoverflow.com/comment/38127895
has answer: http://stackoverflow.com/a/24608790
accepted answer: http://stackoverflow.com/a/24608790
tagged with: javascript
tagged with: jquery
has title: ajax callback to insert image if exists
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/38131158
has comment: http://stackoverflow.com/comment/38165750

http://stackoverflow.com/comment/38303337
comment on: http://stackoverflow.com/a/24689552
type: Comment
type: AnswerComment
has text: Don't really want to down vote but this answer is all based on speculation, you should provide a jsperf or some sort of *real* data to prove your theory.
score: 0

keystroke
type: Tag
tags question: http://stackoverflow.com/q/24693704
tag name: keystroke

http://stackoverflow.com/comment/38293725
score: 0
has text: resource routes should always be a plural if i'm not mistakened, that's why its not working. I guess you could have a quarters route with a custom path "about". Then nest your quarter route in it. Then no need of custom outlet
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24694688

http://stackoverflow.com/q/24738973
tagged with: node.js
type: Question
has comment: http://stackoverflow.com/comment/38378104
has answer: http://stackoverflow.com/a/24739290
tagged with: javascript
has title: piping data through Q promises chain
tagged with: http://stackoverflow.com/tag/q
score: 0
linked to: http://stackoverflow.com/q/28250680
answer count: 2
has answer: http://stackoverflow.com/a/24757633
has body: I'm chaining Q promises: Q(initialCall).then(someOtherCallThatUsesResultsFromPreviousResults) A call usually means a promisified node.js http.get call to an external REST api. The path is constructed using information from previous call. At the same time I want to pipe the information from previous call as well. The final result from the chain should be data from both calls merged into one object. Right now the passing of the information is done explicitly via an additional parameter - object. Any way that would not require explicitly passing the extra parameter? function jsonRequest(pathThatIsContructedBasedOnPreviousResults, object:any) { var deferer = Q.defer(); var options = capsuleOptions; options.path = path; https.get(options, function (response) { response.on('data', function (d) { var parsedJson = JSON.parse(d); deferer.resolve({data: parsedJson, object: object}); })}).on('error', function(e) {deferer.reject(e);}); return deferer.promise; } Example: function getUserDetailsByEmail(email) { var userByEmailRequestPath = '/api/party?email=' + email; return jsonRequest(userByEmailRequestPath, email); } UserByEmail endpoint doesn't return email as part of response JSON and I still want to include email in the return value.
duplicate of: http://stackoverflow.com/q/28250680
has comment: http://stackoverflow.com/comment/38378525
tagged with: promise
type: UnansweredQuestion
tagged with: state-monad

http://stackoverflow.com/q/24747099
type: UnansweredQuestion
tagged with: linechart
upvote count: 4
answer count: 4
score: 3
has body: I'm using morris chart. On x-axis I'm showing a date. Everything is fine except label. I want to show my label like x-axis format. How can I change the green circle's value to the red circle's value format? $(function() { "use strict"; var monthNames = [ "Oca", "Şub", "Mar", "Nis", "May", "Haz","Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara" ]; // LINE CHART var line = new Morris.Line({ element: 'kelime-gecmisi', resize: true, data: [ {tarih: '2014-07-05', sira: 30}, {tarih: '2014-07-06', sira: 25}, {tarih: '2014-07-07', sira: 19}, {tarih: '2014-07-08', sira: 17}, {tarih: '2014-07-09', sira: 11}, {tarih: '2014-07-10', sira: 8}, {tarih: '2014-07-11', sira: 4}, {tarih: '2014-07-12', sira: 1}, // {tarih: '2014-07-13', item1: 1/3}, // {tarih: '2014-07-14', item1: 1/4}, // {tarih: '2014-07-15', item1: 1/9} ], xkey: 'tarih', ykeys: ['sira'], xLabels:'day', // continuousLine:false, labels: ['Sıra'], lineWidth: 2, lineColors: ['#00A65A'], hideHover: 'auto', ymin:'auto 1', ymax:'auto 30', gridIntegers: true, xLabelFormat: function(d) { return d.getDate()+' '+monthNames[d.getMonth()]+' '+d.getFullYear(); }, //yLabelFormat: function(y) { if (y === 0) return 30; else return Math.round(1/y); } }); });
tagged with: morris.js
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27672527
type: Question
has answer: http://stackoverflow.com/a/42741814
linked to: http://stackoverflow.com/q/19800089
downvote count: 1
has answer: http://stackoverflow.com/a/25495755
has answer: http://stackoverflow.com/a/41206627
tagged with: javascript
has title: Morris Chart - How to Format Hover Label

http://stackoverflow.com/a/24695582
has comment: http://stackoverflow.com/comment/38294640
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24695463
type: Answer
accepted answer of: http://stackoverflow.com/q/24695463
has comment: http://stackoverflow.com/comment/38302318
score: 3
downvote count: 0
has body: To make it overflow, the content must be larger than the div, not the div itself. and to be able to make it inline, you must use display:inline-block and white-space: nowrap. Let me know if you have concerns. Check out the fiddle below. Fiddle CSS #div2{ display:inline-block; white-space: nowrap; }
upvote count: 3

http://stackoverflow.com/a/24664601
type: Answer
accepted answer of: http://stackoverflow.com/q/24664518
downvote count: 0
answers question: http://stackoverflow.com/q/24664518
score: 1
upvote count: 1
type: AcceptedAnswer
has body: use data-* attributes, and then use jQuery's .data method to get the value HTML 5 - preserved: 5 JS var preserved_increment = parseInt($(this).find(".myVal").data("preserved")); JSFiddle

http://stackoverflow.com/q/24636063
score: 0
has comment: http://stackoverflow.com/comment/38183830
answer count: 3
accepted answer: http://stackoverflow.com/a/24636504
has answer: http://stackoverflow.com/a/24636424
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24636504
has answer: http://stackoverflow.com/a/24636257
type: Question
has title: How to dynamically assign arguments in a method call from loop?
has body: Run into an odd issue, perhaps best explained by code: var fruits = ["apples", "oranges", "pears"]; var Breakfast = { _consume : function (fruit) { Breakfast[fruit]._numConsumed++; } }; for (var f in fruits) { var fruit = fruits[f]; Breakfast[fruit] = { consume : function () { Breakfast._consume(fruit); }, _numConsumed: 0 } } Breakfast.pears.consume(); Breakfast.pears.consume(); Breakfast.apples.consume(); Breakfast.apples.consume(); Breakfast.apples.consume(); console.log("Pears eaten: " + Breakfast.pears._numConsumed); console.log("Apples eaten: " + Breakfast.apples._numConsumed); The result of this is: $ node example.js Pears eaten: 5 Apples eaten: 0 Not quite sure how to overcome this behaviour? Have I coded something wrong? Or is there a different pattern I should be using? (given that I want the "consume" function to be available to all my fruits etc) Many thanks!
linked to: http://stackoverflow.com/q/111102
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24636257

http://stackoverflow.com/q/24653923
has comment: http://stackoverflow.com/comment/38217185
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24654559
has title: Function executed three times
type: Question
has comment: http://stackoverflow.com/comment/38217106
tagged with: iterator
has comment: http://stackoverflow.com/comment/38217263
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38217285
accepted answer: http://stackoverflow.com/a/24654559
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38217218
has comment: http://stackoverflow.com/comment/38217353
has body: $('[name="properties_box"]').change(function() { if(this.checked) { console.log(properties.length - 1); for (var i = 0; i &lt; (properties.length - 1); i++) { (function(index) { console.log('iterator: ' + index); //do ajax here })(i); } } }); It should only log 0-7. But it does it three times like this. 7 main.js?ver=20130905:732 iterator: 0 main.js?ver=20130905:737 iterator: 1 main.js?ver=20130905:737 iterator: 2 main.js?ver=20130905:737 iterator: 3 main.js?ver=20130905:737 iterator: 4 main.js?ver=20130905:737 iterator: 5 main.js?ver=20130905:737 iterator: 6 main.js?ver=20130905:737 7 main.js?ver=20130905:732 iterator: 0 main.js?ver=20130905:737 iterator: 1 main.js?ver=20130905:737 iterator: 2 main.js?ver=20130905:737 iterator: 3 main.js?ver=20130905:737 iterator: 4 main.js?ver=20130905:737 iterator: 5 main.js?ver=20130905:737 iterator: 6 main.js?ver=20130905:737 7 main.js?ver=20130905:732 iterator: 0 main.js?ver=20130905:737 iterator: 1 main.js?ver=20130905:737 iterator: 2 main.js?ver=20130905:737 iterator: 3 main.js?ver=20130905:737 iterator: 4 main.js?ver=20130905:737 iterator: 5 main.js?ver=20130905:737 iterator: 6 Can someone explain why and how to fix it? I am going to have some AJAX call within, so it's important that it doens't run more than needed.
has comment: http://stackoverflow.com/comment/38217662

http://stackoverflow.com/a/24606312
type: Answer
has comment: http://stackoverflow.com/comment/38128681
has body: Usually you want to generate a field by using a Django-Form Class. There you can also customize your entire field: For your example you would have to create a class like this in your forms.py class EmailForm(forms.Form) email = forms.CharField(widget=forms.EmailInput(attrs={'class': 'email-input', 'placeholder': 'Email'}) You can also use {'style': 'height: 30px; width: 250px; border: 2px solid grey; padding: 7px; margin-top: 10px; margin-bottom: 10px; font-size: 20px;'} instead of {'class': 'email-input'} for your style, but it's usually better to use a css class. The email in your class is basically your entire email field but it automatically generates a name and id so it's easier to use. Now if you want the value of your field in the backend you have to do a GET or POST request (I think in this case POST). You will get the value by using the following pattern in the method in which you want to handle the recieved data: (works but not optimal) field_value = request.POST.get('fieldname') or even better as Daniel pointed out in the comments with field_value = form.cleaned_data['fieldname']. So In your case it would be something like this: email = form.cleaned_data['email']. This will return the value that was typed into the field for later backend-use.
has comment: http://stackoverflow.com/comment/38126743
score: 0
answers question: http://stackoverflow.com/q/24605799
has comment: http://stackoverflow.com/comment/38128698
has comment: http://stackoverflow.com/comment/38128871
has comment: http://stackoverflow.com/comment/38128771

http://stackoverflow.com/q/24623572
has comment: http://stackoverflow.com/comment/38160723
has comment: http://stackoverflow.com/comment/38160549
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/38160774
has title: If you're not using one of the built-in asynchronous libraries in node, would you use setTimeout to make a function asynchronous?
type: Question
has comment: http://stackoverflow.com/comment/38160470
has comment: http://stackoverflow.com/comment/38160658
has comment: http://stackoverflow.com/comment/38160762
tagged with: javascript
has comment: http://stackoverflow.com/comment/38160514
score: 0
tagged with: asynchronous
has body: I have two functions one that I believe is validly synchronous and one that is asynchronous. synchronous Function Example function longProcess() { var reps = 5000000000; while (reps &gt; 0) { reps = reps - 1; } } var simulateQuery = function(query, callback) { // simulate a long database query longProcess(); // return "data" from the simulated query var data = {name: 'john', age: '44'}; // I'm not going to have error checking in this simulation var err = null; // invoke the callback returning err and data as arguments callback(err, data); }; console.log('invoking simulateQuery()'); // invoking simulateQuery, with a fake query and a callback function simulateQuery('{name: john}', function(err, data){ console.log('simulateQuery() returned with data: ' + JSON.stringify(data)); }); // Simulate other stuff being done while waiting for query to come back console.log('other stuff running'); Not surprisingly this returns: invoking simulateQuery() &lt;5-6 second wait> simulateQuery() returned with data: {"name":"john","age":"44"} other stuff running asynchronous Function Example function longProcess() { var reps = 5000000000; while (reps &gt; 0) { reps = reps - 1; } } var simulateQuery = function(query, callback) { setTimeout(function(){ longProcess(); var data = {name: 'john', age: '44'} var err = null; callback(null, data); }, 0); }; console.log('invoking simulateQuery()'); // invoking simulateQuery, with a fake query and a callback function simulateQuery('{name: john}', function(err, data){ console.log('simulateQuery() returned with data: ' + JSON.stringify(data)); }); // Simulate other stuff being done while waiting for query to come back console.log('other stuff running'); This code returns: invoking simulateQuery() other stuff running &lt;5-6 second wait> simulateQuery() returned with data: {"name":"john","age":"44"} My questions are: 1) Is this a valid illustration of a blocking and non-blocking code pattern and 2) why is my callback being fired after the longProcess(…
type: UnansweredQuestion

http://stackoverflow.com/a/24675347
has comment: http://stackoverflow.com/comment/38258759
answers question: http://stackoverflow.com/q/24675280
score: 3
upvote count: 3
has body: Try this: $('input[rel="first"]') .parent() //it's parent div .nextAll('div') //finds nextAll div .children('input:radio') //inside div find input with radio type .not(':disabled'); //ensures not disabled
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24675280
type: Answer

http://stackoverflow.com/comment/38310163
type: Comment
comment on: http://stackoverflow.com/a/24703481
score: 0
type: AnswerComment
has text: Sorry, to be specific, the number in the green circle doesn't update when the associated_costs and nonbillable values are changed. The other three do cause updates.

http://stackoverflow.com/comment/38336794
type: AnswerComment
score: 0
has text: Yes, I also did that.
type: Comment
comment on: http://stackoverflow.com/a/24699551

http://stackoverflow.com/q/24692784
has body: My question is, I'm attempting to append something I saw in a tutorial for making rainbow text to head, as I'm trying add it to the custom color codes in a nodejs based chat. I'm getting "SyntaxError: Unexpected token ILLEGAL" message in console. Can someone tell me what my errors are or possibly fix it for me? Thanks in advance. $('head').append('&lt;style&gt; #chat .rainbow { background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) )!important; background-image: gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) ); color:transparent!important; -webkit-background-clip: text!important; background-clip: text!important; } &lt;/style&gt;')
has comment: http://stackoverflow.com/comment/38289615
has answer: http://stackoverflow.com/a/24692869
type: Question
has comment: http://stackoverflow.com/comment/38289479
has answer: http://stackoverflow.com/a/24692880
has comment: http://stackoverflow.com/comment/38289197
tagged with: javascript
linked to: http://stackoverflow.com/q/236073
score: 0
linked to: http://stackoverflow.com/q/508269
has title: Illegal error when trying to append
has comment: http://stackoverflow.com/comment/38289258
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24692852
has comment: http://stackoverflow.com/comment/38289261
has answer: http://stackoverflow.com/a/24692815
type: UnansweredQuestion
tagged with: css
answer count: 4

http://stackoverflow.com/comment/38384616
score: 2
has text: @FelixKling We don't know where that ID comes from, and we don't know where it will come from in the future. The code manipulating the DOM should be completely transparent. Besides, folks copy/paste code from Stack Overflow all the time without understanding what they're doing. I want to make sure that the answer is fully correct, assuming nothing about the input data. Bugs and security issues arise all the time because code used in one context is modified to work in another down the road, and assumptions were made up front.
comment on: http://stackoverflow.com/q/24742472
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24616187
has answer: http://stackoverflow.com/a/24617003
tagged with: d3.js
type: UnansweredQuestion
has title: Using Drop-down menu with D3 force layout graph
tagged with: force-layout
downvote count: 0
linked to: http://stackoverflow.com/q/20780835
score: 1
has body: I am trying to use a drop down menu with a D3 force layout graph so that when I select an option from the drop down menu, the corresponding node becomes highlighted and the name appears above the node. I am using jquery to get the value of the selected option and then want this option to match up with the correct node. Here is the jquery that I am currently using. I know I will probably have to add on to this but am not sure where to go next: $(document).ready(function(){ $('.letters').on('change',function(){ cur_name = $('.letters').val(); alert('The selected name is ' + cur_name); }); }); The alert is just for testing purposes. I have also made a jsfiddle and here is the link: http://jsfiddle.net/ohiobucks23/xr3uE/ I am making a much larger force layout graph with a lot more options than just A, B, and C but just made this on a smaller scale really quick for proof of concept purposes. Any suggestions would be appreciated. Thanks!
type: Question
upvote count: 1
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/23113394
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/q/24740474
answer count: 1
tagged with: python
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24819617
tagged with: web-hosting
type: Question
accepted answer: http://stackoverflow.com/a/24819617
tagged with: javascript
score: 0
has body: I have a pyramid application that runs perfectly on a local server, but when I move it over to a web server (Dreamhost), I get the following error: 400 Bad Request: Bad request (GET and HEAD requests may not contain a request body) The code in question is the following ajax in Javascript: function summary_ajax(sName){ $.ajax({ type: "POST", url: "summary", dataType: "json", data: { 'ccg_name': sName, }, async: false, success: function(data) { //alert("In ajax success function") &lt;----------- This never executes lValues = data.lValues; lLabels = data.lLabels; }, }); }; return (lValues, lLabels); And is handled in views.py: @view_config(route_name="ccg_map_summary_ajax",renderer="json") def ccg_map_summary_ajax(self): sCCG = self.request.POST.get('ccg_name') fData = open('pyramidapp/static/view_specific_js/ajax_summary_data.js') dData = json.load(fData) lLabels = dData[sCCG].keys() lValues = dData[sCCG].values() return { 'lLabels' : lLabels, 'lValues' : lValues, } I did some testing by placing alert() functions (its slow, because the server only reloads the script every so many minutes), and everything executes fine except for alerts in the ajax call. So it seems that either the post fails, or something goes wrong in the view. Any ideas? So is there something in this code that works in my local server (in Pyramid) but breaks down in the web server (Dreamhost)? The file structure is the same in the local and web server. I don't see why it shouldn't, but will fData still open the file for reading?
has title: 400 Bad Request error when when moving application from local to web server
has comment: http://stackoverflow.com/comment/38389744

http://stackoverflow.com/comment/38265460
score: 0
type: AnswerComment
type: Comment
has text: Ace, works a treat. :D (I would gladly vote for you but I only have 8 rep) maybe a vote for this question if you thought it was good :) and a big thanks
comment on: http://stackoverflow.com/a/24679442

http://stackoverflow.com/a/24716705
type: Answer
has body: You can do this via javascript/jquery: &lt;script type='text/javascript'&gt; document.getElementById("someButtonId").onclick = function() { var confirmation = window.confirm("Are you sure?"); //confirmation variable will contain true/false. if(confirmation) { vvar dataValue = { "name": "myName", "isGoing": "toAPlace", "returnAddress": "anyAddress" }; $.ajax({ type: "POST", url: "Default.aspx/OnSubmit", data: dataValue, error: function (XMLHttpRequest, textStatus, errorThrown) { alert("Request: " + XMLHttpRequest.toString() + "\n\nStatus: " + textStatus + "\n\nError: " + errorThrown); }, complete: function (jqXHR, status) { alert("complete: " + status + "\n\nResponse: " + jqXHR.responseText); } }); } else { /* do nothing */ } } &lt;/script&gt; In this case you add a click event to your button in which this event open up a confirmation. If the user responds "yes", the following OnSubmitfunction from the Default.aspx page, would be called: public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { } // method called from the javascript [WebMethod] public static string OnSubmit(string name, bool isGoing, string returnAddress) { return "it worked"; } } Finally, observe in the javascript the even the failure case was handled.
score: 0
answers question: http://stackoverflow.com/q/24716536

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/24731252
tags question: http://stackoverflow.com/q/24677170
tags question: http://stackoverflow.com/q/24667020
tags question: http://stackoverflow.com/q/24645225
tags question: http://stackoverflow.com/q/24678529
tags question: http://stackoverflow.com/q/24644490
tags question: http://stackoverflow.com/q/24725976
tags question: http://stackoverflow.com/q/24618836
tags question: http://stackoverflow.com/q/24680189
tags question: http://stackoverflow.com/q/24632012
tags question: http://stackoverflow.com/q/24739959
tags question: http://stackoverflow.com/q/24657948
tags question: http://stackoverflow.com/q/24741711
tags question: http://stackoverflow.com/q/24597116
tags question: http://stackoverflow.com/q/24615766
tags question: http://stackoverflow.com/q/24740780
tags question: http://stackoverflow.com/q/24620522
tags question: http://stackoverflow.com/q/24608041
tags question: http://stackoverflow.com/q/24739935
tags question: http://stackoverflow.com/q/24694086
tags question: http://stackoverflow.com/q/24658778
tags question: http://stackoverflow.com/q/24643605
tags question: http://stackoverflow.com/q/24739079
tags question: http://stackoverflow.com/q/24720305
tags question: http://stackoverflow.com/q/24681296
tags question: http://stackoverflow.com/q/24744364
tags question: http://stackoverflow.com/q/24648072
tags question: http://stackoverflow.com/q/24709677
tags question: http://stackoverflow.com/q/24706203
tags question: http://stackoverflow.com/q/24688610
tags question: http://stackoverflow.com/q/24635189
tags question: http://stackoverflow.com/q/24710242
tags question: http://stackoverflow.com/q/24656854
tags question: http://stackoverflow.com/q/24656845
tags question: http://stackoverflow.com/q/24644095
tags question: http://stackoverflow.com/q/24734152
tags question: http://stackoverflow.com/q/24597856
tags question: http://stackoverflow.com/q/24683208
tags question: http://stackoverflow.com/q/24631863
tags question: http://stackoverflow.com/q/24646741
tags question: http://stackoverflow.com/q/24641494
tags question: http://stackoverflow.com/q/24615515
tags question: http://stackoverflow.com/q/24696329
tags question: http://stackoverflow.com/q/24627993
tags question: http://stackoverflow.com/q/24638102
tags question: http://stackoverflow.com/q/24692847
tags question: http://stackoverflow.com/q/24641949
tags question: http://stackoverflow.com/q/24698323
tags question: http://stackoverflow.com/q/24622477
tags question: http://stackoverflow.com/q/24726196
tags question: http://stackoverflow.com/q/24654818
tags question: http://stackoverflow.com/q/24741071
tags question: http://stackoverflow.com/q/24682409
tags question: http://stackoverflow.com/q/24655469
tags question: http://stackoverflow.com/q/24687214
tags question: http://stackoverflow.com/q/24749183
tags question: http://stackoverflow.com/q/24746351
tags question: http://stackoverflow.com/q/24736933
tags question: http://stackoverflow.com/q/24686004
tags question: http://stackoverflow.com/q/24693589
tags question: http://stackoverflow.com/q/24602874
tags question: http://stackoverflow.com/q/24598853
tags question: http://stackoverflow.com/q/24644347
tags question: http://stackoverflow.com/q/24688818
tags question: http://stackoverflow.com/q/24704427
tags question: http://stackoverflow.com/q/24617391
tags question: http://stackoverflow.com/q/24705156
tags question: http://stackoverflow.com/q/24734594
tags question: http://stackoverflow.com/q/24631782
tags question: http://stackoverflow.com/q/24724673
tags question: http://stackoverflow.com/q/24619863
tags question: http://stackoverflow.com/q/24597896
tags question: http://stackoverflow.com/q/24701590
tags question: http://stackoverflow.com/q/24589873
type: Tag
tags question: http://stackoverflow.com/q/24729559
tags question: http://stackoverflow.com/q/24673187
tags question: http://stackoverflow.com/q/24671604
tags question: http://stackoverflow.com/q/24632468
tags question: http://stackoverflow.com/q/24679271

http://stackoverflow.com/a/24594003
has body: Importing everything you could think of is the first mistake. Only include the minified version. Also the Bootstrap JS components require jQuery, so you need to insert that first &lt;script src="//code.jquery.com/jquery-2.11.0.min.js"&gt;&lt;/script&gt; &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt; Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one. You have already added the placement as the data-attribute, so you can just call $("[data-toggle=tooltip]").tooltip(); Bootply http://www.bootply.com/t32oBXBH7W
score: 2
accepted answer of: http://stackoverflow.com/q/24593868
has comment: http://stackoverflow.com/comment/38147444
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24593868
has comment: http://stackoverflow.com/comment/38126156
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/38111205

http://stackoverflow.com/q/24614005
answer count: 1
has comment: http://stackoverflow.com/comment/38141680
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24614097
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has body: This is my code: var url = "http://www.google.com/finance?q=MSFT" $http.get(url).success(function (data, status, headers, config) { alert('successful'); }).error(function (data, status, headers, config) { alert('failed'); }); This is working fine. However, if I change the url to Yahoo or Reuters as follows, it always returns 404 error. url = "http://finance.yahoo.com/q/pr?s=MSFT"; url = "http://www.reuters.com/finance/stocks/companyProfile?rpc=66&amp;symbol=MSFT" Those are all valid URLs when you enter into Chrome. I understand there are related questions about $http.get at stackoverflow, but I tried some suggestions and still can't make it work. I'm very curious why the same request works for Google, but not for Yahoo and Reuters? UPDATE 1: As some suggested it may be a CROSS-ORIGIN problem, so I added the following code from here to my project: app.config(['$httpProvider', function ($httpProvider) { $httpProvider.defaults.useXDomain = true; delete $httpProvider.defaults.headers.common['X-Requested-With']; }]); However, it doesn't help. I looked at Network traffic log in Chrome, the request status is (canceled). Any clue why? UPDATE 2: Actually, I overlooked the error message in Chrome console. it shows: XMLHttpRequest cannot load http://finance.yahoo.com/q?s=MSFT. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:1486' is therefore not allowed access. So, it does seem to be a Cross-Origin issue. However, the UPDATE 1 code doesn't seem to have any effect on this. What did I do wrong? Also, why it didn't complain about Google?
tagged with: http
score: 1
linked to: http://stackoverflow.com/q/18990141
has comment: http://stackoverflow.com/comment/38149569
has comment: http://stackoverflow.com/comment/38164110
type: Question
has title: Why Angular $http.get() from Yahoo returns 404?
has comment: http://stackoverflow.com/comment/38146559
linked to: http://stackoverflow.com/q/16661032
has comment: http://stackoverflow.com/comment/38144234

http://stackoverflow.com/q/24612922
has title: Insert text at the beginning of element inside a contenteditable container
has body: Example: http://jsbin.com/vixuse/1/ How I can use range object to solve this problem? thanks in advance. My code: Hello World try to insert text in the beginning of this element When user try to insert text in the beginning of span element, result: Hello World [INSERTED_TEXT]try to insert text in the beginning of this element
tagged with: contenteditable
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38139547
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/24613797
type: Question
tagged with: selection
has comment: http://stackoverflow.com/comment/38140708
score: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38140449
has comment: http://stackoverflow.com/comment/38141329
tagged with: range

http://stackoverflow.com/q/24704043
linked to: http://stackoverflow.com/q/7137397
answer count: 4
tagged with: qunit
upvote count: 11
has answer: http://stackoverflow.com/a/51050859
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/51861149
tagged with: ruby-on-rails
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24707930
score: 11
tagged with: continuous-integration
downvote count: 0
has body: I recently started working on a Rails app that has a large amount of QUnit tests already in place for testing ember. I have been charged with the task of setting the app with a CI (I decided to use CodeShip). The issue I currently face is that the only way for me to run the qunit tests is to go to http://localhost:3000/qunit. I need to setup a way to run the tests from the command line. I have done a large amount of research, and have tried at least 10 different solutions but non have managed to work. Currently I am attempting to use teaspoon but it I have not managed to get it to work. Any help would be much appreciated. Please let me know if I need to post more information about the setup.
has answer: http://stackoverflow.com/a/29592127
favorite count: 0
has title: How to run QUnit tests from command line?
tagged with: ember.js

http://stackoverflow.com/q/24712358
score: -1
has answer: http://stackoverflow.com/a/24712516
answer count: 3
has answer: http://stackoverflow.com/a/24712465
accepted answer: http://stackoverflow.com/a/24712465
has body: I am trying to use ajax in jquery to submit a form data instead of the $HTTP service in angularJS so i can send files with the form data as well , the issue is that upon success or error i can not perform other operations like showing or hiding elements (ng-show) , there is also one more thing , i have the form data in an object called (newSubscriberInfo) , is there is a way to send the data through ajax call as so ($scope.newSubscriberInfo) instead of passing to the Ajax call an object contains the form elements (var formData = new FormData($('#newSubscriberForm')[0]))??? . here is the code $scope.saveSubscriber = function (id) { if(saveStatus === 'New'){ $http.post('subscribers/add',$scope.newSubscriberInfo) .success(function (data,success) { $scope.newSubscriberInfo.serial_number = parseInt(data); $scope.subscribers.unshift($scope.newSubscriberInfo); $scope.newSubscriberForm = false; $scope.newSubscriberInfo = {}; }) .error(function (data,error) { $scope.connectError = true; }); } else { var formData = new FormData($('#newSubscriberForm')[0]); console.log(formData); $.ajax({ url: 'subscribers/'+id+'/update', type: 'POST', data: formData, cache: false, success : function (data) { console.log(data); $scope.newSubscriberForm = false; $scope.newSubscriberInfo = {}; }, error : function (XMLHttpRequest, textStatus, errorThrown) { console.log(errorThrown); $scope.connectError = true; }, contentType: false, processData: false }); } }
has answer: http://stackoverflow.com/a/24712560
downvote count: 1
tagged with: jquery
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/24712560
has title: How can i use ajax with angularJS?
type: Question
tagged with: javascript

http://stackoverflow.com/a/24889428
answers question: http://stackoverflow.com/q/24608376
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: There are a few options for adjusting the layout Use layout:'border in your parent Panel and then specify the region (North, East, South, West, or Center) for each item you want to move. Use 'layout:'absolute' and then define the x and y coordinates for each item. See the Documentation here. Use layout:'hbox' which is well defined here.
has comment: http://stackoverflow.com/comment/38662372
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24608376

http://stackoverflow.com/q/24744863
tagged with: javascript
has comment: http://stackoverflow.com/comment/38389213
has answer: http://stackoverflow.com/a/24745532
has comment: http://stackoverflow.com/comment/38389006
linked to: http://stackoverflow.com/q/22743105
has body: I want to track clicks that users on my page. But I'm a little confused. Looking at this code: Follow Us ^ What if user get's redirected to http://example.com before google analitics tracks - then what? Am I right that that example has a race condition?
answer count: 2
linked to: http://stackoverflow.com/q/11366627
has comment: http://stackoverflow.com/comment/38389293
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24745089
type: UnansweredQuestion
score: 2
tagged with: tracking
has title: Is there a racing condition when tracking clicked links?
upvote count: 2
has comment: http://stackoverflow.com/comment/38389112
type: Question
tagged with: google-analytics
linked to: http://stackoverflow.com/q/3427580
has comment: http://stackoverflow.com/comment/38392057

http://stackoverflow.com/comment/38134692
has text: @user2132742 People won't answer quicker just because you tell them it's urgent.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24610406

http://stackoverflow.com/comment/38256946
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24675429
has text: @davidkonrad by ary = new Array(recieve) i want to assign the length of an array
score: 0

cors
tags question: http://stackoverflow.com/q/24727520
tags question: http://stackoverflow.com/q/24665105
type: Tag
tags question: http://stackoverflow.com/q/24677706
tag name: cors
tags question: http://stackoverflow.com/q/24680302
tags question: http://stackoverflow.com/q/24609526
tags question: http://stackoverflow.com/q/24673645
tags question: http://stackoverflow.com/q/24646732
tags question: http://stackoverflow.com/q/24690687
tags question: http://stackoverflow.com/q/24679914
tags question: http://stackoverflow.com/q/24743427
tags question: http://stackoverflow.com/q/24639007
tags question: http://stackoverflow.com/q/24629466
tags question: http://stackoverflow.com/q/24616126

http://stackoverflow.com/comment/38158047
type: AnswerComment
score: 0
type: Comment
has text: Note that if you click the text multiple times it will keep writing the message over previous message. You should check if there was a previous message and act accordingly.
comment on: http://stackoverflow.com/a/24621941

http://stackoverflow.com/comment/38333855
comment on: http://stackoverflow.com/q/24715896
score: 0
type: Comment
has text: I thing you've missed some part of the code to simplify it, this run runs fine, it's giving me [3] as output.
type: QuestionComment

http://stackoverflow.com/comment/38381937
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24740927
has text: Thanks @Adam spot on. I cannot believe i have not ever come across this issue before!
score: 0

http://stackoverflow.com/comment/38125001
comment on: http://stackoverflow.com/q/24605275
score: 0
has text: Well, my question is how the regular expression can be converted to avoid the automatic conversion from negative to positive values. The function is executed 'on blur' on a text field, and when typing a negative number, it turns into a positive. Thanks.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24706046
has comment: http://stackoverflow.com/comment/38314879
has body: Just check if the target is the .trigger or a parent (just in case) like you do in the if : $(document).mouseup(function (e) { if($(e.target).closest('.trigger').length) return; var container = $('#container'); if (!container.is(e.target)) { container.hide(); } }); http://jsfiddle.net/Hx65Q/1034/ The best would be to rework event handler and use click on both element, not mouseup on one and click on the other. Then you can use stop propagation : $("a.trigger").click(function (event) { $('#container').slideToggle(100) event.preventDefault(); event.stopPropagation(); //Stop the event from bubbling }); $(document).click(function (e) { var container = $('#container'); if (!container.is(e.target)) { container.hide(); } }); http://jsfiddle.net/Hx65Q/1036/
score: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24705889
answers question: http://stackoverflow.com/q/24705889
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/38315158
downvote count: 0

http://stackoverflow.com/comment/38246803
has text: have you included javascript in your HTML?
score: 3
comment on: http://stackoverflow.com/q/24670055
type: QuestionComment
type: Comment

radio-button
tags question: http://stackoverflow.com/q/24626618
tags question: http://stackoverflow.com/q/24594878
tags question: http://stackoverflow.com/q/24614108
tags question: http://stackoverflow.com/q/24610503
tags question: http://stackoverflow.com/q/24605353
tag name: radio-button
tags question: http://stackoverflow.com/q/24682455
tags question: http://stackoverflow.com/q/24608998
tags question: http://stackoverflow.com/q/24656729
type: Tag
tags question: http://stackoverflow.com/q/24741308
tags question: http://stackoverflow.com/q/24649755
tags question: http://stackoverflow.com/q/24620878
tags question: http://stackoverflow.com/q/24692566

http://stackoverflow.com/comment/38210002
score: 0
comment on: http://stackoverflow.com/a/24649461
type: Comment
type: AnswerComment
has text: thanks a lot robby for your kind guidance. It works in the fiddle. However, when i add few more options, it hangs. probably too many possibilities. Anyway, I will need to recomprehend the entire code so that I can produce mine in a table form . Thank you!

http://stackoverflow.com/comment/38168184
type: QuestionComment
type: Comment
has text: Fix the typo and include the JS in the right place and it will work fine: http://jsfiddle.net/C7gGb/3/
comment on: http://stackoverflow.com/q/24627749
score: 1

http://stackoverflow.com/comment/38181389
comment on: http://stackoverflow.com/q/24634694
has text: I posted the xml of the "el" object
score: 0
type: Comment
type: QuestionComment

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/24658432
tags question: http://stackoverflow.com/q/24627726
tags question: http://stackoverflow.com/q/24594606
tags question: http://stackoverflow.com/q/24738715
type: Tag

http://stackoverflow.com/comment/38366634
has text: I think having "standard media queries" is a bad habit. You need to decide media queries, depending on when they would make sense (in order to keep the page readable and good looking)
comment on: http://stackoverflow.com/a/24732070
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/24590338
has body: Looking at your pseudo code, we know a few things: this.state.data is an array of items this.isSpecial(item) tells us if an item is the special one when Esc is pressed, we want to set state.currentItem to the special item With this, we can remove this special logic from the render function, and only have it in our keypress handler. componentDidMount: function(){ $(document).keydown(function(e) { if (e.which === 27) { var special = this.state.data.find(this.isSpecial); this.setState({currentItem: special}); } }.bind(this)); } This does rely on Array.prototype.find, which is lazy (so more efficient), and we're only doing this check when the user presses the Esc key... which is probably much less often than your render function being called. If the user is going to be hitting this key a lot, you might have slightly better performance by storing it in this.specialItem in componentWillRecieveProps. Is it idiomatic in React to store this reference in this.props.specialItem or this.specialItem? You should never set a prop with this.props.anything = something. And as always, don't forget to remove your event handlers in componentWillUnmount.
accepted answer of: http://stackoverflow.com/q/24590176
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/38096005
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24590176

http://stackoverflow.com/comment/38215796
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24652763
type: Comment
has text: `zoom_changed` event: using `map.getZoom()` you can get information about current zoom value and compare it with previous saved one.

http://stackoverflow.com/a/51935129
type: Answer
has comment: http://stackoverflow.com/comment/92196448
has body: Building on an earlier answer, I am doing this in an Angular5 project. Started with: // el.scrollIntoView(true); el.scrollIntoView({ behavior: 'smooth', block: 'start' }); window.scrollBy(0, -10); But this gave some problems and needed to setTimeout for the scrollBy() like this: //window.scrollBy(0,-10); setTimeout(() =&gt; { window.scrollBy(0,-10) }, 500); And it works perfectly in MSIE11 and Chrome 68+. I have not tested in FF. 500ms was the shortest delay I would venture. Going lower sometimes failed as the smooth scroll had not yet completed. Adjust as required for your own project. +1 to Fred727 for this simple but effective solution.
score: 7
answers question: http://stackoverflow.com/q/24665602
downvote count: 1
upvote count: 8

http://stackoverflow.com/comment/38322733
score: 0
comment on: http://stackoverflow.com/a/24709467
type: Comment
has text: @RahulDesai: Setting `value` programmatically doesn’t trigger any events.
type: AnswerComment

http://stackoverflow.com/comment/38117710
type: Comment
comment on: http://stackoverflow.com/a/24599899
score: 0
type: AnswerComment
has text: Unfortunately this doesn't give me the element name itself in the ::after "tooltip".

http://stackoverflow.com/q/24639522
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
tagged with: ajax
favorite count: 0
has title: How to send more than one AJAX request to one PHP file?
has answer: http://stackoverflow.com/a/24639563
upvote count: 1
tagged with: php
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/24639563
has body: I am trying to send multiple AJAX requests to one PHP file, because I am creating a big project and in the index page there is a lot of buttons which have different functionality. It would be very bad to make for each button a file with PHP. This is my AJAX code: $('#check').click(function(){ var val = $(this).filter('input:checked').val(); $.ajax({ url: './process/upload.php', type: 'POST', data: {'check': val}, success: function(data){ alert(data); } }); }); In the PHP file I can't add if(isset($_POST['check'])){} It won't work but if I write it like this if(isset($_POST)){} To do it like if(isset($_POST)){} it will cause some errors if I add if(isset($_POST)){} for another button This is the HTML: &lt;input type="checkbox" name="check" class="check" id="check" checked&gt;
answer count: 1

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/24669099
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/24679975

http://stackoverflow.com/comment/38362625
type: Comment
type: QuestionComment
score: 2
has text: You can add an html data-attribute and give value of album_id. Then change the ajax URL to `url: "/albums" + $(this).data('album_id') + ".json"`
comment on: http://stackoverflow.com/q/24730611

http://stackoverflow.com/q/24641103
has answer: http://stackoverflow.com/a/24641154
possible better answer: http://stackoverflow.com/a/24641192
has answer: http://stackoverflow.com/a/24641192
upvote count: 3
answer count: 3
accepted answer: http://stackoverflow.com/a/24641154
has body: I have this HTML on one page: .... And this on another: ..... And I'm trying to add a style if .category-products has .rugs-cat as a descendant and remove it if it doesn't. I tried this (executed on dom ready): if(jQuery(".category-products").has(".rugs-cat")) { jQuery(".category-products").css("margin-left", "150px") } else { jQuery(".category-products").css("margin-left", "0"); } But the margin is added every time. I'm sure there is no .rugs-cat class anywhere in the second page.
has title: jQuery.has() is always true
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/24641273
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
score: 3

http://stackoverflow.com/q/24644993
type: Question
tagged with: polymer
score: 3
has body: I have a and inside it is a element inside . contains a set of custom elements that I have defined and only one of those elements are shown at any point of time. However the problem is, there are elements that take only part of the screen but still scroll vertically. The amount of scrolling is equal to the tallest element within . The expected behavior is that the element should scroll only if it exceeds it's view port. How can I achieve this behavior? demo-students.html (Stripped down version, to make it more readable) <core-drawer-panel…> … Students <student-editor name="student_editor"></students-editor>
has comment: http://stackoverflow.com/comment/38244919
answer count: 2
has title: Handling polymer elements with different heights inside <core-pages>
has answer: http://stackoverflow.com/a/25291809
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24666884
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 3
has comment: http://stackoverflow.com/comment/38224692

http://stackoverflow.com/q/24608116
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24612668
has comment: http://stackoverflow.com/comment/38129821
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/38131975
has comment: http://stackoverflow.com/comment/38137349
type: Question
has body: I want to remove my header / footer whenever my website is viewed in an iframe / lightbox. I searched the web around a bit and came up with the following code: if (window.top!=window.self) { // In a Frame or IFrame echo "&lt;style&gt; .sticky-wrapper{ display: none !important;} .header-contact-bar {display: none !important;} #as.footer { display: none !important;} &lt;/style&gt;"; } else { // Not in a frame } The CSS gets changed in the lightbox too but also on my site. The problem is. I can't figure out why it is also adding the css when im not in an lightbox / iframe. Am I doing something worng with the code? Does the code work at all? Do I have to put something in the else statement? So yes. What?
tagged with: javascript
has answer: http://stackoverflow.com/a/24612668
has title: Add certain CSS style's ONLY when the site is viewed in an iframe or lightbox
score: 0
answer count: 1

http://stackoverflow.com/comment/38170951
has text: Well both, on the device nothing happens at all, on the browser i get that error
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24629092

http://stackoverflow.com/comment/38379993
has text: Can you provide a jsfiddle? I couldn't reproduce the problem. I tried `var json = '{"event-name-one":{"0":1405346400,"1":1405347600},"event-name-two":{"0":1405357200,"1":1405358400}}'; jQuery.each(jQuery.parseJSON(json), function(i, v) { console.log(i, v); });` which logged the following: `event-name-one Object {0: 1405346400, 1: 1405347600}` and `event-name-two Object {0: 1405357200, 1: 1405358400}`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24739935

memoization
type: Tag
tags question: http://stackoverflow.com/q/24641427
tag name: memoization

http://stackoverflow.com/comment/38373550
has text: I already reported this problem to SmartGWT team, but no response till now.
type: Comment
comment on: http://stackoverflow.com/a/24703251
score: 0
type: AnswerComment

split
tags question: http://stackoverflow.com/q/24632012
tags question: http://stackoverflow.com/q/24643226
tag name: split
tags question: http://stackoverflow.com/q/24731033
tags question: http://stackoverflow.com/q/24683044
tags question: http://stackoverflow.com/q/24588120
type: Tag

http://stackoverflow.com/comment/38284360
comment on: http://stackoverflow.com/a/24689734
score: 0
type: AnswerComment
type: Comment
has text: Ok if you remove if (a==1){result='UN '+result;} all words from 1 to 999 will be affected.

http://stackoverflow.com/a/24682157
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/99516820
type: Answer
has body: Found a working case to get node.js restarted from app itself: Example: // Optional part (if there's an running webserver which blocks a port required for next startup try { APP.webserver.close(); // Express.js instance APP.logger("Webserver was halted", 'success'); } catch (e) { APP.logger("Cant't stop webserver:", 'error'); // No server started APP.logger(e, 'error'); } // First I create an exec command which is executed before current process is killed var cmd = "node " + APP.config.settings.ROOT_DIR + 'app.js'; // Then I look if there's already something ele killing the process if (APP.killed === undefined) { APP.killed = true; // Then I excute the command and kill the app if starting was successful var exec = require('child_process').exec; exec(cmd, function () { APP.logger('APPLICATION RESTARTED', 'success'); process.kill(); }); } The only con I can see here is to loose outputs on console but if anything is logged into logfiles it's not a problem.
score: 17
upvote count: 18
downvote count: 1
has comment: http://stackoverflow.com/comment/104420085
has comment: http://stackoverflow.com/comment/101582428
accepted answer of: http://stackoverflow.com/q/24666696
has comment: http://stackoverflow.com/comment/104972439
answers question: http://stackoverflow.com/q/24666696

http://stackoverflow.com/comment/38374818
has text: Side note : instead of alerting when you are debugging, you should use `console.log()` in the eventuality where you would forget to remove such debugging lines, it wouldn't interfere with the user experience at least.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24737123

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/24618479
type: Tag

http://stackoverflow.com/q/24637072
has title: JSSOR - strange caption behaviour during slide transition
tagged with: jssor
type: AnsweredQuestion
has body: I am developing a slider with jssor. The caption play in transition and play out transition work well but during the slide transition the caption appear again. I wrote a very simple example only two slides with one caption each, only to show the problem. Here is the jsfiddle ##edit### this jsfiddle work http://jsfiddle.net/PfV3S/ Here the html code: Here the js code: var _CaptionTransitions = []; _CaptionTransitions["LOGO"] = { $Duration: 1800, $Zoom: 1, $FlyDirection: 9, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $ScaleHorizontal: 0.3, $ScaleVertical: 0.3, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5 } }; var options = { $AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false $DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0), $CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption $Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption $CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder $PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1 $PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1 } }; var jssor_slider1 = new $JssorSlider$("slider1_container", options); Here the css code: #slider1_container { position: relative; margin: 0 auto; float: left; top: 0px…
type: Question
accepted answer: http://stackoverflow.com/a/24643544
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/24643544

http://stackoverflow.com/q/24693844
type: UnansweredQuestion
downvote count: 1
has title: Finding the source event that triggered ajaxError
has comment: http://stackoverflow.com/comment/38291539
type: Question
answer count: 2
has body: i have this sample that i am fiddling with - jsFiddle From inside the ajaxError event (see code), HOW do you find source event that raised the ajaxError? (in this case the click event on the #global dom should be the source) $('html').ajaxError(function(e, xhr, settings, exception) { if (!handledLocally){ if (xhr.status == 404) { alert("html error callback"); } handledLocally = false; } });
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24694352
tagged with: jquery
has answer: http://stackoverflow.com/a/24694147
favorite count: 0
score: -1

http://stackoverflow.com/q/24722995
tagged with: javascript
has comment: http://stackoverflow.com/comment/38348116
score: 0
tagged with: polling
accepted answer: http://stackoverflow.com/a/24723031
answer count: 1
tagged with: ajax
has answer: http://stackoverflow.com/a/24723031
tagged with: mysqli
tagged with: php
has body: I'm having a little trouble fetching the newest bit of data. All I'm wanting is to find if there is any new data in the database and print the number of records back into my page. I have the ajax working and it has the last notification_id that it sends over to the php. I just need to get the php to select any new data, send it back and print it out. I haven't yet tried polling, but will look into it when I have this working and understand it a bit better. &lt;? $call="SELECT * FROM notifications WHERE notification_targetuser='$user1_id' AND notification_status=1 ORDER BY notification_id DESC LIMIT 1"; $chant=mysqli_query($mysqli,$call) or die(mysqli_error($mysqli)); while($notification_id=mysqli_fetch_array($chant)) { ?&gt; &lt;script type="text/javascript"&gt; setInterval(function(){ var notification_id="&lt;?php echo $notification_id['notification_id'] ;?&gt;" $.ajax({ type: "GET", url: "viewajax.php?notification_id="+notification_id, dataType:"json", cache: false, success: function(data){ $(".mess"+notification_id).prepend("&lt;span class'mess' id='mes'&gt;"+response['notification_id']+"&lt;/span&gt;"); } }); },20000); &lt;/script&gt; &lt;? }?&gt; echo ''; PHP viewajax.php - changed it to JSON - but getting {"notification_id":null} in the response &lt;?php session_start(); include"database.php"; if(isset($_GET['notification_id'])) { $id=$_GET['notification_id']; $user1_id=$_SESSION['id']; $json = array(); $com=mysqli_query($mysqli,"select notification_id from notifications where notification_id&gt;'$id' AND notification_targetuser='$user1_id' AND notification_status=1"); $resultArr = mysqli_fetch_array($com); $json['notification_id'] = $resultArr['notification_id']; mysqli_free_result($com); echo json_encode($json); }?&gt;
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38347992
has title: Ajax/php getting newest data notification
type: Question

http://stackoverflow.com/comment/38131284
comment on: http://stackoverflow.com/q/24608152
type: Comment
score: 0
type: QuestionComment
has text: No functionality wise no issues, I am trying to accomplish the User experience, In the dropdown I need "Afghanistan (+ 93)" while select I just need to show "93"

http://stackoverflow.com/a/24626072
answers question: http://stackoverflow.com/q/24625907
score: 0
has comment: http://stackoverflow.com/comment/38165468
type: Answer
has body: I suppose because the "change" listener on document stays active from the first call and in the followings call it's duplicated and so on... Try to eliminate the listener and put the template into the book-details-items: $("#book-details-items").html(html2);

http://stackoverflow.com/q/24680522
type: Question
has body: I have an SDK extension that injects script on pages. In the addon options there is 1 bool that used to turn that script on or off. var pageMod = require("sdk/page-mod"); var data = require("sdk/self").data; var prefs = require("sdk/simple-prefs").prefs; function onPrefChange(prefName) { if (prefs.showMAC) { //if true - apply pagemod pageMod.PageMod({ include: "*.mydomen.net", attachTo: ["existing", "top"], contentScriptFile: data.url("proxy_open.js") }); }else{ //if false - remove pagemod } } require("sdk/simple-prefs").on("showMAC", onPrefChange); I'm new to all that extensions stuff and can't find any information about how to apply destroy() correctly, can anyone explain how to do this correctly? I've tried pageMod.destroy(); that gives "not a function" error.
downvote count: 0
tagged with: javascript
has title: How to apply pagemod destroy() method?
answer count: 1
tagged with: firefox-addon-sdk
favorite count: 0
has answer: http://stackoverflow.com/a/24680773
accepted answer: http://stackoverflow.com/a/24680773
type: AnsweredQuestion
score: 3
upvote count: 3

regex
tags question: http://stackoverflow.com/q/24647038
tags question: http://stackoverflow.com/q/24616463
tags question: http://stackoverflow.com/q/24681339
tags question: http://stackoverflow.com/q/24707110
tags question: http://stackoverflow.com/q/24719715
tags question: http://stackoverflow.com/q/24686303
tags question: http://stackoverflow.com/q/24727841
tags question: http://stackoverflow.com/q/24732745
tag name: regex
tags question: http://stackoverflow.com/q/24636084
tags question: http://stackoverflow.com/q/24695377
tags question: http://stackoverflow.com/q/24729704
tags question: http://stackoverflow.com/q/24708110
tags question: http://stackoverflow.com/q/24738231
tags question: http://stackoverflow.com/q/24710804
tags question: http://stackoverflow.com/q/24718348
tags question: http://stackoverflow.com/q/24653164
tags question: http://stackoverflow.com/q/24744587
tags question: http://stackoverflow.com/q/24591264
tags question: http://stackoverflow.com/q/24633268
tags question: http://stackoverflow.com/q/24661418
tags question: http://stackoverflow.com/q/24713155
tags question: http://stackoverflow.com/q/24738347
tags question: http://stackoverflow.com/q/24610406
tags question: http://stackoverflow.com/q/24623395
tags question: http://stackoverflow.com/q/24734405
tags question: http://stackoverflow.com/q/24695765
tags question: http://stackoverflow.com/q/24613851
tags question: http://stackoverflow.com/q/24704140
tags question: http://stackoverflow.com/q/24589434
tags question: http://stackoverflow.com/q/24604225
tags question: http://stackoverflow.com/q/24649846
tags question: http://stackoverflow.com/q/24708257
tags question: http://stackoverflow.com/q/24633561
tags question: http://stackoverflow.com/q/24667103
tags question: http://stackoverflow.com/q/24625104
tags question: http://stackoverflow.com/q/24667087
tags question: http://stackoverflow.com/q/24592693
tags question: http://stackoverflow.com/q/24640282
tags question: http://stackoverflow.com/q/24588120
tags question: http://stackoverflow.com/q/24708165
tags question: http://stackoverflow.com/q/24628584
tags question: http://stackoverflow.com/q/24686588
tags question: http://stackoverflow.com/q/24700927
tags question: http://stackoverflow.com/q/24682299
tags question: http://stackoverflow.com/q/24725161
tags question: http://stackoverflow.com/q/24594108
tags question: http://stackoverflow.com/q/24683447
tags question: http://stackoverflow.com/q/24677759
tags question: http://stackoverflow.com/q/24647730
tags question: http://stackoverflow.com/q/24713516
tags question: http://stackoverflow.com/q/24720733
tags question: http://stackoverflow.com/q/24611669
tags question: http://stackoverflow.com/q/24631659
tags question: http://stackoverflow.com/q/24700774
tags question: http://stackoverflow.com/q/24588516
tags question: http://stackoverflow.com/q/24722906
tags question: http://stackoverflow.com/q/24636902
tags question: http://stackoverflow.com/q/24620780
tags question: http://stackoverflow.com/q/24694468
tags question: http://stackoverflow.com/q/24718654
tags question: http://stackoverflow.com/q/24689245
tags question: http://stackoverflow.com/q/24720369
tags question: http://stackoverflow.com/q/24670968
tags question: http://stackoverflow.com/q/24614758
tags question: http://stackoverflow.com/q/24622151
tags question: http://stackoverflow.com/q/24743200
tags question: http://stackoverflow.com/q/24647958
tags question: http://stackoverflow.com/q/24609920
tags question: http://stackoverflow.com/q/24605275
tags question: http://stackoverflow.com/q/24664867
tags question: http://stackoverflow.com/q/24687377
tags question: http://stackoverflow.com/q/24653117
tags question: http://stackoverflow.com/q/24712009
tags question: http://stackoverflow.com/q/24710210
tags question: http://stackoverflow.com/q/24677898
tags question: http://stackoverflow.com/q/24699268
tags question: http://stackoverflow.com/q/24679661
tags question: http://stackoverflow.com/q/24628063
tags question: http://stackoverflow.com/q/24624331

http://stackoverflow.com/a/24629929
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24629531
has body: Your uncheck function have some error. Instead of removing style attribute you are adding different styels. So the actual hover style not applying. Instead of this function uncheck() { element = document.getElementById("pseudoCheckBoxes"); items = element.getElementsByTagName("LI"); items[0].style.backgroundColor = "white"; items[0].style.borderColor = "#d6dbdf"; } Use like this. function uncheck() { element = document.getElementById("pseudoCheckBoxes"); items = element.getElementsByTagName("LI"); items[0].removeAttribute("style"); } DEMO

http://stackoverflow.com/q/24593508
type: UnansweredQuestion
has title: Imacro - Javascript Conditional For Scrolling To Bottom of Page
tagged with: conditional-statements
tagged with: imacros
upvote count: 5
type: Question
score: 5
tagged with: for-loop
has answer: http://stackoverflow.com/a/38135828
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
has body: There are some imacro with Javascript conditional questions on here, but nothing that gave me what I need... I tried this question: http://forum.imacros.net/viewtopic.php?f=11&amp;t=14010, but mine is different as I don't need to use the EXTRACT command because I already know the words in the text ...I can't figure out why this isn't working... I have a feeling the logic here is off (if(macro=="Follow"){) but I don't know for sure. I am trying to set up an imacro for following people on Pinterest. What I would like to accomplish is that once it reaches the end of the page it is following people on, it will scroll down to reveal more people to follow. Also, if I type in a search for a keyword where everyone on the first page is already followed, I would like it to scroll down until it reaches users I have not followed - even if it has to run this code (URL GOTO=javascript:window.scrollBy(0,20000)) multiple times to pass multiple pages to get to the new set of people I have not followed. I used this code for the scoll down: URL GOTO=javascript:window.scrollBy(0,20000). I am having problems, however because I cannot figure out the conditional... I approached it by if there was not "Follow" text (no one to follow), then it would jump out of the if statement, and to the else statement. It would scroll down until it reached someone to follow and run the macro after it had reached someone (without wasting another increment in the for loop. Here's the code: // Location where the imacro goes. window.location="http://www.pinterest.com/search/boards/?q=ponies" + "\n"; // Gives time for the page to load. var macro = "WAIT SECONDS=10" + "\n"; // Sets no delay time between each step. var macro = "CODE:SET !REPLAYSPEED FAST" + "\n"; // Tells imacro to ignore errors. var macro = "CODE:SET !ERRORIGNORE YES" + "\n"; // Sets the timeout for missing tags to 0 seconds (not 6 seconds). var macro = "CODE:SET !TIMEOUT_STEP 0" + "\n"; // Clicks the "follow button on Pinterest." macro += "TA…

http://stackoverflow.com/q/24598604
has comment: http://stackoverflow.com/comment/38112491
possible better answer: http://stackoverflow.com/a/24599440
tagged with: javascript
tagged with: jquery
has title: show a number of inputs type text equal to the number of selected files in my input file without send form
accepted answer: http://stackoverflow.com/a/24599342
has comment: http://stackoverflow.com/comment/38111574
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24599342
has answer: http://stackoverflow.com/a/24599440
type: Question
score: 0
answer count: 2
has body: Im uploading multiple pdfs at same time, and Im trying to find a method to give a a custom title for each uploaded pdf. So I thought at first using php, I store a variable to count pdfs that the user selected $countPdfs = count($_FILES['pdfs']['tmp_name']); And then in my form, I have some php where I show a text input to write a title for each pdf that I upload. Pdfs: Select many pdfs <?php if(isset($countPdfs )){ for($i=1;$i<=$countPdfs ;$i++){ echo ' '; echo 'Pdf Title:'; echo ' '; echo ' '; } } ?> And so If I select 5 pds it shows me 5 text inputs, it is working fine. But I need to send my form and only after send form my inputs appear. Do you know how can I do this using jQuery? After I select my pdfs in my input file, show the same number of input texts that my number of selected pdfs? Im already using this jQuery function below to show in my input the number of pdfs that user select: $('.j_gsendpdf').click(function(){ $('.j_gallerypdf').click().change(function(){ var numFiles = $(this)[0].files.length; $('.j_gfalsepdf').animate({width:'400'}, 500, function(){ $(this).html('You selected'+ numFiles +' files.'); }); }); }); But do you know how can I use this numFiles also to open a number of input texts icual to my numFiles variable?

icicle-diagram
tag name: icicle-diagram
tags question: http://stackoverflow.com/q/24669037
type: Tag

http://stackoverflow.com/q/24615891
type: Question
score: 5
upvote count: 5
accepted answer: http://stackoverflow.com/a/24616274
tagged with: javascript
has body: I am new to Promises and I was wondering what the best practice is to keep variables while going down the chain? Connecting to MongoDB via Promise is pretty straight forward: connectToMongoDB(data).done(function(db) { var collection = db.collection('test_inserts'); // do more stuff here }); But what happens if I have to connect to two different databases? connectToMongoDB1(data1).then(function(db1) { return connectToMongoDB2(data2); }).done(function(db2) { var collection = db1.collection('test_inserts'); // ERROR: db1 is undefined }); That error makes perfect sense. But how do I forward db1 without altering my connectToMongoDB2() function, because I want to keep connectToMongoDB2() and all my promises in general very generic? I mean, I could wrap an object around that stores all the relevant stuff, but that looks kind of hacky: var relevantStuff = {}; connectToMongoDB1(data1).then(function(db1) { relevantStuff.db1 = db1; return connectToMongoDB2(data2); }).done(function(db2) { var collection = relevantStuff.db1.collection('test_inserts'); // do more stuff here }); What is the best practice?
answer count: 3
has title: Best practice to hang on to variables when using Promises
has comment: http://stackoverflow.com/comment/38149589
downvote count: 0
possible better answer: http://stackoverflow.com/a/24615940
favorite count: 0
tagged with: promise
has comment: http://stackoverflow.com/comment/38145688
has answer: http://stackoverflow.com/a/24615940
linked to: http://stackoverflow.com/q/28250680
has comment: http://stackoverflow.com/comment/38146193
has comment: http://stackoverflow.com/comment/38146177
duplicate of: http://stackoverflow.com/q/28250680
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24616274
has answer: http://stackoverflow.com/a/24616689

http://stackoverflow.com/comment/65095622
type: QuestionComment
score: 0
has text: @Fabien you mean to say adding data-rel="back" in your save button ?
comment on: http://stackoverflow.com/q/24692596
type: Comment

http://stackoverflow.com/comment/38170026
has text: Where is the rest? Also, try to make a fiddle.
type: Comment
comment on: http://stackoverflow.com/q/24628758
type: QuestionComment
score: 0

http://stackoverflow.com/q/24663018
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24663137
score: 4
tagged with: html-table
answer count: 2
has title: How do I select rows that correspond to a rowspan?
has answer: http://stackoverflow.com/a/24663137
tagged with: jquery
has comment: http://stackoverflow.com/comment/38234670
favorite count: 0
possible better answer: http://stackoverflow.com/a/24742843
has comment: http://stackoverflow.com/comment/38236479
upvote count: 4
tagged with: css
has body: I have a dynamically generated table that I am trying to change the background color of certain rows in. Sometimes there are rows with rowspans and I cant figure out how to get all of the rows that correspond to the one "row." I've googled my brains out and found this jsfiddle which is pretty close to what i need (in a logic sense) http://jsfiddle.net/DamianS1987/G2trb/ basically i have something like this: and I want to be able to highlight full rows at a time like this: but the only highlighting i can achieve on rowspan rows is this: Here is my code (different from jsfiddle but essentially same logic) CSS: .highlightedClass{ background-color: #AEAF93; } HTML: ID NAME Miles WORK 999B John 702.4 Y 111A Tom 446.5 Y Becky 446.5 A JAVASCRIPT: for(var j=0; j < inspection.length; j++){ var $tr = $(' '); var $td_id = $(' ').addClass('td_id').html(inspection.id); $tr.append($td_id); $table.append($tr); $.each(inspection[i], function(index, value){ var $td_name, $td_miles,$td_workEvent; if(index > 0){ var $2nd_tr = $(' '); $td_name = $(' ').addClass('td_name').html(value.stationSt); $td_miles = $(' ').addClass('td_miles').html(value.miles); $td_workEvent = $(' ').addClass('td_workEvent').html(value.code); $2nd_tr.append($td_name); $2nd_tr.append($td_miles); $2nd_tr.append($td_workEvent); $table.append($2nd_tr); $td_id.attr('rowSpan',index+1); if($td_id.text() === content().id){ $2nd_tr.addClass("highlightedClass"); }else{ if($2nd_tr.hasClass("highlightedClass")){ $2nd_tr.removeClass('highlightedClass'); } } $('#workevent').on('click', function(){ $tr.removeClass('highlightedClass'); }); }else{ $td_name = $(' ').addClass('td_name').html(value.stationSt); $td_miles = $(' ').addClass('td_miles').html(value.miles); $td_workEvent = $(' ').addClass('td_workEvent').html(value.code); $tr.append($td_name); $tr.append($td_miles); $tr.append($td_workEvent); $table.append($tr); if($td_id.text() === content().id){ $tr.addClass("highlightedClass"); }else{ if($tr.hasClass("highlightedClas…
has answer: http://stackoverflow.com/a/24742843
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/24655081
score: 0
answers question: http://stackoverflow.com/q/24654670
type: Answer
has body: Try var numImgs = $('div.myClassName img').length; if(numImgs&gt;1) { \\Do your bxslider reload here } Instead you can use Jquery Selector too like below jQuery(".image").Length Hope this helps... Click here to read about selectors Click

http://stackoverflow.com/a/24716502
has comment: http://stackoverflow.com/comment/38335379
type: Answer
answers question: http://stackoverflow.com/q/24716240
has body: That doesn't make sense: why do you want a dynamically named variable? You refer to a property of an object with variableName.propertyName. In this case, that would be personName.firstname. That is how you would store the first name, not as the variable name itself (that wouldn't make sense: how would you refer to the object?).
has comment: http://stackoverflow.com/comment/38335320
has comment: http://stackoverflow.com/comment/38335056
has comment: http://stackoverflow.com/comment/38335199
has comment: http://stackoverflow.com/comment/38335131
has comment: http://stackoverflow.com/comment/38335250
has comment: http://stackoverflow.com/comment/38335300
has comment: http://stackoverflow.com/comment/38334994
has comment: http://stackoverflow.com/comment/38335365
has comment: http://stackoverflow.com/comment/38335117
score: 0

http://stackoverflow.com/comment/38304199
type: QuestionComment
has text: There's not enough info here to reproduce this or help out. Could you start with version info, and a short example we could run to see the problem? Have you checked the error callbacks to ensure user is actually logged in? Have you checked the JavaScript console? There's not enough here to know where to start.
comment on: http://stackoverflow.com/q/24691831
score: 0
type: Comment

http://stackoverflow.com/a/24703481
has comment: http://stackoverflow.com/comment/38309833
type: Answer
has comment: http://stackoverflow.com/comment/38316403
has body: In your condition you're getting a string, $NaN as you're doing var rate = "$" + Math.floor(((total_sala ... see how you add the dollarsign making it a string, and that's not NaN, it's a string Remove the dollarsign var rate = Math.floor(((total_sala ... then do (note the condition is the wrong way around in your code) if (isNaN(rate)) { required_rate.innerHTML = ""; } else { required_rate.innerHTML = '$' + rate; } comparing the actual number in the condition, and then adding the dollarsign FIDDLE
has comment: http://stackoverflow.com/comment/38318410
has comment: http://stackoverflow.com/comment/38310033
upvote count: 5
has comment: http://stackoverflow.com/comment/38310163
has comment: http://stackoverflow.com/comment/38320647
accepted answer of: http://stackoverflow.com/q/24703386
score: 5
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24703386
downvote count: 0

http://stackoverflow.com/comment/38384701
type: Comment
type: QuestionComment
has text: CTRL+A (at least in Chrome) does not select anything
score: 0
comment on: http://stackoverflow.com/q/24742407

http://stackoverflow.com/comment/38115607
comment on: http://stackoverflow.com/a/24596415
score: 0
type: AnswerComment
type: Comment
has text: You're not including the Fancybox script on [your page](http://goo.gl/f0B0Jc). Thus you get an error when the script loads ("undefined is not a function", because `.fancybox` is undefined), and so your smooth scrolling code isn't running at all.

http://stackoverflow.com/a/24610065
has comment: http://stackoverflow.com/comment/38134080
has comment: http://stackoverflow.com/comment/38133851
has comment: http://stackoverflow.com/comment/38134816
has comment: http://stackoverflow.com/comment/38134028
answers question: http://stackoverflow.com/q/24609912
upvote count: 5
has comment: http://stackoverflow.com/comment/58841259
score: 5
downvote count: 0
has body: A quick and easy solution is to uncomment this line in Gemfile and run bundle install again gem 'therubyracer', platforms: :ruby
has comment: http://stackoverflow.com/comment/38133875
type: Answer

http://stackoverflow.com/q/24658778
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: select
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/203198
tagged with: javascript
tagged with: jquery
duplicate of: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/24659066
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: Interacting with JavaScript-generated HTML
upvote count: 2
has body: Using javascript, I have taken data from a JSON file and placed it into an HTML select element. Each item from the JSON file is in a different option element within the select. I would like to now be able to display a user's selected option in an HTML input element. I thought that this would work using this code: &lt;script&gt; $( "select" ) .change(function() { var str = ""; $( "select option:selected" ).each(function() { str += $( this ).text() + " "; }); $( "div" ).text( str ); }) .trigger( "change" ); &lt;/script&gt; I think my issue is that my HTML generated from the javascript is not recognized. Is there a way I can make this work? Thanks
accepted answer: http://stackoverflow.com/a/24659066
type: AnsweredQuestion

http://stackoverflow.com/q/24647620
has body: Is there any way to extract details of mongo db operation from commands using js or other?? For example,Suppose i have a database of 'Hospital'. When i insert a document to patient Collection by the command db.patient.insert({name:'Sam',age:30}) ,i have to store the extracted info as database='Hospital' Collection='Patient' Operation='Insert' Document='{name:'Sam',age:30}'
has comment: http://stackoverflow.com/comment/38205608
tagged with: pymongo
has comment: http://stackoverflow.com/comment/38211115
type: Question
has comment: http://stackoverflow.com/comment/38207704
tagged with: mongodb
has comment: http://stackoverflow.com/comment/38207494
tagged with: javascript
score: 0
has title: How could I extract details from mongoDB operations using javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38206678
tagged with: mongodb-query
answer count: 0

highcharts
tags question: http://stackoverflow.com/q/24734065
tags question: http://stackoverflow.com/q/24729961
tags question: http://stackoverflow.com/q/24646132
tags question: http://stackoverflow.com/q/24615872
tags question: http://stackoverflow.com/q/24672676
tags question: http://stackoverflow.com/q/24714508
tags question: http://stackoverflow.com/q/24718870
tags question: http://stackoverflow.com/q/24632155
tags question: http://stackoverflow.com/q/24594025
tags question: http://stackoverflow.com/q/24736089
tags question: http://stackoverflow.com/q/24676749
tags question: http://stackoverflow.com/q/24632745
tags question: http://stackoverflow.com/q/24607706
tags question: http://stackoverflow.com/q/24666618
tags question: http://stackoverflow.com/q/24609013
tags question: http://stackoverflow.com/q/24604866
tags question: http://stackoverflow.com/q/24632229
tags question: http://stackoverflow.com/q/24615935
tags question: http://stackoverflow.com/q/24618669
tags question: http://stackoverflow.com/q/24644095
tags question: http://stackoverflow.com/q/24675962
tags question: http://stackoverflow.com/q/24627345
tags question: http://stackoverflow.com/q/24627301
tags question: http://stackoverflow.com/q/24637195
tags question: http://stackoverflow.com/q/24625856
tags question: http://stackoverflow.com/q/24688384
tags question: http://stackoverflow.com/q/24694371
tags question: http://stackoverflow.com/q/24608686
tags question: http://stackoverflow.com/q/24606089
tags question: http://stackoverflow.com/q/24673666
tags question: http://stackoverflow.com/q/24644938
tags question: http://stackoverflow.com/q/24693506
tags question: http://stackoverflow.com/q/24611115
tags question: http://stackoverflow.com/q/24731369
tags question: http://stackoverflow.com/q/24689140
tags question: http://stackoverflow.com/q/24683498
tags question: http://stackoverflow.com/q/24672469
tags question: http://stackoverflow.com/q/24623719
tags question: http://stackoverflow.com/q/24633254
tags question: http://stackoverflow.com/q/24616131
tags question: http://stackoverflow.com/q/24701587
tags question: http://stackoverflow.com/q/24647435
tags question: http://stackoverflow.com/q/24623983
tags question: http://stackoverflow.com/q/24634944
tags question: http://stackoverflow.com/q/24660807
tags question: http://stackoverflow.com/q/24676467
tags question: http://stackoverflow.com/q/24589376
tags question: http://stackoverflow.com/q/24694757
tags question: http://stackoverflow.com/q/24646849
tags question: http://stackoverflow.com/q/24675885
tags question: http://stackoverflow.com/q/24738026
tags question: http://stackoverflow.com/q/24638316
tags question: http://stackoverflow.com/q/24701800
tags question: http://stackoverflow.com/q/24645946
tags question: http://stackoverflow.com/q/24624647
tags question: http://stackoverflow.com/q/24618815
tags question: http://stackoverflow.com/q/24661977
tags question: http://stackoverflow.com/q/24620232
tags question: http://stackoverflow.com/q/24603355
tags question: http://stackoverflow.com/q/24729676
tags question: http://stackoverflow.com/q/24613543
tags question: http://stackoverflow.com/q/24672930
tags question: http://stackoverflow.com/q/24729663
tags question: http://stackoverflow.com/q/24615549
tags question: http://stackoverflow.com/q/24689902
tags question: http://stackoverflow.com/q/24635610
type: Tag
tags question: http://stackoverflow.com/q/24658332
tags question: http://stackoverflow.com/q/24612012
tags question: http://stackoverflow.com/q/24646198
tag name: highcharts
tags question: http://stackoverflow.com/q/24665595
tags question: http://stackoverflow.com/q/24673438

http://stackoverflow.com/q/24673329
has comment: http://stackoverflow.com/comment/38252833
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24673409
type: Question
has answer: http://stackoverflow.com/a/24673470
has title: Get specific el. class if it has many classes
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24673526
upvote count: 1
has comment: http://stackoverflow.com/comment/38252817
downvote count: 1
has answer: http://stackoverflow.com/a/24673383
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24673966
has comment: http://stackoverflow.com/comment/38252795
has body: How can I get zoneID-37 by checking if it has class 'drag-circle'? I can select the element by $('.drag-circle') but then what?
answer count: 5

http://stackoverflow.com/a/24626559
downvote count: 1
has body: I think you should just use .wrap(), there wont be need to append/detach/attach in this case. $(this).wrap(' '); $('.view-sidebar .field-item img').each(function () { var div = $(' ', { class: 'img-caption', text: this.alt }); $(this).wrap(' ').after(div); }); Demo
accepted answer of: http://stackoverflow.com/q/24626506
type: AcceptedAnswer
type: Answer
score: 2
upvote count: 3
answers question: http://stackoverflow.com/q/24626506

http://stackoverflow.com/a/24687181
has comment: http://stackoverflow.com/comment/38279658
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38279554
has body: Use AJAX (I like to use it with PHP, but you can use other server-side languages to pass responses back). Where you have wrap.innerHTML += "";... use AJAX to get the results you want from your server-side page. Brett McLaughlin wrote some great documentation on it on IBMs site, you can find it by Google searching "mastering ajax site:ibm.com filetype:pdf" without quotes... Also, if you're into jQuery take a look at the $.ajax, $.post, or $.get functions. Basically with jQuery you can call: $.post( 'serversidepage.php', attrs, //being an array filled with variables you want to use on the server function(data){ wrap.innerHTML += data; //or data.html if you decide to use JSON / XML to pass back your data } ); Then on your server, create the file 'serversidepage.php', and use the $_POST variables to determine what was sent using the attrs JS variable, and echo back what you want to return to the post command. Once it's back it will call the function within $.post, which will set that echoed data in your wrap element.
answers question: http://stackoverflow.com/q/24687057

http://stackoverflow.com/a/24664909
score: 4
type: Answer
has body: Sounds like you want a simple optional token (maybe as a non-capturing group): /(&lt;inline.*?\n.*?\n.*?&lt;\/inline&gt;&lt;\/inline&gt;(?:&amp;nbsp;)?)/gm # ^^^ ^^
has comment: http://stackoverflow.com/comment/38265323
has comment: http://stackoverflow.com/comment/38265740
answers question: http://stackoverflow.com/q/24664867
has comment: http://stackoverflow.com/comment/38265369
has comment: http://stackoverflow.com/comment/38263933
accepted answer of: http://stackoverflow.com/q/24664867
upvote count: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38263618
downvote count: 0

http://stackoverflow.com/comment/38113658
type: Comment
score: 1
has text: [Spec](http://www.ecma-international.org/ecma-262/5.1/#sec-8.7.1) says "If IsUnresolvableReference(V), throw a ReferenceError exception." That's what I get in Chrome when I tested before writing the answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/24599530

http://stackoverflow.com/comment/38317389
type: Comment
has text: @T.J.Crowder You are right, I just changed it to simply `undefined`
comment on: http://stackoverflow.com/a/24707285
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38218356
comment on: http://stackoverflow.com/q/24640787
score: 0
type: QuestionComment
type: Comment
has text: @FuzzyAmi Setting a timeout seems to work, where the function call is the `chrome.runtime.sendMessage` part, and the timeout is 1 second. It took a while to get this specific time, and it is a little finicky. I may try the other solution, I was just really baffled by why the window onload function was not working. I think that Google has certain part's of the DOM loaded automatically (like they "hardcoded" certain parts such as the different searches, and all of their other stuff). I might try the other answer, it just didn't make sense the first 5 times I read it haha.

http://stackoverflow.com/comment/38372303
type: Comment
has text: I also agree with sumit, MVC approach will be easy to understand rather than going behind classic.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24734792

http://stackoverflow.com/q/24742949
upvote count: 1
tagged with: ember.js
type: UnansweredQuestion
downvote count: 0
tagged with: cookies
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24743447
type: Question
answer count: 1
tagged with: javascript
has title: javascript cookie, Ember
has body: I want to put a user input into a cookie to save the value for later display. It seems I can write into the cookie, but not able to get the value back. I have this simple test set up: var test = "TEST"; document.cookie = "usr=TEST;"; $.cookie("usr", test); Ember.$.cookie('usr', test); console.log("COOKIE", $.cookie("usr"), Ember.$.cookie('usr'), "cookie.length=", document.cookie.length); Which results to the output "COOKIE undefined undefined cookie.length=0". I don't see why I don't get my value out, seems like a simple thing. Any help is much appreciated.

http://stackoverflow.com/comment/38139564
has text: Nope, setting the top:50px will cover the header completely. Anyway, I did a demo here [link](http://wpqa.net/demo.html). Mind if you take a look at it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24610624
type: Comment

http://stackoverflow.com/comment/71444169
type: Comment
comment on: http://stackoverflow.com/a/24690917
score: 0
type: AnswerComment
has text: @basZero why not? The issue here is that Firefox will not submit any form without a submit button, so adding a button does solve the problem, right?

http://stackoverflow.com/comment/43879442
comment on: http://stackoverflow.com/a/26069264
score: 0
type: Comment
type: AnswerComment
has text: This indeed works. But can you or anyone else explain why this works? It seems to do be doing the same thing, but obviously internally working a little differently.

http://stackoverflow.com/comment/38166088
has text: how about waiting for the onclick event?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24626591
score: 0

http://stackoverflow.com/a/24662129
upvote count: 2
answers question: http://stackoverflow.com/q/24662066
type: Answer
has body: You could just test if its a number: isNaN("a1234z1"); unless you need it to be that exact format then a regex would be needed.
score: 2
downvote count: 0

http://stackoverflow.com/q/24648777
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/38207668
type: Question
score: -2
has comment: http://stackoverflow.com/comment/38207680
tagged with: javascript
has answer: http://stackoverflow.com/a/24649003
has title: jQuery: Count words with more than X characters in string
answer count: 1
accepted answer: http://stackoverflow.com/a/24649003
tagged with: jquery
has comment: http://stackoverflow.com/comment/38208320
favorite count: 0
has body: I have an input field and a textarea in a form. For each of those two fields I'd like to count the number of words, number of dots, and number of words longer than 7 characters. I've already got the code for the two first numbers (number of words and number of dots), but I can't figure out how to count the number of words longer than 7 characters in each of the fields. Can anyone help me out with this one? Here is my current code (fiddle): var titleElem = $('#title'); var numberOfWords = countWords(titleElem); var numberOfDots = countDots(titleElem); function countWords(input) { var a, z, inputValue, total; inputValue = input.val(); total = 0; a = inputValue.replace(/\s/g, ' '); a = a.split(' '); for (z = 0; z &lt; a.length; z++) { if (a[z].length &gt; 0) total++; } return total; } function countDots(input) { var inputVal; inputVal = input.val(); return inputVal.split(".").length - 1; }
tagged with: count
type: AnsweredQuestion

http://stackoverflow.com/comment/38364911
type: Comment
has text: @Bullfinch You submit the form nothing more than you would like to submit data to the server。 You can use $.ajax do it.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24730755

http://stackoverflow.com/q/24698393
tagged with: google-maps-api-3
tagged with: google-maps
tagged with: google-maps-markers
has title: how to clear markers currently on the map
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24698599
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1544739
upvote count: 2
duplicate of: http://stackoverflow.com/q/1544739
has body: I have working on a google api v3 web app. When the map loads it shows my current location using geolocation service and a marker is placed on that location. Now when I search for a place or try to find the direction between two places, I want to remove the all the markers that were previously on the map so that the only current markers would be the ones say for the start and end points of locations. But this is where i am having problems, anytime i search a new place or try to get new direction, the previous markers especially the one for the geolocation when the page loads is still showing. I looked at the maps api and i saw the markers array they used to be removing previous markers. I put this in my code and it still doesn't work. I will paste my code so u can see for yourself. ---------------------------------MAPS.JS ----------------------------------------- var directionsDisplay; var geocoder; var map; var markers = []; var directionsService = new google.maps.DirectionsService(); function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); geocoder = new google.maps.Geocoder(); var mapOptions = { zoom: 15 }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); // Try HTML5 geolocation if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var marker = new google.maps.Marker({ position: pos, map: map }); markers.push(marker); map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(false); } directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('directions-panel')); var control = document.getElementById('control'); control.style.display = 'block'; map.controls[google.maps.ControlPosition.TOP_CENTER].push(control); } function calcRoute(start, end) { var request = { origin: start, destination: …
downvote count: 1
type: Question
score: 1
tagged with: javascript
tagged with: geocoding

http://stackoverflow.com/comment/38207098
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24648412
has text: use classes or id's to isolate the element
score: 0

http://stackoverflow.com/comment/38218739
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24652456
has text: @XtremeBiker : I know its a non user friendly approach, but that's the requirement.

http://stackoverflow.com/q/24633495
favorite count: 0
tagged with: css
has title: jquery change css on radiobutton checked
type: AnsweredQuestion
upvote count: 0
type: Question
tagged with: javascript
score: -1
has body: below i have my fiddle which i want to change the text color when the radio button is selected. However i cant get it to work. at the moment it isnt firing at all and i cant get the div css to change. $(".package-container").click(function () { $(this).closest('.radio-group-row').find('.package-title').removeClass('highlight'); $(this).find('input:radio').prop('checked', true); $(this).find('.package-title').addClass('highlight'); }); http://jsfiddle.net/46jGT/3/ EDIT Thanks, it does work with the JSFiddle, but in my .net project i cant get this peice to work. i have jquery 1.9 referenced at the bottom on the master page with this code on the control page.
has comment: http://stackoverflow.com/comment/38178693
has comment: http://stackoverflow.com/comment/38179594
has comment: http://stackoverflow.com/comment/38178657
answer count: 1
has answer: http://stackoverflow.com/a/24633631
downvote count: 1
accepted answer: http://stackoverflow.com/a/24633631
tagged with: jquery

http://stackoverflow.com/q/24671562
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38252342
has comment: http://stackoverflow.com/comment/38253028
answer count: 0
has body: I want to use the delegate() method to call my JS script to affect form elements BEFORE the JQM changes them but I am having difficulty. I need this because I need my JS converting radios to selects and have JQM display them as selects (so they need converting before JQM modifies the elements). $( document ).delegate("body", "pagebeforecreate", function() { convertToDD("71471a43517b09"); }); The above is how I am calling my JS call, but it simply displays an infinite loading circle when loading the page. My little brain is unfortunately too little to be able to follow exactly how to manipulate this function to understand what is going on to resolve. Am I either doing something wrong (which obviously I must be), is there a better way to achieve this?
type: Question
has comment: http://stackoverflow.com/comment/38252444
tagged with: jquery-mobile
has comment: http://stackoverflow.com/comment/38251639
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38250536
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: method-call
has title: Call JQuery code before jQuery Mobile modifies HTML elements

http://stackoverflow.com/comment/38442755
has text: I have no idea for the recent versions of IE. There were IE7Pro and Trixie which worked up to IE8.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24721532

http://stackoverflow.com/a/24731194
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24730436
has body: I have compared the jQuery's v1.6.2 source with latest v1.11.1 and it lacks one additional check in if clause: !cache[id]. As an upgrade of jQuery is not allowed I have only updated the if statement from: if ((!id || (pvt &amp;&amp; id &amp;&amp; !cache[id][internalKey])) &amp;&amp; getByName &amp;&amp; data === undefined) { return; } to: if ((!id || !cache[id] || (pvt &amp;&amp; id &amp;&amp; !cache[id][internalKey])) &amp;&amp; getByName &amp;&amp; data === undefined) { return; }
answers question: http://stackoverflow.com/q/24730436
type: Answer
score: 0

http://stackoverflow.com/q/24635375
has body: when i run this with the rest of my code everything works fine except this! i just get something saying £NaN0 i dont understand why it is not a number someone please help!
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38182471
answer count: 1
downvote count: 1
tagged with: calculator
tagged with: nan
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has title: NaN error when trying to add variables
upvote count: 0
has comment: http://stackoverflow.com/comment/38182614
has answer: http://stackoverflow.com/a/24635746
type: Question

http://stackoverflow.com/comment/38311628
has text: You should add the requested clarification to your question if you're going to accept an answer. We barely know the question so we don't know the solution you've chosen since multiple were provided to make up for lack of detail.
comment on: http://stackoverflow.com/q/24704231
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24650295
has body: I want the background color in the text-box to stay for at least 5 seconds after i click the submit button but it is disappearing as soon as i click submit button. This is my code... Text Boxes With Aplhabets `enter code here` Enter Aplhabets: <br;>
type: Question
has answer: http://stackoverflow.com/a/24650355
has title: Background color of Text-box
has comment: http://stackoverflow.com/comment/38210623
score: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/38211140
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38211415
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38211195
downvote count: 1

http://stackoverflow.com/a/24636933
has body: Mark Lorenz ended up showing me the solution for this. I emitted an event on the robot when reloading scripts, then listened for that event in the script and killed any timeouts. in reload.coffee (PR Submitted) reloadAllScripts = (msg, success, error) -&gt; robot = msg.robot robot.emit('reload_scripts') scriptsPath = Path.resolve ".", "scripts" robot.load scriptsPath in my script module.exports = (robot) -&gt; robot.on 'reload_scripts', () -&gt; clearInterval(Timer) if Timer
type: Answer
accepted answer of: http://stackoverflow.com/q/24635934
answers question: http://stackoverflow.com/q/24635934
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/24666800
upvote count: 1
has comment: http://stackoverflow.com/comment/38242038
has comment: http://stackoverflow.com/comment/38241954
downvote count: 0
has body: Many ways to do this... Solution #1: (HTML) You could use checked="checked" JSFiddle Demo Solution #2: (JQuery) var email = $("#email"); email.prop('checked', true); And to hide the phone input on page load, you can trigger the change event: email.prop('checked', true).trigger('change'); JSFiddle Demo
answers question: http://stackoverflow.com/q/24666774
has comment: http://stackoverflow.com/comment/38241928
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/38242019

http://stackoverflow.com/a/24719134
score: 0
type: Answer
has body: Well, if you are sure about width of navigation then dont go with "width:100%; " try to give width exactly where it supposed to be fit. Ex. Width: 900px;
answers question: http://stackoverflow.com/q/24719053

http://stackoverflow.com/comment/38274452
type: AnswerComment
has text: I added another version that uses the width of the current wrapper
type: Comment
comment on: http://stackoverflow.com/a/24684395
score: 0

http://stackoverflow.com/q/24652017
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38561147
has body: I have a performance problem with angular in the following scenario: &lt;div ng-repeat="a in array"&gt; &lt;input ng-model="something"&gt; &lt;/div&gt; I wrote code in my controller that on ng-click changes the array to have a different set of objects. The problem is that if the array has a decent amount of objects, the click is not as responsive as I would like it to be (short delay). After some investigation, I noticed that the $digest takes a pretty long time after I change the array in my ng-click. So I created this short test code to reproduce it. The real app scenario is this: I have a table in which every row represents an editable object and each object has many different fields I want to be able to edit. This way, whenever I click on a row in the table, there is another html that has all those ng-repeats with different inputs on the properties of my object. Does anyone have an idea on how to make this more efficient? Thanks
has comment: http://stackoverflow.com/comment/38257495
possible better answer: http://stackoverflow.com/a/24945989
type: AnsweredQuestion
tagged with: performance
has answer: http://stackoverflow.com/a/26387295
linked to: http://stackoverflow.com/q/714942
has comment: http://stackoverflow.com/comment/38446117
upvote count: 21
has answer: http://stackoverflow.com/a/24652255
linked to: http://stackoverflow.com/q/17348058
has title: angularjs ng-model inside ng-repeat has poor performance
type: Question
has comment: http://stackoverflow.com/comment/38435728
tagged with: javascript
has comment: http://stackoverflow.com/comment/38215302
has comment: http://stackoverflow.com/comment/38245623
accepted answer: http://stackoverflow.com/a/26387295
has comment: http://stackoverflow.com/comment/38318499
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/38342140
score: 21
favorite count: 0
has answer: http://stackoverflow.com/a/24945989
has comment: http://stackoverflow.com/comment/38259444
has comment: http://stackoverflow.com/comment/38259344
has comment: http://stackoverflow.com/comment/38561160

http://stackoverflow.com/comment/38371510
comment on: http://stackoverflow.com/a/24735265
has text: That was Awesome! Accepted but I ran out of votes for the day :(
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38116984
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24601044
score: 0
has text: $login = $_POST['login'];

http://stackoverflow.com/q/24618836
has comment: http://stackoverflow.com/comment/38151824
accepted answer: http://stackoverflow.com/a/24618974
answer count: 2
tagged with: filter
has body: I have the following JSON stored in a variable named data. How can i filter it excluding the "0" values? { "BTC": "0", "XCP": "0", "LTC": "0", "NXT": "0", "XPM": "0", "NMC": "0", "MMC": "0", "NOBL": "0", "USDE": "0", "SOC": "0", "KDC": "0", "DOGE": "0.00000001", "GLB": "0", "Q2C": "0", "FOX": "0", "MRC": "0", "MTS": "0" } I tried: var datos = data.filter(function(data){ return !!data; }); res.send(data); but it's telling me Object # has no method 'filter' Regards,
has answer: http://stackoverflow.com/a/24618974
type: AnsweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/24618886
type: Question
possible better answer: http://stackoverflow.com/a/24618886
has title: How to filter a JSON in nodejs
tagged with: javascript

http://stackoverflow.com/comment/38235440
type: QuestionComment
has text: What do you want your output to be?
comment on: http://stackoverflow.com/q/24663451
score: 0
type: Comment

http://stackoverflow.com/a/24682493
score: 2
has body: You could try to check if the label constains parser with indexOf and then sum that var sum=0; for(var i=0;i&lt;data.length;i++){ var obj=data[i]; if(obj.label.indexOf("parser") != -1){ sum+=obj.y; } } console.log(sum)
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38271351
accepted answer of: http://stackoverflow.com/q/24682409
type: Answer
answers question: http://stackoverflow.com/q/24682409

http://stackoverflow.com/a/24666795
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/38264930
has body: I think instead of changing the dom in the 2nd callback elem.html(response.contacts.length); you should do this in your first loop $(".outbox_accepted_row").each getNameGameCounts should only return you the data, rather than do another dom action, it might experience with aync issue and return undefined, you will need to use like async.js. And another thing, are you sure you want to loop the ajax call? seems like a bad design.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38281565
answers question: http://stackoverflow.com/q/24666641
accepted answer of: http://stackoverflow.com/q/24666641

http://stackoverflow.com/q/24736139
has body: I've created a simple one word password login using PHP. The password is stored in the php file - I know this isn't massively secure but all I want is for people to not be able to wander into the site. For the sake of testing the password is password You can see that I have a jQuery shake effect when it is wrong. My Question: Why does my submit button not work with the correct password on hitting the submit button and why does hitting return behave differently to the submit button? My code: HTML: Enter your password: PHP: <?php // this password may come from any source. // it's a variable for the sake of simplicity $password = 'password'; if($_POST['password'] == $password){ $_SESSION["userid1"] = $id1; header("Location: ../home.html"); // redirects }else{ } ?> Javascript: jQuery.fn.vibrate = function(conf) { var config = jQuery.extend({ speed: 30, duration: 2000, frequency: 10000, spread: 3 }, conf); return this.each(function() { var t = jQuery(this); var vibrate = function() { var topPos = Math.floor(Math.random() * config.spread) - ((config.spread - 1) / 2); var leftPos = Math.floor(Math.random() * config.spread) - ((config.spread - 1) / 2); var rotate = Math.floor(Math.random() * config.spread - (config.spread - 1) / 2); // cheers to erik@birdy.nu for the rotation-idea t.css({position: 'relative', left: leftPos +'px', top: topPos +'px', WebkitTransform: 'rotate(' +rotate +'deg)', WebkitTransform: 'rotate(0deg)'}); }; var doVibration = function () { var vibrationInterval = setInterval(vibrate, config.speed); var stopVibration = function() { clearInterval(vibrationInterval); t.css({position: 'static'}); }; setTimeout(stopVibration, config.duration); }; /* Mofication by Kishore - I am commenting out the following line as it calls the vibration function repeatedly. We need to call it only once. So, instead I make a call to doVibration() directly. */ //setInterval(doVibration, config.frequency); doVibration(); }); } ; EDIT: I'm leaving 'else' in the PHP empty becuse …
score: 1
tagged with: forms
type: Question
tagged with: javascript
tagged with: jquery
has title: Login form submit button does not work
has answer: http://stackoverflow.com/a/24736708
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/24736404
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/38372681
has comment: http://stackoverflow.com/comment/38372768
has answer: http://stackoverflow.com/a/24736465
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24736195
upvote count: 1
tagged with: php

http://stackoverflow.com/a/24697825
score: 0
has body: Load by $("#divWhichExcludesRadiobutton").load("current/url"); or add next script in the head tag var myVal; $("body").load("current/url", function () { $('input[type="radio"]').val(myVal) }); $('input[type="radio"]').on('change',function(){ myVal = $(this).attr("value"); if($(this).attr("value")=="f1"){ $(".box").hide(); $(".f1").show(); } if($(this).attr("value")=="f2"){ $(".box").hide(); $(".f2").show(); } if($(this).attr("value")=="f3"){ $(".box").hide(); $(".f3").show(); } });
answers question: http://stackoverflow.com/q/24697272
type: Answer

http://stackoverflow.com/comment/38130996
has text: I already checked that but couldn't understand and now seeing the answer below I got concept.
type: QuestionComment
comment on: http://stackoverflow.com/q/24608723
score: 0
type: Comment

http://stackoverflow.com/comment/38152819
has text: hah, yeah I just figured that out myself. Well, you still get the points, thanks for answering
type: AnswerComment
comment on: http://stackoverflow.com/a/24619448
score: 0
type: Comment

passport.js
tags question: http://stackoverflow.com/q/24666331
tags question: http://stackoverflow.com/q/24746584
tag name: passport.js
type: Tag
tags question: http://stackoverflow.com/q/24622477
tags question: http://stackoverflow.com/q/24660034

http://stackoverflow.com/a/24619880
has comment: http://stackoverflow.com/comment/38153612
upvote count: 0
answers question: http://stackoverflow.com/q/24619543
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/38153498
has comment: http://stackoverflow.com/comment/38154055
has body: Use ::before pseudo class to display bullet HTML: test test CSS: .list{ list-style: none; } .list-item::before{ content: ""; width: 30px; height: 30px; display: inline-block; background-image: url(http://placekitten.com/20/30); background-size: 200%; } http://jsfiddle.net/PtG6Q/1/
score: -1
has comment: http://stackoverflow.com/comment/38153544

http://stackoverflow.com/q/24590176
has body: I have a component that owns many child components. In render(), I have to loop through each of the items to build the children. During this loop, I check each item to see if it is "the special one". If it is, I store it in a variable. I do this because componentDidMount defines a frequently referenced event handler that needs a reference to the special item (and that doesn't want to loop through all of the items repeatedly). Is it idiomatic in React to store this reference in this.props.specialItem or this.specialItem? Here is an example of the situation in psuedocode: var ItemList = React.createClass({ componentDidMount: function() { $(document).keydown(function(e) { if (e.which === 27) { this.setState({ currentItem: this.specialItem }); return; } }.bind(this)); }, render: function() { var items = _.map(this.state.data, function(item) { if (!this.specialItem &amp;&amp; this.isSpecial(item)) { //////////////////////////////////////////////////// this.specialItem = item; // or should this be this.props.specialItem ? //////////////////////////////////////////////////// } // ... }.bind(this)); } });
type: Question
has title: Are React.js props only for passing data between components?
score: 1
accepted answer: http://stackoverflow.com/a/24590338
tagged with: reactjs
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24590338
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/a/24669214
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38284978
answers question: http://stackoverflow.com/q/24665229
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24665229
type: AcceptedAnswer
has body: You'd probably have to do something like /** * @define {string} */ var COMPILATION_DATE = ''; var filename = 'myfile.js?' + COMPILATION_DATE; and then (edited to add quotes -- see comments) #!/bin/bash java -jar compiler.jar --define="COMPILATION_DATE='$(date +%F)'" --js=your_file.js ... Use date --help to figure out how to get the date formatted exactly the way you want.
type: Answer
has comment: http://stackoverflow.com/comment/38245929
has comment: http://stackoverflow.com/comment/38318037

http://stackoverflow.com/comment/38294413
comment on: http://stackoverflow.com/q/24695219
type: Comment
type: QuestionComment
has text: basically JQGrid is a AJAX COntrolled and its not exactly a server side
score: 0

http://stackoverflow.com/comment/138614483
score: 0
type: QuestionComment
has text: Are you sure your current problem is in any way related to PHP?
type: Comment
comment on: http://stackoverflow.com/q/24690095

http://stackoverflow.com/a/24657095
upvote count: 3
answers question: http://stackoverflow.com/q/24656998
score: 3
downvote count: 0
has body: Document attributes aren't posted back to the server. What I do is add a hidden server control, then update that hidden control in javascript. That will be posted back to the server, and can be accessed. This would be the server control. (note the clientidmode attribute, this is so that I can easily access this control in javascript) &lt;asp:HiddenField runat="server" ClientIDMode="Static" ID="hdnTest"/&gt; Then in javascript document.getElementById("hdnTest").value = '1'; And to access it in the codebehind hdnTest.Value
type: Answer

http://stackoverflow.com/q/24727563
upvote count: 2
has body: If I have an array of Strings that represent numbers, and want to convert the type of every entry in the array to Number, I can use map: var stringNumbers = ["11", "23", "5813"]; stringNumbers.map(parseFloat); // [11, 23, 5813] This works because parseFloat is globally accessible. However, if I want the result of an object's methods, I seem to need to use an anonymous function. var Dog = function(name) { this.name = name; }; Dog.prototype.getName = function() { return this.name; }; var dogs = [new Dog("Beatrice"), new Dog("Baxter")]; dogs.map(function(dog) { return dog.getName(); }); // ["Beatrice", "Baxter"] Ideally, I would be able to do something like: dogs.map(getName); // ["Beatrice", "Baxter"] But this does not work because getName is not globally accessible. Is there a way to bind each function executed by map to the context of the object it is iterating over?
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38356693
has answer: http://stackoverflow.com/a/24727623
linked to: http://stackoverflow.com/q/21186398
possible better answer: http://stackoverflow.com/a/24727759
type: Question
has answer: http://stackoverflow.com/a/24727759
answer count: 2
duplicate of: http://stackoverflow.com/q/21186398
has comment: http://stackoverflow.com/comment/38356651
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24727623
downvote count: 0
has title: Using JavaScript's map with an object's methods
favorite count: 0

http://stackoverflow.com/q/24719314
downvote count: 2
has title: Check for an empty form element
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24719354
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
type: Question
score: -2
has comment: http://stackoverflow.com/comment/38340649
tagged with: javascript
has body: var items = ["fname","lname","msg"]; if(document.forms['form_c'].items[0].value.length == 0) alert(items[0] + " is left blank"); array having ids of form elements line 2: //checking an element to be empty

http://stackoverflow.com/q/24746841
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38402862
answer count: 0
tagged with: backbone.js
type: Question
has title: An Introduction to Backbone that isn't a To-Do App?
has body: I've been searching for an app with some pragmatic value to use as an introduction Backbone. However, I have only been able to find dozens of small To-Do Apps of limited scope. If anyone could recommend an introduction to Backbone with a broader scope, that is not a To-Do App, I would appreciate it immensely. Thanks in advance.
tagged with: model-view-controller
score: 0
linked to: http://stackoverflow.com/q/9195179
has comment: http://stackoverflow.com/comment/38437583
tagged with: frameworks

http://stackoverflow.com/comment/38110343
has text: Thanks @geocodezip. Added `panel: document.getElementById('directions')` to `new google.maps.DirectionsRenderer` and all working now.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24597643

http://stackoverflow.com/a/27141827
has body: The issue is actually with internet explorer. The splice function in internet explorer actually requires an extra parameter to function the way that Firefox and Chrome do. IE &lt;= 8 .splice() not working If you look at the bootstrap-datepicker.js code it contains this.splice(0); So your solutions are to either grab the master branch of bootstrap-datepicker with an updated fix (which has not been released :/) https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js OR 'fix' how the splice(0) function works in internet explorer via javascript http://www.to-string.com/2012/05/29/fixing-splice-in-older-versions-of-internet-explorer-8-and-olders/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24610818

http://stackoverflow.com/a/24687514
has comment: http://stackoverflow.com/comment/38279985
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/38280047
has body: Add this to the top of the file. &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $('input').on('focus', function(){ $(this).css({'background' : '#31B404'}); }); $('input').on('focusout', function(){ $(this).css({'background' : '#2E9AFE'}); }); $('button').on('click', function(){ var a = "Angusmiguel21"; if( ($('input').val() ) == (a) ){ $('#test').slideToggle(); } else{ $('input').css({'background' : 'red'}); $('button').css({'background' : 'red'}); } }); }); &lt;/script&gt; Your variable $a should be a. Also put quotes around the value. Also it should be #test (it's an id)
type: Answer
accepted answer of: http://stackoverflow.com/q/24687381
has comment: http://stackoverflow.com/comment/38280027
answers question: http://stackoverflow.com/q/24687381

http://stackoverflow.com/comment/38144047
comment on: http://stackoverflow.com/a/24612947
has text: Thank you for your answer, however I have found a more restricted approach (http://stackoverflow.com/questions/16708254/adding-click-listener-on-circle-is-not-working). Which have lead me to find `google.maps.Polygon`! I have created my city limits and now it's perfect :)
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/24740977
has body: You would need something like function click(d){ d3.select(this).classed("selected", !d3.select(this).classed("selected")); d3.selectAll("foo").style("stroke", "white"); d3.selectAll(".selected").style('stroke', 'red'); } This will add a class selected to all selected things, which you can use to select and modify them with D3.
accepted answer of: http://stackoverflow.com/q/24740734
score: 0
answers question: http://stackoverflow.com/q/24740734
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38447897
has comment: http://stackoverflow.com/comment/38423289
type: Answer
has comment: http://stackoverflow.com/comment/38438725
has comment: http://stackoverflow.com/comment/38422726
has comment: http://stackoverflow.com/comment/38460418

http://stackoverflow.com/comment/38336899
comment on: http://stackoverflow.com/a/24717556
type: Comment
has text: Ok, but is there any JS libaries to get simular opportunities or I must to right it myself?
score: 0
type: AnswerComment

http://stackoverflow.com/q/24738072
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/38376335
favorite count: 0
type: UnansweredQuestion
has body: I'm getting an object of values as a response to $.get $.get('www.example.com/get-data/', {'data': $('form').serialize()}, function (data) { $.each(data, function (key, value) { console.log(key,value); }); ... I'm facing different order on different devices = on desktop Safari 8.0 it returns me the following order: 10 R10 15 R15 16 R16 But it returns reversed order on mobile safari (iOS 6) 16 R16 15 R15 10 R10 Does anybody know why? I've also tried to sort returned object: &gt; data Object {10: "R10", 15: "R15", 16: "R16"} &gt; data.sort() TypeError: undefined is not a function Do you know how to sort this object to keep alphabetical order on all devices? I need to keep "key => value" definition is there any other way then using an array of objects? For example [{10:"R10"},{15:"R15"},{16:"R16"}]
score: 2
answer count: 0
linked to: http://stackoverflow.com/q/17817444
upvote count: 2
has comment: http://stackoverflow.com/comment/38376286
duplicate of: http://stackoverflow.com/q/17817444
type: Question
has comment: http://stackoverflow.com/comment/38376459
tagged with: javascript
has comment: http://stackoverflow.com/comment/38376281
has title: different order across browsers

http://stackoverflow.com/comment/38091533
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24588141
has text: If you don't want it to be visible until you append, hide it by setting CSS `display: none;`.

typeahead
type: Tag
tags question: http://stackoverflow.com/q/24678372
tag name: typeahead

http://stackoverflow.com/a/24699641
has body: Bubbling event model, that all web browsers folowing, is quite simple: There is a lot of events that provided by browser. You can lister them. In additional you can lister other events, that provided by other control or by your code. Other code relation binding is provided by you code pattern, in your case it is OOP. So, in JavaScript case: If you want to listen event you should bind function to the event: window.addEventListener("mousedown", zoom, false); (You bind to event "mousedown" function "zoom") If you want to stop listen event you should unbind function from event: window.removeEventListener ("mousedown", zoom, false); (You unbind from event "mousedown" function "zoom") But!! if you write: window.addEventListener("mousedown", zoom, false); window.addEventListener("mousedown", engage, false); You bind function "zoom" to the event "mousedown" 2 times! So it called twice. So, according to your code, you should add removeEventListener Before you want override listener, sample: window.removeEventListener("mousedown", zoom, false); window.addEventListener("mousedown", engage, false); Good luck! :)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24699049

http://stackoverflow.com/a/24695444
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24692002
type: Answer
has comment: http://stackoverflow.com/comment/38363374
has body: I believe @Oleg 's answer is complete and right on, however, I just want to bring to your attention an example that makes extensive use of link thicknesses, and other related svg attributes: 2013 Budget Visualization Relevant code is here: // Enter any new links at the parent's previous position. link.enter().insert("svg:path", "g") .attr("class", "link") .attr("d", function(d) { if (Number(d.target[spendField]) &gt; 0) { var o = {x: source.x0, y: source.y0}; return diagonal({source: o, target: o}); } else { null; } }) .style("stroke",function (d,i) { if (d.source.depth==0) { rootCounter++; return (d.source.children[rootCounter-1].linkColor); } else { return (d.source) ? d.source.linkColor : d.linkColor; } }) .style("stroke-width", function (d,i) { if (d.source.depth==0) { var ret = level1Radius(d.target[spendField]) * 2; return (isNaN(ret) ? 4 : ret); } else if (d.source.depth==1) { var ret = level2Radius(d.target[spendField]) * 2; return (isNaN(ret) ? 4 : ret); } else if (d.source.depth==2) { var ret = level3Radius(d.target[spendField]) * 2; return (isNaN(ret) ? 4 : ret); } else if (d.source.depth==3) { var ret = level4Radius(d.target[spendField]) * 2; return (isNaN(ret) ? 4 : ret); } }) .style("stroke-opacity", function(d){ var ret = ((d.source.depth+1)/4.5) if (d.target[spendField] &lt;= 0) ret=.1; return ret; }) .style("stroke-linecap","round") .transition() .duration(duration); // .attr("d", diagonal); // Transition links to their new position. var linkUpdate = link.transition() .duration(duration) .attr("d", diagonal); linkUpdate .style("stroke-width", function (d,i) { if (d.source.depth==0) { var ret = level1Radius(Number(d.target[spendField])) * 2; return (isNaN(ret) ? 4 : ret); } else if (d.source.depth==1) { var ret = level2Radius(Number(d.target[spendField])) * 2; return (isNaN(ret) ? 4 : ret); } else if (d.source.depth==2) { var ret = level3Radius(Number(d.target[spendField])) * 2; return (isNaN(ret) ? 4 : ret); } else if (d.source.depth==3) { var ret =…
upvote count: 1

http://stackoverflow.com/comment/38381849
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24740950
has text: @John yeah, that was my mistake. try it now

http://stackoverflow.com/q/24660239
tagged with: terminal
has body: I am trying to do some high scale testing with my nodejs server so I want to find out how its possible to run the chrome browser on the terminal, similar to how nodejs runs the server. I want to have a few hundred on a single machine which is why I want to avoid running the actually browser tab instances. It also needs to specifically be google chrome. Right now Im trying to figure out how this is possible, even if it's just somehow running the messaging javascript from the terminal. Can someone please point me to the right direction :]
type: Question
accepted answer: http://stackoverflow.com/a/24661128
answer count: 1
tagged with: node.js
tagged with: instance
score: 0
tagged with: browser
tagged with: javascript
has answer: http://stackoverflow.com/a/24661128
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38229166
has title: Running Browser as terminal process

http://stackoverflow.com/a/24599903
answers question: http://stackoverflow.com/q/24598499
type: Answer
downvote count: 0
score: 1
has body: Hi Angular works in two way binding. You have created an object (todo) in scope and iterated it using ng-repeat. What it does is now the object todo will be in the angular digest. Any changes in the scope object will run the digest to update the bindings. Now whenever the elements changes within the scope (selection of checkboxes) you have done a two way binding on item.done. Since the property changes it will trigger the digest and hence the list will be re-created and thus the filter will be fired again. Your code snippet in a Fiddle to demonstrate how it is working. I have changed the code a bit to exclude http call. And hardcoded the model instead using your json code. Code: var model = { user: "Adam" }; model.items = [{ "action": "Buy flowers", "done": false }, { "action": "Watch movie", "done": true }, { "action": "Buy groceries", "done": true }, { "action": "Play games", "done": false }, { "action": "Party with friends", "done": false }]; var todoApp = angular.module("todoApp", []); todoApp.controller("ToDoCtrl", function ($scope) { $scope.todo = model; $scope.incompleteCount = function () { var count = 0; angular.forEach($scope.todo.items, function (item) { if (!item.done) { count++ } }); return count; } $scope.warningLevel = function () { return $scope.incompleteCount() &lt; 5 ? "label-success" : "label-warning"; } $scope.addNewItem = function (actionText) { $scope.todo.items.push({ action: actionText, done: false }); } }); /* filter for todoApp */ todoApp.filter("checkedItems", function () { return function (items, showComplete) { alert('here'); var resultArr = []; angular.forEach(items, function (item) { if (item.done == false || showComplete == true) { resultArr.push(item); } }); return resultArr; } }); var book = { author: 'John Wright', books: [{ title: 'title1', published: '2012-02-12' }, { title: 'title2', published: '2009-12-25' }, { title: 'title3', published: '1999-12-23' }] }; var myApp = angular.module('myApp', []); myApp.controller("MyControlle…
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24598499

http://stackoverflow.com/a/24731355
has comment: http://stackoverflow.com/comment/78707123
has body: It's not an error, it's a warning. It happens in Firefox 4 and later. From MDN: Optimizing your pages for speculative parsing: However, in Firefox 4 and later the HTML parser also runs the HTML tree construction algorithm speculatively. The upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was already scanned for scripts, style sheets and images. The downside is that there's more work lost when the speculation fails. [...] Speculative tree building fails when document.write() changes the tree builder state such that the speculative state after the tag no longer holds when all the content inserted by document.write() has been parsed. However, only unusual uses of document.write() cause trouble. Here are the things to avoid: [...] Don't write unbalanced trees. is bad. is OK. The solution is to write the HTML in a single block, if you care about the performance loss. You can also ignore it if you want to.
answers question: http://stackoverflow.com/q/24731079
has comment: http://stackoverflow.com/comment/94751002
score: 5
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/78707208
has comment: http://stackoverflow.com/comment/79437412
downvote count: 0

http://stackoverflow.com/a/24625765
has comment: http://stackoverflow.com/comment/38166330
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24604292
has body: There are a few issues with your code... 1. Your directive has it controlelr attached and you place some values on its scope (query, catalog etc). Then you try to access those values from an element that is outside of the directive (and thus has a different scope that knows nothing about query, catalog etc. E.g. 2. To make things even more complicated, your directive creates an isolate scope, which means that any content it has will not see your directive's scope, but its parent scope. I.e. in the example above, DIV#1.1.1 will have access to scope $001, not $002. What you can do about it (which basically mean, explicitly state that your directive's content should be included (transcluded) into its template. This gives you greater control on what's going on and allows you to bind the content of your directive to the scope you want (i.e. your directive's isolate scope). The resulting code should look like this: ... ... ... .directive('pjCatalog', function () { return { restrict: 'A', transclude: true, template: ' ', controller: 'CatalogCtrl', scope: { query: '@pjCatalog' }, link: function (scope, elem, attrs, ctrls, transFn) { transFn(scope, function (cloned) { elem.empty().append(cloned); }); } }; }) See, also, this short demo. Note: This is considered "advanced" directive stuff (so it sounds (and is) much more complicated than most directive stuff) and should be required in rae cases only. I am pretty sure there is a much easier way to achieve what you want (e.g. using a non-isolate scope) with slight modifications (but I am not sure what you want in order to help further.
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/38182161
score: 1
has comment: http://stackoverflow.com/comment/38182622
accepted answer of: http://stackoverflow.com/q/24604292

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/24589773
tag name: datetimepicker
tags question: http://stackoverflow.com/q/24685071

http://stackoverflow.com/q/24710368
type: Question
upvote count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/24710441
accepted answer: http://stackoverflow.com/a/24710441
tagged with: binding
answer count: 1
tagged with: computed-observable
favorite count: 0
has body: I am trying to solve the problem where I have a two way computed observable and want that parsed into an observable array and have that change event bubble up. The problem is that the it appear to not be notifying subscribers. Its best shown in jsfiddle: http://jsfiddle.net/RHhmY/13/ Code here: function CustomerOverview() { var self = this; self.contacts = ko.observableArray([]); self.v = ko.computed( { read : function(){ return ""; }, write : function(val){ self.contacts = ko.observableArray(String(val).split(',')); } } ); }; var vm = new CustomerOverview(); ko.applyBindings(vm); and html: LENGTH I have tried a number of things including notifying subscribers of the observableArray in question and the length never updates. As a side not, I'm very open to changing how this is constructed wrt knockout, just want something that works.
type: AnsweredQuestion
score: 2
has title: Knockout Modifying ObservableArray inside Computed
downvote count: 0
tagged with: ko.observablearray
tagged with: knockout.js

http://stackoverflow.com/comment/51437943
comment on: http://stackoverflow.com/q/24696667
type: Comment
type: QuestionComment
has text: Having the same issue, I added "back" jquery.scrollTo and now it works.
score: 0

http://stackoverflow.com/comment/38358652
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24728433
type: QuestionComment
has text: what exactly is not working? The javascript code looks like it should work. Capitalization on tags should not matter for the onclick. Are you sure the problem is with the javascript? Is the request to `Login.jsp` getting sent? If so, what data is sent with the request? I think @Kapil has a better approach - bind `onsubmit` and return an explicit true/false from your check method which should indicate whether or not to submit or not.

http://stackoverflow.com/q/24743784
accepted answer: http://stackoverflow.com/a/24809545
score: 1
has title: Adobe LiveCycle xfa.sourceSet errors
possible better answer: http://stackoverflow.com/a/24755364
type: Question
answer count: 2
tagged with: xfa
tagged with: javascript
has body: I've created a dynamic form in LiveCycle ES2 which is attempting to draw data from an Access database. The connection has been set up correctly in the Data View tab under the name "SpecsIn." I've done a lot of research through Adobe's website and other tutorials and could not find an answer to why my xfa.sourceSet packet seems to have no nodes. The following standard loop to find the named data connection fails with an index out of bounds error. var nIndex = 0; while(xfa.sourceSet.nodes.item(nIndex).name != "SpecsIn"){nIndex++;} Attempting to reference the node directly (ie xfa.sourceSet.SpecsIn or xfa.sourceSet.items(0)) results in "Invalid property get operation; packet doesn't have property 'SpecsIn'" (or items). I've also tried using the xfa.resolveNodes() function with no success. xfa.sourceSet.nodes also has a length of zero when checked. However, the XML Source clearly shows that &lt;sourceSet&gt; has a child &lt;source name="SpecsIn"&gt;. I'm not sure what further troubleshooting I can do at this point. I've triple checked my connection and it will populate bound fields if the connection delay is set to "off". I need to do more complicated lookups that require javascript and SQL queries, though, so I need to be able to reference the connections via the scripting object model. Thanks for anything you can recommend.
has answer: http://stackoverflow.com/a/24755364
favorite count: 0
tagged with: livecycle
tagged with: database-connection
upvote count: 2
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24809545

http://stackoverflow.com/q/24597283
score: 0
has body: I'm trying to write a function for the .tickValues method on my X axis so that the first year in my array of data is written as the full year (2000) and the rest of the years are written as: '01, '02, '03..ect here are the scale, axis and data: var xScale = d3.time.scale() .range([0, width]) .domain(d3.extent(dataset, function(d) { return d.year })); var xAxis = d3.svg.axis() .scale(xScale) .orient("bottom"); var dataset = [ { year: "2000", age1: 31, age2: 10, age3: 32, age4: 27 }, { year: "2001", age1: 32, age2: 12, age3: 30, age4: 26 }, { year: "2002", age1: 24, age2: 19, age3: 32, age4: 25 }, { year: "2003", age1: 26, age2: 18, age3: 31, age4: 25 }, { year: "2004", age1: 22, age2: 17, age3: 34, age4: 27 }, { year: "2004", age1: 24, age2: 17, age3: 33, age4: 26 }, { year: "2006", age1: 31, age2: 15, age3: 32, age4: 22 }, { year: "2007", age1: 30, age2: 15, age3: 35, age4: 20 }, { year: "2008", age1: 27, age2: 18, age3: 31, age4: 24 }, { year: "2009", age1: 25, age2: 15, age3: 35, age4: 25 }, { year: "2010", age1: 34, age2: 12, age3: 33, age4: 21 }, { year: "2011", age1: 31, age2: 14, age3: 32, age4: 23 }, { year: "2012", age1: 27, age2: 18, age3: 30, age4: 25 }, { year: "2013", age1: 25, age2: 20, age3: 35, age4: 20 } ]; // convert years to dates var parseDate = d3.time.format("%Y").parse; dataset.forEach(function(d) { d.year = parseDate(d.year); }); I have a function to format the years as '01, '02 ect: var formatYear = d3.time.format("'" +"%y"); But when I apply to it my function in the .tickValues() method it does not work: xAxis.tickValues( function(d){ if(d==dataset[0].year){return d;}else{return formatYear(d);} } );
answer count: 1
tagged with: d3.js
has comment: http://stackoverflow.com/comment/38113054
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24601643
type: Question
has title: D3: Formating years with the .tickValues() method
tagged with: arrays
has answer: http://stackoverflow.com/a/24601643
tagged with: javascript
has comment: http://stackoverflow.com/comment/38111806

http://stackoverflow.com/q/24714100
has answer: http://stackoverflow.com/a/24714195
score: 0
tagged with: php
answer count: 1
has title: How to update pie chart with dynamic values?
has body: this is my code: &lt;?php $pfstatetext = get_mypfstate(); $cpuusage= cpu_usage(); ?&gt; &lt;script&gt; var myVar=setInterval(function(){myTimer()},10000); function myTimer() { var ctx2 = document.getElementById("chart-area2").getContext("2d"); var myPie2 = new Chart(ctx2).Pie(pieData2); } &lt;/script&gt; &lt;div id="show"&gt; &lt;canvas id="chart-area2" width="300" height="300"/&gt; &lt;/div&gt; &lt;script&gt; var pieData2 = [ { value: &lt;?= $pfstatetext;?&gt;, color:"#F7464A", highlight: "#FF5A5E", label: "Red :" }, { value: &lt;?= $cpuusage; ?&gt;, color: "#46BFBD", highlight: "#5AD3D1", label: "Green" }, { value: 100, color: "#FDB45C", highlight: "#FFC870", label: "Yellow" }, { value: 40, color: "#949FB1", highlight: "#A8B3C5", label: "Grey" }, { value: 120, color: "#4D5360", highlight: "#616774", label: "Dark Grey" } ]; window.onload = function(){ var ctx2 = document.getElementById("chart-area2").getContext("2d"); var myPie2 = new Chart(ctx2).Pie(pieData2); }; &lt;/script&gt; '$pfstatetext' and '$cpuusage' values will be changing automatically. the above code is refreshing the pie chart every 10 seconds. But the values of the pieData2 is displaying the pie chart with the values, generated when the page was loaded, every time the pie chart refreshes after 10 seconds. When I reload the page the pie chart will be drawn with different and updated values of '$pfstatetext' and '$cpuusage' and these same values will be displayed every time the pie chart refreshes after 10 seconds, but not with changing values of '$pfstatetext' and '$cpuusage'. So what changes will i have to make so that changing values of '$pfstatetext' and '$cpuusage' will be taken by pie chart every time it refreshes after 10 seconds?
tagged with: pie-chart
tagged with: javascript
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38365643
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24730815
type: Comment
has text: This did the trick, and in combination to skip the `$("#createForm").submit(function(event){}` function and just do the stuff straight in `create_new_stuff(event)` function

http://stackoverflow.com/a/24745319
answers question: http://stackoverflow.com/q/24745262
has comment: http://stackoverflow.com/comment/38390223
score: 0
type: Answer
has body: personnes is an array, so in javascript it can only have integer indexes. To do what I think you want to do: function ajoutePersonne(n,a){ var person = {nom: n, age: a, enfant: ""}; personnes.push(person); } Where "person" is a javascript object using JSON.

http://stackoverflow.com/q/24605760
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38212986
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24651865
has comment: http://stackoverflow.com/comment/38125793
has answer: http://stackoverflow.com/a/24606390
type: Question
tagged with: c#
tagged with: arrays
tagged with: javascript
has title: how to pass array data to the javascript code from asp.net page?
score: 0
answer count: 2
has body: i have a chart template with javascript code and this is the part of it: // Toggling Series var datasets = { "Iran": { label: "IR", data: [ [1988, 483994], [1989, 479060], [1990, 457648], [1991, 401949], [1992, 424705], [1993, 402375], [1994, 377867], [1995, 357382], [1996, 337946], [1997, 336185], [1998, 328611], [1999, 329421], [2000, 342172], [2001, 344932], [2002, 387303], [2003, 440813], [2004, 480451], [2005, 504638], [2006, 528692] ] }, "russia": { label: "Russia", data: [ [1988, 218000], [1989, 203000], [1990, 171000], [1992, 42500], [1993, 37600], [1994, 36600], [1995, 21700], [1996, 19200], [1997, 21300], [1998, 13600], [1999, 14000], [2000, 19100], [2001, 21300], [2002, 23600], [2003, 25100], [2004, 26100], [2005, 31100], [2006, 34700] ] } }; now i want pass data from array variable to java script for replace with this data on asp.net page load event. how to pass array list to this ? can write a sample code ? Note: my data is big and this java script data is sample only and is better to pass array or variable!

http://stackoverflow.com/comment/38158067
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24622147
type: QuestionComment
has text: http://jsfiddle.net/mgHn4/ the code is here!!! i need help

http://stackoverflow.com/q/24641133
answer count: 1
tagged with: jquery
favorite count: 0
has title: Return to previous category from single page
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: wordpress
accepted answer: http://stackoverflow.com/a/24642897
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24642897
has comment: http://stackoverflow.com/comment/38196538
has body: I have next code on my single page. // RETURN TO PREVIOUS CATEGORY $('.cross').on('click', function(){ var toPrevPage = $(this); toPrevPage = history.back(); }); When you go to single page through urlOfsite/ => urlOfsite/category => urlOfsite/category/singlePage and then click on cross - you will be returned to the category from which you came, but when you go to single page through direct link - the cross does not return to the previous category. Why does this happen and how can I fix it? live example
upvote count: 1

http://stackoverflow.com/q/24679048
has answer: http://stackoverflow.com/a/24684621
accepted answer: http://stackoverflow.com/a/24684621
tagged with: google-sheets
tagged with: javascript
tagged with: google-apps-script
downvote count: 0
answer count: 1
has title: How to Import tab-delimited "CSV"
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
type: AnsweredQuestion
score: 1
upvote count: 1
has body: In the Interacting With Your Docs List tutorial, Importing data from a CSV file shows how to import a CSV file with comma-separated values. However, I'll be uploading a .txt file with tab-separated values. (Such as may be exported from Excel.) How could that script be modified to recognize the imported spreadsheet as tab-separated values instead of comma-separated values?
tagged with: import
type: Question

http://stackoverflow.com/q/24616627
type: Question
has comment: http://stackoverflow.com/comment/38152838
has answer: http://stackoverflow.com/a/24632926
has comment: http://stackoverflow.com/comment/38152931
has body: I have this piece of code where I want to load my HTML template from an external files inside a view folder. var InputView = Backbone.View.extend({ tagName: 'form', template: _.template($.get('views/inputCapo.html')), render: function(){ app.$el.append(this.template); return this; } }); app is the main view of my application, I know the issue with the XHR request with local files where I can't load that for security reason. I know that this is a problem with browsers, but with phonegap application the issue is the same? Which is the best alternative to accomplish the same feature keeping HTML files separate from scripts? I have already saw require.js and text.js library for loading HTML files without $.get but there is again the same dependency on XHR restrictions.
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/38151841
has comment: http://stackoverflow.com/comment/38152983
has comment: http://stackoverflow.com/comment/38153155
has title: Load HTML local template files with Backbone in a Phonegap/Cordova application
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38153038

http://stackoverflow.com/q/24673666
tagged with: charts
tagged with: highcharts
has comment: http://stackoverflow.com/comment/38367661
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24683403
score: 0
has comment: http://stackoverflow.com/comment/38257580
has comment: http://stackoverflow.com/comment/38300533
answer count: 1
has comment: http://stackoverflow.com/comment/38256033
has body: The process what i am working on it to highlight the y axis , when move the mouse over the barchart which is created based on the y axis. I have got the ways to make the x axis change color based on the "Bold X-Axis Label on Point Hover in Highcharts Column Chart" but cannot able to apply this to get the y axis change color or make it highlighted. In the current fiddle i have applied to change the color of the y axis, but cannot remove the color when i move the mouse from the series in the chart which is based on that y axis. Thanks in Advance. jsFiddle http://jsfiddle.net/X2t9H/
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24683403
has comment: http://stackoverflow.com/comment/38298483
has title: Highlight the corresponding y axis on mouse overr over the bar chart based on that axis in highchart
type: Question

http://stackoverflow.com/a/24638081
score: 1
has body: How about right after appending the listitems and refreshing the listview: list.append(text).listview('refresh'); var page1Scroll = initScroll("#scroll-wrap"); and $('#my-list2').empty().append(text).listview('refresh'); var page2Scroll = initScroll("#scroll-wrap2"); Updated PEN
type: Answer
has comment: http://stackoverflow.com/comment/38190473
upvote count: 1
has comment: http://stackoverflow.com/comment/38316871
has comment: http://stackoverflow.com/comment/38193598
has comment: http://stackoverflow.com/comment/38187720
answers question: http://stackoverflow.com/q/24637695
has comment: http://stackoverflow.com/comment/38219582
accepted answer of: http://stackoverflow.com/q/24637695
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38222571
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24656496
has text: Why you want to load them separately ?

http://stackoverflow.com/q/24728156
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24742423
tagged with: javascript
has body: Is it possible to specify rangePoints to handle circles of different sizes so that the distances are calculated by their edges rather than their centers? For example, this is what I am getting: () represent circle edges; &lt;----> represents distance calculated by rangePoints ( &lt;----)---(-&gt;&lt;-)-------(-&gt; ) ^Notice how it looks like the middle circle is closer to the left-most circle. Instead, I'd like to see the following: ( )&lt;----&gt;( )&lt;----&gt;( ) The function I am using looks something like: var y = d3.scale.ordinal() .domain(data.map(function(d) { return d.value})) .rangePoints([0, width]); var item = chart.append("g") .selectAll("circle") .data(data) .enter().append("circle") .attr("cy", function(d) { return y(d.value); })
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38369139
tagged with: http://stackoverflow.com/tag/svg
type: Question
accepted answer: http://stackoverflow.com/a/24742423
tagged with: d3.js
has title: RangePoints for circles of different sizes

http://stackoverflow.com/comment/56042954
type: Comment
type: QuestionComment
score: 0
has text: Hey how did you solve the problem or which was the best way for doing it for you?
comment on: http://stackoverflow.com/q/24691385

http://stackoverflow.com/q/24716182
has answer: http://stackoverflow.com/a/24716869
has comment: http://stackoverflow.com/comment/38334320
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38334442
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38334265
has comment: http://stackoverflow.com/comment/38334539
tagged with: ajax
answer count: 2
has comment: http://stackoverflow.com/comment/38334384
has body: i just start to learning php &amp; ajax, so pls be gentle. I have a clickable Content. When the user Click on a map, the Point Value is shown in a div. After he choose one Point he can go to the next step. Now i want to save the content of the div into a php session. How can i put the div content into a php session and go forward to the next step? I tried this: $("#btn").click(function() { var red = $(this).attr("id"); $(".tab").text(red); $.post("backend.php", {"cpl": red}); }); Backend.php &lt;?php session_start(); $_SESSION['var1'] = $_POST['cpl']; ?&gt; But he dont do anything. What am I doing wrong?
has answer: http://stackoverflow.com/a/24718304
has comment: http://stackoverflow.com/comment/38334371
favorite count: 0
score: -1
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/38334503
has comment: http://stackoverflow.com/comment/38334342
has comment: http://stackoverflow.com/comment/38334312
has title: How can i save div content into a PHP Session?
has comment: http://stackoverflow.com/comment/38334287

http://stackoverflow.com/a/24604913
has comment: http://stackoverflow.com/comment/38173155
has body: Do the following change in your code, I tried it and it worked for me WebViewActivity.this.webView.loadUrl("your url "); WebViewActivity is your activity name ImageButton imgbtr2 = (ImageButton) findViewById(R.id.imageButtonr2); WebView webView = (WebView)findViewById(R.id.webView); imgbtr2.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { WebViewActivity.this.mWebView.loadUrl("your url"); }}); For the http:// you can simply insert string "http://" at the beginning of the url you get from EditText like this. urlStringFromEditText.insert(0,"http://"); Or give this a try final EditText edt = (EditText) findViewById(R.id.editText1); edt.setText("http://"); Selection.setSelection(edt.getText(), edt.getText().length()); edt.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { // TODO Auto-generated method stub } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } @Override public void afterTextChanged(Editable s) { if(!s.toString().contains("http://")){ edt.setText("http://"); Selection.setSelection(edt.getText(), edt.getText().length()); } } });
has comment: http://stackoverflow.com/comment/38157260
has comment: http://stackoverflow.com/comment/38159564
has comment: http://stackoverflow.com/comment/38202669
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38201951
type: Answer
accepted answer of: http://stackoverflow.com/q/24604778
has comment: http://stackoverflow.com/comment/38128591
has comment: http://stackoverflow.com/comment/38165650
answers question: http://stackoverflow.com/q/24604778
downvote count: 0
score: 1

http://stackoverflow.com/comment/38171621
has text: i will edit my code what I have done so far .I just don't know where to use the ffmpeg if you can help me please check my code
comment on: http://stackoverflow.com/a/24626838
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24641691
has body: I'm wondering if this is the correct way of imagining what's taking place Yes. Why would anyone choose one method over another? .prototype values are shared amongst all instances therefore takes less memory and is faster: Defining methods via prototype vs using this in the constructor - really a performance difference? This is especially beneficial for methods (with their dynamic this binding) this values are specific to each instance methods defined there are closure which have access to the constructor scope and therefore allows true privacy. The own properties are necessary for the data that distinguishes the instances.
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24641544
type: Answer
score: 2

http://stackoverflow.com/a/24710262
has body: Remove the parenthesis in your observableArray assignment. self.orderByOptions = ko.observableArray(OrderByOptionModel().getOrderByOptions); The thing with knockout is it calls functions on your behalf when binding things to observables. Sometimes just removing the parenthesis to functions that return data and binding to the function itself fixes it.
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24710072
upvote count: 2
has comment: http://stackoverflow.com/comment/38352440
type: Answer

http://stackoverflow.com/comment/38388327
has text: this.width - undefined
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24744417

http://stackoverflow.com/a/24628194
has comment: http://stackoverflow.com/comment/38169682
score: 0
answers question: http://stackoverflow.com/q/24627946
type: Answer
has comment: http://stackoverflow.com/comment/38169769
has body: var clickCount = 0; $('#next').click(function(){ $('#question').text(allQuestions[clickCount].question); clickCount=(clickCount+1&gt;9)?0:clickCount+1; });
has comment: http://stackoverflow.com/comment/38169391
has comment: http://stackoverflow.com/comment/38168880

http://stackoverflow.com/comment/38134510
has text: @Juhana, updated my explanation. please have a look. I appreciate your support. Thanks :)
score: 0
comment on: http://stackoverflow.com/a/24608011
type: Comment
type: AnswerComment

http://stackoverflow.com/q/24661844
tagged with: c#
has body: I am trying to ensure that one drop down box or the other drop down box has a chosen entry, not both and both can not be left empty/ unchosen. Every time I click the search button, which runs the javascript validation code, I get the message as if I have chosen within both drop down boxes, even if I have only chosen from one, or even if I have not chosen from either! This could be my logic, however, I think that it could also be that my variables are reading null. Does anybody have any thoughts on what the problem could be and how I might fix it? Javascript: function userValid() { var Season = document.getElementById('&lt;%=cboMonth.ClientID %&gt;'); var Month = document.getElementById('&lt;%=lboChosenSeason.ClientID %&gt;'); var Day = document.getElementById('&lt;%=cboDay.ClientID %&gt;'); if (Season == 'none' &amp;&amp; Month == 0) { alert("A Season OR a Month is required."); return false; } if (Season != 'none' &amp;&amp; Month != 0) { alert("Please select either a season OR a month."); return false; } else { return true; } } ASP.NET &lt;%@ Page Language="C#" Title="Search for a class by date" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="SearchByDate.aspx.cs" Inherits="ClassesnWorkshops.SearchByDate" %&gt; &lt;asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"&gt; &lt;script src="UserValidation.js" type="text/javascript"&gt;&lt;/script&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt; &lt;div align="center" style="background-color: transparent; background-image: url(Images/panel-SearchByDate.png); height: 265px; background-repeat:no-repeat; background-position: 50% 50%;"&gt; &lt;div style="height: 100%; padding-left: 1%"&gt; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &lt;asp:ImageMap ID="ImageMap1" runat="server" ImageUrl="Images/hotspot.gif" ForeColor="Black" Height="16px" Width="605px"&gt; &lt;asp:RectangleHotSpot AlternateText="Search By Keyword" Left="0" T…
answer count: 1
tagged with: controls
tagged with: javascript
score: 0
tagged with: validation
tagged with: asp.net
type: UnansweredQuestion
has title: Using Javascript to validate asp.net c# controls based on another controls entry
has answer: http://stackoverflow.com/a/24661953
type: Question

http://stackoverflow.com/comment/38308487
type: AnswerComment
type: Comment
has text: Not really sure what you are after then, I thought you wanted to show the popup at the right time and only once regardless of what your popup code is. If you check here and move the cursor in the right window you can see the console log appearing at the right time and only once http://jsfiddle.net/3sSvU/
comment on: http://stackoverflow.com/a/24702527
score: 0

http://stackoverflow.com/a/73990453
answers question: http://stackoverflow.com/q/24700443
type: Answer
has comment: http://stackoverflow.com/comment/130643315
has body: I think it will depend on what your parser returns. For example the pegged library in the D programming language. It's usage looks like: language.d: module language; import pegged.grammar; enum Language = ` Math: Content < Sentence+ Sentence < LetStmt "." LetStmt < Let Var Be A Vocab Vocab < FormWord / Word FormWord <- HyphenForm "-" Word / Word "-" HyphenForm HyphenForm < ("(" Form ")" / Var / ZZ) Word <- LatinWord LatinWord <~ LatinAlpha+ Var <- identifier LatinAlpha <- [a-zA-Z] ZZ <~ [0-9]+ Form <~ .+ Let <- "Let" / "let" Be <- "be" A <- "An" / "an" / "A" / "a" `; mixin(grammar(Language)); app.d: import std.stdio; import language; void main() { while (true) { auto text = readln(); auto parseTree = Math(text); writeln(parseTree); } } Console I/O: Let G be a group Math (failure) +-Math.Content (failure) +-Math.Sentence (failure) +-Math.LetStmt[0, 17]["Let", "G", "be", "a", "group"] | +-Math.Let[0, 4]["Let"] | +-Math.Var[4, 6]["G"] | +-Math.Be[6, 9]["be"] | +-Math.A[9, 11]["a"] | +-Math.Vocab[11, 17]["group"] | +-Math.Word[11, 17]["group"] | +-Math.LatinWord[11, 16]["group"] +-literal!(".") Failure at line 1, col 0, after "e a group\n" expected "\".\"", but got "" Let G be a group. Math[0, 18]["Let", "G", "be", "a", "group", "."] +-Math.Content[0, 18]["Let", "G", "be", "a", "group", "."] +-Math.Sentence[0, 18]["Let", "G", "be", "a", "group", "."] +-Math.LetStmt[0, 16]["Let", "G", "be", "a", "group"] +-Math.Let[0, 4]["Let"] +-Math.Var[4, 6]["G"] +-Math.Be[6, 9]["be"] +-Math.A[9, 11]["a"] +-Math.Vocab[11, 16]["group"] +-Math.Word[11, 16]["group"] +-Math.LatinWord[11, 16]["group"] As you can see, the first time I entered "Let G be a group", I forgot the period at the end of the sentence. This resulted in a parse failure. At least printing the parseTree will show this, perhaps traversing the parseTree will also let you see the failure. When there is a failure it shows "what's expected". Isn't this what's expected the part you would show in an intellisense drop-down? I'm…
score: 0

http://stackoverflow.com/comment/38197271
has text: you friend, are a champion! I added a class to ul and kept the ID (as I have styles attached to it) and used the class instead of ID in the javascript initialisation. Plus I am now using data-show="onShow" in the view div then the appropriate js initialisation under the function instead of $(document).ready() The MVVM approach with data-role did not work out for me. BTW, I've been to your blog and found it most helpful, keep up the good work!
comment on: http://stackoverflow.com/a/24640603
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24693378
upvote count: 1
has comment: http://stackoverflow.com/comment/38290318
has answer: http://stackoverflow.com/a/24693435
type: Question
has body: Got this function to extend an array (groups) by checking a checkbox: $("input[type=checkbox]").click(function() { if($(this).is(":checked")){ $(this).parent().data("groups").push("my"); console.log($(this).parent().data("groups")); } else{ // $(this).parent().data("groups").pop(); console.log($(this).parent().data("groups")); } }); &lt;div class="item white" data-kpi="GDI" data-groups='["all", "numbers", "green", "square"]'&gt; &lt;input type="checkbox" class="ps" name="add" value="my" /&gt; &lt;/div&gt; I want to be able to remove the item again by unchecking the checkbox (there might be more than one 'my' group-items).
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24693435
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38290238
favorite count: 0
has title: remove item from javascript array on uncheck
type: AnsweredQuestion

http://stackoverflow.com/comment/38236041
type: Comment
type: QuestionComment
has text: @Bergi - Totally missed that thanks!
comment on: http://stackoverflow.com/q/24663466
score: 0

http://stackoverflow.com/comment/38170460
type: Comment
type: QuestionComment
has text: @AnjuRaghunath but this link to image i want to description link
comment on: http://stackoverflow.com/q/24628786
score: 0

http://stackoverflow.com/comment/38279093
has text: You are probably missing the `-movflags faststart` option on the MP4 you created. Use `qt-faststart` to fix the file.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24653289
type: Comment

http://stackoverflow.com/a/54646877
answers question: http://stackoverflow.com/q/24621475
downvote count: 0
upvote count: 8
type: Answer
score: 8
has body: Here is a version that doesn't use Youtubes iframe API script. The only drawback is that the iframe API might change. &lt;iframe id="player" src="https://www.youtube.com/embed/dQw4w9WgXcQ?enablejsapi=1"&gt;&lt;/iframe&gt; var addYoutubeEventListener = (function() { var callbacks = []; var iframeId = 0; return function (iframe, callback) { // init message listener that will receive messages from youtube iframes if(iframeId === 0) { window.addEventListener("message", function (e) { if(e.origin !== "https://www.youtube.com" || e.data === undefined) return; try { var data = JSON.parse(e.data); if(data.event !== 'onStateChange') return; var callback = callbacks[data.id]; callback(data); } catch(e) {} }); } // store callback iframeId++; callbacks[iframeId] = callback; var currentFrameId = iframeId; // sendMessage to frame to start receiving messages iframe.addEventListener("load", function () { var message = JSON.stringify({ event: 'listening', id: currentFrameId, channel: 'widget' }); iframe.contentWindow.postMessage(message, 'https://www.youtube.com'); message = JSON.stringify({ event: "command", func: "addEventListener", args: ["onStateChange"], id: currentFrameId, channel: "widget" }); iframe.contentWindow.postMessage(message, 'https://www.youtube.com'); }); } })(); addYoutubeEventListener(document.getElementById("player"), function(e) { switch(e.info) { case 1: // playing break; case 0: // ended break; } });

http://stackoverflow.com/comment/38385868
type: AnswerComment
score: 0
type: Comment
has text: Where do I set file locations though ? Files located in pages folder.
comment on: http://stackoverflow.com/a/24742577

http://stackoverflow.com/a/24723410
type: Answer
has comment: http://stackoverflow.com/comment/38348282
has body: An ID is meant to be unique: it refers to one element. Classes refer to multiple elements and should be used in cases like this. So, your images should all have fotoblok as the class: &lt;img class="fotoblock"/&gt; Then, refer to the classes in your event handler: $(".fotoblok").mouseover(function(){ $(this).animate({opacity: 0.5}); }); $(".fotoblok").mouseout(function(){ $(this).animate({opacity: 1}); }); Also, this is repetitive code. To simplify it, use .hover(), which handles both mouseenter and mouseexit events: $(".fotoblok").hover(function(){ $(this).animate({opacity: 0.5}); }),function(){ $(this).animate({opacity: 1}); });
score: 0
answers question: http://stackoverflow.com/q/24723352

http://stackoverflow.com/q/24700361
accepted answer: http://stackoverflow.com/a/24704757
type: AnsweredQuestion
has body: I'm experimenting with React.js with Rails via react-rails(1.0.0pre) and have had some troubles pre-rendering responsive elements that rely on the window size. Whenever I create a component that uses window, I get the following error: [React::Renderer] ReferenceError: window is not defined when attempting to render the component to a string in my Rails view. For example, my component: /** @jsx React.DOM */ var Example = React.createClass({ getInitialState: function() { return { windowWidth: $(window).width() }; }, render: function () { return ( &lt;div className="example-wrapper"&gt; {this.props.label} {this.state.windowWidth} &lt;/div&gt; ); } }); and my view with props: &lt;%= react_component('Example', {name: 'Window width is:'}, { prerender: true }) %&gt; Is it possible to reference the window in React's virtual DOM?
type: Question
has comment: http://stackoverflow.com/comment/38311277
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/24704757
upvote count: 4
tagged with: reactjs
has title: Window is not Defined on Prerender
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/38172069
type: AnswerComment
comment on: http://stackoverflow.com/a/24629835
score: 0
type: Comment
has text: Yes, if that class has the same styling as the `:hover` selector

http://stackoverflow.com/comment/38093148
type: QuestionComment
has text: @DavidThomas I will see a how to for JS Fiddle, I never saw it, thank you for mentioning.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24588868

http://stackoverflow.com/comment/38183202
has text: my bad. I was too pre-occupied with making this work. Thanks again
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24635285
type: Comment

http://stackoverflow.com/comment/38154273
score: 0
type: AnswerComment
has text: Yes, but global variables are to be avoieded.
comment on: http://stackoverflow.com/a/24619876
type: Comment

http://stackoverflow.com/comment/38102281
type: QuestionComment
has text: @hex494D49 I do this only for local test purpose. And only myself will be affected.
comment on: http://stackoverflow.com/q/24593573
score: 1
type: Comment

http://stackoverflow.com/comment/54035695
type: Comment
has text: Something important to note, is that a radio button group is considered valid regardless of an option being selected unless at least one of the radio buttons in a group has the `ng-model` attribute.
score: 3
comment on: http://stackoverflow.com/a/27623682
type: AnswerComment

http://stackoverflow.com/q/24645419
answer count: 1
has body: In angular i have authentication service which made call to the server. pp.factory('authService', ['api','$cookieStore', function(api, $cookieStore, ACCESS_LEVELS){ var AuthentoctionControllerUrl = "http://localhost:18678/api/Authentication/"; var isAuth; var IsAdmin; function Login(credential){ return api.Post(AuthentoctionControllerUrl + "ByPassword" ,null , credential); }; var Logout = function() { $cookieStore.remove('AuthorizationHeader'); isAuth = false; }; var AccessPrivilegesAdmin = function(user_type){ if(IsAdmin == user_type) return true; return false; }; var AccessPrivilegesAuth = function(){ return isAuth; }; return { Login : Login, Logout : Logout, isAuth : isAuth, IsAdmin : IsAdmin, AccessPrivilegesAuth : AccessPrivilegesAuth, AccessPrivilegesAdmin : AccessPrivilegesAdmin }; }]); the service have two variables which are isAuth and is Admin which currently they are undfiend.However when i call that controller should set them to a value and i can see it in the debug mode. app.controller('LoginController', ['$scope', '$location', 'authService','$cookieStore', function($scope, $location, authService, $cookieStore){ $scope.loginData = { EmailAddress : "", password : "" }; $scope.error; $scope.error_exist = false; $scope.login = function(){ authService.Login($scope.loginData).success(function(response){ $cookieStore.put('AuthorizationHeader', response.Token); authService.isAuth = true; authService.IsAdmin = response.IsAdmin; $location.path('categories'); }).error(function(Error){ $scope.error_exist = true; switch(Error.ExceptionMessage){ case "201" : $scope.error = "The emailAddress/password pair don't match an existing member"; break; case "210" : $scope.error = "Value cannot be null missing Email Address and/or password."; break; case "202" : $scope.error = "The email address you are using isn't confirmed. Please see your inbox for further instructions."; break; default : $scope.error = "Error with the server"; } }); }; }]); the problem is i have event on …
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24645493
has title: Can not set variables of service in a controller
type: Question
tagged with: javascript
tagged with: angularjs-scope
score: 0

http://stackoverflow.com/comment/57181988
has text: To get value and text see my answer here: http://stackoverflow.com/a/34718000/779238
comment on: http://stackoverflow.com/q/24666297
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/55671804
answers question: http://stackoverflow.com/q/24594519
downvote count: 0
has body: I am a little bit late but this is an improvement on pixelbits answer: scope.isBusy = function () { return $http.pendingRequests.length &gt; 0; }; scope.$watch(scope.isBusy, function (hasPending) { if (hasPending) { elm.show(); } else { elm.hide(); } }); You may want to put this in a directive like this: .directive('loadingBoxDir', ['$http', function ($http) { return { restrict: 'A', link: fn_link }; function fn_link(scope, elm) { scope.isBusy= function () { return $http.pendingRequests.length &gt; 0; }; scope.$watch(scope.isBusy, function (hasPending) { if (hasPending) { elm.show(); } else { elm.hide(); } }); } }]);
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/38285877
score: 0
comment on: http://stackoverflow.com/q/24690712
type: Comment
type: QuestionComment
has text: I am waiting for your update

http://stackoverflow.com/a/24713271
has comment: http://stackoverflow.com/comment/38329300
has body: It alternates between true and false because it matches the first time (true), then tries a second match, which fails because there’s only one T in Trafalgar Square. When you call it again, it loop back, thus the true, false, true, etc. To fix that, update its cursor before matching: var p = new Regexp('t', 'gi') // same as `p = /t/gi` // ... p.lastIndex = 0; p.test("Trafalgar Square"); // true // try again: p.lastIndex = 0; p.test("Trafalgar Square"); // true -&gt; it works Here is a relevant jsfiddle with a couple examples.
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/38329151
accepted answer of: http://stackoverflow.com/q/24713155
answers question: http://stackoverflow.com/q/24713155
upvote count: 4

http://stackoverflow.com/a/24718409
answers question: http://stackoverflow.com/q/24718348
score: 4
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/38459618
type: Answer
has body: Use this: [,.!?;:]|\b[a-z']+\b See the matches in the demo. For instance, in JavaScript: resultArray = yourString.match(/[,.!?;:]|\b[a-z']+\b/ig); Explanation The character class [,.!?;:] matches one character from inside the brackets OR (alternation |) \b match a word boundary [a-z']+ one or more letters or apostrophes \b word boundary
has comment: http://stackoverflow.com/comment/38338803

http://stackoverflow.com/comment/38185800
type: Comment
type: QuestionComment
has text: Can you add a JSfiddle?
comment on: http://stackoverflow.com/q/24637182
score: 0

http://stackoverflow.com/a/24673654
score: -1
has body: Use Jquery functions HI console.log($("#myPselector").attr('data-id'));
answers question: http://stackoverflow.com/q/24673418
type: Answer
downvote count: 6
has comment: http://stackoverflow.com/comment/104460512
has comment: http://stackoverflow.com/comment/38255844
upvote count: 5

http://stackoverflow.com/a/24588501
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: Something like this? for (key in this[whom].zoom) Instead of for (key in this.whom.zoom) and then call the function like this this.illuminateLeg("whom")
answers question: http://stackoverflow.com/q/24588478
accepted answer of: http://stackoverflow.com/q/24588478
upvote count: 2

http://stackoverflow.com/q/24606056
has comment: http://stackoverflow.com/comment/38126208
tagged with: javascript
has title: Why is it bad practice to use implicit id references in javascript?
score: 0
possible better answer: http://stackoverflow.com/a/24606307
has body: I have seen and avoided code like this: Div It just seems wrong to me that I should refer to the node by it's id alone without explicitly assigning it to a variable first. Like this: var myDiv = document.getElementById('myDiv'); Is there a good reason why we shouldn't use code like in the first example or am I just superstitious?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/3434278
has answer: http://stackoverflow.com/a/24611517
has comment: http://stackoverflow.com/comment/38126625
has comment: http://stackoverflow.com/comment/38127566
has comment: http://stackoverflow.com/comment/38126235
has comment: http://stackoverflow.com/comment/38126338
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38126277
accepted answer: http://stackoverflow.com/a/24611517
type: Question
has answer: http://stackoverflow.com/a/24606351
answer count: 3
has answer: http://stackoverflow.com/a/24606307

http://stackoverflow.com/q/24740537
linked to: http://stackoverflow.com/q/4651676
score: 3
upvote count: 3
has body: In my page there is a list of buttons. Depending on the clicked button the same .php file is loaded with a different content for the &lt;textarea&gt;. Then TinyMCE is initialised and after that the content of TinyMCE is set. However, this only works on the first click. When a user clicks a different button, the &lt;textarea&gt; is loaded, but TinyMCE is not initialised. I don't know why it's doing that, because it's the same script that is executed. $("ul").on("click", "a.click-menu", function() { var id = $(this).attr("id"); $(".inject").load("Including/modules/Pages/index.php?page="+id, function () { tinymce.init({selector:"textarea"}); }); }); And this is index.php in a nutshell: &lt;?php echo '&lt;textarea&gt;'.$_GET['page'].'&lt;/textarea&gt;'; ?&gt;
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24740614
has title: TinyMCE.init not working on second click
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/38383352
type: QuestionComment
comment on: http://stackoverflow.com/q/24740538
has text: Thanks. I came across it while searching online. How should I adjust the d3.tsv function to accommodate the separate arrays?
score: 0
type: Comment

http://stackoverflow.com/q/24691585
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24691697
upvote count: 2
accepted answer: http://stackoverflow.com/a/24692500
type: Question
has comment: http://stackoverflow.com/comment/38287527
has title: JavaScript Code is not working in IE8
has comment: http://stackoverflow.com/comment/38287225
tagged with: internet-explorer-8
has answer: http://stackoverflow.com/a/27796298
has body: The below piece of code is not working in IE8, but, it is working perfectly on FireFox and Google Chorome, Even, there is no error thrown by IE8, but, output is not coming. Any Idea? What is the actual problem? &lt;html&gt; &lt;head/&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; (function(){ var inpEle = document.createElement("div"); inpEle.setAttribute("id", "div1"); var texEle = document.createTextNode("This is my Sample Para. I am testing it again my own level that prove How i am capable of."); inpEle.appendChild(texEle); document.body.appendChild(inpEle); })(); (function(){ var inpEle1 = document.createElement("input"); inpEle1.setAttribute("type", "button");inpEle1.setAttribute("value", "Show");inpEle1.setAttribute("onclick", "Show()"); document.body.appendChild(inpEle1); var inpEle2 = document.createElement("input"); inpEle2.setAttribute("type", "button");inpEle2.setAttribute("value", "Hide");inpEle2.setAttribute("onclick", "Hide()"); document.body.appendChild(inpEle2); })(); &lt;/script&gt; &lt;script type="text/javascript"&gt; window.onload= function(){ document.getElementById('div1').style.display="none"; } Show = function (){ document.getElementById('div1').style.border="2pt solid green"; document.getElementById('div1').style.display=""; } Hide = function(){ document.getElementById('div1').style.border=""; document.getElementById('div1').style.display="none"; } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
tagged with: javascript
has answer: http://stackoverflow.com/a/24691745
downvote count: 0
has answer: http://stackoverflow.com/a/24692500
favorite count: 0
possible better answer: http://stackoverflow.com/a/24691745
answer count: 4
score: 2

http://stackoverflow.com/a/24652623
answers question: http://stackoverflow.com/q/24652295
score: 3
downvote count: 0
type: Answer
has body: Try this echo " ";
upvote count: 3

http://stackoverflow.com/a/24602357
has comment: http://stackoverflow.com/comment/38119798
type: Answer
has comment: http://stackoverflow.com/comment/38119556
upvote count: 6
has comment: http://stackoverflow.com/comment/38119791
score: 6
answers question: http://stackoverflow.com/q/24602330
has comment: http://stackoverflow.com/comment/38119612
has comment: http://stackoverflow.com/comment/38119716
has body: It means the error is lost in limbo since the operating function did not "get a callback", viz., the error is "swallowed", since there is no callback to handle it. var foo = function(onSuccess, onFailure) { // ... // uh-oh, I failed if(onFailure) { onFailure(err); } else { // well, that probably wasn't too important anyway... } } foo(function() { console.log("success!"); } /* no second argument... */); Note in synchronous coding (say, most Java) it's much harder for this to happen. Catch blocks are much better enforced and if an exception escapes anyway, it goes to the uncaught exception handler which by default crashes the system. It's like this in node too, except in the above paradigm where an exception isn't thrown it's likely swallowed. Strong community convention could solve it in my trivial example above, but convention can not completely solve this in general. See e.g. the Q promise library which supports a done method. Q.fcall(promisedStep1) .then(promisedStep2) .then(promisedStep3) .then(promisedStep4) .then(function (value4) { // Do something with value4 }) .catch(function (error) { // Handle any error from all above steps }) .done(); The done call there instructs the promise chain to throw any unhandled exceptions (if the catch block were missing, or the catch block itself throws). But it is fully the responsibility of the programmer to call done, as it must be, since only the programmer knows when the chain is complete. If a programmer forgets to call done the error will sit dangling in the promise chain. I have had real production bugs caused by this; I agree, it's a serious problem. I'll be honest that a lot of that block in the post doesn't make much sense to me. But I'm an experienced Node.js programmer and this is the only thing I can think that could mean.
accepted answer of: http://stackoverflow.com/q/24602330
has comment: http://stackoverflow.com/comment/38119460
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38119573
has comment: http://stackoverflow.com/comment/38119419
has comment: http://stackoverflow.com/comment/38119407

http://stackoverflow.com/comment/38224971
type: AnswerComment
has text: @domokun You should not edit someone else question with better answer (you can only fix typos, formatting, grammars etc. but not change the answer). If you have better one just create an anwser.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24657601

http://stackoverflow.com/q/24723467
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38349267
has answer: http://stackoverflow.com/a/24725270
type: UnansweredQuestion
tagged with: iframe
score: -3
downvote count: 3
has body: I'm using Javascript to have dropdown box that open iframe below with the selected page. The page below is a dynamic graph page and therefore the height of it. To see the page without scrolling in the iframe i've added 1320% to it. How can I do this dynamically based on the page ? &lt;script type="text/javascript"&gt; function loadFrame() { var s=document.getElementById("report_type").value; document.getElementById("loadContainer").innerHTML="" var iframe = document.createElement("iframe"); iframe.src = s; iframe.style.width = 100+"%"; iframe.style.height = 1320+"%"; iframe.frameBorder = 0; document.getElementById("loadContainer").appendChild(iframe); } &lt;/script&gt;
has title: javascript created iframe auto-height
type: Question
upvote count: 0

http://stackoverflow.com/comment/38333666
has text: Maybe, Stuart, but I want to do this with an array per class assignment.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24715896

http://stackoverflow.com/comment/39143033
has text: @Cyndi so you have to apply my response on your HTML side. :) Don't forget to mark it as the right question if it worked.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24716422

http://stackoverflow.com/q/24655761
has comment: http://stackoverflow.com/comment/38220750
type: Question
has comment: http://stackoverflow.com/comment/38220887
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/24655928
has body: I need to prevent any of client side javascript attacts(xss,csrf), how can i validate an expression with preg_match in php? Is there any regular expression patterns for catching client side attacks? Or is there other recommended ways to do this?
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38221991
tagged with: preg-match
tagged with: php
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24655928
has title: regular expression patterns for catching client side attacks
downvote count: 1
has comment: http://stackoverflow.com/comment/38221224

http://stackoverflow.com/comment/38344678
type: Comment
has text: check the edit made and see if it works, because it works fine here.
comment on: http://stackoverflow.com/a/24721162
score: 0
type: AnswerComment

http://stackoverflow.com/a/25079013
type: Answer
answers question: http://stackoverflow.com/q/24735849
score: 0
has body: I fixed that problem later with removing the MS windows update KB2962872. That sucks, that Microsoft did that bug and took so much time to fix it. I'm still not sure have it been fixed by newer update?

http://stackoverflow.com/comment/38400088
has text: thanks it is doing the work,but i would like it to append at the right side of the second column, forget the third column-that will come in later.And could you make it work such that if i click on link 3 none of the top cells in the column are displayed apart from starting with the one inline with this link 3
type: Comment
comment on: http://stackoverflow.com/a/24744675
score: 0
type: AnswerComment

http://stackoverflow.com/a/24748499
answers question: http://stackoverflow.com/q/24748425
has body: First, You must make sure that only one ID in HTML. $('#slide1 .active1').next() is equal to $('#slide1 .active1').eq(0).next() Following is resolutions: $('#slide1 img').eq(1) $('#slide1 img')[1] $('#slide1 .active1').parent().next().children().eq(0);
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38397095
upvote count: 2
score: 2

http://stackoverflow.com/a/24745913
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24682024
has body: This answer was really helpful: https://gis.stackexchange.com/questions/24999/showing-menu-based-on-right-click-on-point-geometry-in-javascript For my working example, I started with this OpenLayers example: http://openlayers.org/dev/examples/feature-events.html. I then modified the feature-events.js file to the following code below. The key part is the added map.div.oncontextmenu section at the very bottom. I captured the feature clicked on using the right-mouse button and then built a very simple popup menu. That's where you can grab the feature ID and do what you want as far as building up the popup. It also only seemed to work on one vector layer, so I got rid of layer2 from the example. Using code from http://openlayers.org/dev/examples/select-feature-multilayer.html might solve that issue. Code var layerListeners = { featureclick: function(e) { log(e.object.name + " says: " + e.feature.id + " clicked."); return false; }, nofeatureclick: function(e) { log(e.object.name + " says: No feature clicked."); } }; var style = new OpenLayers.StyleMap({ 'default': OpenLayers.Util.applyDefaults( {label: "${l}", pointRadius: 10}, OpenLayers.Feature.Vector.style["default"] ), 'select': OpenLayers.Util.applyDefaults( {pointRadius: 10}, OpenLayers.Feature.Vector.style.select ) }); var layer1 = new OpenLayers.Layer.Vector("Layer 1", { styleMap: style, eventListeners: layerListeners }); layer1.addFeatures([ new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT("POINT(-1 -1)"), {l:1}), new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT("POINT(1 1)"), {l:1}), new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT("POINT(-1 1)"), {l:2}), new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT("POINT(1 -1)"), {l:2}) ]); /*var layer2 = new OpenLayers.Layer.Vector("Layer 2", { styleMap: style, eventListeners: layerListeners }); layer2.addFeatures([ new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT("POINT(-1 1)"), {l:2}), new OpenLayers.Feature.Vector(OpenLayer…
answers question: http://stackoverflow.com/q/24682024
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/38120642
has text: @jfriend00 thanks mate, I knew that there will be a better solution than this, but it didn't strike me at that time. *Roamer-1888's* one is elegant actually. Edited the ans to specify separate deferreds.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24596874

http://stackoverflow.com/comment/38263357
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24678558
has text: Ah thank you, getting closer, but the buttons are now both active if I try to reveal the register form. I didn't even notice the class misspell and the browser was able to figure it out so it didn't affect anything.

http://stackoverflow.com/comment/38333186
score: 1
comment on: http://stackoverflow.com/q/24715666
has text: Please provide the JSFiddle code in your question. Links can break in the future.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24610170
has title: Hover fade not working with masonry CSS
score: 1
has answer: http://stackoverflow.com/a/24610495
upvote count: 1
type: Question
answer count: 1
has body: I am working on my portfolio site, and on the works page, I have a pinterest-like masonry layout with images of some of my work. On hover of the images I am using css to show a caption box and this works as expected. However, I want the image to fade without the caption box failing and when I add the hover fade on the image whether it be via CSS or javascript/jquery it only works properly on the first row of images. or rather it works properly on all rows but it breaks the caption box on any row aside from the first. It definitely seems to be something due to the rows I am using because if I change the css to only have one row it works as expected. Here is the code of one of the image panels: Abstract Reality This piece was completed during my studies at the Art Institute of Virginia Beach. The drawing was done in colored chalk and conte on paper. Abstract Reality This piece was completed during my studies at the Art Institute of Virginia Beach. The drawing was done in colored chalk and conte on paper. Here is the css controlling the caption box: .img-wrap{ overflow:hidden; position:relative; } .img-overlay { background-color:#000; bottom:0; color:#fff; opacity:0; filter: alpha(opacity = 0); position: absolute; width:100%; z-index:9999; } .img-overlay h4, .img-overlay p{ padding:0 10px; } .img-wrap:hover .img-overlay{ opacity:0.9; filter: alpha(opacity = 90); transition:opacity 0.25s; -moz-transition:opacity 0.25s; -webkit-transition:opacity 0.25s; } Here is the jquery on the ember view controlling the fade (the function starting with $('.img-wrap'): App.WorksfadeView = Ember.View.extend({ didInsertElement : function(){ Ember.run.scheduleOnce('afterRender', this, function(){ $(function() { $("a[rel^='prettyPhoto']").prettyPhoto({social_tools: false, theme: 'dark_rounded', allow_resize: false}); $('.work-panel.image').on('click', function(e) { var img = $(this).find('img').attr('src'); var name = $(this).find('h4').text(); var desc = $(this).find('p').text(); $.prett…
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js
has comment: http://stackoverflow.com/comment/38134209
accepted answer: http://stackoverflow.com/a/24610495
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/39418005
type: QuestionComment
has text: Maybe you have a library that unsets ```document.body.onresize``` at some point. You could try to add ```setTimeout(function(){console.log('0sec',document.body.onresize);},0);setTimeout(function(){console.log('1sec',document.body.onresize);},1000);``` after your code
comment on: http://stackoverflow.com/q/24717739
score: 0
type: Comment

http://stackoverflow.com/comment/38205331
has text: no value is getting passed..IF enter static value its getting passed to the target page.
comment on: http://stackoverflow.com/q/24647475
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24650610
has comment: http://stackoverflow.com/comment/38215577
favorite count: 0
has comment: http://stackoverflow.com/comment/38214937
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38213875
has title: how to change extension icon based on page url and alert differently in different icons
has comment: http://stackoverflow.com/comment/38215114
score: 6
upvote count: 7
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24652607
tagged with: javascript
has body: I am building a chrome extension and I need to display some icon indicating disabled if the url doesnt matches to some specific pattern and alert if the user clicks on disabled icon and no popup is shown. Icon is the chrome browserAction icon. But if the user clicks on icon which is indicating enabled, the default popup should show. Basically the popup should not open when the page url is not matching and should give an alert. i am current using this in the background page but its looks very inefficient, most of the time it works but shows alert only after page reload: background.js var alertError = function(arg){ alert('Something'); }; chrome.tabs.onActivated.addListener(function(info){ chrome.tabs.get(info.tabId, function(change){ if(change.url == undefined){ chrome.browserAction.setPopup({tabId: info.tabId, popup: ''}); chrome.browserAction.setIcon({path: '../icons/icon-disabled.png', tabId: info.tabId}); chrome.browserAction.onClicked.removeListener(alertError); chrome.browserAction.onClicked.addListener(alertError); console.log('undefined'); } else if(change.url.match(/https:\/\/google\.com\/*/) == null){ chrome.browserAction.setPopup({tabId: info.tabId, popup: ''}); chrome.browserAction.setIcon({path: '../icons/icon-disabled.png', tabId: info.tabId}); chrome.browserAction.onClicked.removeListener(alertError); chrome.browserAction.onClicked.addListener(alertError); console.log('not matching'); } else{ chrome.browserAction.setPopup({tabId: info.tabId, popup: '../html/popup.html'}); chrome.browserAction.setIcon({path: '../icons/icon.png', tabId: info.tabId}); console.log('matched'); } }); }); chrome.tabs.onUpdated.addListener(function (tabId, change, tab){ if(change.url == undefined){ return; } else if(/https:\/\/google\.com\/*/) == null){ chrome.browserAction.setPopup({tabId: tabId, popup: ''}); chrome.browserAction.setIcon({path: '../icons/icon-disabled.png', tabId: tabId}); chrome.browserAction.onClicked.removeListener(alertError); chrome.browserAction.onClick…
tagged with: google-chrome-extension
answer count: 1

http://stackoverflow.com/q/24703831
tagged with: javascript
tagged with: ajax
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38313043
tagged with: angularjs
has title: Missing fields in $http response
has comment: http://stackoverflow.com/comment/38330342
has comment: http://stackoverflow.com/comment/38314580
has answer: http://stackoverflow.com/a/25090394
accepted answer: http://stackoverflow.com/a/25090394
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39040724
has comment: http://stackoverflow.com/comment/38460090
has comment: http://stackoverflow.com/comment/38319882
has body: I have an app that at some point issues an $http POST to a WEB API project as follows $http({ method: update ? "PUT" : "POST", url: framewidth + "inspections", data: data, }).then( function (object) { toastr.success(Messages.success.dflt); console.log(object.data); rtrn.resolve(object); }, function (error) { toastr.error(Messages.Error(error.statusText)); rtrn.reject(error); } ); It saves fine but after it returns object.data is missing some fields. I have traced the missing fields all the way from the depths of the database to the Fiddler layer and the missing fields are there up until the success function of $http So I can actually see my missing fields being returned in fiddler but they seem to disappear somewhere between that and console.log(object.data); line above. I am totally stumped. It seems it's disappearing in the layer that's outside my control.
type: Question
tagged with: asp.net-web-api2

http://stackoverflow.com/comment/38393586
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24747178
score: 0
has text: Good catch. I also added that it should only do `overflow-x: auto`, since vertical scrolling should just use the viewport. http://jsfiddle.net/4sjeS/2/

http://stackoverflow.com/a/24688931
has body: The fragment appears because you used a &lt;a&gt; tag with a href attribute and your browser thinks of it as a link to follow. You could use another html element with a specified id, such as &lt;button id="pop1"&gt;. You will then be able to target it with JS (document.getElementById) and map your click event. Here is a minimal case.
answers question: http://stackoverflow.com/q/24688342
score: 0
type: Answer

http://stackoverflow.com/a/24591345
type: Answer
answers question: http://stackoverflow.com/q/24591327
upvote count: 9
score: 9
downvote count: 0
has body: Your code doesn't work because style property only contains inline styles, not those coming from a stylesheet. To get the computed style, you can use css method: $('#cadrage').css('display') == 'block'

http://stackoverflow.com/a/24597203
has body: Your JSON object is incorrect. You evidently cannot have multiple entries with the same key (what you are doing is telling JS: "James is this guy. Ah no, James is this other guy. Ah no again, James is this 3rd guy". Of course, he remembers only the last one. You need to use arrays. The easiest solution would be to modify your JSON to look like this: var obj = { Dilse : [ {"name":"Dil Se Re","length":"5:40","songType":"Romantic"}, {"name":"Jiya Jale","length":"3:50","songType":"Self Description"}, {"name":"Chaiyya Chaiyya","length":"4:30","songType":"Masti"}, ], Rockstar : [ {"name":"Sadda haq","length":"5:40","songType":"Romantic"}, {"name":"Tum ho Pas Mere","length":"3:50","songType":"Self Description"}, {"name":"Sheher me","length":"4:30","songType":"Masti"}, ], } There are other options possible, such as a single array (not associative), with what used to be the key as one of the values inside each object, but that requires you to iterate through the whole array to find stuff you want.
upvote count: 1
has comment: http://stackoverflow.com/comment/38108901
downvote count: 0
has comment: http://stackoverflow.com/comment/38108799
type: Answer
answers question: http://stackoverflow.com/q/24597116
score: 1

http://stackoverflow.com/comment/39327468
type: Comment
comment on: http://stackoverflow.com/a/25224086
score: 0
type: AnswerComment
has text: Is it something you can point to me groups.google.com/forum/#!topic/durandaljs/VnSX-uV-fA8

http://stackoverflow.com/a/24689491
answers question: http://stackoverflow.com/q/24688809
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: try passing container to BigVideo, as: $(function() { BV = new $.BigVideo({container: $('#your_div_element_id')}); BV.init(); BV.show('http://vjs.zencdn.net/v/oceans.mp4'); });
has comment: http://stackoverflow.com/comment/38300232

http://stackoverflow.com/q/24719648
possible better answer: http://stackoverflow.com/a/24719676
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24719676
upvote count: 2
downvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/24719670
tagged with: javascript
has title: Hide all Table Rows that does not have a "div"
score: 0
answer count: 2
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24719670
has body: I have following html with radio buttons and a table. When the radio button “Error Only” is selected, we need tohide all table rows that does not have a div with class name = ‘errorLine’ I have written following code fort this //Hide all rows that does not have a div with class named "errorLine" $("#tblVisualAidResult tbody tr:not('.errorLine')").hide(); This does not work. I understand the reason – the above code is looking for a row with class name ‘errorLine’; not looking for a div inside How can we modify this jQuery code to hide all rows other than the error rows? Fiddle HTML View: All Errors Only Serial Number Container ID Status 1 ~~3957495 Received 2 of 5 of work lot 6D20223403 x ~~ Case Label does not Exist jQuery $(document).ready(function () { var viewMode = "All" function handleLogVisibility() { if(viewMode == "Error") { alert(viewMode); //Hide all rows that does not have a div with class named "errorLine" $("#tblVisualAidResult tbody tr:not('.errorLine')").hide(); } else { alert(viewMode); $("#tblVisualAidResult tbody tr:not('.errorLine')").show(); } } //Radio button change $('.viewModeRadio').change(function () { viewMode = $(this).val(); handleLogVisibility(); }); });

http://stackoverflow.com/q/24713254
linked to: http://stackoverflow.com/q/24266784
has answer: http://stackoverflow.com/a/24714075
tagged with: angularjs-filter
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: AngularJS filter list on sub element in array
accepted answer: http://stackoverflow.com/a/24714075
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/38328786
type: Question
score: 3
has comment: http://stackoverflow.com/comment/38328741
has body: I am trying to create a simple AngularJS filter on a list. However the element I want to filter on is a sub-element in an array. (JSFIDDLE) The objects: elements = [{ 'claim': [{value:'foo'}], class: 'class1', subject: 'name1' }, { 'claim': [{value:'bar'}], class: 'class1', subject: 'name2' }, { 'claim': [{value:'baz'}], class: 'class1', subject: 'name2' }, { 'claim': [{value:'quux'}], class: 'class1', subject: 'name3' }]; HTML: &lt;tr class='claimrow' data-ng-repeat='c in elements | filter:{claim[0].value:srcBoxFilter} | orderBy: "claim[0].value" '&gt; The order by handles the syntax "claim[0].value" but the filter does not. This generates an error: Error: Syntax Error: Token '[' is unexpected, expecting [:] at column 25 of the expression [elements | filter:{claim[0].value:srcBoxFilter} | orderBy: "claim[0].value"] starting at [[0].value:srcBoxFilter} | orderBy: "claim[0].value"].
tagged with: javascript

http://stackoverflow.com/q/24601062
has title: Connecting elements in separate arrays
has body: I'm looking to connect two arrays together, sort of. I have two arrays, and want the elements of them to be sort of 'combined'. So, let's say I have a scanner. It gives me a value for each element in array1 (like US$). I want it to return something (like a string, "this product is selling for cheap!") if that value for each element is less than or equal to the value in array2. I'd only want it to link one item in an array to another in the same position. Two arrays (mentioned above, briefly): var array1 = [741, 451, 54188, 5847, 5418, 54944, 310, 541, 7451, 10211, 113, 9115, 62, 2841, 52482481, 24]; var array2 = [15, 418, 488, 130000, 8482, 55, 16, 14, 2546, 651, 4521, 11, 54, 659, 542, 1152]; So, 741 would be linked to 15, 451 to 418, 54188 to 488, etc. After they were "linked", I would be able to see if the value (by value, I mean what my scanner finds for each one) for the element in array1 is equal to/less than the value for that element in array2. For example, putting 741 into my scanner returns 16. This is not less than 15, so wouldn't return anything. - However, putting 451 into my scanner returns 417. This is less than 418, so it would return "this product is selling for cheap!" I hope this made sense.
accepted answer: http://stackoverflow.com/a/24601485
has answer: http://stackoverflow.com/a/24601096
tagged with: javascript
has answer: http://stackoverflow.com/a/24601086
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38117292
tagged with: arrays
has comment: http://stackoverflow.com/comment/38116699
possible better answer: http://stackoverflow.com/a/24601086
type: Question
has answer: http://stackoverflow.com/a/24601485
score: 0
answer count: 3

http://stackoverflow.com/comment/38472238
comment on: http://stackoverflow.com/q/24612609
has text: This is in a code behind page, it's refrencing things that are in the .dll but none of that is changing.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24719741
upvote count: 1
answers question: http://stackoverflow.com/q/24719715
score: 1
has comment: http://stackoverflow.com/comment/38341455
has comment: http://stackoverflow.com/comment/38341448
accepted answer of: http://stackoverflow.com/q/24719715
type: AcceptedAnswer
downvote count: 0
has body: If your input conforms to what you mentioned, I would suggest something like this: -?(?:[a-z]+|\d+|\([^()]+\))\^-?(?:[a-z]+|\d+|\([^()]+\)) Sample matches: -2^3 2^3 2^(a/b) (a+b)^7 (a+b)^(d/c) (5+6)^3 See the matches in the demo. in your code, make it case-insensitive by setting the i flag Note that JavaScript does not support recursion, so we are in trouble for nested parentheses as in 2^(3-(2/x)) Explanation -? allows an optional minus sign (?:[a-z]+|\d+|\([^()]+\)) matches a variable made of letters [a-z]+... OR '|` digits \d+ OR | \([^()]+\)) a set of parentheses \^ matches the exponentiation operator the right side of the power matches tokens of the same kind we allowed on the left Option 2: x^y^z... If you want to allow x^y^z..., modify the regex like so: -?(?:[a-z]+|\d+|\([^()]+\))(?:\^-?(?:[a-z]+|\d+|\([^()]+\)))+
type: Answer

http://stackoverflow.com/a/24657417
answers question: http://stackoverflow.com/q/24657246
score: 0
type: Answer
has body: Try this $('#fadeout').hide(2000, function() { $('#container').show(2000); }); Assuming you want to show the image after the first has completely faded out. The showing is inside the complete function of the hide meaning, when the hide animation is over, do whatever it is you defined in the complete function. If you want them to fadeout/in at the same time, then you just do both at the same time $('#fadeout').hide(2000); $('#container').show(2000);

backbone.js
tags question: http://stackoverflow.com/q/24706104
tags question: http://stackoverflow.com/q/24596587
tags question: http://stackoverflow.com/q/24594086
tags question: http://stackoverflow.com/q/24631643
tags question: http://stackoverflow.com/q/24659784
tags question: http://stackoverflow.com/q/24657351
tags question: http://stackoverflow.com/q/24643684
tags question: http://stackoverflow.com/q/24632945
tags question: http://stackoverflow.com/q/24679346
tags question: http://stackoverflow.com/q/24708115
tags question: http://stackoverflow.com/q/24718524
tags question: http://stackoverflow.com/q/24655721
tags question: http://stackoverflow.com/q/24616627
tags question: http://stackoverflow.com/q/24740538
tags question: http://stackoverflow.com/q/24726077
tags question: http://stackoverflow.com/q/24725860
tags question: http://stackoverflow.com/q/24624185
tags question: http://stackoverflow.com/q/24617073
tags question: http://stackoverflow.com/q/24654603
tags question: http://stackoverflow.com/q/24626130
tags question: http://stackoverflow.com/q/24658707
tags question: http://stackoverflow.com/q/24660037
tags question: http://stackoverflow.com/q/24674694
tags question: http://stackoverflow.com/q/24696708
tags question: http://stackoverflow.com/q/24593589
tags question: http://stackoverflow.com/q/24663786
tags question: http://stackoverflow.com/q/24720196
tags question: http://stackoverflow.com/q/24740433
tags question: http://stackoverflow.com/q/24635743
tags question: http://stackoverflow.com/q/24683575
tags question: http://stackoverflow.com/q/24600811
tags question: http://stackoverflow.com/q/24634049
tags question: http://stackoverflow.com/q/24706800
tags question: http://stackoverflow.com/q/24737204
tags question: http://stackoverflow.com/q/24663251
tags question: http://stackoverflow.com/q/24664510
tags question: http://stackoverflow.com/q/24600991
tags question: http://stackoverflow.com/q/24747488
tags question: http://stackoverflow.com/q/24726192
tags question: http://stackoverflow.com/q/24721962
tags question: http://stackoverflow.com/q/24655892
tags question: http://stackoverflow.com/q/24631824
tags question: http://stackoverflow.com/q/24660771
tags question: http://stackoverflow.com/q/24745122
type: Tag
tags question: http://stackoverflow.com/q/24616418
tags question: http://stackoverflow.com/q/24611545
tags question: http://stackoverflow.com/q/24593247
tags question: http://stackoverflow.com/q/24686093
tags question: http://stackoverflow.com/q/24652935
tags question: http://stackoverflow.com/q/24718762
tags question: http://stackoverflow.com/q/24746841
tags question: http://stackoverflow.com/q/24691831
tags question: http://stackoverflow.com/q/24607244
tags question: http://stackoverflow.com/q/24623075
tags question: http://stackoverflow.com/q/24744989
tags question: http://stackoverflow.com/q/24640824
tags question: http://stackoverflow.com/q/24698165
tags question: http://stackoverflow.com/q/24651937
tag name: backbone.js

http://stackoverflow.com/comment/38393902
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24745095
score: 0
has text: @dandavis I think I see what you're saying, that Chrome might be assuming something it shouldn't. But... the input/request doesn't include the total file size though: only the response's Content-Range has that.

http://stackoverflow.com/q/24628779
has comment: http://stackoverflow.com/comment/38173239
tagged with: javascript
has body: i'm trying to change the z-index rule of the ui-resizable handle of jQuery. Those handles spawn when you call .resizable() on a DOM object. I searched on stackoverflow and i found an answer, but it's not working anymore (the css files have changed). The final goal is to make a div pop above an handle.. i also tried to put the max z-index which is 2147483647 on my div, but it didn't work ...
score: 0
has title: Change the z-index of jQuery ui-resizable-handle
tagged with: jquery
has comment: http://stackoverflow.com/comment/38173102
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/38172936
answer count: 0
type: Question

http://stackoverflow.com/comment/38432439
has text: Have you seen this question? It looks like preventDefault doesn't work in IE8 and jQuery just sticks a stub method in there to fill out the API interface. http://stackoverflow.com/a/20568261/605232
comment on: http://stackoverflow.com/q/24674020
type: QuestionComment
score: 0
type: Comment

http://stackoverflow.com/q/24735819
has title: download pdf directly on submit click and redirect
tagged with: javascript
has body: I have a requirement in my system where a report is generated in pdf format on clicking the submit button thereby downloading it and when pdf is downloaded, the page should redirect to a new page. Right now i am able to open a window using window.open for pdf file which generates the pdf in new window and is downloaded ,and after that the old tab redirects to the new url. The process that i need is the download should happen without opening a new tab and then the page should redirect to new url. I was able to do one thing but not both together. Any suggestions would be helpful. string strJSCPTText = string.Empty; string url = clsAppConfig.SiteURL + "PDFReport.aspx?qid=" + objQ1.QId; strJSCPTText += "window.open('" + url + "', 'popup_window', 'width=500,height=300,left=100,top=100,resizable=yes');"; strJSCPTText += "window.location.href = '" + clsAppConfig.SiteURL + "QList.aspx" + "';"; ClientScript.RegisterStartupScript(this.GetType(), "script", strJSCPTText , true);
has comment: http://stackoverflow.com/comment/38373394
downvote count: 0
answer count: 1
score: 1
has comment: http://stackoverflow.com/comment/38372104
has comment: http://stackoverflow.com/comment/38373474
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/24736530
type: UnansweredQuestion
tagged with: http-redirect
tagged with: http://stackoverflow.com/tag/pdf
upvote count: 1
has comment: http://stackoverflow.com/comment/38373159
type: Question
has comment: http://stackoverflow.com/comment/38372994
tagged with: c#

http://stackoverflow.com/q/24653431
accepted answer: http://stackoverflow.com/a/24653867
has title: d3js overlapping elements: how to "pass through" clicks to "lower" element?
type: AnsweredQuestion
downvote count: 0
tagged with: d3.js
has body: Using d3js, I draw some elements after/ on top of one another. Such as: // draw rectangle from dataset "d" svg.selectAll(".rect").append("rect") .attr("y", 10) .attr("x", 10) .attr("height", 5) .attr("width", 5) .on("click", function (d, i) { // react on clicking }); // slightly bigger frame overlapping first one var c=1.02; svg.append("rect") .attr("x", 10) .attr("y", 10) .attr("width", 5 * c) .attr("height", 5 * c) .attr("stroke", "blue") .attr("stroke-width", 1) .attr("fill-opacity", 0) Obviosuly when second element is drawn overlapping first one, it is blocking the mouse events. I would like to bypass clicks, double-clicks and right clicks transparently through the second object. How I can do that?
type: Question
score: 3
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 3
has answer: http://stackoverflow.com/a/24653867

http://stackoverflow.com/q/24733643
has body: I have a view in which I want to display 3 data tables. All 3 tables data are being fetched from one table in database. I am thinking of using 3 different partial views in index.cshtml. And can use 1 stored procedure to fetch data. I want to make it editable and want to save the data with a submit button. Any one knows a solution for this
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24738721
has answer: http://stackoverflow.com/a/24734095
type: UnansweredQuestion
has title: How to set 3 table data in MVC3 view and make it editable?
tagged with: asp.net-mvc-3
type: Question
tagged with: asp.net-mvc

http://stackoverflow.com/q/24624476
possible better answer: http://stackoverflow.com/a/59541332
has answer: http://stackoverflow.com/a/24625384
favorite count: 0
has answer: http://stackoverflow.com/a/59541332
has comment: http://stackoverflow.com/comment/38162222
has comment: http://stackoverflow.com/comment/38162199
has comment: http://stackoverflow.com/comment/38162239
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/38162400
upvote count: 3
accepted answer: http://stackoverflow.com/a/24625384
has comment: http://stackoverflow.com/comment/38162211
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/20819501
has comment: http://stackoverflow.com/comment/38163364
has title: Jquery confirm dialog appears at the bottom of page
downvote count: 0
has body: first of all sorry if i am asking a silly question, as i dont have much experience in using JQuery. My prolem is that i am using a Jquery alert with YES NO button (rather than using the default CONFIRM dailog of JSP which have the OK and Cancel button). Now when i use the JQuery, application is displaying the correct message to the user with Yes No buttons but the alert box is not poping out on the screen, instead it display at the bottom of the page. Whats wrong ... i am unable to find any clue.... Any idea? jQuery.alerts.okButton = ' Yes '; jQuery.alerts.cancelButton = ' No '; jConfirm('Do you want to change the default case?', 'Confirm', function(r) { if (r == false) { alert('No Clicked'); } else { alert('Yes Clicked'); } }); where as the JConfirm() method is defined in the related .JS file as follows jConfirm = function(message, title, callback) { $.alerts.confirm(message, title, callback); }; Where as the related confirm method is: confirm: function(message, title, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); }, and the _show method is: _show: function(title, msg, value, type, callback) { $.alerts._hide(); $.alerts._overlay('show'); $("BODY").append( ' ' + ' ' + ' ' + ' ' + ' ' + ' '); if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); // IE6 Fix var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; $("#popup_container").css({ position: pos, zIndex: 99999, padding: 0, margin: 0 }); $("#popup_title").text(title); $("#popup_content").addClass(type); $("#popup_message").text(msg); $("#popup_message").html( $("#popup_message").text().replace(/\n/g, ' ') ); $("#popup_container").css({ minWidth: $("#popup_container").outerWidth(), maxWidth: $("#popup_container").outerWidth() }); $.alerts._reposition(); $.alerts._maintainPosition(true); switch( type ) { case 'alert': $("#popup_message").after(' ')…

http://stackoverflow.com/comment/38391531
has text: Yes exactly @gilly3 something like that ! Actually the idea popped up while reading Open graph meta tags and this site http://rap.genius.com/Casey-veggies-the-boy-lyrics try hovering on produced by links
comment on: http://stackoverflow.com/q/24745664
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/24706120
downvote count: 1
answers question: http://stackoverflow.com/q/24705715
score: -1
upvote count: 0
type: Answer
has body: Currently your code is firing the AJAX call on DocumentContentLoaded rather than on form submit. Target the form's submit event, prevent the default submit action and then fire the AJAX call. Try the following: &lt;script type="text/javascript"&gt; $('form').on('submit', function (evt) { // Prevent the page from reloading (default action of a form submit) evt.preventDefault(); // Fire the AJAX call to your server $.ajax({ type: 'POST', url: "addsigningfee.php", data: $("form").serialize(), success: function() { alert("It worked!"); } }); }); &lt;/script&gt; Reference Documentation: .submit() Note that .submit() is shorthand for .on('submit' ...)

http://stackoverflow.com/a/24692281
has body: Try this: var fle_cnt = 1; $('#addNew').click(function (event) { fle_cnt++; event.preventDefault(); $('#bkup_doc_rw').after('&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;file&quot; name=&quot;bkup_doc_proof&quot; id=&quot;bkup_doc_proof_' + fle_cnt + '&quot;&gt;&lt;a class=&quot;letter_font remNew&quot; style=&quot;text-decoration: none;cursor: pointer;&quot; href=&quot;#&quot;&gt;Remove&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;'); }); $(document).on('click', '.remNew', function (event) { event.preventDefault(); $(this).closest('tr').remove(); }); changes: in the #addNew click pass the event in the callback. change the id attribute to class instead. instead of id selector change to the class selector .remNew. instead of $('#remNew') place the context selector as $(this). pass the event in the callback of .remNew's click event You don't need to use return false; as you are already using event.preventDefault(); and it would work if you pass the event in the callback as mentioned above. and instead of .parents() use .closest() to traverse up. Demo @ updated fiddle.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38288838
answers question: http://stackoverflow.com/q/24692132
has comment: http://stackoverflow.com/comment/38289256
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38288709
accepted answer of: http://stackoverflow.com/q/24692132
has comment: http://stackoverflow.com/comment/38289092
type: Answer

http://stackoverflow.com/a/24732440
has body: By documentation to make removeEventListener work you have to provide the handler as well. I'd suggest, in createCustomEvent to make an array of event types, as: var createCustomEvent = function(elem, event, handler) { if (!elem.events) elem.events = []; if (!elem.events[event]) { elem.events[event] = handler; [your handler attaching here] } } This way you'll be able to track the event and handlers attached to it; bear in mind that the above code tracks one event (as, you'll be able to attach only one event of given type).
has comment: http://stackoverflow.com/comment/38369671
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24732229
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38370261

http://stackoverflow.com/comment/38238290
score: 0
has text: Disclaimer: I am not a winjs expert, but know javascript/jquery quite well. The div element returned by your then method doesn't exist in the DOM until it is actually appended to the document, e.g. documet.appendChild(div), or appended to some child element of the document. At that point it should get the client properties. Maybe you can hook to DOMNodeInserted event?
comment on: http://stackoverflow.com/q/24659188
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24741534
type: Question
has comment: http://stackoverflow.com/comment/38388682
has body: allow_destroy => true does not work in the view: % fieldset.fieldset-border % br . form-group . col-sm-offset-1.col-sm-10 = P.input: first_name, label: 'Name', class: 'form-control' = P.input: surname, label: 'Name', class: 'form-control' = P.input: patronymic, label: 'First Name', class: 'form-control' = P.input: job_position, label: 'Title', class: 'form-control' = P.hidden_field: _destroy = Link_to "Delete", '#', class: "remove_fields" % br % br scripts jQuery -&gt; $ ('form'). on 'click', '. remove_fields', (event) -&gt; $ (this). prev ('input [type = hidden]'). val ('1 ') $ (this). closest ('fieldset'). hide () event.preventDefault () $ ('form'). on 'click', '. add_fields', (event) -&gt; time = new Date (). getTime () regexp = new RegExp ($ (this). data ('id'), 'g') $ (this). before ($ (this). data ('fields'). replace (regexp, time)) event.preventDefault () model class ... accepts_nested_attributes_for: people,: allow_destroy =&gt; true accepts_nested_attributes_for: legal_entities,: allow_destroy =&gt; true end when trying otredktirovat browser side yavaskrita hides how to but does not remove, and duplicate records. Why doesn&#39;t accepts_nested_attributes_for allow_destroy not work? Made from screencast http://railscasts.com/episodes/197-nested-model-form-part-2 http://railscasts.com/episodes/196-nested-model-form-part-1 Please show me how to fight this.
tagged with: javascript
has comment: http://stackoverflow.com/comment/38425338
tagged with: ruby-on-rails-4
has title: accept_nested_attributes_for not working allow_destroy flag in Rails 4
linked to: http://stackoverflow.com/q/23145254
downvote count: 0
tagged with: nested-forms
tagged with: polymorphic-associations
favorite count: 0
has comment: http://stackoverflow.com/comment/38385320
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38407459
answer count: 0
score: 1
upvote count: 1
tagged with: nested-form-for

http://stackoverflow.com/comment/95639641
comment on: http://stackoverflow.com/a/24691115
type: Comment
has text: but this doesn't work when I have a header tags along with paragraph tags as it doesn't return the same format as the selected text.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38239589
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24665423
has text: Ah thanks guys, I've found a different solution and now understand :visible.
score: 0

http://stackoverflow.com/comment/38119843
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24602452
has text: How could be using prototype? How could be using prototype? jsfiddle.net/P78Wc/2 please

http://stackoverflow.com/q/24671988
has answer: http://stackoverflow.com/a/24672210
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: google-chrome
has body: Is there a way to simulate in desktop browsers (preferable Chrome) multitouch actions? I tried to emulate touch events with Chrome's emulation, but it seems that I can't make multitouch. The reason that I need this is to have access to element inspector and console in browser after I make scales and rotations.
type: Question
tagged with: browser
score: 2
has title: Multitouch in chrome browser
downvote count: 0
tagged with: javascript
tagged with: multi-touch
answer count: 1

http://stackoverflow.com/q/24647879
has answer: http://stackoverflow.com/a/24648617
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/24648107
accepted answer: http://stackoverflow.com/a/24648107
type: Question
score: 1
has title: jquery how to uncheck radio button
has comment: http://stackoverflow.com/comment/38206448
has body: I was trying to solve this problem, but my reset button just can't uncheck the radio button..... :( Hope experts here can help me to solve my problem. Thx!!!! just created the fiddle http://jsfiddle.net/8GLPC/ Choice 1 Choice 1 Reset $(document).ready(function(){ $(".radio") .button(); $(".reset1") .button() .click(function(){ var radio = $('[name="r[][9]"]'); radio.prop('checked',false); return false; }) });
possible better answer: http://stackoverflow.com/a/24648617
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38206284

http://stackoverflow.com/a/24628909
has body: Thats only a coding convention. These languages does not interpret the underscore in any way. In most cases thats the way developers use to "mark" the function as private.
downvote count: 0
type: Answer
upvote count: 7
answers question: http://stackoverflow.com/q/24628855
score: 7

http://stackoverflow.com/a/24691114
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24641039
accepted answer of: http://stackoverflow.com/q/24641039
type: Answer
has body: Why are you building the json response by hand? I would suggest to use the json package. Your code would look something like this package main import ( "fmt" "encoding/json" ) type Mystruct struct { Foo int Bar float64 } func main() { m := Mystruct{1,100} j, _ := json.Marshal(m) fmt.Print(string(j)) }

http://stackoverflow.com/comment/38144010
has text: Hi Judson, thank you. The lines have to slide with the attached boxes left and right. So that the content of the boxes remains readable, it should be movable up and down.
score: 0
comment on: http://stackoverflow.com/q/24600993
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24597370
upvote count: 2
has body: Do you want to pass the init-property name from Employee to Person? This is done like so: // Create a constructor-function for your Person-Object. function Person(name) { this.name = name; } // Create the constructor-function for an Employee-Object that extends Person function Employee(name) { // Call the constructor-function from Person Person.call(this, name); } // Let the prototype of Employee be Person.prototype (Employee extends Person) Employee.prototype = Object.create(Person.prototype); // By changing the prototype of Employee we have lost our constructor-function Employee() // so we have to recover it. Employee.prototype.constructor = Employee; Maybe you expect that the super-constructor will be called implicitly like you may know it from other languages like Java. But this doesn't happen in JavaScript. You have to do that on your own by calling Person.call(this, name) There is a very good JavaScript-Tutorial on MDN that helped me a lot to understand the prototype-stuff: https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript Take a look at the chapter "Custom Objects". I think I couldn't explain it better.
score: 2
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24597259

http://stackoverflow.com/comment/38092267
type: Comment
type: QuestionComment
has text: To clarify @Barmar's comment, `this` *will* be bound in the second, but not to the element which was clicked. The main difference between the two is the calling context, which is what determines what `this` refers to.
comment on: http://stackoverflow.com/q/24588523
score: 2

http://stackoverflow.com/a/24746973
upvote count: 7
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 7
accepted answer of: http://stackoverflow.com/q/24746622
answers question: http://stackoverflow.com/q/24746622
has comment: http://stackoverflow.com/comment/56651708
has body: You can use an http.get as such to make a GET request at Google's API endpoint and retrieve a json of the address's coordinates: $http.get('http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&amp;sensor=false').success(function(mapData) { angular.extend($scope, mapData); }); and you can call out the data at $scope.mapData Refer to this StackOverflow post for more info: Google Maps API - Get Coordinates of address

http://stackoverflow.com/a/24742191
type: Answer
score: 0
has body: To search using latlng, use the function map.setCenter(latlng); In regards to the code you have, split the javascript into two separate functions. One to initialize the map and one to re-center it based on the input. Then for your button's onclick, just call the function that reads input and re-centers. Working jsfiddle: http://jsfiddle.net/Drweb/
answers question: http://stackoverflow.com/q/24732223

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/24610665
type: Tag
tags question: http://stackoverflow.com/q/24656722
tags question: http://stackoverflow.com/q/24620333

http://stackoverflow.com/comment/38205117
score: 0
type: Comment
has text: Alright, although it works, it sort of doesn't. It disappears on scroll down, but reappears every scroll up. How can I choose when exactly it should disappear and reappear?
type: AnswerComment
comment on: http://stackoverflow.com/a/24627209

http://stackoverflow.com/comment/38297839
type: AnswerComment
type: Comment
has text: I edited my top post...not sure if that's the worst possible way to do it or not but it seems to be working.
comment on: http://stackoverflow.com/a/24636962
score: 0

http://stackoverflow.com/q/24741647
has comment: http://stackoverflow.com/comment/38384987
answer count: 1
tagged with: javascript
has body: I have an ApplicationController on the body tag. Inside this controller I am setting the username on a response from the server. Somehow the username variable is only available within the HomeController, which is currently not implemented. index.html Welcome {{username}}. home.html You are logged in as {{username}}. Javascript angular.module('APP', [ 'ngRoute', 'APP.services', 'APP.controllers', 'APP.auth' ]) .config(function($routeProvider, $httpProvider) { $httpProvider.interceptors.push('httpRequestInterceptor'); $routeProvider.when("/", { templateUrl: "/static/partials/home.html", controller: "HomeController" }); return $routeProvider.otherwise({ redirectTo: "/" }); } ); angular.module("APP.controllers", ['ui.bootstrap.modal']) .controller("HomeController", function($scope, $rootScope) { }) .controller('ApplicationController', function($scope, $rootScope, USER_ROLES, AUTH_EVENTS, AuthService, $modal, UserService) { $scope.username = null; $scope.setCurrentUser = function(user) { $scope.username = user.username; } $rootScope.$on(AUTH_EVENTS.loginSuccess, function(event) { UserService.get().then($scope.setCurrentUser); }); }); Generated output Welcome You are logged in as AceUser Update 1 If I select the ApplicationController element and then run angular.element($0).scope() I can see the scope and the username available. But still it is not output in the document. Update 2 The index.html was being generated with Django. Django was processing the template variable and not sending it as output. The solution was to wrap the variable with the {% verbatim %} tag. I will leave this up here for anyone who also has this problem.
score: 0
has title: Scopes in Angular not inheriting correctly
has comment: http://stackoverflow.com/comment/38382996
has answer: http://stackoverflow.com/a/24742084
tagged with: angularjs
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/24660128
answer count: 1
downvote count: 0
has title: Sharing references paths in ReSharper JavaScript tests
tagged with: jasmine
favorite count: 0
tagged with: angularjs
score: 5
accepted answer: http://stackoverflow.com/a/25364392
type: AnsweredQuestion
has body: My team and I are working on a web application that has a fair amount of Angular code and Jasmine tests. We're using Visual Studio and ReSharper's built-in Jasmine test runner. For the sake of ReShaper our JS test files all have references paths setup at the top like so /// &lt;reference path="/path/to/somefile.js" /&gt; We have alot of these references. For every new test file, we have to add these references. If we had a new component or external library, we have to add another reference to almost all of our existing test files. This is particularly true for including external angular modules. Is there a way that to create a shared reference file for the js tests in resharper? This really becomes a core when your solution contains tons of smaller files
tagged with: resharper
type: Question
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/25364392

http://stackoverflow.com/comment/38303400
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24691717
has text: There is no obvious flow. The only thing I'd change is getAll should _not_ accept the request/response/next (like you said - it should be abstracted from it). You can also convert a whole API into promises immediately with `promisifyAll` if you use a better promise library like Bluebird instead of Q. Other than that - questions on how to improve working code belong on CodeReview.StackExchange.com and not StackOverflow .

http://stackoverflow.com/a/24738358
has comment: http://stackoverflow.com/comment/38376783
score: 2
upvote count: 2
has body: By given info, you can use this: var calMonth = x.match(/\d{4}$/g)[0];
has comment: http://stackoverflow.com/comment/38376883
has comment: http://stackoverflow.com/comment/38376772
downvote count: 0
answers question: http://stackoverflow.com/q/24738231
type: Answer

gmail
type: Tag
tags question: http://stackoverflow.com/q/24588936
tags question: http://stackoverflow.com/q/24666489
tag name: gmail

http://stackoverflow.com/q/24675885
answer count: 1
tagged with: highcharts
tagged with: jquery
has body: I am new to Highstock, am not able to plot the graph. I am sending an AJAX request to get the graph data.I am returning List of X-Axis Data, and List of Y-Axis Data, I also used Map but the values are coming like {1420051860000=101}, which is not acceptable format in Highstock. $(document).ready(function(){ $.ajax({ url: 'getData', dataType : 'json', type: 'GET' success: function (data) { var xAxisdata= data.xAxisData; var yAxisData=data.yAxisData; //converting two arrays to two-dimesional array, It's not working var jarray = []; for (var i=0; i&lt;xAxisdata.length &amp;&amp; i&lt;yAxisdata.length; i++){ jarray[i] = [xAxisdata[i], [yAxisdata[i]]]; } //Getting these values for X and Y values var xAxisdata=[1420051860000,1420052160000,1420052460000,1420052760000,1420053060000,....]; var yAxisdata=[100,110,112,113,110,112,111,110,115,116,114,114,110,114,112,113,110,....]; //Creates chart var chart =new Highcharts.StockChart({ chart: { renderTo: "container", zoomType: 'x' }, rangeSelector : { selected : 1, inputEnabled: $('#container').width() &gt; 280 }, title : { text : 'AAPL Stock Price' }, credits: { enabled: false }, xAxis: { title: { text: 'Time' }, type: 'datetime', labels:{ formatter:function(){ return Highcharts.dateFormat('%H&lt;br/&gt;%d&lt;br/&gt;%m&lt;br/&gt;%Y',this.value); } }, }, yAxis: { title: { text: "Stock " }, lineWidth: 1, min:0, gridLineWidth: 0 }, series : [{ name : 'AAPL', showInLegend: true, data : jarray, marker : { enabled : true, radius : 3 } }] }); } }); } ); And also facing issue with Months, in javaScript the months are starting from 0 to 11, But in java starts from 1. If the month is JAN-2014, it showing FEB-2014. Suggest me the best way to plot the graph using JSON Response.
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24693588
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38259154
tagged with: java
has title: How to send data from controller which is acceptable format to Highstock?
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24693588

http://stackoverflow.com/comment/38192142
type: AnswerComment
comment on: http://stackoverflow.com/a/24638825
type: Comment
has text: They're not hoisted immediately, but yes, they're hoisted. I put a nice long comment on your post about it. Thanks for down voting. While your at it, how about you study up of the stack and the heap. Also, make some test applications to show which one will run differently and eat more memory. Then, if you still think your right, message me back and show me your code. Ive tested this over and over again.
score: 1

http://stackoverflow.com/q/24635451
has title: JS - Morph basetype into subtype
has body: Is there an easy way in JS to change a base type into a defined subtype? And does this make any sense (does anyone have any examples of when this could be used in a reasonable and useful way). contrived example (likely with syntax errors): var animal = function(id){ this.init(id); } cat.prototype.init = function(id){this.id = id;} cat.prototype.eat = function(){something...}; var cat = function(name, fur){ this.fur=fur; this.init(id); } cat.prototype = new animal(); var myanimal = new animal(getNextId()); //maybe it's a petstore or something that needs animals in their DB. //myanimal needs to become a cat now.
type: AnsweredQuestion
tagged with: prototypal-inheritance
score: 0
has answer: http://stackoverflow.com/a/24635662
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/23807805
tagged with: prototype
accepted answer: http://stackoverflow.com/a/24635662
answer count: 1

http://stackoverflow.com/q/24671240
downvote count: 0
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27689041
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27689041
possible better answer: http://stackoverflow.com/a/24675140
upvote count: 1
has body: i have integrated paypal login button (javascript button) and when i am clicking on it its getting to the paypal site for authentication. following is my code for paypal button &lt;span id="paypal"&gt;&lt;/span&gt; &lt;script src="https://www.paypalobjects.com/js/external/api.js"&gt;&lt;/script&gt; &lt;script&gt; var url = document.URL; paypal.use( ["login"], function(login) { login.render ({ "appid": "***", "authend": "sandbox", "scopes": "profile email address phone https://uri.paypal.com/services/paypalattributes", "containerid": "paypal", "locale": "en-us", "returnurl": "http://stereotribes.dev/login" }); }); &lt;/script&gt; after successful authentication its redirecting me to my server url again. now my question is how to receive user information after authentication done. i have searched around paypal site but i am not getting the clear idea to retrieve user informatoin. can anybody help me in this? Thanks in advance
favorite count: 0
tagged with: php
tagged with: paypal
has title: retriving user information through Paypal Javascript login button
has answer: http://stackoverflow.com/a/24675140
type: AnsweredQuestion

http://stackoverflow.com/comment/39221626
has text: Thanks for the suggestion of creating an index. I've already done it. 'ownerId' should not be an ObjectID, it is an UUID that I already know. On the other hand, I think I misunderstand your suggestion to use node-uuid. I don't want to generate a new UUID. I want to get an existing document which I already know the ownerId.
comment on: http://stackoverflow.com/a/25142857
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/24636629
linked to: http://stackoverflow.com/q/20883421
has answer: http://stackoverflow.com/a/24637010
has comment: http://stackoverflow.com/comment/38184982
has title: Implementing algorithm to check for overlapping intervals in Javascript
has answer: http://stackoverflow.com/a/24637031
type: UnansweredQuestion
type: Question
tagged with: algorithm
has comment: http://stackoverflow.com/comment/38184883
answer count: 2
has body: Trying to implement this (marcog's answer) overlapping intervals algorithm in Javascript but I can't get it working. I want to go over the values in a JSON data structure picking out start stop values representing x1-x2 coordinates for lines. Im adding new lines one after the other and I want to know when adding a new line would result in overlapping lines. The error I'm getting is that it always prints "no overlaps" when there clearly are overlaps. This is the code I have so far: var data = [], json = [ { "start" : 100, "stop" : 800 }, { "start" : 900, "stop" : 1200 }, { "start" : 200, "stop" : 600 } ], sortInterval, checkOverlappingInterval; sortInterval = function (value) { //Sorts a list with lower numbers first and end point come before //starting points on ties value.sort(function (a,b){ var aSplit = a.split("_"), bSplit = b.split("_"); if (aSplit[0] * 1 &gt; bSplit[0] * 1){ return 1; } if (aSplit[0] * 1 &lt; bSplit[0] * 1) { return -1; } else { if (aSplit[1] &gt; bSplit[1]) { return 1; } else { return -1; } } }); }; checkOverlappingInterval = function(value){ //Return true if there are overlapps var inInterval = false; value.forEach(function(v) { if (v.charAt(v.length-1) === "S"){ if(inInterval){ return true; } else { inInterval = true; } } else { inInterval = false; } }); //return true; return false; }; json.forEach(function (value) { //Push the new values to interval array and sort the array data.push(value.start + "_S"); data.push(value.stop + "_E"); sortInterval(data); //Check to see if the new line caused an overlapping line //If it did increase y and clear out data if (checkOverlappingInterval(data)){ console.log("overlaps"); } //If it did not print line else { console.log("no overlaps"); } });
tagged with: javascript
linked to: http://stackoverflow.com/q/4542892
score: 0

http://stackoverflow.com/comment/38221308
has text: Have you tried this: http://gis.stackexchange.com/questions/23104/openlayers-geojson-files The response is async, so the idea is to send the whole response to a handler, which will then parse the whole JSON and return a feature which you can then add to you vector layer.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24652552

http://stackoverflow.com/q/24678338
upvote count: 6
type: AnsweredQuestion
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24678700
has comment: http://stackoverflow.com/comment/38274256
has answer: http://stackoverflow.com/a/24678700
has comment: http://stackoverflow.com/comment/38266195
linked to: http://stackoverflow.com/q/5750656
answer count: 2
has title: Do any standard JavaScript APIs or libraries return strings as String objects?
downvote count: 0
tagged with: string
favorite count: 0
has answer: http://stackoverflow.com/a/24678615
linked to: http://stackoverflow.com/q/4059147
score: 6
has body: Until recently, I didn't realise that there are two types of strings (and bools, and numbers) in JavaScript: primitives such as "blah", and objects such as new String("blah"). They differ in very "gotcha"-prone ways, the biggest one of which seems to be the different typeof value ("string" vs "object"), but a number of other differences exist, some documented at MDN. There's no point in creating String objects because the primitive strings work just as well, and JSHint even treats this as an error. So I'd really like to pretend String instances don't even exist, and only support primitive strings in my code. This makes me wonder: can I get a surprise String instance by calling some standard API that returns a string? Or is it really safe to assume that unless someone screws up by explicitly writing new String, I will never see one of these?
accepted answer: http://stackoverflow.com/a/24678615

http://stackoverflow.com/comment/38167541
comment on: http://stackoverflow.com/q/24627152
score: 0
type: Comment
type: QuestionComment
has text: I can reach same object using ajax. So my json object is ok, but I cannot reach using JSP/Java tags.

http://stackoverflow.com/q/24634707
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24635174
tagged with: requirejs
tagged with: dependency-management
has answer: http://stackoverflow.com/a/24646582
type: Question
possible better answer: http://stackoverflow.com/a/24635174
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/24646582
has body: I have recently moved from using a single JS file for a module to using RequireJS. Needless to say I'm using OpenLayers2 in that module. I've 'required' Openlayers2, and Require JS simply doesn't acknowledge its existence. Here's a sample of my code: require.config({ shim:{ openlayers: { exports: 'OpenLayers' } }, paths: { jquery: 'plugins/jquery/jquery.min', openlayers: 'plugins/OpenLayers/OpenLayers' } }); require(['openlayers'], function(test) { console.log('OL: '+test); console.log('Vector' + test.Layer.Vector); }); The first log simply returns a null value. The second log throws an error: Uncaught TypeError: Cannot read property 'Layer' of null. Any suggestions?
tagged with: javascript
tagged with: openlayers
has title: OpenLayers 2 and RequireJS

http://stackoverflow.com/comment/38295027
score: 0
type: Comment
has text: I don't need like this ..Please apply this on my fiddle with alert
type: AnswerComment
comment on: http://stackoverflow.com/a/24695955

http://stackoverflow.com/a/24623965
type: Answer
has body: You can use toFixed(2) to round it to desired number of digits. Live Demo $('#txtsum').val(unitratesum.toFixed(2)); The toFixed() method formats a number using fixed-point notation.
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24623934
accepted answer of: http://stackoverflow.com/q/24623934

http://stackoverflow.com/a/24662246
has body: I think you would just link the home page the way you would have linked page a and b to the home page. Example below Home Page: Page-A Page-B Page-A: Home Page-B Page-B Home Page-A In Javascript function new_page(url) { var win = window.open(url, '_blank'); win.focus(); } This Function then opens the Home page in its individual tab, which is what you want :) Hope this helps :)
has comment: http://stackoverflow.com/comment/38234065
has comment: http://stackoverflow.com/comment/38234325
has comment: http://stackoverflow.com/comment/38233457
has comment: http://stackoverflow.com/comment/38233871
has comment: http://stackoverflow.com/comment/38234601
score: 0
answers question: http://stackoverflow.com/q/24662110
type: Answer

http://stackoverflow.com/q/24724366
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24724849
score: 5
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/24724849
linked to: http://stackoverflow.com/q/35136282
tagged with: three.js
has body: I got something like this: var manager = new THREE.LoadingManager(); manager.onProgress = function ( item, loaded, total ) { console.log( item, loaded, total ); }; var texture = new THREE.Texture(); var loader = new THREE.ImageLoader( manager ); loader.load( 'obj/'+model+'.jpg', function ( image ) { texture.anisotropy = anis; texture.image = image; texture.needsUpdate = true; } ); // model var loader = new THREE.OBJLoader( manager ); loader.load( 'obj/'+model+'.obj', function ( object ) { object.traverse( function ( child ) { if ( child instanceof THREE.Mesh ) { child.material.map = texture; if(reflex){ child.material.envMap = reflection; child.material.shading = THREE.SmoothShading; child.material.reflectivity = reflex; } } } ); object.scale.set(10,10,10); object.position.y = pos; object.position.z = 0; object.position.x = 0; object.name = "model"; scene.add( object ); } ); Works fine, but... all polygons on model are visible this way... I would like to smooth things up... so I read here , that I could smooth them up like that: // First we want to clone our original geometry. // Just in case we want to get the low poly version back. var smooth = THREE.GeometryUtils.clone( geometry ); // Next, we need to merge vertices to clean up any unwanted vertex. smooth.mergeVertices(); // Create a new instance of the modifier and pass the number of divisions. var modifier = new THREE.SubdivisionModifier(divisions); // Apply the modifier to our cloned geometry. modifier.modify( smooth ); // Finally, add our new detailed geometry to a mesh object and add it to our scene. var mesh = new THREE.Mesh( smooth, new THREE.MeshPhongMaterial( { color: 0x222222 } ) ); scene.add( mesh ); But... I have no idea where do I get that geometry object... could anybody help me out?
type: Question
type: AnsweredQuestion
has title: Three.js model smooth polygons

http://stackoverflow.com/q/24627993
downvote count: 5
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24628780
linked to: http://stackoverflow.com/q/359494
possible better answer: http://stackoverflow.com/a/24628132
has answer: http://stackoverflow.com/a/24628132
has comment: http://stackoverflow.com/comment/38168618
favorite count: 0
has comment: http://stackoverflow.com/comment/38168653
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24628780
score: -5
has title: How to check null value in json?
has body: Below is my JSON { "mname": [ { "Mname":"abc", "pname":[], "rewards":null } ] } How to check the reward array contains a null value?
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/38168941

http://stackoverflow.com/a/39809982
type: Answer
answers question: http://stackoverflow.com/q/24660096
has body: How about this one using BlueBird? function fetchUserDetails(arr) { return Promise.each(arr, function(email) { return db.getUser(email).done(function(res) { logger.log(res); }); }); }
score: 0

http://stackoverflow.com/q/24620508
has title: HTML - Including absolute path for JS files
type: Question
has answer: http://stackoverflow.com/a/24620648
tagged with: javascript
score: 0
answer count: 1
has body: I am setting an absolute path for a JS file like this in an HTML file. However, this doesn't seem to work in my browser. My document root is C:\Users\Public\myapp\public Though the JS file exists outside the document root, I need to include it. Thanks,
has comment: http://stackoverflow.com/comment/38154734
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38328439
score: 0
has text: So in the click event test whether or not the quantity (or whatever other property) has changed; and then trigger an alert only if it has.
type: QuestionComment
comment on: http://stackoverflow.com/q/24713009
type: Comment

http://stackoverflow.com/comment/46314775
has text: it's also good to namespace the `mouseover` and `mouseout` as described here - https://github.com/dc-js/dc.js/issues/780
type: Comment
score: 2
comment on: http://stackoverflow.com/a/24702554
type: AnswerComment

http://stackoverflow.com/comment/38328983
score: 0
has text: Do you mean you want to call `updates()` every 200 ms?
type: Comment
comment on: http://stackoverflow.com/q/24713317
type: QuestionComment

http://stackoverflow.com/q/24682773
has title: ArcGIS JavaScript API Error - "Unable to Load File"
type: Question
has answer: http://stackoverflow.com/a/26545580
tagged with: javascript
has body: I keep getting the following errors when attempting to provide my code with a webmap id in conjunction with the ESRI tutorial for ArcGIS Online Web Map : https://i.sstatic.net/xThVs.jpg Below is the Javascript code which I am currently using. Create a Web Map The Map id is a publicly available map of Richmond, VA's Historic Sites
score: 0
answer count: 2
tagged with: arcgis-js-api
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24795120

http://stackoverflow.com/q/24634456
has comment: http://stackoverflow.com/comment/38180714
favorite count: 0
has title: Form not validating before Submit (JavaScript)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24634816
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24635421
upvote count: 0
has body: I have a form written in JavaScript that works correctly when I submit. However, there is one conditional which I would like to be validated before the user hits the submit button. If the user chooses "None" on the dropdown menu, I want the other dropdown menu and textbox to be disabled before the user tries to submit. This is what I've done so far, but nothing seems to happen everytime I choose "None": None January February March April May June July August September October November December 1 2 3 4 5 6 7 8 9 Where am I going wrong with this? Any help would be appreciated. Thanks.
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/24634824
accepted answer: http://stackoverflow.com/a/24634824
has comment: http://stackoverflow.com/comment/38181045
answer count: 3
possible better answer: http://stackoverflow.com/a/24634816
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24715750
linked to: http://stackoverflow.com/q/23667086
upvote count: 1
has answer: http://stackoverflow.com/a/24715775
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/23667086
score: 1
tagged with: global-variables
type: Question
accepted answer: http://stackoverflow.com/a/24715775
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: variables
tagged with: scope
has title: Variables scope in javascript
has body: I want result showed in console is name2, not name1 function showInfo() { var NAME="name1";//1 FB.api('/me', function(response) { document.getElementById('status').innerHTML = response.name; NAME="name2";//2 }); FB.api("/me/picture?width=35&amp;redirect=0&amp;type=normal&amp;height=35", function (response) { console.log(NAME); } } I did like obove but result in console is name1 How can i change NAME's value in //2 and the result in consle is name2. Thanks so much!
favorite count: 0

http://stackoverflow.com/comment/38373094
score: 0
comment on: http://stackoverflow.com/a/24735395
type: AnswerComment
has text: Good stuff, glad I could help
type: Comment

http://stackoverflow.com/a/24746987
type: Answer
has comment: http://stackoverflow.com/comment/38393302
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24746706
answers question: http://stackoverflow.com/q/24746706
has body: Yes. Basically locate the button that loads more, find it's name. If your button looks like this: Load more Put this before it so it looks like this: Load more It's the lousiest solution but the question is lousy too.
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/38764634
has body: You can create a factory/service and set flag to check whether its a first visit or not.
score: 0
answers question: http://stackoverflow.com/q/24590044
type: Answer

http://stackoverflow.com/a/24720703
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24720559
has comment: http://stackoverflow.com/comment/38344120
type: Answer
answers question: http://stackoverflow.com/q/24720559
has body: For your second line, do Just please note that the second line appears as a button, not a hyperlink.

google-closure-compiler
tags question: http://stackoverflow.com/q/24723300
tags question: http://stackoverflow.com/q/24595191
tags question: http://stackoverflow.com/q/24665229
tags question: http://stackoverflow.com/q/24645923
type: Tag
tag name: google-closure-compiler

http://stackoverflow.com/comment/38324066
type: QuestionComment
has text: can you describe it? or made a sample code?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24710478

http://stackoverflow.com/q/24639740
tagged with: jquery
has answer: http://stackoverflow.com/a/24642482
linked to: http://stackoverflow.com/q/15708297
has comment: http://stackoverflow.com/comment/38267013
has comment: http://stackoverflow.com/comment/38218024
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: Create JQuery Mobile slider at runtime and set onchange listener
accepted answer: http://stackoverflow.com/a/24642482
type: AnsweredQuestion
score: 1
has body: in my app I receive data through websockets, depending on this data I want to append some sliders to my page content: . It is an array of objects I receive and for each object I want to create the corresponding slider with max, min, and the current value. Also I want an on change listener for each slider to send values back via websockets if the user changes the values. I already stumbled upon this JQuery Mobile sliders inserted dynamically . But the solution doesn't seem appropriate because the elements should be created on runtime, and not when the page is loaded the first time. Moreover I don't know, how to set the onchange listeners in an elegant way. Preferably I would like to use Jquery Mobile as I already use it for the other visual elements but if it is not possible I would be thankful for any other possibility. Edit: And how can i refer to the index of the array within my onchange listener I tried ($(this).id()) but this throws: "TypeError undefined is not a function". Thanks Peter.
upvote count: 1
type: Question
downvote count: 0
tagged with: jquery-mobile
has comment: http://stackoverflow.com/comment/38263528
tagged with: javascript

http://stackoverflow.com/comment/38206652
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24596570
score: 0
has text: You should view this post about open graph markup where you determine which image to use http://stackoverflow.com/questions/5749028/how-do-i-prevent-an-image-from-showing-up-as-a-thumbnail-option-when-my-site-is

http://stackoverflow.com/a/27483960
type: Answer
answers question: http://stackoverflow.com/q/24611778
score: 68
upvote count: 68
type: AcceptedAnswer
downvote count: 0
has body: Just run your query like this: User.find({ where: {email: req.body.user.email}, paranoid: false })
accepted answer of: http://stackoverflow.com/q/24611778

http://stackoverflow.com/comment/38249845
type: AnswerComment
type: Comment
has text: When you use `ko.computed`, you are actually calling a function, and it starts with evaluating the parameter you give. So basically you call the `_compute` function before declaring it
comment on: http://stackoverflow.com/a/24671223
score: 0

http://stackoverflow.com/comment/38321581
comment on: http://stackoverflow.com/a/24699721
has text: Please check the first column. Afte i give the value on the prompt the value is updated in the html
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38271360
has text: For some reason this does not work, all I get is : `0 : [object Object]`
comment on: http://stackoverflow.com/a/24664990
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38109819
comment on: http://stackoverflow.com/q/24597710
type: QuestionComment
type: Comment
has text: Its better for the user. But it could be easily altered. That's why its called _client-side_ @DipuRaj
score: 0

http://stackoverflow.com/comment/38302563
comment on: http://stackoverflow.com/a/24699763
score: 1
type: AnswerComment
has text: Yes, but it is negative, if one of these for checks is true, the password is invalid and must be marked as error. Proof: `length <= 7 && length >= 33` can never be true, as a number can not be both larger than 32 and smaller than 8. English: if length smaller 8 **or** length bigger 32 **or** password contains no digit **or** password contains no letter then the password is invalid.
type: Comment

http://stackoverflow.com/comment/38281219
comment on: http://stackoverflow.com/q/24688220
score: 0
type: Comment
type: QuestionComment
has text: what do you mean by caching the result?

http://stackoverflow.com/a/24599344
answers question: http://stackoverflow.com/q/24599332
has comment: http://stackoverflow.com/comment/38113293
type: Answer
has comment: http://stackoverflow.com/comment/38113353
score: 1
upvote count: 1
has body: why wouldn't I call it with parenthesis? like: xmlHttp.onreadystatechange = handleServerResponse(); Because on this line you are NOT CALLING THE FUNCTION. You are simply subscribing to an event (a callback) that will be called later by the xmlHttpinstance and when the AJAX request gets some response from the server. When you call xmlHttp.send(null); the AJAX request is sent to the server for processing. This function returns immediately and the next line of code is executed. Later, when the server has finished executing the request it will return some status code to the client along with the response body. It is at that moment that the actual handleServerResponse function will get executed.
accepted answer of: http://stackoverflow.com/q/24599332
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38241585
comment on: http://stackoverflow.com/a/24650137
score: 0
type: AnswerComment
has text: @ApprenticeProgrammer: by inspecting rendered html in console.
type: Comment

http://stackoverflow.com/a/24613752
score: 0
has body: Directives as the name suggest.. They are used for doing some manipulation over the data and send back it to controllers.. It is very similer to functions. Directives is used for better modularity of the code.. It removes unstructure code from controller. Ya directive can also handles data directly but it is not appritiated.
type: Answer
answers question: http://stackoverflow.com/q/24612635

http://stackoverflow.com/comment/38384865
type: AnswerComment
comment on: http://stackoverflow.com/a/24737562
score: 0
type: Comment
has text: Defining the characters as variables is the part that made me think about it differently. I actually thought the answer would have something to do with .hasClass(), but @Harry explained it detailed and well. I am practising JS continuously, but this was just beyond my level at this stage.

http://stackoverflow.com/comment/38385933
type: AnswerComment
score: 0
type: Comment
has text: no...try changing `var obj` to `var data`. You never defined a variable `data`
comment on: http://stackoverflow.com/a/24743064

http://stackoverflow.com/q/24622588
tagged with: javascript
has comment: http://stackoverflow.com/comment/38159000
has comment: http://stackoverflow.com/comment/38158994
tagged with: security
downvote count: 0
tagged with: applet
has comment: http://stackoverflow.com/comment/38158980
favorite count: 0
type: UnansweredQuestion
tagged with: swing
has comment: http://stackoverflow.com/comment/38158744
has title: Javascript cannot access Java Applet Public Method besides AWT?
answer count: 0
score: 1
tagged with: java
upvote count: 1
type: Question
has body: I'm just working with some tasks. One of them, required me to use javascript to access Java Applet public methods. As I tried so far, I can only access to method that use awt. Otherwise, it did not let me see something happened. Is my thought wrong? What's is the matter on here? 1/ Here is my simple applet code: import java.applet.Applet; import java.awt.Color; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class MyApplet extends Applet{ public void setBackColor(){ setBackground(Color.cyan); } public void writeFile(){ try { String content = "This is the content to write into file"; File file = new File("filename.txt"); if (!file.exists()) { file.createNewFile(); } FileWriter fw = new FileWriter(file.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); bw.write(content); bw.close(); } catch (IOException e) { e.printStackTrace(); } } } 2/ Sample Html: Set Background Color Write Data To File I need to access both of the methods in the class, but cannot. The code only working with setBackColor() method, but another one,writeFile(), did not work. Any ideas or suit solution? Please help...

http://stackoverflow.com/a/24614736
answers question: http://stackoverflow.com/q/24614212
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24614212
score: 1
has body: value == NaN will not work because, surprisingly, in javascript NaN does not equal NaN. try isNaN() instead.

http://stackoverflow.com/comment/38278838
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24686498
type: QuestionComment
has text: Will your returnLargestArray function always take the same number of inputs? Or is that unknown?

http://stackoverflow.com/q/24618099
answer count: 2
has comment: http://stackoverflow.com/comment/38150146
has comment: http://stackoverflow.com/comment/38150097
has comment: http://stackoverflow.com/comment/38150715
has comment: http://stackoverflow.com/comment/38149916
accepted answer: http://stackoverflow.com/a/24618830
has comment: http://stackoverflow.com/comment/38150211
has comment: http://stackoverflow.com/comment/38150583
has comment: http://stackoverflow.com/comment/38150274
has title: PHP Ajax not creating post variable
has comment: http://stackoverflow.com/comment/38150450
has comment: http://stackoverflow.com/comment/38149926
has comment: http://stackoverflow.com/comment/38149852
has comment: http://stackoverflow.com/comment/38149884
has comment: http://stackoverflow.com/comment/38149897
type: AnsweredQuestion
has body: A while ago i made a search function with ajax and php. You could fill in a textbox with text and it would try to find a match among all countries stored in the database. Now i am refining the code and making it PDO, but i broke something and i cant find out what. this is my plain HTML Ajax Enter your country please Showing results for: Array here is my Jquery and javascript. note i have not changed anything to the HTML nor javascript so it can not by a type error. $(document).ready(function() { alert('asdf'); function search() { var query_value = $('input#search').val(); $('b#search-string').html(query_value); if(query_value !== ''){ $.ajax({ type: "POST", url: "search.php", data: { query: query_value }, cache: false, success: function(html){ $("ul#results").html(html); } }); } return false; } $("input#search").live("keyup", function(e) { clearTimeout($.data(this, 'timer')); var search_string = $(this).val(); if (search_string == '') { $("ul#results").fadeOut(); $('h4#results-text').fadeOut(); } else { $("ul#results").fadeIn(); $('h4#results-text').fadeIn(); $(this).data('timer', setTimeout(search, 100)); }; }); }); And here is my Search.PHP <?php class SearchEngine{ private $html; public function __construct($conn){ $this->html = ' NameReplace '; if (isset($_POST["query"])) { $search_string = $_POST['query']; } else{ $search_string = ''; echo('Something went wrong, post query not set'); } //$search_string = mysql_real_escape_string($search_string); if (strlen($search_string) >= 1 && $search_string !== ' ') { $query = 'SELECT * FROM country WHERE name LIKE "%' . $search_string . '%"'; $result = $conn->prepare($query); $result->execute(); $result_array = $result->fetchAll(); foreach ($result_array as $result) { $display_name = preg_replace("/" . $search_string . "/i", "" . $search_string . "", $result['name']); $display_url = 'sadf'; $output = str_replace('NameReplace', $display_name, $this->html); $output = str_replace('ULRReplace', $display_url, $output); echo($ou…
has comment: http://stackoverflow.com/comment/38150625
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38150045
tagged with: ajax
has comment: http://stackoverflow.com/comment/38150193
has answer: http://stackoverflow.com/a/24618830
type: Question
has comment: http://stackoverflow.com/comment/38150081
possible better answer: http://stackoverflow.com/a/24618237
has comment: http://stackoverflow.com/comment/38149955
tagged with: php
has comment: http://stackoverflow.com/comment/38150040
has answer: http://stackoverflow.com/a/24618237
tagged with: pdo
has comment: http://stackoverflow.com/comment/38149997
score: 0

http://stackoverflow.com/comment/38226692
has text: Please give information on why and in which cases you would want to achieve this effect, and possibly of what resolution/complexity the user defined pictures are.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24658155

http://stackoverflow.com/comment/38251278
type: AnswerComment
has text: were you able to figure out this issue with jsfiddle?
score: 0
comment on: http://stackoverflow.com/a/24647476
type: Comment

http://stackoverflow.com/a/24668997
answers question: http://stackoverflow.com/q/24668958
score: 0
has body: If i understood your question correctly, you want to put value of a php variable into javascript. For that, follow this: Define your $json as global variable, at the top. And in the Javascript: &lt;script&gt; var json = &lt;?php echo $json; ?&gt; ; &lt;/script&gt; Edit: You need to json_encode($json); instead of json_decode() ... this should output in correct format, then you can alert in Javascript however you like.
type: Answer

http://stackoverflow.com/a/24588458
score: 51
type: Answer
has comment: http://stackoverflow.com/comment/38113653
downvote count: 0
has comment: http://stackoverflow.com/comment/38189540
upvote count: 51
has comment: http://stackoverflow.com/comment/38092101
has comment: http://stackoverflow.com/comment/38092698
has comment: http://stackoverflow.com/comment/38108340
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24588408
has body: You need to consume the file stream somehow. For testing purposes you can ignore the data by adding file.resume(); inside the file event handler.
has comment: http://stackoverflow.com/comment/38100999
answers question: http://stackoverflow.com/q/24588408

http://stackoverflow.com/a/24717156
has body: Something a bit different with :before and :after so that the html doesn't need to be modified. I would however probably consider using canvas instead as it will give more control. http://jsfiddle.net/Fz3Ln/16/ .horse-shoe-gauge:before { content: ""; display: block; position: absolute; bottom: -5px; left: 12px; height: 10px; width: 10px; border: 15px solid white; border-top-color: transparent; border-left-color: transparent; background-color: black; background-clip: padding-box; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; } .horse-shoe-gauge:after { content: ""; display: block; position: absolute; bottom: -5px; right: 12px; height: 10px; width: 10px; border: 15px solid white; border-top-color: transparent; border-right-color: transparent; background-color: black; background-clip: padding-box; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; } To see how it's working, see this fiddle.
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24716980
score: 1
answers question: http://stackoverflow.com/q/24716980
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24727287
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24727321
has body: I have an asp.net page with a label on it. The label has no text. &lt;asp:Label ID="Label1" runat="server"&gt;&lt;/asp:Label&gt; At some point, I call a javascript function that adds some content to the label, as follows: function myFunc() { label = document.getElementById("Label1"); list = document.getElementById("list"); label.innerHTML = list.innerText; } After that function is done, I click a button on the page, that calls its onclick event: protected void Button1_Click(object sender, EventArgs e) { string a = Label1.Text; } For some reason, the Label1.Text is still empty. Why? Is there any way I could fix this? Thanks.
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/24727321
type: AnsweredQuestion
has title: Change labels text with javascript and read it from code behind
type: Question
possible better answer: http://stackoverflow.com/a/24727317
answer count: 2
has answer: http://stackoverflow.com/a/24727317

http://stackoverflow.com/a/37307757
answers question: http://stackoverflow.com/q/24746006
score: 0
has body: My suggestion would be to try using the query function rather than the find function. This will allow you to query an unlimited number of filters. var myStore = this.get('store'); myStore.query('post', { _id: params.post_id, include : 'all' }).then(function(peters) { // Do something with `peters` });
type: Answer
has comment: http://stackoverflow.com/comment/65019235

http://stackoverflow.com/a/24599085
answers question: http://stackoverflow.com/q/24598867
has comment: http://stackoverflow.com/comment/38125308
has body: I have had a similar issue. I had to show an indication when a table is updated. I observed the query (check Collection.observeChanges) and ran a jQuery-powered flash on the row. In your case, it seems like you are doing the compuation on your own and supply it to the Template as a variable. Put a spinner in the original template and at the end of your computation hide it with jQuery.
has comment: http://stackoverflow.com/comment/38115548
downvote count: 0
has comment: http://stackoverflow.com/comment/38113078
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/38315431
comment on: http://stackoverflow.com/a/24706320
score: 0
type: Comment
has text: I need to import the other two scripts into a single one correct?
type: AnswerComment

http://stackoverflow.com/comment/38354364
has text: if I load jQuery just once, it doesn't work on the dropdown menu for some reason...any idea why?
comment on: http://stackoverflow.com/q/24726449
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24705889
has answer: http://stackoverflow.com/a/24706037
has answer: http://stackoverflow.com/a/24706046
has title: Don't run second function if first function is ran
has body: I have a header with a drop down, div, notification box (#container) that gets slide toggled. The JavaScript for the drop down box is: $("a.trigger").click(function (event) { $('#container').slideToggle(100) event.preventDefault(); }); I also have a function that closes the div box if I click anywhere outside of the #container: $(document).mouseup(function (e) { var container = $('#container'); if (!container.is(e.target)) { container.hide(); } }); When I click on the a.trigger it drops down the #container and then if I click anywhere outside the #container it properly closes it. But when I click on a.trigger while the #container is already exposed, it closes it from the second javascript function since a.trigger is outside of #container but then the first function gets triggered too afterwards and the #container slidestoggles down again right after being hidden. Here is a fiddle: http://jsfiddle.net/Hx65Q/1013/ I was thinking of making it so that if the first javascript function is called then it will just stop the second one from initiating. How would I approach this? and is there a more conventional approach?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38315119
has comment: http://stackoverflow.com/comment/38314823
answer count: 6
accepted answer: http://stackoverflow.com/a/24706046
score: 4
possible better answer: http://stackoverflow.com/a/24706268
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/24706092
has answer: http://stackoverflow.com/a/24706268
has answer: http://stackoverflow.com/a/24706110
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24706089

http://stackoverflow.com/comment/38194882
comment on: http://stackoverflow.com/q/24641863
type: Comment
type: QuestionComment
has text: this is not an app for the general public , it's an isolated app that i will be showcasing on a screen using chrome at a gallery and therefore external users and browser fallbacks have been disregarded
score: 0

http://stackoverflow.com/q/24674691
has title: grunt watch executes tasks multiple times
type: UnansweredQuestion
tagged with: grunt-contrib-watch
type: Question
tagged with: javascript
tagged with: gruntjs
score: 0
has answer: http://stackoverflow.com/a/24761168
has body: I've the following Grunfile.js File: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { dist: { options: { style: 'compressed' }, files: { 'css/build/style.css': 'css/style.scss' } } }, watch: { stylesheets: { files: ['css/*.scss'], tasks: ['newer:sass'] } } }); // Load the plugin that compiles sass grunt.loadNpmTasks('grunt-contrib-sass'); // watch for, and run grunt if files change grunt.loadNpmTasks('grunt-contrib-watch'); // Plugin for Grunt tasks to run with newer files only. grunt.loadNpmTasks('grunt-newer'); // Grunt Tasks: grunt.registerTask('default', ['newer:sass']); }; After running grunt watch and saving my scss File, the console output is the following: Running "watch" task Waiting... &gt;&gt; File "css\style.scss" changed. Running "newer:sass" (newer) task Running "newer:sass:dist" (newer) task Running "sass:dist" (sass) task File css/build/style.css created. Running "newer-postrun:sass:dist:1:D:\xampp\htdocs\grunt-test\node_modules\grunt-newer\.cache" (newer-postrun) task Done, without errors. The problem is, the .scss file is compiled every time. Even if there was no change. I don't understand why grunt is running 3 tasks (newer:sass, newer:sass:dist, sass:dist), instead of only running the task defined under watch (newer:sass). Hope someone has an idea to fix this. :)
answer count: 1

http://stackoverflow.com/q/24731490
has comment: http://stackoverflow.com/comment/38372666
has comment: http://stackoverflow.com/comment/38367558
type: Question
has comment: http://stackoverflow.com/comment/38364823
has answer: http://stackoverflow.com/a/24752780
has body: I am trying to slide div from left to right on button click in a Jquery mobile page . What exactly I want is to push that current div to left and reveal another div with content like some menu from right . I have created a JSfiddle . Here is the Updated Link So if you see in the fiddle each list div has a gear button so when you click this button it should push only that div to left and reveal another div fro right showing some menu . I have a hand drawn sketch that I am including in this HTML List View List 1 List 2 List 3 Page Footer Script $(document).ready(function () { $("#sub2").click(function () { // alert("This is an alert"); $('#myform1').toggle('slide', { direction: 'right' }, 700); }); }); Thanks
has comment: http://stackoverflow.com/comment/38364235
has comment: http://stackoverflow.com/comment/38364346
has comment: http://stackoverflow.com/comment/38372572
score: 0
has comment: http://stackoverflow.com/comment/38374441
has comment: http://stackoverflow.com/comment/38372873
upvote count: 1
has comment: http://stackoverflow.com/comment/38372567
answer count: 1
downvote count: 1
has title: How to slide a div from left to right in a Jquery Mobile page
accepted answer: http://stackoverflow.com/a/24752780
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/38399305
has comment: http://stackoverflow.com/comment/38364470
type: AnsweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/38364336
favorite count: 0

http://stackoverflow.com/a/24719141
type: Answer
has body: You should put the all navigation links inside li tags, Home About Social Community Contact General Inquiries Ask me a Question JSFiddle Example
score: 0
has comment: http://stackoverflow.com/comment/38340422
answers question: http://stackoverflow.com/q/24719053

image-rotation
tags question: http://stackoverflow.com/q/24748669
type: Tag
tag name: image-rotation

http://stackoverflow.com/q/24681127
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
has title: Play Animation Then Load Next Page
type: AnsweredQuestion
has body: I have a simple jQuery animation and its assigned to a div with an anchor tag around it, this animation only plays when clicked. I'm wondering if there is a way to have the animation play completely then direct the user to the next page. Here is the code for the animation if it will help: $(".magicdiv4").click(function() { $(".magicdiv4").addClass('magictime swashOut'); }); Any help is appreciated!
has comment: http://stackoverflow.com/comment/38268108
upvote count: 1
downvote count: 1
type: Question
tagged with: anchor
accepted answer: http://stackoverflow.com/a/24681655
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38268029
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24681655

http://stackoverflow.com/a/24697945
has comment: http://stackoverflow.com/comment/38298734
has comment: http://stackoverflow.com/comment/38298888
has comment: http://stackoverflow.com/comment/38300913
has body: var myInterval = window.setInterval(function(){x1ferf0(y1io2pp);}, 1000); This is real basic. You can find more HERE Also: if you realy want to "click" this button - you can use jQuery and it's .click() method.
type: Answer
has comment: http://stackoverflow.com/comment/38299914
answers question: http://stackoverflow.com/q/24697867
has comment: http://stackoverflow.com/comment/38298828
has comment: http://stackoverflow.com/comment/38298938
has comment: http://stackoverflow.com/comment/38299098
score: 0

permissions
tag name: permissions
tags question: http://stackoverflow.com/q/24617040
type: Tag
tags question: http://stackoverflow.com/q/24660827

http://stackoverflow.com/q/24621550
tagged with: promise
has answer: http://stackoverflow.com/a/24621692
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
tagged with: ember-data
accepted answer: http://stackoverflow.com/a/24621692
answer count: 1
downvote count: 0
tagged with: javascript
has body: When I try to render a list of view models contained in a chart model using the each handlebars helper, the promise array for the view models doesn't resolve before the each helper renders, leaving blank lis: template: &lt;script type="text/x-handlebars" id="chart-container"&gt; {{views}} &lt;ul&gt; {{#each view in views}} &lt;li&gt;{{view}}&lt;/li&gt; {{/each}} &lt;/ul&gt; &lt;/script&gt; What's odd is that if I change the each helper to {{#each views}} it works fine. How can I make the view render once the promised hasMany relationship has been resolved using view in views for the each helper? Below are the relevant models and fixtures: displayItem model: var DisplayItem = DS.Model.extend({ name: DS.attr("name"), display: DS.belongsTo("display", {async: true}) }); chart model: var Chart = DisplayItem.extend({ views: DS.hasMany("view", {async: true}) }); view model: var View = DS.Model.extend({ name: DS.attr("string"), chart: DS.belongsTo("chart", {async: true}) }); relevant fixture data: Chart.FIXTURES = [ { id: 1, name: "Derp", display: 1, views: [1, 2], defaultView: 1 } ]; View.FIXTURES = [ { id: 1, name: "Test 1", chart: 1 }, { id: 2, name: "Test 2", chart: 1 } ];
tagged with: ember.js
has title: Ember.js hasMany Relationship Not Resolving before Render
favorite count: 0

http://stackoverflow.com/a/24703072
answers question: http://stackoverflow.com/q/24702918
has body: Add this to the javascript code: $(function() { $(".navbar-nav li a").on('click', function() { $(".navbar-nav li a").css('text-decoration', 'none'); $(this).css('text-decoration', 'underline'); }); }); So that when you click an item, it will be underlined
downvote count: 0
has comment: http://stackoverflow.com/comment/38310852
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/24727477
score: -1
has body: Probably a bug in jQuery's AJAX. add some console.log() statements to both server and client and see if IE sends the same data as the popular browsers.
downvote count: 1
answers question: http://stackoverflow.com/q/24720171
type: Answer
upvote count: 0

http://stackoverflow.com/comment/38239409
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24646468
has text: Oh, I misread the code. There are other questions that deal with how to wrap individual words in an element. You should be able to find a solution.
score: 0

http://stackoverflow.com/q/24663593
tagged with: copy-paste
has comment: http://stackoverflow.com/comment/38235749
score: 1
tagged with: character-encoding
has body: I'm pasting text into an html table into multiple cells ( input areas within a form). It pastes fine when copied from Excel, as I'm breaking the lines and cells on the "\t" and "\n" characters. But from an html table, not so well. How can I tell what characters are in my pasted text? I can process them once I know what they are. Thanks for the help.
upvote count: 1
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has title: How do I detect what characters are in pasted text?
tagged with: http://stackoverflow.com/tag/html
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/38235739
type: Question

http://stackoverflow.com/comment/38293215
score: 0
has text: The code just breaks. If I place an *alert()* within *setTimeout()* function, it doesn't get executed. Perhaps an undefined value error. It's easily testable; simply cut, paste, save as *index.html*, and run. If the source is changed back to *index.html* it works.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24694823

http://stackoverflow.com/comment/38342853
type: Comment
type: QuestionComment
score: 1
has text: You should be using `document.getElementsByTagName('a')`
comment on: http://stackoverflow.com/q/24720464

http://stackoverflow.com/comment/72302889
type: Comment
has text: Sorry, this was from a couple of gigs ago, but I think we had to abandon this feature for a while
type: AnswerComment
comment on: http://stackoverflow.com/a/24642038
score: 0

http://stackoverflow.com/comment/119116171
type: AnswerComment
type: Comment
has text: Anyone just finding this, the application does not work or no longer works, tested with python2 and python3.
comment on: http://stackoverflow.com/a/38856925
score: 0

http://stackoverflow.com/a/24768777
has body: You won't be able to do this client side because of same origin policy restrictions. You'll need server side code to do most of the work. Create a handler in the server side language of your choice that takes a URL, requests it server-side, parses the response, and extracts the desired information from the parsed document, and returns JSON. You can use something like phantomjs to do the document parsing on the server. Then, it would just be a matter of calling that page from your code: $("a[href^=http]").hover(function(e) { var url = encodeURIComponent(this.href); $.get("/summary?url=" + url, function(summary) { // use data from summary to create popup }); }, function(e) { // hide popup });
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24745664
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24745664
type: Answer

http://stackoverflow.com/comment/38274295
type: AnswerComment
score: 0
has text: No, that's why I said you would have to get the width of each section if you are trying to move multiple times across the screen.
type: Comment
comment on: http://stackoverflow.com/a/24684395

http://stackoverflow.com/comment/38245922
comment on: http://stackoverflow.com/a/24669438
has text: thats the second thing. first need Input box generate.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24664029
favorite count: 0
has comment: http://stackoverflow.com/comment/38236526
type: UnansweredQuestion
upvote count: 0
type: Question
has answer: http://stackoverflow.com/a/24664078
tagged with: javascript
downvote count: 6
has body: I have a string like so: some where is something at something, I am, something and I would like to use jquery to say - on the first comma have break the string, remove the comma and place a carriage return so that the string no looks like: some where is something at something I am, something Any ideas?
has answer: http://stackoverflow.com/a/24664203
has title: Break up a string on the first comma
answer count: 3
tagged with: string
has answer: http://stackoverflow.com/a/24664067
score: -6

http://stackoverflow.com/a/24699693
downvote count: 1
answers question: http://stackoverflow.com/q/24699546
score: 1
has comment: http://stackoverflow.com/comment/38302657
has comment: http://stackoverflow.com/comment/38302309
type: Answer
has comment: http://stackoverflow.com/comment/38303041
upvote count: 2
has body: On form submit event, pass the value/html of the div to an hidden input field, and the server will catch up that input value. Has was said by Alex, only input, select,textarea are passed to the server side.

http://stackoverflow.com/q/24672930
type: Question
tagged with: charts
tagged with: javascript
score: 0
answer count: 1
tagged with: highcharts
tagged with: colors
tagged with: android
has body: I am using the link given below to show pie chart in my android application successfully, but now I want to color the each portion as my desire of the chart. What do I have to do? I have to pass any extra parameter with this URL.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24673596
has title: Color the portions of chart using "Google 3D Pie chart API" in Android

http://stackoverflow.com/comment/38381299
comment on: http://stackoverflow.com/q/24740299
score: 0
type: Comment
type: QuestionComment
has text: The solutions so far ,unfortunately dont work for me Let me add one bit of detail that i missed , ResidentialZipCode_txt is what i picked from the rendered html , it is actually not a part of the page but rather a partial control named zip city state control

http://stackoverflow.com/a/24624869
has comment: http://stackoverflow.com/comment/38162936
type: Answer
has body: You're missing your closing quotation mark: document.write("&lt;br&gt; Your second Entry: "+secondInt+"&lt;br&gt;);
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24624843

http://stackoverflow.com/q/24728070
has answer: http://stackoverflow.com/a/24728089
score: 1
tagged with: mysql
upvote count: 1
has comment: http://stackoverflow.com/comment/38357708
type: Question
linked to: http://stackoverflow.com/q/10476533
tagged with: javascript
has answer: http://stackoverflow.com/a/24749934
answer count: 2
downvote count: 0
tagged with: jquery
has title: jQuery alters page - but how/where do I "acquire" the changes?
favorite count: 0
has comment: http://stackoverflow.com/comment/38359357
has body: This post by @BenjaminRH (How to change/edit the text of a paragraph/div using jQuery?) provides exactly the sort of functionality I'm trying to build on. By clicking on a button, a new paragraph is created on the page, which can be edited and saved to the page. I want to save it to a database. When I look at the page source after editing, I don't see the changes there, which doesn't surprise me... but I don't know where to "capture" the changed text so that I can validate and post to mySQL.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/24676395
accepted answer of: http://stackoverflow.com/q/24676181
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/38260514
downvote count: 0
has body: Will it be easier? Not so much when you get the hang of it. I have made a web app using PhoneGap and I still liked writing it in the native enviroment (PhoneGap did not produce the results which I have hoped for). If you really have time and you're willing to learn then you should go native. That way you will learn more languages which will benefit you more in the long run. Java is going to be easier if you're used to OOP. But don't be scared of anything. Go for it! In the future? Well JavaScript, HTML5+CSS3 is already popular and might grow even more. Use PhoneGap for small and light apps and not for "Facebook" type apps:) Thats just my humble opinion.
score: 3
answers question: http://stackoverflow.com/q/24676181
type: AcceptedAnswer

http://stackoverflow.com/comment/38341216
comment on: http://stackoverflow.com/q/24710582
has text: @Jigar JoshiThank you very much for the reply.Will that hide the url in the addressbar or hide the addressbar itself of the popup window?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24683491
answers question: http://stackoverflow.com/q/24656496
upvote count: 1
downvote count: 0
type: Answer
has body: I think there are two ways to do this kind of thing: Include the files in the files array, specifying a pattern and setting include to false. Have a look to the RequireJS page on the Karma website for an idea on how this works. Use proxies. Have a look on the Karma configuration page.
score: 1

http://stackoverflow.com/comment/38291799
type: AnswerComment
score: 0
type: Comment
has text: I updated the JSFiddle, but still when the overlay has overflow, you cannot scroll it (see menu item 3). [Update here](http://jsfiddle.net/uPmb4/26/)
comment on: http://stackoverflow.com/a/24679984

http://stackoverflow.com/a/24824308
score: 4
has comment: http://stackoverflow.com/comment/38601866
type: Answer
has comment: http://stackoverflow.com/comment/38545893
has body: I think the issue is with the jQuery implementation.. jQuery(document).ready ($) -&gt; jQuery('#zoomimage').addimagezoom largeimage: jQuery('#zoomimage').data('large-image-url'), magnifiersize: [jQuery('#zoomimage').data('scaled-x-dimension'), jQuery('#zoomimage').data('scaled-y-dimension')], zoomrange: [2, 10] Once we have initiated jQuery keyword one have to use the same instead of $ The error is similar jQuery implementation error. as $ will fetch nothing and will cause undefined error to raise. Try this if this works, I am not must of RUBY programmer but can check JS :)
answers question: http://stackoverflow.com/q/24677164
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/24609912
has comment: http://stackoverflow.com/comment/38134795
tagged with: execjs
linked to: http://stackoverflow.com/q/24591554
has answer: http://stackoverflow.com/a/24609984
linked to: http://stackoverflow.com/q/23022258
linked to: http://stackoverflow.com/q/12520456
has comment: http://stackoverflow.com/comment/38135021
downvote count: 0
has answer: http://stackoverflow.com/a/27263938
has body: UPDATE : Things are now working ! Thanks to deep, I installed node.js then got a TZInfo::DataSourceNotFound error wich got resolved by adding gem 'tzinfo-data', platforms: [:mingw, :mswin] and bundle update. Thank you sir ! First of all, I am a complete beginner on rails (just so that you get how beginner I am : I feel as being an expert for just posting here) and this is my first question here so please excuse me if I'm not very clear. So, I am a windows 7 user, learning rails with the One Month course and I encounter an error while trying to : $ rake routes rake aborted! ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://git hub.com/sstephenson/execjs for a list of available runtimes. c:/Users/Marc Montagne/Desktop/pinteresting/config/application.rb:7:in `&lt;top (re quired)&gt;' c:/Users/Marc Montagne/Desktop/pinteresting/Rakefile:4:in `&lt;top (required)&gt;' (See full trace by running task with --trace) or $ rails server c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.0.2/lib/execjs/run times.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://gi thub.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUn available) from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.0.2/l ib/execjs.rb:5:in `&lt;module:ExecJS&gt;' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.0.2/l ib/execjs.rb:4:in `&lt;top (required)&gt;' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/uglifier-2.4.0 /lib/uglifier.rb:3:in `require' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/uglifier-2.4.0 /lib/uglifier.rb:3:in `&lt;top (required)&gt;' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/ lib/bundler/runtime.rb:72:in `require' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/ lib/bundler/runtime.rb:72:in `block (2 levels) in require' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/ lib/bun…
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/64520911
tagged with: windows
score: 7
answer count: 4
has comment: http://stackoverflow.com/comment/38135218
tagged with: ruby
has comment: http://stackoverflow.com/comment/38134992
type: UnansweredQuestion
has title: ExecJS::RuntimeUnavailable in Rails 4.1.4
upvote count: 7
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/38140189
has answer: http://stackoverflow.com/a/24610065
has comment: http://stackoverflow.com/comment/38133478
type: Question
has comment: http://stackoverflow.com/comment/38134871

http://stackoverflow.com/q/24692030
has answer: http://stackoverflow.com/a/24692071
has title: Undefined is not a function, even so a form is found
has comment: http://stackoverflow.com/comment/38287961
has body: I have this handle on a form submit: $("#my_form").on("submit", function (e) { e.preventDefault(); debugger; var data = $("#my_form").serializeAllArray(); //undefined is not a function var data2 = $(this).serializeAllArray(); //undefined is not a function )}; Why am I getting this error inside this handler (which means the form is found)? I don't understand what's going on.
type: Question
has comment: http://stackoverflow.com/comment/38288010
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/38287941
answer count: 2
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/24692407
favorite count: 0
has comment: http://stackoverflow.com/comment/38288541
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15958671

http://stackoverflow.com/q/24691676
score: 1
has answer: http://stackoverflow.com/a/24691840
tagged with: wordpress
linked to: http://stackoverflow.com/q/13498959
has body: Hi this my code for wordpress plugin function my_action_callback() { check_ajax_referer( 'my-special-string', 'security' ); $whatever = intval( $_POST['whatever'] ); $whatever += 10; echo $whatever; die(); } add_action( 'wp_ajax_my_action', 'my_action_callback' ); add_shortcode('my_products','my_shortcode'); function my_shortcode($atts) { extract(shortcode_atts(array( 'id'=&gt;'' ), $atts)); ob_start(); wp_enqueue_script( 'my-script', plugins_url( 'myplugin/js/example.js' ), array('jquery'), NULL, true); wp_localize_script( 'script-name', 'MyAjax', array( 'ajaxurl' =&gt; admin_url( 'admin-ajax.php' ), 'security' =&gt; wp_create_nonce( 'my-special-string' ) )); } example.js code jQuery(document).ready(function($) { var data = { action: 'my_action', security : MyAjax.security, whatever: 1234 }; $.post(MyAjax.ajaxurl, data, function(response) { alert('Got this from the server: ' + response); }); }); It does not alert any values. why? my shortcode [my_products]
has comment: http://stackoverflow.com/comment/38305679
type: Question
has comment: http://stackoverflow.com/comment/38287365
tagged with: javascript
has comment: http://stackoverflow.com/comment/38287453
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38288714
has title: Ajax not working in front end of wordpress plugin shortcode
tagged with: php
has comment: http://stackoverflow.com/comment/38288570
downvote count: 0

http://stackoverflow.com/comment/41104776
type: AnswerComment
has text: The idiomatic way of doing this is to add the event handler `keyPress` to the view. See http://emberjs.com/api/classes/Ember.View.html#toc_event-names. I expect the event would bubble up, but YMMV. You may want to try putting the handler inside a `eventManager` hash on the app view.
type: Comment
comment on: http://stackoverflow.com/a/24594113
score: 1

http://stackoverflow.com/q/24609624
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24610822
has body: I have used "enscroll" js scroll bar in my page. http://enscrollplugin.com/#demos product1 product2 product3 product4 product5 On Page load the product3 need to be in the visible area. I used for this. But in query how to achieve this? In html we used anchor name tag like . But in this script how to achieve this?
answer count: 1
tagged with: css
score: 0
has title: Enscroll js scrollbar
has answer: http://stackoverflow.com/a/24610822
tagged with: javascript
tagged with: jquery
type: Question

http://stackoverflow.com/comment/38946545
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24725552
type: Comment
has text: Yeah dw about it, you'll do so eventually when you get enough rep. I don't really mind, cheers.

http://stackoverflow.com/comment/38151629
type: QuestionComment
comment on: http://stackoverflow.com/q/24614923
has text: Can you provide code in a [JSFiddle?](http://jsfiddle.net/)
score: 0
type: Comment

http://stackoverflow.com/comment/38157968
type: Comment
type: QuestionComment
has text: See http://stackoverflow.com/questions/12980955/javascript-slide-effect-onclick/12981143#12981143
comment on: http://stackoverflow.com/q/24622186
score: 1

http://stackoverflow.com/comment/38167665
type: QuestionComment
score: 0
has text: Replace `console.log(event.data.self);` with `console.log(obj)`? Or are you looking for a more generic solution?
comment on: http://stackoverflow.com/q/24627459
type: Comment

http://stackoverflow.com/q/24632155
has answer: http://stackoverflow.com/a/24632661
accepted answer: http://stackoverflow.com/a/24632661
tagged with: highcharts
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24632295
has answer: http://stackoverflow.com/a/24632295
score: 0
has title: Highchart Color Issue for series with single data with multiple colors
has body: I was working on my chart,But it gives only single color for a name:vengadesh , Here is my Chart code in Fiddle.. My Example Chart in FIDDLE But i want to get multiple colors for a single person dynamically... My Actual Chart MY EXPECTED CHART
tagged with: css
type: AnsweredQuestion
type: Question
tagged with: graph
tagged with: charts
answer count: 2

http://stackoverflow.com/comment/38298560
type: Comment
type: QuestionComment
score: 0
has text: @Homar what can I do about this?
comment on: http://stackoverflow.com/q/24679283

http://stackoverflow.com/q/24701944
has answer: http://stackoverflow.com/a/25494764
score: 3
possible better answer: http://stackoverflow.com/a/30991872
has answer: http://stackoverflow.com/a/30991872
has comment: http://stackoverflow.com/comment/48579660
upvote count: 3
answer count: 2
has title: How can I specify a path and filename for my files with meteor and collectionfs filesystem
accepted answer: http://stackoverflow.com/a/25494764
type: AnsweredQuestion
downvote count: 0
has body: I'm using CollectionFS to store files uploaded from my meteor app. I'm using the cfs-filesystem package to save my files using the local filesystem. Right now, when I upload a file, it gets saved to ~/uploads/images-h9jWnALqSZMpAX4h4-IMG_3737.JPG I have an existing filesystem structure that I need to work with and we need the files to be easy to traverse by hand if necessary. Suppose I want to customize that path to be something like this ~/uploads/jaredtmartin/IMG_3737.jpg. And when a different user uploads, it goes to a new folder with his name, for example, ~/uploads/suzyq/IMG_1234.jpg. Can that be done? If not, where can I dig in to modify the code to make it happen?
tagged with: javascript
tagged with: meteor
favorite count: 0
type: Question

http://stackoverflow.com/a/24730755
has body: Change button type submit to button or change onclick to onsubmit
answers question: http://stackoverflow.com/q/24730673
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38364911

http://stackoverflow.com/a/24631099
type: Answer
upvote count: 0
has body: Question is not clear..You are looking for code which refresh page every 3 seconds? You can use following script to refresh your page. &lt;meta http-equiv="refresh" content="3; URL=http://www.yourdomain.com/yoursite.html"&gt;
answers question: http://stackoverflow.com/q/24630694
score: -1
downvote count: 1

http://stackoverflow.com/q/24697819
has comment: http://stackoverflow.com/comment/38298681
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/38299299
has comment: http://stackoverflow.com/comment/38299325
score: 0
has comment: http://stackoverflow.com/comment/38299972
has comment: http://stackoverflow.com/comment/38300825
answer count: 1
has body: I'm trying to redirect user to my another controller when he'll click in my div (which is picture). here's my Home Controller: public ActionResult Index() { return View(); } public ActionResult Rules() { return View(); } and of course they has their views.. In Index.cshtml I'm trying this: $("#rules").on('click', function () { var url = '@Url.Action("Rules", "Home")'; location.href = url; }); How I think after click on rules div browser must be redirectedin my Rules.cshtml but it's doing that: https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10515357_776619705702730_572107523657856972_o.jpg but I have Home controller and Rules action.. what am I doing wrong? I have tried this too: &lt;a href="@Url.Action("Rules", "Home")"&gt; &lt;div id="rules"&gt;&lt;/div&gt; &lt;/a&gt; but same result.. I think something is wrong with controller but..? When I'm clicking "Go To View" there's no problem Visual studio is redirecting me to my view..
tagged with: jquery
has comment: http://stackoverflow.com/comment/38298708
has comment: http://stackoverflow.com/comment/38300079
has comment: http://stackoverflow.com/comment/38300868
has comment: http://stackoverflow.com/comment/38299339
has comment: http://stackoverflow.com/comment/38299190
accepted answer: http://stackoverflow.com/a/24698840
has title: location.href Asp.net MVC 4
has comment: http://stackoverflow.com/comment/38299253
has comment: http://stackoverflow.com/comment/38300436
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38299197
has answer: http://stackoverflow.com/a/24698840
has comment: http://stackoverflow.com/comment/38300355
has comment: http://stackoverflow.com/comment/38300545

http://stackoverflow.com/q/24716790
has body: I have code that creates a bouncing ball in javascript, which I got from a tutorial. What I am trying to do is create an event listener for the "ball" object. I would know how to do it if it was a element in HTML, but its not. I just want an alert to pop up when the ball is clicked. Heres my code. var canvas = document.getElementById("canvas"), ctx = canvas.getContext("2d"); // Now setting the width and height of the canvas var W = 350, H = 450; // Applying these to the canvas element canvas.height = H; canvas.width = W; // First of all we'll create a ball object which will contain all the methods and variables specific to the ball. // Lets define some variables first var ball = {}, gravity = 1, bounceFactor = 0.7; // The ball object // It will contain the following details // 1) Its x and y position // 2) Radius and color // 3) Velocity vectors // 4) the method to draw or paint it on the canvas ball = { x: W/2, y: 50, radius: 30, color: "blue", // Velocity components vx: 0, vy: 1, draw: function() { ctx.beginPath(); ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2, false); ctx.fillStyle = this.color; ctx.fill(); ctx.closePath(); } }; function clearCanvas() { ctx.clearRect(0, 0, W, H); } function update() { clearCanvas(); ball.draw(); ball.y += ball.vy; ball.vy += gravity; if(ball.y + ball.radius &gt; H) { ball.y = H - ball.radius; ball.vy *= -bounceFactor; } } setInterval(update, 1000/60); bounceFactor = bounceFactor + 0.25;
downvote count: 0
tagged with: javascript
has title: Creating a Click Listener for an object in javascript
linked to: http://stackoverflow.com/q/22186467
has comment: http://stackoverflow.com/comment/38335744
score: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9880279
upvote count: 3
duplicate of: http://stackoverflow.com/q/9880279
type: Question

http://stackoverflow.com/comment/98458650
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24666746
has text: For my needs https://github.com/hhurz/tableExport.jquery.plugin/ is doing a great job

http://stackoverflow.com/comment/38409139
has text: @Jeremy John: Have updated your fiddle to show how to do it with a descendant selector.
comment on: http://stackoverflow.com/a/24745986
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24675548
accepted answer: http://stackoverflow.com/a/24678732
upvote count: 1
has title: InnoSetup - Is there any way to manually create cookie for Internet explorer?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38260063
tagged with: internet-explorer
tagged with: cookies
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: inno-setup
has comment: http://stackoverflow.com/comment/38258240
has body: Basically IE remember for site www.stackoverflow.com using JavaScript cookies but is there anyway manually to create a same cookie within InnoSetup on behalf of stackoverflow.com? Javascript cookie: function setCookie(cname,cvalue,exdays) { var d = new Date(); d.setTime(d.getTime()+(exdays*24*60*60*1000)); var expires = "expires="+d.toGMTString(); document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;ca.length; i++) { var c = ca[i].trim(); if (c.indexOf(name)==0) return c.substring(name.length,c.length); } return ""; } function checkCookie(user) { var user=getCookie("username"); if (user!="") { alert("Welcome again " + user); } else { user='bandwidth - set to off for example'; setCookie("username",user,30); } } NOTE: because there is no way to detect from IE if my plugin is installed or not. I came to a mind set that i must have to deal with cookies. But instead of IE my plugin has to create that cookie for the first time installation. EDIT: Reference http://msdn.microsoft.com/en-us/library/windows/desktop/aa385107%28v=vs.85%29.aspx
favorite count: 0
tagged with: windows
has answer: http://stackoverflow.com/a/24678732

http://stackoverflow.com/comment/38418634
type: Comment
comment on: http://stackoverflow.com/a/24742837
has text: @Kosmetika go the event bus route then - use the same callback and inspect `event.type`.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38262522
comment on: http://stackoverflow.com/q/24678061
score: 0
type: Comment
type: QuestionComment
has text: I haven't managed to get it work with your actual code. I'll try another fiddle. Basically, your hovering works when you are hovering the class .button, but nothing says "still hovering when i'm on the sub menu"

http://stackoverflow.com/a/24725079
upvote count: 3
has body: .has() returns a jQuery collection, not a true/false boolean. So use: if ($(formId).has('input[type="file"]').length) .length returns the number of elements matched by .has().
has comment: http://stackoverflow.com/comment/38351505
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/38351603
answers question: http://stackoverflow.com/q/24725031
downvote count: 0
has comment: http://stackoverflow.com/comment/38351467
has comment: http://stackoverflow.com/comment/38351538

http://stackoverflow.com/a/24612127
score: 0
type: AcceptedAnswer
has body: I'm not quite sure why, but while show() and hide() don't work, slideToggle does. This seems to solve your problem (although I had to remove height: auto !important from your css because it was overriding jQuery's height). http://jsfiddle.net/prankol57/YBsYh/ Javascript: jQuery(function () { $("ol.top-nav li").hover(function () { $(this).children('div.subl').stop().slideToggle("fast"); }); }); I believe this is because show() and hide() do not cause an animation queue.
answers question: http://stackoverflow.com/q/24611637
type: Answer
accepted answer of: http://stackoverflow.com/q/24611637
has comment: http://stackoverflow.com/comment/38138772

http://stackoverflow.com/a/24731792
score: 1
has body: $(document).ready(function () { $tags = $("script[src*='http']"); $.each($tags, function (index, value) { console.log("INDEX: " + index + " VALUE: " + $(value).attr("src") ); }); }); Demo: http://jsfiddle.net/Bh6Vz/1/
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/24731682
downvote count: 0

http://stackoverflow.com/q/24741711
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: string
favorite count: 0
answer count: 4
tagged with: parsing
has comment: http://stackoverflow.com/comment/38383095
score: 2
has body: I am trying to parse a string into an object. I have looked at the jQueryparseJSON documentation at the following link I've also included the jquery library so I know it's not that. This is my code so far var str = "{'val1': 1, 'val2': 2, 'val3': 3}"; var obj = jQueryparseJSON( str ); alert(obj.val1); In Firebug I am getting the following errors: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data I know the solution is more than likely very simple, but I have been repeatedly overlooking it.
upvote count: 2
has answer: http://stackoverflow.com/a/24741789
possible better answer: http://stackoverflow.com/a/24741792
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24741792
has answer: http://stackoverflow.com/a/34534195
has title: JQuery.parseJSON not working with string
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/24592841
has answer: http://stackoverflow.com/a/24742536
linked to: http://stackoverflow.com/q/9036429
accepted answer: http://stackoverflow.com/a/24741789

http://stackoverflow.com/comment/38296058
type: AnswerComment
has text: @Alnitak That's exactly what's mentioned in the diagram : Red - Step skipped/ignored. Whats the confusion?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24649917

http://stackoverflow.com/comment/38167520
type: AnswerComment
score: 0
has text: ah. Looks nice. Thanks a lot.
type: Comment
comment on: http://stackoverflow.com/a/24626399

http://stackoverflow.com/q/24693835
has answer: http://stackoverflow.com/a/24694416
has comment: http://stackoverflow.com/comment/38291772
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38291100
tagged with: javascript
tagged with: jquery
has body: I am trying to add opacity effect (from 0 to 1) to the code posted somewhere here (by users/1022305/trevor). No results yet (I'm still jquery beginner). Here is the fiddle by the author of the code: http://jsfiddle.net/trevordowdle/S7n2b/ Any suggestions what line of code should be implemented? It is probably 1 line like: opacity:'toggle' tried this, wont work... UPDATED Code: // JavaScript Document $(document).ready(function(){ var stop = true; var hovered; var timeout; $('.nav').hover( function(){ clearTimeout(timeout); stop = true; hovered = this; timeout = setTimeout(function(){ if($(hovered).hasClass('nav_menu_link_drop')){ $('.content').css('z-index',0); $(hovered).next('.content').css('z-index',5); $(hovered).next('.content').slideDown({ duration: 400, easing: 'jswing', }); timeout = setTimeout(function(){ $('.content').not($(hovered).next('.content')).slideUp({ duration: 200, easing: 'easeInSine', }); },100); $(hovered).next('.content').fadeIn(100); } else $('.content').slideUp(350); },400); }, function(e){ stop = false; clearTimeout(timeout); setTimeout(function(){ if(!stop) $('.content').slideUp(350); $('.content').fadeOut(350); },500); } ); $('.content').hover( function(){ stop = true; }, function(){ } ); $('#nav_menu').hover( function(){ }, function(){ timeout = setTimeout(function(){ $('.content').slideUp(350); },200); } ); }); So I added this 2 lines of code: $(hovered).next('.content').fadeIn(100); and $('.content').fadeOut(350); It isn't working :(
has title: Adding opacity effect to jquery slide animation
score: 0
tagged with: css
has comment: http://stackoverflow.com/comment/38292987
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24694897
has comment: http://stackoverflow.com/comment/38291201

http://stackoverflow.com/q/24730654
type: Question
upvote count: 4
tagged with: angularjs-routing
has body: I am new to AngularJS. I am currently facing problem in writing pretty urls for my views.I have set $locationProvider.html5Mode(true); to remove # from the urls displayed in the address bar. However,upon doing so I am unable to reroute to desired views. I keep getting the error Cannot GET /login I get the home page /login when the app is launched first time , but when I refresh the page I get the same error. Here the main page of application (index.html) F-1 Feeder My app.js file(where rerouting takes place) looks like this angular.module('F1FeederApp.controllers', []); angular.module('F1FeederApp', [ 'F1FeederApp.services', 'F1FeederApp.controllers', 'ngRoute' ]) .config([ '$routeProvider','$locationProvider', function($routeProvider,$locationProvider,$location) { console.log('---------------inside config----------------'); console.log($routeProvider); $routeProvider.when("/login", { templateUrl : "views/login.html", controller : "loginController" }).when("/drivers", { templateUrl : "views/drivers.html", controller : "driversController" }).when("/drivers/:id", { templateUrl : "views/driver.html", controller : "driverController" }).otherwise({ redirectTo : "/login" }); $locationProvider.html5Mode(true); } ]); I also made following important observation If I set the base href on index.html to point to the root as and perform rerouting as $routeProvider.when("/", { templateUrl : "views/login.html", controller : "loginController" }).when("/drivers", { templateUrl : "views/drivers.html", controller : "driversController" }).when("/drivers/:id", { templateUrl : "views/driver.html", controller : "driverController" }).otherwise({ redirectTo : "/" }); my app works fine here.But I want '/login' to be my default page. Kindly guide me on where I am going wrong or is it an issue with AngularJS itself.
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24733081
has title: AngularJS pretty-url not working on page refresh if base href is set to other than '/'
accepted answer: http://stackoverflow.com/a/24733081
tagged with: single-page-application
downvote count: 0
linked to: http://stackoverflow.com/q/20653496
favorite count: 0
has comment: http://stackoverflow.com/comment/80335779
tagged with: angularjs
score: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38362654

http://stackoverflow.com/comment/112982566
has text: More cons of using this method of cloning given here: https://medium.com/@pmzubar/why-json-parse-json-stringify-is-a-bad-practice-to-clone-an-object-in-javascript-b28ac5e36521 It also messes up on NAN and Infinity.
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/24744519
type: Comment

http://stackoverflow.com/q/24710306
has comment: http://stackoverflow.com/comment/38324013
tagged with: google-chrome
type: Question
tagged with: arrays
has body: So while writing an IIFE API I realized that chrome has changed the getElementsByClassName DOM property. For some reason they've made it harder to get the items we wanted before. for example [item: function, namedItem: function] 0: div.sceditor-group 1: div.sceditor-group 2: div.sceditor-group 3: div.sceditor-group 4: div.sceditor-group 5: div.sceditor-group 6: div.sceditor-group 7: div.sceditor-group 8: div.sceditor-group 9: div.sceditor-group length: 10 __proto__: HTMLCollection This is what is logged in the console. Though I can no longer do this var a = document.getElementsByClassName('sceditor-group'); console.log(a.length); //OR THIS for(i=0;i&lt;a.length;i++){ //manipulate each element //since i now returns 0 for some reason } Though if we look at the returned array/object or whatever this may be now. It has a length. So how do we now get the length property!! IIFE actual bit var t = getElement('class','sceditor-group'); console.log(t); console.log(t.length); this.groups = {}; for(i=0;i&lt;t.length;i++){ this.groups[i] = t[i]; } this.groups.length = t.length; getElement function function getElement(t, ele) { switch (t) { case "id": return document.getElementById(ele); case "class": return document.getElementsByClassName(ele); case "element": return document.getElementsByTagName(ele); case "input": return document.getElementsByName(ele); case "query": return document.querySelectorAll(ele); } } ** response ** [item: function, namedItem: function] 0: div.sceditor-group 1: div.sceditor-group 2: div.sceditor-group 3: div.sceditor-group 4: div.sceditor-group 5: div.sceditor-group length: 6 __proto__: HTMLCollection 0 Object {length: 0}
tagged with: javascript
has comment: http://stackoverflow.com/comment/38323620
has title: Recent Chrome changes to getElementsByClassName
has comment: http://stackoverflow.com/comment/38323910
has comment: http://stackoverflow.com/comment/38323872
has comment: http://stackoverflow.com/comment/38323936
has comment: http://stackoverflow.com/comment/38323979
has comment: http://stackoverflow.com/comment/38323602
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38323853
has comment: http://stackoverflow.com/comment/38323709
has comment: http://stackoverflow.com/comment/38324002
has comment: http://stackoverflow.com/comment/38323597
answer count: 0
has comment: http://stackoverflow.com/comment/38323794
tagged with: getelementsbyclassname
score: 0

http://stackoverflow.com/a/24708699
accepted answer of: http://stackoverflow.com/q/24708647
type: Answer
upvote count: 1
score: 1
has body: row is a reference to an input which can't have descendant elements. You are missing the closest method for selecting the closest tr parent of the input: var row = $(this).closest('tr'); You can also use the filtering has method: $('#ordertable tr').has('input[type="checkbox"]:checked').each(function () { // `this` here refers the matching `tr` element }); http://jsfiddle.net/7Tr87/
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24708647

http://stackoverflow.com/a/24612707
accepted answer of: http://stackoverflow.com/q/24612175
answers question: http://stackoverflow.com/q/24612175
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38139285
has comment: http://stackoverflow.com/comment/38139085
has body: Sorry everyone, but it turns out I was missing quotes around the id selector. Here is the final jquery code: $("tbody[id$='" + wbId + " _ErrorVisits'] tr td input[type='checkbox']").prop('checked', $(this).prop('checked')); Quotes needed to be placed around the id to prevent a syntax error and because the id had spaces in it.

http://stackoverflow.com/q/24674709
has answer: http://stackoverflow.com/a/24676733
accepted answer: http://stackoverflow.com/a/24676733
type: AnsweredQuestion
has body: I've got an area where I want two buttons that load either the camera and upload a pic or loads the gallery then uploads the pic. This is a phonegap application. This works: HTML: JS: function takep(SessionKey, PetID) { // Retrieve image file location from specified source navigator.camera.getPicture( uploadPhoto, function(message) { alert('get picture failed'); }, { quality : 50, destinationType : navigator.camera.DestinationType.FILE_URI, sourceType : navigator.camera.PictureSourceType.PHOTOLIBRARY } ); } function uploadPhoto(imageURI) { $.mobile.loading( 'show', { theme: "b", text: "Loading", textonly: false}) var options = new FileUploadOptions(); options.fileKey="file"; options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1); options.mimeType="image/jpeg"; var params = {}; var Username = localStorage.getItem("Username"); var SessionKey = localStorage.getItem("SessionID"); var PetID = localStorage.getItem("addPetID"); var callback = "moo0"; params.Username = Username; params.SessionKey = SessionKey; params.AnimalKey = PetID; params.Filename = "moo"; params.callback = callback; console.log(Username); console.log(SessionKey); console.log(PetID); options.params = params; var ft = new FileTransfer(); ft.upload(imageURI, encodeURI("http://redacted/UploadFileCollection"), win, fail, options); } However, both of these buttons don't load anything: HTML: From Camera From File JS: function capturePhotoWithData() { // Take picture using device camera and retrieve image as base64-encoded string navigator.camera.getPicture(uploadPhoto, onFail, { quality: 50 }); } function capturePhotoWithFile() { navigator.camera.getPicture(uploadPhoto, onFail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY }); }
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Loading either Camera or Gallery through phonegap
tagged with: cordova

http://stackoverflow.com/q/24665184
tagged with: nginx
has body: When serving static files in Node I am simply using fs.readFile and then throwing the data onto the response content. I am tempted to store the results of fs.readFile in a variable and then skip using fs.readFile when the file is requested a second time and just write the content out from the variable in memory. My questions: Are there any issues I could run into with this approach? Is there a better way? (a high level overview) How do servers like nginx and Apache cache files to serve to users?
tagged with: apache
has comment: http://stackoverflow.com/comment/38239015
tagged with: javascript
has answer: http://stackoverflow.com/a/24665267
has title: Is it smart to keep static files in memory in node js?
has comment: http://stackoverflow.com/comment/38238516
has comment: http://stackoverflow.com/comment/38238770
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: node.js
score: 2
tagged with: caching
type: Question

http://stackoverflow.com/a/24657373
answers question: http://stackoverflow.com/q/24656925
type: Answer
score: 0
has body: I believe what you are looking for is what is referred to in AngularJS as a service. Although AngularJS has built-in services such as $http, $compile, and $templateCache, AngularJS allows you to create your own custom services. Although you mention in your question that you don't feel a service is where a controller's logical manipulation should take place, I don't think it's a problem if you plan on using the same exact logical manipulation across multiple controllers. Perhaps someone more knowledgeable can comment on whether or not my approach is the "Angular Way" or not. See the example below: app.js: var app = angular.module('app', []); app.service('sharedProperties', function() { return { getLargeImageCss: function(info, ratio) { if(info.products[0].product_image_height / info.products[0].product_image_width &gt; ratio) { return 'large-image'; } else { return ''; } }, getSectionType: function(info, ratio) { if(info.products[0].product_image_height / info.products[0].product_image_width &gt; ratio) { return 'vertical_section'; } else { return 'horizontal_section'; } } }; }); controllers.js: app.controller('controller1', ['$scope', 'sharedProperties', function($scope, sharedProperties) { $scope.largeImageCss = sharedProperties.getLargeImageCss(gameInfo, imageRatio); $scope.sectionType = sharedProperties.getSectionType(gameInfo, imageRatio); }]); app.controller('controller2', ['$scope', 'sharedProperties', function($scope, sharedProperties) { $scope.largeImageCss = sharedProperties.getLargeImageCss(gameInfo, imageRatio); $scope.sectionType = sharedProperties.getSectionType(gameInfo, imageRatio); }]); To make the above code even more concise, since the same condition is used in both of the service's functions, you group the getLargeImageCss and getSectionType functions into one getImageInfo function that returns both the largeImageCss and sectionType within one object.

http://stackoverflow.com/comment/38119644
has text: haha as im trying to find out how to post html code on this site, you answer my question, thanks
type: Comment
comment on: http://stackoverflow.com/a/24602504
score: 0
type: AnswerComment

wijmo
type: Tag
tag name: wijmo
tags question: http://stackoverflow.com/q/24609084

http://stackoverflow.com/comment/38211415
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24650295
has text: The background color of the text-box will change if i enter anything other then aplhabets and click submit button but the background color will go off in a flash. I need the background to stay for some amount of time
score: 0

http://stackoverflow.com/comment/38334316
comment on: http://stackoverflow.com/q/24716186
score: 0
has text: it's possible jQuery is stopping event propagation through that click event handler. Can you try removing the already existing handler and just attach your own, as a test? [this](http://css-tricks.com/dangers-stopping-event-propagation/) might be relevant.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24695266
has title: Which method should i use out of this(.attr() vs .prop()) for performance and usage?
answer count: 3
tagged with: asp.net
favorite count: 0
linked to: http://stackoverflow.com/q/10978870
score: -1
has comment: http://stackoverflow.com/comment/38294134
tagged with: attr
possible better answer: http://stackoverflow.com/a/24695364
upvote count: 2
has answer: http://stackoverflow.com/a/24695364
tagged with: prop
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24695544
has comment: http://stackoverflow.com/comment/38453865
has body: $(selector).click(function(){ //instead of: this.getAttribute('style'); //do i use: $(this).prop('style'); //or: $(this).attr('style');}) I've worked on this and put my solution on below "fiddle". Pls Check it... See this fiddle: http://jsfiddle.net/maniator/JpUF2/ Hope this would be helpful...
has answer: http://stackoverflow.com/a/24695545
downvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/24695545
has comment: http://stackoverflow.com/comment/38293827
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/13247058
has comment: http://stackoverflow.com/comment/38293670

http://stackoverflow.com/q/24716429
has comment: http://stackoverflow.com/comment/38335302
type: Question
score: 0
has body: I have a set of JSON data that I'm trying to reformat to follow the javascript object model depicted on 'Timeline JS'. This is the original JSON data which is stored in the variable "messages": { "user_id": 1, "subject_line": "Timeam feugiat invidunt", "type": "feugiat", "date": "2014,07,5", "message": "Butcher letterpress et tousled ea. Id do artisan" }, { "user_id": 1, "subject_line": "RE: Timeam feugiat invidunt", "type": "feugiat", "date": "2014,07,7", "message": "Butcher letterpress et tousled ea." } The JSON data would need to be reformatted into the following Javascript object syntax: timeline: { headline: "User 1", // messages.user_id type: "default", text: "tousled", date: [{ startDate: "2014,07,5", //messages.date headline: "Timeam feugiat invidunt" //messages.subject_line }, { startDate: "2014,07,7", headline: "RE: Timeam feugiat invidunt" }] } This is my current code: function(){ var messagesData; // API data fetched and stored in 'messages' messages.each(function(data){ data = data.toJSON(); messagesData = { timeline: { headline: "User " + data.user_id, type: "default", text: "tousled", date: [{ startDate: data.date, headline: data.subject_line }] } } }); } However the data I'm getting back only returns one set of the 'date' array (which is the last date and subject line of the JSON data): timeline: { headline: "User 1", type: "default", text: "tousled", date: [{ startDate: "2014,07,7", headline: "RE: Timeam feugiat invidunt" }] } How would you loop through the JSON data so it'll return all given set of date and subject line?
answer count: 1
has comment: http://stackoverflow.com/comment/38335344
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/38335071
has title: Reformatting JSON data into a Javascript Object
has comment: http://stackoverflow.com/comment/38334788
has answer: http://stackoverflow.com/a/24716930
has comment: http://stackoverflow.com/comment/38335073
has comment: http://stackoverflow.com/comment/38335077
has comment: http://stackoverflow.com/comment/38335011
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24716930
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/24609729
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/38139842
upvote count: 0
has body: Enable CORS on your Node.js Here is an URL hot to do it for several configurations http://enable-cors.org/server.html
answers question: http://stackoverflow.com/q/24609526
score: -1
has comment: http://stackoverflow.com/comment/38133163

http://stackoverflow.com/comment/38315806
type: Comment
comment on: http://stackoverflow.com/a/24706483
type: AnswerComment
score: 0
has text: I thought jQuery versions could be the problem. I still don't see what is that you refer to as "smooth scroll". Exact time in video could help.

http://stackoverflow.com/comment/38243588
comment on: http://stackoverflow.com/q/24666387
has text: When I did this I created a reset method as you have done.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24723849
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/24723800
has body: You need to stop the propagation of the click event on the close button, otherwise you are clicking close, and then immediately re-opening the div. Try this: $("div.first").click(function() { $("div.second").addClass('hide'); $(this).find("div.second").removeClass('hide'); }); $("div.close").click(function(e) { e.stopPropagation(); $(this).closest('.second').addClass('hide'); }); Updated fiddle
answers question: http://stackoverflow.com/q/24723800
upvote count: 3

http://stackoverflow.com/comment/38270982
has text: write a public method in the code behind that changes the backslashes to forward slashes. Call that method and pass your data to it.
comment on: http://stackoverflow.com/q/24682680
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24596343
downvote count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/38107308
type: Answer
score: 8
accepted answer of: http://stackoverflow.com/q/24596286
has body: Using jQuery: $('.reportnavigation').contents().filter(function() { return this.nodeType === 3 &amp;&amp; $.trim(this.nodeValue) === '|'; }).remove();
answers question: http://stackoverflow.com/q/24596286
type: AcceptedAnswer

http://stackoverflow.com/comment/38117094
type: AnswerComment
score: 0
type: Comment
has text: Did you check the demo I linked? Your code works fine after my fix, it creates divs with id photoContent1, phontoContent2, and so on. the `.css` is the problem because you comment out the right parenthesis. I'm sure your developer tools console will tell you the same.
comment on: http://stackoverflow.com/a/24601285

http://stackoverflow.com/a/24601766
has comment: http://stackoverflow.com/comment/38118556
has comment: http://stackoverflow.com/comment/38122495
has body: In the for loop solution, you are setting tabSelector multiple times like so: var tabSelector = ".tabs a:nth-child("+tabNumber+") span"; This selector is, in the end, going to be set to the last tabNumber, which is always going to be called when you make a reference to it: $(tabSelector).addClass("active"); To avoid that, replace it by this, which will be different for each of them: $(this).addClass("active"); JS Fiddle Demo
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24601428
has comment: http://stackoverflow.com/comment/38151213
type: Answer
answers question: http://stackoverflow.com/q/24601428

http://stackoverflow.com/comment/38166642
type: QuestionComment
has text: @ParagGangil I dont want to remove the stuff of a site. I just want to hide it then display it after my code runs.
score: 0
comment on: http://stackoverflow.com/q/24626809
type: Comment

http://stackoverflow.com/q/24679495
has comment: http://stackoverflow.com/comment/38265762
tagged with: function
accepted answer: http://stackoverflow.com/a/24679563
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38264878
tagged with: checkbox
tagged with: parameters
has body: The on click event that I add to an input in javascript isn't working in the proper manner. My code so far looks like so: function order(option) { if(option.checked) { document.getElementId("col_order").value = document.getElementById("col_order").value + " " + option.value; } } ...//somewhere further down for(var i = 0; i < options.length; i++) { var check = document.createElement("input"); var label = document.createElement("label"); var description = document.createTextNode(options[i]); check.type = "checkbox"; check.name = "order_list[]"; check.value = options[i]; check.onclick = "order(check)"; //Problem here label.appendChild(check); label.appendChild(description); element.appendChild(label); } I have also tried: check.onclick = (function() { var option = check; return function() {order(option);}})(); The problem that I am having is the check.onlick line of code. When I add this with normal HTML: randVal I don't have any problem whatsoever; the method executes with the intended results. Any thoughts? Let me clarify: I make it to the order function just fine, but I never get into the if statement, even though the checkbox was just clicked
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38264695
has answer: http://stackoverflow.com/a/24679563
possible better answer: http://stackoverflow.com/a/24679558
type: Question
has answer: http://stackoverflow.com/a/24679558
has comment: http://stackoverflow.com/comment/38264899
has title: Passing One's Self to OnClick Event JavaScript
has comment: http://stackoverflow.com/comment/38264698
linked to: http://stackoverflow.com/q/4471401
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/q/24719807
has title: Jquery .closest() but how do i unset it on click elsewere?
type: Question
has body: Gday Guys, This is probably an elementary answer but i'm struggling to find the answer anywhere. So i'm using the contenteditable on an tag to edit and create content on a page i have, and i have removed any borders by the browser. So instead i'm using jquery to change the background of the &lt;li&gt; once my &lt;a&gt; tag is selected to be edited to show the user what is being used. Problem is i can set it using jquery on focus no problem. but once i move on to the next editable tag i'm not sure how to unset the background back to white on the last &lt;li&gt;? Here the jquery im using to set it, any ideas? $( ".list-result-edit" ).focus(function() { $(this).closest(".detail-list li").css("background-color", "rgb(203, 255, 207)"); });
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38341610
has answer: http://stackoverflow.com/a/24719888
has comment: http://stackoverflow.com/comment/38341596
has comment: http://stackoverflow.com/comment/38341560
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/24719888
tagged with: css
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/a/24615356
accepted answer of: http://stackoverflow.com/q/24615272
score: 0
has comment: http://stackoverflow.com/comment/38145066
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/38144453
has body: your using a style tag instead of a link tag to load your css file. Learing angular
has comment: http://stackoverflow.com/comment/38144353
type: Answer
answers question: http://stackoverflow.com/q/24615272

http://stackoverflow.com/comment/38100964
type: Comment
comment on: http://stackoverflow.com/a/24592793
has text: so if i skip that part and write noteData.uploader = value; and so on then it should work right? but it is not apparently. I did try both the ways in chrome console and both worked fine, doesn't matter if i use data = noteData
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38210749
has text: Do you mean that center points ovelaprs, and you cannot "hover" on top black point?
comment on: http://stackoverflow.com/q/24644938
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/24653712
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/24700741
has comment: http://stackoverflow.com/comment/38300164
tagged with: php
has comment: http://stackoverflow.com/comment/38306146
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/38309408
downvote count: 0
linked to: http://stackoverflow.com/q/1623242
has comment: http://stackoverflow.com/comment/38300227
has comment: http://stackoverflow.com/comment/38305740
linked to: http://stackoverflow.com/q/2857113
type: Question
has body: Core issue: I'm trying to grab an SVG-Inline-Object with JavaScript and send it to the Server where the output represents the given SVG-Object. All works fine in Chrome & FF but IE (>= 9) cuts the given string of the SVG-Object anywhere, so the string sent to the server is not complete that ends up in an error. My current process: html (expect a correctly generated svg-object here - works fine) export javascript (triggered by click on the "export"-Link) var $svg = $(this).parent().find("svg"); // works fine var s = new XMLSerializer(); var svgContent = s.serializeToString($svg[0]); $.post("/Results/saveSVG/", // saveSVG => store SVG-Data in Session { "svg" : svgContent }).done(function(data) { window.open("/Results/getSVG/svg.php"); }); /Results/saveSVG/ (a PHP-File) $_SESSION["svg"] = $_POST["svg"]; // similar to something like this (works fine) svg.php (works like a charm in Chrome / FF header("Content-type: image/svg+xml"); echo $_SESSION["svg"]; exit; What happens in Chrome / FF? svgContent-variable: ... svgContent-variable received by the server (/Results/saveSVG/) output on /Results/getSVG/svg.php is a perfect SVG-File What happens in IE? svgContent-variable is cropped somewhere: .. invalid svgContent-variable received by the server (/Results/saveSVG/) output on /Results/getSVG/svg.php does not render Debug-Information in IE svgContent-variable: (Javascript) <rect fill="none" stroke="none" stroke-width="0" x="0" y="0" width="263" height="300" rx="0" ry="0" /> <path opacity="0.8" fill="none" stroke="#1498e7" stroke-width="1" d="M 0 0 L 1 1" /><path opacity="0.8" fill="none" stroke="#1498e7" stroke-width="1" d="M 5 5 L 6 6" /><path fill="none" stroke="#1498e7" stroke-width="2" d="M 0 6 L 6 0" /> <path opacity="0.8" fill="none" stroke="#7bc940" stroke-width="1" d="M 0 0 L 1 1" /><path opacity="0.8" fill="none" stroke="#7bc940" stroke-width="1" d="M 5 5 L 6 6" /><path fill="none" stroke="#7bc940" stroke-width="2" d="M 0 6 L 6 0" /> <path opacity="0.8" fill="none" …
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/38300210
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24699107
upvote count: 2
answer count: 2
has title: Export inline svg-object (IE issue)
has comment: http://stackoverflow.com/comment/38302718
has comment: http://stackoverflow.com/comment/38300040
possible better answer: http://stackoverflow.com/a/24700741
favorite count: 0
has answer: http://stackoverflow.com/a/24699107

http://stackoverflow.com/comment/38238929
type: Comment
has text: I would love to Gary but unfortunately it's against company policy to show our source code. Hence why everything that has "some" information has been stripped out to the bare bones. I think as much as I absolutely hate it I'll just have a terrible disgusting long set of if/else statements.
comment on: http://stackoverflow.com/q/24659287
score: 0
type: QuestionComment

http://stackoverflow.com/q/24693210
has answer: http://stackoverflow.com/a/24693280
has body: There is a textbox where I want to enter only numbers and on entering the 6th number I want to call a code behind method by clicking client side hidden button's onclick event (server side ) in which I want to do some operation. The problem I am facing is that when run the below code sample when I enter any number in the text box only the first method AllowNumericOnly() is called not the second method callMethod() is called even after the first method returns true value. Why, I can't understand? &lt;script type="text/javascript"&gt; function callMethod() { alert('1'); var PinCodeValue=document.getElementById('txtTest').value; var Pincodelength = PinCodeValue.length; if(Pincodelength&gt;4) { alert('Pincodelength&gt;4'); document.getElementById('Button1').click(); return true; } return false; } function AllowNumericOnly(e, t) { try { if (window.event) { var charCode = window.event.keyCode; } else if (e) { var charCode = e.which; } else { return true; } if ((charCode &gt; 47 &amp;&amp; charCode &lt; 58) || charCode == 8 || charCode == 0) { alert('true'); return true; } else { alert('false'); return false; } } catch (err) { alert(err.Description); } } &lt;/script&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:TextBox ID="txtTest" runat="server" MaxLength="7" onkeypress="return AllowNumericOnly(event,this); callMethod();" AutoPostBack="true"&gt;&lt;/asp:TextBox&gt; &lt;asp:Button ID="Button1" runat="server" Text="Button" Style="display: none" OnClientClick="alert1();" OnClick="Button1_Click" /&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt;
answer count: 3
score: 1
has answer: http://stackoverflow.com/a/24693267
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38289969
has comment: http://stackoverflow.com/comment/38290121
upvote count: 1
has answer: http://stackoverflow.com/a/24693356
has title: How to call two functions in javascript from onchange event
type: Question
tagged with: c#
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24623830
has body: http://api.jquery.com/load/ This is what you are missing .load() sets the HTML contents of the matched element to the returned data. This means that most uses of the method can be quite simple: This could be shorted document.getElementById('totalholder').value = total; to $('#totalholder').val(total); but, imagine this in its own script tag outside of the load function &lt;script type="text/javascript" &gt; return (&lt;?php $total; ?&gt;); &lt;/script&gt; so you are just returning total to thin air. you could do &lt;script type="text/javascript" &gt; alert(&lt;?php $total; ?&gt;); &lt;/script&gt; but something like this is what you want &lt;script type="text/javascript" &gt; $('#totalholder').val(&lt;?php $total; ?&gt;); &lt;/script&gt; assuming you had an element #totalholder UPDATE: What I would do then is set the total in an element in the returned html, skip the JavaScript in the returned html, and then access it from the call back, If a "complete" callback is provided, it is executed after post-processing and HTML insertion has been performed. The callback is fired once for each element in the jQuery collection, and this is set to each DOM element in turn. so somtehing like this in the returned html. &lt;input type="hidden" id="total" value="&lt;?php echo $total; ?&gt;"/&gt; and in the callback $("#sub"+id).load('subtotal.php?qty='+qty+'&amp;cartid='+id, function () { /*The callback is fired once for each element in the jQuery collection, and this is set to each DOM element in turn.*/ if($(this).prop('id') == 'total'){ var total = $(this).val(); } }); Just as a note, I don't usually use .load() and stick mainly to $.post, $.get etc..
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38161467
answers question: http://stackoverflow.com/q/24623697
type: Answer
accepted answer of: http://stackoverflow.com/q/24623697

http://stackoverflow.com/comment/38266285
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24680290
type: Comment
has text: Agreed it is a pain but i am bound by it. And adding a step to the user workflow of zipping prior to upload is not an option either. There must be a way to get this file server side.

http://stackoverflow.com/comment/38209651
type: Comment
has text: try using `ng-change` instead of `ng-click`.If it still doesn't work plz provide a jsfiddle of you code
comment on: http://stackoverflow.com/q/24649705
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38220469
type: Comment
comment on: http://stackoverflow.com/a/24655404
has text: You could pass it back to the server via web-service.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38389785
has text: Yes there is, what have you tried so far?
comment on: http://stackoverflow.com/q/24745272
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24612195
answers question: http://stackoverflow.com/q/24612124
has comment: http://stackoverflow.com/comment/38138750
has comment: http://stackoverflow.com/comment/38139513
has comment: http://stackoverflow.com/comment/38138046
has comment: http://stackoverflow.com/comment/38138388
has comment: http://stackoverflow.com/comment/38138096
score: 0
has comment: http://stackoverflow.com/comment/38139154
type: Answer
has comment: http://stackoverflow.com/comment/38138528
has comment: http://stackoverflow.com/comment/38138231
has body: There's a couple reasons I know of that you will not be able to bind to a certain port. The first is that something has already bound to that port. To see whether this is the case or not, try using netstat: $ netstat -anl The other reason you might not be able to bind to a port is that you must be root to bind to what's referred to as "privileged ports". For more on that, read this: Is there a way for non-root processes to bind to "privileged" ports on Linux?
has comment: http://stackoverflow.com/comment/38138166

http://stackoverflow.com/a/25132601
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/50003564
score: 25
has body: To create the self reference Item.hasMany(Item, {as: 'Subitems'}) To find subitems using include Item.find({where:{name: "Coffee"},include:[{model: Item, as: 'Subitems'}]}) See the Sample code below, var Sequelize = require('sequelize') , sequelize = new Sequelize("test", "root", "root", {logging: false}) , Item = sequelize.define('Item', { name: Sequelize.STRING }) Item.hasMany(Item, {as: 'Subitems'}) var chainer = new Sequelize.Utils.QueryChainer , item = Item.build({ name: 'Coffee' }) , subitem1 = Item.build({ name: 'Flat White' }) , subitem2 = Item.build({ name: 'Latte' }) sequelize.sync({force:true}).on('success', function() { chainer .add(item.save()) .add(subitem1.save()) .add(subitem2.save()) chainer.run().on('success', function() { item.setSubitems([subitem1, subitem2]).on('success', function() { /* One way item.getSubitems().on('success', function(subitems) { console.log("subitems: " + subitems.map(function(subitem) { return subitem.name })) }) */ //The include way you asked Item.find({where:{name: "Coffee"},include:[{model: Item, as: 'Subitems'}]}).success(function(item) { console.log("item:" + JSON.stringify(item)); }) }) }).on('failure', function(err) { console.log(err) }) }) And the log data is below: item:{"id":1,"name":"Coffee","createdAt":"2014-08-05T06:25:47.000Z","updatedAt":"2014-08-05T06:25:47.000Z","ItemId":null,"subitems":[{"id":2,"name":"Flat White","createdAt":"2014-08-05T06:25:47.000Z","updatedAt":"2014-08-05T06:25:47.000Z","ItemId":1},{"id":3,"name":"Latte","createdAt":"2014-08-05T06:25:47.000Z","updatedAt":"2014-08-05T06:25:47.000Z","ItemId":1}]}
upvote count: 25
has comment: http://stackoverflow.com/comment/118974444
answers question: http://stackoverflow.com/q/24747652
has comment: http://stackoverflow.com/comment/117726098

http://stackoverflow.com/comment/38162900
score: 0
has text: not exactly what i want.Could you give an example of a comprehensive
comment on: http://stackoverflow.com/q/24624561
type: Comment
type: QuestionComment

laravel-4
tags question: http://stackoverflow.com/q/24641494
tags question: http://stackoverflow.com/q/24715480
tag name: laravel-4
tags question: http://stackoverflow.com/q/24675555
tags question: http://stackoverflow.com/q/24646970
tags question: http://stackoverflow.com/q/24741144
type: Tag
tags question: http://stackoverflow.com/q/24601642

http://stackoverflow.com/q/24599332
has comment: http://stackoverflow.com/comment/38112871
accepted answer: http://stackoverflow.com/a/24599344
answer count: 2
tagged with: javascript
tagged with: ajax
possible better answer: http://stackoverflow.com/a/24599368
score: 0
has answer: http://stackoverflow.com/a/24599368
type: AnsweredQuestion
has title: javascript callback function, onreadystatechange, in a simple ajax example
has body: I'm doing this tutorial in ajax and I don't understand one of the lines where a function is called. (line 6 in the code) // this is called from an onload event in the html body tag function process() { if (xmlHttp) { try { xmlHttp.open("GET", "hello.txt", true); xmlHttp.onreadystatechange = handleServerResponse; ***** THIS LINE HERE xmlHttp.send(null); } catch(e) { alert(e.toString()); } }; } handleServerResponse = function() { theD = document.getElementById('theD'); if (xmlHttp.readyState == 1) { theD.innerHTML += "Status 1: server connectino established &lt;br /&gt;"; } else if (xmlHttp.readyState == 2) { theD.innerHTML += "Status 2: request recieved &lt;br /&gt;"; } else if (xmlHttp.readyState == 3) { theD.innerHTML += "Status 3: server processing task &lt;br /&gt;"; } else if (xmlHttp.readyState == 4) { if (xmlHttp.status == 200) { try { text = xmlHttp.responseText; theD.innerHTML += 'status 4: request completed, response delievered.'; theD.innerHTML += '&lt;br /&gt;' + text; } catch(e) { } } else { alert("request cannont be completed by server (status 4)"); }; }; } why wouldn't I call it with parenthesis? like: xmlHttp.onreadystatechange = handleServerResponse(); when I do this it only seems to call the function once as it only prints out status 2. without the brackets though, when the function is declared as variable it seems to be called each time the state changes. why is this? Also, why does the xmlHttp.onreadystatechange property execute more than once? the body tag should only be loaded once, thereby calling the function only once. why is it looping? I'm definitely missing something, either with the ajax related objects or javascript function calling. apart from the answer below, here is a good explanation of the "true" and "null" parameters in the process function: http://www.w3schools.com/ajax/ajax_xmlhttprequest_send.asp
has answer: http://stackoverflow.com/a/24599344
type: Question

http://stackoverflow.com/q/24628421
has title: Broken link - "/a" in JQuery 1.9 Js file
has comment: http://stackoverflow.com/comment/38169898
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24628683
has answer: http://stackoverflow.com/a/24628683
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38169588
has comment: http://stackoverflow.com/comment/38169840
has comment: http://stackoverflow.com/comment/38170040
has body: When we had done security audit of our project, we got broken Link "/a" vulnerability. After searching for link throughout project we found link in JQuery-1.9.js java-script file that we are using in our project. small part of code in that JQuery-1.9.js - // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: a.getAttribute("href") === "/a", As per my understanding this code part helps for making it(JQuery) compatible with IE 6/7/8. hrefNormalized is used to check that anchor tag is giving href value as full URL or exact href , which is issue in IE version. The better explanation of this part is given in https://www.inkling.com/read/jquery-cookbook-cody-lindley-1st/chapter-4/recipe-4-1 I want to remove this vulnerability but i don't want to remove or change code in JQuery js file. So, My question is why did not JQuery designers used "/#" instead of "/a" .What is the problem of using "/#" in that code. Earlier same question is asked by someone to JQuery Team,but they told that it not the problem from Jquery. For reference of that ticket http://bugs.jquery.com/ticket/10149 Help me to solve Or Is there another solution? Thank you
has comment: http://stackoverflow.com/comment/38170179
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24628930
tagged with: broken-links
has comment: http://stackoverflow.com/comment/38171892
has comment: http://stackoverflow.com/comment/38170507
accepted answer: http://stackoverflow.com/a/24628930
has comment: http://stackoverflow.com/comment/38170129
upvote count: 2
has comment: http://stackoverflow.com/comment/38169970
score: 1
has comment: http://stackoverflow.com/comment/38170014
has comment: http://stackoverflow.com/comment/38169465
downvote count: 1
has comment: http://stackoverflow.com/comment/38169530
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38170100
has comment: http://stackoverflow.com/comment/38170735

http://stackoverflow.com/a/24629744
score: 0
answers question: http://stackoverflow.com/q/24627531
type: Answer
has body: Firstly , the click of your button does not take you back to the server , so you wont need to access the value of the text field using a scriptlet , you can do this in plain HTML and Javascript as follows : Hello World! Hello, Firstname: Enter

http://stackoverflow.com/a/24668922
downvote count: 0
has comment: http://stackoverflow.com/comment/38254100
type: Answer
has comment: http://stackoverflow.com/comment/38244795
has comment: http://stackoverflow.com/comment/38252087
score: 1
has body: You could emulate a ping via http however that is not very accurate. A simple way would be to post the current timespamp in ms or ns and wait then for the response of the same time. The difference between the real time and time of the response is the so called round trip time (RTT). If you divide it by two you get the response time what the ping is.
upvote count: 1
has comment: http://stackoverflow.com/comment/38244752
answers question: http://stackoverflow.com/q/24668875

http://stackoverflow.com/a/24592020
downvote count: 0
score: 1
has body: As you don't use jQuery and your question is about javascript, i've changed some things to do what you want easily. Also, the id should be unique while classes don't need to be unique. As you have ids with the same values that creates a problem, also as you stated, you don't store your original value, and this is your main problem. There are many methods for this but i prefer this as it's easy to understand i guess. $n = array(); echo " "; while($row2 = mysql_fetch_assoc($result2)){ echo " "; echo " ".$row2['item_no']." "; echo " "; echo " "; for($i=0;$i<$num;$i++){ echo " "; echo " "; echo " "; } echo " "; } echo " "; With the html5, you can define custom tags with the data- prefix, and you can reach them with getAttribute method for that object. ps: your item_no's must be unique in this example.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38107553
accepted answer of: http://stackoverflow.com/q/24591588
type: Answer
has comment: http://stackoverflow.com/comment/38107880
answers question: http://stackoverflow.com/q/24591588

http://stackoverflow.com/comment/38231788
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24661464
has text: @Kyle just tried it, it does not work
score: 0

http://stackoverflow.com/a/24632075
type: Answer
answers question: http://stackoverflow.com/q/24631917
has body: You have to pass the argument to your function &lt;a onClick="deleteProduct(&lt;?echo $id_to_delete;?&gt;)"...&gt;&lt;/a&gt; In script &lt;script type="text/javascript"&gt; function deleteProduct(id){ $.post("delete.php", {id: id}); return false; } &lt;/script&gt; write the query in the delete page mysql_query("DELETE FROM bim_cart WHERE coupon_id = '{$_GET['delete']}' AND session_code = '{$_SESSION['code']}'");
score: 0

http://stackoverflow.com/comment/56648653
type: Comment
has text: No it isn't! Please read the question carefully.
comment on: http://stackoverflow.com/q/24647749
score: 0
type: QuestionComment

http://stackoverflow.com/q/24599843
type: Question
possible better answer: http://stackoverflow.com/a/24599909
has comment: http://stackoverflow.com/comment/38113909
score: 1
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/38114352
has answer: http://stackoverflow.com/a/24600129
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/24600129
has title: Node- Can't attach key/value to object
has body: Using Node. This is weird, I am not able to attach a key/value....broadcastStamp = date to the object result. I verified with typeof it is a object. There is no error...the key/value is just simply not there. function broadcastSingleClient(result, event, httpObject) { var date = new Date().valueOf(); result.broadcastStamp = date; console.log(result); UPDATE: This object is coming from a mongoose/mongodb query call back function: Object.keys(models).forEach(function (model) { models[model].find({}).sort({_id: -1}).limit(1).exec( function (err, result){ broadcastSingleClient(result[0], model+"Result", res); }); When doing this query in the shell without the exec() call back, I am able to attach to the object.
has comment: http://stackoverflow.com/comment/38114038
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38114182
has answer: http://stackoverflow.com/a/24599909
upvote count: 1
has comment: http://stackoverflow.com/comment/38114390

http://stackoverflow.com/q/24693589
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/24697968
has title: How to use $q to return a value of an http request Async (using typescript)
tagged with: typescript
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24697968
tagged with: http://stackoverflow.com/tag/q
linked to: http://stackoverflow.com/q/23567430
has body: I have been trying to just set up a simple promise async structure to return the json returned object from an http request and I can't find any good examples of one. I am sure I am doing something horribly wrong, but I can't wrap my head around it. Here is what I am trying: getjsonObjAsync(): any { var deferred: ng.IDeferred&lt;any&gt; = this.$q.defer(); $.ajax({ url: AppSettings.jsonObjUrl, type: 'get', }) .then((result) =&gt; { deferred.resolve(result); }) return deferred.promise; } When I call this method, it returns Object {then: function, catch: function, finally: function} catch: function (callback) { finally: function (callback) { then: function (callback, errback, progressback) { __proto__: Object But I want it to return the json object I get from the http request, that I can see if I add a console.log(result) here: }) .then((result) =&gt; { console.log(result) deferred.resolve(result); }) It seems like I am incorrectly using the $q system, but I can't figure out the right way to return the json object. I tried to follow the example here: https://stackoverflow.com/a/23572025/3757782 but it still fails to return the json object from the reqest Thank you!
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/24693685
score: 1
has answer: http://stackoverflow.com/a/24693685
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/24730388
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38393032
has comment: http://stackoverflow.com/comment/38362126
has comment: http://stackoverflow.com/comment/38362154
score: 1
tagged with: java
tagged with: pi
has title: Find words from a sequence of random letters?
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/24734382
accepted answer: http://stackoverflow.com/a/24734382
tagged with: algorithm
answer count: 1
tagged with: javascript
has body: I'm working on a project where I first translated the digits of 'pi' to english letters by assigning each number to a letter (a=0, b=1, etc). I converted 10,000 digits of Pi which gave me these 8700 letters to work with. The second step involves finding meaningful words from this generated letter sequence. I was wondering if anyone has ever worked on such a project? Can somebody post an algorithm or a linear code that will help me easily find the words of the random sequence? If not the code directly, could anyone show me a workaround of an easier approach to finding the words? This link has all the letters from an English dictionary listed for easier selection. EDIT: I'm sorry I didnt mention how the code works. The java code takes two numbers into consideration and assigns it a character (eg. o=14) since letters after 9 wont be assigned. If the number is above 25, 2 and 5 are considered separately. For example, 2526 would be z(25), b(2) and g(6) since 26 is split into 2 &amp; 6.
favorite count: 0
has comment: http://stackoverflow.com/comment/38363039
tagged with: python
downvote count: 1

http://stackoverflow.com/a/24721175
has comment: http://stackoverflow.com/comment/38344189
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/24721168
accepted answer of: http://stackoverflow.com/q/24721168
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38344217
type: Answer
has body: You have to call the function. alert(asd.pPos()); Alerting the function itself will implicitly call toString() on it.

http://stackoverflow.com/comment/38136815
type: Comment
type: QuestionComment
has text: there is a image delay a small jumping while sliding
comment on: http://stackoverflow.com/q/24611458
score: 0

http://stackoverflow.com/comment/38129205
has text: You should never write javascript with php, that's a nonsense, even if it's possible and that many people do it.
comment on: http://stackoverflow.com/q/24606364
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38127966
has text: Hi Updated the code and the fiddle please find that in the answer. Gave two options
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24605354
type: AnswerComment

http://stackoverflow.com/comment/38279914
comment on: http://stackoverflow.com/a/24687420
score: 0
type: AnswerComment
has text: You can even add on the \w+ to the beginning to get the full word. string.match(/\w+[A-Z]\b/g)
type: Comment

http://stackoverflow.com/comment/39538605
comment on: http://stackoverflow.com/q/24722357
score: 0
type: Comment
type: QuestionComment
has text: i know this is old but is it possible that `metalsmith.build(` re-executed this plugin? Its hard to tell without the appropriate line numbers.

http://stackoverflow.com/a/24603036
downvote count: 0
has comment: http://stackoverflow.com/comment/38121664
has comment: http://stackoverflow.com/comment/38121255
has comment: http://stackoverflow.com/comment/38121722
has comment: http://stackoverflow.com/comment/38121488
has comment: http://stackoverflow.com/comment/38121530
has body: Try this: html { overflow-x: hidden; width: 100%; } body { overflow-x: hidden; width: 100% } I believe overflow-x: hidden; will only stop the particular element that it is applied to from scrolling, so outer-more elements can still cause the window to scroll. Applying it to html and body should prevent anything which exceeds the width and height of window from causing the window to scroll. Adding width: 100%; will force the html and body tags to be exactly 100% the width of the window. But in your example that's not the problem. For some reason the &lt;div class="container"&gt; sometimes displays another set of scrollbars just for the container and the scrollbars appearing and disappearing is what causes the container's movement. You can fix it by adding to following: /* overflow: hidden; stops the second set of scrollbars */ /* I increased the width by 300px and added 150px padding on either side. This stopped the grey background from disappearing when the pie chart rotated. */ .container { overflow: hidden; width: 930px; padding-left: 150px; padding-right: 150px; }
has comment: http://stackoverflow.com/comment/38121700
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/38121193
has comment: http://stackoverflow.com/comment/38121211
has comment: http://stackoverflow.com/comment/38121603
has comment: http://stackoverflow.com/comment/38121437
answers question: http://stackoverflow.com/q/24602998
has comment: http://stackoverflow.com/comment/38121507
has comment: http://stackoverflow.com/comment/38121605
score: 4
has comment: http://stackoverflow.com/comment/38121412

http://stackoverflow.com/comment/38097264
type: QuestionComment
comment on: http://stackoverflow.com/q/24590841
score: 0
has text: best suggestion is throw out what you have and start over. Use a browser console/ developer tools to look at the most obvious errors thrown
type: Comment

deserialization
type: Tag
tags question: http://stackoverflow.com/q/24678534
tag name: deserialization
tags question: http://stackoverflow.com/q/24711887

http://stackoverflow.com/a/24611096
has comment: http://stackoverflow.com/comment/38183988
answers question: http://stackoverflow.com/q/24610694
score: 38
has comment: http://stackoverflow.com/comment/38148737
has comment: http://stackoverflow.com/comment/38169419
upvote count: 38
type: Answer
has body: after doing some more research i got the solution for this. i have changed this var csvData ='data:application/csv;charset=utf-8,' + encodeURIComponent(dumpd); $(this) .attr({ 'download': filename, 'href': csvData, 'target': '_blank' }); To var csvData = new Blob([dumpd], { type: 'text/csv' }); //new way var csvUrl = URL.createObjectURL(csvData); $(this) .attr({ 'download': filename, 'href': csvUrl }); and it worked fine. it seems chrome has changed something in new version. Hope it may help others.
accepted answer of: http://stackoverflow.com/q/24610694
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24634612
type: Question
has title: Jquery not working inside of .net project
score: 1
has answer: http://stackoverflow.com/a/24634665
has comment: http://stackoverflow.com/comment/38181028
has comment: http://stackoverflow.com/comment/38182417
has body: I have this script referenced inside my main.master file: and inside of my Web User Control I have this jquery but it isnt working, i cant really see where there would be a problem. My code works just fine inside of jsfiddle: EDIT My jquery is referenced near the bottom of my master page above the closing body tag.
has comment: http://stackoverflow.com/comment/38180910
linked to: http://stackoverflow.com/q/2706290
downvote count: 0
tagged with: .net
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38183020
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/38180950
accepted answer: http://stackoverflow.com/a/24634665
has comment: http://stackoverflow.com/comment/38180913
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2626563
upvote count: 1

http://stackoverflow.com/comment/38357073
comment on: http://stackoverflow.com/q/24727796
has text: Does php send any error?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/24740462
has body: The second slideshow waits for the first slideshow to finish IN THIS FIDDLE Imagine if I have to have four slideshows in one page: slideshow one, slideshow two, slideshow three, and slideshow four. The wrapper of all of the slideshows have the same class and has no ID, and the slideshows are run with a same script: Actually, only one slideshow (the first) which is going to be shown in the page, while the rest are still hidden. If only the second link which refers to the second slideshow is clicked then the second slideshow will be shown in the page while at the same time the first slideshow will be hidden automatically. If the second slideshow is shown in a wrapper DIV by clicking its link soon after you load the page, the second slideshow is blank with no content. The problem of its blank is because the second slideshow is waiting for the first slideshow to finish in sliding all the contents inside it. Here is my html code: Here is the script that I use to run the all slideshows: var $el = $('.bigandsmall'), // SETUP //////// F = 600 , // Fade Time P = 5000 , // Pause Time C = 0 , // Counter / Start Slide# (0 based) /////////////////// $sl = $('.bigPicture > div'), $th = $('.smallPicture > img'), N = $sl.length, T = 10000; $sl.hide().eq(C).show(); $th.eq(C).addClass('on'); // ANIMATION function anim() { $sl.eq(C%N).stop(1).fadeTo(F,1).siblings().fadeTo(F,0); $th.removeClass('on').eq(C%N).addClass('on'); } // AUTO ANIMATE function autoAnim() { T = setTimeout(function() { C++; anim(); // Animate autoAnim(); // Prepare another iteration }, P+F); } autoAnim(); // Start loop // HOVER PAUSE $el.hover(function(e) { return e.type==='mouseenter'? clearTimeout( T ) : autoAnim(); }); // HOVER THUMBNAILS $th.on('mouseenter', function() { C = $th.index( this ); anim(); });
tagged with: slideshow
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38380763
answer count: 2
has title: The second slideshow waiting for the first slideshow to finish
upvote count: 0
tagged with: slider
possible better answer: http://stackoverflow.com/a/24745729
has answer: http://stackoverflow.com/a/24809362
has answer: http://stackoverflow.com/a/24745729
favorite count: 0
has comment: http://stackoverflow.com/comment/38381572
accepted answer: http://stackoverflow.com/a/24809362
downvote count: 2
has comment: http://stackoverflow.com/comment/38390202
tagged with: slidetoggle
type: AnsweredQuestion
type: Question
score: -2

http://stackoverflow.com/q/24701464
has title: Simulating Mouse Click on JavaScript Isn't Working (Google Chrome Extension)
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has body: I just started with Javascript, so it's all a bit confusing at this point. I apologize for my lack of knowledge on this topic, but this problem is really beginning to frustrate me. I am trying to simulate a click on the webpage youtube-mp3.org, but I just can't seem to get it to work. I've looked all over this forum trying different snippets and other sites, but with no luck. manifest.json { "name": "Event Page Example", "description": "Demonstrates usage and features of the event page", "version": "1.0", "manifest_version": 2, "permissions": ["alarms", "tabs", "bookmarks", "declarativeWebRequest", "*://*/*", "http://*/*", "https://*/*"], "background": { "scripts": ["background.js"], "persistent": false }, "browser_action": { "default_icon" : "icon.png", "default_title": "Start Event Page" }, "content_scripts": [ { "js": ["myscript.js"] } ], "commands": { "open-google": { "description": "Open a tab to google.com", "suggested_key": { "default": "Ctrl+Shift+L" } }, "_execute_browser_action": { "suggested_key": { "default": "Ctrl+Shift+K" } } } } background.js // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Global variables only exist for the life of the page, so they get reset // each time the page is unloaded. var counter = 1; var youtubeURL = ""; var lastTabId = -1; function sendMessage() { chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { lastTabId = tabs[0].id; chrome.tabs.sendMessage(lastTabId, "Background page started."); }); } sendMessage(); chrome.browserAction.setBadgeText({text: "ON"}); console.log("Loaded."); chrome.runtime.onInstalled.addListener(function() { console.log("Installed."); // localStorage is persisted, so it's a good place to keep state that you // need to persist across page reloads. localStorage.counter = 1; // Register a webRequest rule to redirect bing to google. var wr = chrome.declarativeWebReq…
tagged with: google-chrome-extension
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/24717637

http://stackoverflow.com/a/24726539
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24726475
upvote count: 1
has body: One approach here is to create the element, then set the value on that element. These can be chained together something like: var libelle = "tes'te"; var id = 1; var toAdd = "&lt;input type='text' name='choix[" + id + "]' /&gt;"; // create the element, show and finally set the value (.val) $(toAdd).appendTo("#test").val(libelle); See The Fiddle Here
type: Answer

search-engine
type: Tag
tags question: http://stackoverflow.com/q/24735723
tag name: search-engine

http://stackoverflow.com/q/24602402
has title: Setting iframe window.location causing crash on Android 4.3 native browser (Chromium/WebKit)
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38598787
tagged with: webkit
linked to: http://stackoverflow.com/q/6102636
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/38423124
upvote count: 1
has body: I have some javascript which sets the window.location of an iframe to load another html page. For some reason this causes both the WebView and the native Android browser (Chromium) to crash in Android 4.3 and earlier. On Android 4.4 there are no issues. It is my understanding that on 4.3 and earlier Chromium is using the Webkit engine, and starting on 4.4 it is using a Chrome based engine. Is this a known WebKit/Chromium issue? Are there any work arounds? For what its worth, below are the log messages generated by CatLog when I replicate the issue in an emulator. Unfortunately, I don't think there is much to glean from it. 07-02 18:24:32.523: D/dalvikvm(750): GC_CONCURRENT freed 449K, 21% free 2467K/3092K, paused 15ms+2ms, total 910ms 07-02 18:24:32.613: W/ActivityManager(281): Unbind failed: could not find connection for android.os.BinderProxy@416c4788 07-02 18:24:39.824: E/ThrottleService(281): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory) 07-02 18:25:00.503: A/libc(1147): Fatal signal 11 (SIGSEGV) at 0x000002d8 (code=1), thread 1167 (WebViewCoreThre) 07-02 18:25:00.603: I/DEBUG(35): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 07-02 18:25:00.603: I/DEBUG(35): Build fingerprint: 'generic/sdk/generic:4.2.2/JB_MR1.1/576024:eng/test-keys' 07-02 18:25:00.603: I/DEBUG(35): Revision: '0' 07-02 18:25:00.613: I/DEBUG(35): pid: 1147, tid: 1167, name: UNKNOWN &gt;&gt;&gt; com.android.browser &lt;&lt;&lt; 07-02 18:25:00.613: I/DEBUG(35): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000002d8 07-02 18:25:00.843: I/DEBUG(35): r0 00000000 r1 56029299 r2 000000aa r3 00000000 07-02 18:25:00.843: I/DEBUG(35): r4 00000000 r5 4971d898 r6 2afe66e0 r7 50ea2d11 07-02 18:25:00.843: I/DEBUG(35): r8 00000000 r9 2e808091 sl 4835d6e3 fp 4971d8f0 07-02 18:25:00.843: I/DEBUG(35): ip 48855084 sp 4971d800 lr 4835d6ff…
has comment: http://stackoverflow.com/comment/38209259
tagged with: android-webview
score: 1
tagged with: iframe
type: Question

http://stackoverflow.com/comment/38216753
has text: Thanks Arun But, I get the success and Alert too, however the return View(); part does't work??
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24653655
score: 0

http://stackoverflow.com/q/24655969
has title: Unable to fetch dynamically added text
type: Question
has answer: http://stackoverflow.com/a/24656370
accepted answer: http://stackoverflow.com/a/24656370
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has body: I am having an issue with my jQuery code. I am unable to access the dynamically added element. I can access it if I refresh the page. I am working on a jQuery/HTML5 todo list application. In my code here, if you add an item and hit "mark as Done" (after hovering on the numbered button), the item is removed from the UI but not from the localStorage. The code is not able to locate the task content (JS line # 180). var remove_item_text = $(element).next().text(); // not fetching the text It goes as blank and it is not actually removed from the localStorage. If you refresh the page, the item shows up again. And now if you hit "mark as Done", the element is removed from the localStorage. Isnt that weird? What am I missing here? jsFiddle
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/38317506
score: 0
type: Comment
type: QuestionComment
has text: As the quality answers below hint, the way to see this is not that its an issue of understanding bitwise operations so much as understanding javascript type coercion.
comment on: http://stackoverflow.com/q/24707222

http://stackoverflow.com/comment/38555851
has text: So what would be an ideal way to execute 10 different actions on a page: A) have **casper.wait** commands between each? or B) have **casper.waitFor** ?
comment on: http://stackoverflow.com/a/24742462
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24633889
has comment: http://stackoverflow.com/comment/38209049
score: 0
tagged with: javascript
tagged with: jasmine
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/38204094
has comment: http://stackoverflow.com/comment/38207377
answer count: 0
duplicate of: http://stackoverflow.com/q/20555582
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38182800
has body: I've got this simple mapModule that works just fine: mapModule = function(canvasId){ var _canvas, _gmap, _geocoder, _markers = [], _mapOpts = { center: new google.maps.LatLng(51.919438, 19.14513599999998), zoom: 6 }; _init(); //private function _init(){ _canvas = document.getElementById(canvasId); _gmap = new google.maps.Map(_canvas, _mapOpts); //debug/convenience google.maps.event.addListener(_gmap, 'click', function(event) { console.log(event.latLng); }); } function _checkMarker(marker){ if(typeof marker != 'object' || marker === null) throw new Error('Marker is not an object') if(!marker.label) throw new Error("Marker has no label.") } function _rememberMarker(m){ if(!m){ throw new Error("Failed to add marker"); }else{ _markers.push(m); } } //public var addMarkerByLatLen = function(m){ _checkMarker(m); if(isNaN(m.lat) || isNaN(m.len)) throw new Error("Invalid position. Lat: "+m.lat+" Len:"+m.len) var marker = new google.maps.Marker({ position: new google.maps.LatLng(m.lat,m.len), map: _gmap, title: m.label }); _rememberMarker(marker); }, addByLatLen = function(markersArr){ for(var i = 0; i &lt; markersArr.length; i++){ try{ addMarkerByLatLen(markersArr[i]); }catch(err){ console.log(err) } } }, updateBounds = function(){ var bounds = new google.maps.LatLngBounds(); for(var i = 0; i &lt; _markers.length; i++){ bounds.extend(_markers[i].getPosition()) } _gmap.fitBounds(bounds); if(_gmap.getZoom()&gt; 15){ _gmap.setZoom(15); } }; return { getMap: function(){return _gmap}, getMarkers: function(){return _markers}, addMarkerByLatLen: addMarkerByLatLen, addByLatLen: addByLatLen, updateBounds: updateBounds } } but I have a Jasmine 2.0 test that fails: describe("mapModule", function(){ var mm, $canvas; beforeEach(function(){ $canvas = $('&lt;div&gt;').attr("id", "map-canvas"); $(document.body).append($canvas); mm = mapModule("map-canvas"); }); afterEach(function(){ $canvas.remove(); $canvas = null; mm = null; }) it("should encompass all added markers", function(done){ var …
type: Question
has title: Testing Google map.setBounds with Jasmine
linked to: http://stackoverflow.com/q/20555582

http://stackoverflow.com/q/24744371
has comment: http://stackoverflow.com/comment/38388119
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38388237
has comment: http://stackoverflow.com/comment/38388394
answer count: 2
has comment: http://stackoverflow.com/comment/38388276
has comment: http://stackoverflow.com/comment/38388277
favorite count: 0
has comment: http://stackoverflow.com/comment/38388587
has title: How can I create a table dynamically?
has answer: http://stackoverflow.com/a/24744675
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38388141
has answer: http://stackoverflow.com/a/24744757
has comment: http://stackoverflow.com/comment/38388337
has comment: http://stackoverflow.com/comment/38388416
has comment: http://stackoverflow.com/comment/38388430
downvote count: 3
upvote count: 1
has body: I have made the table structure below. How can I add a second column of this table dynamically whenever I click add1 link using javascript? The whole column from up to down.This same column must be repeated again and again Here is my HTML: Add1 Name Add2 Name <tdAdd3 Name Name Add4 Name
type: Question
score: -2

http://stackoverflow.com/comment/41698036
has text: Nice question, shame it didn't get more attention. I'm having the same problem.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24661678
score: 0

http://stackoverflow.com/q/24595847
downvote count: 0
favorite count: 0
tagged with: angularjs
answer count: 0
has comment: http://stackoverflow.com/comment/41571922
upvote count: 2
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: EDIT It actually does it right out of the box. I leave the plunker here just in case someone drops in via search: http://plnkr.co/edit/maArVIu6iWuWZbkvLI4j?p=preview I need to disable disable specific dates in a datepicker based on user input. The datepicker offers isDisabled(date) but that only gets fired once. It does however have a refreshView() as per: https://github.com/angular-ui/bootstrap/issues/779 What I can't figure out is how to trigger it after a change. Inline and the js angular.module('plunker', ['ui.bootstrap']); var DatepickerDemoCtrl = function ($scope) { $scope.change = function(){ console.log('changed to ' + $scope.dt); // Get array of disabled dates // call refreshView(); <--- My problem, right here }; }; I've ommitted the part where I define an array of disabled dates and the isDisabled function that checks against that. What I only need to know is how to trigger the refreshView() EDIT: This is what I want to call/trigger in ui-bootstrap-tpls.js this.refreshView = function() { if ( this.element ) { this._refreshView(); var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : null; ngModelCtrl.$setValidity('date-disabled', !date || (this.element && !this.isDisabled(date))); } };
tagged with: datepicker
score: 2
has title: How to access refreshView() in Twitter Bootstrap Datepicker for Angular?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40553491

http://stackoverflow.com/comment/38317278
type: Comment
comment on: http://stackoverflow.com/a/24707168
type: AnswerComment
has text: I think OP has updated the post. where is `r` that was in between ` r `
score: 0

http://stackoverflow.com/a/24637007
answers question: http://stackoverflow.com/q/24636975
upvote count: 2
has body: Use || instead of &amp;&amp;, which is the equivalent of 'OR'
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/24686908
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24685936
score: 1
has comment: http://stackoverflow.com/comment/38429962
accepted answer of: http://stackoverflow.com/q/24685936
has body: Use the same x.rangeBand() for widths of your table columns as you do for the widths of your bars. Don't forget to add a horizontal padding of 5% (10% total) of it to compensate for .rangeRoundBands([0, width], .1);
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24670803
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24685050
has comment: http://stackoverflow.com/comment/38258342
has body: I have a dataset, looking like this: var values = [ {label: 'Label 1', values: [8, 2, 5, 9, 3, 6]}, {label: 'Label 2', values: [5, 4, 3, 4, 1, 0]}, {label: 'Label 3', values: [3, 8, 3, 9, 0, 1]}, {label: 'Label 4', values: [1, 6, 3, 9, 3, 6]} ] I have made a stack bar chart using this data, so now I have 4 areas with a label for each and a set of stacked bars respectively. I successfully make this code append 4 areas as containers for the rest visuals: barElement = barsArea .selectAll('.bar-element') .data(values) .enter() .append('g') .attr({ class: 'bar-element' }); But now, first I need to add labels to each area, then stacked bars container, g element to each as well. What I have to do now is this: barElement.select('text').remove() var barLabel = barElement .append('text') .attr({ class: 'bar-label' }) .text(function (d, i) { return d.label }) ; Which looks not too cool because I have to manually remove them each time I update the chart. The same story with stacked bars container g element. If I just run .select(g.stacked-bars-container), it won't work because there is no such an element on first run. In this question it's suggested to do .select().data().enter().append() which doesn't seem to work in my case for some reason. So, the question, is how do I find a single element inside a node and update it when new data comes in, otherwise add this element first then update on first run?
has comment: http://stackoverflow.com/comment/38258979
type: Question
has title: Select and append a single element in a node with D3
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38261995
answer count: 1
linked to: http://stackoverflow.com/q/14471923
tagged with: d3.js
has comment: http://stackoverflow.com/comment/38254722

http://stackoverflow.com/a/24601313
answers question: http://stackoverflow.com/q/24601245
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24601245
type: Answer
downvote count: 0
score: 2
has body: This: if($count==1){ header("location:index.php"); } isn't doing what you think it's doing. Remember that this request is being made via AJAX, not as the main browser window. A redirect of this nature doesn't actually tell the browser to do anything, it just sends a specific response type with a specific header. Normally this suggests to the browser that it should initiate a new request to another page (in this case index.php). Browsers normally honor this request. However, AJAX is a little different. The server-side code is still sending that same response type with that same header, but the browser isn't the one that made the request. The JavaScript code is. And the JavaScript code isn't going to automatically follow this suggestion to redirect the user. You have to do that yourself. AJAX requests and responses should usually just contain data. So you can send some data back to the client. You can JSON encode some values, but something as simple as this will do the trick in this case: if($count==1){ echo "true"; } else { echo "false"; } Then in the client-side callback, you check for the value and respond accordingly: $.post("check.php", {pass: pass, use:use}, function (response) { if (response == 'true') { // redirect the user } else { // authentication failed } }); Performing the redirect in JavaScript is easy enough. Edit: on the console I'm getting the error: ReferenceError: Can't find variable: $ $.post("check.php", {pass: pass, usr:usr}); Well, in that case it sounds like you also haven't loaded the jQuery library. You need to do that in order to use jQuery code.
upvote count: 2

http://stackoverflow.com/comment/38190551
type: Comment
has text: that is due to the border not being included in the 100% width.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24638839

http://stackoverflow.com/a/24694420
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38396614
type: Answer
has body: In FF addon priveleaged scope you have a ton available to you. You can access Document.scripts. Read about it here on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Document But this is also available to non-priveagled. Just do window.document.scripts and itterate. var scripts = gBrowser.contentWindow.document.scripts; for (var i=0; i&lt;scripts.length; i++) { console.log(i, scripts[i].src, scripts[i].innerHTML) } keep in mind, some script elements have set src=blah so they wont have innerHTML. You would have to get that by either live fetch (xmlhttprequest, etc) or cached value.
accepted answer of: http://stackoverflow.com/q/24692669
answers question: http://stackoverflow.com/q/24692669
upvote count: 1
has comment: http://stackoverflow.com/comment/38292662
score: 1
has comment: http://stackoverflow.com/comment/38294370

http://stackoverflow.com/q/24619165
tagged with: facebook-javascript-sdk
favorite count: 0
has title: Facebook Javascript SDK extended permissions not being asked/logout button not displaying
tagged with: facebook
type: AnsweredQuestion
type: Question
has body: I just began using the Facebook JavaScript SDK to allow users to log in to my website with Facebook. The code containing the scope and data-auto-logout-link: &lt;fb:login-button scope="public_profile,email,user_birthday,user_location" onlogin="checkLoginState();" data-auto-logout-link="true" &gt; &lt;/fb:login-button&gt; There are two issues I am currently experiencing: 1: Only the standard permissions (public_profile, email) are being asked when the connection prompt pops up for all but one Facebook account. The only account that the extended permissions are working on is the account that the app is registered under. All other accounts only receive a pop-up requesting the standard permissions and not the extended permissions... 2: Additionally, the data-auto-logout-link only displays for the one account which the app is registered under. All other accounts tried do not display the Log Out link... I have tried 6 separate Facebook accounts all of which behave in the exact same way. I am able to "Log In" with Facebook and retrieve the basic information for all the accounts that I have tried... but as stated above, extended permissions are not not being requested and Log Out button is not displayed for 5/6 accounts. I would like to provide a link to the site, however it is being developed locally.... I also would have liked to provide screenshots detailing the problem... but I do not yet have sufficient stack overflow reputation Any help would be greatly appreciated. I suspect that the two issues are tied together... If any additional code is required, just ask and I would be happy to provide it. However everything seems to be working with the exceptions of the above mentioned issues... Thanks in Advance for your time and energy, Alex Gomes
has answer: http://stackoverflow.com/a/24624738
tagged with: javascript
tagged with: facebook-login
score: 4
upvote count: 4
accepted answer: http://stackoverflow.com/a/24624738
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/38145688
score: 0
type: Comment
type: QuestionComment
has text: Nesting callbacks. No, really. Everything else (except generators) will look hacky.
comment on: http://stackoverflow.com/q/24615891

http://stackoverflow.com/a/24701794
upvote count: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24700432
answers question: http://stackoverflow.com/q/24700432
type: Answer
has body: The current version of phantomjs permits only primitive types (boolean, string, number, [] and {}) to pass to and from the page context. So essentially all functions will be stripped and that is what DOM elements are. t.niese found the quote from the docs: Note: The arguments and the return value to the evaluate function must be a simple primitive object. The rule of thumb: if it can be serialized via JSON, then it is fine. Closures, functions, DOM nodes, etc. will not work! You need to do a part of the work inside of the page context. If you want the innerText property of every node, then you need to map it to a primitive type first: var list = page.evaluate(function() { return Array.prototype.map.call(document.getElementsByTagName('a'), function(a){ return a.innerText; }); }); console.log(list[0]); // innerText You can of course map multiple properties at the same time: return Array.prototype.map.call(document.getElementsByTagName('a'), function(a){ return { text: a.innerText, href: a.href }; });
score: 3

http://stackoverflow.com/a/24669438
accepted answer of: http://stackoverflow.com/q/24669379
score: 1
has body: Since those 2 elements are dynamically building, You have to use delegate like this $(document).on('click', '#addScnt1', function () { var i = $('#p_scents1 p').size(); $(scntDiv).append(' Remove '); i++; return false; }); $(document).on('click', '.remScnt1', function () { var i = $('#p_scents1 p').size(); if (i > 1) { $(this).parents('p').remove(); i--; } return false; }); Edit Instead of appending all the elements, troubleshoot the steps by adding elements one by one. First you can try like this, $('#p_scents1').append("test"); Then add elements and findout which element causes the problem.
has comment: http://stackoverflow.com/comment/38246352
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38245922
type: Answer
has comment: http://stackoverflow.com/comment/38245741
answers question: http://stackoverflow.com/q/24669379
has comment: http://stackoverflow.com/comment/38246292
has comment: http://stackoverflow.com/comment/38245970
has comment: http://stackoverflow.com/comment/38245877
upvote count: 1
has comment: http://stackoverflow.com/comment/38245721

http://stackoverflow.com/q/24718376
type: AnsweredQuestion
has body: I'm trying to re-order the elements of a list in a jquery sortable when it is created based on which order they are in in a list. var CACHES = ["WayBack Machine", "Google Cache", "Coral CDN"]; var HTML = ["Google Cache", "WayBack Machine", "Coral CDN"]; $("#sortable").sortable({ stop: function(event, ui) { console.log("New position: " + ui.item.index()); }, change: function(event, ui) { // When the item postion is changed while dragging a item, I want it's position console.log("New position: " + ui.item.index()); }, create: function(event, ui) { console.log("Sortable Created"); var ul = $('#sortable'); var li = ul.children('li').get(); li.sort(function(a,b) { $(a).attr('id') var value = CACHES.indexOf($(a).attr('id')) &lt; CACHES.indexOf($(b).attr('id')) ? 1 : -1 console.log(value) return value }); ul.append(li); } }); var HTML is the order that they are in in the HTML of the page. var CACHES is the order that I want to put them in. It does seem to reorder the elements, but not correctly.
has answer: http://stackoverflow.com/a/24718453
type: Question
tagged with: jquery-ui
answer count: 1
has title: jQuery Sortable List Not Reordering on create
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/24718453

http://stackoverflow.com/q/24737640
type: UnansweredQuestion
tagged with: wcf
has body: I have a WCF REST Service here is the implementation [WebInvoke(Method = "POST", UriTemplate="uploadFile/{filename}/{email}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] [OperationContract] string uploadFile(string filename, string email, Stream _Stream) public string uploadFile(string filename, string email, Stream _Stream ) { // Code to save file with the given filename } Javascript Implementation to upload file 0% complete Upload From The Above implementation I have a problem that I am unable to post images of size 50MB and for the same implementation if I change the url in javascript to a valid ip address like below instead of localhost var url = https://192.168.0.50/Myservice/service.svc/upload/filename/emailid ; The service is not at all invoking and giving me an error message saying 405 error code. (Note: I have enabled CORS on my Service. And All Other service methods are working well and good). What might be the issue with my code. Thanks Here is my web.config file <?xml version="1.0"?> <system.web> <compilation debug="true" targetFramework="4.0"/> <httpRuntime maxQueryStringLength="2097150" maxRequestLength="2097150" maxUrlLength="2097150" /> <authentication mode="None"/> <allow users="*"/> </system.web> <system.serviceModel> <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <endpoint address="" behaviorConfiguration="EndpBehaviour" binding="webHttpBinding" bindingConfiguration="webHttpBindingClient" name="webHttpEndPointBinding" contract="IService"/> <serviceMetadata httpsGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> <webHttp helpEnabled="true"/> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/> <standardEndpoint crossDomainScriptAccessEnabled="true"/> <standardEndpoint crossDomainScriptAccessEnabled="true"/> </system.serviceModel…
has answer: http://stackoverflow.com/a/24741753
score: 1
upvote count: 1
type: Question
tagged with: c#
tagged with: javascript
has title: Upload File using Streams in WCF REST Service and Javascript along with URL Parameters
has comment: http://stackoverflow.com/comment/38399524
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38381798
tagged with: rest

http://stackoverflow.com/comment/38300223
has text: +1 I quite like this one. Pitty about the `event.which` though
comment on: http://stackoverflow.com/a/24696520
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38163639
comment on: http://stackoverflow.com/q/24625058
score: 0
type: QuestionComment
has text: something going wrong there, because I copied the same and it's working fine for me.
type: Comment

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/24696692
tags question: http://stackoverflow.com/q/24735032
tag name: google-fusion-tables

http://stackoverflow.com/a/24720365
upvote count: 1
has comment: http://stackoverflow.com/comment/38344481
has comment: http://stackoverflow.com/comment/38342696
score: 1
accepted answer of: http://stackoverflow.com/q/24720334
has comment: http://stackoverflow.com/comment/38344556
answers question: http://stackoverflow.com/q/24720334
type: AcceptedAnswer
downvote count: 0
has body: set the selected value to 1. $('#BrokersList4ServiceEnd').val(1); get the value of the second option. $('#BrokersList4ServiceEnd option:eq(1)').val() get the selected value $('#BrokersList4ServiceEnd').val() DEMO
type: Answer
has comment: http://stackoverflow.com/comment/38342683

http://stackoverflow.com/comment/38364217
has text: declare Cards , card at the top level and put your console.log inside the success callback. this will solve your problem.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24731082

http://stackoverflow.com/a/24596451
type: Answer
has body: You can use simple jquery for this. Try this demo http://jsfiddle.net/amoljawale/8MZe5/2/ your header goes here... This is Left column This is Right column html, body{ margin: 0; padding: 0; } body{ padding-top: 50px; } .header{ position: fixed; top: 0; width: 100%; padding: 10px 0; height: 30px; text-align: center; background: #f4f4f4; } .mainContent{ margin: 50px auto 0; width: 500px; overflow: hidden; } .lftCol{ float: left; margin-right: 20px; width: 80px; height: 100px; text-align: center; color: #fff; } .lftColContent{ width: 80px; background: red; } .rhtCol{ float: left; width: 400px; height: 500px; text-align: center; color: #fff; background: blue; } var hdrHeight = $(".header").outerHeight(); var mainCnt = $(".mainContent"); var lftSticky = $(".lftColContent"); $(function () { $(window).scroll(function () { if ($(this).scrollTop() > hdrHeight) { lftSticky.css({ "position":"fixed", "top": hdrHeight }); return false; } else { lftSticky.css({ "position":"static", "top": 0 }); return false; } }); });
answers question: http://stackoverflow.com/q/24596011
score: 0

http://stackoverflow.com/comment/38224470
type: QuestionComment
comment on: http://stackoverflow.com/q/24656925
score: 0
has text: Are you trying to manipulate the same `$scope` object from within multiple controllers, or are you trying to have multiple controllers share the same logic to manipulate their respective `$scope` object in the same way? I went ahead and assumed the second case, so if you could answer this question it will help me improve my answer below.
type: Comment

http://stackoverflow.com/q/24746699
has comment: http://stackoverflow.com/comment/38392617
has answer: http://stackoverflow.com/a/24746828
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38392802
has comment: http://stackoverflow.com/comment/38392577
has answer: http://stackoverflow.com/a/24747324
has comment: http://stackoverflow.com/comment/38392908
has body: HTML: prepend to me Event Here JS: $(document).ready(function(){ $('#container').prepend($('#event')); }); Demo: http://jsfiddle.net/Ckfs5/1/ Switching to jQuery 1.9 or higher seems to fix the problem. Is there a workaround so javascript doesn't trigger again during DOM insertion (using prepend or append) in jQuery 1.8? Upgrading to jQuery 1.9 or newer will be a more difficult path, as we're using this on a big project. So I'm hoping to find a solution / workaround for this problem in jQuery 1.8.3.
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38392874
has comment: http://stackoverflow.com/comment/38393476
score: 2
has comment: http://stackoverflow.com/comment/38392655
tagged with: dom
type: Question
has title: DOM insertion in jQuery 1.8 causes javascript triggering twice
answer count: 2

http://stackoverflow.com/comment/38395754
type: Comment
type: QuestionComment
has text: This would prevent the users from accessing their own user object, and should be rejected. I think a sufficient solution here is to just set a Class permission from the data browser (under the More drop-down) to limit Find/Update/Delete to the admin role..
comment on: http://stackoverflow.com/q/24742729
score: 0

http://stackoverflow.com/q/24657013
tagged with: javascript
has answer: http://stackoverflow.com/a/24658192
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I need to only show two rows on my Google Charts table. I currently have the following that is being called: function drawTable() { var jsonData = '@Html.Raw(ViewData["totalsTable"])'; var table; var data; var options; data = new google.visualization.DataTable(jsonData); table = new google.visualization.Table(document.getElementById('table_div')); options = { 'pageSize': 2 }; table.draw(data, options); } The problem being that this is showing a table with all of the values from the DataTable. I just want to show the first two rows. options = { 'pageSize': 2 } is supposed to achieve this. I'm not sure what I'm doing wrong. Thanks!
has answer: http://stackoverflow.com/a/24658288
type: Question
answer count: 2
tagged with: google-visualization
has title: I need to only show two rows on my Google Charts table

google-analytics
tags question: http://stackoverflow.com/q/24695365
tags question: http://stackoverflow.com/q/24623766
tags question: http://stackoverflow.com/q/24744863
tags question: http://stackoverflow.com/q/24725783
tags question: http://stackoverflow.com/q/24696404
tags question: http://stackoverflow.com/q/24652941
tag name: google-analytics
tags question: http://stackoverflow.com/q/24616216
tags question: http://stackoverflow.com/q/24730503
tags question: http://stackoverflow.com/q/24741433
tags question: http://stackoverflow.com/q/24630441
tags question: http://stackoverflow.com/q/24668860
tags question: http://stackoverflow.com/q/24658557
type: Tag
tags question: http://stackoverflow.com/q/24710439
tags question: http://stackoverflow.com/q/24647124

xul
tags question: http://stackoverflow.com/q/24697104
tags question: http://stackoverflow.com/q/24626156
tag name: xul
tags question: http://stackoverflow.com/q/24692669
tags question: http://stackoverflow.com/q/24642896
tags question: http://stackoverflow.com/q/24733903
type: Tag
tags question: http://stackoverflow.com/q/24680750

http://stackoverflow.com/a/24626853
answers question: http://stackoverflow.com/q/24615532
score: 0
type: Answer
has body: I found the solution. The problem was that the scrollTO function was in another function that was firing initially but then wasn't available when calling the different functions in it. code looked like this: $(function(){ if($('body').is('.scrolltoJS')){ function scroll(parameter){ $(parameter).ScrollTo(); } }

http://stackoverflow.com/q/24630280
tagged with: google-maps-markers
upvote count: 0
tagged with: javascript
score: -3
favorite count: 0
has answer: http://stackoverflow.com/a/38316064
type: Question
tagged with: google-street-view
has body: Is there a way to display the marker icon in fore ground as soon the street view map is loaded, user should not pan until he sees the marker icon, i have updated the code in the below link var fenway = new google.maps.LatLng(40.729884, -73.990988); var mapOptions = { center: fenway, zoom: 14 }; var map = new google.maps.Map( document.getElementById('map-canvas'), mapOptions); var panoramaOptions = { position: fenway, pov: { heading: 500, pitch: 0 } }; var panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'),panoramaOptions); var panorama1 = new google.maps.StreetViewPanorama(document.getElementById('pano1'),panoramaOptions); var marker = new google.maps.Marker({ position:fenway, map:panorama }); var marker1 = new google.maps.Marker({ position:fenway, map:panorama1, }); map.setStreetView(panorama,fenway); map.setStreetView(panorama1); http://jsfiddle.net/vinothpsv/JKx3Z/
answer count: 1
has title: Display google marker on the street view foreground
downvote count: 3
type: UnansweredQuestion
tagged with: google-maps

http://stackoverflow.com/comment/38390974
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24745805
has text: Thanks. That actually help me figure it out.
score: 0

http://stackoverflow.com/a/24628915
has comment: http://stackoverflow.com/comment/38170113
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38170294
upvote count: 8
downvote count: 2
score: 6
type: Answer
has comment: http://stackoverflow.com/comment/38170075
has comment: http://stackoverflow.com/comment/38170606
accepted answer of: http://stackoverflow.com/q/24628855
has comment: http://stackoverflow.com/comment/38170324
answers question: http://stackoverflow.com/q/24628855
has comment: http://stackoverflow.com/comment/38170137
has body: It's good to go by conventions. Why do you make SITE_NAME in caps? Because it's global. Same is here. In JavaScript: It means convention for private fields or private methods. Methods that are only for internal use. They should not be invoked outside of the class. Private fields contain data for internal use. They should not be read or written into (directly) from outside of the class. Great answer here about PHP: It's from the bad old days of Object Oriented PHP (PHP 4). That implementation of OO was pretty bad, and didn't include things like private methods. To compensate, PHP developers prefaced methods that were intended to be private with an underscore. In some older classes you'll see /**private*/ __foo() { to give it some extra weight. I've never heard of developers prefacing all their methods with underscores, so I can't begin to explain what causes that.

wordpress
tags question: http://stackoverflow.com/q/24594346
tags question: http://stackoverflow.com/q/24641133
tags question: http://stackoverflow.com/q/24630694
tags question: http://stackoverflow.com/q/24702013
tags question: http://stackoverflow.com/q/24736806
tags question: http://stackoverflow.com/q/24665860
tags question: http://stackoverflow.com/q/24687951
tags question: http://stackoverflow.com/q/24718034
tags question: http://stackoverflow.com/q/24691318
tags question: http://stackoverflow.com/q/24620954
tags question: http://stackoverflow.com/q/24649996
tags question: http://stackoverflow.com/q/24702627
tags question: http://stackoverflow.com/q/24613836
tags question: http://stackoverflow.com/q/24695323
tags question: http://stackoverflow.com/q/24631863
tags question: http://stackoverflow.com/q/24641909
tags question: http://stackoverflow.com/q/24657265
tags question: http://stackoverflow.com/q/24640235
tags question: http://stackoverflow.com/q/24704842
tags question: http://stackoverflow.com/q/24642043
tags question: http://stackoverflow.com/q/24657748
tags question: http://stackoverflow.com/q/24647601
tags question: http://stackoverflow.com/q/24745505
tags question: http://stackoverflow.com/q/24657166
tags question: http://stackoverflow.com/q/24682219
tags question: http://stackoverflow.com/q/24725860
tags question: http://stackoverflow.com/q/24645145
tags question: http://stackoverflow.com/q/24741796
tags question: http://stackoverflow.com/q/24619636
tags question: http://stackoverflow.com/q/24649287
tags question: http://stackoverflow.com/q/24716457
tags question: http://stackoverflow.com/q/24691676
tag name: wordpress
tags question: http://stackoverflow.com/q/24718999
tags question: http://stackoverflow.com/q/24655035
tags question: http://stackoverflow.com/q/24628786
tags question: http://stackoverflow.com/q/24600089
tags question: http://stackoverflow.com/q/24598191
tags question: http://stackoverflow.com/q/24694264
tags question: http://stackoverflow.com/q/24683511
type: Tag
tags question: http://stackoverflow.com/q/24592737
tags question: http://stackoverflow.com/q/24746762
tags question: http://stackoverflow.com/q/24610953
tags question: http://stackoverflow.com/q/24658797
tags question: http://stackoverflow.com/q/24613976

http://stackoverflow.com/comment/38373544
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24736283
type: AnswerComment
has text: duplicate name does not matter. but it is working at my side see this http://jsfiddle.net/MS3EU/11/ are you creating these elements dynamically?

http://stackoverflow.com/comment/38150176
has text: Have you tried `app.bootStrap()` or `this.bootStrap()` instead of `current.bootStrap()` ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24618227
score: 1

http://stackoverflow.com/comment/38223490
score: 1
comment on: http://stackoverflow.com/q/24656942
has text: I told you `do not forget permission` :P If you don't observe any errors then probably permissions are the problem.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24671114
score: 1
has comment: http://stackoverflow.com/comment/38250008
accepted answer of: http://stackoverflow.com/q/24670968
has comment: http://stackoverflow.com/comment/38249252
answers question: http://stackoverflow.com/q/24670968
has body: This is because you've cached the values in opts once document is loaded and is not updating it when the select gets updated. You have to re-evaluate opts to get the new set of values once an item is moved from the list.. $('.select-cities').click(function () { $('.select-cities option:selected').remove().appendTo('.chosen-cities'); opts = $('#optlist option').map(function () { return this.value, $(this).text(); }); }); Demo
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38249188
type: Answer
has comment: http://stackoverflow.com/comment/38249657
upvote count: 1
has comment: http://stackoverflow.com/comment/38250543
has comment: http://stackoverflow.com/comment/38248870

http://stackoverflow.com/comment/38215100
comment on: http://stackoverflow.com/a/24649372
has text: @maurycy What are the main differences? I already had injected $location so I will try it out with your answer.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38125143
score: 0
has text: Yes, the referrer URL can and will be manipulated and shouldn't be used for anything security related.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24605361

http://stackoverflow.com/q/24693458
type: Question
tagged with: mongodb
score: 0
answer count: 1
tagged with: mongoose
tagged with: javascript
has body: I'm trying to get a sub-document in my User collection using mongoose. I followed the Mongoose Sub Document on its official website. It's written that: Each document has an _id. DocumentArrays have a special id method for looking up a document by its _id. var doc = parent.children.id(id); Here is my code: exports.editAccount = function(req, res) { var user = new User(req.user); var newAccount = new Account(req.body); console.log("Account:" + newAccount._id); // Gave me 53bf93d518254f880c000009 var account = user.accounts.id(newAccount._id); console.log("Account" + account); // Never been printed }; The console.log("Account" + account); has never been printed. I don't know what happen. I tried many different ways, however, still can't figure it out. Any help would be appreciated. User collection: { "__v" : 1, "_id" : ObjectId("53bcf3e6fbf5adf10c000001"), "accounts" : [ { "accountId" : "123456789", "type" : "Saving account", "balance" : 100, "_id" : ObjectId("53bf93d518254f880c000009") } ] } I
has answer: http://stackoverflow.com/a/24694004
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24694004
has title: How to find a sub-document using Mongoose?

http://stackoverflow.com/comment/38304807
has text: @Braj ah, I see. Thanks for the link. I don't think that question's title makes it easy to locate though in this particuliar case. None the less thanks.
score: 0
comment on: http://stackoverflow.com/q/24700927
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24670693
answers question: http://stackoverflow.com/q/24670599
upvote count: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38248308
has body: You can use a jQuery here : $('.column-'+positionID).each(function{ var html = $(this).html(); if(html == "yes") $(this).html('&lt;img src="image.png" /&gt;'); else if(html == "no") $(this).html('&amp;nbsp;'); });
score: 1
has comment: http://stackoverflow.com/comment/38248186

http://stackoverflow.com/q/24600089
accepted answer: http://stackoverflow.com/a/24600400
tagged with: css
score: 2
type: AnsweredQuestion
has body: I'am using iosslider on my single page. I need to collect all img src from '.wp-pic' and put them to slider background url. So what I have: SLIDER FRAME AND DIV WITH WP PICTURES: <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> <?php endif; ?> /* SLIDER SETTINGS =============================================*/ .sliderContainer{ position: absolute; top: 0; bottom: 0; left: 0; right: 0; height: 100%; } .iosSlider{ position: relative; top: 0; left: 0; overflow: hidden; width: 100%; height: 100%; } .iosSlider .slider{ width: 100%; height: 100%; } .iosSlider .slider .item{ float: left; width: 100%; height: 100%; } // REMOVE PICTURES PUSHED BY WP AND PUT THEM TO THE IOSSLIDER $('.wp-pic').find('img').each(function(){ var photoSrc = $(this).attr('src'), photoImg = ' ', numbClass = Math.round(Math.random() * 15); $('.slider').append(' ' + photoImg + ' '); $('.wp-pic').remove(); }); $('.item').find('img').each(function(){ var x = $(this).attr('src'); $('.slider').find('div:contains(photo-template)').each(function(){ $(this).css({ 'background-image' :'url(' + x + ')', 'background-size' :'contain', 'background-position':'center', 'background-repeat' :'no-repeat' }); }); $(this).remove(); }); How can I select each class 'photo-template' and place on their background collected src? FIDDLE
upvote count: 2
tagged with: wordpress
type: Question
tagged with: jquery-ui-slider
possible better answer: http://stackoverflow.com/a/24600206
has answer: http://stackoverflow.com/a/24600206
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Select div with random class
has answer: http://stackoverflow.com/a/24600400
favorite count: 0

asp.net
tags question: http://stackoverflow.com/q/24623934
tags question: http://stackoverflow.com/q/24685410
tags question: http://stackoverflow.com/q/24672900
tags question: http://stackoverflow.com/q/24670439
tags question: http://stackoverflow.com/q/24649771
tags question: http://stackoverflow.com/q/24697933
tags question: http://stackoverflow.com/q/24612609
tags question: http://stackoverflow.com/q/24622414
tags question: http://stackoverflow.com/q/24633289
tags question: http://stackoverflow.com/q/24634564
tags question: http://stackoverflow.com/q/24698725
tags question: http://stackoverflow.com/q/24670692
tags question: http://stackoverflow.com/q/24661844
tags question: http://stackoverflow.com/q/24632548
tags question: http://stackoverflow.com/q/24747646
tags question: http://stackoverflow.com/q/24634612
tags question: http://stackoverflow.com/q/24665998
tags question: http://stackoverflow.com/q/24696311
tags question: http://stackoverflow.com/q/24682680
tags question: http://stackoverflow.com/q/24617839
tags question: http://stackoverflow.com/q/24657377
tags question: http://stackoverflow.com/q/24617986
tags question: http://stackoverflow.com/q/24644059
tags question: http://stackoverflow.com/q/24730447
tags question: http://stackoverflow.com/q/24623365
tags question: http://stackoverflow.com/q/24728920
tags question: http://stackoverflow.com/q/24696350
tags question: http://stackoverflow.com/q/24632871
tags question: http://stackoverflow.com/q/24637401
tags question: http://stackoverflow.com/q/24689955
tags question: http://stackoverflow.com/q/24698425
tags question: http://stackoverflow.com/q/24727287
tags question: http://stackoverflow.com/q/24735819
tags question: http://stackoverflow.com/q/24626839
tags question: http://stackoverflow.com/q/24633352
tags question: http://stackoverflow.com/q/24700208
tags question: http://stackoverflow.com/q/24695266
tags question: http://stackoverflow.com/q/24616858
tags question: http://stackoverflow.com/q/24733063
tags question: http://stackoverflow.com/q/24730229
tags question: http://stackoverflow.com/q/24600409
tags question: http://stackoverflow.com/q/24683874
tags question: http://stackoverflow.com/q/24607879
tags question: http://stackoverflow.com/q/24745355
tags question: http://stackoverflow.com/q/24654864
tags question: http://stackoverflow.com/q/24605760
tags question: http://stackoverflow.com/q/24630076
tags question: http://stackoverflow.com/q/24740867
tags question: http://stackoverflow.com/q/24613536
tags question: http://stackoverflow.com/q/24720567
tags question: http://stackoverflow.com/q/24709675
tags question: http://stackoverflow.com/q/24684853
tags question: http://stackoverflow.com/q/24637393
tags question: http://stackoverflow.com/q/24677714
tags question: http://stackoverflow.com/q/24617783
type: Tag
tags question: http://stackoverflow.com/q/24665207
tags question: http://stackoverflow.com/q/24656998
tags question: http://stackoverflow.com/q/24702037
tags question: http://stackoverflow.com/q/24681345
tags question: http://stackoverflow.com/q/24668968
tags question: http://stackoverflow.com/q/24594134
tags question: http://stackoverflow.com/q/24672991
tags question: http://stackoverflow.com/q/24643029
tags question: http://stackoverflow.com/q/24699428
tags question: http://stackoverflow.com/q/24645971
tags question: http://stackoverflow.com/q/24631481
tags question: http://stackoverflow.com/q/24604973
tags question: http://stackoverflow.com/q/24739642
tags question: http://stackoverflow.com/q/24634438
tags question: http://stackoverflow.com/q/24697592
tags question: http://stackoverflow.com/q/24611159
tags question: http://stackoverflow.com/q/24647813
tags question: http://stackoverflow.com/q/24649861
tags question: http://stackoverflow.com/q/24685973
tags question: http://stackoverflow.com/q/24596657
tags question: http://stackoverflow.com/q/24670752
tags question: http://stackoverflow.com/q/24641804
tags question: http://stackoverflow.com/q/24739794
tags question: http://stackoverflow.com/q/24654982

http://stackoverflow.com/comment/38110085
score: 2
comment on: http://stackoverflow.com/a/24597821
type: AnswerComment
type: Comment
has text: This could also be code that has grown over time. Maybe the original coder thought that `match` would always return an array. Then the code failed, and someone hotfixed it by adding the `|| []` part. Whatever the reason, there is no shame in adding a line of comment, or even better, spend 3 or 5 lines of code instead of 1, so it is readable.

http://stackoverflow.com/comment/41929804
type: Comment
has text: @Softlion thanks for the reply. I'm no longer on the project I asked the question for but will look into your answer and try to get the question reopened.
score: 0
comment on: http://stackoverflow.com/q/24620330
type: QuestionComment

http://stackoverflow.com/a/24702551
type: AcceptedAnswer
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/38309323
score: 1
accepted answer of: http://stackoverflow.com/q/24702440
answers question: http://stackoverflow.com/q/24702440
has body: The problem is that the response from the server is null, check that on the chrome debug console -> tab network. Check the response of the php request and see if it is an xml.
upvote count: 1

http://stackoverflow.com/a/24704183
downvote count: 0
has comment: http://stackoverflow.com/comment/38311150
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24704137
type: Answer
answers question: http://stackoverflow.com/q/24704137
has comment: http://stackoverflow.com/comment/38311172
has body: It looks to me like the manager and sponsor requests can be paralellized (executed simultaneously). I'd slap a when in there: $.get("/projects/1") .then(function(data){ var manager_req = $.get("/employees/" + data.ProjectManagerId); var sponsor_req = $.get("/employees/" + data.ProjectSponsorId); return $.when(data, manager_req, sponsor_req); }) .then(function(data, manager, sponsor){ data.sponsor = sponsor; data.manager = manager; return data; }) .done(function(data){ //Bind data to view //data.manager is resolved //data.sponsor is resolved }); Nesting the when promise deals a little bit better with data: $.get("/projects/1") .then(function(data){ var manager_req = $.get("/employees/" + data.ProjectManagerId); var sponsor_req = $.get("/employees/" + data.ProjectSponsorId); return $.when(manager_req, sponsor_req).then(function(manager, sponsor){ data.sponsor = sponsor; data.manager = manager; return data; }); }) .done(function(data){ //Bind data to view //data.manager is resolved //data.sponsor is resolved });

http://stackoverflow.com/comment/38163676
comment on: http://stackoverflow.com/q/24605350
type: Comment
type: QuestionComment
score: 0
has text: I think I found solution: https://gist.github.com/Hubbitus/e2f5ac46cfb99162ef0d

http://stackoverflow.com/comment/38154528
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24620354
has text: Make another page to call the search class just for ajax calls.

http://stackoverflow.com/comment/38235909
type: Comment
comment on: http://stackoverflow.com/a/24654339
has text: No - to start with, just add the `SoapClient.d.ts` file to your project with the code I put above. Then see whether it does everything you need - that is the immediate need; to get your project running :)
type: AnswerComment
score: 0

http://stackoverflow.com/q/24709831
favorite count: 0
has comment: http://stackoverflow.com/comment/38323613
has comment: http://stackoverflow.com/comment/38322496
upvote count: 2
type: UnansweredQuestion
has body: I've written a php script with simple security-token system, And I used the security-token in a GET way simple example : &lt;form action="index.php?act=members&amp;add=member&amp;sec-hash=b0af595dc70755564889457afad47def" method="post" target="add_member" enctype="multipart/form-data"&gt; But I've had a problem with Javascript, while trying to get it to send add some easier way for me to add&amp;edit members, but I couldn't get it from the &lt;form&gt; to use it in other Javascript things :S this is what I've tried : document.writeln('&lt;iframe id="iframe" src="http://localhost/panel/index.php?act=members&amp;add=member"onload="read()"&gt;&lt;/iframe&gt;'); function read() { var securitytoken= document.getElementById("iframe").contentDocument.forms[0].add_member.value; document.writeln('&lt;form action="add.php?sec-hash='+securitytoken+'" method="POST"&gt;'); ....extra Javascript code ... } please, and its hard for me to re-code the script, I mean its easier for me to try with Java first you feel me ? Thanks from now :)
tagged with: php
has comment: http://stackoverflow.com/comment/38323627
type: Question
has comment: http://stackoverflow.com/comment/38338077
has comment: http://stackoverflow.com/comment/38338086
score: 2
linked to: http://stackoverflow.com/q/8567114
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38340349
has answer: http://stackoverflow.com/a/24719696
tagged with: javascript
has comment: http://stackoverflow.com/comment/38322468
has comment: http://stackoverflow.com/comment/38338759
has title: Javascript getElementById

http://stackoverflow.com/a/24711461
has body: When you declaring in your directive scope: { isOk: '@' }, You are isolating the directive's scope from the controller's scope. this is why your ng-click="send_message(bodymessage)" didn't work (it searched for send_message in the directive scope) if you would like to share the controller's scope with your directive, remove scope: { ... } from your directive and create isOk in the controller's scope example: Plunker # Note that in many cases it is recommended to separate the directive's scope from the controller's scope
type: Answer
answers question: http://stackoverflow.com/q/24711203
score: 0

http://stackoverflow.com/comment/38400757
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24740529
has text: @Jasper_07 correct I fixed it, but still no data displayed
score: 0

http://stackoverflow.com/a/24644603
accepted answer of: http://stackoverflow.com/q/24644552
type: Answer
answers question: http://stackoverflow.com/q/24644552
has body: You just need to check to see if the div already has the class "active". $(".aro").click(function () { if (!$(this).hasClass("active")) { // If clicked div doesn't have class "active" $(".active .details").slideUp("slow"); // Moved for smoother slide animations $(".aro").removeClass("active"); $(this).addClass("active"); //$(".aro .details").slideUp("slow"); $(this).children(".details").slideDown("slow"); } }); should work.
score: 0
has comment: http://stackoverflow.com/comment/38200172
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38200139

http://stackoverflow.com/q/24609414
type: Question
has body: I have a table heaving divs inside all cells. These divs have a qTip2 to show extra information. Since the table can be pretty big I create the qTip2 elements when I hover over the div. The qTip2 then is shown when the user clicks on the item. $('#queryResult div[data-distribution]').each(function() { var element = $(this); var distribution = element.data('distribution'); element.hover(function() { element.qtip({ content: { text: function() { return ' Distribution: ' + distribution + ' '; }, title: 'Information', button: true }, show: 'click', position: { my: 'top center', at: 'bottom center' }, hide: { fixed: true, delay: 5000, event: false } }); }); }); The qTip2 appears as intended when I click on any of the elements. But it disappears as soon as I leave the div I created the qTip2 on. I tried several versions of hide, non of them worked. Browser: IE9
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: qtip2
favorite count: 0
has answer: http://stackoverflow.com/a/24768875
type: UnansweredQuestion
has title: qTip2 always closes whenever leaving the element
tagged with: internet-explorer
downvote count: 0
score: 1

http://stackoverflow.com/a/24668841
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38261189
type: Answer
has body: Based off of your fiddle in the comments you could use an in memory canvas as a back buffer to draw what you need to at normal size, then scale the context of your main canvas and use drawImage to draw the scaled result. Live Demo var canvas = document.getElementById('c'); var context = canvas.getContext('2d'); var backBuffer = document.createElement("canvas"), bCtx = backBuffer.getContext("2d"); paint = function (x, y, scale) { bCtx.clearRect(0,0,backBuffer.width,backBuffer.height);; bCtx.beginPath(); bCtx.rect(x, y, 30, 30); bCtx.fillStyle = 'black'; bCtx.fill(); bCtx.beginPath(); bCtx.rect(x + 30, y, 30, 30); bCtx.fillStyle = 'black'; bCtx.fill(); context.save(); context.scale(scale,scale); context.drawImage(backBuffer,0,0); context.restore(); } paint(10, 10, 1); paint(10, 70, .66);
answers question: http://stackoverflow.com/q/24641042

http://stackoverflow.com/q/24688288
has comment: http://stackoverflow.com/comment/38529420
favorite count: 0
has title: KnockoutJs - How to throttle the binding afterkeydown
type: UnansweredQuestion
upvote count: 1
has body: I got this working for my filtering functionality. &lt;input data-bind="value: filterByName, valueUpdate:'afterkeydown'" /&gt; &lt;div data-bind="foreach: filteredRecords"/&gt; &lt;/body&gt; Now i just need to throttle the binding of the filteredRecords or to put delay on it my view model looks like this self.filteredRecords= ko.computed(function () { return getRecordByStatus(1); }); self.filterByName= ko.observable(""); var getRecordByStatus = function (status) { var periodRecord, filtered = []; if (self.timesheetApprovalResponse().periods) { // period filtering if (self.selectedPeriod()) { periodRecord = _.find(self.timesheetApprovalResponse().periods, function(p) { return p.fromDate === self.selectedPeriod().key; }); if (periodRecord) { filtered = _.where(periodRecord.timesheets, function(t) { return t.status === status; }); } } } if (self.filterByName()) { filtered = _.where(filtered, function (t) { console.log(t.name.toLowerCase() + "-" + self.filterByName().toLowerCase()); return t.name.toLowerCase().indexOf(self.filterByName().toLowerCase()) &gt; -1; }); } return filtered; }; Now my problem is where to put the .extend({ throttle: 500 }); I think I cannot put it on filteredRecords as it will also throttle in Page Load ? Any other ideas?
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/24825771
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38282566
tagged with: mvvm
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/24641920
has comment: http://stackoverflow.com/comment/38194724
has body: EDIT: please see this thread and answers: https://stackoverflow.com/a/8024286/2192152 Here is a code I used for a personal website: /* ************************************************************* * Loading any js file. ************************************************************** */ staticPath ='./js/'; vendorPath='./js/vendor/'; src = [ {f:'jquery-1.8.3.min.js', n:1}, {f:'jquery-ui-1.9.2.js', n:1}, {f:'lib.js', n:0}, ]; for (var i in src) { if (src[i].n === 0) document.write('&lt;' + 'script type="text/javascript" src="' + staticPath + src[i].f + '"&gt;&lt;/sc' + 'ript&gt;'); else document.write('&lt;' + 'script type="text/javascript" src="' + vendorPath + src[i].f + '"&gt;&lt;/sc' + 'ript&gt;'); } As you can see you should split the string containing you script call. I unfortunately don't know much more of why this is needed. Note: I tried many setting and the one I provide you here is the fastest one in terms of load time (using chrome)
answers question: http://stackoverflow.com/q/24641863
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/24642775
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/24642992
has answer: http://stackoverflow.com/a/24642992
tagged with: tags
tagged with: javascript
has title: get the string enclosed in a tag in a string Jquery
tagged with: jquery
has body: I am trying to get data enclosed between tags in a string. I get a string in such format and I need to parse it to get only whats enclosed in tags. var s = "Something something Required data "; I want to get the data that is enclosed between the tag I tried alert($('s').find('details').text()); But its just blank output. Regular expressions would help but it seems to me that there maybe is a better way. I would welcome any help. Thank you.
linked to: http://stackoverflow.com/q/13413399
has answer: http://stackoverflow.com/a/24643143
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24643143
tagged with: parsing
favorite count: 0
linked to: http://stackoverflow.com/q/3754092

http://stackoverflow.com/comment/102400502
type: AnswerComment
has text: They only perform the XHR from the extension scope, not the pages scope, making this rather difficult.
type: Comment
comment on: http://stackoverflow.com/a/24690446
score: 0

http://stackoverflow.com/comment/38219225
type: Comment
has text: You have your JSON stored in data?
comment on: http://stackoverflow.com/a/24652820
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38315513
comment on: http://stackoverflow.com/q/24706226
has text: Interesting ... I'm going to put together an answer with revised code and probably a different approach.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38230256
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24660771
has text: @SiZiOUS, thanks I messed up posting the question, but that's not how my real code looks like. I updated with fix.

http://stackoverflow.com/a/24678648
has body: This is also a method for Ajax Post request, I find it simple. Tell me if you find this useful In HTML Page In script file or tag $.POST("filename.php", data, function(response) { if(!response) { alert("Oh Snap! I hate this part"); } else { $("#div").html(response.field); } }); Read about his here AJAX POST REQUEST
score: 0
answers question: http://stackoverflow.com/q/24677694
type: Answer

http://stackoverflow.com/a/69225091
has body: You can draw you own button and attach a sript to it. Edit it all transparent, and write no text. Then place it on the cell you wish, resizing to fit inside the cell's area. Add A Google Sheets Button To Run Scripts
type: Answer
answers question: http://stackoverflow.com/q/24727266
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/24650861
has title: How can a disable and show a loading sign in place of a "a href" tag until the whole page is loaded?
has answer: http://stackoverflow.com/a/24651611
has comment: http://stackoverflow.com/comment/38211568
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38211534
possible better answer: http://stackoverflow.com/a/24651399
accepted answer: http://stackoverflow.com/a/24651611
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24651399
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38211687
tagged with: php
type: Question
has body: I am using a href tag to open a dialog box using bootstrap in which some data is to be shown using jquery but i want that the dialog box must not be opened until all the data is loaded in the web page in which this a href is used. The hyperlink works before the page is loaded but the data is not fetched into the dialog box and not shown into the dialog box. I want that until my whole web page is loaded, this a href must be disabled or a loading sign must come in place of this a href. Is there a solution for this problem? Below is the href which i am using to open a dialog box. &lt;a href="#" id="&lt;?php echo $row_rsnf['autoid'];?&gt;" class="btn-primary lg" data-toggle="modal" data-target="#myModal&lt;?php echo $row_rsnf['autoid']?&gt;"&gt;Comments:&lt;/a&gt;

http://stackoverflow.com/a/24782635
has body: It is hard to understand your exact aim and what kind of animation you need between shapes as you don't specify animation steps/states. But you could take a look at CSS3 transitions. I made a few in the following demo that illustrate how you can simulate "shape morphing" (is this the corect term?) if that is what you are trying to do : DEMO (click on the circles to animate them) For the circle to rectangle, the transition is pretty easy to achieve, you just need to animate border-radius : CSS : #rec { float:left; width:200px; height:200px; background:gold; border-radius:50%; -webkit-transition: border-radius 1s, width 1s; cursor:pointer; } #rec.animate { border-radius:0%; width:300px; } For the circle to triangle, the shape transition is a bit harder to achieve, the shape morphing isn't perfect and needs improvement but you can get the idea. The circle and the triangle are set with pseudo elements and animations display one or the other with 2 different transitions : CSS : /*CIRCLE TO TRIANGLE 1 */ #tr1{ float:right; position:relative; cursor:pointer; width:200px; height:200px; } #tr1:before, #tr1:after{ content:''; position:absolute; } #tr1:before{ top:0; left:0; background:gold; border-radius:50%; width:100%; height:100%; -webkit-transition: width 1s, height 1s, left 1s, top 1s; } #tr1:after{ left:50%; top:50%; border-left:0px solid transparent; border-right:0px solid transparent; border-bottom:0px solid gold; -webkit-transition: border-left 1s, border-right 1s, border-bottom 1s,left 1s, top 1s; } #tr1.animate:before{ width:0; height:0; top:50%; left:50%; } #tr1.animate:after{ top:0; left:0; border-left:100px solid transparent; border-right:100px solid transparent; border-bottom:200px solid gold; } /*CIRCLE TO TRIANGLE 2 */ #tr2{ float:right; position:relative; cursor:pointer; width:200px; height:200px; } #tr2:before, #tr2:after{ content:''; position:absolute; } #tr2:before{ top:0; left:0; background:gold; border-radius:50%; width:100%; height:100%; -webkit-transi…
upvote count: 4
answers question: http://stackoverflow.com/q/24698557
downvote count: 0
type: Answer
score: 4

http://stackoverflow.com/comment/38288846
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24692566
has text: What's the problem with your current solution? (And why didn't you post it?)
score: 0

http://stackoverflow.com/comment/38129071
type: AnswerComment
has text: I used this as it seems simpler and cleaner than using a form. Thank you!
type: Comment
comment on: http://stackoverflow.com/a/24607325
score: 0

http://stackoverflow.com/q/24615008
score: 1
tagged with: javascript
has title: Javascript: Why does this cookie not expire?
has answer: http://stackoverflow.com/a/24615198
has body: This is how I set a cookie function createCookie(name,value,seconds) { if (seconds) { var date = new Date(); date.setTime(date.getTime()+(seconds*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } createCookie('CookieName','1',10); It should expire in 10 seconds, right? When I lookup the cookies in Firefox I see that it is set with the correct expiration time. But even though the cookie has expired it is still there? Edit: I think I figured it out. Firefox just keeps the expired cookie but they don't really exist anymore. Correct?
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/24615198
type: AnsweredQuestion
tagged with: cookies
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38143829

http://stackoverflow.com/q/24608880
tagged with: twitter-bootstrap
has title: Bootstrap modal and AngularJS
has answer: http://stackoverflow.com/a/24609123
type: Question
tagged with: javascript
score: 0
tagged with: angular-bootstrap
answer count: 1
tagged with: jquery
tagged with: angularjs
has body: I am using AngularStrap in my application. I am tying to implement the modal feature of bootstrap. The problem is that I can't make it to show up my template modal. Here is a link to plunker. My template's id is test and I am referring in (like explained in the docs) by template='#test' but I am getting an error: Uncaught TypeError: Cannot set property 'display' of undefined.
accepted answer: http://stackoverflow.com/a/24609123
type: AnsweredQuestion

http://stackoverflow.com/q/24657139
tagged with: php
tagged with: google-places-api
tagged with: country
upvote count: 1
type: Question
score: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27630854
has body: I'm creating a web application to search business organisations in an area. User will provide keyword and zip code for the search. For searching, Place API Nearbysearch functionality is used. Latitude, longitude, radius and keyword are given for the request. I give radius of 10000. But while searching for businesses with a zip code of California, I got a business from Mexico also. I can't reduce the value of radius. How can I get places only in the country of the zip code provided by the user?
tagged with: restrictions
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Country restriction while using google place API nearby search

http://stackoverflow.com/q/24719629
has comment: http://stackoverflow.com/comment/38349300
has body: I initially developed my app on IIS and I am now moving back to Apache. I have copied the whole application directory onto a new Ubuntu 14.04 LAMP server. I am running my app as a virtual directory so that I can have multiple sites. I have deleted the web.config files and updated the .htaccess files and I have the home.ctp page loading. I have tried to load one of my index views and it starts loading the page but the CSS and Javascript don't load. In the webroot/index.php I found and updated the "CAKE_CORE_INCLUDE_PATH" which was hard coded to the Windows drive. I have my app under /usr/share/SRP and I have a SRP.conf to give me a url of http://server.com/SRP/ Alias /SRP /usr/share/SRP &lt;Directory /usr/share/SRP&gt; Options Indexes FollowSymLinks MultiViews AllowOverride All DirectoryIndex index.php Order Allow,Deny Allow from All &lt;/Directory&gt; When I try to access another page, e.g. http://server.com/SRP/users, the page loads without the CSS and Javascript. &lt;script type="text/javascript" src="/SRP/js/jquery-1.10.2.min.js"&gt; In this case the javascript doesn't load (gets a 404). &lt;img src="/SRP/img/cake.power.gif" alt="Systems Management Request Portal" border="0" /&gt; It seesm strange to me that the cake gif does load. So does DebugKit and toolbar. I think this a problem with mod_rewrite or WEBROOT_DIR.
answer count: 1
has title: CSS and JS not loading after transferring site
tagged with: .htaccess
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38346642
tagged with: css
score: 0
has answer: http://stackoverflow.com/a/24799194
tagged with: mod-rewrite
type: Question
tagged with: cakephp
tagged with: javascript
has comment: http://stackoverflow.com/comment/38412862

http://stackoverflow.com/q/24620457
type: Question
tagged with: javascript
score: 0
tagged with: angular-filters
answer count: 1
accepted answer: http://stackoverflow.com/a/24620869
tagged with: angularjs
has answer: http://stackoverflow.com/a/24620869
type: AnsweredQuestion
has body: When trying to add a set of filters to my Serenity app (https://github.com/jfox015/Serenity), I get an "Uncaught Object" error when trying to inject a filter into my app. When I remove the filters code from the app, it works fine. Can't figure out what's wrong with the filters so that they're not be recognized as valid resources. I had them as part of the global module and then a separate module and it still fails. Here's the relevant code: Filter code stored in app/src/admin/AdminFilters.js: 'use strict'; angular.module('AdminFilters', ['USER_ROLES']) .filter('userRoleFilter', ['USER_ROLES', function(USER_ROLES) { return function(input) { return USER_ROLES[input]; }; } ]) .filter('dateJoinedFilter', function() { return function(input) { var date = new Date(input); return (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear(); }; } ) ; Angular App Declaration in app/src/app.js: var angApp = angular.module("serenityApp", ['ngRoute', 'ngResource', 'angular-md5', 'AdminFilters']) Usage in my Admin code (Abridged) in app/src/admin/adminUsersList.html: {{ user.name }} {{ user.group }} No users were found. The relevant JS files are all included in the index.html file as well:
has title: AngularJS Filter throwing "Object Uncaught" error when injected

http://stackoverflow.com/a/24739360
has body: // prepare output array $outputArray = array(); // construct 2D array while($row = mysqli_fetch_assoc($result)) { // add row to array $outputArray[] = $row; } // add some variable $outputArray['myVaraible'] = 'some value'; // close database connection mysqli_close($dbc); // construct and output JSON echo json_encode($outputArray); you will see in json array your custom variable
downvote count: 0
answers question: http://stackoverflow.com/q/24739183
upvote count: 1
type: Answer
score: 1

http://stackoverflow.com/comment/72760688
has text: I get a bad memory leak when you bump up the data a bit and set it to auto-update. http://jsfiddle.net/1hjyrr43/1/
type: AnswerComment
comment on: http://stackoverflow.com/a/24695324
score: 0
type: Comment

http://stackoverflow.com/comment/38180503
score: 0
type: Comment
type: QuestionComment
has text: why don't you use the jquey ui draggable component. http://jqueryui.com/draggable/#default
comment on: http://stackoverflow.com/q/24634306

http://stackoverflow.com/comment/38094666
has text: @Nobile Mushtak if I create multiples won't they all point to the same object? I need multiple objects with encapsulated variables and methods
comment on: http://stackoverflow.com/q/24589557
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38289529
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24674882
has text: Remove all the tags from the second file except the jsp tags. and if it still won't work add trim() : xmlHttp.responseText.trim(). It it will work remove the alert or change it to console.error and mark this answer.
type: AnswerComment

http://stackoverflow.com/comment/38293521
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24695012
has text: As far as I understand, browserify does't change the files themselves, just appends them to one another (and maybe does some small editing to resolve naming conflicts). your code should still be the same.
score: 0

http://stackoverflow.com/comment/111645902
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24644344
score: 0
has text: This regex nearly works for most use-cases, but it also matches strings that only have numbers. Is there a way, where we could also enforce at least 1 letter?

uniqueidentifier
tags question: http://stackoverflow.com/q/24689046
type: Tag
tag name: uniqueidentifier

http://stackoverflow.com/q/24617605
has comment: http://stackoverflow.com/comment/38148945
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/24618115
answer count: 1
has title: populating Moustache.js template
tagged with: quickbase
tagged with: mustache
type: UnansweredQuestion
score: 0
has body: I am currently working with a QuickBase database trying to make a custom report using moustache.js, When I was looking into moustach.js I noticed you needed to have your data in JSON format so I used (http://pastie.org/9364908#16) to get my data into JSON which then comes out like (http://pastie.org/9364674#18) My question is when I make the template for this, does it need to be all contained in the page that the call to get the json data is? I have looked at examples of mustache templates, but all I can find is it being used with data supplied right then made in JSON format, but my data I need is being supplied when I make the call so how would I go about setting that up.?

http://stackoverflow.com/a/24670787
has body: after hours of searching finally found the answer. just add return false inside onclick event after you call function name. array('class'=&gt;'linkClass','onclick'=&gt;'formSubmit(); return false;')) and javascript function should be inside &lt;script&gt; tags as rdanusha mentioned &lt;script&gt; function formSubmit(){ $('#supplier-form').submit(); } &lt;/script&gt;
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24669617
accepted answer of: http://stackoverflow.com/q/24669617
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/38326666
comment on: http://stackoverflow.com/a/24711926
type: AnswerComment
score: 0
has text: but what does this refer to then?
type: Comment

http://stackoverflow.com/comment/38197042
comment on: http://stackoverflow.com/a/24642595
type: AnswerComment
has text: you need to remove the background-image too, because by default it uses background-image not background-color... that's why I used `background-image: none;` above
score: 0
type: Comment

http://stackoverflow.com/comment/38390721
type: AnswerComment
has text: Sorry for the confusion, but LMList has already been defined elsewhere and is accessible.
type: Comment
comment on: http://stackoverflow.com/a/24737057
score: 0

http://stackoverflow.com/q/24600596
has comment: http://stackoverflow.com/comment/38134211
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/24600629
has comment: http://stackoverflow.com/comment/38117162
favorite count: 0
has body: I must be missing something here. I cannot get the variable to override properly. When I console log the data, there is a returned json object. I think I am not creating and or assigning the data object to the variable. If I console log the tcResponse I get undefined. router.get('/testcase/:id', function(req, res) { var tcResponse; var Client = require('node-rest-client').Client; var options_auth={ user:"username", password:"password" }; client = new Client(options_auth); args ={ data:{test:"hello"}, // data passed to REST method (only useful in POST, PUT or PATCH methods) path:{ "baseUrl":"http://local.dev/flex/services/rest/latest", "id":req.params.id }, // path substitution var parameters:{arg1:"hello",arg2:"world"}, // query parameter substitution vars headers:{"test-header":"client-api"} // request headers }; client.get("${baseUrl}/testcase/${id}", args, function(data, response){ // parsed response body as js object console.log(data); tcResponse = data; // raw response //console.log(response); }); res.render('testcase', { title: 'Zephyr Report - Test Case', testCaseId: req.params.id, tcResponseJson: tcResponse }); }); I believe I am missing something but unsure what. Thanks
has title: NodeJS assigning variables not working
tagged with: node.js
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/24600629
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38134241
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24600626
tagged with: express
has comment: http://stackoverflow.com/comment/38115663
has answer: http://stackoverflow.com/a/24600626

http://stackoverflow.com/q/24704071
type: Question
has comment: http://stackoverflow.com/comment/38311339
has comment: http://stackoverflow.com/comment/38310957
tagged with: javascript
has comment: http://stackoverflow.com/comment/38311041
score: 0
answer count: 2
has body: I have a page with a parent div and several child divs. These are generated dynamically. I need to save the structure (html code) of all the child divs in my database, so I get the html content using .html(). But before I save the content in db, I need to remove one or more child divs. (But these divs will still need to be on the browser page) How do I use the remove method with the selector (in this example I need to remove child3) on the output of .html() var htmlContent = $( "#graph-parent" ).html(); how do I remove child3 from htmlContent?
has answer: http://stackoverflow.com/a/24704253
tagged with: jquery
has comment: http://stackoverflow.com/comment/38311556
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38310934
has title: Jquery remove element from var
has comment: http://stackoverflow.com/comment/38311035
tagged with: css
possible better answer: http://stackoverflow.com/a/24704327
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24704327
has comment: http://stackoverflow.com/comment/38311168
accepted answer: http://stackoverflow.com/a/24704253

http://stackoverflow.com/q/24729772
has comment: http://stackoverflow.com/comment/38360932
answer count: 0
tagged with: jquery
type: Question
tagged with: settimeout
score: 0
has body: I have a table that when a cell has focus it gives me it's location in two variables. (see code below). I need to reset that location on a blur event, but keep the first data long enough to click a button. I've tried a setTimeout, but it seems to be starting on dom ready. Fairly new to javascript, so any help is appreciated. $("td input").focus(function() { // Finds current row and column number columnNumber = $(this).parent().index(); rowNumber = $(this).parent().parent().index(); }) $("td input").blur(function(){ // Delayed -- cancels current row and column number on blur clearInterval(myTimer); var myTimer = setTimeout(function(){ columnNumber = -1; rowNumber = -1; }, 5000); });
has comment: http://stackoverflow.com/comment/38360957
has comment: http://stackoverflow.com/comment/38360963
tagged with: javascript
has title: setTimeout seems to be starting too soon -- on $(document).ready()
type: UnansweredQuestion

http://stackoverflow.com/comment/38342484
score: 0
comment on: http://stackoverflow.com/q/24720160
type: Comment
type: QuestionComment
has text: I have reworded my question. There is just one main question now. I haven't used this site in a long time, so can you tell me how to remove this hold?

http://stackoverflow.com/comment/38299681
comment on: http://stackoverflow.com/a/24693725
has text: I checked the debug logs. Control never enters the Catch block.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38159872
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24622638
type: Comment
has text: You need to add `return true;` just before your final lines in the `addListener` callback-- your final three lines then should look like: `return true; } });` This is not particularly well documented, and I'm not sure I'm explaining it well, but because `tabs.query` is asynchronous and you need to run it before you can get your response, the port used for messaging is being closed before `tabs.query` finishes, and therefore before `sendResponse` is actually being called, so the content script thinks it's getting a non-response.

http://stackoverflow.com/comment/38240678
type: Comment
comment on: http://stackoverflow.com/a/24652292
score: 0
type: AnswerComment
has text: what if I need to displayed different addresses?

http://stackoverflow.com/comment/38256151
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24673271
has text: Sorry, I'm not used to stackoverflow. Thanks again.
type: AnswerComment

http://stackoverflow.com/comment/78465405
score: 4
type: Comment
has text: Code only answers aren't useful for the community. Please look at [How to Answer](http://stackoverflow.com/questions/how-to-answer)
type: AnswerComment
comment on: http://stackoverflow.com/a/45754157

http://stackoverflow.com/a/24746331
answers question: http://stackoverflow.com/q/24746230
accepted answer of: http://stackoverflow.com/q/24746230
downvote count: 0
has comment: http://stackoverflow.com/comment/38391872
type: AcceptedAnswer
upvote count: 2
has body: Replace your console.log with: document.querySelector('#rate' + i).textContent = costPerThousand; querySelector textContent Fiddle
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38391894

http://stackoverflow.com/comment/38113123
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24599437
has text: @soktinpk so what would happen if we execute a code `var a;` won't it allocate any memory for it..?
score: 0

http://stackoverflow.com/a/24605362
score: 2
type: AcceptedAnswer
downvote count: 0
has body: i=i++ This is not the correct use to increment i. What this does: Variable i gets incremented by ++. Variable i gets assigned old value of i, as i++ returns the old value of i. So basically, you are stuck in an endless loop. Just replace i=i++ with just i++ or i=i+1 or i+=1 and you should be fine. Looking at your code again, I have to tell you, that this will still not yield the desired effect, as you are setting all the intervals to fire at the same exact time. What you would want to do looks something like this: function next() { setInterval(function(){ //display next image },3000); next(); } next(); Depending on how your html-code is build, the simplest way to implement this would be: var count = 3; current = 0, img=document.getElementById("img1"); function next() { setInterval(function(){ current++; if(current &gt;= count) { current = 0; } img.src="Images/" + current + ".jpg"; },3000); next(); } next();
has comment: http://stackoverflow.com/comment/38125129
has comment: http://stackoverflow.com/comment/38125459
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24605210
answers question: http://stackoverflow.com/q/24605210

http://stackoverflow.com/comment/38153623
comment on: http://stackoverflow.com/a/24614146
score: 0
type: AnswerComment
has text: This is almost there. We're a lot closer, so thank you. The only problem is that if you select a value from the dropdown, then enter a custom value, the custom value gets writted to the associated dropdown item so if you then go back and flick between the options available in the dropdown, you'll see your custom value is associated with whatever option was selected at the time. The values need to be reset each time and go back to the original values should you enter a custom value and then go back to a dropdown list... codepen: http://codepen.io/anon/pen/uepEy
type: Comment

http://stackoverflow.com/q/24674381
upvote count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/24674635
tagged with: jquery-hover
has answer: http://stackoverflow.com/a/24674411
type: Question
has answer: http://stackoverflow.com/a/24674456
tagged with: javascript
has answer: http://stackoverflow.com/a/24674424
has body: I need your help: I got a website and i want to change the bg-coler while hovering over the menu (like on the rhcp-website) and i already tried it with jquery but it did not work.. (Just to be clear, i do not want to change the background color of the div container which contains my menu it should be the whole body..--> code) Thank you! Code: <?php include_once 'template.php' ?> Maximilian Braun Schauspieler - Fotograf <?php echo footer();?>
accepted answer: http://stackoverflow.com/a/24674411
tagged with: jquery
favorite count: 0
answer count: 5
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/24674894
tagged with: css
has answer: http://stackoverflow.com/a/24674894
score: 2
type: AnsweredQuestion
has title: How can i change the backgroundcolor via jquery?

http://stackoverflow.com/q/24707459
answer count: 2
has body: I first had a table, lets say 4x4 defined by tr and td The last td contains a checkbox and it only can be 2 options, complete or incomplete (check or unchecked). Now, on top of the table I have another dropdownlist that acts as a filter (All, Completed, Incomplete) Depending on the filter value, my JS hides or shows the requested data: var sel = $("#Filter option:selected").text(); if (sel == "All") { $('tr').find('td:has(:checkbox:checked)').parent().show(); $('tr').find('td:has(:checkbox:not(:checked))').parent().show(); } if (sel == "Complete") { $('tr').find('td:has(:checkbox:not(:checked))').parent().hide(); $('tr').find('td:has(:checkbox:checked)').parent().show(); } if (sel == "Incomplete") { $('tr').find('td:has(:checkbox:checked)').parent().hide(); $('tr').find('td:has(:checkbox:not(:checked))').parent().show(); } This works as a charm. Now, I want to change the checkbox for a dropdownlist. But I cannot find the way with JQuery to do it. I don't know the syntax to compare the text inside the dropdownlist inside the td inside the tr. I tried: $('tr').find('td').find(".dropdown :selected").parent().hide(); But I cannot find the way to specify the text inside the selected select..
tagged with: jquery
has comment: http://stackoverflow.com/comment/38378982
has answer: http://stackoverflow.com/a/24707562
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38317756
has answer: http://stackoverflow.com/a/24707624
type: Question
has title: jQuery hide row depending on table content
tagged with: javascript
tagged with: html-table
score: 0

http://stackoverflow.com/a/24719819
has body: I believe it uses a combination of things such as the url the add originates from, the size of the banner and the code for the ad within the html of the page. I think that adblock actually keeps the ad from loading and not just hiding it. Why are you wanting to hide the ad. Is it your webpage you placing the javascript?
downvote count: 0
answers question: http://stackoverflow.com/q/24719780
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38405192
has comment: http://stackoverflow.com/comment/38371830
type: Answer

http://stackoverflow.com/a/24716061
score: 1
has comment: http://stackoverflow.com/comment/38335533
has comment: http://stackoverflow.com/comment/38334105
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24715666
accepted answer of: http://stackoverflow.com/q/24715666
type: Answer
has body: Using pure JS: document.body.onkeydown = function () { var time = this._time; var timestamp = new Date().getTime(); if (time) console.log(timestamp - time); this._time = timestamp; } The console will display difference between keydown events (in ms)
downvote count: 0

http://stackoverflow.com/q/24681374
score: 0
has title: Adobe AIR : Save loaded data into a directory
has body: Im developing an application that loads some datas ( Images , sounds , texts ) into application and show it , i want to create some Cache-like system to prevent to re-load datas that already loaded. Im okey with the texts , I Did that. all i want is get the path that contain current loaded image. is there a way to find the path of loaded data , then i can copy the temp file to my cache and when i want to reload data , check for existing datas and show cached or load new data and cache it again ?
tagged with: adobe
has comment: http://stackoverflow.com/comment/38306683
type: UnansweredQuestion
answer count: 0
type: Question
tagged with: air
tagged with: javascript
has comment: http://stackoverflow.com/comment/38306682

http://stackoverflow.com/q/24695703
upvote count: 3
has body: I have the following Ajax.BeginForm inside my asp.net mvc razor view:- &lt;div id="searchform"&gt; @using (Ajax.BeginForm("AdvanceSearchIndexByName","Home", new AjaxOptions { HttpMethod = "get", InsertionMode = InsertionMode.Replace, LoadingElementId = "progress2", UpdateTargetId = "SearchTable2" })) { } &lt;input class="btn btn-success" type="submit" value="Clear" id="clear" /&gt; and i wrote the following javaScript:- &lt;script type="text/javascript"&gt; $("#clear").on('click', function () { alert('2'); $('#searchform').clear(); }); &lt;/script&gt; to reset the form values when clicking on the "clear" button, but currently the clear button will not have any effect.can anyone advice ? Thanks
answer count: 1
has title: How to reset my Ajax.Begin form fields value using jQuery
linked to: http://stackoverflow.com/q/6653556
favorite count: 0
tagged with: razor
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/38294501
accepted answer: http://stackoverflow.com/a/24695754
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24695754

http://stackoverflow.com/comment/38206345
has text: This is simply not JSON. Names in JSON are between quotes. See http://json.org
comment on: http://stackoverflow.com/q/24648072
type: Comment
type: QuestionComment
score: 5

http://stackoverflow.com/q/24653779
favorite count: 0
accepted answer: http://stackoverflow.com/a/24654703
tagged with: angularjs
answer count: 4
has title: AngularJS. Filter array by array
score: 2
upvote count: 2
has body: I have data structure like this: $scope.data = [ { title: "Title1", countries: ['USA', 'Canada', 'Russia'] }, { title: "Title2", countries: ['France', 'Germany'] } ]; I.e. each item has array of country names. I'm showing this data like this: &lt;tr ng-repeat="dataItem in data"&gt; I want allow user to filter this list by providing list of countries in input: How to acheive this? Currently I'm did something like this: &lt;input ng-model="searchFilter.countries"&gt; ... &lt;tr ng-repeat="dataItem in data | filter: searchFilter: true"&gt; But obviously it works only for 1 country, not for array of countries listed in input using comma.
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24659969
has answer: http://stackoverflow.com/a/24654703
has answer: http://stackoverflow.com/a/24659969
has answer: http://stackoverflow.com/a/24654707
tagged with: javascript
has comment: http://stackoverflow.com/comment/38218180
downvote count: 0
has answer: http://stackoverflow.com/a/24654172

http://stackoverflow.com/comment/38369351
comment on: http://stackoverflow.com/a/24721288
score: 0
type: AnswerComment
has text: I solve the problem with a delay for infowindow.open(map, marker);
type: Comment

http://stackoverflow.com/q/24589582
downvote count: 0
has comment: http://stackoverflow.com/comment/38094367
tagged with: javascript
has answer: http://stackoverflow.com/a/24589610
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24589610
has answer: http://stackoverflow.com/a/24589612
has comment: http://stackoverflow.com/comment/38094349
favorite count: 0
has body: I'm currently working on a project, in which I have to load an array from localStorage and from this loop through it to generate elements. I have the saving process working as expected, however when it comes down to loading it - I recieve the following error. TypeError: undefined is not a function (evaluating 'mainInfo.forEach') Below you are able to see the code which is throwing this error. var mainInfo = []; var subInfo = []; mainInfo = localStorage.StaffAppMainList; subInfo = localStorage.StaffAppSubList; finalOutput = ""; console.log(mainInfo.length); mainInfo.forEach(function(item) { var theTitle = item.title; var url = "Pages/SubInfo.html?info=" + theTitle; finalOutput = finalOutput + "&lt;li&gt;&lt;a href='" + url + "'&gt;" + item.title + "&lt;/a&gt;&lt;/li&gt;"; $("#homeList").html(finalOutput).listview().listview("refresh"); }); The line the error is thrown on is - mainInfo.forEach(function(item) { Currently I'm unsure of what is causing this error, and so any advice will be greatly appreciated.
has title: Javascript - Undefined is not a function
upvote count: 1
possible better answer: http://stackoverflow.com/a/24589612
type: AnsweredQuestion
score: 1
type: Question
answer count: 2

http://stackoverflow.com/q/24629412
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/24629748
type: AnsweredQuestion
has title: case sensitive filter in angular js without using user defined filter
upvote count: 3
type: Question
tagged with: javascript
score: 3
has body: can anyone please tell me how to do a case sensitive filter without using user defined filter in angularjs, see here i want to print all the names except john, but when i put filter:{item: '!john'} it removes john, johnmathew as well as johnny, but i needs only john to be removed. html &lt;div ng-app='myApp' ng-controller="Controller"&gt; &lt;div ng-repeat="val in items | filter:{item: '!john'}"&gt;{{val.item}}&lt;/div&gt; &lt;/div&gt; script var app = angular.module('myApp', []); app.controller('Controller', function ($scope) { $scope.items = [{ item: 'john' }, { item: 'sunny' }, { item: 'johnmathew' }, { item: 'lenu' }, { item: 'binu' }, { item: 'johnny' }]; }); JSFiddle
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24629748

http://stackoverflow.com/comment/38333110
has text: should be able to compile them and push them into `$templateCache`. If the `templateUrl` exists in `$templateCache` it gets pulled from there first to save unneeded ajax calls. Use script tags. Alternatively replace all the script tag innerhtml with jade compiled html before bootstrapping angular
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24713990

http://stackoverflow.com/comment/38128022
type: AnswerComment
has text: content is the page pertaining to the pop up image. This is the site am talking abt styletag.com
type: Comment
comment on: http://stackoverflow.com/a/24604386
score: 0

http://stackoverflow.com/q/24701800
accepted answer: http://stackoverflow.com/a/24705568
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/38306569
has body: I have a line chart were in some cases I manually assign a null value so that point is not represented in the graphic. I use the connect nulls property to connect the points before and after them. http://jsfiddle.net/fpanci/q72CG/ My problem is that I need to do that with some nulls but not with all of them. Is there a way to tell highcharts not to connect one point? Probably change that null with some special value? For example, here I want the chart ending at 29 and restart in 30. series: [{ connectNulls: true, data:[20,27,35,null,29, null ,30,null,22,null] }] Thanks!
answer count: 1
tagged with: highcharts
has answer: http://stackoverflow.com/a/24705568
has title: Line chart connectnulls but not all nulls

http://stackoverflow.com/a/24704883
has body: save your data in $_SESSION and store on second page render &lt;?php session_start(); // store session data $_SESSION['phone']=511111111; ?&gt; OR in client side save variable in local storage localStorage.setItem("phone", 511111111); AND YOU WILL ACCESS TO VARIABLE FROM ANY (SAME) PAGE localstorafe.getItem("phone");
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24704842
type: Answer
has comment: http://stackoverflow.com/comment/38312572
accepted answer of: http://stackoverflow.com/q/24704842
has comment: http://stackoverflow.com/comment/38312606
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38313051

http://stackoverflow.com/q/24658373
accepted answer: http://stackoverflow.com/a/24659316
tagged with: youtube-javascript-api
tagged with: youtube-api
has title: Play/Pause button for a youtube video
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: onclick
type: Question
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/34943943
tagged with: javascript
favorite count: 0
has body: I want to have a play / pause toggle button that controls my youtube video. Play / Pause Right now it is just a link. This is the javascript code for the onPlayerReady function function onPlayerReady(event) { var playButton = document.getElementById("play-button"); playButton.addEventListener("click", function(event) { if (event.data==YT.PlayerState.PLAYING) { player.pauseVideo(); }else { player.playVideo(); } }); For some reason when I click the link it always does the else command. How can I get it to recognize that the video is currently playing? Is there a better way to do this play / pause toggle action? SOLUTION for onPlayerStateChange function onPlayerStateChange(event) { if (event.data == YT.PlayerState.BUFFERING) { event.target.setPlaybackQuality('hd1080'); } if (event.data == YT.PlayerState.PAUSED) { $("#play-button").attr("src", "http://www.beached.tv/assets/play-0a292db2c7cb500e5e768d0222ef1f94.svg"); this.is_playing = false; } if (event.data == YT.PlayerState.PLAYING) { $("#play-button").attr("src", "http://www.beached.tv/assets/pause-c1c0a3d060f908372ebecf2eb7e7c018.svg"); this.is_playing = true; } } FULL CODE
possible better answer: http://stackoverflow.com/a/34943943
has answer: http://stackoverflow.com/a/24659316

http://stackoverflow.com/a/46670605
has body: As you said it's a nginx problem, but probably if you don't set in the nginx config the proxy parameters nginx default depends on the operative system, because in Ubuntu 16.04 I haven't any problem with a 10min timeout and without any proxy parameter, but in centos and redhat I saw the 1 min timeout restriction. I add a configuration example because there are two parameters more than proxy_read_timeout that you need to set: server { listen 80; server_name myserver; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 180s; proxy_send_timeout 180s; proxy_read_timeout 180s; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } For this issue the important parameters are: proxy_connect_timeout 180s; proxy_send_timeout 180s; proxy_read_timeout 180s;
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24700047
type: Answer
upvote count: 2

http://stackoverflow.com/a/24749088
answers question: http://stackoverflow.com/q/24749023
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38397335
has comment: http://stackoverflow.com/comment/38441269
upvote count: 1
has body: &lt;div data-hello-world="hi" one="bye"&gt; &lt;/div&gt; app.directive('helloWorld', function() { return { restrict: 'A', link: function(scope, elem, attrs) { console.log(attrs.one); // bye console.log(attrs.helloWorld); // hi } } }); Here 'helloWord' directive is used as an attribute. so that the value assigned to "data-hello-world" which is "hi" will be found in parameter called attrs defined in link function. Same time it will look for other attributes mentioned with helloWorld directive. here i've mentioned 'one' attribute and this can also be found in attrs parameter defined in link function. you can get attributes' values from attrs parameter. (And yes there are mulitple ways to bound a value as you have mentioned in your description) any further question, raise your question and answer will be given.
score: 1
has comment: http://stackoverflow.com/comment/38508827
accepted answer of: http://stackoverflow.com/q/24749023

http://stackoverflow.com/q/24688520
has answer: http://stackoverflow.com/a/24688634
accepted answer: http://stackoverflow.com/a/24688634
has answer: http://stackoverflow.com/a/24688559
tagged with: arrays
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/24688538
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/24688538
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/24688686
has answer: http://stackoverflow.com/a/24688714
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24688641
score: 1
has title: javascript- check if value of object in array is not exist
has body: I have this simple array with objects and values, but not all objects have same values: var array = [ {name: '‏aaa', mobile: '111-111'}, {name: '‏bbb', mobile: '222-222', adress: '333-333'}, {name: '‏ccc', mobile: '444-444', adress: '555-555'} ] the first object doesn't have an address. so when I tried to append it to html I got undefined word: jQuery: $('ul').append( ' ‏'+array[i].name+' '+ ' ‏'+array[i].mobile+' '+ ' ‏'+array[i].adress+' '+ )} HTML: ‏‏aaa ‏111-111 ‏undefined ‏‏bbb ‏222-222 ‏333-333 how can to check if this value not exist then show nothing instead of undefined word?, or even to not show the whole li tag? JSFiddle DEMO
type: Question

http://stackoverflow.com/comment/38335839
score: 0
type: AnswerComment
type: Comment
has text: Thanks Chris, but i don't want this, i've already tried that. I wanna change my original background to other i've already make without filling with colors or somethin'
comment on: http://stackoverflow.com/a/24716973

http://stackoverflow.com/a/24708847
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24708688
score: 1
answers question: http://stackoverflow.com/q/24708688
has comment: http://stackoverflow.com/comment/38320487
has comment: http://stackoverflow.com/comment/38320767
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38320716
has body: If you want to go the route of putting the whole array into javascript when php renders the page ?&gt; &lt;script&gt; $(function(){ var myData = &lt;?php echo json_encode( $marketplaces ); ?&gt; $("#marketplace_id").change(function(){ var value = $(this).val(); $("#market_hint").html(myData[value]["example"]); }); //do a call here to do an initial setting of the span $("#marketplace_id").change(); }); &lt;/script&gt; Otherwise you will have to do an ajax request to a script that will give you the data $(function(){ $("#marketplace_id").change(function(){ var value = $(this).val(); $.get("someScript.php?theIndex="+value) .done(function(response){ $("#market_hint").innerHTML = response; }); }); }); someScript.php &lt;?php $index = isset($_GET["theIndex"]) ? intval($_GET["theIndex"]) : 0; //do some processing to get the needed data //... echo $data; die; Of course tailor it to fit in with your laravel framework, just used plain php as I do not overly know laravel

http://stackoverflow.com/comment/38203274
has text: $("#element")[0] return javascript node (document.getElementById("element")). `$("body")[0] === document.body // true`
score: 0
comment on: http://stackoverflow.com/a/24646043
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24689229
downvote count: 0
type: Answer
has body: Pretty much going along the same lines of the answer that just beat me to the punch, but I did have a longer explanation, so it takes a while. So very much the same thing with one more tweak. Doing the transactions using the $inc operator on your balance is what you want rather than recalculating, so essentially this block of code: bucket.find({ "account": accId, "owner": owner, "day": day }).upsert().updateOne( { "$inc": { "balance": amount }, "$push": { "transactions": { "$each": [{ "amount": amount, "added": date }], "$sort": { "added": -1 } } } } ); The other "tweak" part is the buckets concept. While basically doing this with an array is a good idea and the use of $inc makes that part of the transaction atomic, the problem is you don't want lots of items in the array. And this will grow considerably over time. The best way to do this is to only keep so many items in that array and limit these to "bucketed" results. I also have added a little more handling in here for at least "Attempting" to keep a singular "balance" point in sync, but in reality you probably want to verify that periodically, as the resulting multiple updates are not bound by on a transaction. But the update on the "bucket" is atomic. Mileage may vary to actual implementation, but here is the essentinal demonstration code: var async = require('async'), mongoose = require('mongoose'), Schema = mongoose.Schema; mongoose.connect('mongodb://localhost/shop'); var ownerSchema = new Schema({ name: String, email: String, accounts: [{ type: Schema.Types.ObjectId, ref: "Account" }] }); var transactionSchema = new Schema({ amount: Number, added: Date }); var recentBucketSchema = new Schema({ _id: { type: Schema.Types.ObjectId, ref: "AccountBucket" }, day: Date }); var accountSchema = new Schema({ owner: { type: Schema.Types.ObjectId, ref: "Owner" }, balance: { type: Number, default: 0 }, recent: [recentBucketSchema] }); var accountBucketSchema = new Schema({ day: Date, account: { type: Schema.Types.Object…
upvote count: 2
has comment: http://stackoverflow.com/comment/38286696
answers question: http://stackoverflow.com/q/24687011
has comment: http://stackoverflow.com/comment/38286571
score: 2

http://stackoverflow.com/q/24662788
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24662985
has body: When a div is clicked, it pulls in html from another webpage using AJAX. But how do I have divs on the new page clickable without using inline js. First Page: Click Here ajax/content.html: This is Some content Load Even More Content I understand that the div isn't present on the page when the JS is loaded and therefor doesn't realise that that div should now have a click event. I can obviously add an inline onclick or use jQuery, but I don't want to do either of those. Thanks
has title: How use click event after xhr load without query
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/comment/38204527
has text: @user3143218 Oh, definitely ... added as a note.
comment on: http://stackoverflow.com/a/24646977
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/112166526
type: Comment
score: 13
type: AnswerComment
comment on: http://stackoverflow.com/a/24644405
has text: The whole JavaScript scene on StackOverflow is just ruined. Unless someone defines explicitly that they want JQuery, then JavaScript means just that -- clean JavaScript. Frameworks come and go, and since people somehow imagine replying with jQuery explicit code is OK -- StackOverflow is swamped with hundreds of thousands of replies like this, where you mistake a framework for a language or platform!

http://stackoverflow.com/comment/38372071
score: 0
type: AnswerComment
has text: Okay I moved it over the and it kinda works.. The problem is that the `mod_rokminievents3` doesn't exist unless you click the navigation. Here is the demo of the plugin [link](http://demo.rockettheme.com/joomla-extensions/rokminievents/) so you can see what kind of navigation I am talking about..In the demo they are using google calendar instead of Jevents so it works fine.
type: Comment
comment on: http://stackoverflow.com/a/24735349

http://stackoverflow.com/comment/38235062
type: Comment
comment on: http://stackoverflow.com/a/24662832
has text: Thank you @durbnpoisn. This is a great breakdown, very helpful in understanding how this is structured. Thanks for your time and input!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38431397
type: Comment
comment on: http://stackoverflow.com/a/24726513
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/57350/discussion-between-aarosil-and-cmpsoares).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38275465
type: Comment
comment on: http://stackoverflow.com/q/24685106
type: QuestionComment
has text: If I were you, I would consider the `GIF`-format instead.
score: 0

http://stackoverflow.com/q/24610950
downvote count: 0
tagged with: javascript
tagged with: couchdb
score: 2
accepted answer: http://stackoverflow.com/a/24613547
favorite count: 0
upvote count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38143420
has title: Write query for couchDB
has answer: http://stackoverflow.com/a/24613547
has body: How to write simple query in couchDB for documents of this type { _id: q12312312, _rev: 1-f591846a021c02a6014702f35cc8627c, mid: e1e410788853b1cfd7820b9092004686, uid, e1e410788853b1cfd7820b9092000f60 } I want to get documents by "uid". In SQL that would be done with this command: SELECT * FROM users_music WHERE uid="1edsae23wsa" I have a view in CouchDB `function(doc) { if(doc.uid &amp;&amp; doc.mid) { emit(doc.uid, doc.mid); } }` When I try to access this view from this link http://localhost:5984/user_music/_design/music/_view/musicview?key=e1e410788853b1cfd7820b9092000f60 I get {"error":"bad_request","reason":"invalid_json"}
type: Question
answer count: 1

http://stackoverflow.com/a/24637845
has body: Just use the getCookie function from Read cookies with JavaScript function cookie_loader() { document.forms["sampleform"]["samplebox"].value = getCookie("text"); } Put this call this function onLoad.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24637167

http://stackoverflow.com/q/24642070
type: Question
has answer: http://stackoverflow.com/a/24642234
linked to: http://stackoverflow.com/q/7656280
has comment: http://stackoverflow.com/comment/38195101
has comment: http://stackoverflow.com/comment/38195495
has comment: http://stackoverflow.com/comment/38195007
score: 0
has comment: http://stackoverflow.com/comment/38243624
has title: How to refer to the Arguments class in JavaScript?
tagged with: types
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38195169
tagged with: instanceof
has body: Simply put, in JavaScript, the variable arguments (through which you can get all arguments of current function) is not of type Array, but the console says it is of type Arguments. You can't get this class by simply typing Arguments (like you do with eg. String), so I get a reference of it like: Arguments = function(){return arguments.constructor;}(); so I can type check like this: function foo() { bar = arguments; } foo(); bar instanceof Arguments; Is there a way to directly refer to the Arguments object? (Instead of generating it out, as in the former snippet?) Ps.: The project I am working on is a type checking system for debugging purposes. You could assign types for object variables like MyClass.fileds = {speed: Number, color: String}, that are then checked when assigned. And I came around using Arguments objects, and it would have been nice just to write {args: Arguments}.
tagged with: typechecking
has comment: http://stackoverflow.com/comment/38195109
has comment: http://stackoverflow.com/comment/38195084
has comment: http://stackoverflow.com/comment/38195441
tagged with: constructor
type: UnansweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/38161415
type: AnswerComment
score: 0
type: Comment
has text: Thank you for the answer. But the goggle button seems smaller than the cxeck box control!
comment on: http://stackoverflow.com/a/24617493

http://stackoverflow.com/comment/38428694
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24745701
has text: Thank you very very much to everyone who contributed to my question,I have to apologize for the unformatted message since it was my very first time asking something on this forum. I am currently evaluating all options although I managed to get a result that does what I want, but I may find a cleaner way to do it... I will include my results as I have them. Thanks again
score: 0

http://stackoverflow.com/q/24710804
downvote count: 0
possible better answer: http://stackoverflow.com/a/24710840
score: 1
has answer: http://stackoverflow.com/a/24710819
has answer: http://stackoverflow.com/a/24710840
has answer: http://stackoverflow.com/a/24710825
accepted answer: http://stackoverflow.com/a/24710825
type: Question
has title: Regex /g - global search flag not count ending tag as next starting tag
tagged with: javascript
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/38324333
has comment: http://stackoverflow.com/comment/38324316
favorite count: 0
has body: I have a line of text which is like: Hi %this% is the %text% I was talking about. I want to replace %this% and %text% with some other text. I am using this regex: str.replace(/(%)(.*)(%)/g, "something") But this replaces three strings %this%, %text% and also % is the %. Is there any flag to let /g start afresh after the % ending tag and not count it as the next starting tag ?
has comment: http://stackoverflow.com/comment/38324299
tagged with: regex
type: AnsweredQuestion

http://stackoverflow.com/comment/38146575
comment on: http://stackoverflow.com/a/24616390
type: Comment
has text: That is indeed a bad idea. All of the webpage is erased when I use write() as Jeff Shaver said! I tried all of these but none of them work so I'm doing something wrong. Can't I just replace them with write()?
score: 0
type: AnswerComment

http://stackoverflow.com/q/24663251
has answer: http://stackoverflow.com/a/24787449
has comment: http://stackoverflow.com/comment/38400400
has comment: http://stackoverflow.com/comment/38667310
downvote count: 0
has comment: http://stackoverflow.com/comment/38435302
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38440561
has comment: http://stackoverflow.com/comment/38445468
has comment: http://stackoverflow.com/comment/38430888
has comment: http://stackoverflow.com/comment/38439624
has comment: http://stackoverflow.com/comment/38442844
has comment: http://stackoverflow.com/comment/38395973
has comment: http://stackoverflow.com/comment/38426389
has comment: http://stackoverflow.com/comment/38426980
answer count: 1
has comment: http://stackoverflow.com/comment/38432649
accepted answer: http://stackoverflow.com/a/24787449
favorite count: 0
tagged with: backbone.js
tagged with: model
has body: I have a backboneJS app that has a router that looks var StoreRouter = Backbone.Router.extend({ routes: { 'stores/add/' : 'add', 'stores/edit/:id': 'edit' }, add: function(){ var addStoresView = new AddStoresView({ el: ".wrapper" }); }, edit: function(id){ var editStoresView = new EditStoresView({ el: ".wrapper", model: new Store({ id: id }) }); } }); var storeRouter = new StoreRouter(); Backbone.history.start({ pushState: true, hashChange: false }); and a model that looks like: var Store = Backbone.Model.extend({ urlRoot: "/stores/" }); and then my view looks like: var EditStoresView = Backbone.View.extend({ ... render: function() { this.model.fetch({ success : function(model, response, options) { this.$el.append ( JST['tmpl/' + "edit"] (model.toJSON()) ); } }); } I thought that urlRoot when fetched would call /stores/ID_HERE, but right now it doesn't call that, it just calls /stores/, but I'm not sure why and how to fix this? In devTools, here is the url it's going for: GET http://localhost/stores/
has comment: http://stackoverflow.com/comment/38435273
has comment: http://stackoverflow.com/comment/38404109
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: underscore.js
has title: Not fetching correct url issue
type: Question

http://stackoverflow.com/q/24588313
has comment: http://stackoverflow.com/comment/38091893
has comment: http://stackoverflow.com/comment/38092066
has title: Starting at a specific index in each function
has body: Please take a look at this fiddle How can I use slice in the loop to make it return results starting from a specific index? The JSON file: [ { "title": "A", "link": "google.com", "image": "image.com", "price": "$1295.00", "brand": "ABC", "color": "Black", "material": "Rubber" } ] I want it to return results starting from brand: brand - ABC color - Black material - Rubber I don't know where to put .slice(4) in the loop. I got undefined error using $.each(value.slice(4),function(key, value) Here's the code: JS: $.ajax({ url: "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%20%3D%22http%3A%2F%2Fgoo.gl%2FaZgYDB%22&amp;format=json&amp;diagnostics=true&amp;callback=", success: function (data) { var item_html=""; $(data.query.results.json).each(function(key, value) { $.each(value,function(key, value){ item_html += '&lt;h3&gt;'+key+' - '+value+'&lt;/h3&gt;'; }); }); $('#area').append(item_html); } });
type: Question
has answer: http://stackoverflow.com/a/24588368
tagged with: javascript
has comment: http://stackoverflow.com/comment/38091992
tagged with: slice
has answer: http://stackoverflow.com/a/24588481
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38092050
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24605237
has comment: http://stackoverflow.com/comment/38125036
has body: how i can to find selected text in a div , in html for example we have selected from 5 to 11 in this text : This is some text selected : is some , but in html is : id="txt how to find this and replace between or that other tags to avoid loss of ? excuse me for my bad english :)
tagged with: text
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/6251937
tagged with: selection
accepted answer: http://stackoverflow.com/a/24605402
tagged with: javascript
has comment: http://stackoverflow.com/comment/38124846
type: AnsweredQuestion
has title: how to find selected text in html
tagged with: http://stackoverflow.com/tag/html
type: Question
has answer: http://stackoverflow.com/a/24605402

http://stackoverflow.com/q/24711075
linked to: http://stackoverflow.com/q/3558119
type: AnsweredQuestion
has body: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; &lt;!-- var x = 26; do{ document.write(x + " et voilà! &lt;br /&gt;"); x++; }while(x&lt;32); //--&gt; &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; I don't know why the above code doesn't work. The browser window just keeps on loading and nothing appears. I can't even use F12 in Google Chrome to debug the code. I am not sure but I think that the problem lies with the &lt;br /&gt; tag. &lt;br&gt; and &lt;br/ &gt; seem to work fine, but not &lt;br /&gt; and &lt;br/&gt;. (Note the spaces). Shouldn't all four work properly? (Dunno why, but the code started working. I am very, very sure that it wasn't working at first. Weird.) Also when &lt;br&gt; or &lt;br/ &gt; are used the printed text is et voilÃ ! rather than et voilà! Any thoughts?
has comment: http://stackoverflow.com/comment/38324940
type: Question
has answer: http://stackoverflow.com/a/24711093
has comment: http://stackoverflow.com/comment/38324791
tagged with: javascript
has answer: http://stackoverflow.com/a/24711115
has comment: http://stackoverflow.com/comment/38325033
linked to: http://stackoverflow.com/q/4696499
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/38325193
possible better answer: http://stackoverflow.com/a/24711115
linked to: http://stackoverflow.com/q/7256049
has comment: http://stackoverflow.com/comment/38325011
linked to: http://stackoverflow.com/q/13380206
has comment: http://stackoverflow.com/comment/38325486
accepted answer: http://stackoverflow.com/a/24711093
has title: Why does this Javascript code behave like this?
has answer: http://stackoverflow.com/a/24711165
linked to: http://stackoverflow.com/q/1507939
linked to: http://stackoverflow.com/q/1174847
has comment: http://stackoverflow.com/comment/38324790

http://stackoverflow.com/q/24610727
has answer: http://stackoverflow.com/a/24610839
type: Question
tagged with: gwt
upvote count: 5
tagged with: java
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24629783
favorite count: 0
has comment: http://stackoverflow.com/comment/38135187
has body: I want to use javascript library in java source code. I read sth about it and I read, that I should use ScriptInjector. This class has 2 inner classes: ScriptInjector.FromString and ScriptInjector.FromUrl. I want to load javascript library from local file, so I should use from string. How to do it? ScriptInjector.fromString("myLibrary.js"); does not work. Where to add library?
type: UnansweredQuestion
has title: Usage of ScriptInjector in GWT

http://stackoverflow.com/a/72437084
has comment: http://stackoverflow.com/comment/128334490
downvote count: 3
score: -2
has comment: http://stackoverflow.com/comment/128335495
has body: You could use setState() only after comparing the current state value and the new one and they are different.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24718709

http://stackoverflow.com/q/24608717
has title: Polymer Core Scaffold - Set width to change at
type: Question
tagged with: polymer
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/24613639
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: How would you change the width that a core scaffold would resize at?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24622037
has answer: http://stackoverflow.com/a/24622037
has answer: http://stackoverflow.com/a/24613639

http://stackoverflow.com/comment/38264679
has text: I see. The reason I was asking is mostly because of the "this" and "that" usage in JavaScript. I use "that" inside functions
comment on: http://stackoverflow.com/a/24679425
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38359006
type: QuestionComment
score: 0
has text: but that just pushes the event 100 down when I want up?
type: Comment
comment on: http://stackoverflow.com/q/24728689

http://stackoverflow.com/q/24739079
accepted answer: http://stackoverflow.com/a/24942676
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
possible better answer: http://stackoverflow.com/a/24753716
has answer: http://stackoverflow.com/a/24753716
has comment: http://stackoverflow.com/comment/38379650
downvote count: 0
has comment: http://stackoverflow.com/comment/38380644
tagged with: javascript
has comment: http://stackoverflow.com/comment/38380817
favorite count: 0
tagged with: kendo-ui
has answer: http://stackoverflow.com/a/24942676
answer count: 3
has comment: http://stackoverflow.com/comment/38404939
tagged with: telerik
has answer: http://stackoverflow.com/a/24862824
has title: Kendo UI Scheduler not binding resources properly
has body: I'm having trouble trying to get my KendoUI Scheduler resources to populate correctly. I haven't found a good example of how to bind a nested JSON object (in this case Task and User listed in the screenshot) to resources that are fetched. Also while running Fiddler, it seems like the resources listed below aren't even fetched from the web service. The documentation is super unclear on some of the specifics and I'm having a hard time finding the problem. The schedule actually pulls back all the SchedulerEvents (the JSON fetched below) and shows me events bound to the Schedule properly, just they have no resources attached. Right now all of my webservice calls are running off localhost so JSONP shouldn't be required yet as my service calls are all calling "localhost". I did find something similar to what I'm trying to do with projection of data here via Telerik's documentation, but I haven't been able to figure out a good solution yet. Edited : updated my question with individual DataSource code Edited 2 : I should also mention since posting this, the JSON screenshot isn't entirely accurate anymore as I've taken ScheduledTaskId and UserId (the two identifying properties of my Task and User resources I'm trying to add to appointments) and made that property available directly from my SchedulerEvent class to avoid nesting objects. Javascript //Datasources code has been moved to here. Explicitly fetching data and assigning to Resources datasource properties $("#scheduler").kendoScheduler({ date: new Date("@DateTime.Now.ToShortDateString()"), timezone: "Etc/UTC", views: [ "day", { type: "week", selected: true }, "month", "agenda" ], dataSource: { batch: true, transport: { read: { url: "ServiceURI/Schedule/Get", dataType: "json" }, update: { url: "", dataType: "json" }, create: { url: "", dataType: "json" }, destroy: { url: "", dataType: "json" }, parameterMap: function (options, operation) { if (operation !== "read" &amp;&amp; options.models) { return { models: kendo.stri…
upvote count: 1

http://stackoverflow.com/q/24681635
tagged with: jquery
has title: disabling textbox for multiple rows dynamically
accepted answer: http://stackoverflow.com/a/24681951
tagged with: http://stackoverflow.com/tag/html
score: 0
has body: I create rows dynamically using the event onfocus of d or w field. I got that correct,but the radio button- when i choose dm, d should be disabled and cm, w should be disabled. I am not sure how to do that. Please help me out Type A d w Dm Cm $(document).ready(function () { if ($('#rd').prop('checked')) { $(".c1").attr("disabled", "disabled"); } else if($('#rc').prop('checked')) { $(".c2").attr("disabled", "disabled"); } var counter = 0; $(document).on("focus", ".amt", function (event) { counter++; var list = ' Dm Cm '; $('#tvtable').append(list); }); }); http://jsfiddle.net/A8G5v/
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24681951
tagged with: javascript
answer count: 1

http://stackoverflow.com/a/24661770
type: Answer
has body: Given this syntax: var a = 1; // or this could be an Ajax response handler, or some other asynchronous function setTimeout(function(){ a = 2; var b = 7; alert('something'); },1000); alert(a); You will always receive an alert of "1". This is because that inner function is called after the alert is called. This means the value of a has not yet changed. You may want to look into asynchronisity. You would not be able to access b, because b only exists in the inside function. This is something called "variable scoping". You cannot access the value of 'something' because that isn't assigned to a variable at all.
answers question: http://stackoverflow.com/q/24661652
score: 0

http://stackoverflow.com/a/24670880
has comment: http://stackoverflow.com/comment/38248718
has comment: http://stackoverflow.com/comment/38248556
has comment: http://stackoverflow.com/comment/38248938
has comment: http://stackoverflow.com/comment/38248730
answers question: http://stackoverflow.com/q/24670599
has body: There are several ways to address this depending on the HTML structure. Following your example you could do something as simple as this: $('.column-'+positionID + ':contains("yes")').html('&lt;img src="image.png" /&gt;'); $('.column-'+positionID + ':contains("no")').html('&amp;nbsp;'); :Contains will match if the cell contains the text (ignoring whitespace and other text).
has comment: http://stackoverflow.com/comment/38248672
upvote count: 2
has comment: http://stackoverflow.com/comment/38248758
accepted answer of: http://stackoverflow.com/q/24670599
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38248839
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38248791

printers
tag name: printers
type: Tag
tags question: http://stackoverflow.com/q/24669670

http://stackoverflow.com/a/24600674
upvote count: 4
has body: Modify your code , with this one. &lt;input type="hidden" class="form-control" id="user_id" name="user_id" value="" /&gt; $(document).ready(function(){ $("#fired").click(function(){ $("#user_id").val($(this).attr('data-id')); $('#firedModal').modal('show'); }); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24600562
answers question: http://stackoverflow.com/q/24600562
type: Answer
has comment: http://stackoverflow.com/comment/134325169
score: 4

http://stackoverflow.com/a/24593602
type: Answer
answers question: http://stackoverflow.com/q/24593539
score: 0
has body: If i understood correctly, you can use the :visible selector to check the visibility of an element to hide it using fadeOut and show the other element using fadeIn in the callback of fadeOut function. $('input').click(function(){ if($('#first').is(':visible')) $('#first').fadeOut('slow',function(){ $('#second').fadeIn('slow'); }); else $('#second').fadeOut('slow',function(){ $('#first').fadeIn('slow'); }); }); Demo

http://stackoverflow.com/q/24714930
type: UnansweredQuestion
score: 0
has body: I would like to pipe a remote file stream to google drive. Using the request lib you can do something like to download things locally. request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) I would like to somehow pipe that stream to google drive using the google-api-nodejs-client. Based on the examples it would be something like: // insertion example client .drive.files.insert({ title: 'Test', mimeType: 'text/plain' }) .withMedia('text/plain', 'Hello World') .withAuthClient(auth) .execute(function(err, result) { console.log('error:', err, 'inserted:', result.id); }); I'm not sure how or where to pair the write stream to the withMedia.
has title: Google Drive API with Requests.
type: Question
answer count: 1
tagged with: javascript
tagged with: node.js
tagged with: google-drive-api
has answer: http://stackoverflow.com/a/31078530

http://stackoverflow.com/comment/38286263
type: QuestionComment
has text: updated. I added an interval.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24690970

http://stackoverflow.com/comment/45813301
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24663315
has text: this is the **most helpful explanation** I've read in a few days (and I've read a lot). I can't explain how grateful I am! :) I think you should stress out more the difference between the two, that `.catch` will **catch errors even inside the success function**.. Personally, I find this extremely wrong as you end up with one error-entry point, which can get multiple errors from multiple actions, but this is my problem. Anyways - thanks for the info! Don't you have some online communication tool you are willing to share so I can ask few things more? :P
score: 12

http://stackoverflow.com/comment/38143517
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24614899
type: QuestionComment
has text: IE does not like cross-domain ajax requests... You should perform an ajax call to your server and send the api request from the server and pipe the results back to the client. http://stackoverflow.com/questions/3362474/jquery-ajax-fails-in-ie-on-cross-domain-calls

http://stackoverflow.com/q/24645348
tagged with: webview
type: Question
possible better answer: http://stackoverflow.com/a/24645400
tagged with: javascript
has answer: http://stackoverflow.com/a/24645400
has comment: http://stackoverflow.com/comment/38201460
accepted answer: http://stackoverflow.com/a/24645394
score: 0
answer count: 2
has body: i have web view and i try to give the user button to refresh but i cant set that button i try to use this code the refresher button imgbtr2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { ImageButton imgbtr2 = (ImageButton) findViewById(R.id.imageButtonr2); WebView webView = (WebView)findViewById(R.id.webView); webView.loadUrl("javascript:window.location.reload(true)"); // TODO Auto-generated method stub } }); the webview webView = (WebView) findViewById(R.id.webView1); webView.loadUrl("http://m.facebook.com/"); webView.setWebChromeClient(new WebChromeClient()); webView.setWebViewClient(new WebViewClient()); webView.getSettings().setJavaScriptEnabled(true); but it seems like javascript:window.location.reload(true) its not work . if i use webView.loadUrl("www.exapml.com"); it will work but this is not last Url u was there not reopen the webpage from the first url and why webview can not open page like https://vine.co/ is it coz its not end with .com .. and how to make it open all the website .. and when u enter website like Myspace and try to login using Facebook everything will work ok until u finish login it will not show anything after u connect it to ur facebook ,, is it coz of the redirection and if it is how to fix it this is the last 3 thing's stop me from finishing my app . i hope someone can help
has comment: http://stackoverflow.com/comment/38201550
tagged with: android
tagged with: facebook
has comment: http://stackoverflow.com/comment/38201769
has title: webview cant be refresh using anyway
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38201731
has comment: http://stackoverflow.com/comment/38201300
has answer: http://stackoverflow.com/a/24645394

http://stackoverflow.com/a/24901470
upvote count: 3
has body: There is no need to inline JSON file. Polymer's resolvePath function is useful here to make sure the relative path to JSON file is always correct regardless of where the component is included: this.topojsonURI = 'data/us.json'; /* d3.json basically just makes the json call */ d3.json(this.resolvePath(this.topojsonURI), function() { /* code rendering the map */ } Info about resolvePath here. UPDATE (Polymer 1.0): The function name has been changed to resolveUrl: 1.0 API Docs
accepted answer of: http://stackoverflow.com/q/24636831
answers question: http://stackoverflow.com/q/24636831
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3

http://stackoverflow.com/q/24697045
has comment: http://stackoverflow.com/comment/38297149
has comment: http://stackoverflow.com/comment/38297257
answer count: 2
has body: I am using Angular, I need to refresh the view after DELETE a row. Current code work properly but the Table is not update at all. Any idea how to change my code? 'use strict'; app.controller('locationsController', ['$scope', 'locationsService', function ($scope, locationsService) { $scope.locations = []; locationsService.getLocations().then(function (results) { $scope.locations = results.data; }, function (error) { //alert(error.data.message); }); $scope.deleteLocation = function (locationId) { locationsService.deleteLocation(locationId); // UPDATE THE VIEW }; }]); Action LocationId Name Edit Delete {{ location.locationId }} {{ location.name }} LocationId Name {{ location.locationId }} 'use strict'; app.factory('locationsService', ['$http', function ($http) { var serviceBase = 'http://localhost:4014/'; var locationsServiceFactory = {}; var _getLocations = function () { return $http.get(serviceBase + 'api/locations').then(function (results) { return results; }); }; var _deleteLocation = function (locationId) { return $http.delete(serviceBase + 'api/locations/' + locationId).then(function (results) { return results; }); }; locationsServiceFactory.getLocations = _getLocations; locationsServiceFactory.deleteLocation = _deleteLocation; return locationsServiceFactory; }]);
upvote count: 1
accepted answer: http://stackoverflow.com/a/24697452
has comment: http://stackoverflow.com/comment/38297388
tagged with: angularjs-scope
possible better answer: http://stackoverflow.com/a/24697474
has answer: http://stackoverflow.com/a/24697474
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38297357
linked to: http://stackoverflow.com/q/500606
has comment: http://stackoverflow.com/comment/38297344
tagged with: angularjs
has answer: http://stackoverflow.com/a/24697452
type: Question
has comment: http://stackoverflow.com/comment/38297423
has title: Angularjs how to update view after a REST operation?

http://stackoverflow.com/comment/38366038
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24678248
has text: No problem. If it did solve your problem, would you mind marking my answer as accepted by clicking the tick on the left of the answer. Thanks.
score: 0

http://stackoverflow.com/comment/38376459
has text: Here a *"JSON sorter"* : http://jsfiddle.net/NHzxR/
type: QuestionComment
comment on: http://stackoverflow.com/q/24738072
score: 1
type: Comment

http://stackoverflow.com/a/24735418
answers question: http://stackoverflow.com/q/24735386
has comment: http://stackoverflow.com/comment/38371253
score: 2
has body: Store it in a variable: var interval = setInterval(function(){ //your code },1000); Now, you can clear using clearInterval: clearInterval(interval);
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/38216377
type: AnswerComment
has text: Thanks, The problem is it is not doing the return View("Purchase", model); part. I came back to my success part of Ajax but no redirection.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24653294

http://stackoverflow.com/q/24709892
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/38322655
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38322584
type: Question
linked to: http://stackoverflow.com/q/7594760
tagged with: javascript
has title: How to store huge files in chrome with javascript?
has body: I need to store some large binary files varying from about 5MB to about 1GB and random access them in my Google Chrome App. But FileReader doesn't provide seek method so maybe I have to split a file into segments. Is there any other way to access large files without loading the whole file into memory? And where should I store these files or segments? If there are many segments, will it cause performance problems? fileSystem localStorage indexDB webSQL
tagged with: google-chrome-app
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: html5-filesystem
favorite count: 0
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/24676142
answers question: http://stackoverflow.com/q/24675789
type: Answer
has body: http://jsfiddle.net/cs6Xb/111/ function onSelecClick(){ $('.select-cities option:selected').remove().appendTo('.chosen-cities'); if($('#optlist1 option').size() == 1) { $('.select-cities').off('click'); } } $('.select-cities').click(onSelecClick); $('.chosen-cities').click(function () { $('.chosen-cities option:selected').remove().appendTo('.select-cities'); $('.select-cities').on('click',onSelecClick); }); Btw if you multiselect, you can add more then one item at once.
has comment: http://stackoverflow.com/comment/38284870
score: 0

http://stackoverflow.com/q/24685293
tagged with: plot
has title: Loop and Array - code not working due to ineptitude
tagged with: loops
type: Question
has answer: http://stackoverflow.com/a/24686444
tagged with: arrays
has body: This is a piece of code I have that corresponds to an HTML document where people enter the terms a, b, and c, of a quadratic equation of the format: ax^2 + bx + c. The problem I am having may be an issue of function scope, or getting the right variables into the array. If you look at the D2 array in the JQuery part of the code (which is irrelevant), you will see the format I need to plot the graph. &lt;td&gt;&lt;input id="Term 1" onchange="calculate();"&gt;&lt;/td&gt; &lt;td&gt;&lt;input id="Term 2" onchange="calculate();"&gt;&lt;/td&gt; &lt;td&gt;&lt;input id="Term 3" onchange="calculate();"&gt;&lt;/td&gt; var graphArray = {}; function calculate(){ var T1 = document.getElementById("Term 1"); var T2 = document.getElementById("Term 2"); var T3 = document.getElementById("Term 3"); var U1 = parseFloat(T1.value); var U2 = parseFloat(T2.value); var U3 = parseFloat(T3.value); var yFunction = function(x) { return U1 * Math.pow(x, x) + U2 * x + U3; }; for(var x = 1; x &lt;= 20; x++) { graphArray.push([x, yFunction(x)]); } return graphArray; } $(document).ready(function(){ var D1 = [[1, 4], [2, 8], [3, 16], [4, 32]]; $.plot($("#placeholder"), [graphArray]); });
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38277371
answer count: 1
tagged with: jquery
type: UnansweredQuestion

relative-path
type: Tag
tags question: http://stackoverflow.com/q/24727804
tag name: relative-path

http://stackoverflow.com/comment/38178601
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24632689
has text: If you pass an array to `data:`, jQuery will hardly do what you did expect it to do. Have you checked the actual content of your POST requests?
type: Comment

http://stackoverflow.com/q/24622098
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How update I18n-js translations.js without reserver restart in development?
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: ruby-on-rails
tagged with: internationalization
score: 2
has body: I use rails gem i18n-js I work in development mode and I see in every page link to translations: &lt;script data-turbolinks-track="true" src="/assets/i18n/translations.js?body=1"&gt;&lt;/script&gt; But when I add some keys to my \config\locales\en.yml, and reload page, I can't find new keys. I should restart server and delete tmp directory - that helps File \public\javascripts\translations.js successfully updated after page load, but doesn't go in /assets/i18n/translations.js?body=1 path

http://stackoverflow.com/a/24659038
has comment: http://stackoverflow.com/comment/38230089
downvote count: 0
score: 1
has body: Try just using contenteditable='true' instead of changing to a textarea. It will make the editable. Like this: Edit I'm going to change this into a textarea field and retrieve the value. If you want to make your text area editable when someone clicks 'Edit', you can create a function that sets the contenteditable attribute to true and then gives focus to the element.
answers question: http://stackoverflow.com/q/24658970
has comment: http://stackoverflow.com/comment/38231129
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24658970
type: Answer

http://stackoverflow.com/comment/38107002
has text: consider using some kind of JS framework to get rid of that boilerplate (and potentially buggy!) code. e.g. in jQuery this is simply `$("[name=javascriptaudio]").remove();`
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24595878

http://stackoverflow.com/q/24614256
has comment: http://stackoverflow.com/comment/38142130
type: Question
has answer: http://stackoverflow.com/a/24614581
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38142221
has answer: http://stackoverflow.com/a/24615953
has comment: http://stackoverflow.com/comment/38142578
accepted answer: http://stackoverflow.com/a/24614581
answer count: 2
has body: Im wondering what Im missing here, it must something obvious. All I want is the marker not to appear if there are co-ordinates put in yet. var lat = jQuery('#latitude').val(); var lng = jQuery('#longitude').val(); alert(lat); alert(lng); if (lat.length != 0) { alert('shouldnt be happening'); var latlng = new google.maps.LatLng( parseFloat(lat), parseFloat(lng) ); var marker = new google.maps.Marker({ map: map, position: latlng }); } Whether the input field is empty or not the if condition keeps passing. I have also tried if (lat != '') {} I have set the alerts to prove to myself they are empty, and as predicted they alert a blank pop up box when they are empty. Thank you. EDIT: To simplify it I have entered this code, the strange thing now is that all 3 alerts are happening. var lat = jQuery.trim(jQuery('#latitude').val()); var lng = jQuery.trim(jQuery('#longitude').val()); var zoom = 7; alert(lat); alert(lng); if (lat.length == 0) { lat = 53.412; zoom = 6; alert('THERE IS NO LATITUDE SET'); } if (lng.length == 0) { lng = -8.243; zoom = 6; alert('THERE IS NO LONGITUDE SET'); } if (lat.length != 0) { alert('now this shouldnt be happening'); }
score: 0
has comment: http://stackoverflow.com/comment/38142120
has comment: http://stackoverflow.com/comment/38142280
has comment: http://stackoverflow.com/comment/38142595
has comment: http://stackoverflow.com/comment/38142542
tagged with: javascript
tagged with: jquery
has title: if conditioning keeps passing even when string is empty in javascript
possible better answer: http://stackoverflow.com/a/24615953

http://stackoverflow.com/q/24620128
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Find child element in AngularJS directive
score: 63
accepted answer: http://stackoverflow.com/a/24620395
has answer: http://stackoverflow.com/a/24620334
linked to: http://stackoverflow.com/q/17283697
tagged with: angularjs
has body: I am working in a directive and I am having problems using the parameter element to find its childs by class name. .directive("ngScrollList", function(){ return { restrict: 'AE', link: function($scope, element, attrs, controller) { var scrollable = element.find('div.list-scrollable'); ... } }; }) I can find it by the tag name but it fails to find it by class name as I can see in the console: element.find('div') [&lt;div class=​"list-viewport"&gt;​…​&lt;/div&gt;​,&lt;div class=​"list-scrollable"&gt;​…​&lt;/div&gt;​] element.find('div.list-scrollable') [] Which would be the right way of doing such thing? I know I can add jQuery, but I was wondering if wouldn't that be an overkill....
possible better answer: http://stackoverflow.com/a/24620334
tagged with: angularjs-directive
type: AnsweredQuestion
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38154174
upvote count: 63
has answer: http://stackoverflow.com/a/24620395

http://stackoverflow.com/comment/38149045
score: 0
comment on: http://stackoverflow.com/q/24613867
type: Comment
type: QuestionComment
has text: Have you tried using `console.log();` to see if your `ISBN_lookup()` function is even being called? Also, are you trying to set the value of your text `input` tag using the JS function?

http://stackoverflow.com/a/24705976
answers question: http://stackoverflow.com/q/24705874
type: Answer
score: 0
has body: Probably you forgot to add your ul .navbar-inverse .navbar-nav &gt; ul &gt; li &gt; a:hover, .navbar-inverse .navbar-nav &gt; ul &gt; li &gt; a:focus { color: red; text-decoration:underline; } See here for an example: http://jsfiddle.net/5SAv5/

http://stackoverflow.com/comment/38351623
type: Comment
has text: Yes. I understand this, and even when I get 0, it still runs as if true. I am going nuts!
score: 0
comment on: http://stackoverflow.com/a/24725120
type: AnswerComment

http://stackoverflow.com/a/24686531
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24685881
answers question: http://stackoverflow.com/q/24685881
score: 1
upvote count: 1
has body: The timeouts on their own shouldn't be an issue. The 3rd will start around 1 second after the 1st. But, the error you mentioned would be. Based on your comment: The calls are actually d3 via d3.select('#object').selectAll('.secondary').fadeOut(50); It's because D3's Selections, that d3.select() and .selectAll() return, aren't related to jQuery and won't have its methods. You'll have to either convert the collection from d3 to jQuery before using .fadeOut(). jQuery( d3.select('#object').selectAll('.secondary') ).fadeOut(50); Or, use jQuery throughout the statement, as you'd suggested doing in your snippet: jQuery('#object .secondary').fadeOut(50);
type: AcceptedAnswer

http://stackoverflow.com/comment/38533287
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24724775
has text: Oh well, of course you want to avoid this! But as long as the Browser does not come with the required plugin by default, that is the only way to have it working. Think about the flash plugin, long ago the browser would have asked you whether you want to install the plugin when you were about to access a page where flash content was available.

http://stackoverflow.com/comment/38137705
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24596505
score: 0
has text: yes, same domain of course, forgot to mention.

http://stackoverflow.com/comment/38093185
type: Comment
has text: @Barmar I am going to try that. I didn't know that innerHTML destroys previous event handlers. Thanks
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24588868

http://stackoverflow.com/q/24661480
has comment: http://stackoverflow.com/comment/38231732
has comment: http://stackoverflow.com/comment/38299922
score: 0
has comment: http://stackoverflow.com/comment/38231823
has body: I have the following HTML content: span lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum span lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum span lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum span Elements Elements acbd I want to use a jQuery 1.9.1 selector that brings me everything on this content except the div #dontWantThisDiv. I've tried lots of selectors but no one seems to select what I want. Here's a Fiddle
has answer: http://stackoverflow.com/a/24662352
has comment: http://stackoverflow.com/comment/38231841
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38299616
has comment: http://stackoverflow.com/comment/38231699
has answer: http://stackoverflow.com/a/24662681
accepted answer: http://stackoverflow.com/a/24662681
has comment: http://stackoverflow.com/comment/38231610
has comment: http://stackoverflow.com/comment/38232107
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38231668
possible better answer: http://stackoverflow.com/a/24662352
has comment: http://stackoverflow.com/comment/38231620
tagged with: children
has comment: http://stackoverflow.com/comment/38299565
has comment: http://stackoverflow.com/comment/38299554
has comment: http://stackoverflow.com/comment/38299536
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38299597
has comment: http://stackoverflow.com/comment/38300437
tagged with: jquery-selectors
has comment: http://stackoverflow.com/comment/38299639
has comment: http://stackoverflow.com/comment/38299649
has title: jQuery select everything but a child div of children
has comment: http://stackoverflow.com/comment/38299625
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38390450
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24743400
has text: Do not pass a json array or object as others already told you. Just pass a string with the json text. So change the parameter to a string and start with a predefined string to transfer. Mmmm. I see now that you already have a String data on java side. But on javascript side you pass a json array. You should pass a json text string there.
score: 0

http://stackoverflow.com/a/24709262
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24705002
upvote count: 2
has body: Below is the problem:- You are doing fs.stat an async call in for loop. And for is a sync block. There are chances that it will be called after the end of your for loop. In the end, it will call all callbacks with last value of i. Since value of i is same it will search for the same file more than once and it will end up throwing an error. There are two solutions to your problem. 1) Use fs.statSync &amp; fs.unlinkSync so it will be sync call. The value of i won't increment until the whole loop executes, but it's not the good way of doing it. 2) Use Array.forEach because it is an async process, so it will call the function on each file. I will prefer this method. I've modified your problem and got it working with Array.forEach. var fs = require("fs"); var files = fs.readdirSync("./Folder"); var deleteFile = function (fileName) { fs.stat("./Folder/" + fileName, function (err, stats) { var currentTimestamp = Math.round(new Date().getTime() / 1000); var fileTimestamp = Math.round((new Date(stats.mtime).getTime() / 1000)); if ((currentTimestamp - fileTimestamp) &gt; 60 * 1) { //Elimino il file di cache console.log('deleting ',fileName) fs.unlink("./Folder/" + fileName, function (err) { if (err) { console.log(err); } else { console.log("File deleted"); } }); } }); } files.forEach(deleteFile);
answers question: http://stackoverflow.com/q/24705002

http://stackoverflow.com/a/24645928
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24645826
type: Answer
has body: Try adding this css to your line: path line { fill: none; stroke: #000; } I've had this happen to me in the past, if I remember correctly what is happening is that d3 thinks that the first point and the last point on the line are joined and therefore making it an area and filling it by default with the color black. If you set the fill to none and add a stroke it should fix this. Hope this helps.
answers question: http://stackoverflow.com/q/24645826
upvote count: 12
has comment: http://stackoverflow.com/comment/38225078
has comment: http://stackoverflow.com/comment/89014809
downvote count: 0
score: 12
has comment: http://stackoverflow.com/comment/38202927

http://stackoverflow.com/comment/57301711
type: Comment
comment on: http://stackoverflow.com/q/24621421
has text: this ended up being just a memory issue. bumped up the box the test runs on and have had no time outs.
score: 0
type: QuestionComment

http://stackoverflow.com/a/24660870
type: Answer
score: 1
answers question: http://stackoverflow.com/q/24659784
upvote count: 1
has body: When you pass in reset to your fetch call backbone suppresses all the add and remove events and fires just one reset event at the end. From the annotated source When you have more items than you want to add or remove individually, you can reset the entire set with a new list of models, without firing any granular add or remove events. Fires reset when finished. Useful for bulk operations and optimizations. If necessary you could always bind to the reset event and fire the add event on each model yourself, or if you need it to fire as it adds each model you can override the reset event for your collection.
accepted answer of: http://stackoverflow.com/q/24659784
has comment: http://stackoverflow.com/comment/38232176
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24629989
possible better answer: http://stackoverflow.com/a/24630163
score: 0
has title: How to remove hash in link inside anchor tag when ajax is calling the page to load in div
answer count: 3
tagged with: javascript
tagged with: ajax
accepted answer: http://stackoverflow.com/a/24630063
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has body: Hi every one i calling the page through ajax call to load in a particular div. tab1 tab2 tab3 This is my Javascript script calling the pages in a particular 'home' div And when i called the pages in 'home' div : In the URl : when i clicked on the tab1 localhost/site/# Even when i clicked on the tab2 localhost/site/# And when i clicked on the tab3 localhost/site/# I want to remove the # value on the URL ,Any one please suggest me how to remove the hash value from the URL. Thanks
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/24630163
has answer: http://stackoverflow.com/a/24630063
has answer: http://stackoverflow.com/a/24630220

http://stackoverflow.com/comment/38123151
type: QuestionComment
has text: @Satpal I want to add the number, not append it at the end.
comment on: http://stackoverflow.com/q/24604236
score: 0
type: Comment

http://stackoverflow.com/comment/38154028
type: Comment
comment on: http://stackoverflow.com/q/24620174
has text: Javascript runs in your client's browser. C# runs on the web server. To call a C# function from javascript, you would have to ajax the call. If isSquantityInRange() isn't very complicated, it'd probably make more sense to just reimplement it in javascript. (If it was complicated, you would make an ajax call to the function, then handle the response in the success handler.)
score: 5
type: QuestionComment

http://stackoverflow.com/q/24665602
has answer: http://stackoverflow.com/a/61956280
has answer: http://stackoverflow.com/a/58393387
favorite count: 0
has answer: http://stackoverflow.com/a/24665651
has answer: http://stackoverflow.com/a/56391657
has answer: http://stackoverflow.com/a/69164341
has answer: http://stackoverflow.com/a/51935129
has answer: http://stackoverflow.com/a/67923821
has answer: http://stackoverflow.com/a/58844983
has answer: http://stackoverflow.com/a/52428604
has answer: http://stackoverflow.com/a/51980902
has comment: http://stackoverflow.com/comment/137564158
tagged with: scroll
has answer: http://stackoverflow.com/a/42056880
has answer: http://stackoverflow.com/a/60310765
possible better answer: http://stackoverflow.com/a/56391657
upvote count: 297
has body: I have a page where a scroll bar containing table rows with divs in them is dynamically generated from the database. Each table row acts like a link, sort of like you'd see on a YouTube playlist next to the video player. When a user visits the page, the option they are on is supposed to go to the top of the scrolling div. This functionality is working. The issue is that it goes just a tad too far. Like the option they are on is about 10px too high. So, the page is visited, the url is used to identify which option was selected and then scrolls that option to the top of the scrolling div. Note: This is not the scroll bar for the window, it is a div with a scrollbar. I am using this code to make it move the selected option to the top of the div: var pathArray = window.location.pathname.split( '/' ); var el = document.getElementById(pathArray[5]); el.scrollIntoView(true); It moves it to the top of the div but about 10 pixels too far up. Anyone know how to fix that?
has answer: http://stackoverflow.com/a/73249126
answer count: 27
has answer: http://stackoverflow.com/a/56269906
has answer: http://stackoverflow.com/a/61480514
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/70397019
has comment: http://stackoverflow.com/comment/120056935
has answer: http://stackoverflow.com/a/49710815
has answer: http://stackoverflow.com/a/66148048
score: 297
accepted answer: http://stackoverflow.com/a/24665651
tagged with: dom
has answer: http://stackoverflow.com/a/58714347
has answer: http://stackoverflow.com/a/60964904
type: Question
has answer: http://stackoverflow.com/a/70617568
linked to: http://stackoverflow.com/q/70212566
downvote count: 0
has answer: http://stackoverflow.com/a/49968820
has title: scrollIntoView Scrolls just too far
has comment: http://stackoverflow.com/comment/77401273
tagged with: javascript
has answer: http://stackoverflow.com/a/59804050
has answer: http://stackoverflow.com/a/54494495
has answer: http://stackoverflow.com/a/58282133
has answer: http://stackoverflow.com/a/60511136
has answer: http://stackoverflow.com/a/74770428

http://stackoverflow.com/comment/38232342
type: AnswerComment
comment on: http://stackoverflow.com/a/24661898
type: Comment
has text: A server redirect in an AJAX response will not "undo anything in js after the post"...it will look like a successful response, but the response will contain the redirected page's HTML, which is obviously not desired
score: 1

http://stackoverflow.com/q/24677164
has title: PanoJS failing due to missing method which isn't missing
has answer: http://stackoverflow.com/a/24824308
accepted answer: http://stackoverflow.com/a/25028271
has comment: http://stackoverflow.com/comment/38547698
has body: I'm using PanoJS in a Rails 4 project and I get the following error: TypeError: this.getLevel(...) is undefined [panojs/pyramid_imgcnv.js][1] Line 92 What I'm confused about is that the method seems to be declared just a few lines above. I've raised it as an issue with PanoJS but I'm suspicious it's simply a configuration error between Rails and Javascript. I have previously had it set up and working with a Rails 3 project. I've used the same JS files and loaded them in the same order. I can't see what's different (other than the Rails version) but one version works and one doesn't. Updated: The element is declared as (I've left the data portion out for brevity); %div{ id: "image_viewer", class: "viewer", data: {} } The JS should be triggered with the following coffeescript, but at the moment I've got it commented out because it just adds an error because addimagezoom won't work. jQuery(document).ready ($) -&gt; $('#zoomimage').addimagezoom largeimage: $('#zoomimage').data('large-image-url'), magnifiersize: [$('#zoomimage').data('scaled-x-dimension'),$('#zoomimage').data('scaled-y-dimension')], zoomrange: [2, 10] Update 2: I've realised I made a mistake in my original post. The trigger is actually as per below. The above was an artefact from my attempts to get a different viewer working. The real trigger below. createViewer viewer, 'image_viewer', "#{url_base}/#{image_id}", "#{image_uuid}_", width, height, target_format
has comment: http://stackoverflow.com/comment/38260098
score: 9
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25028271
tagged with: javascript
favorite count: 0
upvote count: 9
has comment: http://stackoverflow.com/comment/38260887
downvote count: 0
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/38667491
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24824308

http://stackoverflow.com/comment/40862078
type: Comment
score: 0
has text: @gokhangokce OK. New chromium in KitKat is nice, but, unfortunately, I need to support older versions of Android and have consistent results. Crosswalk is probably the most stable way to do this. Had no issues so far.
comment on: http://stackoverflow.com/a/24604567
type: AnswerComment

http://stackoverflow.com/comment/38289522
score: 1
has text: couldn't you just write the bottom one instead ?
comment on: http://stackoverflow.com/q/24692963
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24683447
has answer: http://stackoverflow.com/a/24683514
answer count: 1
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/24683514
tagged with: regex
tagged with: node.js
has body: I have a directory with space on unix, so the space is backslashed. And I need to replace the backslashed space with semicolon. Tried multiple regex'es but not able to find the answer var str = '/test\ space/a.sh -pqr'; So I am looking to get this after the replace /test;space/a.sh -pqr console.log("replace: ", str.replace(/\\\s+/g, ";")); //This one doesn't work, (formatting is taking out one backslash)
type: AnsweredQuestion
has title: Javascript: regex escaped space
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/24650594
has comment: http://stackoverflow.com/comment/38215404
type: Answer
answers question: http://stackoverflow.com/q/24649249
has comment: http://stackoverflow.com/comment/38215976
score: 0
has body: You're trying to do too much in your foreach loop. It's spitting out tonnes of window.onload functions, which just makes no sense to the poor browser that's trying to understand your intentions. In this case, I think you should just pass the array of video files you have in php into a javascript array. Something like: &lt;script type='text/javascript'&gt; window.onload = function (){ var videos = &lt;?php echo json_encode($cdir); ?&gt; for(var i = 0; i &lt; videos.length; i++) { //Setup each video } }; &lt;/script&gt; This works by encoding the php array in a format known as "javascript object notation", which javascript can handily use to create an array. Once you have the array in javascript rather than php, you can loop through each on the client side, inside the window.onload function, which should resolve the issue you're having.
has comment: http://stackoverflow.com/comment/38216872

http://stackoverflow.com/a/24704103
type: Answer
has comment: http://stackoverflow.com/comment/38311151
downvote count: 0
score: 1
has body: You'r missing the question mark http://xyz.org/audio?s=0.8717912845313549&amp;download=true
upvote count: 1
answers question: http://stackoverflow.com/q/24703909

http://stackoverflow.com/comment/38151837
comment on: http://stackoverflow.com/a/24616864
has text: Okay, that makes sense. But how would I go about on doing that? I use the same code for my "weddings" page, and everything loads fine.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38176063
score: 0
comment on: http://stackoverflow.com/a/24622051
has text: Books are not much compared to a live trial and error process. It forces you to pay attention to the console errors. "I followed the github instructions for the angular-hotkeys module but it kept throwing an error in angular.js". What was the error?
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/38357631
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24728068
has text: i suspect a db would be more efficient
score: 0

google-visualization
tags question: http://stackoverflow.com/q/24604772
tags question: http://stackoverflow.com/q/24685965
tags question: http://stackoverflow.com/q/24633624
tags question: http://stackoverflow.com/q/24695280
tags question: http://stackoverflow.com/q/24633735
tags question: http://stackoverflow.com/q/24610341
type: Tag
tags question: http://stackoverflow.com/q/24607716
tags question: http://stackoverflow.com/q/24665920
tags question: http://stackoverflow.com/q/24674588
tag name: google-visualization
tags question: http://stackoverflow.com/q/24612313
tags question: http://stackoverflow.com/q/24657013
tags question: http://stackoverflow.com/q/24588077
tags question: http://stackoverflow.com/q/24700278
tags question: http://stackoverflow.com/q/24616714
tags question: http://stackoverflow.com/q/24613031

http://stackoverflow.com/comment/38382129
has text: @AeroX. I'm not trying to build a realistic scale, just a realistic simulation of the gravity effects regardless the underlying assumptions
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24740720

http://stackoverflow.com/q/24633817
score: 0
accepted answer: http://stackoverflow.com/a/24635286
answer count: 1
tagged with: velocity.js
favorite count: 0
has comment: http://stackoverflow.com/comment/38181870
has title: jQuery's visible upon scroll
has comment: http://stackoverflow.com/comment/38181766
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38179388
has answer: http://stackoverflow.com/a/24635286
upvote count: 1
has body: I try to use jQuery visible plugin to detect if an element is or isn't visible in the viewport. I use a code like this: animateFrontPage: function(){ var apps = 0; if($('#apps-shelf').visible(true)) { apps = 1; if(apps == 1) { $('#apps-shelf li').velocity("transition.bounceUpIn", { stagger: 150 }); apps = 0 } } } and I run it with scroll function: $(window).scroll(function() { Functions.animateFrontPage(); }); The problem is - animation repeats itself with every scroll. What can I do to prevent it?
downvote count: 1
has comment: http://stackoverflow.com/comment/38179349
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38379591
type: QuestionComment
comment on: http://stackoverflow.com/q/24739722
has text: Putting your code through jsfiddle is giving me `ReferenceError: hideShow is not defined`
score: 0
type: Comment

http://stackoverflow.com/q/24636905
tagged with: angularjs
has body: Why in this jsfiddle $scope.counter inside ChildController3 do not resolve to ParenctController's $scope.counter but creates a counter on local $scope? Replicating Code: HTML ChildController1 Add Subtract ChildController2 Add Subtract {{ counter }} <- this is in local scope {{ counter }} <- this is in parent scope ChildController3 Add Subtract {{ counter }} <- this is in local scope JS var app = angular.module("app",[]); app.controller('ParentController', function($scope) { $scope.counter = 5; }); app.controller('ChildController1', function ($scope) { $scope.add = function () { $scope.counter += 1; }; $scope.subtract = function () { $scope.counter -= 1; }; }); app.controller('ChildController2',function($scope) { $scope.add = function () { $scope.$parent.counter += 1; }; $scope.subtract = function () { $scope.$parent.counter -= 1; }; }); app.controller('ChildController3', function($scope) { $scope.add = function () { $scope.counter += 1; }; $scope.subtract = function () { $scope.counter -= 1; }; });
has answer: http://stackoverflow.com/a/24637300
type: AnsweredQuestion
has title: Why $scope.variable in ChildController is not resolving to the $scope.variable in ParentController
type: Question
tagged with: javascript
tagged with: angularjs-scope
possible better answer: http://stackoverflow.com/a/24637300
accepted answer: http://stackoverflow.com/a/24637347
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24637347

http://stackoverflow.com/q/24729992
has answer: http://stackoverflow.com/a/24730108
type: AnsweredQuestion
has title: how to extract content from another content using Javascript
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24730095
upvote count: 0
tagged with: javascript
score: -1
has body: my String is: var str = "&lt;footnote xml:id="ch03-fn-5" label="5"&gt;&lt;para aid:pstyle="Copytext"&gt;„Muchacho“ (1924), Musik: Luis N. Visca, Text: Celedonio Esteban Flores.&lt;/para&gt;&lt;/footnote&gt;" I want to store the contents which is inside the footnote tag in another variable, I need a string function to slove this, Note: the values of xml:id="ch03-fn-5" label="5" may come as single digit or double digit. Can someone give any Idea for this Thank you!
has answer: http://stackoverflow.com/a/24730036
answer count: 3
possible better answer: http://stackoverflow.com/a/24730036
favorite count: 0
accepted answer: http://stackoverflow.com/a/24730095

http://stackoverflow.com/comment/38429919
type: Comment
score: 1
type: QuestionComment
has text: For your first problem, we're working on https://bugzilla.mozilla.org/show_bug.cgi?id=977043, and for your second problem we recently landed a developer toolbar command to do this: http://note.io/1qEcU2s I do think your jsfiddle features idea is very interesting! We will be landing new devtools sdk apis soon that will make all of this a bit easier.
comment on: http://stackoverflow.com/q/24737403

http://stackoverflow.com/q/24663131
upvote count: 1
downvote count: 1
type: AnsweredQuestion
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/24663233
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38234933
has body: I'm trying to use this tooltip: http://osvaldas.info/elegant-css-and-jquery-tooltip-responsive-mobile-friendly Here's the test page (running in WooCommerce/WordPress): https://blendbee.com/shop/uncategorized/test-product-2/ You can see the "ingredient" under "Add-Ons" is underlined. If you put your mouse over it, the title is shown, but the jQuery tooltip doesn't appear. The HTML for the "ingredient" is: ingredient In Chrome Inspect I see an error: Uncaught TypeError: undefined is not a function I assume it has to do with the JS function in the footer area, that I copied from the tooltip page, but I'm not sure how to fix it. $(function(){ var targets = $( '[rel~=tooltip]' )... Any ideas?
answer count: 1
favorite count: 0
has title: Why does this jQuery tooltip not work?
has answer: http://stackoverflow.com/a/24663233
has comment: http://stackoverflow.com/comment/38235157

http://stackoverflow.com/q/24685996
accepted answer: http://stackoverflow.com/a/24686188
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/38277341
has answer: http://stackoverflow.com/a/24686188
has title: AJAX POST requests not being received by PHP via $_POST
tagged with: php
has comment: http://stackoverflow.com/comment/38277401
has body: I'm building part of a Firefox OS app and I'm having to use the OpenBadges API, meaning I can't use more PHP, which would make this much simpler. The problem I'm having now is that my data sent from an AJAX POST request: $(function(){ $("#submitBtn").click(function(){ var mail = $('#mail').val(); $.ajax({ type: 'POST', contentType: 'text', dataType: 'JSON', url: 'scripts/test.php', data: { mail: mail }, success: function(data){ var jdata = jQuery.parseJSON(data); alert("success! X: " + data); } }); }); }); ...isn't being received by my PHP script: &lt;?php if(isset($_POST['mail'])) { $id_url = 'http://backpack.openbadges.org/displayer/convert/email'; $mail = $_POST['mail']; $email = 'email='.$mail; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $id_url); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $email); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($curl); curl_close ($curl); $user_id = json_decode($result)-&gt;userId; $test_var = json_decode($result); echo $result; //echo $test_var; //echo $user_id; } //echo $mail; ?&gt; I keep getting a "cancelled" status on my PHP script in the Chrome dev tools Network tab, and I can see that it's sending the input in the form of "example%40gmail.com" instead of "@", but I'm not sure if that's part of the problem or not. I've been looking and tweaking my code for about two days trying to figure out the problem, but none of the fixes that have worked for other people have worked for me. Thanks in advance.
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38278086
tagged with: post
has comment: http://stackoverflow.com/comment/38277203
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38304761
comment on: http://stackoverflow.com/a/24686787
type: AnswerComment
score: 0
has text: That is truly bizarre. So if I do something like str.replace('$', '$$') can I avoid this issue? There won't be any regex being used in my code that this issue showed up in.
type: Comment

http://stackoverflow.com/q/24735108
has comment: http://stackoverflow.com/comment/38413233
type: Question
has comment: http://stackoverflow.com/comment/38406680
has comment: http://stackoverflow.com/comment/38412689
tagged with: javascript
has title: Custom showMaxMin text in nvd3
score: 0
has comment: http://stackoverflow.com/comment/38403303
has comment: http://stackoverflow.com/comment/38452635
tagged with: nvd3.js
has comment: http://stackoverflow.com/comment/38380911
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38409610
has comment: http://stackoverflow.com/comment/38403855
tagged with: css
has comment: http://stackoverflow.com/comment/38410893
has comment: http://stackoverflow.com/comment/38413034
has comment: http://stackoverflow.com/comment/38403158
answer count: 0
has body: I'm trying to modify some output of a normal nvd3 chart. For example, This jsfiddle. What I would like is to see before the bold Max/Min additional information explaining that it is the max/min, i.e: `Max: 1033.88` If I'm right this info is given by showMaxMin function and axisMaxMin, and bold from css in the nv.d3.css code (also in the fiddle, css line 243 ). .nvd3 .nv-axis .nv-axisMaxMin text { font-weight: bold; /* Here the text can be modified*/ } I have tried several things without success (it means I've been unable to make it work, but it can probably be solved if coded right): Editing css to add :before a text showing max (Not working) .nvd3 .nv-axis .nv-axisMaxMin text:before { font-weight: bold; } { content:"Max: "; } Accessing with jquery (not working either) $('.nv-axisMaxMin').each(function() { $(this).text("Max: ")); }); The resulting html shows for the maximum this result: 132.23 And I want it to be something like this: Max: 132.23 I think there might be several approaches, via css, via html, via js, but my newbie skills has not been enough to get to it in any way. I would prefer not to modify source code. Thanks in advance for your help.
has comment: http://stackoverflow.com/comment/38412984
has comment: http://stackoverflow.com/comment/38409251
has comment: http://stackoverflow.com/comment/38454443

http://stackoverflow.com/comment/38335842
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24716457
has text: I can and it would work but editing the core files directly isn't a way forward. No hook/filter exists for `wp_attempt_focus` though a hack does: http://www.geeklab.info/2011/04/arrrrgh-kill-it-kill-wp_attempt_focus-with-fire/. It doesn't work for me however. I'm not certain if it's due to the fact that my /wp-login.php is rewritten as /account-login.

http://stackoverflow.com/comment/38295352
comment on: http://stackoverflow.com/q/24694722
type: Comment
type: QuestionComment
has text: @Fresher, thats part of the [documentation](http://www.menucool.com/javascript-image-slider#jsTitle), hover over "effect", if you mean to customize or make your own effect then you would need to edit their js file, which would be hard as its minified
score: 0

http://stackoverflow.com/comment/38342351
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24720196
has text: `window.history.go(-2)`?
score: 0

http://stackoverflow.com/q/24655807
accepted answer: http://stackoverflow.com/a/24656342
type: Question
has body: I am working on creating HTML5 canvas object(Rectangle) and fill color based on the value entering in the textbox (validating to enter only percentage value). I found a link from stack overflow Here is the code $(document).ready(function() { $("#my_input").keypress(function(event) { // Allow only backspace and delete if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 37) { $("#myCanvas").animate({ opacity: 0.25 }); } else { // Ensure that it is a number and stop the keypress if (event.keyCode &lt; 48 || event.keyCode &gt; 57) { event.preventDefault(); } } }); }); and here is the code for rectangle var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); context.beginPath(); context.rect(188, 50, 200, 100); context.fillStyle = 'yellow'; context.fill(); context.lineWidth = 7; context.strokeStyle = 'black'; context.stroke(); and here is my html code Numberic Value &lt;input type ="textbox" id="my_input" class="numeric" name="Enter Value" placeholder="Enter value"/&gt; &lt;canvas id="myCanvas" width="578" height="200"&gt;&lt;/canvas&gt; What exactly I want When I enter the value 10% in the text box the color has to fill only for that percentage like wise till 100% Here I am trying with animate opacity 0.25 If I enter any value in the text box i am getting the result for the canvas is reducing 0.25% Kindly help me for this solution Thanks in Advance Ref : Fill color Similar to the above link i want the solution when I enter the number in the text box
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38232355
tagged with: http://stackoverflow.com/tag/html
has title: Fill color in Rectangle canvas based on input (Percentage value)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24656342

http://stackoverflow.com/q/24663126
score: 4
favorite count: 0
tagged with: xdomainrequest
has comment: http://stackoverflow.com/comment/38235040
linked to: http://stackoverflow.com/q/2067472
has comment: http://stackoverflow.com/comment/38234897
upvote count: 4
downvote count: 0
has answer: http://stackoverflow.com/a/24663331
accepted answer: http://stackoverflow.com/a/24663331
type: AnsweredQuestion
has title: Cross origin request blocked
linked to: http://stackoverflow.com/q/3076414
type: Question
linked to: http://stackoverflow.com/q/1006604
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38235133
has body: I want to retrieve json data from an other website so I tried to do a simple crossdomain request. I ran this index.php file on Wamp : MySite But I get an error saying that cross origin request has been blocked. I'm pretty new to js and this is the first time I try to use a web API in js so I might have completly missed something here... Thanks a lot.

http://stackoverflow.com/comment/38858279
has text: @wwarlock: yes this is true "Now you have two projects: the original without tests and the new project with tests only and without sources " i have put the test cases into a separate project.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24676048
type: QuestionComment

http://stackoverflow.com/q/24701718
score: 0
answer count: 1
has body: I have this in a file page.js var Page = function () { this.examStatus = element(by.id('examStatusSelect')); this.examType = element(by.id('examTypeSelect')); } module.exports = new Page(); and this in file admin.js var Admin = function () { this.newButton = element(by.id('newButton')); this.saveButton = element(by.id('saveButton')); } module.exports = new Admin(); Is there a way that I could do something like this in the page.js file var admin = require('./admin.js'); so as to bring in the items contained in admin.js and make them available as part of the Page function so that I effectively have four properties in the Page function instead of two? I know I can bring in elements but can I have them appear just like those in admin.js so that I can do: page.examStatus page.examType page.newButton page.saveButton From a script that uses page.js ?
has comment: http://stackoverflow.com/comment/38306194
type: AnsweredQuestion
has title: Can I include a file into my include file in node.js?
has answer: http://stackoverflow.com/a/24701776
accepted answer: http://stackoverflow.com/a/24701776
type: Question
tagged with: javascript

http://stackoverflow.com/q/24701441
tagged with: javascript
has body: I would like the opened image to have the attribute data-pin="true". Here is what I want the html of the opened image to look like: &lt;img data-pin="true" class="fancybox-image" src="/uploads/gallery_item/image/426/full_ExShow2013_3156.jpg#lightbox0" alt="" &gt; Here is the JS I have that isn't working: $('.fancybox').fancybox({ beforeLoad: function(){ $(this.element).data("pin", "true") } }); EDIT HTML of the thumbnail images: &lt;a class="fancybox" href="/uploads/gallery_item/image/426/full_example.jpg" rel="gallery"&gt; &lt;img alt="" data-src="/uploads/gallery_item/image/426/example.jpg" src="/uploads/gallery_item/image/426/example.jpg" style="width: 301px; height: 301px;"&gt;&lt;/div&gt; &lt;/a&gt;
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24727640
type: AnsweredQuestion
tagged with: fancybox
score: 1
has answer: http://stackoverflow.com/a/24702545
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/38306600
has comment: http://stackoverflow.com/comment/38305870
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/24702545
has answer: http://stackoverflow.com/a/24727640
tagged with: fancybox-2
has title: How do you add an html data attribute to the opened image in Fancybox 2?
downvote count: 0

http://stackoverflow.com/q/24733376
has body: I am currently coding my intranet site, running on a Synology NAS. Since the intranet page (via Javascript) cannot access any folder on the NAS outside it's "www" folder, I had to this on the server side with a Perl script, since the data which should be displayed lies outside the "www" folder on the NAS. The perl script now writes the entire html page, including Javascript code which is needed to plot a chart via dygraphs. The most important thing the perl script does is process a .csv file and write var $chartdata = [["2014/07/06 12:05", 15], ["2014/07/06 12:06"], 15.5, ...]; which is the series variable as the dygraphs library (dygraphs.com) needs it to display the chart. Therefore I am dynamically writing a javascript line within the "script" tag. With the perl variables passed in the URL (script.pl?day=07&amp;month=06&amp;year=2014) this variable is written differently. This all displays on an iPad and works fine. I now have implemented the swipe function and would like to refresh the chart with data the day before or after the displayed date, depening on swiping left or right. The swipe function also works. My problem is, how do I refresh/rewrite the javascript variable without needing to refresh the entire page? It works just executing the entire perl script with new data in URL variables, which in turn rewrites the entire html page. But I'd just like to refresh the chart, i.e. the data for the chart. Any ideas on how to accomplish this? Many thanks and best regards, dmy
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: dygraphs
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24733456
tagged with: perl
has title: Creating HTML page from Perl incl. Javascript: Refresh of Javascript variable
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/38378869
type: Comment
type: QuestionComment
has text: I have added JSFiddle
comment on: http://stackoverflow.com/q/24739292
score: 0

http://stackoverflow.com/comment/38296623
type: QuestionComment
has text: Here is what i'm getting -- data: "[[Nv:[n=Jan, v=5], Nv:[n=Feb, v=45], Nv:[n=Mar, v=35], Nv:[n=Apr, v=25], Nv:[n=may, v=15]]]" // values coming from controller and here i need to fetch it. Hope this is what you are expecting..
score: 0
comment on: http://stackoverflow.com/q/24683498
type: Comment

http://stackoverflow.com/q/24637989
has body: I've read the famous article A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS, now I want to try this out. I'm using a nodejs module node-crc, it looks easy to use: var crc = require('crc'); crc.crc32('hello'); # =&gt; "3610a686" The result of function crc32, I believe, is the checksum of hello using polynomial 0x04C11DB7. Please correct me if I' wrong. So the next step is appending the checksum to the original data. Here's my code: var crc = require('crc'); var bf = Buffer("test"); charlist = crc.crc32(bf).toString(); var k = [] for (var i=0; i&lt; 8; i++) { k.push(parseInt(charlist[i], 16)); } console.log(k) var checksum = Buffer(k); console.log(crc.crc32(Buffer.concat([bf, checksum]))); output [ 13, 8, 7, 15, 7, 14, 0, 12 ] 646b4f9b I'm expecting the second output to be 0, but it's not. Therefore I'm here asking for help. What is the correct way to do this(appending and checking if the message was correctly received)? Thank you. Edit So I understand that the second output isn't necessarilly 0. Here's the final solution: var crc = require('crc'); var bf = Buffer("test"); charlist = crc.crc32(bf).toString(); var k = [] for (var i=0; i&lt; 8; i++) { k.push(parseInt(charlist[i], 16)); } var checksum = Buffer(k); transfer_data = Buffer.concat([bf, checksum]); ////////////////////// Network Transfer ///////////////////////// received_data = transfer_data checksum = received_data.slice(-8); charlist = ''; for (var i=0; i&lt;8; i++) { charlist += checksum.readUInt8(i).toString(16); } // these two should be equal if data received correctly console.log(crc.crc32(received_data.slice(0, -8))); console.log(charlist) Output d87f7e0c d87f7e0c
type: Question
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/38199878
favorite count: 0
has answer: http://stackoverflow.com/a/24642586
tagged with: crc32
tagged with: crc
has comment: http://stackoverflow.com/comment/38187374
answer count: 1
tagged with: node.js
has title: How to use CRC exactly?
upvote count: 3
has comment: http://stackoverflow.com/comment/38199514
accepted answer: http://stackoverflow.com/a/24642586
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/24688535
type: Question
tagged with: javascript
has body: In this code im trying to get the Object for the caller of this method, using his unique username. If the object exists -> update it, of not -> create one. However: my boolean value "found" is never changed. Even though, it must be changed after my Query. Because of this my if statement is never used and therefore no object created. Does anyone know why? To my knowledge its ok changing a global value from within a function. Parse.Cloud.define("updateUserGeneral", function(request, response){ var UserGeneralObject = Parse.Object.extend("userGeneral"); var userGeneralNew = new UserGeneralObject(); var found = false; var username = request.params.username; var private_name = request.params.private_name; var intentions = request.params.intentions; var gender = request.params.gender; var looking_gender = request.params.lookinggender; var age = request.params.age; var min_age = request.params.min_age; var max_age = request.params.max_age; var radius = request.params.radius; var applyradius = request.params.applyradius; var query2 = new Parse.Query("userGeneral"); query2.equalTo("username", username); query2.first({ success: function(userGeneral){ if(userGeneral!=null){ found = true; userGeneral.set("private_name", private_name); userGeneral.set("intentions", intentions); userGeneral.set("gender", gender); userGeneral.set("lookinggender", looking_gender); userGeneral.set("age", age); userGeneral.set("max_age", max_age); userGeneral.set("min_age", min_age); userGeneral.set("radius", radius); userGeneral.set("applyradius", applyradius ); userGeneral.save(); response.success("Succesfully saved userGeneral"); }else{ found = false; } }, error: function(error){ found = false; } }); if(found == false){ userGeneralNew.set("username", username); userGeneralNew.set("private_name", private_name); userGeneralNew.set("intentions", intentions); userGeneralNew.set("gender", gender); userGeneralNew.set("lookinggender", looking_gender); userGeneralNew.set("age", age); userGeneralNew.set("m…
accepted answer: http://stackoverflow.com/a/24688869
tagged with: boolean
score: 0
tagged with: function
answer count: 1
has title: JavaScript if() case in CloudCode.
has comment: http://stackoverflow.com/comment/38281777
tagged with: parse-platform
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38281885
has answer: http://stackoverflow.com/a/24688869

http://stackoverflow.com/comment/38279602
type: Comment
comment on: http://stackoverflow.com/q/24681013
type: QuestionComment
has text: @acrosman While extremely similar that answer does not reference jsonp anywhere and as such does not come up in google searches for 'asynchronous jsonp'. Maybe with this answer others wont spend a day like I did searching for the answer.
score: 0

http://stackoverflow.com/comment/38309470
has text: @c-smile I did, please consider my edit.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24703133

http://stackoverflow.com/comment/38293713
has text: I want to clear the image at mouse position in a small radius and display background
type: Comment
comment on: http://stackoverflow.com/a/24689333
type: AnswerComment
score: 0

http://stackoverflow.com/a/24684769
has comment: http://stackoverflow.com/comment/38276962
answers question: http://stackoverflow.com/q/24684513
accepted answer of: http://stackoverflow.com/q/24684513
score: 0
has comment: http://stackoverflow.com/comment/38283762
type: AcceptedAnswer
type: Answer
has body: The revealing module pattern can help with this function(){ var myfunction1 = function(param1,param2){ var doSomethingHere; } var myfunction2 = function(){ .... var param1,param2 .... //I get an error here myfunction1(param1,param2).then(function(return){ console.log(return); }); } return{ myfunction1: myfunction1, myfunction2: myfunction2 } }

http://stackoverflow.com/a/24741397
type: Answer
answers question: http://stackoverflow.com/q/24710439
accepted answer of: http://stackoverflow.com/q/24710439
type: AcceptedAnswer
score: 0
has body: The reason it's not working is the variables names are the same. They're both _gaq. One easy way around this is to upgrade your Google Analytics account to use Universal Analytics, and then switch your tracking code to use analytics.js instead of the older ga.js (which it looks like you're using). There are many benefits to using analytics.js, but in this case one huge benefit is that there won't be a naming conflict. Analytics.js uses the variable ga instead of _gaq. Analytics.js also supports renaming the global tracking object, so in case this ever happens again, you can just rename it to solve your problem.

http://stackoverflow.com/comment/38122767
score: 1
comment on: http://stackoverflow.com/q/24604060
type: Comment
has text: in short u want to do is Arabic=>English without page load .correct?
type: QuestionComment

http://stackoverflow.com/comment/38104138
type: Comment
type: QuestionComment
has text: In the function getBannerHtml: function() how do I refer to the lat and lon variables? this.lat, that.lat, vicinity.ad.lat ?
comment on: http://stackoverflow.com/q/24594645
score: 0

http://stackoverflow.com/comment/38355931
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24727093
has text: Thanks! Good catch. (... except that the new functionality doesn't seem to work in a *different* way. Ah well.)
type: Comment

brainfuck
tags question: http://stackoverflow.com/q/24653117
type: Tag
tag name: brainfuck

http://stackoverflow.com/comment/38229127
type: Comment
comment on: http://stackoverflow.com/q/24659264
score: 0
has text: I think you need to add `_WidgetsInTemplateMixin` class to your js file `define()` call like `define(..., "dijit/_TemplatedMixin","dijit/_WidgetsInTemplateMixin",...)`. The reason being your template contains dojo widgets. I too am new to dojo. The documentation is not precise and clear enough. Hope it helps
type: QuestionComment

http://stackoverflow.com/q/24621642
has answer: http://stackoverflow.com/a/24621681
has answer: http://stackoverflow.com/a/24621822
has answer: http://stackoverflow.com/a/24621687
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24621681
type: Question
tagged with: javascript
has body: I have a whole bunch of radio buttons formatted in the following way; &lt;input type="radio" name="Xch" value="XCheese " onclick="incrementIndex()"&gt;XCheese&lt;br&gt; and my incrementIndex() function is simple enough; var index = 0; function incrementIndex() { index += 1; document.getElementById("demo").innerHTML = ""+index+""; if ($("#Xch").attr("checked") == true){ index = 10; } } And when a radiobutton is clicked it increments the index, but I want it to increase the index once and only if the button is not checked, the way it is set up, even if the Xch radio button is checked, it keeps increment the index! Please help.
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/24621822
has title: Incrementing int by check marking a radio button

http://stackoverflow.com/comment/38199327
type: Comment
type: AnswerComment
score: 0
has text: I have added a sample
comment on: http://stackoverflow.com/a/24644090

http://stackoverflow.com/q/24738022
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
downvote count: 0
tagged with: jquery
tagged with: keycode
favorite count: 0
has body: I'm expecting an issue on Android 4.4 while trying to restrict input to only numbers on input field. That's fired on Backbone event 'keydown .js-text' : 'setText': setText: (e) -&gt; console.log e #it is empty when clicking "backspace" charCode = e.keyCode or e.charCode if charCode &gt; 31 and (charCode &lt; 48 or charCode &gt; 57) and charCode isnt 8 and (charCode &lt; 96 or charCode &gt; 105) return false Also I see that on keydown event is empty when clicking backspace
type: UnansweredQuestion
tagged with: android
tagged with: input
has title: JS - keydown event is empty on typing backspace Android chrome mobile (4.4)
has comment: http://stackoverflow.com/comment/38376752

http://stackoverflow.com/comment/38143280
type: QuestionComment
comment on: http://stackoverflow.com/q/24614315
has text: is checkbox an html component?
score: 0
type: Comment

http://stackoverflow.com/q/24747726
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38394436
accepted answer: http://stackoverflow.com/a/24747781
has comment: http://stackoverflow.com/comment/38395483
type: Question
linked to: http://stackoverflow.com/q/901115
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have a webpage that has several links that link to the same page, but depending on the link the user clicks I need to pass different info to that other page. I know how to do this in PHP through the URL and using $_GET[] but I am unsure how to do it using only javascript/jquery and html. Any idea? Thanks.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24747781
favorite count: 0
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38394470
has title: How to pass data from one html page to another using javascript?

http://stackoverflow.com/a/24716249
has comment: http://stackoverflow.com/comment/38336080
score: 3
has body: your selector is wrong. do like this: $("a.btn-medium.btn-primary.TradeCurrencyModalBtn").trigger("click"); // tirgger click for anchor tag which has class btn-medium btn-primary TradeCurrencyModalBtn as you are trying to fire click for anchor which has all these classes.
accepted answer of: http://stackoverflow.com/q/24716186
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24716186
type: Answer
upvote count: 3

http://stackoverflow.com/comment/38205802
type: QuestionComment
has text: Well, when I put alert('something') in the if statement it works exactly as it should.
comment on: http://stackoverflow.com/q/24632721
score: 0
type: Comment

http://stackoverflow.com/a/24644741
has comment: http://stackoverflow.com/comment/38200333
score: 0
answers question: http://stackoverflow.com/q/24644680
type: Answer
has body: I think this: function changedivRUNWAY(){ var div = document.getElementById("fw14campaign"); div.innerHTML = " Hello "; } Should be: function changedivRUNWAY(){ var div = document.getElementById("fw14runway"); div.innerHTML = " Hello "; } As a starter...and then if nothing else is missing in the code you posted there's a lose < /div> tag.

heap-memory
tag name: heap-memory
type: Tag
tags question: http://stackoverflow.com/q/24626361

http://stackoverflow.com/comment/38392297
score: 0
type: Comment
has text: I really don't follow what you are trying to do. what is `$parent.ngModel` for? Just put a dot in all `ng-model` , define main model object at highest level of scope and should see it pass through
type: QuestionComment
comment on: http://stackoverflow.com/q/24746243

hook
tags question: http://stackoverflow.com/q/24602136
tag name: hook
type: Tag

http://stackoverflow.com/comment/42067386
score: 0
comment on: http://stackoverflow.com/q/24620330
type: QuestionComment
type: Comment
has text: @Softlion I am working on getting the question re-opened. If you could add your comment and vote to reopen the question here that would be great: http://stackoverflow.com/questions/25748671/scrolling-through-uitableview-causes-exception-and-crash-only-on-iphone-5c

http://stackoverflow.com/comment/38390877
comment on: http://stackoverflow.com/q/24745664
score: 0
type: Comment
has text: @Geniusknight look at this. http://getbootstrap.com/javascript/#popovers you can change the event handler to hover.
type: QuestionComment

http://stackoverflow.com/comment/38151793
has text: @admdrew When I tried it I got a readyState 4 and status code 0. However, it does not generate the 'Script error.' `window.onerror` call I'm using to seeing with failing cross-domain ajax calls.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24618925

http://stackoverflow.com/comment/124117632
has text: working fine. Is there any way to add a transition effect for the elements. Like to make it look like smooth scrolling?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24636116

http://stackoverflow.com/comment/38148165
type: QuestionComment
comment on: http://stackoverflow.com/q/24616722
score: 0
has text: Thanks I will look into this. It looks very promising
type: Comment

http://stackoverflow.com/a/24642633
answers question: http://stackoverflow.com/q/24639585
accepted answer of: http://stackoverflow.com/q/24639585
has comment: http://stackoverflow.com/comment/38261226
type: AcceptedAnswer
has body: Your link @Html.ActionLink("Submit", "Submit", new { id = Model.selected_job_ID, envid = Model.selected_env_ID }, new {id = "lnkSubmit" }) is rendered on the server side before you make any selection in the dropdowns. If the initial values of selected_job_ID and selected_env_ID are zero or null, then those values will be passed to the controller (have a look at the rendered html). If you want to pass the values selected in you drop downs, you could either modify the links href attribute in the drop down change events, or create a button instead of a link, and do a redirect in the buttons click event based on the dropdown values.
score: 0
type: Answer

http://stackoverflow.com/comment/38162050
score: 0
has text: Please can any one of you help me,What i need to do?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24623914

http://stackoverflow.com/a/24719854
type: Answer
has body: If i understood correctly, you want to perform same validation on multiple forms. You can do so by saving the validation options in a variable and initializing both forms with it, as follows: $(function() { var validations = { // common validation options // Specify the validation rules rules: { username: { required: true, maxlength: 16, minlength: 6, remote: { url: "../inc/check.php", type: "post", data: { username: function() { return $( "#username" ).val(); } } } }, email: { required: true, email: true }, password: "required", password_again: { equalTo: "#password", minlength: 3, }, agree: "required" }, // Specify the validation error messages messages: { Username: "Please enter a username", password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long" }, email: "Please enter a valid email address", agree: "Please accept our policy" }, } // Setup form validation on the #register-form element $("#form").validate(validations); // setup validation for step1 $("#form1").validate(validations); // setup validation for step2 });
score: 0
answers question: http://stackoverflow.com/q/24713994

http://stackoverflow.com/comment/38248988
type: AnswerComment
has text: Oh I didn't know that. Nice. But if you want to work with the value in JS, you'd still have to "validate" it first (by checking `el.validity.valid`).
comment on: http://stackoverflow.com/a/24670997
type: Comment
score: 0

http://stackoverflow.com/q/24687011
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24689208
answer count: 2
downvote count: 0
has body: My data model has Accounts, and an accounts has some credit transactions for it. I have designed these transactions as subdocuments: var TransactionSchema = new Schema({ amount: Number, added: Date }), AccountSchema = new Schema({ owner: ObjectId, balance: Number, transactions: [TransactionSchema] }); When a Transaction is added to an Account, the following should happen: transactions has the new one pushed to it transactions is sorted by date (for later display) balance is set to the sum of all transactions I have put that in a Schema.methods-function for now, doing the above in JavaScript, before a save. However, I am not sure that is secure for multiple inserts at once. How can this better be solved in Mongoose to use atomic or some kind of transactional update? In SQL, I would just do a transaction, but I cannot in MongoDB, so how to make sure that transactions and balance are always correct?
possible better answer: http://stackoverflow.com/a/24689229
favorite count: 0
has title: Complex addition to subdocument array with mongoose
has answer: http://stackoverflow.com/a/24689229
tagged with: node.js
tagged with: atomic
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24689208
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/38373987
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/57272/discussion-between-parminder-and-bhushan-kawadkar).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24736283

http://stackoverflow.com/comment/38408942
score: 0
comment on: http://stackoverflow.com/q/24749024
has text: innerHTML may help you there: https://developer.mozilla.org/en-US/docs/Web/API/Element.innerHTML
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24731448
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24731337
upvote count: 1
has body: Try this function palabifunkcija(){ i = (i+1) % bildes.length; document.getElementById('PictureContent').value= i; document.getElementById('PictureContent').style.background= bildes[i]; }

http://stackoverflow.com/a/24618077
answers question: http://stackoverflow.com/q/24617361
has comment: http://stackoverflow.com/comment/38150677
score: 0
accepted answer of: http://stackoverflow.com/q/24617361
type: AcceptedAnswer
type: Answer
has body: This will filter out any records that are not equal to a given publish year. Adding the following HTML above your table: 2014 | 2013 | 2012 Then adding the following javascript to your page will yield filtered rows as you request. function filterArticles(yearFilter){ $(".table_blog div[class='date']").each(function(){ if ($(this).text() == yearFilter){ $(this).closest("tr").show(); } else { $(this).closest("tr").hide(); } }); } Please see this working jsFiddle: http://jsfiddle.net/YmApX/2/

http://stackoverflow.com/comment/38281548
type: Comment
has text: jwplayer appears and says error loading media
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24687751

http://stackoverflow.com/comment/46340056
score: 1
has text: Its really too bad. I would love to see this also but I think that the limitation is that Chromium would need to be ported to the other platforms. I am quite sure that Apple would never allow this to work properly for control reasons and Android also would prefer that it just use the native Android web engines rather than allowing a broad tool like Chromium bypass all the hooks in Android.
type: AnswerComment
comment on: http://stackoverflow.com/a/24671115
type: Comment

http://stackoverflow.com/q/24716240
downvote count: 1
type: Question
has body: I'm new to javascript and this is strictly for practice. I have an html form (below) and I want the submit button to create a new object using the Person constructor when clicked. I want the new object's name to be whatever the user's first name is. For example, if the first name's john it would create a var john = new Person. Form: &lt;form name="theform"&gt; First name: &lt;input type="text" name="fname"&gt;&lt;br&gt; Last name: &lt;input type="text" name="lname"&gt;&lt;br&gt; Age: &lt;input type="number" name="age"&gt;&lt;br&gt; &lt;input type="button" onClick="new Person()" value="Submit"&gt; &lt;/form&gt; Constructor: function Person(){ this.firstname = document.theform.fname.value; this.lastname = document.theform.lname.value; var age = document.theform.age.value; this.returnAge = function(){ return age; } };
tagged with: object
tagged with: javascript
score: 0
answer count: 3
tagged with: button
favorite count: 0
has answer: http://stackoverflow.com/a/24716447
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38334494
has title: create new object on button click
tagged with: onclick
has answer: http://stackoverflow.com/a/24716315
has comment: http://stackoverflow.com/comment/38335055
upvote count: 1
has answer: http://stackoverflow.com/a/24716502

http://stackoverflow.com/comment/38211352
type: Comment
type: QuestionComment
has text: @freakish I thought so but even on my local system its giving the same..just confirming that I am not doing something foolish here
score: 0
comment on: http://stackoverflow.com/q/24650696

http://stackoverflow.com/q/24628786
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/38170460
type: UnansweredQuestion
tagged with: wordpress
upvote count: 1
has title: how to add link on wordpress wonder plugin carousel description
has comment: http://stackoverflow.com/comment/38170198
type: Question
has body: i am try to set link on description using wonder plugin carousel in wordpress. here i am type in description something like test its display in front side simple text and when i edit this again then its show in description textarea test here is i have one demo output what i expect any suggestion? thanks.
has comment: http://stackoverflow.com/comment/38170743
score: 1
has comment: http://stackoverflow.com/comment/38170104
downvote count: 0

http://stackoverflow.com/a/24616567
has body: Install inAppBrowser Plugin http://cordova.apache.org/docs/en/3.3.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser Then use this window.open(link, "_system", 'location=yes'); _system instead of _blank
accepted answer of: http://stackoverflow.com/q/24606200
type: Answer
answers question: http://stackoverflow.com/q/24606200
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/24647163
has comment: http://stackoverflow.com/comment/38251288
score: -1
downvote count: 1
has body: This might be help you, You can use data-target Check this Demo
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/38207220
answers question: http://stackoverflow.com/q/24647041

http://stackoverflow.com/a/24597613
type: Answer
answers question: http://stackoverflow.com/q/24597496
has body: I think this should work for you in javascript. var addDash = function(str){ var chars = str.split(""); chars.splice(chars.length-3,0,'-'); return chars.join('') } call this function with string. addDash('string'); Output str-ing
score: 0

http://stackoverflow.com/q/24666696
type: AnsweredQuestion
has body: I've an app which initially creates static config files (once) and after files were written I need to reinitialize/restart the application. Is there something to restart a node.js app from itself? This is required cause I've an application running in two runlevels in node.js. The initial one starts completly synchronus and after this level has been completed app is in async runlevel in a previously started environment. I know there are tools like nodemon but that's not what I need in my case. I tried to kill the app via process.kill() which is working but I can't listen to the kill event: // Add the listener process.on('exit', function(code) { console.log('About to exit with code:', code); // Start app again but how? }); // Kill application process.kill(); Or is there a better, cleaner way to handle this?
has comment: http://stackoverflow.com/comment/38244016
has comment: http://stackoverflow.com/comment/97465546
has comment: http://stackoverflow.com/comment/38255904
has answer: http://stackoverflow.com/a/24682157
type: Question
score: 12
has comment: http://stackoverflow.com/comment/38241614
upvote count: 12
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/106921191
has comment: http://stackoverflow.com/comment/38241657
tagged with: sigkill
has comment: http://stackoverflow.com/comment/97467667
has comment: http://stackoverflow.com/comment/38245576
linked to: http://stackoverflow.com/q/9357757
has title: Restart a node.js app from code level
accepted answer: http://stackoverflow.com/a/24682157
has comment: http://stackoverflow.com/comment/81435161
has comment: http://stackoverflow.com/comment/38241708
favorite count: 0
has comment: http://stackoverflow.com/comment/38260996
has comment: http://stackoverflow.com/comment/38241604
tagged with: node.js

http://stackoverflow.com/q/24647766
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/38208527
upvote count: 1
type: Question
tagged with: java
has comment: http://stackoverflow.com/comment/38209938
has title: AJAX call using Java SE
tagged with: javascript
has comment: http://stackoverflow.com/comment/38211593
has body: I am using a Linux system for my personal usage. My internet provider had provided a login page, which will help to connect the internet. Once I login, then I am able to connect internet. But I need to login the internet for each and every time after system started. Internally the login page had implemented the AJAX request to connect the server. I had figure-out the AJAX implementation code through browser developer console. So, I am planning to write a simple Java code which should internally call the AJAX call and need to login the internet. So, once this code had implemented, I will write a shell script to call to execute the Java class, and I will make this shell script to executable at the time of system start-up. So, is there any way to call/implement the AJAX call using JAVA standard edition code implementation? I am not asking for code. I am just asking is there any framework or Java method will available to do this one? Below JavaScript code which I had identified using the FireBug. function makeAjaxRequest(e, d, a, c) { var b = getAjaxObject(); b.open(e, a, true); b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); b.send(d); b.onreadystatechange = getReadyStateHandler(b, c); addOverlay() } function checkSubmit() { if (status != 'LIVE') { document.frmHTTPClientLogin.mode.value = 191; if (validateLogin()) { UserValue = replaceAll(document.frmHTTPClientLogin.username.value, '\'', '\'\''); queryString = 'mode=191&amp;username=' + encodeURIComponent(UserValue) + '&amp;password=' + encodeURIComponent(document.frmHTTPClientLogin.password.value) + '&amp;a=' + (new Date) .getTime() + producttype; if (loginstate != null) { queryString += '&amp;state=' + loginstate } url = 'login.xml'; makeAjaxRequest('POST', queryString, url, loginResponse) } } else { if (document.forms[0].btnSubmit.value == logoutValue) { document.frmHTTPClientLogin.mode.value = 193; queryString = 'mode=193&amp;username=' + encodeURIComponent(document.frmHTTPClientLogin.usern…
linked to: http://stackoverflow.com/q/1359689
downvote count: 0
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38208364
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38206107

http://stackoverflow.com/comment/38113890
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24599847
has text: Yes, jQuery it certainy will be, but that "select" link seems to be related to text selection event. I'm basically just doing *::after here.
type: AnswerComment

http://stackoverflow.com/comment/38111470
type: Comment
score: 0
type: AnswerComment
has text: Thank you for your concern, but if you didn't notice, our answers were posted 6 minutes apart and you edited yours 6 minutes after mine. I didn't copy yours or regurgitate or whatever you think. On my end (again didn't refresh before clicking submit) there were still no answers.
comment on: http://stackoverflow.com/a/24596188

http://stackoverflow.com/q/24688040
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/38281816
type: Question
answer count: 2
tagged with: magento
has title: Adjusting included js scripts in Magento in page.xml
tagged with: javascript
has answer: http://stackoverflow.com/a/24689281
possible better answer: http://stackoverflow.com/a/24688727
has answer: http://stackoverflow.com/a/24688727
has body: I am trying to clean out some dead js includes, but am not having any luck. I have deleted the lines from page.xml, for example: And have checked local.xml as well to ensure the lines are not there. But the page is still showing these files included and being loaded (I have not deleted the actual js files yet). I am not sure if I need to delete references in other places? If anyone can point me in the right direction, it would be much appreciated. Please let me know if I can provide anything else to help. Thanks!
accepted answer: http://stackoverflow.com/a/24689281
tagged with: http://stackoverflow.com/tag/xml

http://stackoverflow.com/comment/38262561
has text: You could just unbind specific event or use some flag inside handler. **EDIT:** What do you mean by `i want to undo that effect on another event`? You'd really have better to provide a concrete example of what you are looking for...
score: 0
comment on: http://stackoverflow.com/q/24678433
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38325850
type: Comment
comment on: http://stackoverflow.com/a/24711580
type: AnswerComment
has text: Thanks for explaining the problems. Am still new to coding. This works great :)
score: 0

d3.js
tags question: http://stackoverflow.com/q/24725352
tags question: http://stackoverflow.com/q/24745883
tags question: http://stackoverflow.com/q/24676179
tags question: http://stackoverflow.com/q/24682399
tags question: http://stackoverflow.com/q/24645489
tags question: http://stackoverflow.com/q/24731729
tags question: http://stackoverflow.com/q/24664951
tags question: http://stackoverflow.com/q/24661762
tags question: http://stackoverflow.com/q/24609506
tags question: http://stackoverflow.com/q/24719495
tags question: http://stackoverflow.com/q/24683705
tags question: http://stackoverflow.com/q/24627987
tags question: http://stackoverflow.com/q/24590634
tags question: http://stackoverflow.com/q/24685936
tags question: http://stackoverflow.com/q/24616615
tags question: http://stackoverflow.com/q/24692002
tags question: http://stackoverflow.com/q/24611598
tags question: http://stackoverflow.com/q/24653471
tags question: http://stackoverflow.com/q/24704025
tags question: http://stackoverflow.com/q/24720208
tags question: http://stackoverflow.com/q/24674830
tags question: http://stackoverflow.com/q/24666262
tags question: http://stackoverflow.com/q/24615366
tags question: http://stackoverflow.com/q/24740734
tags question: http://stackoverflow.com/q/24600343
tags question: http://stackoverflow.com/q/24636602
tags question: http://stackoverflow.com/q/24657824
tags question: http://stackoverflow.com/q/24641844
tags question: http://stackoverflow.com/q/24605334
tags question: http://stackoverflow.com/q/24655933
tags question: http://stackoverflow.com/q/24623833
tags question: http://stackoverflow.com/q/24702055
tags question: http://stackoverflow.com/q/24597283
tags question: http://stackoverflow.com/q/24695810
tags question: http://stackoverflow.com/q/24689157
tags question: http://stackoverflow.com/q/24671467
tags question: http://stackoverflow.com/q/24608041
tags question: http://stackoverflow.com/q/24636075
tags question: http://stackoverflow.com/q/24622504
tags question: http://stackoverflow.com/q/24679946
tags question: http://stackoverflow.com/q/24724140
tags question: http://stackoverflow.com/q/24617916
tags question: http://stackoverflow.com/q/24743594
tags question: http://stackoverflow.com/q/24665032
tags question: http://stackoverflow.com/q/24744364
tags question: http://stackoverflow.com/q/24735108
tags question: http://stackoverflow.com/q/24623743
type: Tag
tags question: http://stackoverflow.com/q/24655934
tags question: http://stackoverflow.com/q/24744693
tags question: http://stackoverflow.com/q/24660202
tags question: http://stackoverflow.com/q/24604910
tags question: http://stackoverflow.com/q/24740682
tags question: http://stackoverflow.com/q/24670803
tags question: http://stackoverflow.com/q/24664055
tags question: http://stackoverflow.com/q/24744866
tags question: http://stackoverflow.com/q/24660914
tags question: http://stackoverflow.com/q/24628232
tags question: http://stackoverflow.com/q/24611695
tags question: http://stackoverflow.com/q/24671343
tags question: http://stackoverflow.com/q/24645826
tags question: http://stackoverflow.com/q/24649724
tags question: http://stackoverflow.com/q/24700270
tags question: http://stackoverflow.com/q/24642549
tags question: http://stackoverflow.com/q/24695290
tags question: http://stackoverflow.com/q/24616187
tags question: http://stackoverflow.com/q/24707964
tags question: http://stackoverflow.com/q/24714671
tags question: http://stackoverflow.com/q/24625624
tags question: http://stackoverflow.com/q/24590722
tags question: http://stackoverflow.com/q/24660517
tags question: http://stackoverflow.com/q/24588883
tags question: http://stackoverflow.com/q/24728156
tags question: http://stackoverflow.com/q/24703761
tags question: http://stackoverflow.com/q/24704450
tags question: http://stackoverflow.com/q/24725587
tags question: http://stackoverflow.com/q/24664079
tags question: http://stackoverflow.com/q/24599715
tags question: http://stackoverflow.com/q/24592745
tags question: http://stackoverflow.com/q/24718937

http://stackoverflow.com/a/29455082
answers question: http://stackoverflow.com/q/24633164
score: 0
type: Answer
has body: Thanks for all your advice. But I was able to do it myself using window.location method. I found that the method was not the problem because I had tried it already previously. The problem was that the redirection happened but since the function "checkLogin" was called by the onsubmit function of html element form, it kept coming back to the same login page. I fixed it by returning false at the end of the checkLogin() script. But Thanks a ton for all your input.

http://stackoverflow.com/a/24588197
has body: src This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document. script elements with an src attribute specified should not have a script embedded within its tags. http://developer.mozilla.org/en-US/docs/Web/HTML/Element/script.html So, you either have an external script, or you have something inside the &lt;script&gt; tag. You shouldn't have both at once; I'm not sure whether this actually does anything or not. Use a second script tag.
answers question: http://stackoverflow.com/q/24588147
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/38092920
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38092491

http://stackoverflow.com/comment/38140018
type: Comment
score: 1
has text: It's a jQuery slider/carousel. Please note that SO is not here to write code for you. Have a play with a jQuery Slider (there are many) and come back if you run into any issues. Thanks.
type: QuestionComment
comment on: http://stackoverflow.com/q/24613132

http://stackoverflow.com/q/24728499
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38358620
upvote count: 1
has comment: http://stackoverflow.com/comment/38358538
has comment: http://stackoverflow.com/comment/38358576
score: 1
tagged with: forms
type: Question
has title: Unable to use select option value in form for new window in JavaScript correctly
has body: I'm a newbie with JavaScript and I asked a question earlier and got answers which helped me, but I thought I could incorporate it into the larger form I was working with and now I'm stuck again. I have a large form with one select option. When the form is filled out, a new window opens and incorporates the values submitted into an invitation type page. Everything else is working except for this select option. The problem I am having is depending on the selection, I want different text to be written into the new window (as part of the overall new window invitation page). I'm really close, mostly b/c of help I received earlier today -- I can either get the new window to show just my named option value or I can get a whole new window with the different text (that is not part of the invitation page). I just can't combine the two. I wrote up a smaller page in case someone wants to take a look at it. Thanks in advance. JavaScript Forms First Name: nickname1 nickname2 nickname3
has comment: http://stackoverflow.com/comment/38358589
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/24728748
tagged with: javascript
has comment: http://stackoverflow.com/comment/38358635
has comment: http://stackoverflow.com/comment/38358722
favorite count: 0
has comment: http://stackoverflow.com/comment/38358614
tagged with: html-select
has comment: http://stackoverflow.com/comment/38358593
has comment: http://stackoverflow.com/comment/38358609

http://stackoverflow.com/q/24656912
has title: Stop AngularJS ng-repeat rendering in alphabetical order
has answer: http://stackoverflow.com/a/24657118
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
score: 6
accepted answer: http://stackoverflow.com/a/24657237
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/24657041
has answer: http://stackoverflow.com/a/24657237
type: Question
upvote count: 6
tagged with: javascript
answer count: 3
has body: In my angular app I'm trying to display JSON data in a table. The data looks like this: $scope.data = { "EVENT NAME":"Free Event", "ORDER ID":311575707, "DATE":"6/26/14", "GROSS REVENUE (USD)":"0", "TICKET REVENUE (USD)":"0", "EVENTBRITE FEES (USD)":"0", "CC PROCESSING (USD)":"0", "TICKETS":1, "TYPE":"Free Order", "STATUS":"Free Order", "TRANSACTION ID":"", "NOTES":"", "FIRST NAME":"Khee Seng", "LAST NAME":"Chua", "EMAIL ADDRESS":"email@anemailadderss.com" }; And I'm displaying it like this: {{key}} {{value}} In my mind this should go through each `(key, value) pair in the object and display it in order. However, AngularJS displays the values in alphabetical order. Here's a plunkr which replicates this issue: http://plnkr.co/edit/V3Y2ZuwV1v9Pzsl0jGhA?p=preview How can I tweak the code so it displays in the natural order that the object actually comes in?
has answer: http://stackoverflow.com/a/24657041

http://stackoverflow.com/q/24702372
has comment: http://stackoverflow.com/comment/38309324
has title: XMLHttpRequest halts server response until ajax completes
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/24702655
has comment: http://stackoverflow.com/comment/38309275
score: 0
has body: I have the following ajax code that sends a canvas (aprox. 350kb) to a server for processing: html2canvas(document.body, { onrendered: function(canvas) { var canvasData = canvas.toDataURL("image/png"); var ajax = new XMLHttpRequest(); ajax.open("POST",'www.domain.com/process.php',true); ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); ajax.send("imgData="+canvasData); } }); The problem is that when the ajax call is executed we can not access any other page on the server www.domain.com. It keeps on waiting until the called is completed. Am I doing something wrong here or does it just not suitable for the task we need to accomplish? Thanks!
tagged with: html5-canvas
tagged with: xmlhttprequest
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/113627314
has text: That works, and save me bunch of time. Thanks buddy. I was using AWS Comprehend on my end.
comment on: http://stackoverflow.com/a/51560565
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38284469
type: Comment
has text: This doesn't seem to be built in functionality for the [Autocomplete jQuery UI widget](http://api.jqueryui.com/autocomplete/). You can, however, use the widget's source to build your own custom widget.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24689780

http://stackoverflow.com/comment/38206132
type: Comment
type: QuestionComment
has text: I wonder how this code may works for you. 4th parameter of [`animate`](http://api.jquery.com/animate/) method should be `Function`. Whereas `updateTime(obj, alpha)` in your code is **value**
comment on: http://stackoverflow.com/q/24647818
score: 0

http://stackoverflow.com/comment/40437984
comment on: http://stackoverflow.com/q/24660102
score: 1
has text: What version of the `html2canvas` are you using ? What version of Windows are you using ? When you open the page which cause the problem on IE, does IE switch to compatibility mode/view ? There's an open issue regarding this problem at GitHub (https://github.com/niklasvh/html2canvas/issues/163) and also a pending pull request for that (https://github.com/niklasvh/html2canvas/pull/219). Maybe that can help.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24714101
has comment: http://stackoverflow.com/comment/38330359
has comment: http://stackoverflow.com/comment/38330326
answers question: http://stackoverflow.com/q/24713938
upvote count: 3
has comment: http://stackoverflow.com/comment/38330338
score: 3
has comment: http://stackoverflow.com/comment/38330483
has comment: http://stackoverflow.com/comment/38330345
has comment: http://stackoverflow.com/comment/38330303
accepted answer of: http://stackoverflow.com/q/24713938
has comment: http://stackoverflow.com/comment/38330389
has comment: http://stackoverflow.com/comment/38330329
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Here is working version using controller alias store as shown. Note that product was changed to products in controller since the array contains more than one product. I think you are gtting confused about which is array and which is the individual item within the ng-repeat due to this {{product.name}} {{product.description}} Add to cart DEMO

http://stackoverflow.com/q/24665920
answer count: 1
has comment: http://stackoverflow.com/comment/38480191
has title: Google charts - graph within a tooltip
tagged with: http://stackoverflow.com/tag/html
tagged with: django
has comment: http://stackoverflow.com/comment/38313684
type: AnsweredQuestion
type: Question
has body: I currently have a scatter chart that has the html tooltips turned on. According to the API you can use any javascript (and html) in the tooltips. What I would like to do is allow the user to not only hover over a data point and see more information on it, but to also see another graph within the tooltip. &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var aPart = (4 - 16) / ({{ lowest_velocity }} - {{ highest_velocity }}); var bPart = 4 - {{ lowest_velocity }} * aPart; var options = {width: {{ img_width }}, height: {{ img_height }}, title: 'Results for model: {{ current_model_selection }}, build: {{ current_build_selection }}', chartArea: {left: 50, top: 100}, backgroundColor: 'transparent', colors: ['#3cb521'], legend: 'none', hAxis: {viewWindow: {min: {{ tunnelminx }}, max: {{ tunnelmaxx }}}, agridlines: {count: 0}}, pointSize: 8, fontName: '"Arial"', vAxis: {viewWindow: {min: {{ tunnelminy }}, max: {{ tunnelmaxy }}}, agridlines: {count: 0}}, tooltip: { isHtml: true }, series: [ {% for lst in velocity_pressure_list %} {% if lst.1 == 0%} {# If pressure == 0 #} {color: 'red', pointSize: aPart * {{lst.0}} + bPart}, {% else %} {# Else is pressure so change size #} {pointSize: aPart * {{lst.0}} + bPart}, {% endif %} {% endfor %} ] }; google.load("visualization", "1", {packages: ["corechart", "table"]}); google.setOnLoadCallback(drawChart); var data; function drawChart() { data = new google.visualization.DataTable(); data.addColumn('number', 'X'); {% for column in num_columns %} data.addColumn('number', 'Y'); data.addColumn({type: 'string', label: 'Probe Details', role: 'tooltip', 'p': {'html': true}}); {% endfor %} data.addRows(); var chart = new google.visualization.ScatterChart(document.getElementById('chart_div')); chart.draw(data, options); google.visualization.events.addListener(chart, 'select', function () { table.setSelection([ {row: chart.getSelection…
tagged with: google-visualization
tagged with: javascript
has comment: http://stackoverflow.com/comment/38504289
score: 0
has answer: http://stackoverflow.com/a/24901885
accepted answer: http://stackoverflow.com/a/24901885
has comment: http://stackoverflow.com/comment/38725085
has comment: http://stackoverflow.com/comment/38261174

http://stackoverflow.com/q/24744381
has comment: http://stackoverflow.com/comment/38434079
has comment: http://stackoverflow.com/comment/38388519
type: UnansweredQuestion
has title: JS array push inside JS array
tagged with: web-services
linked to: http://stackoverflow.com/q/750486
type: Question
has comment: http://stackoverflow.com/comment/38418440
has comment: http://stackoverflow.com/comment/38389492
has comment: http://stackoverflow.com/comment/38407397
has answer: http://stackoverflow.com/a/24759991
answer count: 1
tagged with: arrays
tagged with: javascript
has body: I am developing an application that is basically a front-end it is mostly jquery and html. It is basically a front-end to simplify the facebook events. Here is my code: in this page loadEvents.js i communicate with webservices and store events inside an array of events: Inside the first successfull request to the webservices i create the new event i am about to add. var events = []; var new_event = { 'id': event_id, 'name': event_name, 'description': event_description, 'start_date': event_start_date, 'end_date': event_end_date, 'participants' : [], 'pictures' : [], 'places' : [] }; for each event i read from the returned xml i store it the following way and it works fine. events.push(new_event); Although i then make new requests for participants, pictures and places where those events took place. And here is where the code starts not to working. Let elaborate. for each event and each participant returned by the webservice in xml format i if(participant_name !== ""){ var new_participant = { 'id': participant_id, 'name': participant_name, 'birthDate': participant_birth_date, 'pictureUrl': participant_photo_url }; events[i].participants.push(new_participant); } I use the same methodology for places and pictures as in here. although when i then try to use the variables like this: var result_html = ''; var index = 0; result_html += '&lt;div class="f-page f-cover"&gt;&lt;div class="cover-elements"&gt;&lt;div class="f-cover-story"&gt;&lt;span&gt;Life Events&lt;/span&gt;Photo Album&lt;/div&gt;&lt;/div&gt;&lt;div class="f-cover-flip"&gt;&amp;lt; swipe&lt;/div&gt;&lt;/div&gt;'; for(var i = events.length; i &gt; 0 ; i -= 5 ){ result_html += '&lt;div class="f-page"&gt;'; result_html += '&lt;div class="f-title"&gt;'; result_html += '&lt;a href="index.jsp"&gt;Back to bookshelf&lt;/a&gt;'; result_html += '&lt;h2 id="event_name"&gt;Your Life Events&lt;/h2&gt;'; result_html += '&lt;a href="#"&gt;&lt;/a&gt;'; result_html += '&lt;/div&gt;'; if(index &lt; events.length){ $('.img-1').cs…
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38389572
has comment: http://stackoverflow.com/comment/38390108

http://stackoverflow.com/comment/38225990
comment on: http://stackoverflow.com/q/24658489
has text: have you tried ``return false`` at the end of the event?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38182421
has text: You do realise you *have not* provided that code don't you (for `fillet_change`)? :)
comment on: http://stackoverflow.com/a/24635380
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/24712402
favorite count: 0
has body: I am making a voting system, the voting is done with a link. In my index.js I get the required values and put them in variables. The "type" variable stands for the field in my mongodb wich needs to be updated, I have put it in a variable because it depends on which link is clicked. Now in the $set function they require the db field and a new value, for both I use variables but my "type" variable doesn't work. And when I go to my mongodb there is a new table created called "type". How can this be solved? router.get('/vote/:Id/:Value/:Type', function(req, res) { var db = req.db; var id = req.params.Id; var type = req.params.Type; var value = parseInt(req.params.Value); var newValue = value + 1; var collection = db.get('games'); collection.update( {"_id" : id}, {$set: {type: newValue}} , function (err, doc) { if (err) { res.send("There was a problem"); } else { res.location("../../../admin"); res.redirect("../../../admin"); } }); });
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38327542
has answer: http://stackoverflow.com/a/24713288
type: Question
has title: update mongodb with node.js using a variable in $set
upvote count: 5
tagged with: mongodb
score: 5
accepted answer: http://stackoverflow.com/a/24713288
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/24675761
has body: For firefox doc.ambit.value is coming as array So put this check, ischecked_method = false; for ( var i = 0; i &lt; doc.ambit.length; i++) { if(doc.ambit[i].checked) { ischecked_method = true; break; } } if (!ischecked_method) { messages.push("One of two ambits must be selected"); valid = false; }
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24674925
accepted answer of: http://stackoverflow.com/q/24674925
upvote count: 1

http://stackoverflow.com/comment/38368153
comment on: http://stackoverflow.com/a/24731905
has text: Wow Salix, that's awesome. The working fiddle example is great too. Thanks for taking the time on this very well written answer. I don't suppose you know how to also calculate the intersection for this scenario? (finding an 'x' position given an 'area')
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24733030
has title: Fabric js moving image with keyboard
tagged with: keyboard-events
upvote count: 6
possible better answer: http://stackoverflow.com/a/28054201
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28054201
score: 6
type: Question
has answer: http://stackoverflow.com/a/24829397
tagged with: javascript
tagged with: fabricjs
answer count: 2
tagged with: canvas
accepted answer: http://stackoverflow.com/a/24829397
downvote count: 0
has body: Im creating simple tool with fabric.js and I need to add functionality to move object with keyboard.And I'm stuck.For the moment i log in to the console the keyboard events,so I know it works.but I don't know how to add this fucntionality to my canvas image.And help? $(function(){ var canvas = new fabric.Canvas('imageCanvas', { backgroundColor: 'rgba(255, 255, 255, 0)' }); var imageLoader = document.getElementById('imageLoader'); imageLoader.addEventListener('change', handleImage, false); function handleImage(e) { var reader = new FileReader(); reader.onload = function (event) { var img = new Image(); img.onload = function () { var imgInstance = new fabric.Image(img, { }) canvas.add(imgInstance); } img.src = event.target.result; } reader.readAsDataURL(e.target.files[0]); } canvas.on('mouse:down', function(options) { console.log(options.e.clientX, options.e.clientY); }); var canvasWrapper = document.getElementById('canvasWrapper'); canvasWrapper.tabIndex = 1000; canvasWrapper.addEventListener("keydown", doKeyDown, false); function doKeyDown(e) { document.onkeydown = function(e) { switch (e.keyCode) { case 38: /* Up arrow was pressed */ console.log('up works') break; case 40: /* Down arrow was pressed */ console.log('down works') break; case 37: /* Left arrow was pressed */ console.log('left works') break; case 39: /* Right arrow was pressed */ console.log('right works') break; } } } var imageSaver = document.getElementById('imageSaver'); imageSaver.addEventListener('click', imageBorder, false); imageSaver.addEventListener('click', saveImage, false); function imageBorder(e) { canvas.item(0).hasControls = canvas.item(0).hasBorders = false; } function saveImage(e) { this.href = canvas.toDataURL({ format: 'png', quality: 1 }); this.download = 'test.png' if(saveImage) { location.reload(); }else { alert('somtehing went wrong') } } });
favorite count: 0

http://stackoverflow.com/q/24722123
has comment: http://stackoverflow.com/comment/38346043
linked to: http://stackoverflow.com/q/4649699
type: Question
tagged with: javascript
has title: how can I know what index is an html element in its parent children
score: 0
has comment: http://stackoverflow.com/comment/38346363
tagged with: http://stackoverflow.com/tag/html
has body: I chose an HTML element and I want to select its next sibling, but if it's the last child i want to select the first child. the + selector won't do this. How can i get this child index using css selectors?
tagged with: css
duplicate of: http://stackoverflow.com/q/4649699
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38340833
type: Comment
has text: Dont say thanks , please upvote and click the check button if u accept the solution :)
type: AnswerComment
comment on: http://stackoverflow.com/a/24719322
score: 0

http://stackoverflow.com/q/24730893
tagged with: angularjs
tagged with: twitter-bootstrap
has body: I'm having trouble solving this which seems to be an edge case. When I select(using keyboard or mouse) a value from typeahead's dropdown, the ng-model in the input field gets populated just fine. However, if I type a few letters then hit 'escape' button, the 'textFieldValue' ng-model seems to be overwritten with 'undefined' by typeahead because I didn't choose a value. What's the best way to solve this problem? Or is it too much an edge case? &lt;input type="text" ng-model="textFieldValue" typeahead="list for list in getList($viewValue)" typeahead-editable="false"&gt;
has answer: http://stackoverflow.com/a/24731820
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38362982
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
has title: angular-ui bootstrap typeahead escape key causing input field value become undefined
favorite count: 0
accepted answer: http://stackoverflow.com/a/24731820

http://stackoverflow.com/q/24592512
has body: When calling .values() or .values_list() on a QuerySet you can pass in the specific fields you want returned, or even fields you want from related tables. What I'm wanting to do is include the result of a method defined on the model, in addition to some fields, for example: class MyModel(models.Model): name = models.CharField() def favouriteNumber(self): return random.randint(1,10) list(MyModel.objects.all().values('name','favouriteNumber')) =&gt; [{'name':'Bob', 'favouriteNumber':6}, {'name':'Fred', 'favouriteNumber':4}] The above doesn't work, but is what I'm wanting to do, in the same way that the templating language can treat model methods without parameters just like fields. The reason I'm wanting to do this is so that I can pass the information to the JavaScript in the front end to use instead of making calls back to the server to retrieve it each time. Assuming the above (or something similar) isn't possible, I know I could loop over my values() result afterwards and add in the extra information manually.. what would be the most efficient (and clean) way to do that?
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24594992
tagged with: django
tagged with: python
type: AnsweredQuestion
has title: Return the result of a method in a QuerySet.values() or values_list()?
accepted answer: http://stackoverflow.com/a/24594992
type: Question

weinre
tags question: http://stackoverflow.com/q/24674670
type: Tag
tag name: weinre

http://stackoverflow.com/q/24676333
tagged with: iphone
downvote count: 0
tagged with: ios
tagged with: javascript
tagged with: ipad
favorite count: 0
score: 5
has body: I use an input field on a website so that a user can take himself into photo. On iPad, iPhone, the resulting picture is upside down. How can I easily detect if the user used the camera so that I rotate the image via Javascript ? I use the picture in a Javascript Canvas after. I got this input field : Choose image or take a picture : >input type="file" id="imageLoader" name="imageLoader" accept="image/*"/> And in JS : var imageLoader; imageLoader = document.getElementById('imageLoader'); imageLoader.addEventListener('change', _handleImage, false); function _handleImage( e ){ var reader = new FileReader(); reader.onload = function(event){ picture.onload = function(){ // The image here is upside down :( I want to turn it to 180 degrees here do_stuff( ); }; picture.src = event.target.result; }; reader.readAsDataURL(e.target.files[0]); }
has answer: http://stackoverflow.com/a/24807218
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38263891
has comment: http://stackoverflow.com/comment/89472714
has title: How to deal with iOS taking upside down picture
type: Question
possible better answer: http://stackoverflow.com/a/24676662
upvote count: 5
accepted answer: http://stackoverflow.com/a/24807218
has answer: http://stackoverflow.com/a/24676662
answer count: 2
tagged with: canvas
linked to: http://stackoverflow.com/q/20600800

http://stackoverflow.com/q/24720872
has comment: http://stackoverflow.com/comment/38343833
has comment: http://stackoverflow.com/comment/38343707
has answer: http://stackoverflow.com/a/24721053
accepted answer: http://stackoverflow.com/a/24727470
downvote count: 1
type: Question
type: AnsweredQuestion
has body: I'm an average javascript guy. Lately I'm doing some javascript in an area where people are not js programmers. They use these weird words. I was wondering if someone can explain the data structures in a javascript oriented way. (like maybe a js example). I looked them up on wikipedia but they use all this non-js thinking/terminology which throws me off. From a non-js prespective we have four basic data structures: Linked list - I think they also call this hash table? which is just key value pairs? Array - js has this Binary Tree - no js equivalent? Heap - no js equivalent?
has comment: http://stackoverflow.com/comment/38343776
score: -1
has comment: http://stackoverflow.com/comment/38343660
answer count: 3
has comment: http://stackoverflow.com/comment/38343777
upvote count: 0
possible better answer: http://stackoverflow.com/a/24720950
tagged with: javascript
tagged with: data-structures
has answer: http://stackoverflow.com/a/24720950
favorite count: 0
has title: Understanding data structures in Javascript oriented way
has answer: http://stackoverflow.com/a/24727470

http://stackoverflow.com/q/24610317
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24611541
accepted answer: http://stackoverflow.com/a/24611541
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38134245
has title: HTML validations from javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38134388
has body: &lt;input type="text" id="newFname" pattern="^[a-zA-z0-9 _-]{2,}$" required placeholder="First Name" /&gt; &lt;input type="text" id="newLname" pattern="^[a-zA-z0-9 _-]{2,}$" required placeholder="Last Name"/&gt; Is it possible to disable html validation on second input without modifying pattern or required attributes?
type: Question
has comment: http://stackoverflow.com/comment/38143487

http://stackoverflow.com/q/24608986
has comment: http://stackoverflow.com/comment/38131619
has body: I am facing one problem in JS, please help me to resolve this.. I have two methods they are simultaneously executing one after other.. I have to stop them after second click on image. Below is my JS code I am calling fadeIn(img1, img2, img3) after first click on image then some animation will be goes on, once I click second time the whole animation(method execution) should be stopped. var t1 = 0; var t2 = 0; function fadeIn(img1, img2, img3) { $(imgIdForClick_1).addClass('animated pulse'); $('#cashBar1').addClass('animated pulse'); $('#cashBarDec1').addClass('animated pulse'); var t1 = setTimeout(function() { fadeOut(img1, img2, img3); if (clickCount_1 &gt;= 2) { alert("clicked 1"); return false; } }, 500); //t1 = setTimeout(fadeOut, 500); }; function fadeOut(img11, img22, img33) { $(imgIdForClick_1).removeClass('animated pulse'); $('#cashBar1').removeClass('animated pulse'); $('#cashBarDec1').removeClass('animated pulse'); var t2 = setTimeout(function() { fadeIn(img11, img22, img33); if (clickCount_1 &gt;= 2) { alert("clicked 2"); return false; } }, 500); //t2 = setTimeout(fadeIn, 500); }; By below code I am calling this snippet in first click imgId1 = $('#img1'); imgId2 = $('#cashBar1'); imgId3 = $('#cashBarDec1'); fadeIn(imgId1, imgId2, imgId3); After second click clickCount_1 varibale will be 2 clearTimeout(t1); clearTimeout(t2);
answer count: 1
has answer: http://stackoverflow.com/a/24609177
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38131507
has title: How to stop method execution defined in setTimeout
accepted answer: http://stackoverflow.com/a/24609177
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/24615472
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24612657
has body: Note that in JSFiddle the script section is executed after document load. If you put your script in onload event (as in fiddle demo) you should attach the click event handler to the button with JavaScript. Otherwise if you want to use the onclick attribute to the html element define called function outside the onload event. Updated Fiddle

http://stackoverflow.com/comment/38359752
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24723161
has text: how do I definethe getroutes method within apiproxy.php? Or does that come from my url in my collection?

http://stackoverflow.com/comment/38394326
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24747603
has text: you did or not ? i don't understand. Show us your whole code please (HTML and PHP)

http://stackoverflow.com/q/24693506
tagged with: jquery
answer count: 1
downvote count: 0
tagged with: drilldown
has body: I am trying to change my working highcharts into different type of chart using 4 radio buttons: column, bar, pie, line. Here is my working chart: $(function () { // Create the chart var options = { chart: { events: { drilldown: function (e) { if (!e.seriesOptions) { var chart = this, drilldowns = &lt;?php echo json_encode($array) ?&gt;, series = drilldowns[e.point.name]; // Show the loading label chart.showLoading('Loading ...'); setTimeout(function () { chart.hideLoading(); chart.addSeriesAsDrilldown(e.point, series); }, 1000); } } }, plotBorderWidth: 0 }, title: { text: 'Chart Title', }, // subtitle: { text: 'Subtitle' }, // xAxis: { type: 'category', }, // yAxis: { title: { margin: 10, text: 'No. of user' }, }, // legend: { enabled: true, }, // plotOptions: { series: { pointPadding: 0.2, borderWidth: 0, dataLabels: { enabled: true } }, pie: { plotBorderWidth: 0, allowPointSelect: true, cursor: 'pointer', size: '100%', dataLabels: { enabled: true, format: '{point.name}: &lt;b&gt;{point.y}&lt;/b&gt;' } } }, // series: [{ name: 'Case', colorByPoint: true, data:data_array, }], // drilldown: { series: [] } }; // Column chart options.chart.renderTo = 'container'; options.chart.type = 'column'; var chart1 = new Highcharts.Chart(options); }); As you can see a drilldown column type will be the default type of the chart and i want to add radio button where user can choose type of chart. Then I want to disable "LINE" radio button when the chart is in main series state and enable it when in drilldown series state. Here are my radio buttons: &lt;input type="radio" name="mychart" class="mychart" id= "column" value="column" onclick= "chartfunc()"&gt;Column &lt;input type="radio" name="mychart" class="mychart" id= "bar" value="bar" onclick= "chartfunc()"&gt;Bar &lt;input type="radio" name="mychart" class="mychart" id= "pie" value="pie" onclick= "chartfunc()"&gt;Pie &lt;input type="radio" name="mychart" class="mychart" id= "line" value="line" onclick= "chartfunc()"&gt;Line the i …
favorite count: 0
has title: Highcharts - Dynamically change chart type with on radio buttons click
has answer: http://stackoverflow.com/a/24694494
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/24694494
upvote count: 1
type: Question
tagged with: charts
tagged with: highcharts
tagged with: javascript

http://stackoverflow.com/comment/38186191
score: 0
type: Comment
has text: Thanks. didn't know about truthy, so know it makes sense.
comment on: http://stackoverflow.com/a/24637082
type: AnswerComment

http://stackoverflow.com/q/24591664
linked to: http://stackoverflow.com/q/855360
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to make a dynamic comment insert system using AJAX, but I have a problem with the form: it won't even try and perform the javascript function. Instead, it just performs a GET operation and redirects me to ?user=&amp;reply=&amp;submit=Submit and doesn't do anything. Here is my form code: &lt;form id="cmtsubmit" onsubmit="return submitComment(this);"&gt; &lt;input type="text" name="user" id="user" /&gt; &lt;textarea name="reply" id="reply"&gt;&lt;/textarea&gt; &lt;input type="submit" name="submit" value="Submit" /&gt; &lt;/form&gt; and here is my javascript code: function submitComment(form) { if (window.XMLhttpRequest) { httpRequest = new XMLhttpRequest(); } else if (window.ActiveXObject) { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } httpRequest.onreadystatechange = function() { if(httpRequest.readyState === 4 &amp;&amp; httpRequest.status === 200) { document.getElementById('container').innerHTML += '&lt;div style="border: 1px solid; padding: 15px;"&gt;' + httpRequest.responseText + '&lt;/div&gt;'; return false; } else { } } httpRequest.open('GET', 'index.php?p=cmtinsrt&amp;user=' + form.user.value + '&amp;cmt=' + form.reply.value, true); httpRequest.send(null); } Where am I going wrong? EDIT: I added a "return false" to the code and now it works in IE10, but not Firefox or Chrome. I haven't tested any other browsers yet but clearly if it doesn't work in those two it's not a proper solution.
accepted answer: http://stackoverflow.com/a/24591707
has comment: http://stackoverflow.com/comment/38098655
type: AnsweredQuestion
has title: Form onsubmit being completely ignored
upvote count: 5
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/24591707
score: 5
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/38245249
has text: This is what I needed to hear. THis explains to me why I was getting the commas. You rock and now I understand!
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24669166
type: AnswerComment

http://stackoverflow.com/a/24661953
has body: You're using the element variables as their values. You need to use the values. if (Season.value == 'none' &amp;&amp; Month.selectedIndex == 0) { alert("A Season OR a Month is required."); return false; } as opposed to: if (Season == 'none' &amp;&amp; Month == 0) { alert("A Season OR a Month is required."); return false; }
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24661844

http://stackoverflow.com/comment/38160730
has text: It made me wait 5min for some reason, i dont know if its because someone down-voted me based on the fact that my html wasn't flushed, and didnt include my `` ... ~rolls eyes~
type: AnswerComment
comment on: http://stackoverflow.com/a/24623615
score: 0
type: Comment

http://stackoverflow.com/q/24721611
tagged with: jquery
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24721665
has answer: http://stackoverflow.com/a/24721666
accepted answer: http://stackoverflow.com/a/24721666
type: Question
has body: http://jsbin.com/guvixara/1/edit I'm dynamically adding a button... $(".confirm-add-button").on("click", function() { var $ctrl = $('&lt;button/&gt;').attr({ class: $('.newbtnclassname').val()}).html($('.newbtntxt').val()); $(".drawing-area").append($ctrl); UpdateView(); }); However I don't (as in do NOT) want to add the class attribute if the $('.newbtnclassname').val() is blank. If anyone can help with this it'll be greatly appreciated.
tagged with: javascript
has title: If value is empty don't add class attr upon append
has answer: http://stackoverflow.com/a/24721669
score: 0
has answer: http://stackoverflow.com/a/24721665
answer count: 3

http://stackoverflow.com/q/24612502
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14994391
accepted answer: http://stackoverflow.com/a/24614107
answer count: 2
linked to: http://stackoverflow.com/q/14833326
possible better answer: http://stackoverflow.com/a/24613445
downvote count: 0
has answer: http://stackoverflow.com/a/24613445
score: 1
has title: Focus a certain input field in angularjs
has comment: http://stackoverflow.com/comment/38138711
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38139421
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24614107
upvote count: 1
type: Question
has body: So I have a variable number of input fields and after saving them I'd like to return focus to the first of them. HTML Code: &lt;td ng-repeat='col in list.cols'&gt; &lt;input class='colData' type='text' ng-model='newentry[$index]' on-press-enter="addRow(newentry)"&gt; &lt;/td&gt; As you can probably read I call 'addRow()' when pressing enter and then add the values to my data model. This works fine. Now after adding the data I would like to set the focus to the first of these input fields. I am trying to resist the urge to fall back on my jQuery knowledge. If i included jQuery I could just do $('input.colData').first().focus();. But I'm really trying to learn to do things 'the angular way'. How would I approach this scenario? Is there a way maybe to select an input field by the model it contains? thanks, J UPDATE: I don't think this is a duplicate, as in my case I can't add a directive to the input field, as they are created dynamically by angular and only the first one should be focussed. Their number is, as stated above, variable. I fail to see how to identify the first among them aside from the jQuery one-liner.

http://stackoverflow.com/comment/38185084
comment on: http://stackoverflow.com/a/24634649
score: 0
type: AnswerComment
has text: Yeah I guess maybe I can make it a bit more complicated and just call the function with different parameters. The api looks like it has changed from the older version with global variables.
type: Comment

http://stackoverflow.com/q/24625058
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/38169492
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38165096
has comment: http://stackoverflow.com/comment/38168969
has comment: http://stackoverflow.com/comment/38163808
has comment: http://stackoverflow.com/comment/38163600
has comment: http://stackoverflow.com/comment/38163898
type: Question
has comment: http://stackoverflow.com/comment/38164186
tagged with: javascript
has comment: http://stackoverflow.com/comment/38166216
has body: Here is my HTML code Shift E L N GO! The angular JS Controller Code .controller("formController", function ($scope) { // when initialized only the initial value is displayed // in the alert. But the passed value through // ng-model directive is still undefined $scope.model = {shiftID: "init"}; $scope.getCall = function () { alert($scope.model.shiftID) } ..... } I have gone through few other solutions, but not yet able to solve it.
score: 0
has comment: http://stackoverflow.com/comment/38165447
upvote count: 1
has comment: http://stackoverflow.com/comment/38163541
downvote count: 1
has comment: http://stackoverflow.com/comment/38164847
has comment: http://stackoverflow.com/comment/38165738
favorite count: 0
has title: ng-model value undefined in controller for custom bootstrap dropdown submit
has comment: http://stackoverflow.com/comment/38163639
answer count: 0
tagged with: angularjs

http://stackoverflow.com/comment/38286386
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24691117
has text: AWE is my library. I am using this as a middle man for different libraries but core library is SCEditor. And I'll take a peak at the MutationObservers.

http://stackoverflow.com/comment/38326103
has text: as here http://img4.hostingpics.net/pics/902044Capturede769cran20140712a768120157.png
comment on: http://stackoverflow.com/a/24711704
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/24743581
type: Answer
has comment: http://stackoverflow.com/comment/38386981
has comment: http://stackoverflow.com/comment/38387558
upvote count: 1
has body: Try these expressions below // 1st expression (simplest) ^(SELECT|INSERT\sINTO\s|DELETE|UPDATE).+;?$/gi //2nd expression (a better one) ^(?=(SELECT|INSERT|DELETE|UPDATE)+).*(?=(FROM|SET|INTO)+).*(WHERE|ORDER\sBy|LIMIT)?;?$ //3rd expression (even better) (?=(SELECT|INSERT|DELETE|UPDATE)+).*(?=(FROM|SET|INTO)+).*(WHERE|ORDER\sBy|LIMIT)?;? // Strings tested so far using third expression (no fails so far) SELECT password FROM users WHERE 1 I'd like to select all my best books WHERE are you? UPDATE users SET password = "hacked" We were in group of three SELECT all elements of something I'm FROM / from someland DELETE * FROM users WHERE I do love regex SELECT * FROM users WHERE 1; SELECT password FROM users WHERE 1 LIMIT 1 Insert a freaking coin into machine INSERT INTO users VALUES DELETE * FROM users; DELETE password FROM users LIKE 'admin' UPDATE users SET password = '' OMG! SELECT Chuck Norris for a president UPDATE Brian SET tolerance = 'higher' &lt;--- though, a proper SQL ;) SELECT * FROM users Let's check this SELECT user FROM users; whatever SELECT user FROM users SELECT user, password FROM users SELECT * FROM users WHERE user LIKE 'admin' SELECT * FROM users WHERE user = 'admin' SELECT user FROM users WHERE password = '' ORDER BY user; DELETE * FROM users DELETE FROM users DELETE FROM users WHERE user = "admin"; UPDATE users SET password = ''; UPDATE users SET username = 'hohoho' AND password = ''; INSERT INTO users VALUES ('santa', 'hohoho'); INSERT INTO users (username, password) VALUES ('santa', 'hohoho'); Usage: pattern = /(?=(SELECT|INSERT|DELETE|UPDATE)+).*(?=(FROM|SET|INTO)+).*(WHERE|ORDER\sBy|LIMIT)?;?/gi; pattern.test('SELECT user, password FROM users'); // true Testing in progress... :) Regex Fiddle
has comment: http://stackoverflow.com/comment/38386860
answers question: http://stackoverflow.com/q/24743200
has comment: http://stackoverflow.com/comment/38387496
score: -1
has comment: http://stackoverflow.com/comment/38386862
has comment: http://stackoverflow.com/comment/38388464
has comment: http://stackoverflow.com/comment/38387865
has comment: http://stackoverflow.com/comment/38388172
downvote count: 2

http://stackoverflow.com/q/24588147
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/24588195
has comment: http://stackoverflow.com/comment/38091621
type: Question
score: 1
has body: I noticed that you can't import a javascript file and define a variable in the same Is there a way to load the javascript after the variable without using another tag?
has answer: http://stackoverflow.com/a/24588424
has comment: http://stackoverflow.com/comment/38091580
downvote count: 0
tagged with: javascript
tagged with: variables
has answer: http://stackoverflow.com/a/24588197
has title: Define variable before javascript load
has comment: http://stackoverflow.com/comment/38092464
has comment: http://stackoverflow.com/comment/38091543
answer count: 3
has comment: http://stackoverflow.com/comment/38091623
tagged with: external
has comment: http://stackoverflow.com/comment/38091568
favorite count: 0
tagged with: var

http://stackoverflow.com/q/24589272
tagged with: .net
tagged with: websocket
has answer: http://stackoverflow.com/a/24595792
tagged with: javascript
score: 0
has title: Understanding XSockets.NET pubsub: producing and consuming messages from JavaScript
accepted answer: http://stackoverflow.com/a/24595792
has body: Let's say I've the following sample code (JavaScript): // Client A var conn = new XSockets.WebSocket([wsUri]); conn.on(XSockets.Events.open, function (clientInfo) { conn.publish("some:channel", { text: "hello world" }); }); // Client B (subscriber) var conn = new XSockets.WebSocket([wsUri]); conn.on(XSockets.Events.open, function (clientInfo) { conn.on("some:channel", function(message) { // Subscription receives no message! }); }); Client B never receives a message. Note that this is a sample code. You might think that I don't receive the message because Client B got connected after Client A sent the message, but in the actual code I'm publishing messages after both sockets are opened. The server-side XSocketsController is working because I'm using it for server-sent notifications. What am I doing wrong? Thank you in advance!
tagged with: xsockets.net
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38095123
type: Question
has comment: http://stackoverflow.com/comment/38095180
answer count: 1

http://stackoverflow.com/q/24709466
score: 0
has answer: http://stackoverflow.com/a/24709499
has comment: http://stackoverflow.com/comment/38321659
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/572897
accepted answer: http://stackoverflow.com/a/24709499
tagged with: prototype
type: Question
answer count: 1
has title: JS - Call to static method with prototype
tagged with: javascript
has comment: http://stackoverflow.com/comment/38321599
has body: Well, I searched and didn't find a way to call a prototype method without instantiate another object. I found how to do: var x = new X(); X.MyMethod(); What I really need to know is if there is a way to do like in jQuery, doing something like: var x = "mystring"; x.MyMethod(); In jQuery UI, we call .draggable(), .resizable() in a selected object. Can I do the same?

http://stackoverflow.com/a/24688822
upvote count: 2
has body: Is the memory state of local variables of a function stored even after its execution Yes. This is called a closure. As long as your callback is active, the variables in its scope will be available. everytime the (server url) is called its callback is called with request,response variables.So the memory state must be continuosly increasing and therefore it should crash at some point of time due to lack of memory. No. When all the work is done, and no outstanding (asynchronous) callbacks do reference your variables any more, they will be garbage collected. Does this happen? Yes, you can write bad code that leads to memory leaks.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24688588
score: 2

http://stackoverflow.com/comment/38232355
score: 0
has text: Guys kindly help me for the above question to solve
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24655807

http://stackoverflow.com/a/24735602
type: Answer
answers question: http://stackoverflow.com/q/24735266
has body: Copy-pasting the entire responsiveslides.jquery.js file into the console makes the thing work normally, so your problem is in &lt;script type="text/javascript" src="responsiveslides.min.js"&gt;&lt;/script&gt; The only issue is that the library module never runs, even though the library gets included as a file. Put your script tags at the end of the page, that might work better. Or try placing the library script tag at the end alone. Ideally though, you should just bunch up jquery and the library file in one .js file and include that one.
has comment: http://stackoverflow.com/comment/38376960
score: 0

http://stackoverflow.com/comment/38412079
comment on: http://stackoverflow.com/q/24737403
type: Comment
has text: @canuckistani Another idea is to give ability to attach libraries to the current context (since it's not a real world case, when you have only one JS file you're working with). I'm talking about more or less about creating http://jsfiddle.net/ clone inside FF.
type: QuestionComment
score: 0

http://stackoverflow.com/q/24669913
has comment: http://stackoverflow.com/comment/38246570
has comment: http://stackoverflow.com/comment/38246976
type: Question
linked to: http://stackoverflow.com/q/11226489
score: -2
duplicate of: http://stackoverflow.com/q/11226489
downvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/24670172
has title: Different forms display on same page when clicked on different buttons using JavaScript
has body: I have two buttons say CITIZEN and POLICE. When I click on the button CITIZEN, I want to display a form say CITIZEN_FORM on the same page. And when I click on the button POLICE, I want to display a form say POLICE_FORM on the same page. How to do this using JavaScript and HTML?
has answer: http://stackoverflow.com/a/24670012
has answer: http://stackoverflow.com/a/24670056
tagged with: javascript
type: UnansweredQuestion
tagged with: forms
upvote count: 0
tagged with: button
favorite count: 0

http://stackoverflow.com/q/24600953
has answer: http://stackoverflow.com/a/24601068
answer count: 1
downvote count: 0
has body: Plunk: http://plnkr.co/edit/Y4ntAj2fIIpexKjkCvlD?p=preview I'm trying to build a form component which allows the user to create multiple instances of a certain data field, but populate them from the same set of inputs. I'm creating a radio button for each of the items within the set, using ng-repeat then each radio button has its value set to the $index from the repeat. The radio buttons are modelled on $scope.selectedItem, which is used to point the inputs to the right item. For some reason, however, selectedItem never changes, even though the selected state of the radio buttons do. I tried a similar thing with static radio buttons and it worked fine, which leads me to believe that there is a problem with ng-model within ng-repeat.
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/24601068
tagged with: angularjs
has title: Broken ngModel on Radio buttons with an ngRepeat
tagged with: angularjs-ng-repeat
type: AnsweredQuestion
tagged with: angular-ngmodel
score: 4
type: Question
upvote count: 4

http://stackoverflow.com/comment/38349474
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24715516
score: 0
has text: @Saki By now, I've added a listener to that panel (before getting displayed in the UI) so inside that handler I got the panel object and from that I can grab a `dom` object - the one I am requesting on my question but loaded from a `HTML` string. Then I am doing my customizations (I know `Ext.Template` is cleaner but I can figure out why `ExtJS` can't do the same as `jQuery` - I think `ExtJS` is more powerful right? that's all).

http://stackoverflow.com/q/24669993
tagged with: pjax
type: UnansweredQuestion
tagged with: mathjax
has body: When I use Pjax I find MathJax cannot be loaded unless a manual refresh. I spent a lot of time on this. My solution for now is to add a js call in "pjax:end" $.getScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"); However, it doesn't work... I tried to monitor the timeline when a click is trigger in pjax, I found that only MathJax.js is called, while a manual refresh will get many other js stuff called. https://i.sstatic.net/Rz0Dp.png https://i.sstatic.net/hx5Mz.png (Sorry I don't have the permission yet to post imgs directly) The first picture shows pjax refresh, and the second one shows a manual refresh. Does anyone know how to solve this?
answer count: 0
has comment: http://stackoverflow.com/comment/38264816
type: Question
has title: How to Integrate MathJax with Pjax?
has comment: http://stackoverflow.com/comment/74124859
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/38251989
comment on: http://stackoverflow.com/q/24672869
score: 0
type: Comment
type: QuestionComment
has text: This works for me:

http://stackoverflow.com/comment/38157887
has text: thank you for helping, not quite - I made a fiddle: http://jsfiddle.net/crunchfactory/L59GU/
comment on: http://stackoverflow.com/q/24620780
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38219842
score: 0
type: AnswerComment
type: Comment
has text: Removed `return false` since `event.preventDefault();` is compatible across browsers.
comment on: http://stackoverflow.com/a/24655014

http://stackoverflow.com/q/24673505
tagged with: knockout-2.0
has title: Knockout Computed - write a new value
tagged with: knockout.js
type: AnsweredQuestion
has body: I'm building a very number/options heavy application using Knockout and on the screen I'm currently working on is pretty complex in terms of what's happening behind the scenes. The whole screen is dynamic and the options displayed are generated from an observableArray. The way the app works is pretty complex and I've created a slimmed down JSFiddle for you to view here: http://jsfiddle.net/z56zV/ Whenever the button is clicked, I want getValueOne to reset to 0 but no matter what I try, nothing seems to writing the value to getValueOne. ps. I know you shouldn't really submit a SO post with no code but I feel the best way for you to udnerstand what exactly is going on behind the scenes is to play with the JSFiddle. Update: I have the code working to an extent, where the write function of getValueOne is reading the value being sent to the computed but I'm having difficulty storing this as the new value? http://jsfiddle.net/z56zV/1/
type: Question
score: 0
has comment: http://stackoverflow.com/comment/38253292
has comment: http://stackoverflow.com/comment/38253981
has answer: http://stackoverflow.com/a/24673844
accepted answer: http://stackoverflow.com/a/24673844
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38253515

http://stackoverflow.com/comment/38307760
type: QuestionComment
has text: Couple of questions. Can we see your scope/view? Are you using an ng-repeat for the staffList? If so, and if you're going to the server to get the response anyhow, then could you just update the staffList with the response? Typically I just update whatever variable my ng-repeat is bound to and then let angular do the dirty checking to see if an update of the dom is needed. Is this being triggered by the user via a refresh action or is this running in the background?
score: 0
comment on: http://stackoverflow.com/q/24694231
type: Comment

http://stackoverflow.com/a/24649298
score: 3
accepted answer of: http://stackoverflow.com/q/24649276
has comment: http://stackoverflow.com/comment/38208932
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24649276
type: Answer
upvote count: 3
has body: this problem doesn't relate with the div or span getElementById selects the first element of given id, getElementsByClassName returns an array-like object of all child elements which have all of the given class names. use getElementsByClassName in place of getElementByClassName. you want to put innerHTML to the first element of a class example,so try the below code var elem = document.getElementsByClassName("example")[0]; elem.innerHTML = "change example text to something other";

http://stackoverflow.com/comment/38316319
has text: `month == 2 && day > 28` – what about leap years? See [*How to validate a date*](http://stackoverflow.com/questions/5812220/how-to-validate-a-date/5812341#5812341).
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/24706676

http://stackoverflow.com/comment/38222085
has text: Which is the left side, exactly? Do you want to include padding, border, margin?
score: 1
comment on: http://stackoverflow.com/q/24656542
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24681264
answer count: 1
has answer: http://stackoverflow.com/a/24699404
tagged with: javascript
has comment: http://stackoverflow.com/comment/38284737
has comment: http://stackoverflow.com/comment/38290412
score: 0
tagged with: arcgis-js-api
has comment: http://stackoverflow.com/comment/38290794
type: UnansweredQuestion
has body: i have a problem with displaying informations on an Basemap in two of tree displayLevels. I Have a program that is inspired from this esri sample:https://developers.arcgis.com/javascript/jssamples/data_gas_prices.html After this i have build my own zoomLevels or display Levels because i only need three. My Problem is that i want to have only in two of three zoomLevels text in my featureLayer and i have no Idea how to do this. The only Example i found in the Internet was this Sample form Esri: https://developers.arcgis.com/javascript/jssamples/map_switch_layer_on_zoom.html But they work with ArcGISTiledMapServiceLayer and i'm not. So please can anybody tell me a solution for this Problem? Here is the code: define([ "dojo/_base/declare", "dojo/_base/array", "esri/map", "esri/graphic", "esri/lang", "esri/geometry/Extent", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/renderers/SimpleRenderer", "esri/renderers/ClassBreaksRenderer", "esri/symbols/Font", "esri/symbols/TextSymbol", "esri/layers/FeatureLayer", "esri/dijit/Legend", "esri/dijit/OverviewMap", "esri/InfoTemplate", "esri/request", "modules/mapTip", "dijit/TooltipDialog", "dijit/popup", "dojo/json", "dojo/store/JsonRest", "dojo/_base/array", "dojo/parser", "dojo/_base/connect", "dojo/_base/Color", "dojo/number", "dojo/dom", "dojo/dom-construct", "dojo/dom-style", "dijit/form/Button", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer", "dojo/domReady!" ], function( declare,array, Map, Graphic, esriLang, Extent, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, ClassBreaksRenderer, Font, TextSymbol,FeatureLayer, Legend, OverviewMap, InfoTemplate, esriRequest,Tip, TooltipDialog, dijitPopup,JSON, JsonRest, arr, parser, conn, Color, number, dom, domConstruct, domStyle, Button) { return declare (null, { init: function (){ var lods = [ //{"level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777}, //{"level" : 2, "resolution" : 39135.7…
tagged with: dictionary
has title: display data from featureLayer in one displayLevel
tagged with: dojo
has comment: http://stackoverflow.com/comment/38290526
type: Question

http://stackoverflow.com/a/24689110
has comment: http://stackoverflow.com/comment/38282996
accepted answer of: http://stackoverflow.com/q/24687633
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24687633
has comment: http://stackoverflow.com/comment/38283030
has body: By default, $.ajax() sends data URL-encoded as mentioned in the description of the processData option: By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". The body-parser that corresponds to that Content-Type and format is urlencoded(): app.use(bodyParser.urlencoded()); If you'd rather use JSON for the request, you'll need to provide the data already formatted as such along with a matching contentType that bodyParser.json() recognizes: request = $.ajax({ url: "http://54.186.131.77:3333/login", type: "POST", crossDomain: true, data: JSON.stringify(loginCredentials), contentType: 'application/json', dataType: 'json' // ... }); Note for cross-domain: With these modifications, the server will have to handle preflight OPTIONS requests for the route. And, note that a bodyParser isn't needed for HEAD or GET requests as the data is included in the URL rather than the body. Express parses that separately into req.query.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38283050
type: Answer

http://stackoverflow.com/comment/53308114
score: 0
type: Comment
has text: In the first block of code you're adding a second instance of class `.stripe` to every other row, as you've already added it to everything 2 lines prior. The more efficient way of doing this, and not breaking it, is to remove that first `$(this).addClass("stripe");` before the if-statement. That way you're just adding the class to what needs it, rather than adding it to everything then removing it from what isn't needed, which I what I believe you're trying to do.
comment on: http://stackoverflow.com/a/31060405
type: AnswerComment

http://stackoverflow.com/comment/38383077
score: 0
type: AnswerComment
has text: Thank you so much, i don'k know much of css, so I try to use the property focusCls, of the ExtJs, but like you said isn't needed. This Resolves the problem, but in all cases, the ExtJs sould fire the focus event...
type: Comment
comment on: http://stackoverflow.com/a/24741650

http://stackoverflow.com/comment/38404956
has text: You'll need to either add some more code, or show a link to the tumblr. There are other ways this could be tackled. i.e. write different classes which contain all of the background image info and then change the class name on the body tag according to the page. A link might be the quickest thing, but I would also post code to show what you've tried. You may have to code an absolute url for the images.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24723661
type: Comment

http://stackoverflow.com/q/24678730
score: -3
has comment: http://stackoverflow.com/comment/38263540
has comment: http://stackoverflow.com/comment/38332204
has comment: http://stackoverflow.com/comment/38263784
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/38263872
has answer: http://stackoverflow.com/a/24715198
accepted answer: http://stackoverflow.com/a/24715198
has comment: http://stackoverflow.com/comment/38264155
possible better answer: http://stackoverflow.com/a/24678773
has comment: http://stackoverflow.com/comment/38263161
has body: I have the following simple JavaScript to run, referring to a element inside an angular view: var buttons = document.querySelectorAll('.msg-type i'); console.log(buttons.length); It print on the console 0, which is wrong (there are 3 elements on the page). The problem is, my script is included in the index page, not in the view itself, and I don't want to fragmentate my script to avoid too much HTTP requests and so reducing load time. How can I run the script when my view load?
has answer: http://stackoverflow.com/a/24678773
type: Question
has comment: http://stackoverflow.com/comment/38263239
has comment: http://stackoverflow.com/comment/38264490
tagged with: javascript
linked to: http://stackoverflow.com/q/18220197
has comment: http://stackoverflow.com/comment/38263295
has comment: http://stackoverflow.com/comment/38264250
answer count: 2
has title: Script not running when the view load
downvote count: 3
has comment: http://stackoverflow.com/comment/38263143
has comment: http://stackoverflow.com/comment/38264049
has comment: http://stackoverflow.com/comment/38265214
favorite count: 0
has comment: http://stackoverflow.com/comment/38264468
has comment: http://stackoverflow.com/comment/38265059
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38263331

http://stackoverflow.com/q/24726970
has title: Get php variable containing date from jquery datepicker
answer count: 1
has body: I have a jquery datepicker defined like this : HTML/php: &lt;input id="datepicker" name="date" placeholder="Date" /&gt; Javascript: &lt;script&gt; $(document).ready(function() { $("#datepicker").datepicker(); }); &lt;/script&gt; This works perfectly but i need to get the date in a php variable. I tried $_POST["date"] but this does not work. Could you help me ? Thanks !
has comment: http://stackoverflow.com/comment/38355579
has answer: http://stackoverflow.com/a/24732793
has comment: http://stackoverflow.com/comment/38355786
has comment: http://stackoverflow.com/comment/38355362
has comment: http://stackoverflow.com/comment/38355895
has comment: http://stackoverflow.com/comment/38356032
type: UnansweredQuestion
tagged with: datepicker
tagged with: php
has comment: http://stackoverflow.com/comment/38355383
has comment: http://stackoverflow.com/comment/38355271
has comment: http://stackoverflow.com/comment/38356826
type: Question
has comment: http://stackoverflow.com/comment/38355304
has comment: http://stackoverflow.com/comment/38356869
has comment: http://stackoverflow.com/comment/38355229
has comment: http://stackoverflow.com/comment/38355299
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38355848
has comment: http://stackoverflow.com/comment/38355260
score: 0

http://stackoverflow.com/comment/38217106
has text: It might be binding the .change() more than once on the object. Before the bind try this to see if that is the problem: `$('[name="properties_box"]').unbind()`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24653923
score: 1

http://stackoverflow.com/a/24712547
has comment: http://stackoverflow.com/comment/38327878
accepted answer of: http://stackoverflow.com/q/24712360
answers question: http://stackoverflow.com/q/24712360
downvote count: 0
score: 1
has body: I think indeed the problem resides within the php mail() method. Just make sure it is, by commenting out the mail() call, and replace it with echo 'I should be sending mail now!'; exit; Then change your ajax call to: $.ajax({ type: "POST", url: "process.php", data: dataString, success: function (response) { alert(response); } }); Now send the form to the server, and see what comes up in the alert box. If you get the expected string, you should indeed setup a smtp server so you can send mail. Another option would be to use an external mailserver, but it requires you to have a proper email account somewhere else. There are a bunch of scripts out there, check out phpmailer for instance.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/44747164
type: AcceptedAnswer

sorting
tags question: http://stackoverflow.com/q/24611754
tags question: http://stackoverflow.com/q/24606130
tags question: http://stackoverflow.com/q/24593371
tags question: http://stackoverflow.com/q/24736852
tags question: http://stackoverflow.com/q/24636193
tags question: http://stackoverflow.com/q/24724679
tags question: http://stackoverflow.com/q/24621098
tags question: http://stackoverflow.com/q/24710072
tags question: http://stackoverflow.com/q/24681650
type: Tag
tags question: http://stackoverflow.com/q/24627008
tags question: http://stackoverflow.com/q/24629917
tags question: http://stackoverflow.com/q/24706355
tags question: http://stackoverflow.com/q/24629299
tag name: sorting
tags question: http://stackoverflow.com/q/24684938
tags question: http://stackoverflow.com/q/24682595
tags question: http://stackoverflow.com/q/24657743

http://stackoverflow.com/q/24672647
accepted answer: http://stackoverflow.com/a/35742783
score: 0
has body: Does anyone know if there is an event fired on Kendo Grids once you have stopped re-sizing the columns? I can't find anything on the documentation: http://docs.telerik.com/kendo-ui/api/web/grid1 If there isn't one, can anyone suggest how I might bind a column resize end event to the grid?
has comment: http://stackoverflow.com/comment/38263369
has comment: http://stackoverflow.com/comment/38296608
type: AnsweredQuestion
type: Question
tagged with: kendo-grid
has answer: http://stackoverflow.com/a/35742783
has title: Kendo Grid column resize end event
has comment: http://stackoverflow.com/comment/38262442
answer count: 1
tagged with: javascript
tagged with: dom-events

http://stackoverflow.com/a/24741506
answers question: http://stackoverflow.com/q/24741365
downvote count: 0
type: Answer
has body: If you want code to run when the ajax request is done, set the succes parameter: $.ajax({ url: "submit.php", type: "post", data: values, success: function(data){ $("#dialog").dialog({modal: true, height: 200, width: 300 }); } }); If you just put the code behind the ajax request, it will immediately run after the request has started instead of when it has succeeded.
upvote count: 1
score: 1

http://stackoverflow.com/comment/38286109
type: QuestionComment
score: 0
has text: Thanks. Yes adding $location.path works. But before going to that page of location.path it first goes to login page again and then redirects to the other page.
comment on: http://stackoverflow.com/q/24687546
type: Comment

http://stackoverflow.com/q/24629005
has comment: http://stackoverflow.com/comment/38180919
has comment: http://stackoverflow.com/comment/38175886
type: Question
has comment: http://stackoverflow.com/comment/38177201
tagged with: javascript
has comment: http://stackoverflow.com/comment/38184493
score: 0
has comment: http://stackoverflow.com/comment/38178826
tagged with: datatables
has comment: http://stackoverflow.com/comment/38173696
has comment: http://stackoverflow.com/comment/38175068
tagged with: jquery
has body: I need help with the "rel" tag in datatables. I have a table whose first column contains an image and its last column contains a button, however if I need to add a new row with data, the jEditable requires me to map each field with a "rel" number, but I don't need a "rel" number for the first and last column, please how do I go about this? A few lines of the html is given below: SiteID SiteRef SupplierID StartDate EndDate Voltage The form that adds new row of data to the table Site ID Site Ref Supplier ID Start Date End Date Voltage The "aoColumns" for the datatable ajaxsource is given below "aoColumns": [ { "class": 'details-control', "orderable": false, "mData": null, "defaultContent": "" }, { "mData": "SiteID" }, { "mData": "SiteRef" }, { "mData": "SupplierID" }, { "mData": "StartDate" }, { "mData": "EndDate" }, { "mData": "Voltage" }, { //"orderable": false, "mData": null, "defaultContent": ' ' } ] Thanks for the answer.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38172695
has comment: http://stackoverflow.com/comment/38176355
has title: Handling Relative position of datatables
answer count: 0

http://stackoverflow.com/comment/38340596
score: 0
has text: "Not working" is not a useful problem description. What is that is not working? What do you expect the code to do and what does it do?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24719273

http://stackoverflow.com/comment/38130820
score: 0
type: Comment
has text: If it's data you should read it using [data](http://api.jquery.com/jquery.data/) not attr.
type: AnswerComment
comment on: http://stackoverflow.com/a/24608671

http://stackoverflow.com/q/24715333
tagged with: cordova
type: UnansweredQuestion
tagged with: android
upvote count: 1
score: 1
has title: Phonegap Build in iphone exec error
has answer: http://stackoverflow.com/a/29431675
type: Question
tagged with: ios
downvote count: 0
tagged with: javascript
has body: I've got a strange one here i'm trying to use PhoneGap-InAppPurchase-iOS to add in app purchasing to my phonegap application. However, on load on the iphone the device always says 'TypeError: 'undefined' is not an object (evaluating 'cordova.exec') and I THINK it's stopping my init running. When I try and do a purchase i'm getting the error ' InAppPurchase[js]: purchase error: product needs to be loaded before purchase, call storekit.load(...) first!' but heres my index.js - you can see from this I am running the storekit.load first. I don't know if the two issues are linked and that's stopping the rest of the JS running? From what I can see, i'm not running cordova.exec? var app = { initialize: function() { this.bindEvents(); console.log("Attempting to init"); document.addEventListener('deviceready', this.onDeviceReady, false); try { FB.init({appId: "sdfsdfsdfsdfsd", nativeInterface: CDV.FB, useCachedDialogs: false}); console.log("FB Ready"); } catch (e) { alert(e); } inappbilling.init(bSuccess, bError, {showLog:true}, "asdass"); }, bindEvents: function() { }, onDeviceReady: function() { app.receivedEvent('deviceready'); window.storekit.init({ debug: true, /* Because we like to see logs on the console */ purchase: function (transactionId, productId) { console.log('purchased: ' + productId); }, restore: function (transactionId, productId) { console.log('restored: ' + productId); }, restoreCompleted: function () { console.log('all restore complete'); }, restoreFailed: function (errCode) { console.log('restore failed: ' + errCode); }, error: function (errno, errtext) { console.log('Failed: ' + errtext); }, ready: function () { var productIds = [ "com.asdad.asdads.asdasd" ]; window.storekit.load(productIds, function(validProducts, invalidProductIds) { $.each(validProducts, function (i, val) { console.log("id: " + val.id + " title: " + val.title + " val: " + val.description + " price: " + val.price); }); if(invalidProductIds.length) { console.log("Invalid Product IDs: "…
answer count: 1
favorite count: 0

http://stackoverflow.com/q/24708366
has title: Dont understand javascript promise antipattern, returning promise from callback
score: 0
has comment: http://stackoverflow.com/comment/38320530
has comment: http://stackoverflow.com/comment/38319530
upvote count: 1
answer count: 1
downvote count: 1
has body: Could someone explain to me why returning promises in promises callbacks is considered antipattern? Apparently it breaks exception bubbling but obviously my understanding of promises is lacking as I cannot clearly picture how would that work. My antipattern code is below: var a = new Promise(function (res, rej) { setTimeout(function () { res("timeout"); }, 1000); }); a.then(function (res) { console.log("a"); console.log(res); return new Promise(function (res, rej) { console.log("b"); setTimeout(function () { res("timeout2"); }, 2000); }).then(function (res) { console.log("c"); console.log(res); }).then(function (res) { console.log("d"); console.log(res); }, function (res) { console.log("e"); console.log(res); }); }).then(function (res) { console.log("l"); console.log(res); }); EDIT: This question is related to one of my previous questions where I do something similar with promises and one of the answers says: "You must also never mix callbacks with promises because then you lose exception bubbling (the point of promises) and make your code super verbose." So now I'm really confused if it is antipattern and if so why.
has answer: http://stackoverflow.com/a/24708654
has comment: http://stackoverflow.com/comment/38319648
type: AnsweredQuestion
tagged with: javascript
linked to: http://stackoverflow.com/q/23772328
favorite count: 0
tagged with: promise
type: Question
has comment: http://stackoverflow.com/comment/38327669
has comment: http://stackoverflow.com/comment/38333747
accepted answer: http://stackoverflow.com/a/24708654
has comment: http://stackoverflow.com/comment/38319796
has comment: http://stackoverflow.com/comment/38331249

http://stackoverflow.com/comment/39261188
comment on: http://stackoverflow.com/a/25207120
type: Comment
type: AnswerComment
has text: That's probably because you aren't using promises properly. Console.log when the promise gets returned to the getData call vs when the actual data is returned, I bet the getData call's promise is returned first.
score: 0

http://stackoverflow.com/comment/38363039
has text: The brute force way would be to find the maximum word length, find all permutations of your sequence of all lengths starting from 2 to maxlength and find which of them exists. Fire it up and go to sleep
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24730388
type: Comment

http://stackoverflow.com/q/24735821
has answer: http://stackoverflow.com/a/24753763
has title: Canvas ScreenShot not working
tagged with: webgl
has comment: http://stackoverflow.com/comment/38373426
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/38373614
tagged with: javascript
has body: Some time ago, I was able to take screenshot from my webGL 3D model using the toDataURL function, but suddenly this stopped working, and now I am not able to get an image from any 3D model. Please see bellow for more insights: ThreeJS examples: http://threejs.org/examples/webgl_animation_cloth.html http://threejs.org/examples/webgl_buffergeometry.html WebGL example: http://madebyevan.com/webgl-water/ basic example: http://stemkoski.github.io/Three.js/HelloWorld.html http://learningwebgl.com/lessons/lesson01/index.html In all previous examples I didn't get the image, I get either a black or transparent image 2D: http://jsfiddle.net/m7sA9/show/ Only the 2D exemple gave back the correct image In all previous examples I use this simple method to get the image. document.getElementsByTagName('canvas')[0].toDataURL(); Any idea of what I am doing wrong? I've tried this on a MacBook Pro: Chrome and FireFox, and on FireFox on Windows 8.1 and I got the same result following is a animation on how I made the tests on Chrome
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38373552
favorite count: 0
has comment: http://stackoverflow.com/comment/38373050
upvote count: 2
accepted answer: http://stackoverflow.com/a/24753763
has comment: http://stackoverflow.com/comment/38372619
score: 2
type: AnsweredQuestion
tagged with: screenshot

http://stackoverflow.com/q/24699049
has answer: http://stackoverflow.com/a/24699641
score: 0
tagged with: html5-canvas
answer count: 1
has title: Structuring events following events?
type: UnansweredQuestion
tagged with: structure
type: Question
tagged with: addeventlistener
tagged with: javascript
has body: I'm attempting to build a canvas drawing app that will zoom into a line drawing (on mousedown) and then draw on that zoomed in square (also using mousedown) I think there is a problem with the structure of my code - not sure how to arrange the functions so that the first part - select a square and zoom - is followed by the second part - drawing app. I've attempted to stick the whole thing in the zoom app so the zoom function is called it then stops the event listener and starts the drawing app, but this hasn't worked. I hope this is clear - can anyone see where I'm going wrong? Thanks Nick Here's the code: function doFirst() { var x=document.getElementById('canvas'); canvas=x.getContext('2d'); pic = new Image (); pic.src = "kingtut.jpg"; pic.addEventListener ("load", function() {canvas.drawImage(pic, 0, 0,1200, 600);},false); var radius = 10; dragging = false; } function square (e) { var xPos = Math.floor(e.clientX/200)*200; var yPos = Math.floor(e.clientY/100)*100; canvas.drawImage(pic, 0, 0,1200, 600); canvas.strokeRect (xPos, yPos, 200, 100); } function zoom (e) { var scale = 6; var xPos = Math.floor(e.clientX/100)*100; var yPos = Math.floor(e.clientY/100)*100; canvas.translate(-xPos*scale, -yPos*scale); canvas.scale(scale,scale); document.addEventListener("mousedown", function(e){e.stopPropagation();zoom}, true); canvas.addEventListener('mousedown', engage); canvas.addEventListener('mousemove', putPoint); canvas.addEventListener('mouseup', disengage); var putPoint=function (e) { if (dragging){ canvas.beginPath(); canvas.arc(e.clientX, e.clientY, radius, 0, Math.PI*2); canvas.fill(); canvas.beginPath(); canvas.moveTo(e.clientX, e.clientY); } } } var engage = function (e) { dragging = true; putPoint(e); } var disengage = function (e) { dragging = false; canvas.beginPath(); } window.addEventListener("mousedown", zoom, false); window.addEventListener("load", doFirst, false); window.addEventListener("mousemove", square, false);

http://stackoverflow.com/comment/38195051
score: 0
comment on: http://stackoverflow.com/a/24641876
type: Comment
has text: Yea, I'm not a fan of ASP.NET at all. There's definitely better frameworks to use these days.
type: AnswerComment

http://stackoverflow.com/q/24657948
has comment: http://stackoverflow.com/comment/38225095
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38225054
has answer: http://stackoverflow.com/a/24658290
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/38226124
has title: How to handle massive data with jQuery and PHP via AJAX?
type: UnansweredQuestion
tagged with: php
tagged with: http://stackoverflow.com/tag/json
has body: i am passing a huge javascript array to php via the $.ajax method of jquery. The Content-Type is JSON and i sent the data as RAW. In PHP i get the data with file_get_contents('php://input'). Everything is working very well, but on huge javascript arrays, for example 2,5MB, php receives only the small vars and the huge vars are stripped out. Before i send the data with jquery i do a JSON.stringify to send the data as JSON. PHP still will strip out all huge vars in this JSON string and if i get the contents of "php://input" only the small vars are left over.... In the php.ini i have raised up the max_post_size and other stuff, but nothing will work... Does anybody know how i can handle this right? thx!
type: Question
answer count: 1

http://stackoverflow.com/a/24686152
has comment: http://stackoverflow.com/comment/38295653
has comment: http://stackoverflow.com/comment/38313856
type: Answer
has comment: http://stackoverflow.com/comment/38319149
has comment: http://stackoverflow.com/comment/38277560
has comment: http://stackoverflow.com/comment/38296879
has comment: http://stackoverflow.com/comment/38578973
accepted answer of: http://stackoverflow.com/q/24685379
has body: It's very hard to diagnose without a running example but that error is caused by RequireJS. It happens when you do require('something') without having loaded it. Loading is asynchronous so you either need to do require['lodash'], function(_) { do stuff }. Or the preferred define syntax: define([ 'lodash' ], function(_) { 'use strict'; _.mixin({ myFunction: function(s) { return 'Hello ' + s; } }); return _; }); With a test you would typically use the same structure and pull in the module you are testing in the define. You would set it up so the path to required files is the same as in the app. To help more we need a running example. My colleague made a good boilerplate using grunt/jasmine/requirejs maybe you can get some good practices from there: https://github.com/mderrick/backbone-boilerplate Your directory structure is quite confusing have you considered simplifying it? - Use a single Gruntfile.js - don't fragment unless your project is very big index.html Gruntfile.js app/ test/ That is all you really need to get going. In app it could look something like: app/app.js &lt;-- entry point app/modules/...
has comment: http://stackoverflow.com/comment/38313421
has comment: http://stackoverflow.com/comment/38277820
has comment: http://stackoverflow.com/comment/38437613
answers question: http://stackoverflow.com/q/24685379
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/24606776
has comment: http://stackoverflow.com/comment/38127437
has body: I have a stop button,when it is clicked it gets hidden but when I fresh the page the button does appear again.Is it possible to hide the button forever even if there is a page refresh here is what I tried newContent += Hesto.Html.CreateTD('&lt;input type="button" value="Stop" id="btnStopEvent"&gt;'); function GetEventId() { $(document).on('click', '#btnStopEvent', function () { var EventId = $(this).parents('tr').attr('id'); var Result = { EventId: EventId }; $(this).hide(); }); }
has comment: http://stackoverflow.com/comment/38127670
type: Question
has answer: http://stackoverflow.com/a/24606991
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/24606874
possible better answer: http://stackoverflow.com/a/24606991
has answer: http://stackoverflow.com/a/24606874
type: AnsweredQuestion
has title: How can I hide a button after it was clicked?

http://stackoverflow.com/a/24677812
answers question: http://stackoverflow.com/q/24677759
has comment: http://stackoverflow.com/comment/38273461
has comment: http://stackoverflow.com/comment/38277587
has comment: http://stackoverflow.com/comment/38262117
type: Answer
has body: var n = "1;999.99;999.99;-999.99"; n = n.slice(n.indexOf(';')+1).replace(/;/g, "\t"); FIDDLE
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/38261363
downvote count: 1
has comment: http://stackoverflow.com/comment/38262536

http://stackoverflow.com/comment/38313525
comment on: http://stackoverflow.com/q/24705380
score: 0
type: Comment
type: QuestionComment
has text: The second one doesn't "work" - it just doesn't throw an error.

http://stackoverflow.com/comment/42859479
type: Comment
has text: This does not really help the website developer. One cannot require all the website visitors to change their privacy settings.
score: 24
type: AnswerComment
comment on: http://stackoverflow.com/a/26169149

http://stackoverflow.com/comment/38301285
score: 0
type: AnswerComment
has text: I have no idea what you mean. jQuery ajax can serialise the form before you post it. But since you have decided not to show any HTML I have a hard time heloping you
type: Comment
comment on: http://stackoverflow.com/a/24697287

http://stackoverflow.com/a/24601718
accepted answer of: http://stackoverflow.com/q/24601661
answers question: http://stackoverflow.com/q/24601661
downvote count: 0
score: 2
upvote count: 2
type: AcceptedAnswer
has body: The output is using \r (Carriage Return) for a line separator. Unix standard is \n (Line Feed), while Windows is \r\n (CR/LF). When you print out \r by itself, it will return the cursor to the start of the line, but not advance to the next line, and any further text will be overwriting what you just printed. Specifically: {\r "error": {\r "code": "request_token_invalid", \r "message": "The access token isn't valid."\r }\r } The first four lines just completely overwrite each other. After the "message" line is printed, the first five characters are overwritten by }; then the first character is overwritten by {. Your response is fine; the printing of it is screwed up. To see the output as it really is, try piping your code into less, which will display \r as ^M, or into hexdump -C, which will show you 0d (instead of the usual 0a for \n). Insert this just before you print: contacts = contacts.replace(/\r/g, "\n"); and it will be fixed.
type: Answer

http://stackoverflow.com/comment/38226655
comment on: http://stackoverflow.com/q/24658838
score: 0
type: Comment
type: QuestionComment
has text: This is what you want: http://stackoverflow.com/questions/1283511/how-to-add-a-class-to-body-tag

http://stackoverflow.com/comment/38277166
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24685751
type: Comment
has text: You need to also respond with the allow credentials header: Access-Control-Allow-Credentials:true

http://stackoverflow.com/comment/38177812
score: 0
comment on: http://stackoverflow.com/q/24612012
type: QuestionComment
type: Comment
has text: @PawełFus I tried a if statement, inside a for loop, inside a while loop. It output all 0s, which means my milliseconds aren't matching up on each day I think. Still working on it. I strongly believe highcharts should support this problem itself ;)

http://stackoverflow.com/comment/38385696
type: AnswerComment
has text: thank you for the response, i will give it a try immediately. i assume without using a table i would div and float?
comment on: http://stackoverflow.com/a/24743159
score: 0
type: Comment

http://stackoverflow.com/comment/116596454
has text: Same as [this answer from several years prior](https://stackoverflow.com/a/31755504/215552)...
type: AnswerComment
comment on: http://stackoverflow.com/a/54250206
type: Comment
score: 2

http://stackoverflow.com/q/24683823
favorite count: 0
accepted answer: http://stackoverflow.com/a/24704774
has title: Is this a good method for template cache busting in angular?
tagged with: templates
has answer: http://stackoverflow.com/a/24704774
has body: I'm trying to implement some cache busting on my angular application in a way that it will still allow caching but break it anytime we push new code to production. My setup so far involves using grunt cache-breaker https://www.npmjs.org/package/grunt-cache-breaker to dig through my concatenated angular app.js file and append query params to any string ending in a .html file extension. I also do this for any template files I have that are using an ng-include. One complication this creates is that now I need to first copy my template files to a dist/ directory so I can safely .gitignore the cache-busted versions and not have to commit all of my templates everytime the cache is busted (and create conflicts). My question is not how to do this but more of a sanity check as to if this is a practical way of avoiding template caching on new code? I have seen examples of disabling template caching in angular but it seems like it is something I would want to use in between code pushes when files are not changing. How do other navigate this issue?
tagged with: angularjs
upvote count: 7
type: AnsweredQuestion
score: 7
linked to: http://stackoverflow.com/q/20284976
tagged with: caching
type: Question
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/24641876
has comment: http://stackoverflow.com/comment/38194596
downvote count: 0
has comment: http://stackoverflow.com/comment/38195051
score: 5
has body: This doesn't make any sense because changes to the DOM aren't pushed back up to the server when the page is posted back. Adding attributes that mean absolutely nothing to a browser (such as runat) won't have any effect. Even if your table is set to runat="server", client-side changes to that table aren't detected by the server. Option #1 (postback every time a new row is added) is perhaps the easiest method, and basically what ASP.NET was designed to do since version 1.0 (before web-apps became popular) For a more dynamic experience, what you'll need to do is store your client-side changes locally, then post them back up to the server via a standard form element, such as a hidden input field. You can add any arbitrary number of hidden fields to a &lt;form&gt; element, and read them on the server using the Request object. Or, you could perhaps serialize the new row data via JSON or XML. If you're simply trying to save new rows in a database, perhaps implement a Save button that sends a single new row to the server via AJAX and immediately saves it.
answers question: http://stackoverflow.com/q/24641804
has comment: http://stackoverflow.com/comment/38196803
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24641804
upvote count: 5
has comment: http://stackoverflow.com/comment/38196943
has comment: http://stackoverflow.com/comment/38194811
type: Answer

http://stackoverflow.com/comment/38092470
score: 0
type: Comment
has text: The `bind` solution is not hacky at all; it just requires modern browsers.
comment on: http://stackoverflow.com/a/24588650
type: AnswerComment

http://stackoverflow.com/a/24733048
accepted answer of: http://stackoverflow.com/q/24694512
answers question: http://stackoverflow.com/q/24694512
has body: sourceURL appended to any JS file loaded via XHR (jquery load script for example). Otherwise it is impossible to set breakpoint. You should not use ".js" file extension for JSON files, please use ".json" instead. Is it possible in your case?
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38367200

http://stackoverflow.com/comment/38379767
type: QuestionComment
has text: I actually had this in a nav tag i was reverting to static html version designer had created that was working, I am also calling foundation.min.js but this is failing to show/hide the menu items
comment on: http://stackoverflow.com/q/24739292
score: 0
type: Comment

http://stackoverflow.com/comment/38132200
type: AnswerComment
score: 0
type: Comment
has text: I'd like to have a disabled select when no radio is selected, then only display several options according to the value of the radio buttons.
comment on: http://stackoverflow.com/a/24609073

http://stackoverflow.com/comment/38106838
has text: Pass a hash map to the function
comment on: http://stackoverflow.com/q/24596027
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38305324
has text: https://github.com/ncb000gt/node-cron
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24701279
score: 1

http://stackoverflow.com/comment/38330706
comment on: http://stackoverflow.com/a/24714193
type: Comment
score: 0
type: AnswerComment
has text: You didn't try to refactor your code with my answer in mind. You are still trying to set image related variables before the image is fully loaded. Set all image related variables INSIDE the .onload callback. Images load asynchronously, meaning the browser will immediately process code after .src and then "callback" the onload code after it has fully loaded the image.

http://stackoverflow.com/q/24650359
has title: JavaScript: using the var keyword inside vs. outside loops
tagged with: loops
upvote count: 1
has comment: http://stackoverflow.com/comment/38210533
type: Question
score: 1
answer count: 2
has answer: http://stackoverflow.com/a/24650455
linked to: http://stackoverflow.com/q/3684923
downvote count: 0
has comment: http://stackoverflow.com/comment/38210604
has body: My colleague and I have been discussing good/bad practices of using the var keyword in loops. This is the my way: for (var i = 0; i &lt; anArray.length; i++) { for (var j = 0; j &lt; anotherArray.length; j++) { var a1 = someValue1; var a2 = someValue2; var a3 = someValue3; var a4 = someValue4; var a5 = someValue5; ...... //Some other process that involve a1-5 } } I used var inside nested for loops. Suppose loop i runs for 2000 times and j for 3000 times. My colleague claim that using var in loops like these is the cause of memory leak thus, is a bad practice. Is it true? He says that "var should be declared outside the loop so that the variables are subject to function scope and get destroyed when the scope end." Is this true? Apart from the above claiming about memory leak, is this a bad practice, if so why? I'm skeptical since what I know (or maybe believe) using var in loop, a1-5 still get destroyed when this function ends.
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/3684923
has comment: http://stackoverflow.com/comment/38210843
has answer: http://stackoverflow.com/a/24650452
tagged with: memory-leaks
tagged with: var
type: UnansweredQuestion

http://stackoverflow.com/comment/38295125
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24695991
has text: Browsers hang and show 'Stop slow running script' dialog if huge processing is done without giving back a response to the browser. Refer my answer to avoid slow running script..

http://stackoverflow.com/a/24657237
score: 8
answers question: http://stackoverflow.com/q/24656912
has body: You can achieve it like this Working Demo In the scope define a method like as shown $scope.notSorted = function(obj){ if (!obj) { return []; } return Object.keys(obj); } and in html like as shown below html {{key}} {{value}} Original Article: ng-repeat with no sort? How?
type: Answer
has comment: http://stackoverflow.com/comment/38241598
upvote count: 8
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24656912
downvote count: 0

http://stackoverflow.com/comment/38120561
type: QuestionComment
has text: I'm not sure where I should use that command?
comment on: http://stackoverflow.com/q/24602874
score: 0
type: Comment

http://stackoverflow.com/q/24700123
has comment: http://stackoverflow.com/comment/38304702
upvote count: 0
linked to: http://stackoverflow.com/q/123559
answer count: 1
linked to: http://stackoverflow.com/q/3256547
has answer: http://stackoverflow.com/a/24700307
has comment: http://stackoverflow.com/comment/38321170
favorite count: 0
has comment: http://stackoverflow.com/comment/38303239
type: UnansweredQuestion
tagged with: regex
has comment: http://stackoverflow.com/comment/38303405
downvote count: 1
type: Question
has body: I need a regex to allow numbers and some special characters like + . - ( ). The Phone number formats my like. 9999 999 999 9999999999 999999 +91 99 99 99 9999 999.999.999 99 (999) 99 99 etc.. Like any format. Is there any one Help me. I have tried Lot number of answers in stack overflow but I can't get better one.
tagged with: javascript
has title: What is the regex pattern to allow numbers and some special characters?
score: -1
has comment: http://stackoverflow.com/comment/38308811

http://stackoverflow.com/q/24589782
has body: I'm trying to get the filtering work with two elements and search. I've only got one element to work.. $('#filters').on( 'click', 'a.filter', function() { buttonFilter = $( this ).attr('data-filter'); $container.isotope({ animationOptions: { duration: 750, easing: 'linear', queue: false } }); return false; }); $('.slidein').each( function( i, slidein ) { var $slidein = $( slidein ); $slidein.on( 'click', 'a.filter', function() { $slidein.find('.active').removeClass('active'); $( this ).addClass('active'); }); }); You can see a test here what I mean. Someone how know to fix it? The search filtering working. http://jsfiddle.net/8xh4F/
has answer: http://stackoverflow.com/a/24590321
answer count: 1
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
score: 0
has title: Isotope + search + filterings with two sections
type: Question

http://stackoverflow.com/comment/38198528
has text: If the first is always wanted, why not just use [`querySelector()`](https://developer.mozilla.org/en-US/docs/Web/API/document.querySelector), which returns only the first match (or `null`).
score: 0
comment on: http://stackoverflow.com/a/24643738
type: Comment
type: AnswerComment

http://stackoverflow.com/a/24595850
score: 0
type: Answer
has body: You could use DOMDocument and get the relevant form elements, thus obtaining their values using node->nodeValue?
has comment: http://stackoverflow.com/comment/38263433
answers question: http://stackoverflow.com/q/24595809
has comment: http://stackoverflow.com/comment/38106523
has comment: http://stackoverflow.com/comment/38254002

http://stackoverflow.com/comment/38389410
comment on: http://stackoverflow.com/q/24744935
has text: tableRow = body of the table and no it is not translated! and i using a for loop before it didn't help and it is unique its the only one of that being used in all docs (JS, HTML, CSS)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38137844
type: AnswerComment
type: Comment
has text: document should be without quotes `$(document)`
comment on: http://stackoverflow.com/a/24611773
score: 0

http://stackoverflow.com/comment/38334991
has text: For that you must have always 2 pages, one for loading client side, as user interface, and another for presenting data. The one you load data, you don't need to make changes, you only need to implement that on the one users are visiting. For example: * I visit '/page' * this page is HTML and it has Javascript and jQuery to load '/page/data' * for now one, every X seconds, data will be fetched from '/page/data' instead of '/page'
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24716451
type: Comment

http://stackoverflow.com/q/24651341
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/24652904
type: UnansweredQuestion
has title: Can not prevent accessing to a specific route using $routeChangeStart
has body: In angular js I have a routing function that should manage access to routes for admin and non admin users so i used to $routeChangeStart achieve that according to my logic if a user is logged in he can not go to that rout '/' (which is log in page ). but that dose not work. it still can go to login if the URL matches http://localhost:3000/#/ app.run(['$rootScope', 'authService', '$location', function($rootScope, authService, $location){ $rootScope.$on('$routeChangeStart', function(evt, next, curr){ if(authService.AccessPrivilegesAuth()){ if(!authService.AccessPrivilegesAdmin(next.access_level)){ $location.path('categories'); } }else if(authService.AccessPrivilegesAuth()== false){ $location.path('/'); } }) }]); her is the log in controller. app.controller('LoginController', ['$scope', '$location', 'authService','$cookieStore', function($scope, $location, authService, $cookieStore){ $scope.loginData = { EmailAddress : "", password : "" }; $scope.error; $scope.error_exist = false; $scope.login = function(){ authService.Login($scope.loginData).success(function(response){ $cookieStore.put('AuthorizationHeader', response.Token); authService.isAuth = true; authService.IsAdmin = response.IsAdmin; var authData = $cookieStore.get('AuthorizationHeader'); console.log(authData); $location.path('categories'); }).error(function(Error){ $scope.error_exist = true; switch(Error.ExceptionMessage){ case "201" : $scope.error = "The emailAddress/password pair don't match an existing member"; break; case "210" : $scope.error = "Value cannot be null missing Email Address and/or password."; break; case "202" : $scope.error = "The email address you are using isn't confirmed. Please see your inbox for further instructions."; break; default : $scope.error = "Error with the server"; } }); }; }]);
type: Question
tagged with: angularjs-scope
tagged with: angularjs-routing
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/24689650
answers question: http://stackoverflow.com/q/24689489
upvote count: 2
has body: You will need to tell the DOM, parent to listen to its child. The issue is that Your new .second-button is a new element, and you have defined your .click function before the DOM actually exists. But all DOM interactions will trigger a event propagations(bubbling), therefore you can tell #container to listen for click events coming from .second-button Or use $(document).on to listen, since the bubbling will go all the way to the document root. If you are a performance minimalist than you would just do #container .on, and stop the propagation from that point, since theres no need to travel to every parent node, but you might eventually need to listen it from the parent of the #container, who knows
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38284416

http://stackoverflow.com/q/24712698
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38327892
score: 1
has body: this is my code: &lt;script&gt; var myVar=setInterval(function(){myTimer()},10000); function myTimer() { document.getElementById("show").innerHTML = "hello"; } &lt;/script&gt; &lt;div id="show"&gt; &lt;canvas id="chart-area2" width="300" height="300"/&gt; &lt;/div&gt; The above displays piechart for 10 seconds and then replaces the piechart with 'hello'. In the place of 'hello' how can i make the piechart display again? Will this code refresh the div every 10 seconds? if not then what are the changes i have to do? the div tag displays the pie chart on the browser.
has answer: http://stackoverflow.com/a/24712964
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38332313
tagged with: javascript
has title: How to refresh only pie chart on the webpage?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38328044
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/24609370
tagged with: placeholder
score: 1
possible better answer: http://stackoverflow.com/a/24609534
accepted answer: http://stackoverflow.com/a/24610118
upvote count: 1
tagged with: forms
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38133024
has body: I am trying to set the placeholder attribute for a form which I do not have access to. I would like to use the name of the field to populate this. Does anyone know of a way to do this using javascript. This is the html for the form field: &lt;input type="text" onchange="checkdep(this);" onblur="validatefield(this);" value="" name="First Name" class="formTextfield" id="First_Name"&gt; I am able to do this using getElementById but would like something which works for all the fields in the form without having to set it individually for each field. http://jsfiddle.net/XF6wT/5/ Thanks
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24610118
favorite count: 0
tagged with: textfield
has title: Set form field placeholder attribute using javascript
has answer: http://stackoverflow.com/a/24609534
type: AnsweredQuestion

http://stackoverflow.com/q/24607538
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38134845
has comment: http://stackoverflow.com/comment/38130533
tagged with: ajax
type: AnsweredQuestion
tagged with: silverstripe
has comment: http://stackoverflow.com/comment/38157101
type: Question
accepted answer: http://stackoverflow.com/a/24625323
tagged with: javascript
has title: Get content of paginated pages via ajax, filter it and append it to current page
linked to: http://stackoverflow.com/q/24570107
has answer: http://stackoverflow.com/a/24625323
has body: I would like to load more functionality on my blog. I now have paginated pages, which is not what I want. I thought it would be easy to get the contents of these paginated pages via ajax, filter it, and append it to a div. I'm not really sure if this is the way to go. This is what I tried: $("a.next").on("click", function(e){ e.preventDefault(); var nextLink = $(this).attr("href"); console.log(nextLink); $.ajax ({ url: "http://localhost:8888/" + nextLink, datatype: 'html', type: "GET", success: function(data) { var response = data; $(".blogItems .holder").append(response); }, error: function(xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); alert(err.Message); } }); }); Can you guys point me in the right direction?

http://stackoverflow.com/q/24731621
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: visual lightbox overlay width isn't coming 100% in samsung mobile
has body: I'm trying to figure out the problem but seems to be fail. I have put visual lightbox to one website which is working perfectly for desktop but for mobile with overlay bg width is not coming 100%. here it is the website link: http://bit.ly/1m9sbnC Please check in your Samsung/Android Mobile and help :) Thanks
tagged with: android
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/24731992
downvote count: 0
type: UnansweredQuestion
type: Question
score: 1
upvote count: 1

http://stackoverflow.com/q/24646732
tagged with: internet-explorer-10
upvote count: 21
has comment: http://stackoverflow.com/comment/38237679
has answer: http://stackoverflow.com/a/41600768
type: Question
has comment: http://stackoverflow.com/comment/38237328
tagged with: internet-explorer
score: 21
has comment: http://stackoverflow.com/comment/38237334
has title: SEC7118: XMLHttpRequest CORS - IE Console message
tagged with: cors
has comment: http://stackoverflow.com/comment/78977481
has answer: http://stackoverflow.com/a/32850937
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38238153
has comment: http://stackoverflow.com/comment/38237745
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26169149
has comment: http://stackoverflow.com/comment/48898141
has comment: http://stackoverflow.com/comment/38237349
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38237652
has answer: http://stackoverflow.com/a/28038082
answer count: 4
has comment: http://stackoverflow.com/comment/38237587
has comment: http://stackoverflow.com/comment/38214002
has body: I am using CORS POST request with everything taken care as given @http://www.html5rocks.com/en/tutorials/cors/ Server sets Response header to: 'Access-Control-Allow-Origin':'*' and I can see this header value in IE developer tool. But on IE10 browser I see console message as "SEC7118: XMLHttpRequest for http:// required Cross Origin Resource Sharing (CORS). When I check on Microsoft site it has below given explanation. http://msdn.microsoft.com/en-us/ie/dn423949(v=vs.94).aspx SEC7118 Description: "XMLHttpRequest for [URL] required Cross Origin Resource Sharing (CORS). " An XMLHttpRequest was made to a domain that was different than your page's domain. This requires the server to return an "Access-Control-Allow-Origin" header in its response headers, but one was not returned. Suggested Fix: The server must support CORS requests and return an appropriate "Access-Control-Allow-Origin" header with the resource. See CORS for XHR in IE10 for more info about CORS in response headers. Questions: I want to know if this console message is an ERROR ?? Will this cause any failures ?? Why do I get this message even after setting response header 'Access-Control-Allow-Origin' value to '*'?? Does 'Access-Control-Allow-Origin' value has to be origin name for IE10 to work? I know * is not a very good option, But does IE requires exact origin name ?? I kept URL's and cookie details hidden from these images.
has comment: http://stackoverflow.com/comment/38237595

http://stackoverflow.com/comment/38305143
type: AnswerComment
has text: `function paraEffect(navbar, fixedwrap, fixedpos, distance) { $(window).scroll(function() { if ($(navbar).offset().top > distance) { $(fixedwrap).addClass(fixedpos); } else { $(fixedwrap).removeClass(fixedpos); } }); }` This is a passive function you can use to modulate your code. I'm sure you could have done it yourself, but if you want to every do more than one at a time (assuming you can), then this should work.
type: Comment
comment on: http://stackoverflow.com/a/24636962
score: 0

http://stackoverflow.com/comment/38355891
comment on: http://stackoverflow.com/q/24727266
score: 0
type: QuestionComment
type: Comment
has text: I don't think you can do that but what you can do is instruct the user to enter your formula/custom function into the cell as described at https://developers.google.com/apps-script/execution_custom_functions?hl=es#using . Similarly, you could have the cell pre-populated with the formula and simply ask the user to edit it and then press enter to run the function.

http://stackoverflow.com/comment/38151237
type: Comment
comment on: http://stackoverflow.com/a/24618755
has text: This will work as long as there's only one `img` using that variable. If there are more, he could put a boolean property directly on the element by passing it in. That way each element maintains its own state.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/58242685
comment on: http://stackoverflow.com/a/24654072
type: AnswerComment
type: Comment
has text: Thanks for answering your own question - this was the really relevant bit for me which made me understand my issue: `But in my code I was [...] which just returns a new promise (which kept the apply cycle going on forever since the return value kept changing)`
score: 1

http://stackoverflow.com/comment/38092402
has text: I think jQuery does `bar.apply(this, arguments)` in `$.fn.on`
comment on: http://stackoverflow.com/a/24588558
type: Comment
type: AnswerComment
score: 1

http://stackoverflow.com/a/24622400
answers question: http://stackoverflow.com/q/24622286
has body: You can use the css function in jquery to do this... $(para).css({ 'color':'yellow', 'font-size':'20px' }); These css properties, get nested within the element in the style attribute.
score: 0
type: Answer

http://stackoverflow.com/comment/41917026
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26633221
type: AnswerComment
has text: Thanks for the answer Xan.. But I think that they are deprecated. I am not too sure what a Content Script is, but the same code worked on older version of chromes so I dint doubt the code. Can you post your code that's working and the chrome version (Mine is 37). I would love to make the rich notifications work again :)

http://stackoverflow.com/q/24678136
has title: Use Bootstrap Button Group to Swap Divs
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
tagged with: woocommerce
has answer: http://stackoverflow.com/a/24678249
has comment: http://stackoverflow.com/comment/38281758
upvote count: 1
type: Question
has body: I'm creating a login / register form for a woocommerce shop. The default woo template shows two side by side forms, one for new customers to register, one for existing customers to login. IMHO this sucks. I want to use a button group above a single form that swaps out the login / register forms based on the users selection, this way only one option is presented at a time. Hence, I need to swap content, and apply/remove active classes to the appropriate buttons. I've done the following: 1.) Added a twitter bootstrap button-group like so: Login Register 2.) Wrapped the two forms in bootstrap classes and added IDs for simple targeting. // login form //register form I know there are built in jQuery plugins for accomplishing this. I've tried using the .active class without success. I also tried using data-toggle="button" and use the .toggle() method without success. I can't wrap my head around the appropriate jQuery, I either end up with both buttons toggled, or no buttons toggled. Could someone guide me in the right direction?
accepted answer: http://stackoverflow.com/a/24681148
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24678558
tagged with: jquery
has answer: http://stackoverflow.com/a/24678558
answer count: 3
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/66663368
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/24681148

button
tags question: http://stackoverflow.com/q/24710761
tags question: http://stackoverflow.com/q/24736232
tags question: http://stackoverflow.com/q/24745605
tags question: http://stackoverflow.com/q/24625254
tags question: http://stackoverflow.com/q/24659094
tags question: http://stackoverflow.com/q/24632120
tags question: http://stackoverflow.com/q/24726266
tags question: http://stackoverflow.com/q/24724177
tags question: http://stackoverflow.com/q/24600465
tags question: http://stackoverflow.com/q/24683865
tags question: http://stackoverflow.com/q/24669913
tags question: http://stackoverflow.com/q/24612621
type: Tag
tags question: http://stackoverflow.com/q/24723463
tags question: http://stackoverflow.com/q/24621877
tags question: http://stackoverflow.com/q/24680408
tags question: http://stackoverflow.com/q/24591034
tags question: http://stackoverflow.com/q/24589510
tags question: http://stackoverflow.com/q/24731337
tags question: http://stackoverflow.com/q/24593205
tags question: http://stackoverflow.com/q/24716240
tag name: button
tags question: http://stackoverflow.com/q/24654015
tags question: http://stackoverflow.com/q/24724427
tags question: http://stackoverflow.com/q/24728433

http://stackoverflow.com/comment/117726098
type: AnswerComment
has text: @siyang what if i have more than one "subitems" (Like "Subitem1", "Subitem2") ? In my case i have "Subject" model and i want to store it's successor's Id and predecessor's Id.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25132601

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/24705388
tag name: knockout-components

http://stackoverflow.com/comment/38319381
has text: Hmm gave it a shot Max - doesn't seem to work http://jsfiddle.net/xa9xS/707/
comment on: http://stackoverflow.com/q/24708257
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24622383
has comment: http://stackoverflow.com/comment/38158621
has answer: http://stackoverflow.com/a/24622580
has answer: http://stackoverflow.com/a/24622619
linked to: http://stackoverflow.com/q/572897
has comment: http://stackoverflow.com/comment/38158560
has title: How can I make a prototype of a prototype in JavaScript?
has comment: http://stackoverflow.com/comment/38158569
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38158350
has comment: http://stackoverflow.com/comment/38158290
has comment: http://stackoverflow.com/comment/38158584
has comment: http://stackoverflow.com/comment/38158403
tagged with: javascript
has comment: http://stackoverflow.com/comment/38158561
tagged with: prototype
has comment: http://stackoverflow.com/comment/38158594
answer count: 3
has comment: http://stackoverflow.com/comment/38158592
has comment: http://stackoverflow.com/comment/38158337
downvote count: 0
has answer: http://stackoverflow.com/a/24623586
has body: I'm trying to create a prototype of a prototype in Javascript. Instead of the following functionality, utilizing normal prototypes, built from scratch, I'd like my prototypes to inherit certain methods without me adding them to each one. So instead of this code, where I've added a method logDependencies() within the prototype to check if there are any instances of Dependency within the Car instance: function Dependency(data) { this.data = data; } function Car(color) { this.color = new Dependency(color); this.logDependencies = function () { for (var key in this) if (this.hasOwnProperty(key)) if (this[key] instanceof Dependency) console.log("Dependency: " + key); }; } var lamborghini = new Car("red"); lamborghini.logDependencies(); I'd like to instead have all of my prototypes inherit the function logDependencies(), without me manually adding it. How can I do this? Update: For those of you confused by my wording: I'm trying to make a prototyping function that allows me to create prototypes who inherit certain properties and methods, passing them down the inheritance chain. A related article by Douglas Crockford (emphasis my own): My journey was circuitous because JavaScript itself is conflicted about its prototypal nature. In a prototypal system, objects inherit from objects. JavaScript, however, lacks an operator that performs that operation. Instead it has a new operator, such that new f() produces a new object that inherits from f.prototype. This indirection was intended to make the language seem more familiar to classically trained programmers, but failed to do that, as we can see from the very low opinion Java programmers have of JavaScript. JavaScript's constructor pattern did not appeal to the classical crowd. It also obscured JavaScript's true prototypal nature. As a result, there are very few programmers who know how to use the language effectively. Fortunately, it is easy to create an operator that implements true prototypal inheritance. It is a standard fea…
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38158307

http://stackoverflow.com/comment/38301167
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24698725
has text: Please post all relevant code in your original post. It's going to be really hard to help you unless we can see how you're handling some things.

http://stackoverflow.com/comment/78923261
has text: `$("*").focus()`, I guess?
type: Comment
comment on: http://stackoverflow.com/a/24644405
score: 0
type: AnswerComment

http://stackoverflow.com/q/24684580
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38274521
linked to: http://stackoverflow.com/q/596351
has title: How can I send radio button value in PHP using javascript?
has comment: http://stackoverflow.com/comment/38280595
tagged with: php
has answer: http://stackoverflow.com/a/24684641
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24684831
has comment: http://stackoverflow.com/comment/38274649
accepted answer: http://stackoverflow.com/a/24684722
has body: I've been at this for week and read all the stackoverflow and google and I can not fix this problem. Every time I test it I get the first radio button no matter which one I click. What i get in the email is: Name: test Email: test@live.com phone: 9545027557 type: Residential HTML: &lt;form name="controls" id="controls" novalidate&gt; &lt;div class="control-group"&gt; &lt;div class="controls"&gt; &lt;input type="text" class="form-control" placeholder="Full Name" id="name" required data-validation-required-message="Please enter your name" /&gt; &lt;p class="help-block"&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group"&gt; &lt;div class="controls"&gt; &lt;input type="email" class="form-control" placeholder="Email" id="email" required data-validation-required-message="Please enter your email" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group"&gt; &lt;div class="controls"&gt; &lt;div class="btn-group" data-toggle="buttons" id="optionu" style="padding-left:25px"&gt; &lt;label class="btn btn-primary active"&gt; &lt;input type="radio" class="form-control" id="optionu" name="optionu" value="Residential" checked &gt; Residential &lt;/label&gt; &lt;label class="btn btn-primary "&gt; &lt;input type="radio" class="form-control" id="optionu" name="optionu" value="Commercial" &gt; Commercial &lt;/label&gt; &lt;label class="btn btn-primary "&gt; &lt;input type="radio" class="form-control" id="optionu" name="optionu" value="Handyman" &gt; Handyman &lt;/label&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;div id="success"&gt; &lt;/div&gt; &lt;!-- For success/fail messages --&gt; &lt;button type="submit" class="btn btn-danger pull-right"&gt;Request&lt;/button&gt;&lt;br /&gt; &lt;/form&gt; contact_me.js: var name = $("input#name").val(); var email = $("input#email").val(); var phone = $("input#phone").val(); var optionu = $("input#optionu").val(); var firstName = name; // For Success/Failure Message // Check for white space in name for…
type: Question
upvote count: 27
duplicate of: http://stackoverflow.com/q/596351
tagged with: javascript
tagged with: jquery
score: 27
possible better answer: http://stackoverflow.com/a/24684641
has answer: http://stackoverflow.com/a/24684722

function-parameter
type: Tag
tag name: function-parameter
tags question: http://stackoverflow.com/q/24596027

http://stackoverflow.com/q/24627656
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I'm trying to disable links to gallery images while the content is scrolling. This is how the code look like: HTML: JS: Unfortunaltely the code doesn't change a thing. Any idea what should be changed?
type: Question
tagged with: iscroll
has title: Disable links on iScroll

http://stackoverflow.com/comment/38140732
type: AnswerComment
comment on: http://stackoverflow.com/a/24612733
type: Comment
score: 0
has text: I can't open a new subject can you help me with : why my jquery Object didn't get checked with `$('.checkall').checked = true ;` Here's a [Fiddle](http://jsfiddle.net/23Bt2/4/)

http://stackoverflow.com/comment/38340310
has text: thanks so much! I have always taken Java's strong type nature for granted. It has made me soft and blind to the simplest of mistakes in JavaScript... All I forgot was semi-colon...
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24719038

http://stackoverflow.com/comment/38501219
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24741735
has text: Now I agree with you :). In the current project we don't even use HTML(only JS) but let DOJO do the markup..

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/24709315
tags question: http://stackoverflow.com/q/24743741
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/24658373
tags question: http://stackoverflow.com/q/24646997

http://stackoverflow.com/q/24748667
has title: Reposition a sprite relative to its parents position
downvote count: 0
score: 1
favorite count: 0
tagged with: position
type: Question
accepted answer: http://stackoverflow.com/a/24748964
upvote count: 1
tagged with: sprite
answer count: 1
has body: This is an HTML5/JavaScript game development related question. I need to rotate a parent sprite and keep its child sprite's position and rotation correctly aligned. So if the parent rotates, the child should maintain the correct position and rotation. Does anyone know what the formula for this is?
tagged with: rotation
tagged with: javascript
has answer: http://stackoverflow.com/a/24748964
type: AnsweredQuestion

http://stackoverflow.com/q/24589391
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38099753
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I have the following set of divs: So we have a left and right column, with the left column containing two divs and the right column containing one. JSFiddle doesn't seem to have Bootstrap as an option so I had to make do. What I want to achieve, when in mobile view, is this: You can see the div that was at the top left, div A, is now at the bottom. I know I need to use offsets for this, but my tinkering has produced no results.
has title: Moving divs in mobile view with Bootstrap offsets
has comment: http://stackoverflow.com/comment/38094146

http://stackoverflow.com/comment/38108017
has text: if there is nothing sensitive in it, there should be no reason to have to use the extra overhead of server framework to deliver simple html templates
comment on: http://stackoverflow.com/q/24596657
type: QuestionComment
score: 0
type: Comment

http://stackoverflow.com/a/24723776
answers question: http://stackoverflow.com/q/24723736
has body: Can be done with css only (without custom events) have a look at a very nice answer here: Show hide divs on click in HTML and CSS without jQuery
has comment: http://stackoverflow.com/comment/38349051
type: Answer
score: 0

http://stackoverflow.com/comment/38346587
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24722530
has text: First of all: you cannot use the same id several times. This will be invalid code. You `class` instead of `id`.
score: 0

http://stackoverflow.com/comment/38725085
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24665920
has text: @JeremyFaller, I've provided a generic answer, but I have also got it working with unique charts for each tooltip aswell - yes it is possible.
score: 0

http://stackoverflow.com/comment/38156196
comment on: http://stackoverflow.com/q/24621232
score: 0
type: QuestionComment
type: Comment
has text: what version of typeface.js you are using?

http://stackoverflow.com/comment/38386641
type: QuestionComment
comment on: http://stackoverflow.com/q/24743537
has text: Works for me http://jsfiddle.net/j08691/N5H9c/
score: 0
type: Comment

http://stackoverflow.com/comment/38224988
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24657768
has text: like this: ``$(document).ready(function(){ $(".clickable").click(function() { var href = $(this).data("href"); window.location = href; }); });``

http://stackoverflow.com/comment/38328127
type: Comment
score: 1
comment on: http://stackoverflow.com/q/24712887
type: QuestionComment
has text: Doesn't the CSS Media query widths include 768/1024 also? I think it does.

http://stackoverflow.com/comment/38371015
comment on: http://stackoverflow.com/q/24735159
type: QuestionComment
score: 0
has text: Why isn't JSON a good idea? JSON can cope quite easily with 200 objects. If you, for some reason, have a concern about the size of JSON then you can make AJAX requests for sub-folders on the necessary 'opening' (?) events of the parent folders. But that also has it's implications. I recommend you stick to the documentation in this case.
type: Comment

http://stackoverflow.com/q/24738946
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/38378083
score: 1
tagged with: google-chrome
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38378583
has comment: http://stackoverflow.com/comment/38378848
tagged with: viewport
upvote count: 1
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/38379159
has body: I am working on a Chrome extension and I am running into the following issue. I would like to resize a tab to a specific width and height, but want to override the automatic resizing of elements. So I figured I should either somehow override the onresize event or instruct chrome to render the page while manipulating the (perceieved) viewport. For some reason I cannot find anything to perform the former and on the latter, I have found a lot of information on the meta viewport tag but for some reason cannot make it work. See also: Dynamic viewport and Can I change the viewport meta tag in mobile safari on the fly? To give an example how do I render this page as if it was in a window(/tab) of e.g. 600 pixels wide even though the actual tab is 1200 or whatever amount of pixels wide (and being resized, either programmatically or manually)? Example: Viewport testing Current Viewport: pixels The 600 is completely ignored and the div resizes while resizing the tab/window. Am I overlooking something in the Chrome API? The goal of this particular function of the extension is to be able to select an element (e.g. a div) or region (with crosshairs) of a webpage and resize the tab to show just that. I have everything working fine (selection etc, resizing and scrolling , detecting the element size etc etc) but obviously all responsive elements would be changed upon a window resize. I want to prevent that from happening. Thanks
has title: How to have Chrome render a page emulating a viewport
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38378960
has comment: http://stackoverflow.com/comment/38378561
has comment: http://stackoverflow.com/comment/38378183

http://stackoverflow.com/a/24641019
has body: First of all, my solution will not include the inline styles, font tags, or underline tags. I would recommend that you put all this in a class. Instead of inserting pure html, you should create an object, bind the click event, then append it to the cell. var p = $(" Check Pictures "); p.click(function(){requestPictures(url, userName, reportTime);}); $(cell).append(p); This is how I would do it. As I said you'll have to create the class Here is a fiddle that demonstrates what I'm doing I've added a style as well. .picture-link{ text-decoration: underline; color: blue; cursor: pointer; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24640740

http://stackoverflow.com/a/24593591
answers question: http://stackoverflow.com/q/24593118
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24593118
has body: Unfortunately, there aren't many scientific papers about V8's implementation. The only proper one is a recent paper on ISMM about allocation folding. I wish there were more, but the reality is that the V8 team doesn't get paid to write papers, even if we'd like to. There also have been a couple of recent V8-related papers from other sources. Unfortunately, they have to rely on second-guessing V8's sources and underlying design decisions, and I would recommend taking the conclusions and results reached in such papers with several grains of salt.
type: Answer
score: 4

http://stackoverflow.com/comment/38186806
score: 0
type: Comment
type: QuestionComment
has text: You say to collect all `domListeners`. I think I tried that by naming the only listener for 'domready' and then including the commented out line `google.maps.event.removeListener(domListener);`, but when I did that, the first delete did not even work -- submit, that is. Do you mean something else?
comment on: http://stackoverflow.com/q/24637362

http://stackoverflow.com/a/24614099
has comment: http://stackoverflow.com/comment/38142796
answers question: http://stackoverflow.com/q/24613947
score: 0
has body: The first code works for me. As for the second question, you'll want to attach an onclick handler for each radio button: document.getElementById('radio1').onchange = function() { // do your stuff here } //etc... and checkbox: document.getElementById('check1').onchange = function() { // do your stuff here } //etc...
type: Answer

http://stackoverflow.com/a/24620013
has body: Thanks to everyone I came up with a solution... I made 2 more global variables and made callbacks like this: var lock1=0; var text=""; function ButtonClick(id){ ... $(".page1").slideUp(function(){ if(lock1==1){ lock1=0; $(".page1").empty(); $(".page1").append(text); $(".page1").slideDown(); } else{ lock1=2; } }); ... } function success(arr){ text=arr['text']; if(lock1==2){ lock1=0; $(".page1").empty(); $(".page1").append(text); $(".page1").slideDown(); } else{ lock1=1; } }
answers question: http://stackoverflow.com/q/24599534
accepted answer of: http://stackoverflow.com/q/24599534
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/24618773
score: 0
type: Answer
has body: You will need to use a media query to remove the hover when on mobile devices. The reason for this is that on the iPhone (possibly other phones as well), when you click on an element that has hover, that first click will only fire the hover action. The second will give focus to the element. In your case, if you want to keep the hover for desktop visitors, you would want to use a media query to limit the hover to desktops (and not mobile devices).
accepted answer of: http://stackoverflow.com/q/24618124
answers question: http://stackoverflow.com/q/24618124
type: AcceptedAnswer

http://stackoverflow.com/comment/38374535
has text: Sorry, my fault. I should have mentioned it. I have created the tr+i element in html code.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24737064

http://stackoverflow.com/a/24640657
downvote count: 0
has body: No. It definitely is not the same. Imagine if p_options.data_type was false, 0, "", or any other "falsey" value. This is very different from undefined. p_options.data_type = false; console.log(typeof p_options.data_type !== "undefined"); // true console.log(p_options.data_type); // false
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24640635
type: Answer
accepted answer of: http://stackoverflow.com/q/24640635
upvote count: 4

http://stackoverflow.com/q/24729303
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38360763
has answer: http://stackoverflow.com/a/24730222
accepted answer: http://stackoverflow.com/a/24730222
has title: EmberJS - Accessing multiple models in a single route
tagged with: ember.js
has comment: http://stackoverflow.com/comment/38360962
linked to: http://stackoverflow.com/q/20521967
score: 1
has comment: http://stackoverflow.com/comment/38360866
upvote count: 1
has comment: http://stackoverflow.com/comment/38360779
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38360497
linked to: http://stackoverflow.com/q/18705686
has body: I have 2 different modules listings and contacts. Each has their own route and controller. Now there is a new requirement where partial information from contacts must be visible in the listings page. I'm having a hard time figuring out how to access the contacts model inside the listings route. I went through the Ember docs and I came across 2 ways to access a different controller inside a route. One being the needs hash inside the controller and the other is the setupController hash inside the route. I tried both but failed. I'm most likely doing something wrong. I created a JSFiddle below. Would really appreciate if anyone can point me in the right direction. http://jsfiddle.net/NAFq5/3/ PS: I'm not using Ember Data

http://stackoverflow.com/comment/38341876
comment on: http://stackoverflow.com/q/24719911
has text: Yeah, don't worry, it happens :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38370409
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24734808
has text: I already have a table called bookings that takes in all the information of the booking form. does this mean that i am going to have to ammend this table: I have added my bookings table to the question. Thanks
type: AnswerComment

http://stackoverflow.com/comment/38169928
type: QuestionComment
comment on: http://stackoverflow.com/q/24628642
score: 0
has text: @wickywills at your provided link uses get which is stored in variable so it's cloning but can't see in your code that would clone.
type: Comment

http://stackoverflow.com/q/24627008
tagged with: sorting
has comment: http://stackoverflow.com/comment/38169505
score: 0
has comment: http://stackoverflow.com/comment/38169574
has title: Rearrange an array so that when written in a space where elements wraps below, it preserves a snake-like order
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
tagged with: algorithm
has comment: http://stackoverflow.com/comment/38167845
has comment: http://stackoverflow.com/comment/38170874
has comment: http://stackoverflow.com/comment/38170020
type: Question
has body: I have an array 1 2 3 4 5 6 When it's written in a confined space where elements are forced to wrap, it get's divided into two columns 1 2 → ↙ 3 4 → ↙ 5 6 → But I want to rearrange the array like this 1 2 → ↓ 6 3 ↓ 5 4 ↑ ← And so, get that order as if read like a normal array 1 2 6 3 5 4 How I know that the array is wraped is by position offsets of each element, like 1 &amp; 2 have same top-offset, and 3 &amp; 4 have some ~10+ more top-offset from 1 &amp; 2. The array is an angular $scope object and the elements are created from it inside an ng-repeat directive So I get the offsets by $element.getBoundingClientRect().bottom. If I could get that order (126354) I would be able to sort the angular array in that order which would make my elements in ng-repeat display in a snake-like manner. Is there a way to get the (126354) order somehow, based on the offsets of the elements and rearrange the original array in that order? PS: The number of columns and length of array is arbitrary. In this example there are two columns (3x2), but if it were a 5 length array in 2x3 it would be like this 1 2 3 5 4 1 2 3 5 4
has comment: http://stackoverflow.com/comment/38166780
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/a/24736539
has comment: http://stackoverflow.com/comment/38396029
score: 0
has comment: http://stackoverflow.com/comment/38373695
has body: Remove box-sizing: border-box; remove this CSS *, *::before, *::after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } Check this. or else you can overwrite box-sizing. CSS .row { width: 100%; margin: 0 auto; max-width: 75rem; box-sizing: content-box; /*Add this css*/ } .col { position: relative; padding: 0; float: left; box-sizing: content-box; /*Add this css*/ } check this
type: Answer
has comment: http://stackoverflow.com/comment/38424358
has comment: http://stackoverflow.com/comment/38375311
has comment: http://stackoverflow.com/comment/38373758
answers question: http://stackoverflow.com/q/24735500

http://stackoverflow.com/comment/38177799
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24624738
has text: Confirmed! Got to work and added some developers to the app... and voila! Thanks again!

http://stackoverflow.com/q/24680247
possible better answer: http://stackoverflow.com/a/24680921
has comment: http://stackoverflow.com/comment/118777404
downvote count: 2
has body: Below is the desired result, which I'm looking for What I would like to know is: I have created the circle using center point lat lang and radius around it. Now I want to know, how to check (calculate) if a latitude and longitude is either inside or outside the area I would appreciate if you can give me code example in Javascript. I'm using Google Maps API V3. I found this function but not working as expected for me: function arePointsNear(checkPoint, centerPoint) { var sw = new google.maps.LatLng(centerPoint.lat() - 0.005, centerPoint.lng() - 0.005); var ne = new google.maps.LatLng(centerPoint.lat() + 0.005, centerPoint.lng() + 0.005); var bounds = new google.maps.LatLngBounds(sw, ne); if (bounds.contains (checkPoint)){ return true; } return false; } Any help will be great.. thanks in advance!!
type: Question
type: AnsweredQuestion
has title: Check if a latitude and longitude is within a circle google maps
score: 28
has answer: http://stackoverflow.com/a/24680708
tagged with: javascript
tagged with: google-maps-api-3
answer count: 2
tagged with: google-maps
favorite count: 0
has answer: http://stackoverflow.com/a/24680921
upvote count: 30
accepted answer: http://stackoverflow.com/a/24680708

http://stackoverflow.com/comment/38229831
comment on: http://stackoverflow.com/a/24659776
score: 0
type: AnswerComment
type: Comment
has text: Another reason I am a bit hesitant is because I want to keep as much of my code in external files as possible, so I can minify them. There is actually some proprietary stuff in there and I would prefer not to expose it outright. Though if I just put functions in an external file that don't 'belong' to anything, isn't that just the same as putting them as global functions/objects?

http://stackoverflow.com/q/24604227
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38122989
tagged with: css
has body: hope you are all doing well. So I have gallery that is not using any plugin $(document).ready(function() { var index =1; var images = ['1.jpg','2.jpg','3.jpg']; var caption_text = ["title1","title2","title3"]; function rotateImage() { $('#gallery').fadeOut('fast', function() { $(this).attr('src','<?php echo base_url()."assets/highlight/";?>'+ images[index]); $('span').text(caption_text[index]); $(this).fadeIn('fast', function() { if (index == images.length-1) { index = 0; } else { index++; } }); }); } setInterval (rotateImage, 2500); $('.thumb').on('click', function() { var img = $(' ', {src : this.src, 'class': 'highlight_img' }); var imageTitle = $(this).attr("title"); $('.highlight').html(img).show(); $('.highlight').append(" "+imageTitle+""); setInterval (rotateImage, 5000); }); }); and this is my html <img id='gallery' src='<?php echo site_url('assets/highlight/1.jpg');?>' height='300' class='highlight_img'/> title1 <img class='thumb' src='<?php echo site_url('assets/highlight/1.jpg');?>' height='75' title='title1'/> <img class='thumb' src='<?php echo site_url('assets/highlight/2.jpg');?>' height='75' title='title2'/> <img class='thumb' src='<?php echo site_url('assets/highlight/3.jpg');?>' height='75' title='title3'/> Now, I can do the image rotation when the page load with no problem. Also, when i click the image thumbnail, the #gallery div will also change image based on the thumbnail I click But, when I invoke the thumbnail on click function, the rotateImage() does not work anymore, I need to refresh the page to get the image rotating again. How should I code to perform this? Thank you! EDIT: Sorry for not being clear My question is, I have put "setInterval (rotateImage, 5000);" inside .thumb on click() function, I know it's running because I tried to console.log, and the script does execute, BUT why the image isn't changing?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24604502
accepted answer: http://stackoverflow.com/a/24604502
linked to: http://stackoverflow.com/q/18957186
type: Question
has title: jquery fade out and on click function
answer count: 1

http://stackoverflow.com/q/24611852
downvote count: 0
has body: I have boosted a post on my fan page page. When I click on the likes, it shows, "Invite People Who Like This Post to Like Your Page" . I am writing a IMACROS Script so I can easily invite users to my fanpage automatically without clicking on invite button every single time. I have done something like this but it is not working. I need somebody to fix it: **VERSION BUILD=8601111 RECORDER=FX TAB T=1 TAB CLOSEALLOTHERS URL GOTO=https://www.facebook.com/browse/likes?id=488030621342505&amp;actorid=479841822161385 TAG POS=1 TYPE=BUTTON ATTR=TXT:Invite TAG POS=2 TYPE=BUTTON ATTR=TXT:Invite TAG POS=3 TYPE=BUTTON ATTR=TXT:Invite TAG POS=4 TYPE=BUTTON ATTR=TXT:Invite TAG POS=5 TYPE=BUTTON ATTR=TXT:Invite TAG POS=6 TYPE=BUTTON ATTR=TXT:Invite TAG POS=7 TYPE=BUTTON ATTR=TXT:Invite TAG POS=8 TYPE=BUTTON ATTR=TXT:Invite TAG POS=9 TYPE=BUTTON ATTR=TXT:Invite TAG POS=10 TYPE=BUTTON ATTR=TXT:Invite TAG POS=11 TYPE=BUTTON ATTR=TXT:Invite TAG POS=12 TYPE=BUTTON ATTR=TXT:Invite TAG POS=13 TYPE=BUTTON ATTR=TXT:Invite TAG POS=14 TYPE=BUTTON ATTR=TXT:Invite TAG POS=15 TYPE=BUTTON ATTR=TXT:Invite TAG POS=16 TYPE=BUTTON ATTR=TXT:Invite TAG POS=17 TYPE=BUTTON ATTR=TXT:Invite TAG POS=18 TYPE=BUTTON ATTR=TXT:Invite TAG POS=19 TYPE=BUTTON ATTR=TXT:Invite TAG POS=20 TYPE=BUTTON ATTR=TXT:Invite TAG POS=21 TYPE=BUTTON ATTR=TXT:Invite TAG POS=22 TYPE=BUTTON ATTR=TXT:Invite** Please help.
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
type: Question
tagged with: facebook
upvote count: 2
answer count: 1
tagged with: imacros
has answer: http://stackoverflow.com/a/24615551
score: 2
has title: imacros for facebook is not working

http://stackoverflow.com/q/24725758
has body: I am new to learning node.js and I downloaded all the components on ubuntu. I have written a test, helloworld app, but it does not work for some reason. Here's my file layout. When I execute which nodejs, the terminal returns /usr/bin/nodejs When I execute which npm, the terminal returns /usr/bin/npm My app.js test file is located in /home/tarang/node/helloWorld Here's the source for the app.js //creating http server var http = require('require'); http.createServer(function(req, res){ res.writeHead(200, {'Context-Type': 'text/plain'}); res.end('helloWorld'); }).listen(8000); console.log('server running'); UPDATE When i execute nodejs app.js, i obtain the following error Error: Cannot find module 'require' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.&lt;anonymous&gt; (/home/tarang/node/helloWorld/app.js:4: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 Function.Module.runMain (module.js:497:10) Please do explain since I am new to ubuntu and nodejs. Thanks! UPDATE Do i need to update to the lastest verions of express, node and npm?
has answer: http://stackoverflow.com/a/24725795
tagged with: node.js
possible better answer: http://stackoverflow.com/a/24725795
upvote count: 2
accepted answer: http://stackoverflow.com/a/24725893
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38352967
has answer: http://stackoverflow.com/a/24725837
type: Question
answer count: 3
has title: nodejs helloworld test app not running
downvote count: 0
tagged with: javascript
tagged with: ubuntu
favorite count: 0
has answer: http://stackoverflow.com/a/24725893

http://stackoverflow.com/comment/38389313
type: QuestionComment
score: 1
has text: http://jqueryvalidation.org/validate/#success
comment on: http://stackoverflow.com/q/24745017
type: Comment

http://stackoverflow.com/comment/38295518
score: 0
type: Comment
has text: Thanks Frank, I have edited my question. Yes, I struggle to use the correct terminology in my questions. I was very much 'teach myself now, learn the semantics later', but it's biting me in the butt now.
type: AnswerComment
comment on: http://stackoverflow.com/a/24695789

http://stackoverflow.com/q/24723300
favorite count: 0
has title: Closure Compiler does not always inline enums. Why?
has answer: http://stackoverflow.com/a/25534449
has answer: http://stackoverflow.com/a/24835465
type: UnansweredQuestion
has body: What are the rules that Google's Closure Compiler follows for deciding if an enum is going to be inline or not? When I run my code through the Closure Compiler the JSDoc annotation enum type is not inlined. Yet when I create a simplified example, the enum types are inlined, as this nonsense example will demonstrate: var my_name_space = (function () { 'use strict'; /** @enum {number} */ var TASK_STATUS = { REJECT: -1, UNKNOWN: 0, APPROVE: 1 }; function init_(a) { if (a === TASK_STATUS.UNKNOWN) { alert("Reject"); a = TASK_STATUS.REJECT; } else if (a === TASK_STATUS.APPROVE) { alert("Unknown"); a = TASK_STATUS.UNKNOWN; } else { alert("Approve"); a = TASK_STATUS.APPROVE; } return a; } return { init: init_}; }()); // my_name_space my_name_space.init(-1); Closure's output: var my_name_space=function(){return{init:function(a){0===a?(alert("Reject"),a=-1):1===a?(alert("Unknown"),a=0):(alert("Approve"),a=1);return a}}}();my_name_space.init(-1); In fact, in lining will occur with or without the JSDoc header. Please explain under what conditions in lining would not occur, or even better, please make modification(s) to the above that would demonstrate when lining would not happen. I'm using 'Simple' optimization level.
tagged with: enums
upvote count: 5
type: Question
answer count: 2
score: 5
tagged with: google-closure-compiler
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/24606061
accepted answer of: http://stackoverflow.com/q/24606002
type: AcceptedAnswer
downvote count: 0
has body: You can use $.when() to execute code when a set of AJAX requests have completed. You will need to amend your code to use $.ajax though, as load does not return a deferred object. Try this: var request1 = $.ajax({ url: 'http://www.foo.com/1', success: function(response) { $('#div1').html(response); } }) var request2 = $.ajax({ url: 'http://www.foo.com/2', success: function(response) { $('#div2').html(response); } }) $.when(request1, request2).done(function() { alert('success!'); }); The advantage of this pattern is that all* the requests will execute simultaneously, leading to a faster overall loading time. *The browser may queue requests if you are making a lot of them. Obviously you need to DRY up the creation of the requests, this is just a quick and dirty example.
has comment: http://stackoverflow.com/comment/38126584
type: Answer
has comment: http://stackoverflow.com/comment/38126623
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38126552
answers question: http://stackoverflow.com/q/24606002

http://stackoverflow.com/comment/38364064
comment on: http://stackoverflow.com/q/24730210
has text: This error occurs, when you try to register a widget ( in this case the BorderContainer ) twice, while it's in first instance still, how should i say, alive. Have you checked if your widget isn't build double?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/38354670
type: AnswerComment
comment on: http://stackoverflow.com/a/24726544
has text: I would do the whole thing in jQuery if I were you.
type: Comment
score: 0

http://stackoverflow.com/a/24739868
score: 0
has body: The simplest approach is to split this out into its own js function function confirmDelete() { return confirm('&lt;%=MULTILANGG("Areyousureyouwanttodeletethis")%>') } then OnClientClick="confirmDelete()"
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24739794
downvote count: 1
has comment: http://stackoverflow.com/comment/38385395
has comment: http://stackoverflow.com/comment/38379854

http://stackoverflow.com/a/24590764
has body: From the documentation: Loading from node_modules Folders If the module identifier passed to require() is not a native module, and does not begin with '/', '../', or './', then node starts at the parent directory of the current module, and adds /node_modules, and attempts to load the module from that location. If it is not found there, then it moves to the parent directory, and so on, until the root of the tree is reached. For example, if the file at '/home/ry/projects/foo.js' called require('bar.js'), then node would look in the following locations, in this order: /home/ry/projects/node_modules/bar.js /home/ry/node_modules/bar.js /home/node_modules/bar.js /node_modules/bar.js This allows programs to localize their dependencies, so that they do not clash. I.e. it would look in /path/to/dir2/node_modules, /path/to/node_modules, etc, but not in /path/to/dir1/node_modules.
downvote count: 0
has comment: http://stackoverflow.com/comment/38097243
answers question: http://stackoverflow.com/q/24590734
type: Answer
upvote count: 16
score: 16

http://stackoverflow.com/comment/38098759
score: 0
has text: It's true if you separate the above into JS files, assuming `myApp` is declared first, it will work ok...
type: AnswerComment
comment on: http://stackoverflow.com/a/24591542
type: Comment

http://stackoverflow.com/comment/38311226
comment on: http://stackoverflow.com/q/24695012
score: 1
has text: Source maps are the only way to accomplish what you want to do; and as you've discovered, not all browsers support them. You could always use RequireJS and its syntax which would allow you to avoid the build step required by Browserify (and therefore provide every browser with truly separate JS files for debugging).
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24638369
downvote count: 0
tagged with: erb
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24680086
has answer: http://stackoverflow.com/a/24638522
has title: Rails: Running a function from `application.js` inside a `.js.erb` file
linked to: http://stackoverflow.com/q/6960448
has answer: http://stackoverflow.com/a/24679061
upvote count: 2
has comment: http://stackoverflow.com/comment/38189049
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2613310
tagged with: ruby-on-rails
score: 2
has body: How does one run a function from application.js inside a .js.erb file? I'd rather not have to duplicate said function. app/assets/javascripts/application.js $(document).on('pagecontainershow', function() { var someFunction = function() { function someOtherFunction() { console.log('Hello world') } }(); }); app/views/articles/create.js.erb &lt;% unless @article.errors.any? %&gt; someFunction.someOtherFunction(); &lt;% end %&gt;
type: Question
answer count: 3

http://stackoverflow.com/comment/38374591
type: QuestionComment
comment on: http://stackoverflow.com/q/24737123
score: 3
type: Comment
has text: @Justcode [new MyObject(); vs new MyObject;](http://stackoverflow.com/questions/3034941/new-myobject-vs-new-myobject)

http://stackoverflow.com/q/24614301
tagged with: php
has answer: http://stackoverflow.com/a/24614829
has body: I am running tinyMCE on my site and I'm trying to insert script tags. I am trying to insert my script tags into the body of the source of the tinyMCE instance. However, when I do I get problems. When I submit the form including the tinyMCE element It strips the tags. I have tried the following lines below with still no success. allow_script_urls: true valid_elements : '*[*]' extended_valid_elements: 'script[language|type]' One thing I have noticed though that if I have to post the script code to the section of the source code of the tinymce instance and it works. However, I need to be able to add it to the &lt;body&gt; of the tinymce instance so I can see previews etc of it. Below is the script tag I'm trying to upload. &lt;script type="text/javascript" src="http://resources.32red.com/ad.aspx?pid=237638&amp;bid=3344"&gt;&lt;/script&gt; Can anyone shed any light on this? Thanks
has answer: http://stackoverflow.com/a/73322938
type: Question
score: 12
tagged with: javascript
tagged with: tinymce
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25723782
answer count: 4
favorite count: 0
upvote count: 12
has title: Script tags in TinyMCE fields are not saving correctly
downvote count: 0
has answer: http://stackoverflow.com/a/58414345
type: UnansweredQuestion

http://stackoverflow.com/q/24702212
has body: I need such a scenario at where if anyone hover on a div, another div will be hovered. Just like: HTML Touch the Grey Box and I get hovered! CSS: .link-box a:hover { color: red; } Foddle Work If anyone hover on the div.box, div.link-box will get hovered I mean get the red color. Is it possible? Please, don't tell it like this CSS way: .box:hover .link-box a { color: red; } My scenario is not like this. I've more complex scenario. So, it's only possible with jQuery. As I ain't good at jQuery, I can't write the script. That's why I need your help. What's the jQuery for it? May be, something like this? $('.box').hover(function(){ $('.link-box').hover(); }); ..............................................Update.................................. All the answer is related with CSS. Basically, div.link-box is such a complex div at my webpage that if anyone hover on the div.link-box many action happened, like pop-up box coming, multiple child elements of div.link-boxwill change. All happened with jQuery + CSS. And I need all the hover action of div.link-box when anyone hover on div.box. I just make here div.link-box as a link to make you understand my problem. But, basically it's not just css change. So, is it possible to bring all div.link-box hover action by hover on another div/button/link just like div.box by jQuery ?
type: Question
linked to: http://stackoverflow.com/q/13325519
has answer: http://stackoverflow.com/a/24702335
tagged with: javascript
tagged with: jquery
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/38307243
favorite count: 0
linked to: http://stackoverflow.com/q/5199154
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38307456
tagged with: hover
score: 2
has answer: http://stackoverflow.com/a/24702302
has answer: http://stackoverflow.com/a/24702318
has comment: http://stackoverflow.com/comment/38307864
has title: How to make one element get hovered when hover on other element

http://stackoverflow.com/comment/38232107
type: QuestionComment
has text: What about take all and throw away what you don't want? http://jsfiddle.net/CvS3k/
score: 1
comment on: http://stackoverflow.com/q/24661480
type: Comment

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/24641730

http://stackoverflow.com/q/24628680
has title: m3u8 + 404 + ios Safari = annoying popup: "The requested URL was not found on this server"
type: UnansweredQuestion
tagged with: http-status-code-404
tagged with: safari
has body: HTML Video tag if you load m3u8, which is 404 (file not found), on ios Safari( ipad ) annoying popup will be resulted: "The requested URL was not found on this server" Is there a way to handle this error, so that pop up won't show.
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/24732372
downvote count: 0
tagged with: ios
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/70925064
tagged with: html5-video
has comment: http://stackoverflow.com/comment/38169687
favorite count: 0

http://stackoverflow.com/q/24736105
upvote count: 1
type: AnsweredQuestion
has title: Image path in AngularJs
score: 1
has answer: http://stackoverflow.com/a/24736378
tagged with: absolute-path
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24736378
answer count: 3
possible better answer: http://stackoverflow.com/a/24736253
favorite count: 0
has answer: http://stackoverflow.com/a/24736253
has answer: http://stackoverflow.com/a/41140307
tagged with: angularjs
has body: I have a image path in AngularJs $scope variable imageUrl, which comes from external source. http://farm6.staticflickr.com/5579/14671096893_806ec359b7_m.jpg I am trying to get the image on HTML page. &lt;img ng-src="{{imageUrl}}"&gt; But when I am trying to run this in firefox, it is giving me error "NetworkError: 403 Forbidden - http://localhost/demo/view/html/%5B%22http://farm6.staticflickr.com/5579/14671096893_806ec359b7_m.jpg%22%5D" Its taking root path of project. How can I make some changes to show image on the web page?

http://stackoverflow.com/comment/38267492
comment on: http://stackoverflow.com/a/24660303
type: AnswerComment
has text: You helped a lot. Thank you very much for your time. I think I'm finally getting somewhere
score: 0
type: Comment

knockout.js
tags question: http://stackoverflow.com/q/24705388
tags question: http://stackoverflow.com/q/24662656
tags question: http://stackoverflow.com/q/24658584
tags question: http://stackoverflow.com/q/24698323
tags question: http://stackoverflow.com/q/24591584
tags question: http://stackoverflow.com/q/24677709
tags question: http://stackoverflow.com/q/24660143
tags question: http://stackoverflow.com/q/24726435
tags question: http://stackoverflow.com/q/24666030
tags question: http://stackoverflow.com/q/24619863
tags question: http://stackoverflow.com/q/24603046
tags question: http://stackoverflow.com/q/24688540
tags question: http://stackoverflow.com/q/24665274
tags question: http://stackoverflow.com/q/24644848
tags question: http://stackoverflow.com/q/24681531
tags question: http://stackoverflow.com/q/24712462
tags question: http://stackoverflow.com/q/24633677
tag name: knockout.js
tags question: http://stackoverflow.com/q/24607252
tags question: http://stackoverflow.com/q/24725581
tags question: http://stackoverflow.com/q/24651893
tags question: http://stackoverflow.com/q/24681436
tags question: http://stackoverflow.com/q/24671152
tags question: http://stackoverflow.com/q/24626263
tags question: http://stackoverflow.com/q/24677349
tags question: http://stackoverflow.com/q/24627904
tags question: http://stackoverflow.com/q/24697343
tags question: http://stackoverflow.com/q/24698034
tags question: http://stackoverflow.com/q/24630827
tags question: http://stackoverflow.com/q/24658543
tags question: http://stackoverflow.com/q/24641629
tags question: http://stackoverflow.com/q/24666387
tags question: http://stackoverflow.com/q/24601502
tags question: http://stackoverflow.com/q/24593598
tags question: http://stackoverflow.com/q/24678364
tags question: http://stackoverflow.com/q/24682034
tags question: http://stackoverflow.com/q/24673505
tags question: http://stackoverflow.com/q/24612600
tags question: http://stackoverflow.com/q/24710072
tags question: http://stackoverflow.com/q/24706076
tags question: http://stackoverflow.com/q/24651714
tags question: http://stackoverflow.com/q/24699722
tags question: http://stackoverflow.com/q/24688288
tags question: http://stackoverflow.com/q/24599775
tags question: http://stackoverflow.com/q/24735327
type: Tag
tags question: http://stackoverflow.com/q/24718063
tags question: http://stackoverflow.com/q/24636951
tags question: http://stackoverflow.com/q/24598597
tags question: http://stackoverflow.com/q/24656219
tags question: http://stackoverflow.com/q/24710368
tags question: http://stackoverflow.com/q/24701050
tags question: http://stackoverflow.com/q/24616322
tags question: http://stackoverflow.com/q/24604050
tags question: http://stackoverflow.com/q/24641332
tags question: http://stackoverflow.com/q/24701430
tags question: http://stackoverflow.com/q/24709872

http://stackoverflow.com/q/24625585
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38164422
type: Question
has body: I am an absolute beginner when it comes to anything JavaScript or JQuery. I am trying to get a few checkboxes open in a new tab if they are checked and then the submit button clicked. The code I have works only if one checkbox is checked. If more than one is checked, then only the first one is open in the tab. My code is as follows: Javascript function CheckCheckboxes(form) { var i, counter = 0; for (i = 0; i < form.elements.length; ++i) { if ('checkbox' === form.elements[i].type && form.elements[i].checked) {++counter; window.open('http://' + form.elements[i].value, '_blank'); } } if (!counter) { alert('Please check at least one!'); } } HTML Companies Google Apple Microsoft Facebook Any help would be greatly appreciated. Been at this for 3 and a half hours :) Thanks
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: checkbox
has answer: http://stackoverflow.com/a/24625737
has title: Open Checkbox multiple tabs on submit

http://stackoverflow.com/q/24730137
has comment: http://stackoverflow.com/comment/38361681
tagged with: php
has body: I want to make my time ago function update it self dynamically without refreshing the page for example: when I upload a picture and underneath the picture it's return 19 seconds ago it will be as it is, it won't change but when I refresh the page it will be 1 minute ago or whatever. This is the Time Ago function in PHP which I got from css-tricks: function ago($time){ $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade"); $lengths = array("60","60","24","7","4.35","12","10"); $now = time(); $difference = $now - $time; $tense = "ago"; for($j = 0; $difference &gt;= $lengths[$j] &amp;&amp; $j &lt; count($lengths)-1; $j++) { $difference /= $lengths[$j]; } $difference = round($difference); if($difference != 1) { $periods[$j].= "s"; } return "$difference $periods[$j] ago "; } How I can make it change without refreshing the page with jquery?
type: Question
has comment: http://stackoverflow.com/comment/38361690
tagged with: javascript
tagged with: jquery
score: 0
has title: Update time ago function without refreshing the page in PHP and JQuery
has comment: http://stackoverflow.com/comment/38361715
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38307677
comment on: http://stackoverflow.com/a/24702362
has text: Thanks for the reply but I'm still doing something wrong. Problem persist :(
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24708573
has comment: http://stackoverflow.com/comment/38320011
tagged with: onsubmit
has body: I have project for my php class where I have to enter First name, last name, email, and phone number and output returns the exact values. (but I will only put the 'first name' code for editing). I have a function in of html that gets called from 'onsubmit' inside First Name* The function creates a node 'elemFnameSpan' before of id 'idFnameBr'. If the textinput for first name is empty, elemFnameSpan.innerHTML outputs "required field", and false on 'onsubmit' . My problem is that the output doesn't refresh everytime the submit button is called, so 'required field' outputs get extended next to each other. I am having difficulty resolving this situation and tried to remove the previous child node everytime the new function is called, but that didn't work either for me yet.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24708684
has title: Does node created within a sub-function stay valid even after the function exited?
type: Question
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38319942
accepted answer: http://stackoverflow.com/a/24708661
possible better answer: http://stackoverflow.com/a/24708684
has comment: http://stackoverflow.com/comment/38320072
has answer: http://stackoverflow.com/a/24708661

http://stackoverflow.com/comment/38169627
score: 0
type: Comment
has text: Honestly I dont know better solution.
type: QuestionComment
comment on: http://stackoverflow.com/q/24608686

http://stackoverflow.com/a/24742577
has comment: http://stackoverflow.com/comment/38385968
score: 2
has comment: http://stackoverflow.com/comment/38386550
upvote count: 2
has comment: http://stackoverflow.com/comment/38384942
has body: The only solution to this problem is with JavaScript because PHP will only execute on the server and will only present HTML on the client side. If you understand the HTTP request/response system, you will know that a request is sent to the server and then the server responds back with the page content, which will be the HTML (and CSS and any client-side scripts such as JavaScript). This method normally means having to reload the page but if you use AJAX (Asynchronous JavaScript and XML), this acts as a layer between the client and the server, allowing the user to request content without having to reload the page. The most simple way of doing this is with jQuery. Be sure to include the jQuery library and put your code inside the $(document).ready(); function so that it executes when the page has finished loading. Fortunately, this particular task is fairly simple, although it will require restructuring your website/application slightly. You will need to have the content echoed or printed onto a different page with PHP. On your main page that will be used and seen by the users, you would simply write $("#container").load("page.html"); where container is the id of the container you want to load the content into. If you want different content to be loaded with different buttons, you could do this (as long as you give your links the correct ids: $(document).ready(function() { $("#alpha").onclick(function() { $("#container").load('page.html?page=alpha'); }); $("#beta").onclick(function() { $("#container").load('page.html?page=beta'); }); }); Edit: I'm so sorry, I missed out the important part about the loading image, but the other answer demonstrates this well, so there is no point in repeating it.
has comment: http://stackoverflow.com/comment/38385026
answers question: http://stackoverflow.com/q/24742438
has comment: http://stackoverflow.com/comment/38385868
downvote count: 0
has comment: http://stackoverflow.com/comment/38384755
type: Answer

http://stackoverflow.com/q/24693698
tagged with: javascript
has comment: http://stackoverflow.com/comment/38291004
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/38291075
favorite count: 0
has comment: http://stackoverflow.com/comment/38290947
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38290934
has comment: http://stackoverflow.com/comment/38291136
has body: I want to store an element's html in localStorage object so that I can retrieve it later. How can I do this? I tried $(function(){ $('window').on("storage", function (){ localStorage.setItem("check", $('#checking').html()); }) }; I want to store the html everytime the html is changed? How can I do that? Should I attach the event handler to the onchange event of the html element? I have multiple lists that I want to store in local storage. Should I just attach the storage event to the onchange event of the li element. p.s: I'm working on Firefox
upvote count: 0
has answer: http://stackoverflow.com/a/24693792
has title: How to trigger local storage event?
has comment: http://stackoverflow.com/comment/38290832
tagged with: local-storage
has answer: http://stackoverflow.com/a/24693863
type: Question
has comment: http://stackoverflow.com/comment/38290908
score: -2

http://stackoverflow.com/comment/38354973
type: Comment
has text: Could you show me your code in the form of a jsfiddle?
comment on: http://stackoverflow.com/a/24726762
score: 0
type: AnswerComment

http://stackoverflow.com/q/24732492
has answer: http://stackoverflow.com/a/24732618
has body: I've got a canvas in HTML with an image I load. The image has size (width, height). I get 2 coordinates - (x1, y1) and (x2, y2) - those are the the left-top and right-top corners of the target transform. What I need to do is to take the original image, put its left-top corner in (x1, y1) and transform it so that the right-top will be in (x2,y2) - which I guess needs a skew transform. The question would be how to calculate the right skew to put the right-top corner exactly in (x2,y2). Putting the left-top corner in (x1,y1) requires a simple translate transform - no problem there. Many thanks, Please see attached image:
possible better answer: http://stackoverflow.com/a/24732618
accepted answer: http://stackoverflow.com/a/24733148
type: AnsweredQuestion
has title: How to compute transform in HTML Canvas by coordinates
type: Question
tagged with: canvas
tagged with: javascript
has answer: http://stackoverflow.com/a/24733148
score: 0
answer count: 2
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/24736530
answers question: http://stackoverflow.com/q/24735819
has body: You can use a solution very similar to this one. But simply, instead of using a new window, just use an inline frame, aka iframe: MDN documentation for iframe And don't do the redirect directly. Wait until the iframe is laoded. To do show, subscribe to its onload event, like shown here: w3schools iframe onload I.e., do the redirect inside the iframe's onload.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38373536
has comment: http://stackoverflow.com/comment/38373590

http://stackoverflow.com/comment/38347917
type: Comment
has text: Thank you for providing the fiddle. Works like a champ. I agree about the css in html, was doing it for testing.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24716490

http://stackoverflow.com/a/24605096
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24604835
type: Answer
has comment: http://stackoverflow.com/comment/38124874
upvote count: 7
has comment: http://stackoverflow.com/comment/38124705
has body: See this: http://jsfiddle.net/d34Fk/5/ jQuery : var width = $('.div2')[0]['clientWidth']; $('.div1').css({'width':width+'px'});
answers question: http://stackoverflow.com/q/24604835
score: 7
downvote count: 0

http://stackoverflow.com/comment/38196887
has text: yes - i had the wrong path to the script file and it now throws a new error from within the script file:
comment on: http://stackoverflow.com/q/24642893
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24698710
has comment: http://stackoverflow.com/comment/38375116
has body: You might want to use Raphael (https://dmitrybaranovskiy.github.io/raphael/) or a similar library to take care of this for you. The raphael site contains many examples similar to the case you describe.
upvote count: 5
score: 5
has comment: http://stackoverflow.com/comment/38362333
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38300895
accepted answer of: http://stackoverflow.com/q/24698557
answers question: http://stackoverflow.com/q/24698557
type: Answer

http://stackoverflow.com/a/24672719
type: AcceptedAnswer
downvote count: 0
has body: I've got the same issue - not that it's a complete solution but it certainly stops the error for now, by stopping the function being called on the review page. in the file /skin/frontend/rwd/default/js/app.js line 649 change image.elevateZoom(); to if ($('.review-product-list').length == 0) { image.elevateZoom(); }
accepted answer of: http://stackoverflow.com/q/24646559
type: Answer
answers question: http://stackoverflow.com/q/24646559
has comment: http://stackoverflow.com/comment/38322485
upvote count: 7
has comment: http://stackoverflow.com/comment/38300912
score: 7
has comment: http://stackoverflow.com/comment/50849983
has comment: http://stackoverflow.com/comment/50868431

http://stackoverflow.com/a/24731134
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24731067
has comment: http://stackoverflow.com/comment/38364138
score: 3
answers question: http://stackoverflow.com/q/24731067
has comment: http://stackoverflow.com/comment/38363693
type: AcceptedAnswer
downvote count: 0
has body: Add the following code to your css #navi{ display: block!important; } It is because somehow bootstrap is making your nav display:none Working Code
has comment: http://stackoverflow.com/comment/38363471
type: Answer
has comment: http://stackoverflow.com/comment/38368212
has comment: http://stackoverflow.com/comment/38363533

http://stackoverflow.com/comment/38194122
score: 0
type: Comment
type: QuestionComment
has text: Ignore that deleted comment (I temporarily spaced out and thought you were drawing paths but I see you're drawing images).
comment on: http://stackoverflow.com/q/24641042

http://stackoverflow.com/comment/38330597
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24710697
type: Comment
has text: Thanks David.Maybe a little off topic, but is it reasonable to have all these subscriptions active at once? What do you consider too much data persisting on the client side?

http://stackoverflow.com/comment/38103007
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24593239
type: AnswerComment
has text: I found that it is `element.style {width: 100px;}` which is making the ` ` to change to 100px as when I remove this style on Chrome inspector the layout is fine. `element.style` isn't anywhere I can find though

http://stackoverflow.com/a/24716679
has comment: http://stackoverflow.com/comment/38335312
has comment: http://stackoverflow.com/comment/38335257
upvote count: 3
has comment: http://stackoverflow.com/comment/38335256
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/24716664
has body: Move the script to after the span, or wrap the code in a function and call it when the ready or load event fires. document.getElementById("logout-timer") can't find the span before it exists. You also need to define countdown; there is no sign of it in your code.
score: 3
has comment: http://stackoverflow.com/comment/38335284
has comment: http://stackoverflow.com/comment/38335308

http://stackoverflow.com/a/24710681
type: Answer
has body: I think you have written google.maps.event.addDomListener(window, 'load', initialize); statement inside your initialize() function. You should write it outside.
score: 2
answers question: http://stackoverflow.com/q/24710546
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/38092639
type: QuestionComment
has text: I'm seeing multiple requests to the webserver though
type: Comment
comment on: http://stackoverflow.com/q/24588728
score: 0

http://stackoverflow.com/q/24672101
has answer: http://stackoverflow.com/a/24672197
tagged with: javascript
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/24672230
score: 1
tagged with: jquery
favorite count: 0
has title: using match(), but it didn't work froma string variable
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38250787
accepted answer: http://stackoverflow.com/a/24672230
has comment: http://stackoverflow.com/comment/38251623
upvote count: 1
type: Question
has body: I have the following fiddle: jsfiddle The function: $('#testbutton').on("click", function(){ test(); }); function test() { var data = []; data['article'] = "monablanko"; data['specialarticle'] = ["blanko", "bbsooel"]; var tmp = data['specialarticle'].join("|"); if( data['article'].match( /(tmp)/ ) ) { $('#result').html("I found a match"); } else { $('#result').html("I didn't found a match"); } } I didn't found a match with this function. Where is my error? The typeof tmp is string when i use console.log(typeof tmp); when i write if( data['article'].match( /(blanko|bbsooel)/ ) ) then i find a match.
possible better answer: http://stackoverflow.com/a/24672197

http://stackoverflow.com/q/24701124
tagged with: google-maps-api-3
score: 0
has answer: http://stackoverflow.com/a/24701576
accepted answer: http://stackoverflow.com/a/24701576
tagged with: google-maps
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Event inside Event in Google Maps API
tagged with: events
type: AnsweredQuestion
type: Question
has body: I have some problems when i using addListener of Google Maps API. At first, i load some markers and i attach one event listener in all of them, like this: google.maps.event.addListener(this.marker, 'click', function() { var points = new cRota().loadRotaFromVeiculo(this.id_veiculo, $("#txtDataInicial").val(), $("#txtDataFinal").val(), $("#txtHora1").val(), $("#txtHora2").val() ); this.map.removeMarkers(); this.map.removeRoutes(); this.map.removePolylines(); this.polyline = new Polyline(); this.polyline.setMap(this.map); this.polyline.setPoints(points); if (this.polyline.init()) { //Adiciona a polyline no mapa this.map.addPolyline(this.polyline); } //Cria o window info para mostrar as informações da rota this.info_window = new InfoWindow(); this.info_window.setMap(this.map); this.info_window.init(); //Adiciona um marker pra cada ponto da polyline var marker_rota = new MarkerRota(); marker_rota.setDataLocalizacao(points[0].data_localizacao); marker_rota.setVelocidade(points[0].velocidade); marker_rota.setLatitude(points[0].latitude); marker_rota.setLongitude(points[0].longitude); marker_rota.setMap(this.map); marker_rota.setIcon("m5.png"); marker_rota.init(); marker_rota.addListener(); //Adiciona no mapa this.map.addMarker(marker_rota); }; When i click in some marker, i load data from webservice and create a polyline. After create a polyline, i instance the class called MarkerRota. This class, extends another class called Marker. So, when i click in one marker in my map, the event is fired, and do all this, create the polyline and other marker. In this other marker i also have an addListener in to execute other things. But, the problem is, when i click in some marker generated before, the other marker is loaded, the event of this other marker created by MarkerRota, never is fired. Here is the code of my function of class MarkerRota MarkerRota.prototype.addListener = function() { //Copia a classe para uma var var that = this; //Adiciona o evento do click do marker googl…

http://stackoverflow.com/q/24680408
has title: "Pointless button" won't change text
type: Question
has answer: http://stackoverflow.com/a/24680566
has comment: http://stackoverflow.com/comment/38266896
tagged with: button
tagged with: javascript
has comment: http://stackoverflow.com/comment/38266550
possible better answer: http://stackoverflow.com/a/24680445
score: 0
has answer: http://stackoverflow.com/a/24680691
has answer: http://stackoverflow.com/a/24680445
tagged with: http://stackoverflow.com/tag/html
answer count: 4
accepted answer: http://stackoverflow.com/a/24680566
has answer: http://stackoverflow.com/a/24680572
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38266685
has body: I'm trying to make a website with this pointless button on it Pointless button! Don't click it I want it to change the text in the paragraph with id 'pButt' to 'Seriously, it's pointless' the first time, 'Ouch, that tickles!' second and 'Ok, I'm bored of writing Javascript now. No point clicking anymore!' third time. Why won't the code work? I'm pretty new to Javascript, but if there's some dumb spelling mistake I'm really sorry.
has comment: http://stackoverflow.com/comment/38266558
has comment: http://stackoverflow.com/comment/38266705

http://stackoverflow.com/q/24690357
has comment: http://stackoverflow.com/comment/38285443
accepted answer: http://stackoverflow.com/a/24691115
favorite count: 0
has answer: http://stackoverflow.com/a/24690652
possible better answer: http://stackoverflow.com/a/24691534
has answer: http://stackoverflow.com/a/24691534
has title: Add tags around selected text in an element
has body: How can I add tags around selected text within an element? For example, if somebody highlights "John", I would like to add span tags around it. HTML My name is Jimmy John, and I hate sandwiches. My name is still Jimmy John. JS function getSelectedText() { t = (document.all) ? document.selection.createRange().text : document.getSelection(); return t; } $('p').mouseup(function(){ var selection = getSelectedText(); var selection_text = selection.toString(); console.log(selection); console.log(selection_text); // How do I add a span around the selected text? }); http://jsfiddle.net/2w35p/ There is a identical question here: jQuery select text and add span to it in an paragraph, but it uses outdated jquery methods (e.g. live), and the accepted answer has a bug.
answer count: 4
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/2236982
tagged with: javascript
tagged with: jquery
score: 22
has comment: http://stackoverflow.com/comment/38285295
has comment: http://stackoverflow.com/comment/38285356
has answer: http://stackoverflow.com/a/24690725
upvote count: 22
linked to: http://stackoverflow.com/q/6328718
has answer: http://stackoverflow.com/a/24691115
downvote count: 0
has comment: http://stackoverflow.com/comment/38285263

http://stackoverflow.com/q/24633617
has comment: http://stackoverflow.com/comment/38179030
has comment: http://stackoverflow.com/comment/38178986
favorite count: 0
has comment: http://stackoverflow.com/comment/38179005
has answer: http://stackoverflow.com/a/24633720
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24633701
has comment: http://stackoverflow.com/comment/38179013
upvote count: 3
downvote count: 3
possible better answer: http://stackoverflow.com/a/24633701
type: Question
has comment: http://stackoverflow.com/comment/38179569
has body: I've the following code and it is not working properly. My aim is whenever i click the 'font size' such as 12, 14 and 16, then, the font size and its color need to change accordingly and simultaneously. But, it is not working as expected, Any help? Some paragraph text some heading 1 text some heading 2 text 12 14 16
accepted answer: http://stackoverflow.com/a/24633720
tagged with: javascript
has title: Closure in javascript seems not working properly
score: 0
has comment: http://stackoverflow.com/comment/38179057
answer count: 2
has comment: http://stackoverflow.com/comment/38179108

http://stackoverflow.com/a/24596358
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24596063
type: Answer
accepted answer of: http://stackoverflow.com/q/24596063
has comment: http://stackoverflow.com/comment/38108368
has body: Instead of creating a function that validates just the input number, you can create a function that validates the full form. See this example: Validation test Question: ans1 ans2 ans3 ans4 Some remarks: In the code for the event onsubmit="", you can use the keywork this to refer to the form itself, and pass it to the checkAnswer() function. When you have the variable form that points to your HTML form, you can retrieve its fields through form.elements["NAME"], where NAME matches the attribute name="" in the HTML tag. This works for all controls, select, button, input, with the exception of . See MDN about this, it contains good reference about every object in the HTML DOM, in particular . You might still need to convert the value to an integer to be able to compare it to your right answer, that's the reason for parseInt. This approach can be generalized: what you want to do is equivalent to form validation, you can find online plenty of libraries and tutorials that explain in detail how to do it; there are also many answers, if you know what to look for.
has comment: http://stackoverflow.com/comment/38108107
has comment: http://stackoverflow.com/comment/38108201
score: 0

http://stackoverflow.com/a/24710441
has body: This breaks your binding: write : function(val){ self.contacts = ko.observableArray(String(val).split(',')); } You want to update your observable instead of re-assigning it write : function(val){ self.contacts(String(val).split(',')); }
accepted answer of: http://stackoverflow.com/q/24710368
type: Answer
has comment: http://stackoverflow.com/comment/38323830
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/24710368

universal-analytics
tag name: universal-analytics
tags question: http://stackoverflow.com/q/24630441
type: Tag
tags question: http://stackoverflow.com/q/24657380

http://stackoverflow.com/a/24595453
has body: To do what your are asking for you must do several edits on various levels 1. The AJAX Part: Change the success function behaviour to add your images to your document. We will suppose that the PHP script will return the raw images, thus nothing is easier than adding these images to your document: success:function(data){ $(".myModal").append(data); } This will add all the content returned from the PHP to your myModal div 2. The PHP Part: Here we need to make a quick PHP Script that will take the parameter passed and return all the images of your carousel in a raw format. So let's do this: &lt;?php /* First check the passed parameter */ if (!isset($_POST['view']) die("Error, no parameter specified"); /* Then check if the passed parameter corresponds to a directory */ if (!is_dir("./" . $_POST['view'])) die("No directory found"); /* Then list all the images from the directory pointed my the parameter */ $images = scandir("./" . $_POST['view']); /* And return them */ foreach($images as $i) { if (is_file("./" . $_POST['view'] . "/" . $i)) echo '&lt;img src="http://your-domain.com/baseurl/'.$i.'" /&gt;"; } ?&gt; 3. The carousel Part: Now you finally need a javascript code that will make your carousel show one image at a time. You can look for pre-made solutions like the bootstrap carousel: http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-carousel.php. Or make your custom own code. In order to provide a 100% full answer I will give you a custom code that would make each image fade one after each other. $(".myModal img").each(function(index) { $(this).delay(700*index).fadeIn(300); $(this).delay(700*index +300).fadeOut(300); }); and add the following CSS code to hide all images at the beginning .myModal img { diaplay: none; }
type: Answer
score: 2
answers question: http://stackoverflow.com/q/24595219
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/24711187
answers question: http://stackoverflow.com/q/24711069
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24711069
has body: The AddonManager or more specifically the XPIProvider calls flushStartupCache but only when the add-on is uninstalled (incl. during up- and downgrades). However, the cache is not cleared when disabling or enabling an add-on in-session. Either put an equivalent method in your bootstrap.js that you call when shutdown (you should do this in release versions). Or just continue restating that damn browser. Personally I find it faster to just restart with the "Restartless Restart" add-on keyboard shortcut and roaming around in about:addons. PS: I can not be absolutely sure this is the only issue at play, since I cannot test your stuff, since you didn't provide a full, reproducible example. Edit Yes, indeed, adding the following to shutdown is sufficient and there are no other blocking issues: if (reason == ADDON_DISABLE) { Services.obs.notifyObservers(null, "startupcache-invalidate", null); }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38325811
has comment: http://stackoverflow.com/comment/38328700

http://stackoverflow.com/comment/38411763
type: AnswerComment
has text: ``localhost`` or ``cors1.cors`` that redirects to ``127.0.0.1`` (using windows host file) doesn't change Chrome's CORS behaviour. I'm not looking for a way to cut-off all security, but to use CORS in XSL ``document()``.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24747241

http://stackoverflow.com/q/24644335
accepted answer: http://stackoverflow.com/a/24646294
tagged with: rss
upvote count: 1
type: Question
score: 1
tagged with: mongodb
has comment: http://stackoverflow.com/comment/38199547
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a MEAN application that works as intended, Angular can pull data from my MongoDB, Express handles the API, etc. I want to import data from an RSS feed into my database as it gets imported into the RSS feed. I originally had my app pull the JSON from the RSS feed when the page is loaded, but then every time the page is refreshed I add duplicated data from the RSS data. Is the best approach to continue pulling the feed on a page refresh and do a check to see if the __id is already in the database? Or is there a better way to incorporate the consumption of RSS data into my database. Here is my app structure: /app backend stuff /controllers all the mongoose controls for CRUD /models mongoose schemas/models route.js express routes /config database configuration file /node_modules node modules /public all front end AngularJS stuff /css /js /controllers angular controllers /services angular services/factories app.js tie angular components together appRoutes.js frontend routing /libs angular generated libs /views html Would something like this go into my /app/controllers/reviews.js? var mongoose = require('mongoose'); var Review = require('../models/review'); // equivalent to "Create" in CRUD exports.getAllFromFeed = function(req, res) { // pull RSS feed // create Review object from JSON // check for duplicate in database // add to mongodb } and then just call that on a page load?
has title: Import RSS feed to MongoDB
has answer: http://stackoverflow.com/a/24646294
tagged with: node.js
tagged with: mongodb-query
type: AnsweredQuestion

http://stackoverflow.com/q/24650228
has body: Please forgive me for the naivete of this question, I am trying to grab some JavaScript for the first time. I have this JavaScript file that returns a string: var strings = strings || {}; (function() { strings.get = function(key) { var locale = "english"; //To be switched based on device locale when localisation occurs... return localeMap[locale][key]; }; strings.format = function() { var args = arguments; var str = strings.get(args[0]); return str.replace(/{(\d+)}/g, function(match, num) { return typeof args[+num + 1] != 'undefined' ? args[+num + 1] : match; }); }; var englishStrings = { "exercise.requires.max.force" : "You need to record your maximum strength before you can perform exercises. Would you like to record it now?", "calibration.start.alert" : "Ensure the PeriCoach device is connected and in position. During calibration, follow the on screen instructions, contracting your muscles as hard as you can when it says 'Squeeze' and relaxing completely when it says 'Relax'. You will be required to repeat this four times.", "calibration.starting" : "Starting...", }; var localeMap = { english: englishStrings }; })(); I want to change it so that it returns a string based on the locale of the browser, I have done something like follows, but I do not know how to change this so that it returns the correct string, obviously var localeMap = { en-US: englishStrings it: italianStrings }; Is wrong... please what would be the correct form? var strings = strings || {}; (function() { strings.get = function(key) { var locale = "english"; //To be switched based on device locale when localisation occurs... var language = window.navigator.userLanguage || window.navigator.language; return localeMap[language][key]; }; strings.format = function() { var args = arguments; var str = strings.get(args[0]); return str.replace(/{(\d+)}/g, function(match, num) { return typeof args[+num + 1] != 'undefined' ? args[+num + 1] : match; }); }; var englishStrings = { "testo" : "Inglese", "exercis…
has title: How to change this JS so that it returns a different string based on the Locale of the browser?
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/24650967
has comment: http://stackoverflow.com/comment/38210356
has comment: http://stackoverflow.com/comment/38210307
possible better answer: http://stackoverflow.com/a/24650967
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/24650409
accepted answer: http://stackoverflow.com/a/24650409
type: Question
upvote count: 2
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/24619664
accepted answer: http://stackoverflow.com/a/24639975
has answer: http://stackoverflow.com/a/24619762
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/38190511
has title: Why is using jasmine's runs and waitFor function necessary?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jasmine
favorite count: 0
has comment: http://stackoverflow.com/comment/38162374
has body: I'm testing an asynchronous piece of code with something that looks like this: randomService.doSomething().then(function() { console.log('I completed the operation!'); }); Surprisingly (to me) I've found that it only succeeds (ie console.log output is shown) when wrapped inside jasmine's runs function, like so: var isDone = false; runs(function() { randomService.doSomething().then(function(data) { console.log('I completed the operation!'); isDone = true; }); }); waitsFor(function() { return isDone; }, 'Operation should be completed', 1000); As I understood it, I thought waitsFor was only to delay the code, in other words I would use it if I had more code that I had to delay until after the asynchronous call completed - in other words, I would have thought that there'd be no reason for me to use runs and waitsFor since there's nothing that comes after this bit of code, right? That's the impression I got from reading this question: What do jasmine runs and waitsFor actually do? but obviously I've gotten myself mixed up at some point. Does anyone have any thoughts on this? EDIT: Here is a Plunker with far more detail of the problem: http://plnkr.co/edit/3qnuj5N9Thb2UdgoxYaD?p=preview Note how the first test always passes, and the second test fails as it should. Also, I'm sure I should have mentioned this before, but this is using angularJS, and Jasmine 1.3.
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/38185156
tagged with: angularjs
has answer: http://stackoverflow.com/a/24639975
upvote count: 1
possible better answer: http://stackoverflow.com/a/24619762
tagged with: unit-testing

http://stackoverflow.com/comment/38161378
type: AnswerComment
comment on: http://stackoverflow.com/a/24623890
score: 0
type: Comment
has text: @PieterdeVries sure let me know how it works out for you

http://stackoverflow.com/q/24625257
has title: How to authenticate users in document library in sharepoint 2013 using javascript
tagged with: sharepoint-2013
has body: I need to create a sharepoint hosted extension app that will prompt for user credentials when user wants to upload documents in a document library. Which authentication technique should be used and how to code that in javascript. Will the javascript code for authentication for sharepoint online work in sharepoint 2013 on premises?
tagged with: javascript
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: authentication
upvote count: 1

http://stackoverflow.com/q/24684597
tagged with: plot
type: Question
has title: Plotting Statistical Plots like Volcano in JavaScript
score: 0
has answer: http://stackoverflow.com/a/24685432
answer count: 1
tagged with: javascript
has body: I want to plot graphs like Volcano Plot, MA Plot and BCV Plot for datasets using JavaScript and/or Node.js Is there anything available that I can use to be able to plot it? PS: I used d3 but its too cumbersome when it comes to these Plots.
tagged with: statistics
tagged with: node.js
type: UnansweredQuestion

http://stackoverflow.com/a/24618974
accepted answer of: http://stackoverflow.com/q/24618836
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24618836
type: Answer
has body: var dataObj = { "BTC": "0", "XCP": "0", "LTC": "0", "NXT": "0", "XPM": "0", "NMC": "0", "MMC": "0", "NOBL": "0", "USDE": "0", "SOC": "0", "KDC": "0", "DOGE": "0.00000001", "GLB": "0", "Q2C": "0", "FOX": "0", "MRC": "0", "MTS": "0" } var keys = Object.keys(dataObj); keys.forEach(function(key){ if(dataObj[key] === "0") delete dataObj[key];}) console.log(dataObj);
has comment: http://stackoverflow.com/comment/38151624
downvote count: 0
score: 1

bootbox
tags question: http://stackoverflow.com/q/24637740
type: Tag
tag name: bootbox
tags question: http://stackoverflow.com/q/24589906

http://stackoverflow.com/a/24592793
has comment: http://stackoverflow.com/comment/38101001
answers question: http://stackoverflow.com/q/24592777
has comment: http://stackoverflow.com/comment/38101096
has body: when you say data = noteData - it is now the same type as noteData... so if noteData.property does not exist, data's property will not exist.
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/38100964
downvote count: 0
score: 1

http://stackoverflow.com/comment/38393631
comment on: http://stackoverflow.com/q/24747306
has text: Just a provide a TextBox for the user to paste the URL. Then on the server side you can retrieve the file based on the URL.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38114233
score: 0
has text: i think instead of writing page1 this way it is better to inserting its content into another element with class="page1_content" then use my above code on that. and after effect completes use empty() function , then insert your new data into it then slide down that.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24599587

http://stackoverflow.com/q/24625317
type: Question
has title: Passing user selection in Ckeditor
has answer: http://stackoverflow.com/a/24627179
accepted answer: http://stackoverflow.com/a/24869812
tagged with: javascript
tagged with: ckeditor
possible better answer: http://stackoverflow.com/a/24627179
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/4401469
has answer: http://stackoverflow.com/a/24869812
tagged with: editor
type: AnsweredQuestion
tagged with: contenteditable
has body: I'm working on a project where I need to pass the data selection made before the CKEditor get loaded. /** * Get text selection. */ Drupal.xeditor.getSelection = function() { var text = ""; if (window.getSelection) { text = window.getSelection().toString(); } else if (document.selection &amp;&amp; document.selection.type != "Control") { text = document.selection.createRange().text; } return text; }; I created a Ckeditor plugin called 'selection' to get the data from Drupal.xeditor.getSelection(); and re-highlight thatb selection inside the Ckeditor. /** * @file plugin.js * Manage selection in Ckeditor. */ ( function($) { CKEDITOR.plugins.add( 'selection', { icons: 'selection', init: function( editor ) { //console.log(XEDITOR.current_selection); //console.log(CKEDITOR); editor.addCommand( 'selection', { exec : function( editor ) { // } }); editor.ui.addButton( 'selection', { label: 'Content selection', command: 'selection', icon: this.path + 'icons/selection.png' }); editor.config.contentsCss = this.path + 'css/selection.css'; }, afterInit: function (editor) { // I can access the selection here. console.log(Drupal.xeditor.getSelection()); // Auto highlight the string/word selected by the user earlier. } }); })(jQuery); However, I have difficulty in re-highlighting the selected texts inside Ckeditor. Please see the screenshot below for more details. Step 1 On mouseup, I will load the Ckeditor automatically. As you can see in the image below it says that "Loading..." Step 2 Step 3 In step 3 the CKEditor is fully loaded. In this part I want also the word I selected in Step 1 to be highlighted so user can proceed on formatting and avoid to annoy the user by highlighting again.

http://stackoverflow.com/comment/38378897
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24739291
score: 0
has text: Are you getting a specific error?

http://stackoverflow.com/a/24633345
has comment: http://stackoverflow.com/comment/38179060
has body: Created a Fiddle for you: http://jsfiddle.net/e4mQD/1/ HTML: Any status▾ Option1 Option2 Any date▾ OptionA OptionB CSS: #filter, .options { list-style-type: none; } .options { display:none; } .options li { cursor: pointer; } JavaScript: $('#filter li').click(function(){ $(this).find('.options').toggle(); });
has comment: http://stackoverflow.com/comment/38179296
has comment: http://stackoverflow.com/comment/38178647
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/24632990
downvote count: 0
has comment: http://stackoverflow.com/comment/38178454
type: Answer

http://stackoverflow.com/comment/39291659
score: 0
type: AnswerComment
has text: This seems to work great on your demo, but I can't get it to work for the life of me. Here's a link to my test site with your code: http://www.monumentalmarketingllc.com/storetest/
type: Comment
comment on: http://stackoverflow.com/a/24708016

http://stackoverflow.com/a/24663339
type: Answer
downvote count: 0
has body: the first line: # if( #:AllTemplateID# == @(ViewBag.BigTemplateID) ) { First, there is no ending '#' at the end of the line. Second, you don't need to put hashes around variables #:AllTemplateID# if they are already in javascript portions of the template. Try: # if( AllTemplateID == @(ViewBag.BigTemplateID) ) { # -or- # if( data.AllTemplateID == @(ViewBag.BigTemplateID) ) { #
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24662960
accepted answer of: http://stackoverflow.com/q/24662960

http://stackoverflow.com/q/24593077
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38126806
type: Question
has answer: http://stackoverflow.com/a/24611770
accepted answer: http://stackoverflow.com/a/24611770
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/38126910
has body: I have a workable tooltip system set-up with my normal graphing options (not using dashes) by using the plothover event, but the plot is not hoverable when I switch to my "black and white" mode (using dashes). Is there any way to keep the graph hoverable and clickable when using dashes? Or a way to make a decent looking plot in black and white without dashes? Example series: {data: data, dashes:{show: true, dashLength: 2}, color: "black", label: "Series 1"} My current graphing options: options = { yaxis: {max: maxValue, min: minValue}, grid: {hoverable: true, clickable: true}, legend: {show: false}, xaxis: {tickFormatter: null} }; I use plothover event for tooltips like this: $(this).bind("plotclick", function (event, pos, item){ //tooltip code here }
has title: Does jquery.flot.dashes.js support plothover and plotclick?
score: 5
has comment: http://stackoverflow.com/comment/38127211
tagged with: flot
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: hover

http://stackoverflow.com/comment/38346574
type: Comment
type: QuestionComment
has text: good idea :-) http://jsfiddle.net/q2zJJ/1/
score: 0
comment on: http://stackoverflow.com/q/24722370

http://stackoverflow.com/comment/38283798
comment on: http://stackoverflow.com/q/24689568
score: 0
has text: ... and what have you tried so far?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24629370
score: 9
has body: I am using AngularJS in my project and I don't want to include jQuery. I want to perform jQuery equivalent of this in AngularJS $('.someclass').trigger('create'); I searched in internet but couldn't find one.
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24630582
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/24630582
has title: jQuery trigger equivalent in AngularJS
type: Question
type: AnsweredQuestion
upvote count: 9
tagged with: javascript

http://stackoverflow.com/q/24594149
upvote count: 0
answer count: 1
tagged with: meteor
has title: Meteor Simple schema validator in Mongoose
favorite count: 0
has answer: http://stackoverflow.com/a/24599133
score: -1
has body: I have a background process which updates some data in Meteor, and is quite DB intensive. I've come to the conclusion that for data which doesn't need to be reactive, I'm better off bypassing Meteor and updating the data directly, as the synchronous nature of it's DB access appears to be creating load within the Meteor process which i'd rather not have. To do this, I am using Mongoose, which appears to work very well, in that there is next to no load when using Mongoose, but when using Meteor CPU is very high. The validators are a little different however if I avoid RegEx validators I am fine. The issue I am having with this approach is exporting the Meteor simple schema validators for use in Mongoose. I have created the schema object in /lib/schema.js, which works fine for Meteor. When I try to export the object using module.exports for using in Mongoose, I get a module is not defined error. If I attempt to import module using: var module = Meteor.require('module'); schemaObject = { prop1: { type: String, label: "Property 1", max: 24 }, prop2: { type: Number, label: "Another property", max: 9999 }, } module.exports.schemaObject = schemaObject; I get a Cannot set property 'schemaObject' of undefined error. Any ideas on how to get around this issue?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/51949244
tagged with: node.js
downvote count: 1
type: Question
tagged with: mongoose
tagged with: javascript

http://stackoverflow.com/comment/38160738
comment on: http://stackoverflow.com/q/24623705
score: 1
has text: Use Safari's Developer menu to access the console and see if the device's browser is throwing any warnings or errors.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38129419
type: QuestionComment
has text: when did a console.log(data) it shows the pop up banner code, but it doesn't render the pop up code in IE 7/8
score: 0
comment on: http://stackoverflow.com/q/24604364
type: Comment

http://stackoverflow.com/comment/38298536
comment on: http://stackoverflow.com/a/24696315
has text: Here is the plunk - http://plnkr.co/edit/cWJkz2GjAjNE3JcgakGq?p=preview , its not my actual code, just a demo kind of. I havent included the parameter windowTemplateUrl, as i dont know how to use it. The content in customModal.html should appear instead of the custom modal content. Please let me know how to do that. Thank you.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38281274
type: QuestionComment
has text: @DustinScott yes you can have multiple classes just make sure you put spaces between them just as Senju described
score: 0
comment on: http://stackoverflow.com/q/24688145
type: Comment

http://stackoverflow.com/q/24712009
has answer: http://stackoverflow.com/a/24712165
type: Question
has comment: http://stackoverflow.com/comment/38326647
has comment: http://stackoverflow.com/comment/38326607
tagged with: regex
has body: I'm not quite sure how to explain this in short, so the title might be a tad confusing... I have this piece of javascript code string: (which is stripped clean from line-breaks, double white spaces, etc.): function (a, b) { this.super('__construct', a, b); return { foo: this.test, bar: this.ParentFunctionAdd }; } I'm trying to figure out how to get an array of keys/values from the return statement of this function. Executing the code or using eval isn't an option. So essentially, I want to match anything between the curly-braces of the return statement and get a key/value array in return. The desired result would be the following: { 'foo' : 'this.test', 'bar' : 'this.ParentFunctionAdd' } Thanks in advance!!
has comment: http://stackoverflow.com/comment/38326502
score: 0
has title: Using regex to find key/values from a javascript function return statement
accepted answer: http://stackoverflow.com/a/24712165
answer count: 1
has comment: http://stackoverflow.com/comment/38326645
has comment: http://stackoverflow.com/comment/38326576
has comment: http://stackoverflow.com/comment/38326573
has comment: http://stackoverflow.com/comment/38326552
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/q/24622504
tagged with: javascript
has answer: http://stackoverflow.com/a/24631104
upvote count: 2
accepted answer: http://stackoverflow.com/a/24631104
answer count: 1
has comment: http://stackoverflow.com/comment/38159557
favorite count: 0
tagged with: d3.js
type: AnsweredQuestion
score: 2
downvote count: 0
has body: Link to Plunkr What I have is two years of data and I want to plot a moving bubble chart The problem I am getting is the label does not update after the transition and it seems that there are some mismatches happening Not sure how to fix it, thanks.
type: Question
has comment: http://stackoverflow.com/comment/38166510
has title: Text label and color changes after transition

http://stackoverflow.com/a/53298040
has comment: http://stackoverflow.com/comment/93477186
has body: Your JSP looks like this &lt;input type="radio" id="aa" name="Options" value="val1"&gt;radio 1 &lt;input type="radio" id="bb" name="Options" value="val2"&gt; radio 2 &lt;input type="radio" id="cc" name="Options" value="val3"&gt; radio 3 jQuery $(function() { $("input[type=\"radio\"]").click(function(){ var thisElem = $(this); var value = thisElem.val(); alert('value'+value); localStorage.setItem("option", value); }); var itemValue = localStorage.getItem("option"); if (itemValue !== null) { $("input[value=\""+itemValue+"\"]").click(); } }); On load of page radio button will not reset as your using local storage to retrieve. This will solve the issue
answers question: http://stackoverflow.com/q/24697272
type: Answer
score: 0

http://stackoverflow.com/comment/38193925
type: QuestionComment
has text: Java and JavaScript are two very different technologies despite the similar names. This looks to be JavaScript.
comment on: http://stackoverflow.com/q/24641420
score: 0
type: Comment

http://stackoverflow.com/a/27666054
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24728512
has body: The only solution I came up with is to register the same event listener on the use element. After that it works in Firefox, but not anymore in IE, Safari and Chrome, because the event gets fired twice. Therefore you have to de-register the event of the copied SVG element. It is a workaround, but no good solution. I hope someone else can give a better answer for that.

http://stackoverflow.com/comment/38149753
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24616274
has text: Thanks Florian! The first two examples are trivial, but the last one leaves me scratching my head a bit. Gotta dig into this!

http://stackoverflow.com/a/24668815
answers question: http://stackoverflow.com/q/24659861
type: Answer
has body: As mentioned in the comments: Running the $.inArray w/o .outerHTML will result in a correct assessment of the array. .outerHTML is a String type of JS property. "The outerHTML attribute of the element DOM interface gets the serialized HTML fragment describing the element including its descendants. It can be set to replace the element with nodes parsed from the given string." see - https://developer.mozilla.org/en-US/docs/Web/API/element.outerHTML function currentImageKey(i) { currentMedia = $(".media").children()[0] i = $.inArray(currentMedia, media) return i; }; currentImageKey(); This will return the correct value with which to compare to the array.
score: 0

http://stackoverflow.com/a/24734303
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38371163
has body: It's described in the Common templates use cases doc , section : 'moreScripts and moreStyles equivalents' In very short it works like this (view) @moreScripts = { } @moreStyles = { } @main("Title", moreScripts, moreStyles){ Html content here ... } and in main.scala.html start with: @(title: String, moreScripts: Html = Html(""), moreStyles: Html = Html(""))(content: Html) @title @moreStyles @moreScripts @content
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24729809
answers question: http://stackoverflow.com/q/24729809
type: AcceptedAnswer

http://stackoverflow.com/q/24713445
downvote count: 1
type: Question
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/24223329
answer count: 2
upvote count: 0
possible better answer: http://stackoverflow.com/a/24719663
has title: Something should be wrong with applying of "getter" methods in model-builder.js
favorite count: 0
has answer: http://stackoverflow.com/a/24719663
tagged with: loopbackjs
has body: I am trying to set-up some basic scenarios and use LoopBack to find out its actual level of flexibility and usability. One of them is the necessity to modify the value of some attributes in resulted JSON objetcs during processing the source data from a db (e.g. MySQL). I am using the following versions: strong-cli v2.5.5 (node v0.10.29) node-inspector v0.7.4 strong-build v0.1.0 strong-cluster-control v0.4.0 strong-registry v1.1.0 strong-supervisor v0.2.3 (strong-agent v0.4.9, strong-cluster-control v0.4.0) loopback-datasource-juggler v1.6.2 loopback-connector-mysql v1.4.1 I tried everything but it looks that "getter" method is applied by the way I don't understand or there is a bug. To describe the problem I used a simple table "city" (in MySQL db): CREATE TABLE `city` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `countryId` bigint(20) NOT NULL, `name` varchar(100) NOT NULL, `comment` varchar(255) DEFAULT NULL, `enabled` char(1) NOT NULL DEFAULT 'Y', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`) ) and filled some simple data. To define the model in LoopBack I used the file "city.js" located in "models" directory: "use strict"; var loopback = require('loopback'); var app = require('../app.js'); var properties = { id: {type: "number", id: true}, countryId: {type: "number"}, name: {type: "string"}, comment: {type: "string"}, enabled: {type: "string"} }; var options = { acls: [ { accessType: "*", permission: "ALLOW", principalType: "ROLE", principalId: "$everyone" } ] }; var City = app.model("city", { properties: properties, options: options, public: true, dataSource: "mysql", plural: "cities" }); City.getter["enabled"] = function(v) { console.log("Getter is called: ", v); return 'Q' }; As you can see the "getter" method is defined on "city" model using "City" object. When I try to run LoopBack and then send a request through StrongLoop API Explorer: http://localhost:3000/api/cities/1 the console looks like (icluding info for DEBUG=loopback:connector:*): supervisor ru…
tagged with: strongloop
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25441739
accepted answer: http://stackoverflow.com/a/25441739

http://stackoverflow.com/q/24612609
has comment: http://stackoverflow.com/comment/38432847
has answer: http://stackoverflow.com/a/24713681
has body: I have a site that is using the aspdotnetstorefront platform, although this should pertain to any C# site. There is a custom control in a dll named Account. This has several elements including text boxes for customers to enter name, phone number etc. I have checked the source code with DotPeek and verified I am using the correct naming conventions. I am attempting to use the javascript onChange event to copy the first name, last name and phone number to lower boxes when a check box (account information same as billing) is checked. So that if customers select that the information is the same it will be automatically copied as they move from one box to the next. The odd thing is, this works with some of the text boxes but not others. To make things simple I have removed the JS that copies the contents and replaced it with a pop up box for testing. This works, when I change the text I get a "Hello World" pop up box: ctrlAccount.txtFirstName.Attributes.Add("onchange", "alert('hello,world')"); But this does not: ctrlAccount.txtPhone.Attributes.Add("onchange", "alert('hello,world')"); The error I get is: CS1061: 'AspDotNetStorefrontControls.Account' does not contain a definition for 'txtPhone' and no extension method 'txtPhone' accepting a first argument of type 'AspDotNetStorefrontControls.Account' could be found So it looks like the compiler cannot recognize the phone text box. When I look at the rendered page code (When the error has been removed of course) the box is there and the ID is correct. Reading the source code with DotPeek I see: public Account() { this._txtFirstName = new TextBox(); this._txtLastName = new TextBox(); this._txtEmail = new TextBox(); this._txtPassword = new TextBox(); this._txtPasswordConfirm = new TextBox(); this._txtPhone = new TextBox(); } private void AssignClientReferenceID() { this._txtFirstName.ID = "txtFirstName"; this._txtLastName.ID = "txtLastName"; this._txtEmail.ID = "txtEmail"; this._txtPassword.ID = "txtPassword"; this._txtPasswo…
has answer: http://stackoverflow.com/a/24735489
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38472238
answer count: 4
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/38324813
has answer: http://stackoverflow.com/a/24729880
has comment: http://stackoverflow.com/comment/38463771
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/38367802
tagged with: aspdotnetstorefront
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24612976
has title: Some elements of control not recognized by C# compiler
tagged with: asp.net
favorite count: 0

http://stackoverflow.com/q/24745454
tagged with: case
has body: When using the JSfiddle interpreter, the button and input field appear in the 'result' box, however there doesn't seem to be any response to the script. I tried other interpreters, such as that of the W3School, and while it does give me an indication that the function is in fact being called, the result seems to only be the default case, and even that only appears for a fraction of a second before the entire field along with the button and input disappear (Worth noting the text I input does not appear in the paragraph, and 'fruitT' seems to be ignored -- so most likely there is an issue with the passing of info between the input field, the button and the function.) The logic seems pretty straightforward to me and I've looked at other examples -- however I am new to JS so I've potentially overlooked some syntax. Hoping somebody could give me a push in the right direction. Thanks! Enter
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24745535
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24745530
has answer: http://stackoverflow.com/a/24745535
has answer: http://stackoverflow.com/a/24745530
type: AnsweredQuestion
has title: Why isn't my Javascript Switch Case working?
tagged with: switch-statement
has comment: http://stackoverflow.com/comment/38390297
type: Question

http://stackoverflow.com/comment/133671879
comment on: http://stackoverflow.com/a/56391657
score: 0
type: Comment
has text: scrollTo does not work for React at the moment. Or at least I have not been able to get it to work as intended.
type: AnswerComment

http://stackoverflow.com/comment/38319685
type: QuestionComment
has text: @elclanrs actually you can see it's not working, because the `console.log()` line isn't outputting anything...(try removing it and adding it back in...)
score: 0
comment on: http://stackoverflow.com/q/24708413
type: Comment

http://stackoverflow.com/q/24626382
score: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24626969
has title: How can I make my header fade out/disappear on scroll down and reappear on scroll up?
has answer: http://stackoverflow.com/a/24626969
type: Question
has answer: http://stackoverflow.com/a/24627294
has body: I've already looked around for quite a bit and stumbled upon some tutorials, and so far, I've achieved not so much. What I'm trying to do is make the top header of my website disappear when the user scrolls down and reappear when they scroll to the top of the page. My code so far: Plumbing and Remodelling Services. About Forums Renovations? Plumbing? Stories? Pricing Contact The CSS: header { margin:0px auto; text-align:center; position:fixed; width: 100%; top:0; z-index:999; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); float:left; background: #34373d; transition: top 0.2s ease-in-out; } .nav-up { top: -40px; } When I scroll down, both the headers are just fixed and don't do what I'm saying (of course I haven't told the second header to do anything, I'll implement that once I've gotten the first one to function) Can anyone tell me what I'm doing wrong and how I can resolve this issue?
has answer: http://stackoverflow.com/a/24627209
tagged with: javascript
linked to: http://stackoverflow.com/q/24602201
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/24627209

http://stackoverflow.com/a/24670997
has comment: http://stackoverflow.com/comment/38248686
has body: The best JavaScript is no JavaScript. &lt;input type="number" min="0" max="10" /&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/38248988
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38248957
answers question: http://stackoverflow.com/q/24670947
has comment: http://stackoverflow.com/comment/38248834
has comment: http://stackoverflow.com/comment/38249043
has comment: http://stackoverflow.com/comment/38248936

http://stackoverflow.com/a/24615063
has comment: http://stackoverflow.com/comment/38162585
score: 12
accepted answer of: http://stackoverflow.com/q/24604931
type: Answer
answers question: http://stackoverflow.com/q/24604931
has body: Okay so under the assumption you are using the Angular UI router, I believe you are just translating the error handler incorrectly from the official one. From the docs for $state: Fired when an error occurs during transition. It's important to note that if you have any errors in your resolve functions (javascript errors, non-existent services, etc) they will not throw traditionally. You must listen for this $stateChangeError event to catch ALL errors. And the parameters for this handler are different, try something like this: $rootScope.$on("$stateChangeError", function(event, toState, toParams, fromState, fromParams, error) { if (error &amp;&amp; !error.authenticated) { $location.path("/login"); } }); Here's a description of the parameters with the important one bolded: event – {Object} – Event object. toState – {State} – The state being transitioned to. toParams – {Object} – The params supplied to the toState. fromState – {State} – The current state, pre-transition. fromParams – {Object} – The params supplied to the fromState. error – {Error} – The resolve error object.
has comment: http://stackoverflow.com/comment/38162548
has comment: http://stackoverflow.com/comment/38162699
upvote count: 12
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24640331
type: Question
has body: I'm trying to create a form with multiple fields with Copy to Clipboard function. This is for intranet in my company and it will work on older version of IE. I have the code for one form element. I want to have multiple form elements. My code example: Copy text to clipboard Show text data in clipboard Clear text data from clipboard What I want is to have multiple fields, for example: - text field 1 - text field 2 - text field 3 Below that would be a copy to clipboard button. I don't have required knowledge to do with multiple form elements so any help would be appreciated :) And also if there is a way when my text is copied co clipboard it would be shown like this (with some lines ----): |Text field 1 | Text entered in form field |Text field 2 | Text inserted in clipboard area |Text field 3 | Text inserted in clipboard area Thanks a lot.
tagged with: javascript
tagged with: jquery
has title: Copy to clipboard function
score: 0
has comment: http://stackoverflow.com/comment/38219483
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38220501
tagged with: forms

http://stackoverflow.com/q/24625537
tagged with: android
type: AnsweredQuestion
has title: Seems That addJavascriptInterface not work for me when create the container again
tagged with: java
tagged with: webview
type: Question
has answer: http://stackoverflow.com/a/24629594
tagged with: javascript
has body: public class MyWebView extends Dialog { protected WebView mWebView; protected void onCreate(Bundle savedInstanceState) { mWebView.addJavascriptInterface(new JavaScriptInterface(),"js2java"); mWebView.getSettings().setJavaScriptEnabled(true); } } public class JavaScriptInterface { public void test(String response) { MyToast.showMessage(QWWebView.this.getContext(),response); } } The first time, show the dialog: new MyWebView().show(); The function "test" could be called successfully, then dismiss the MyWebView instance, then show it again: new MyWebView().show(); The function "test" could not be called.
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/24629594

http://stackoverflow.com/a/24744195
answers question: http://stackoverflow.com/q/24744125
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/24744125
has body: import SimpleHTTPServer import SocketServer PORT = 8000 Handler = SimpleHTTPServer.SimpleHTTPRequestHandler httpd = SocketServer.TCPServer(("", PORT), Handler) print "serving at port", PORT httpd.serve_forever() see https://docs.python.org/2/library/simplehttpserver.html

http://stackoverflow.com/q/24748263
answer count: 0
upvote count: 2
type: Question
tagged with: javascript
has title: Hammer swipe event not working ios/chrome
downvote count: 0
favorite count: 0
tagged with: hammer.js
tagged with: angularjs
type: UnansweredQuestion
has body: Ok well, I just implemented a scroller with hammer inside an angular directive, I need a div to be scrollable by page (some sort of carrousel) so I wen't with hammer.js everything works just great in desktop and android (any device) but I'm having issues with chrome on iOS and I'm not sure why is that happening, I can see hammer.js examples and they work on iPad as well so I'm sure I'm probably doing something wrong, so here is my html. Rails Ruby on Rails Ringer T-Shirt $19.99 Apache Apache Baseball Jersey $19.99 Spree Spree Baseball Jersey $19.99 this markup is for a horizontal list, so I have a container with a fixed width, then another container inside with a huge width so it'll be scrollable and then each individual element inside, I don't wan't the user to use the horizontal scrollbar, instead I wan't to show 'pages' of items every time the user swipes(mobile) or clicks a button(desktop), so then according to hammer documentation, the usage would be var content = document.getElementsByClassName('slidebox')[0]; var hammer = Hammer(content, { touchAction: 'pan-y' }); hammer.on('swipeleft', function(){ alert('swipe left'); }); hammer.on('swiperight', function(){ alert('swipe right'); }); This just works great on both desktop and chrome/android, but not on iPad, I don't know if maybe the event is being captured by children elements or something, I've been dealing with this for a while with no luck, any help appreciated.
score: 2

http://stackoverflow.com/q/24689181
has body: Is this code doing what I think that it is supposed to do. Does this shift the index i one position to the right. 0011 would be come 0001 &lt;-- because the sign bit is copied to the new position. I know that it is different than &gt;&gt;&gt; which moves zeroes in the closest position. binarray[i&gt;&gt;2] Code Here: str += hex_tab.charAt((binarray[i&gt;&gt;2] &gt;&gt; ((i%4)*8+4)) &amp; 0xF) + hex_tab.charAt((binarray[i&gt;&gt;2] &gt;&gt; ((i%4)*8 )) &amp; 0xF); I have been looking at this all day and I just cannot see it any more!!! More Code: lX8 = (lX &amp; 0x80000000); If I see something like the above that means that the &amp; is comparing each bit in the two number or variables and in this case 0x8000000 in this case what is the value really of 0x8000000 in binary format. lResult = (lX &amp; 0x3FFFFFFF) + (lY &amp; 0x3FFFFFFF); This code ass well adds the bits together but is 0x3FFFFFFF (what is this value translated to in binary?) h1 = bits &gt;&gt; 18 &amp; 0x3f; this from above would show that bits is shifted right by 18 &amp; 0x3f which the 0x3f is HEX so and I would imagine that 18 is decimal. Question: Is this all converted to binary and then used first?
upvote count: 1
type: Question
has title: Is my array index being shifted to the correct position to the right or left?
tagged with: javascript
has answer: http://stackoverflow.com/a/24689234
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/24689234
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/120890781
has text: Is this for Angular or Angular JS ? What is done in Angular pls ?
comment on: http://stackoverflow.com/a/41972620
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24629767
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38178453
favorite count: 0
has comment: http://stackoverflow.com/comment/38178300
has comment: http://stackoverflow.com/comment/38178699
tagged with: kendo-asp.net-mvc
has answer: http://stackoverflow.com/a/24633547
has comment: http://stackoverflow.com/comment/38178366
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/38178589
type: Question
possible better answer: http://stackoverflow.com/a/24633689
has title: Kendo grid - error when calling javascript function: "javascript runtime error: 'funcName' is undefined"
tagged with: kendo-grid
has comment: http://stackoverflow.com/comment/38178178
has answer: http://stackoverflow.com/a/24633689
has comment: http://stackoverflow.com/comment/38177642
accepted answer: http://stackoverflow.com/a/24633547
tagged with: javascript
has comment: http://stackoverflow.com/comment/38174394
has body: I've got a Kendo grid and I'm trying to test a javascript function call after selecting a row. &lt;div id="datagrid"&gt; @(Html.Kendo().Grid(Model) .Name("datagrid_Concessoes") .Columns(columns =&gt; { columns.Bound(c =&gt; c.Id).Width(70); columns.Bound(c =&gt; c.Code).Title("Código"); columns.Bound(c =&gt; c.Description).Title("Descrição"); columns.Bound(c =&gt; c.CreationDate).Title("Data de Criação"); columns.Bound(c =&gt; c.CreationUser).Title("Criado por"); }) .HtmlAttributes(new { style = "height: 534px;" }) .Scrollable() .Sortable() .Selectable() .Events(e =&gt; e.Change("test")) .Pageable(pageable =&gt; pageable .Refresh(true) .ButtonCount(5)) .DataSource(dataSource =&gt; dataSource .Ajax() .PageSize(15) .Read(read =&gt; read.Action("GetConcessoes", "MasterData")) ) ) &lt;/div&gt; and the javascript: function test() { alert("test"); } I get a javascript runtime error: 'test' is undefined as soon as the grid is about to be displayed. I tried the lines: .Events(e =&gt; e.Change("test")) .Events(e =&gt; e.Change("test()")) but without luck
answer count: 2

django-forms
tags question: http://stackoverflow.com/q/24594791
tag name: django-forms
type: Tag

http://stackoverflow.com/comment/38161727
comment on: http://stackoverflow.com/q/24618815
type: Comment
type: QuestionComment
has text: Please explain clearly what you want, and create a reference fiddle !
score: 0

http://stackoverflow.com/comment/38242131
comment on: http://stackoverflow.com/a/24666942
score: 0
type: AnswerComment
type: Comment
has text: Yes, but global vars will always have a reference since they're really window.someVar

http://stackoverflow.com/comment/38390181
type: Comment
type: QuestionComment
has text: So, looking at the jsBin, you see the four sets of 6 radio buttons. On the last set, the fourth radio button is selected. Why isn't the fourth radio button selected in all four sets of radio buttons?
score: 0
comment on: http://stackoverflow.com/q/24745411

http://stackoverflow.com/q/24606043
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Caching an entire website to speed page load?
has answer: http://stackoverflow.com/a/24606129
type: UnansweredQuestion
has body: Hi I have a website consisting of multiple pages. Is it possible to load all the pages to cache when the user enters only the first page? So going to www.mydomain.com will preload to cache www.mydomain.com/page1, www.mydomain.com/page2, www.mydomain.com/page3, www.mydomain.com/page4, So when the user does click on say page 3 it should load instantly?
tagged with: caching
type: Question
has comment: http://stackoverflow.com/comment/38126205
tagged with: javascript
score: 0

http://stackoverflow.com/comment/38334285
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24716145
has text: https://github.com/chandlerprall/ThreeCSG - http://evanw.github.io/csg.js/

http://stackoverflow.com/comment/38150964
has text: @Fosco I have updated my question is this right?
comment on: http://stackoverflow.com/q/24617006
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/24702559
has body: eval is evil!! Don't use it! window[targ].location = selObj.options[selObj.selectedIndex].getAttribute('value');
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24702497
has comment: http://stackoverflow.com/comment/38307802
score: 3
has comment: http://stackoverflow.com/comment/38307800
answers question: http://stackoverflow.com/q/24702497
type: Answer
has comment: http://stackoverflow.com/comment/38308065
has comment: http://stackoverflow.com/comment/38308426
has comment: http://stackoverflow.com/comment/38310118
upvote count: 3
has comment: http://stackoverflow.com/comment/38374779

http://stackoverflow.com/a/24617956
has comment: http://stackoverflow.com/comment/38149636
score: 0
has body: I've found (in past when working with device orientation, not sure if this has changed) that one of the axis values on android are inverted from the iOS values. I had to create a wrapper method for deviceorientation that would invert android and apply some obscure multiplier to get the values to be comparable, but the sensitivity between android phones will vary so you will have to settle for finding some acceptable middle ground.
answers question: http://stackoverflow.com/q/24617710
type: Answer

http://stackoverflow.com/comment/38306735
comment on: http://stackoverflow.com/a/24701776
type: AnswerComment
has text: @SamanthaJ then research those things? I'm just saying file "including" is not the issue.
score: 1
type: Comment

http://stackoverflow.com/comment/38507163
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24725270
type: AnswerComment
has text: I can't do anything with internal server error. That means the website you're opening in the iframe, has internal server error. It's your local webpage then you've fix it. My code can only fix the iframe height issue.

http://stackoverflow.com/q/24600409
tagged with: jquery
has title: javascript function overridden by post back in asp.net
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38689442
tagged with: asp.net
favorite count: 0
tagged with: gridview
has body: I have a nested grid view which has been implemented by following javascript: $("[src*=plus]").live("click", function () { $(this).closest("tr").after(" " + $(this).next().html() + " ") $(this).attr("src", "images/minus.png"); }); $("[src*=minus]").live("click", function () { $(this).attr("src", "images/plus.png"); $(this).closest("tr").next().remove(); }); and following way of gridview definition: <asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="false" CssClass="Grid" DataKeyNames="CustomerID" OnRowDataBound="OnRowDataBound"> <asp:TemplateField> <asp:Panel ID="pnlOrders" runat="server" Style="display: none"> <asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="false" CssClass = "ChildGrid"> <asp:BoundField ItemStyle-Width="150px" DataField="OrderId" HeaderText="Order Id" /> <asp:BoundField ItemStyle-Width="150px" DataField="OrderDate" HeaderText="Date" /> </asp:GridView> </asp:Panel> </asp:TemplateField> <asp:BoundField ItemStyle-Width="150px" DataField="ContactName" HeaderText="Contact Name" /> <asp:BoundField ItemStyle-Width="150px" DataField="City" HeaderText="City" /> </asp:GridView> For getting the data for child gridview I need the text of selected row in parent gridview, on server side. And even further processing requires text data of selected rows of both the gridviews. For this I tried to get the text in OnSelectedIndexChanged function BUT that being a post back request, collapses the expanded row(i.e. resets it). Is there a solution which does not require javascript and creates the nested gridview directly from the server side? Or any other solution in which I can get the data server side but still keep the expanded row as expanded only.
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/24601873
upvote count: 1
type: Question
tagged with: c#
tagged with: javascript

http://stackoverflow.com/comment/38324126
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24710665
type: AnswerComment
has text: ok thank you all of you for your suggestions

uploadify
tags question: http://stackoverflow.com/q/24736318
tag name: uploadify
type: Tag

http://stackoverflow.com/comment/38373521
has text: You changed the array. This won't work with the array he provided.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24736388

http://stackoverflow.com/comment/38394984
type: Comment
type: QuestionComment
has text: Sure, do you use jquery ?
comment on: http://stackoverflow.com/q/24747965
score: 0

http://stackoverflow.com/a/24706248
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/38315527
answers question: http://stackoverflow.com/q/24706203
has comment: http://stackoverflow.com/comment/38315214
type: Answer
has comment: http://stackoverflow.com/comment/38315502
has comment: http://stackoverflow.com/comment/38315285
upvote count: 5
has comment: http://stackoverflow.com/comment/38315686
has body: Use JSON.parse after having transformed your single quotes to double quotes for getting valid JSON: var jsonString = fs.readFileSync(__dirname + '/apps/SpectrumApp/package.json').replace(/\'/g, "\"") var json = JSON.parse(jsonString); Alternatively, you can require the file and import it as JSON directly, if your file already contains valid JSON. This method is primarily intended for configuration usage: var json = require(__dirname + '/apps/SpectrumApp/package.json');

http://stackoverflow.com/comment/38126930
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24605591
has text: function querySucceeded(data) { sensors = data.results; log("Retrieved Sensors from server", sensors.length, true); return sensors; };
score: 0

http://stackoverflow.com/comment/38154830
type: QuestionComment
comment on: http://stackoverflow.com/q/24620481
has text: It's the other way round. `WATER` is a constant that means `0`, and only this value is what the `switch` statement cares about.
score: 1
type: Comment

http://stackoverflow.com/comment/38152205
type: Comment
type: QuestionComment
has text: ...and no one is taking away your "rights". You still have the right to vote. However I'd have a hard time believing that the downvote title could be convincingly applied to this question.
score: 0
comment on: http://stackoverflow.com/q/24618719

http://stackoverflow.com/q/24682288
type: Question
has comment: http://stackoverflow.com/comment/38270032
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/24684018
tagged with: javascript
has answer: http://stackoverflow.com/a/24682969
tagged with: search
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24682969
has comment: http://stackoverflow.com/comment/38273412
tagged with: jquery
has title: Searching JSON resultset using keywords and return only matches
linked to: http://stackoverflow.com/q/4992383
accepted answer: http://stackoverflow.com/a/24684018
has comment: http://stackoverflow.com/comment/38271093
type: AnsweredQuestion
has body: I am trying to search the below Yodlee JSON datafeed for example if keyword is "furniture" then only display "plainTextDescription" which equals to "furniture transactions" Not quite sure how to grep through nested JSON resultsets using JQuery... ///RAW YODLEE JSON RESULTSET http://pastebin.com/6498mZJf Thanks in advance!
tagged with: yodlee

http://stackoverflow.com/comment/92601309
comment on: http://stackoverflow.com/a/52553884
score: 0
type: AnswerComment
has text: Very clean and simple. Worked perfect on my Bootstrap 4 page without any modification.
type: Comment

http://stackoverflow.com/comment/38343150
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24720559
has text: I guess you could do this using some scriping. I've added javascript for you.

http://stackoverflow.com/comment/38292434
score: 0
type: Comment
has text: Thx...But i am now getting ReferenceError: invalid assignment left-hand side ....for ? data-model-id=' + fieldAttr.dataModelId + ' : '' ))==...
comment on: http://stackoverflow.com/a/24694555
type: AnswerComment

http://stackoverflow.com/a/24641913
downvote count: 0
score: 1
has body: \n is newline by calling \\ you are escaping \ therefore asking browser to print \n not line break
upvote count: 1
answers question: http://stackoverflow.com/q/24641852
type: Answer

http://stackoverflow.com/a/24667063
upvote count: 1
score: 1
has body: I assume maybe they were asking how could you save the previous value and get it later on? In this case, you could simply use a JavaScript array as a stack (push, pop), to save the value as many values as you want, and retrieve them later on in reverse order. Otherwise, it was just a silly trick question.
downvote count: 0
answers question: http://stackoverflow.com/q/24667005
type: Answer

http://stackoverflow.com/comment/38395800
score: 0
has text: You may get the content but you can't access or change it. Would you share that error?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24748345

http://stackoverflow.com/comment/38207220
has text: I am using something like this $('html,body').animate({ scrollTop: $("#" + element).position().top - $('#topContainer').height() + 'px' }, 'slow'); where #topContainer is the name of fixed div but this is not working. In fact, when I write this the page doesn't scrolls at all :( P.S. I can't use offset() as it fails in IE8 so I am using position.
type: AnswerComment
comment on: http://stackoverflow.com/a/24647163
type: Comment
score: 0

http://stackoverflow.com/comment/38220390
comment on: http://stackoverflow.com/a/24655041
has text: Ah, I see what you mean. Well, yes, I thought I build a full index right-away.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24719316
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24719304
answers question: http://stackoverflow.com/q/24719304
score: 2
type: AcceptedAnswer
downvote count: 0
has body: This line var new_value = system.defaults.xyz declares a local variable inside the the each callback. The variable doesn't have a value until this line is executed, that's why you get undefined. If you don't want to declare a new variable, but rather reference the new_value variable from the outer function, drop the var keyword. Learn more about hoisting.

http://stackoverflow.com/comment/45965983
comment on: http://stackoverflow.com/q/24732236
score: 0
has text: @SamuliKärkkäinen I guess this question still isn't answered, [this](https://github.com/cozawariat/fsoJS) seems to be the source that used to be on that page, I haven't done a serious search of other possibilities but hopefully this helps!
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24732989
upvote count: 1
type: Answer
has body: You are not supposed to use $.ajax in angular you need to use $http request for example, this is ho you should use post: $http({ url: "http://example.com", method: "POST", data: {"a":"b"} }).success(function(data, status, headers, config) { $scope.data = data; }).error(function(data, status, headers, config) { $scope.status = status; }); please see more at : https://docs.angularjs.org/api/ng/service/$http
answers question: http://stackoverflow.com/q/24732870
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38367929

http://stackoverflow.com/comment/38128476
has text: The submit event will not happen if any of the fields invalid.
score: 1
comment on: http://stackoverflow.com/q/24607375
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24658489
accepted answer: http://stackoverflow.com/a/24659835
tagged with: javascript
has comment: http://stackoverflow.com/comment/38227517
has comment: http://stackoverflow.com/comment/38225990
has body: Using a jQuery Mobile button like: Test I am attaching a tap handler like this: $('#test').on('tap', function(event) { event.preventDefault(); window.console.log('do something useful here'); }); The problem is that either preventDefault is blocking the JQM css changes to buttons like ui-btn-down/active/up/etc. or just adding the tap handler at all is preventing them. So it doesn't quite feel right to the user cause there is no visual impact of clicking the button. Is there anyway around this problem? Perhaps manually assigning the classes in each handler - though that seems heavy handed.
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24658982
has answer: http://stackoverflow.com/a/24658982
has title: How to handle tap events without blocking UI visualization changes in a listview
tagged with: jquery
tagged with: css
has answer: http://stackoverflow.com/a/24659835
type: AnsweredQuestion
type: Question
tagged with: jquery-mobile
tagged with: ios

http://stackoverflow.com/q/24702448
tagged with: jquery-ui-sortable
tagged with: internet-explorer-8
tagged with: javascript
has comment: http://stackoverflow.com/comment/38312403
score: 0
has body: In some corporate web application, I have some troubles with the :hover css selector with IE 8 users. Basically, I have a lot of javascript, and the page sometimes is a bit slow. Especially, my issue occurs in a sortable table (yes tables suck, but I have to live with it by now). Within each row, I have a button that performs some operation. The button have :hover css rules to make it highlighted on mouse hover. But in a specific case, the hover state remains, even if the mouse is no more on the element. You can see the behavior on jsfiddle (run embbeded version with IE8): http://jsfiddle.net/stevebeauge/K9EGv/24/embedded/result/ To reproduce the problem: Start draging an element by clicking on the "hover" button. very quickly, drop the item (even if the drag is not visually started) elsewhere in the list still very quickly, move your mouse out of the table The whole operation must be done under 1.5 second. With this scenario, the initial dragged item is in the hover state, even if the mouse is no more on the button. Is there a way to "force" refresh of the hover state?
has comment: http://stackoverflow.com/comment/38392395
has title: Can I force the "hover" state to be refreshed with IE8?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38391082
type: Question

http://stackoverflow.com/comment/38251083
comment on: http://stackoverflow.com/a/24659687
score: 0
type: AnswerComment
type: Comment
has text: I don't know about your divs, I'm just saying to avoid problems with fixed elements you should do exactly the same as provided in this example in fullpage.js: http://alvarotrigo.com/fullPage/examples/fixedHeaders.html (you can see the sourcecode for it)

http://stackoverflow.com/a/25224086
has comment: http://stackoverflow.com/comment/39325793
type: Answer
has comment: http://stackoverflow.com/comment/39327468
has body: You could also Base64 encode the graphic and apply this loading graphic via CSS thus making subsequent usage faster and saving HTTP requests. The result of doing the Base64 encoded animated loader, is that for small common reusable assets like a loading or processing assets, it is already available and will continue to animate while performing numerous AJAX / HTTP requests, which is what you are trying to solve here. See Also: Is embedding background image data into CSS as Base64 good or bad practice? http://css-tricks.com/data-uris/ In this way, you can have the graphic loaded when the CSS is loaded. Because having Base64 encoded images in not exactly the most maintainable solution you could use a technology like SASS / Compass and use the path to an asset and then when you pre-process or compile to css it uses the path to the asset or resource and encodes it to a Base64 encoded version for you. This technique will work with all kinds of image formats etc.. Sass / Compass Base64 References: http://www.alwaystwisted.com/post.php?s=2013-11-23-sass-and-base64-images http://compass-style.org/reference/compass/helpers/inline-data/ "Embeds the contents of an image directly inside your stylesheet, eliminating the need for another HTTP request. For small images, this can be a performance benefit at the cost of a larger generated CSS file" But beware! Base64 encoding it isn't without some caveats hard to maintain and update: without some tool to help, manually editing and putting together image sprites is quite a chore increased memory consumption (possibly very dramatic): this is often overlooked. The time to deliver the images is decreased at the expense of a bigger memory and CPU footprint, especially for large sprites and sprites with a lot of whitespace. bleedthrough: for sprites that don’t have much whitespace to separate images, there’s an increased chance of nearby images visibly bleeding through other elements, as in this case where bleedthrough was only seen on iO…
upvote count: 2
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39322972
answers question: http://stackoverflow.com/q/24656805

http://stackoverflow.com/comment/38102339
comment on: http://stackoverflow.com/a/24593580
type: Comment
has text: I'm added more information. The line of code I mentioned opens the file to be edited by a js function and not by the user. I'm working in a private WAN, so I cannot implement AJAX or JQuery or anything external.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38171787
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24629629
has text: Note : map calls a provided callback function once for each element in an array. This is What i got in Google chrome debugger : [1,2,3].map( function (item) { console.log(item); //return 'something'; }) 1 VM63:4 2 VM63:4 3 VM63:4 [undefined, undefined, undefined] [1,2,3].map( function (item) { console.log(item); return 'something'; }) 1 VM66:4 2 VM66:4 3 VM66:4 ["something", "something", "something"]
score: 0

http://stackoverflow.com/comment/38278595
type: Comment
comment on: http://stackoverflow.com/a/24686578
has text: Im only returning console because I was experimenting with it. I was trying to use Math.min to segway into math functions in an example. SO far everyone has crapped the Math.max function lol SHould have said that. ALso the solution needs to be readable to a very basic or novice JavaSCript developer or student.
score: 0
type: AnswerComment

http://stackoverflow.com/a/24628740
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/38170659
has body: You don't need regex for this. You can use str.split to split the string at commas first and then for each item check if its length is greater than or equal to 5 and it contains only digits(using str.isdigit). Lastly combine all the items using str.join. &gt;&gt;&gt; s = '12345,3244,654,ffgv,87676,988ff,87657' &gt;&gt;&gt; ','.join(x if len(x) &gt;= 5 and x.isdigit() else '34567' for x in s.split(',')) '12345,34567,34567,34567,87676,34567,87657' Javascript version: function isdigit(s){ for(var i=0; i &lt;s.length; i++){ if(!(s[i] &gt;= '0' &amp;&amp; s[i] &lt;= '9')){ return false; } } return true; } arr = "12345,3244,654,ffgv,87676,988ff,87657".split(","); for(var i=0; i &lt; arr.length; i++){ if(arr[i].length &lt; 5 || ! isdigit(arr[i])) arr[i] = '34567'; } output = arr.join(",")
answers question: http://stackoverflow.com/q/24628584
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38171500

blob
tags question: http://stackoverflow.com/q/24687559
tags question: http://stackoverflow.com/q/24675534
type: Tag
tag name: blob
tags question: http://stackoverflow.com/q/24636751
tags question: http://stackoverflow.com/q/24592028

http://stackoverflow.com/comment/38337097
has text: I meant something like this: http://stackoverflow.com/questions/7902213/asp-net-mvc-razor-symbol-in-js-file
comment on: http://stackoverflow.com/q/24717467
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/24604184
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24599308
type: Answer
has body: There is a full screen slider demo. Please see the answer of How can I make JSSOR change its aspect ratio?
accepted answer of: http://stackoverflow.com/q/24599308

http://stackoverflow.com/comment/38120436
has text: have you used bodyparser in your code. like var app = express().use(express.bodyParser());
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24602874

http://stackoverflow.com/a/24728552
has body: are you looking for this code? You can access all markers data using loop..here is the sample for(var i =0; i&lt; allMarkers.length; i++) { alert(allMarkers[i].getTitle()); allMarkers[i].setMap(null); }
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/24712965
has comment: http://stackoverflow.com/comment/38361932
type: Answer

http://stackoverflow.com/q/24611225
has comment: http://stackoverflow.com/comment/38136131
possible better answer: http://stackoverflow.com/a/24611308
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24611300
has answer: http://stackoverflow.com/a/24611308
tagged with: javascript
has body: I need your help. I have the following code, in the end of this cod there exist a JavaScript code which change the display value for the div and the tables elements on click of some area of the map, but unfortunately it does not work.
type: Question
has title: changing the display value using JavaScript does not work
accepted answer: http://stackoverflow.com/a/24611300
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38136420

http://stackoverflow.com/comment/38367661
type: QuestionComment
comment on: http://stackoverflow.com/q/24673666
has text: Why you cannot use update() again on mouseover? http://jsfiddle.net/X2t9H/2/ (set correct colour)
type: Comment
score: 1

http://stackoverflow.com/comment/38367139
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24732698
has text: [Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow..](http://meta.stackexchange.com/a/208442/217110)
score: 0

http://stackoverflow.com/comment/38318410
type: Comment
comment on: http://stackoverflow.com/a/24703481
has text: @James - Yes, when I change those the total value changes as well, I just keep adding numbers and it changes eventually ?
score: 0
type: AnswerComment

http://stackoverflow.com/a/24679061
type: Answer
answers question: http://stackoverflow.com/q/24638369
has body: As i mentioned in my comment you either need to separate out your functions or you need to call the on change event which contains these functions. Try this: function someotherfunction(){ console.log("Hello"); } function somefunction(){ someotherfunction(); // your logic } $(document).on('pagecontainershow', function(){ somefunction(); }); &lt;% unless @article.errors.any? %&gt; someFunction(); &lt;% end %&gt;
score: 0

http://stackoverflow.com/comment/38218068
comment on: http://stackoverflow.com/a/24654223
type: Comment
has text: You don't have to use jQuery just to look at it's source code, LOL :D
type: AnswerComment
score: 0

http://stackoverflow.com/a/24726395
downvote count: 0
has body: Try this: JQuery: If you want to add class on click $(document).on('click', 'tr', function () { $('.active').removeClass('active'); $(this).addClass('active') }); If you want it to add class on hover $(document).on('mouseover', 'tr', function () { $('.active').removeClass('active'); $(this).addClass('active') }); CSS: .active{ color:red; } JSFiddle Demo - onClick JSFiddle Demo - Hover
accepted answer of: http://stackoverflow.com/q/24726296
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/24726296
score: 2
has comment: http://stackoverflow.com/comment/38354493
type: AcceptedAnswer

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/24610941
tags question: http://stackoverflow.com/q/24741534
tags question: http://stackoverflow.com/q/24637505
tags question: http://stackoverflow.com/q/24675336
tags question: http://stackoverflow.com/q/24726527
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/24622764
tags question: http://stackoverflow.com/q/24679879

http://stackoverflow.com/comment/38235275
has text: @DavidThomas I see - he's updated his answer, I retract my comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24663049
type: Comment

http://stackoverflow.com/q/24719829
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38341624
accepted answer: http://stackoverflow.com/a/24719866
has body: i want to get property value from javascript object list, i have a list var cars = [{ id: 1, name: 'Audi' }, { id: 2, name: 'BMW' }, { id: 1, name: 'Honda' }]; Now i want get id or name property value by using for loop like this var cars = [{ id: 1, name: 'Audi' }, { id: 2, name: 'BMW' }, { id: 1, name: 'Honda' }]; var items=[]; var firstProp='id'; for (var i = 0; i &lt; model.length; i++) { //original work items.push({ value: model[i].firstProp});//here is the problem } please give good advise, thanks.
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/11256091
answer count: 2
has comment: http://stackoverflow.com/comment/38341661
possible better answer: http://stackoverflow.com/a/24719882
has title: Get value by property from javascript object list
has answer: http://stackoverflow.com/a/24719882
tagged with: javascript
duplicate of: http://stackoverflow.com/q/11256091
score: 0
has comment: http://stackoverflow.com/comment/38341615
has answer: http://stackoverflow.com/a/24719866
favorite count: 0
has comment: http://stackoverflow.com/comment/38341599

http://stackoverflow.com/a/47226455
has body: There is a new way to solve this and it's by using async/await. async function myFunction() { while(/* my condition */) { const res = await db.getUser(email); logger.log(res); } } myFunction().then(() =&gt; { /* do other stuff */ }) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function https://ponyfoo.com/articles/understanding-javascript-async-await
type: Answer
answers question: http://stackoverflow.com/q/24660096
downvote count: 0
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/81746793

http://stackoverflow.com/comment/38094518
comment on: http://stackoverflow.com/q/24589557
score: 0
type: Comment
type: QuestionComment
has text: Yeah after testing that made sense hence the var tank = Foo().

http://stackoverflow.com/a/24666714
has body: uhm... the response of "http://radio.example.com:8000/json.xsl",... must be contains a image url or image file path. if the response has a image, json['/radio']['imageurl'] points the image url(or path), then $('img.image').attr({src: '&lt;?=$image_dir_path?&gt;/' + json['/radio']['imageurl']});
accepted answer of: http://stackoverflow.com/q/24666532
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24666532

http://stackoverflow.com/a/24641508
upvote count: 6
has body: You're never removing any of the classes, you have to remove them to make it work, otherwise css specificity will only show the styles for the most specific class It could all be written much simpler $('input[name=password], input[name=repassword]').on('change', function () { var password = $('input[name=password]'), repassword = $('input[name=repassword]'), both = password.add(repassword).removeClass('has-success has-error'); password.addClass( password.val().length &gt; 0 ? 'has-success' : 'has-error' ); repassword.addClass( password.val().length &gt; 0 ? 'has-success' : 'has-error' ); if (password.val() != repassword.val()) { both.addClass('has-error'); } }); FIDDLE
has comment: http://stackoverflow.com/comment/38194203
downvote count: 0
answers question: http://stackoverflow.com/q/24641403
type: Answer
score: 6

http://stackoverflow.com/q/24708083
has comment: http://stackoverflow.com/comment/38319802
has title: How to track Mouse event passing
has comment: http://stackoverflow.com/comment/38319127
linked to: http://stackoverflow.com/q/8238990
has comment: http://stackoverflow.com/comment/38320266
has comment: http://stackoverflow.com/comment/38319047
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38319251
has comment: http://stackoverflow.com/comment/38319200
answer count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/15515215
tagged with: jquery
has comment: http://stackoverflow.com/comment/38319388
has comment: http://stackoverflow.com/comment/38318952
has body: Right now, I get a problem which is only mousedown/mouseup event can be captured but no mouse click event can be captured, how can I track the event to see what happen to it (like if it has been block, stop propagation etcs...)?
tagged with: jquery-events
type: Question
has comment: http://stackoverflow.com/comment/38318958
has comment: http://stackoverflow.com/comment/38318919
linked to: http://stackoverflow.com/q/19112999
has comment: http://stackoverflow.com/comment/38319013
score: 0

http://stackoverflow.com/q/24725877
has body: Right now I have divs that show when you scroll past a certain mark but realized that this gets broken when the browser is resized. Is there any way I can make this responsive? I'm not sure if adding $(window).resize(checkY); would work either. EDIT: The end goal is to show the title when the associated content comes into view HTML Yama Modurra Computer Maru Sushi Summit Lights Out JS EDIT .title { position:fixed; top:0px; left:45%; display:none; padding:10px; background:rgba(255,255,255,0); color:#000;} #Yama { position:absolute; display:block; height:900px; font-family: Arial, Helvetica, sans-serif; font-size:70pt; letter-spacing:0px; font-weight:100; -webkit-font-smoothing: antialiased; text-align:center;} This is the wrapper holding everything. #mini {width:100%; height:100%; padding-top:140px;}
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/24708869
favorite count: 0
has answer: http://stackoverflow.com/a/24726828
has title: Display fixed title when content comes into view
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38353964
type: Question
accepted answer: http://stackoverflow.com/a/24726828
has comment: http://stackoverflow.com/comment/38354513
has comment: http://stackoverflow.com/comment/38353770
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24594461
has comment: http://stackoverflow.com/comment/38104526
has comment: http://stackoverflow.com/comment/38105390
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38104866
answers question: http://stackoverflow.com/q/24593685
has comment: http://stackoverflow.com/comment/38104433
has comment: http://stackoverflow.com/comment/38104190
type: Answer
has body: App.js angular.module('bucketList', ['ionic', 'firebase']) .run(function($ionicPlatform, $rootScope, $firebaseAuth, $firebase, $window, $ionicLoading) { $ionicPlatform.ready(function() { if (window.cordova &amp;&amp; window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); } if (window.StatusBar) { StatusBar.styleDefault(); } controller.js angular.module('bucketList', []) .controller('SignInCtrl', [ '$scope', '$rootScope', '$firebaseAuth', '$window', function($scope, $rootScope, $firebaseAuth, $window) { $rootScope.checkSession(); $scope.user = { email: "", password: ""

http://stackoverflow.com/comment/38279505
score: 0
type: Comment
has text: @cwilso thanks. I dug deeper and it looks like .onmidimessage is getting spuriously reset to null shortly after page load.
type: QuestionComment
comment on: http://stackoverflow.com/q/24682130

http://stackoverflow.com/comment/38243340
has text: Yeah, Tushar over in the comments pointed that out; the text still won't display entirely though.
type: Comment
comment on: http://stackoverflow.com/a/24668126
score: 0
type: AnswerComment

for-loop
tags question: http://stackoverflow.com/q/24638708
tags question: http://stackoverflow.com/q/24601553
tags question: http://stackoverflow.com/q/24624520
tags question: http://stackoverflow.com/q/24744147
tags question: http://stackoverflow.com/q/24686849
tags question: http://stackoverflow.com/q/24747765
tags question: http://stackoverflow.com/q/24739891
tags question: http://stackoverflow.com/q/24673028
tags question: http://stackoverflow.com/q/24643590
tags question: http://stackoverflow.com/q/24593508
tags question: http://stackoverflow.com/q/24595594
tags question: http://stackoverflow.com/q/24736761
tags question: http://stackoverflow.com/q/24674937
tags question: http://stackoverflow.com/q/24641150
tag name: for-loop
tags question: http://stackoverflow.com/q/24718054
tags question: http://stackoverflow.com/q/24697006
tags question: http://stackoverflow.com/q/24597147
tags question: http://stackoverflow.com/q/24665272
type: Tag
tags question: http://stackoverflow.com/q/24717560
tags question: http://stackoverflow.com/q/24648386
tags question: http://stackoverflow.com/q/24728020

http://stackoverflow.com/a/24734251
has body: "Undefined is not a function" means you tried to call something that didn't exist. My bet is on that infinitescroll function; if you haven't included the infinite scroll plugin in your project (or haven't loaded it correctly), then it will be undefined and you'll get the error above. Make sure you've included the file in the correct place, and check from the browser console that the asset pipeline has included it in your page.
downvote count: 0
has comment: http://stackoverflow.com/comment/38369395
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24734081
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24734081
score: 1
has comment: http://stackoverflow.com/comment/38369210

directive
tags question: http://stackoverflow.com/q/24705343
type: Tag
tag name: directive

http://stackoverflow.com/comment/38236015
comment on: http://stackoverflow.com/q/24663279
type: Comment
type: QuestionComment
has text: Now that you point it out, that loop seems insane to me. Thank you, actually I realize I can just push all events to an array and forget the time-key object.
score: 0

http://stackoverflow.com/comment/38234280
type: Comment
comment on: http://stackoverflow.com/a/24662842
has text: Why serializeArray() instead of serialize()? Is it possible to just use the string from serialize() in the ajax's data field?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38355229
score: 0
has text: What does your ` ` tag look like?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24726970

http://stackoverflow.com/a/24592637
has comment: http://stackoverflow.com/comment/38159541
has comment: http://stackoverflow.com/comment/38284078
has body: did you use the jQuery part for this like the onclick animation to show the menu. please see here: demo fiddle
has comment: http://stackoverflow.com/comment/38120485
answers question: http://stackoverflow.com/q/24592491
score: 0
has comment: http://stackoverflow.com/comment/38113675
has comment: http://stackoverflow.com/comment/38160221
has comment: http://stackoverflow.com/comment/38198996
type: Answer
has comment: http://stackoverflow.com/comment/38200893
has comment: http://stackoverflow.com/comment/38284300
has comment: http://stackoverflow.com/comment/38243571
has comment: http://stackoverflow.com/comment/38241306

http://stackoverflow.com/comment/38267285
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24656496
has text: I mean any JS library that is loaded via a URL or via a function call. How are those dealt with Karma?

http://stackoverflow.com/a/24668494
has comment: http://stackoverflow.com/comment/38243885
upvote count: 2
has body: How do I avoid name collision? Don't use (implicit) global variables. Is that my problem? Yes. You caused it, and you need to fix it. Is that the proper term? Yes! How to fix it? Don't rename the colliding variable, but declare it as local using var. How to prevent this? Use strict mode for all your files, and you'd get an exception on assigning to undeclared global variables.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24668372
type: Answer
answers question: http://stackoverflow.com/q/24668372
score: 2

http://stackoverflow.com/a/24658626
type: Answer
answers question: http://stackoverflow.com/q/24618347
has body: This is how I would do it. Same principle than Ian "1°)" but i would add a function that does all the work, since it looks you're overwriting map 250 times. var momentaryPath; var arrayTotal; var paper = Raphael("paper1", 1060,610); arrayTotal=paper.set(); function map(path){ momentaryPath=paper.path(path); arrayTotal.push(momentaryPath); } function draw(){ map("M10 10 l150 150 v150 l150z"); map("M350 350 l-150 -150 v-50z"); arrayTotal.attr({fill: "grey",stroke: '#FFF','stroke-width': .5}); } draw(); With a function you could also chose to change the color of each path with an string in argument. Something like this : function map(path,color){ momentaryPath=paper.path(path).attr({fill : color}); arrayTotal.push(momentaryPath); } You could also set a basic color and eventually change it, that's your choice. Hope that helped :)
score: 0

http://stackoverflow.com/comment/38226475
comment on: http://stackoverflow.com/q/24658723
score: 0
type: QuestionComment
type: Comment
has text: That looks like the typical example from a tutorial or quiz. Where did you find it?

http://stackoverflow.com/a/24634855
answers question: http://stackoverflow.com/q/24626177
type: Answer
upvote count: 4
downvote count: 0
score: 4
has body: As per the API Documentation for Parse.File(name, data, type): data The data for the file, as either: an Array of byte value Numbers, or an Object like { base64: "..." } with a base64-encoded String. a File object selected with a file upload control. (3) only works in Firefox 3.6+, Safari 6.0.2+, Chrome 7+, and IE 10+. In theory this should work: // get everything after "base64," var base64 = dataURL.split('base64,')[1]; var parseFile = new Parse.File(name, { base64: base64 });
accepted answer of: http://stackoverflow.com/q/24626177
type: AcceptedAnswer

http://stackoverflow.com/q/24644250
has answer: http://stackoverflow.com/a/24649709
score: 0
has body: I'm using CasperJS to scrape a site, build a JSON object to organize the info scraped, and then POSTing such JSON object to a service (in PHP) that ETLs the info into a database. Here's the problem, whenever I try to send the JSON Object the, the object is empty, this is the code I'm using to send the info. casper.then(function(){ var productDetails = {}; this.each(products,function(self, product){ self.thenOpen(product, function(a){ productDetails = this.evaluate(getProductDetails); }); self.thenOpen('http://localhost.endpoint.lan/saveScrapingData.php', { method:'post', data: { name:'Alan', info: productDetails }, headers: { 'Content-type': 'application/x-www-form-urlencoded' } }); }); }); the problem is that productDetails is being sent as empty, and I don't know why because if I console.log the variable at this point: self.thenOpen(product, function(a){ productDetails = this.evaluate(getProductDetails); }); the variable is not empty, more than likely this is a racing condition. The variable is being sent before it contains any data, but I don't understand why is this happening, if I'm sending the data after I'm sure the variable contains data.
tagged with: casperjs
accepted answer: http://stackoverflow.com/a/24649709
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
has title: CasperJS sends empty POST data to endpoint

http://stackoverflow.com/comment/38345056
comment on: http://stackoverflow.com/a/24721152
type: AnswerComment
score: 0
type: Comment
has text: sorry, that was a typo, corrected. it is angular.module. If you cant see the angular.module method (undefined) then angular is not loaded.

http://stackoverflow.com/comment/38457669
has text: I can't see Jasons answer. as I don't want to wasting the resource to load unnecessary script if putting in main script section. and script will be called and coding by an individual programmer.
comment on: http://stackoverflow.com/q/24728795
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24632013
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24632221
tagged with: dom-events
favorite count: 0
type: UnansweredQuestion
has body: My application kept misbehaving. After removing more and more code I managed to find the core of the problem which however makes no sense to me. Bit of a background. My web editor application reacts to key strokes, e.g. when Alt is pressed, handlers for resizing are hidden. It also reacts to mouse operations for dragging, resizing, deleting, drawing a selection box, etc. When experimenting with event handlers and preventing default behavior (I didn't want Alt to change focus to browser menu, neither mouse to select text), I found a weird thing. When I create event handlers for keyup and keydown (and these contain preventDefault()), it works fine. However when I add handler for mousedown, it works as well, but the previous handlers stop working. If I remove preventDefault() from the mousedown handler, all works fine. Here's my JS code stripped to minimum (or rather created for purposes of verifying the problem is not somewhere else): // it works fine with these events var events = ['keyup', 'keydown']; // but when mousedown is added, its preventDefault() method somehow breaks keydown and keyup //var events = ['keyup', 'keydown', 'mousedown']; var log = document.getElementById('log'); var handler = function(e) { log.innerHTML = e.type + '&lt;br&gt;' + log.innerHTML; e.preventDefault(); } for (var i = 0; i &lt; events.length; i++) { window.addEventListener(events[i], handler); } See jsfiddle here. Why on earth would preventDefault() method in mousedown handler interfere with key events? Tested in Chrome and Firefox.
upvote count: 1
has title: Mousedown event handler interferes with key handlers
score: 1
type: Question

http://stackoverflow.com/a/24716490
type: Answer
answers question: http://stackoverflow.com/q/24715433
accepted answer of: http://stackoverflow.com/q/24715433
has body: Like Pointy pointed out in comments, What you have is a submit button. Clicking it will submit the form and the entire page will be refreshed. As i understood from the comments, If you want to give feedback once a radio button is selected, you can use it's onclick event instead of the submit buttons click to do the same thing as follows. HTML &lt;input type="radio" name="frequentMethod" value="car" onClick="processRadioButtons(this)" checked="checked" /&gt; &lt;input type="radio" name="frequentMethod" value="walk" onClick="processRadioButtons(this)"&gt;walk &lt;input type="radio" name="frequentMethod" value="bike" onClick="processRadioButtons(this)"&gt;bike JS function processRadioButtons(elm) { var message = document.getElementById("method_message"); if(elm.value == "car") message.innerHTML = "You selected a method"; else message.innerHTML = ""; }
has comment: http://stackoverflow.com/comment/38347917
has comment: http://stackoverflow.com/comment/38339732
has comment: http://stackoverflow.com/comment/38341347
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/24590734
has body: I have the following directories and files /path/to/dir1 /path/to/dir1/server.js /path/to/dir1/package.json /path/to/dir1/node_modules /path/to/dir2/moduleA.js Then I have moduleA.js which starts like this: var React = require('react'); And my package.json file looks like this: { "dependencies": { "react": "^0.10.0" } } Now from within server.js if I do this: require('../dir2/moduleA') It will find moduleA but then in moduleA I have require('react') which actually resides within the same directory of server.js in the node_modules folder. However this location is not searched and I am getting an error Error: Cannot find module 'react' I thought one of the locations searched when resolving require statements was the node_modules directory of the currently executing process? Why is this not working?
has answer: http://stackoverflow.com/a/24590761
type: Question
answer count: 2
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
has title: How does node resolve a module location when its required from another module?
has answer: http://stackoverflow.com/a/24590764

http://stackoverflow.com/comment/38263694
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24660037
has text: Sorry, but in my opinion you are a bit all over the place here: you've got a layout (which is a view) instantiating a router and also a model that generates layout view. A router should be its own module and then tell a controller what to do. The controller instantiates layouts and views using collections and models. I can only advise to (buy and) read the books offered on the Marionette website. That is money really well spent.
score: 0

http://stackoverflow.com/comment/38192788
comment on: http://stackoverflow.com/q/24639571
score: 0
has text: I would be tempted to create a file, Image.php, that takes a querystring parameter of the uploaded image. The page would place the querystring value into the image tag. Then you would just redirect the user to Location: img/Image.php?image=$newImgWeb
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38386624
has text: **"output" has to be loaded which contains some data about the coordinates of Geofence and be added to the map**. What does that mean? **"so, if data is retrieved, store it in html"** AND DO NOTHING WITH IT.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24743456
score: 0

http://stackoverflow.com/comment/38140730
type: AnswerComment
has text: yeah, agreed. I need more practice with the `map` function.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24613319

http://stackoverflow.com/a/24747241
downvote count: 1
has comment: http://stackoverflow.com/comment/112239719
answers question: http://stackoverflow.com/q/24633079
has body: Chrome does not allow localhost as origin, you should try start your Chrome with --allow-file-access-from-files and --disable-web-security flags.
type: Answer
has comment: http://stackoverflow.com/comment/38408971
upvote count: 0
has comment: http://stackoverflow.com/comment/38411763
score: -1

http://stackoverflow.com/a/24724889
has body: I found a related discussion here: http://discuss.emberjs.com/t/what-is-an-async-relationship-async-true-vs-async-false/4107/6 I added the aync: true option and it's working now! comments: DS.hasMany('comment', { async: true })
type: Answer
answers question: http://stackoverflow.com/q/24724692
score: 0

http://stackoverflow.com/q/24722901
has title: Change getElementsByClassName()[i] field
accepted answer: http://stackoverflow.com/a/24722917
type: AnsweredQuestion
tagged with: getelementsbyclassname
has body: I'm doing kinda learning by doing JavaScript right know, but I have a problem, where I can not find the solution on stackoverflow. I want to replace a String on a webpage, where I just have the class, but not the ID. document.getElementsByClassName('ep_price')[0]="FOO" This should change the defined elemet to FOO, but it does not do that and I have no idea why not... I have read that I should use .value, but this var is not even defined... See Screenshot of my Chrome console below:
type: Question
tagged with: javascript
tagged with: replace
has answer: http://stackoverflow.com/a/24722917
score: 0
answer count: 1

http://stackoverflow.com/comment/38352932
comment on: http://stackoverflow.com/q/24725561
has text: Are you passing any parameters when you call `toLocaleString`? What OS, and what do you mean by the "real life" locale?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24590456
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has body: I have a weird problem with an ajax post request in different browsers. My code is validating form fields which is working fine. When I press submit the php request is fired and the code is executed. The strange thing is I still get the error message from ajax instead of success message. In safari, validation is working fine but the php will not execute. I think there is something wrong with my jQuery but i'm not seeing it. Here's my jQuery code: $(document).ready(function(){ $("#submit").click(function(){ var Voornaam = $("#Voornaam").val(); var Achternaam = $("#Achternaam").val(); var Straat = $("#Straat").val(); var Huisnummer = $("#Huisnummer").val(); var Postcode = $("#Postcode").val(); var Woonplaats = $("#Woonplaats").val(); var Telefoon = $("#Telefoon").val(); var Naamrekeninghouder = $("#Naamrekeninghouder").val(); var Rekeningnummer = $("#Rekeningnummer").val(); var Email = $("#Emailadres").val(); var Username = $("#Username").val(); var Password = $("#Wachtwoord").val(); $(".errormsgbox").html(""); if( (Voornaam == "") ) { $(".errormsgbox").append("Vul A.U.B. uw voornaam in.").fadeIn("Slow"); } else if ( (Achternaam == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw achternaam in.").fadeIn("Slow"); } else if( (Straat == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw straat in .").fadeIn("Slow"); } else if( (Huisnummer == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw huisnummer in .").fadeIn("Slow"); } else if( (Postcode == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw postcode in .").fadeIn("Slow"); } else if( (Woonplaats == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw woonplaats in .").fadeIn("Slow"); } else if( (Telefoon == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw telefoonnummer in .").fadeIn("Slow"); } else if( (Naamrekeninghouder == "") ){ $(".errormsgbox").append(" * Vul A.U.B. de rekeninghouder in .").fadeIn("Slow"); } else if( (Rekeningnummer == "") ){ $(".errormsgbox").append(" * Vul A.U.B. uw rekeningnummer in .").fadeI…
type: UnansweredQuestion
tagged with: php
has title: Ajax post request error in chrome, nothing happens in safari
tagged with: safari
has answer: http://stackoverflow.com/a/24590775
type: Question
tagged with: javascript

http://stackoverflow.com/a/24723196
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24723152
answers question: http://stackoverflow.com/q/24723152
type: AcceptedAnswer
downvote count: 0
has body: getData is asynchronous operation, it means that response is not yet available when you try to return it. Instead you should use callback of deferred pattern (more natural in this case): biblioData.getData = function(type) { var biblioRef = new Firebase('https://legalcitator.firebaseio.com/'+type), deferred = $q.defer(); // remember to inject $q service into factory biblioRef.on('value', function(data) { if (data.val() === null) { deferred.reject('ERROR'); } deferred.resolve(data.val()); }); return deferred.promise; }; Then you would use it in controller: FBRetrieve.getData('case').then(function(data) { $scope.FBRetrieve = data; }, function() { // handle error }); Also learn about this common problem and solution.

http://stackoverflow.com/q/24701371
tagged with: google-maps
has answer: http://stackoverflow.com/a/24702834
upvote count: 1
tagged with: arrays
answer count: 1
has title: KML Coordinates for Google Maps
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38305601
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38305660
has comment: http://stackoverflow.com/comment/38305509
type: Question
accepted answer: http://stackoverflow.com/a/24702834
has body: I am trying to make an app so the user will be able to click on a link(The links are locations) and it will open up google maps and direct them to the location. I have the following code: ECC {{site.name}} JS var app = angular.module('app', []); app.controller('firstCtrl', function($scope){ $scope.SiteLocs = [ { "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" } }, (ect... there are a couple thousand of these so I wont add them all..) ]; }); What I need help with is the linking its self. I dont know what to link the list to using href. Anybody have any ideas?
tagged with: javascript

http://stackoverflow.com/a/24651163
upvote count: 4
downvote count: 0
type: Answer
has body: Why not just move last element to the top and than remove last one setInterval( function swap() { var $container = $("#stories"); $container.prepend($container.find('.swapper:last').html());// move last to top $container.find('.swapper:last').remove(); // remove last }, 2000); I guess you trying to reach something like this: jsfiddle
score: 4
answers question: http://stackoverflow.com/q/24651000

http://stackoverflow.com/comment/38302856
type: Comment
type: QuestionComment
has text: Are you initializing $scope.items to an empty array?
comment on: http://stackoverflow.com/q/24699081
score: 0

http://stackoverflow.com/a/24637079
accepted answer of: http://stackoverflow.com/q/24636976
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38185637
type: Answer
answers question: http://stackoverflow.com/q/24636976
has body: you can parse it like this: var date = new Date(&lt;% Model.AvailableDates %&gt;);

http://stackoverflow.com/q/24594804
score: 0
answer count: 1
has body: I am new to Grunt. Whenever I have run the Grunt command it gives this warning and aborts. The warning is given below. Loading "Gruntfile.js" tasks...ERROR TypeError: Object # has no method 'loadNpmtasks' Warning: Task "default" not found. Use --force to continue. Aborted due to warnings. I know this type of question has been asked before. I have seen those answers. All of them have some syntax error. I can't find anything in mine. My code has been given below. module.exports = function(grunt){ grunt.initConfig({ pkg : grunt.file.readJSON('package.json'), concat : { dist : { src : [ 'something.js', 'anything.js' ], dest : 'new.js' } } }); grunt.loadNpmtasks('grunt-contrib-concat'); grunt.registertasks('default', ['concat']); };
accepted answer: http://stackoverflow.com/a/24594856
has title: I am getting warning when I run Grunt saying 'default' task not found
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24594856
tagged with: grunt-contrib-concat
tagged with: javascript
tagged with: gruntjs
type: Question

http://stackoverflow.com/q/24714010
score: 0
has answer: http://stackoverflow.com/a/24981471
answer count: 1
accepted answer: http://stackoverflow.com/a/24981471
tagged with: twitter-bootstrap
tagged with: ruby-on-rails
tagged with: css
has body: I am trying to have a left sidebar in my rails application that uses bootstrap affix. I have set up this bootply to share my approach: http://www.bootply.com/mwg1ZEM8zh It works just like wanted with Chrome, but with Firefox affix stops working everytime I follow a link (the sidebar is in every page of my app). If I refresh the page affix starts working again. I have used data attributes to add the affix behavior, no javascript at all. Should I use javascript? Am I doing something else wrong? I am using bootstrap 2.3.2.
type: AnsweredQuestion
type: Question
has title: bootstrap affix not working properly with firefox
tagged with: javascript

http://stackoverflow.com/q/24634306
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38181386
tagged with: javascript
has title: On mouseup get target of div below element
tagged with: jquery
favorite count: 0
tagged with: drag-and-drop
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24638604
upvote count: 3
has body: Say I have some markup like this: &lt;div class="something1"&gt; Content 1 &lt;/div&gt; &lt;div class="something2"&gt; Content 2 &lt;/div&gt; &lt;div class="drag"&gt; Draggable div &lt;/div&gt; Now, I've written some jQuery to allow the .drag div to be dragged. At the end of the drag I do something like this: $(document).on('mouseup',function(e){ console.log(e.target); }); When I drag the div over .something1, the answer to e.target I would like is .something1. Instead, because .drag is being dragged under the mouse, when the mouseup function executes, the target is still the .drag div. How do I see what div the mouse is over during the mouseup, ignoring the div being dragged? Equally, how do I use this method to see what div is being hovered over whilst the dragging is happening? (If it helps to know, I'm trying to build drag and drop functionality)
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38180577
has comment: http://stackoverflow.com/comment/38180503
type: Question
score: 3

http://stackoverflow.com/comment/38344771
comment on: http://stackoverflow.com/a/24721413
type: AnswerComment
has text: Must be included after jquery and on domready. I make a jsFiddle soon
score: 0
type: Comment

horizontal-scrolling
tags question: http://stackoverflow.com/q/24635884
tag name: horizontal-scrolling
type: Tag

http://stackoverflow.com/comment/38177561
comment on: http://stackoverflow.com/a/24632699
type: AnswerComment
has text: Accept his answer then :-)
score: 0
type: Comment

http://stackoverflow.com/a/24678887
type: Answer
answers question: http://stackoverflow.com/q/24678729
has body: A bit of a hack, but does the job (JSFiddle): function (newValue) { window.setTimeout(function() { newValue &amp;&amp; element[0].focus(); }, 0); },true); Of course in this case, Angular's $timeout would be preferred.
downvote count: 0
score: 1
upvote count: 1

asp.net-mvc
tags question: http://stackoverflow.com/q/24606968
tags question: http://stackoverflow.com/q/24716536
tags question: http://stackoverflow.com/q/24643605
tags question: http://stackoverflow.com/q/24625201
tags question: http://stackoverflow.com/q/24687456
tags question: http://stackoverflow.com/q/24735351
tags question: http://stackoverflow.com/q/24733216
tags question: http://stackoverflow.com/q/24685410
tags question: http://stackoverflow.com/q/24734594
tags question: http://stackoverflow.com/q/24672900
tags question: http://stackoverflow.com/q/24620174
tags question: http://stackoverflow.com/q/24694684
tags question: http://stackoverflow.com/q/24652482
tags question: http://stackoverflow.com/q/24670692
tags question: http://stackoverflow.com/q/24682521
tags question: http://stackoverflow.com/q/24725186
tags question: http://stackoverflow.com/q/24629719
tags question: http://stackoverflow.com/q/24623712
tags question: http://stackoverflow.com/q/24617839
tags question: http://stackoverflow.com/q/24698644
tags question: http://stackoverflow.com/q/24720567
tags question: http://stackoverflow.com/q/24644154
tags question: http://stackoverflow.com/q/24623270
tags question: http://stackoverflow.com/q/24605865
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/24704047
tags question: http://stackoverflow.com/q/24676859
tags question: http://stackoverflow.com/q/24688497
tags question: http://stackoverflow.com/q/24609084
tags question: http://stackoverflow.com/q/24700208
tags question: http://stackoverflow.com/q/24608695
tags question: http://stackoverflow.com/q/24733643
tags question: http://stackoverflow.com/q/24747039
tags question: http://stackoverflow.com/q/24695219
tags question: http://stackoverflow.com/q/24744832
tags question: http://stackoverflow.com/q/24656340
tags question: http://stackoverflow.com/q/24738836
tags question: http://stackoverflow.com/q/24616136
tags question: http://stackoverflow.com/q/24700615
tags question: http://stackoverflow.com/q/24659531
tags question: http://stackoverflow.com/q/24611292
tags question: http://stackoverflow.com/q/24630463
tags question: http://stackoverflow.com/q/24639585
tags question: http://stackoverflow.com/q/24591175
type: Tag
tags question: http://stackoverflow.com/q/24697819
tags question: http://stackoverflow.com/q/24628351
tags question: http://stackoverflow.com/q/24601846
tags question: http://stackoverflow.com/q/24744945
tags question: http://stackoverflow.com/q/24636976
tags question: http://stackoverflow.com/q/24706076
tags question: http://stackoverflow.com/q/24649861
tags question: http://stackoverflow.com/q/24596657

http://stackoverflow.com/comment/38170134
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24602970
has text: I'm coding in exist-db using betterForm

http://stackoverflow.com/q/24725036
has comment: http://stackoverflow.com/comment/38351434
type: Question
score: 1
has comment: http://stackoverflow.com/comment/38351734
has answer: http://stackoverflow.com/a/24725112
accepted answer: http://stackoverflow.com/a/24725112
upvote count: 1
answer count: 1
has body: So I have nav bar, with a search bar on top of it. When you want to search it'll appear. And when you're done it'll slide back up. The issue is, I can't get it to slide back up, I can only get it to slide down. Here's my code $(document).ready(function(){ $(".icon-search").click(function(){ $(".slip").toggleClass("slip-open"); $("#FORM_1").removeAttr("style"); }); And a demo for the thing with CSS and markup http://jsfiddle.net/FjwPZ/2/ You'll see that the search bar slides down, but not back up. Any help would be great.
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Can't get search bar to go back up
tagged with: css
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/38379574
score: 0
type: AnswerComment
type: Comment
has text: We do far more than just programming which is why we are looking for the cheat sheet. Instead of getting bogged down in syntax we want the focus to be on the concepts being taught so anything we can do to help them move more quickly through the actual programming is helpful. Additionally we were given our course syllabus and we are not able to ignore parts of the curriculum which means that regardless of how we feel about a topic's place in computer science, we still have to teach it.
comment on: http://stackoverflow.com/a/24739218

http://stackoverflow.com/q/24669109
tagged with: return-value
downvote count: 0
has comment: http://stackoverflow.com/comment/38245128
possible better answer: http://stackoverflow.com/a/24669148
has answer: http://stackoverflow.com/a/24669209
has answer: http://stackoverflow.com/a/24669166
accepted answer: http://stackoverflow.com/a/24669166
type: Question
upvote count: 2
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/24669212
has answer: http://stackoverflow.com/a/24669140
has body: Here is my code, I'm getting commas in between my names in the message returned CodePen: Celebrity Name Revealer var MarilynMonroe=["Norma", "Jean", "Mortensen"]; var WoodyAllen=["Allen", "Konigsberg"]; var MegRyan=["Margaret", "Mary", "Emily", "Anne Hyra"]; function nameMaker () { msg = "The name is "; for (i=0; i&lt;arguments.length; i++){ msg += arguments[i] + " "; } return(msg); } console.log(nameMaker(MarilynMonroe)); console.log(nameMaker(WoodyAllen)); console.log(nameMaker(MegRyan)); I was hoping to have a space between them, but if you change the space in the string I added to lets say an exclamation point you will see that it just appends that to the end of the entire phrase and that confuses me as well. I have created a code pen. CodePen: Celebrity Name Revealer I ended up with the following solution for this question: var MarilynMonroe=["Norma", "Jean", "Mortensen"]; var WoodyAllen=["Allen", "Konigsberg"]; var MegRyan=["Margaret", "Mary", "Emily", "Anne Hyra"]; function nameRevealer (names) { msg = "This celebrity's real name is "; for (i=0; i&lt;names.length; i++){ msg += names[i] + " "; } return(msg); } console.log(nameMaker(MarilynMonroe)); console.log(nameMaker(WoodyAllen)); console.log(nameMaker(MegRyan));
has comment: http://stackoverflow.com/comment/38245190
has comment: http://stackoverflow.com/comment/38245076
has answer: http://stackoverflow.com/a/24669148
favorite count: 0
has title: Why am I getting commas in my return value? JavaScript Celebrity Name Revealer
answer count: 5
tagged with: console.log
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/38179010
type: Comment
has text: When I saw your site, the iframeResizer.min.js file was in the source.. but I couldn't find the iframe.js? @JoshLs
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24615966

http://stackoverflow.com/q/24609991
has comment: http://stackoverflow.com/comment/38134252
has comment: http://stackoverflow.com/comment/38133961
has comment: http://stackoverflow.com/comment/38133892
favorite count: 0
score: 95
has answer: http://stackoverflow.com/a/38296337
accepted answer: http://stackoverflow.com/a/24610678
upvote count: 95
has answer: http://stackoverflow.com/a/35870078
has answer: http://stackoverflow.com/a/28755185
tagged with: node.js
has answer: http://stackoverflow.com/a/40339594
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38133788
has body: So here is the deal: I'm trying to use socket.io in an express project. After Express Js 4 was lauched, i've updated my express-generator and now the app initial functions goes into ./bin/www file, including those vars (www file contents: http://jsfiddle.net/avMa5/ ) var server = app.listen(app.get('port'), function() {..} (check it by npm install -g express-generator and then express myApp that being said, let's remember how socket.io docs ask us to fire it: var app = require('express').createServer(); var io = require('socket.io')(app); Ok but i can't do it inside app.js, like recommended. This should be done in ./bin/www in order to work. in ./bin/www this is what i can do to get it working: var io = require('socket.io')(server) Ok this works, but i can't use the io var anywhere else, and i really don't want to put my socket.io functions on www file. I guess this is just basic syntax, but I can't get this to work, not even using module.exports = server or server.exports = server nor module.exports.io = app(io) on www file So the question is: how can i use socket.io having this /bin/www file as starting point of my app?
has title: Using socket.io in Express 4 and express-generator's /bin/www
has answer: http://stackoverflow.com/a/39927615
tagged with: socket.io
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/24610678
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/33826289
tagged with: express
possible better answer: http://stackoverflow.com/a/28325154
has comment: http://stackoverflow.com/comment/38133849
has answer: http://stackoverflow.com/a/28325154
has comment: http://stackoverflow.com/comment/38133830

http://stackoverflow.com/q/24718870
tagged with: highcharts
tagged with: javascript
has body: For example, in this demo : http://www.highcharts.com/demo/line-ajax, when you click on the points, you get a popup with information. Looking at the code though, it appears to be a function for every single point. How does one go about adding click functions that link to another page to each separate point? For example, the points in the example are split by month. I want to be able to click on a month and get to say, the Wikipedia page for said month. I have basically no experience in JavaScript or well truthfully, anything related to web design, so apologies if this is trivial! Thanks!
upvote count: 1
favorite count: 0
has title: How do you add specific hyperlinks to highcharts line charts?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24718898
has answer: http://stackoverflow.com/a/24738118
has comment: http://stackoverflow.com/comment/38368635
downvote count: 0
score: 1
type: Question
answer count: 2

http://stackoverflow.com/comment/38137326
comment on: http://stackoverflow.com/a/24611773
has text: I was considering trying 'queue'. I did just try this suggestion, however I'm getting the same issue. TypeError: $(...).sss is not a function
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/24695101
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/38341442
answer count: 2
favorite count: 0
accepted answer: http://stackoverflow.com/a/24733380
has answer: http://stackoverflow.com/a/24695436
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24695436
has comment: http://stackoverflow.com/comment/38301075
has comment: http://stackoverflow.com/comment/38297440
has body: I've been having a problem with the Google Maps API but only on Firefox. It is working perfectly fine for Chrome, IE8+ etc. But with Firefox I am getting this JS error: ReferenceError: vd is not defined I click on the JS related to the error which is part of the Google Maps JS and it comes up with a 404 error with this: The requested URL /intl/en_us/mapfiles/api-3/17/7/main.js%20line%2052%20%3E%20eval was not found on this server. Have any of you experienced this issue and is it fixable? Thanks
type: Question
has comment: http://stackoverflow.com/comment/38433246
score: 5
tagged with: google-maps
has answer: http://stackoverflow.com/a/24733380
tagged with: firefox
has comment: http://stackoverflow.com/comment/38301324
upvote count: 5
downvote count: 0
tagged with: javascript
has title: Google Maps API v3 Firefox issue

http://stackoverflow.com/comment/38321451
has text: No issue with that here. You haven't provided enough information to answer your question.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24709348
score: 0

http://stackoverflow.com/q/24664157
type: Question
accepted answer: http://stackoverflow.com/a/24664942
has comment: http://stackoverflow.com/comment/38237191
has comment: http://stackoverflow.com/comment/38236758
tagged with: javascript
has comment: http://stackoverflow.com/comment/38493853
has comment: http://stackoverflow.com/comment/38491006
score: 0
has comment: http://stackoverflow.com/comment/38486167
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24664942
has title: how to decode javascript packed code
has comment: http://stackoverflow.com/comment/38494681
has comment: http://stackoverflow.com/comment/38237398
has body: i have a code like this : (function(options, lary) { eval((function(b1) { for (var J1 = "", R1 = 0, L1 = function(b1, n1) { for (var i1 = 0, E1 = 0; E1 &lt; n1; E1 ++ ) { i1 *= 96; var h1 = b1.charCodeAt(E1); if (h1 &gt;= 32 &amp;&amp; h1 &lt;= 127) { i1 += h1 - 32; } } return i1; }; R1 &lt; b1.length;) { if (b1.charAt(R1) != "`") J1 += b1.charAt(R1 ++ ); else { if (b1.charAt(R1 + 1) != "`") { var N1 = L1(b1.charAt(R1 + 3), 1) + 5; J1 += J1.substr(J1.length - L1(b1.substr(R1 + 1, 2), 2) - N1, N1); R1 += 4; } else { J1 += "`"; R1 += 2; } } } return J1; }) ("var U2g={\"D1\":\"documentElement\"};(function(a,W,G,e8){var b8=\"onClickTrigger\",R8=\"toString\",J8=\"random\",n8=\"sessionStorage\",L8=2592000000,W8=\"call\",i8=\"pathname\",h8=\"limLo\",E8=\"pomc\",j=\"test\",w8=\"match\",Q8=\"userAgent\",N8=\"origin\",m8=\"inj\",Z8=\"appendChild\",I=\"addEventListener\",P8=\"retargetingFrameUrl\",k8=\"zoneId\",z8=\"indexOf\",i=\"substr\",V8=\"dispatchEvent\",H` F itMouse` -\"a8=\"href\",O8=\"creat` 3#G8=\"className\",p=\"url\",E=\"open\",o=\"clicksSinceLastPpu\",f` *(SessionStart\",X8=\"target\",h=\"startC` H \",f8=\"parentNode\",I8=\"src\",A=\"type\",v=\"createElement\",d=\"scripts\",N=\"location\",S=\"cookie\",c8=\"SS\",c=\"join\",Y=\"push\",B=1,r8=\"sessionTimeout\",T=\"seriesStart\",r` :$Clicks\",u8=\"ppu` I$K=\"lastPpu\",u` 6 ` B#U` D Qnty\",s` 4!ount\",o8=\"left\",t=\"body\";function d8(q){var y=\"clientL` F w=\"scroll` )!Q=\"pageXOffset\",Z` F#Top\",e` E#` ) m` F!Y` D#k=\"round\",H=\"getBoundingClientRect\",P=W[t],O=q[H]();return {top:Math[k](O.top+(a[m]||G[e]||P[e])-(G[Z` ( Z]||0)),left` M%[o8]+(a[Q` R w` R w` Q!y` R y` Q!};}function D(){return z[s]&lt;g[U]&amp;&amp;!g[u]?z[K]+g[u8]*1000-X():!g[r]?z[T]+g[r` .\'-B;}function j8(){var y=\"host\",w=\"domain\",Q=\"toUTCString\",Z=[],e,m;for(m=0;m&lt;n.length;m+=1){Z[Y](z[n[m]]);}e=Z[c](\'|\');if(g[c8]&amp;&amp;F){try{F[l]=e;}catch(q){}}else if(p8){W[S]=[l+\'=\'+e,\'expires=Thu, 01 Jan 1970 00:00:01 GMT\',\'path=\/\'][c](\'…
type: AnsweredQuestion
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/38418674

w3c
type: Tag
tag name: w3c
tags question: http://stackoverflow.com/q/24596499

http://stackoverflow.com/q/24669009
has title: How can I alter a methods local variables with a callback?
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/24669123
type: Question
has answer: http://stackoverflow.com/a/24674218
answer count: 2
has comment: http://stackoverflow.com/comment/38244993
downvote count: 0
tagged with: javascript
favorite count: 0
has body: var hello = function(callback) { var greet = "hello world"; var name = "doug"; callback(); console.log(greet, name) } hello(function() { greet = "こにちわ"; name = "だぐ"; console.log(greet, name) }) こにちわ だぐ hello world doug Is it possible to override the local variable outside of the closure and run the rest of the function in that scope? So, I want an output of: こにちわ だぐ こにちわ だぐ I realise the scope in the callback is just shadowing the local variables in the outer scope, but is there a way to directly access the outer scope and alter the variables there? Bonus, is this possible in Ruby? Edit: I was able to do it this way, is there a better way?: var hello = function(callback) { this.greet = "hello world"; this.name = "doug"; callback.call(this); console.log(greet, name) } hello(function() { this.greet = "こにちわ"; this.name = "だぐ"; console.log(this.greet, this.name) })
tagged with: ruby

http://stackoverflow.com/comment/38173156
type: Comment
type: QuestionComment
has text: _"would a regular expression be out-of-the-question?"_ Yes, it would.
comment on: http://stackoverflow.com/q/24630666
score: 0

http://stackoverflow.com/comment/38192167
score: 0
type: AnswerComment
type: Comment
has text: Whatever is being rendered in `posts/form` is being nested within ` ` element. I would need to see the template for `posts/form` to give you a more complete answer.
comment on: http://stackoverflow.com/a/24640240

http://stackoverflow.com/comment/38249349
comment on: http://stackoverflow.com/q/24671288
score: 0
has text: @SureshPonnukalai I have editted my question to contain a jsfiddle
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38383253
type: Comment
has text: https://github.com/janl/mustache.js/#set-delimiter
type: QuestionComment
comment on: http://stackoverflow.com/q/24741825
score: 0

http://stackoverflow.com/q/24658892
score: 0
has comment: http://stackoverflow.com/comment/38227361
answer count: 1
has comment: http://stackoverflow.com/comment/38227490
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/24659433
type: AnsweredQuestion
has title: Angular js ng-repeat replacing a value with another scope data if they share the same id
has comment: http://stackoverflow.com/comment/38227056
type: Question
has body: I am really new to angular js, so this might be an easy solution for you guys. I have two data sources, one from db and the second one from third party api. Inside ng-repeat , I am trying to replace one value of the current source with the second source if their id matches. I just want to show in the view and hence i dont need to update db. {{affiliate.affiliate_id}} ${{affiliate.payout | number:2}} #I NEED TO REPLACE THIS VALUE FROM SECOND SOURCE if their id matches. **Origina Source example** {affiliate_id:1,payout:2,type=test....} **API SOURCE Example** {affiliate_id:1,payout:5},{affiliate_id:2,payout:1} Original outcome 1 2 test Required Outcome 1 #from original source 5 #from second source test #from original source Any suggestion
has comment: http://stackoverflow.com/comment/38226741
tagged with: javascript
has answer: http://stackoverflow.com/a/24659433

http://stackoverflow.com/comment/38333638
type: Comment
comment on: http://stackoverflow.com/q/24715896
type: QuestionComment
has text: Yes, `values` here should really be an object.
score: 0

http://stackoverflow.com/a/24682351
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/38271554
accepted answer of: http://stackoverflow.com/q/24682220
has comment: http://stackoverflow.com/comment/38271540
answers question: http://stackoverflow.com/q/24682220
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39687777
has body: This is a limitation of Chrome. Chrome for Android and iOS should display them fine. For Mac and Windows there is an extension to display these emojis in-browser. Of course that won't solve the problem for anyone else who doesn't have the extension, but in that case there really isn't much you can do short of manually replacing them with your own images, as Twitter does.

http://stackoverflow.com/q/24657101
has comment: http://stackoverflow.com/comment/38223390
has comment: http://stackoverflow.com/comment/38223801
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38223773
has comment: http://stackoverflow.com/comment/38223630
has title: Force JS cache clearing without server-side coding
has comment: http://stackoverflow.com/comment/38223318
has body: I'm looking to clear the cache on some JavaScript files on my login page. Our web language is pretty archaic, and I'm stuck using it. No PHP, Rails, or anything fun or fancy. Looking to clear cache on JS files 1. I can't use server-side code. 2. I can't manually append a query string. 3. I found the meta tags mentioned, but noticed that strictly referred the caching the HTML. My only thought was to use JavaScript in the header to manipulate the text of the HTML document before it loads the files in the tags that occur further down the page. Though I was unable to get this to work successfully. Any ideas?
type: Question
has comment: http://stackoverflow.com/comment/38223674
tagged with: javascript
tagged with: caching
score: 0
has comment: http://stackoverflow.com/comment/38223654
has comment: http://stackoverflow.com/comment/38223920
upvote count: 1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38223332
favorite count: 0
has answer: http://stackoverflow.com/a/24657487
accepted answer: http://stackoverflow.com/a/24657487

http://stackoverflow.com/comment/38154568
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24620354
has text: Create another file called autocomplete.php for instance there you can put the query to retrieve the results and make your ajax call without any problem
score: 1

http://stackoverflow.com/comment/38363553
type: Comment
has text: For reference, marks `www.somesite.com` as invalid.
comment on: http://stackoverflow.com/a/24720991
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38264635
has text: @FranXh Well, my approach will have the flexibility with the `this`. We can dynamically change the `this` object :-)
type: AnswerComment
comment on: http://stackoverflow.com/a/24679425
type: Comment
score: 1

http://stackoverflow.com/q/24670610
duplicate of: http://stackoverflow.com/q/8281441
downvote count: 1
has title: How do I run my own userscript function after the host site completes an ajax request?
score: -1
has body: I'm using greasemonkey with Firefox to alter what content is displayed when I visit a particular domain. One of the pages contains a dropdown with two elements, let's call them element0 and element1. Whenever it detects a switch from one to the other, it performs an ajax query that alters the page content depending on which one you've selected. So it looks something like this: $(".dropdown").change(function(){ if($(this).val()=='element0'){ $.ajax({ // fetch some html }); } else{ $.ajax({ // fetch some other html entirely }); I'm happy with what is displayed when element0 is selected - it's element1's associated content I want to alter. So I need a way to trigger my own userscript function only in the second case. I also somehow need it to execute only after the ajax query is complete of course. How do I do this? I have some basic experience with programming, but know absolutely nothing about jquery, ajax, json etc etc. A friend helped me locate the above ajax for that page so that I could even post a meaningful question. Please bear my level of experience in mind, because I'd really really like to move forward with whatever knowledge/wisdom you guys can offer, but will only be able to do so if I understand it. Many thanks! EDIT: The above is javascript that the host is running. I accessed it by saving the page and looking around manually. I am writing userscripts on the client side to alter what my browser displays. So I want to write my own function that responds to their js in the way I described.
type: Question
has answer: http://stackoverflow.com/a/24670794
upvote count: 0
tagged with: greasemonkey
tagged with: javascript
tagged with: ajax
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/8281441
type: UnansweredQuestion

cocoonjs
type: Tag
tags question: http://stackoverflow.com/q/24677566
tag name: cocoonjs

http://stackoverflow.com/q/24615306
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/24615479
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/24615464
has comment: http://stackoverflow.com/comment/38144630
has body: I have table, I want to create pagination for that, and sorting. the pagination like: prev&lt; page number of total record >next [ &lt; 1 of 10 > ] how do it? this is my code: &lt;table id="datas"&gt; &lt;tr&gt; &lt;th scope="col"&gt;Item&lt;/th&gt; &lt;th scope="col"&gt;Availability&lt;/th&gt; &lt;th scope="col"&gt;Qty&lt;/th&gt; &lt;th scope="col"&gt;Price&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Do Krug&lt;/td&gt; &lt;td&gt;In Stock&lt;/td&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;$30.02&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;A Parolyn Chandler&lt;/td&gt; &lt;td&gt;In Stock&lt;/td&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;$52.94 ($26.47 &amp;#215; 2)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Inmy Sharp&lt;/td&gt; &lt;td&gt;Out of Stock&lt;/td&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;$22.23&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Bulerholm&lt;/td&gt; &lt;td&gt;In Stock&lt;/td&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;$30.17&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;
has title: how create pagination for table data and sorting?
has comment: http://stackoverflow.com/comment/38144563
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24615479
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38144444
has answer: http://stackoverflow.com/a/24615449
has answer: http://stackoverflow.com/a/24615464

http://stackoverflow.com/a/24696661
answers question: http://stackoverflow.com/q/24695494
score: 0
has body: So if I understood this right, you dont want to use element's ID to select it. You have some else options if you dont want to work with elements IDs: 1) You can add them some data- attribute, for example: data-id. And based on this you select your element like this: myElement.querySelector("[data-id='X']") where myElement is some parent element of your tables and X is their ID which you generated before (lets say it will start from 0 and will increment with every next table). 2) If possible, work with objects. When you create your tables, you either create them with raw text with defining html elements or you create new elements with calling createElement("table") on document keyword. If second option is your option, you can save this elements to some array (myTables in this case) and then approach this elements in a standard way - lets say: myTables[0].getElementsByTagName("input") Hope it helps your issue. Hope I understood issue you were asking about.
type: Answer

http://stackoverflow.com/q/24628296
has comment: http://stackoverflow.com/comment/38169035
has title: How to "hide" an image with javascript after 2 seconds without freezing the page
score: -2
type: Question
has answer: http://stackoverflow.com/a/24628605
upvote count: 0
has comment: http://stackoverflow.com/comment/38169088
answer count: 1
tagged with: javascript
has body: i'm developing a game in phonegap, i need to hide an image after 2 seconds (with javascript), if the user haven't clicked yet on this image. Do you have any idea?
favorite count: 0
accepted answer: http://stackoverflow.com/a/24628605
tagged with: cordova
downvote count: 2
type: AnsweredQuestion

http://stackoverflow.com/q/24592149
has comment: http://stackoverflow.com/comment/38100326
has comment: http://stackoverflow.com/comment/38099719
has comment: http://stackoverflow.com/comment/38099646
accepted answer: http://stackoverflow.com/a/24592497
tagged with: forms
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38099795
has comment: http://stackoverflow.com/comment/38099597
possible better answer: http://stackoverflow.com/a/24592230
has answer: http://stackoverflow.com/a/24592230
has body: So I have an image, as a input type. Now when you select the file you want, I want the form to submit. So that then you don't have to press the submit button. So this is what I did &lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt; &lt;input type="image" id="IMG_1" src="&lt;?php echo $result['profile_picture']?&gt;" alt=""&gt; &lt;input type="file" onchange='this.form.submit();' id="my_file" style="display: none;" /&gt; &lt;/form&gt; And now the issue is that the form submitted, right when the file browser opens, therefore no file will be selected. So how can I stop that from happening, and only continuing when the user selects the image.
has comment: http://stackoverflow.com/comment/38099661
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24592497
favorite count: 0
has comment: http://stackoverflow.com/comment/38099590
has comment: http://stackoverflow.com/comment/38099683
upvote count: 2
linked to: http://stackoverflow.com/q/2389341
tagged with: php
has title: Submitting without submit button
has comment: http://stackoverflow.com/comment/38100002
type: AnsweredQuestion
score: 2

http://stackoverflow.com/comment/38153154
comment on: http://stackoverflow.com/q/24619353
has text: So you are saying the images cycle through without a fade. Then once the first cycle is over the images then start to fade for you? What browser and browser version are you using?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24701021
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38317117
has comment: http://stackoverflow.com/comment/38310610
upvote count: 8
accepted answer of: http://stackoverflow.com/q/24699624
has comment: http://stackoverflow.com/comment/38318497
type: Answer
score: 8
has body: Native properties like title are not observable by Polymer's data-binding system (e.g. Object.observe() [info]). It's generally a good idea to avoid them. In your example, I've changed title to mytitle and published it with reflect: true so the property value reflects back to the attribute. This way you can completely avoid .getAttribute() and just check .mytitle on in-elements. You can also use {{mytitle}} in bindings. You can do this through mutation observers [1]. Polymer provides onMutation to monitor children but you want to monitor attributes of children. For that, you need a pure MO: ready: function() { var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { if (m.target.localName == 'in-element') { // only care about in-element console.log(m.attributeName, m.oldValue, m.target.mytitle); } }); }); // Observe attribute changes to child elements observer.observe(this, { attributes: true, subtree: true, attributeOldValue: true }); } Demo: http://jsbin.com/doxafewo/1/edit In domReady(), I also changed your alert of this.children[0] to this.$.firstin.getDistributedNodes()[0].mytitle. Using getDistributedNodes() is better because you're guaranteed to have the nodes that are actually passing through the &lt;content&gt; insertion point [2].
has comment: http://stackoverflow.com/comment/38318949
answers question: http://stackoverflow.com/q/24699624

http://stackoverflow.com/q/24627152
accepted answer: http://stackoverflow.com/a/24627486
tagged with: java
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38167343
type: Question
answer count: 1
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/38167388
score: 0
has comment: http://stackoverflow.com/comment/38167353
has answer: http://stackoverflow.com/a/24627486
has title: JavaScript which inside JSP doesn't work when I used java tag
has comment: http://stackoverflow.com/comment/38167541
has body: $( document ).ready(function() { console.log( "ready!" ); var ilceler = "${ilceler}"; }); It doesn't print "Ready!" to console. When I debug with chrome, I saw $( document ).ready(function() { console.log( "ready!" ); var subChildList = ""; ilceler = JSON.parse(" [ {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxxxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxxx","fatherid":"66","fathertag":"il"}, {"id":"x","tag":"xx","name":"xxx xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xx\/xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxx","fatherid":"66","fathertag":"il"}, {"id":"xx","tag":"xx","name":"xxxx","fatherid":"66","fathertag":"il"}]"); }); My data is true, but why this function doesn't work. Note: My data includes UTF-8 characters. Note2: I can work with string instead of json. var a = ${tag} console.log(a) &gt;&gt; "It's my tag"
has comment: http://stackoverflow.com/comment/38167301
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38167161

http://stackoverflow.com/q/24627926
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24628007
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24628044
answer count: 4
has answer: http://stackoverflow.com/a/24628060
has body: I am having some code here to search the existing name during the keyup() event. It got the correct result. But it shows Cannot read property "length" of undefined. Why? function ajax(firstname) { var pathxml; var answer; var result; if(firstname.length== 0) { document.getElementById("hh").innerHTML = ""; return; } if (window.XMLHttpRequest) { pathxml = new XMLHttpRequest(); } else { pathxml = new ActiveXObject("Microsoft.XMLHTTP"); } pathxml.onreadystatechange= function() { if (pathxml.readyState==4 &amp;&amp; pathxml.status==200) { answer = JSON.parse(pathxml.responseText); document.getElementById("hh").innerHTML = ""; } for (var i=0; i&lt;=answer.length; i++) { result = answer[i].firstname + " " +answer[i].lastname + "\n"; document.getElementById("hh").innerHTML += result; } } pathxml.open("GET","books/ax?firstname=" + firstname, true); pathxml.send(); } controller action: def ax @books =Book.where("firstname like ?","#{params[:firstname]}%") render json: @books.as_json end HTML &lt;form&gt; &lt;input type="text" name "search" onkeyup="ajax(this.value);"&gt; &lt;/form&gt; &lt;div id ="hh"&gt; &lt;/div&gt;
has answer: http://stackoverflow.com/a/24628037
type: UnansweredQuestion
has title: Uncaught TypeError: Cannot read property 'length' of undefined?

http://stackoverflow.com/q/24627286
has comment: http://stackoverflow.com/comment/38167594
tagged with: javascript
has comment: http://stackoverflow.com/comment/38167278
score: 0
has body: I would like to install a third party library in a project using Symfony2, the library is dHtmlx and got CSS files, images, and JS files. I don't understand how can I do. The library must be visible on all website's pages so I can't put it in a Bundle. Another problem: Css files have references to images files so I can't separate CSS files from images.
has title: Installing JS library
tagged with: symfony
tagged with: dhtmlx
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38167384
type: Question

http://stackoverflow.com/q/24649924
possible better answer: http://stackoverflow.com/a/24650010
favorite count: 0
tagged with: jquery-events
tagged with: listener
accepted answer: http://stackoverflow.com/a/24650016
upvote count: 1
type: AnsweredQuestion
has body: I'm listening to key and mouse input for 10 seconds, and "recording" the activity by pushing objects to an array that contain the time that the event occurred as well as mouseX and Y for mouse input, and which key was pressed. Eventually I want to run this 'history' back through some animation functions and 'replay' what the user entered. A weird thing is happening, I will press a single key once, and expect at the end, keyCapture to be an array with one object. Instead, I'm getting like 100+ objects and I don't know why. Many of them are duplicates, even the time is identical. function captureInput() { mouseCapture = []; keyCapture = []; $(document).on('mousemove.capture', function(e) { var time = new Date().getTime(); mouseCapture.push({ x: e.pageX, y: e.pageY, t: time }); $(document).on('keyup.capture', function(e) { var time = new Date().getTime(); keyCapture.push({ key: e.which, t: time }) }); }); setTimeout(function() { $(document).off('.capture'); console.log(mouseCapture); console.log(keyCapture); }, 10000); } How can I change my code so I'm only pushing one keyup object for every keyup event?
score: 1
type: Question
has answer: http://stackoverflow.com/a/24650010
answer count: 2
has title: Capturing a single key input event Jquery
has answer: http://stackoverflow.com/a/24650016
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/24631516
has comment: http://stackoverflow.com/comment/38258330
tagged with: extjs4.2
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/38258629
tagged with: javascript
has comment: http://stackoverflow.com/comment/38258817
tagged with: treepanel
has answer: http://stackoverflow.com/a/24677310
score: 0
has comment: http://stackoverflow.com/comment/38174783
answer count: 1
has comment: http://stackoverflow.com/comment/38203348
has body: I have a Main View Port with Border Layout with four regions in it The north region there is a Header which is panel. The South region is footer which is a panel. The East region is also panel. The West region there is Tree Panel. fiddle link Ext.define('projectName.view.mainView', { extend: 'Ext.container.Viewport', requires: [ 'projectName.view.header', 'projectName.view.navigation', 'projectName.view.searchContent', 'projectName.view.content', 'projectName.view.footer', 'Ext.tree.Panel' ], itemId: 'mainView', layout: 'border', initComponent: function() { var me = this; Ext.applyIf(me, { items: [ { xtype: 'container', region: 'center', cls: 'mainContainer', layout: 'border', items: [ { xtype: 'appHeader', height: 100, region: 'north' }, { xtype: 'navigation', region: 'west' }, { xtype: 'searchContent', region: 'west' }, { xtype: 'content', region: 'center' }, { xtype: 'footer', region: 'south' } ] } ] }); me.callParent(arguments); } }); For Tree Panel the code is as shown below. Ext.define('projectName.view.navigation', { extend: 'Ext.tree.Panel', alias: 'widget.navigation', requires: [ 'Ext.tree.View' ], width: 295, animCollapse: true, collapsed: true, collapsible: true, hideCollapseTool: true, title: 'Menu', titleCollapse: false, store: 'navigationStore', rootVisible: false, initComponent: function() { var me = this; Ext.applyIf(me, { viewConfig: { } }); me.callParent(arguments); } }); By the above setting of config the Tree panel should collapse / expand by click on title. But now I want to hide the panel on click of leaf in the Tree. The code shown below is written in navigation selection change i.e tree panel selection change. var record = records[0], text = record.get('text'), xtype = record.get('id'), alias = 'widget.' + xtype, searchContentPanel = this.getSearchContent(), contentPanel = this.getContent(), cmp; if (xtype &amp;&amp; record.isLeaf()) { searchContentPanel.removeAll(true); contentPanel.removeAll(true); var className = Ext.ClassManager.getNameBy…
tagged with: extjs
has title: Tree Panel delay in expand after hiding
tagged with: sencha-architect

http://stackoverflow.com/q/24649778
has body: I need to parse huge XML data and insert the values in a mySQL table. My XML data is in this form, <Summary Booking_strId="CWBL00D7CB8J8U" Booking_lngId="466244159" Trans_lngId="466244159" App_strCode="WEBIN" Event_strType="CT" Trans_dtmBookingStamp="Mon, 30 Jun, 2014 @ 7:00pm" Trans_dtmBookingDate="Mon, 30 Jun, 2014" Trans_dtmBookingTime="7:00pm" Trans_mnyTicketsTotal="7000.0000" Trans_mnyTicketsBookingFee="224.7200" Trans_mnyTicketsDeliveryFee="0.0000" Trans_mnyInventoryTotal="1.0000" Trans_mnyInventoryBookingFeeTotal="0.0000" Trans_mnyInventoryDeliveryFeeTotal="0.0000" Trans_mnyDiscount="0.0000" Trans_mnyTotal="7225.7200" Trans_mnyTicketsTax="0.0000" Trans_mnyTicketNett="7000.0000" Trans_strTicketsTotal="Rs.7000.00" Trans_strTicketsBookingFee="Rs.224.72" Trans_strTicketsDeliveryFee="Rs.0.00" Trans_strInventoryTotal="Rs.1.00" Trans_strInventoryBookingFeeTotal="Rs.0.00" Trans_strInventoryDeliveryFeeTotal="Rs.0.00" Trans_strDiscount="Rs.0.00" Trans_strTotal="Rs.7225.72" Trans_strTicketsTax="Rs.0.00" Trans_strTicketNett="Rs.7000.00" Trans_intTicketsQuantity="2" Booking_strCommitted="Y" Trans_strPaymentReceived="Y" Trans_strPaymentMode="Credit Card/Debit Card" Trans_strPartialCardNo="" Trans_strAlertMail="mantasea@gmail.com" Trans_strAlertMobile="7259179605" Member_lngId="0" Member_strMail="" Member_strName="Customer" Trans_strBarCodeName="CWBL00D7CB8J8U-466244159" Trans_strBarCodeText="CWBL00D7CB8J8U" Trans_strMessage1="" Trans_strMessage2="" Trans_strMessage3="" Trans_strShowBanner="N" Trans_strBannerImage="" Trans_strBannerURL="" Trans_bitSendConfirmationMail="True" Trans_bitSendConfirmationSMS="True" Trans_strTemplate="BookingConfirmation_CT" Trans_bitTPIN="False" Trans_strTPIN="" Trans_strDiscountText="" Trans_strCurrency="Rs." Trans_strPayType="" Trans_strDebtorId="" Trans_strSubDebtorId="" Trans_strKidShirtSize="" Trans_strGuardShirtSize="" Trans_strRaceCat="" Trans_HasETicket="N" Trans_mnyAdditionalCharges="0.0000" Trans_strAdditionalCharges="Rs.0.00" Trans_st…
tagged with: node.js
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
score: 1
tagged with: mysql
upvote count: 1
has title: Xml parsing problems using xml2js
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24714814
tagged with: xml-parsing
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/24714814
favorite count: 0

http://stackoverflow.com/q/24652787
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38214916
has comment: http://stackoverflow.com/comment/38215321
possible better answer: http://stackoverflow.com/a/24652879
has answer: http://stackoverflow.com/a/24652916
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24652879
has body: I am making a little quiz in html with 10 questions, each one in a separate html pages. At the point the user presses the START button in the index.html, I do the following: var s = new Date(); sessionStorage.start_test = s; and when he presses the FINISH button in page 10 of the quiz, I do: var e = new Date(); sessionStorage.finish_test = e; Finally, I have a page where the grade is displayed, and also the time spent in answering the quiz, with the following: var start = sessionStorage.getItem( "start_test" ); var fin = sessionStorage.getItem( "finish_test" ); var time = fin.getTime() - start.getTime(); alert( time ); But this does not seem to work, as it is not displaying the javascript alert box, and in the console I get the following error: Uncaught TypeError: Object Wed Jul 09 2014 13:38:06 GMT+0200 has no method 'getTime' What am I doing wrong? Any help will be very much appreciated!
accepted answer: http://stackoverflow.com/a/24652916
type: Question
answer count: 2
has title: Javascript - getTime() not working
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/38292117
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24692515
type: Comment
has text: What I'm saying is that when I add two or more series for type `column`, each series should have its own color picked from the `colors` array.

http://stackoverflow.com/comment/38262073
type: AnswerComment
score: 0
type: Comment
has text: thanks man, but can we make the value 1,3,2,5,4 instead of 0,1,2,3,3 screencast.com/t/yRlycnZN
comment on: http://stackoverflow.com/a/24666169

http://stackoverflow.com/a/24672711
answers question: http://stackoverflow.com/q/24672654
score: 2
has body: jQuery Draggrable by using jquery you can achieve what you want. simple syntax : on Javascript : $(function() { $( "#draggable" ).draggable(); }); on HTML : Drag me around for the full API reference of jQuery-ui Draggable refer to This you can download jquery-ui from jQuery-ui and select what components fits your needs
downvote count: 0
has comment: http://stackoverflow.com/comment/38252056
upvote count: 2
has comment: http://stackoverflow.com/comment/38252285
has comment: http://stackoverflow.com/comment/38252118
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24672654
type: Answer

http://stackoverflow.com/q/24594306
type: Question
has title: How to pass values to a function
upvote count: 1
has body: I'm trying to add the variables lat and lon to an iframe url. The javascript fetches the location and then I need to include it in the iframe. How do I refer to the lat and lon variables? I've tried this.lat, vicinity.lat etc In my javascript I have var Vicinity = function (pubReference, sessionId, done, err) { this.ad = { getBannerHtml: function() { return '&lt;iframe src="http://foo.com?pr=34&amp;lat'+ this.lat+'=&amp;lon=' + this.lon + '"&gt;&lt;/iframe&gt;'; } }; this.getLatLng = function(vicinity, done, err) { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(done, function(e) { err(vicinity); }, { enableHighAccuracy:true } ); } }; this.init = function(done, err) { var that = this; this.getLatLng(that, function(position) { that.lat = position.coords.latitude; that.lng = position.coords.longitude; }, err); if(typeof done === 'function') done(this); }; this.init(done, err); }; $(document).ready(function() { var pubReference = 1; var sessionId = "1"; var data = new Vicinity (pubReference, sessionId, function(result) { $("#sticky").html(result.ad.getBannerHtml()); } ); });
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/17142285
answer count: 0
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
duplicate of: http://stackoverflow.com/q/24594645

http://stackoverflow.com/a/24690621
type: AcceptedAnswer
downvote count: 0
has body: The problem is with jsfiddle link what have posted: Your script is wrapped in onLoad event. So this line fails to execute. window.onload=function(){ Either you change the wrapped to No wrap in head it works fine. Or you may simply remove the annonymous function in the jsfiddle that will also do: window.onload=function(){ //&lt;-- remove this ... } //&lt;-- remove this EDIT: script jQuery(document).ready(function ($) { $(document).ready(function () { if ($("#mont1").val() == '9') { $("#di1").show(); } }); });
type: Answer
has comment: http://stackoverflow.com/comment/38322322
answers question: http://stackoverflow.com/q/24690203
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24690203
has comment: http://stackoverflow.com/comment/38285928

http://stackoverflow.com/q/24627205
has comment: http://stackoverflow.com/comment/38167604
has comment: http://stackoverflow.com/comment/38167302
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38167108
has body: I'm building an HTML5 voice recording software with visualizer.I want the user when recording the voice, and after uploading the file as wave in a blob (server-side), the user should be able to select the audio format of that file using ffmpeg. what I Have achieved so far is uploading the file as wave.what I still want to do is: On the server side pick your preferable web programming framework The web programming framework accepts the upload and stores the file on the server The web programming framework runs a ffmpeg (command line) which processes the file The user can download the processed file here is my code so far: // variables var leftchannel = []; var rightchannel = []; var recorder = null; var recording = false; var recordingLength = 0; var volume = null; var audioInput = null; var sampleRate = 44100; var audioContext = null; var context = null; var outputString; if (!navigator.getUserMedia) navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; if (navigator.getUserMedia) { navigator.getUserMedia({ audio: true }, success, function (e) { alert('Error capturing audio.'); }); } else alert('getUserMedia not supported in this browser.'); function getVal(value) { // if R is pressed, we start recording if (value == "record") { recording = true; // reset the buffers for the new recording leftchannel.length = rightchannel.length = 0; recordingLength = 0; document.getElementById('output').innerHTML = "Recording now..."; // if S is pressed, we stop the recording and package the WAV file } else if (value == "stop") { // we stop recording recording = false; document.getElementById('output').innerHTML = "Building wav file..."; // we flat the left and right channels down var leftBuffer = mergeBuffers(leftchannel, recordingLength); var rightBuffer = mergeBuffers(rightchannel, recordingLength); // we interleave both channels together var interleaved = interleave(leftBuffer, rightBuffer); var…
tagged with: ffmpeg
type: UnansweredQuestion
has title: Using ffmpeg to convert voice recording captured by HTML5
answer count: 0
has comment: http://stackoverflow.com/comment/38167226
tagged with: html5-audio
type: Question

http://stackoverflow.com/a/24675937
type: AcceptedAnswer
has body: For a progress bar i'd suggest angularjs-bootstrap http://angular-ui.github.io/bootstrap/#/progressbar here is edit of their plunker http://plnkr.co/edit/JNdarF9OUHcK3eRQlhCQ?p=preview use the wizard.step model as progressbar.value {{myProgress*10}}% {{myProgress}} / 10
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24675673
answers question: http://stackoverflow.com/q/24675673
score: 1
downvote count: 0

http://stackoverflow.com/comment/38095586
score: 0
has text: You don't need to manually download the plugin on the computer... it's just like using jquery - you don't download jquery on the computer, you include the script tag and it loads it. The same is with the plugin. Just include the script tag for the plugin right after the jquery script tag and it should work.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24589986

http://stackoverflow.com/comment/38547589
type: Comment
comment on: http://stackoverflow.com/a/24698218
score: 0
type: AnswerComment
has text: I tried this code, but, I didn't get any output. How do I need to implement this one.

http://stackoverflow.com/q/24742407
tagged with: alert
answer count: 0
has body: In one of my site's functions, I have applied the MathJax API to a string of text. I am now trying to convert that string using the text-to-voice API meSpeak.js. I am having a problem with some of the text after the MathJax API transforms it, and I am trying to see ALL of the text and html tags that go with the string (transformText) after the MathJax transform. When I try to take the transformed string and then use innerHTML, all I see is the HTML output (no tags, style elements, etc.) When I try to pass the MathJax-transformed string to a modal alert box I created, I only see the HTML output (since my modal Alert box is really only a fancy div with a high z-index) Only the default alert() shows me all the text/tags/styling. However, there are so many tags and styles applied to MathJax-transformed strings that the default alert box overflows beyond the bottom of the screen: alert(transformText); //contents of default alert box overflow beyond bottom of screen As you probably already know, you can not right/left click nor copy the contents for the in-house alert box (unless this is just me). Is there any way to re-position the default alert box, enable overflow-y:scroll in the default alert box, or somehow otherwise see (or copy) ALL of the MathJax-transformed text/tags/styles for the string transformText? Thanks for any help
type: Question
has comment: http://stackoverflow.com/comment/38384732
has comment: http://stackoverflow.com/comment/38386543
has comment: http://stackoverflow.com/comment/38384286
tagged with: javascript
has comment: http://stackoverflow.com/comment/38384493
score: 0
has title: How do I retrieve the contents of a simple alert box that is overflowing beyond the bottom of my screen?
has comment: http://stackoverflow.com/comment/38392441
has comment: http://stackoverflow.com/comment/38384268
tagged with: innerhtml
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38384701

http://stackoverflow.com/a/24722889
has comment: http://stackoverflow.com/comment/38361309
score: -1
answers question: http://stackoverflow.com/q/24722829
has body: Why not use $.post() ? $.post('/your/service/url/', {username:'asd', password:'qwe'}, function(response){ response; // Here is response });
upvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38354076
downvote count: 1

http://stackoverflow.com/comment/38313917
comment on: http://stackoverflow.com/q/24705387
score: 0
type: Comment
has text: That bases the effect off the position of your cursor. I have no need for that.
type: QuestionComment

http://stackoverflow.com/comment/38375657
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24736591
has text: Are you looking for something like [**this**](http://jsfiddle.net/9K7bf/63/)? If it is, I will explain what is done in the answer. And +1 for the same reason the amenthes has said.
score: 0

http://stackoverflow.com/comment/38346910
score: 0
type: Comment
type: QuestionComment
has text: @vals I add the class in Javascript as I am testing for compatibility. If a browser does not have the 3d transform etc. it will show the front and back of the card above each other. (It's a browser compatibility thing).
comment on: http://stackoverflow.com/q/24719652

http://stackoverflow.com/q/24671016
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38248625
type: AnsweredQuestion
downvote count: 0
score: 1
has title: javascript. How to forbide object properties creation
has answer: http://stackoverflow.com/a/24671128
type: Question
accepted answer: http://stackoverflow.com/a/24671128
tagged with: javascript
has body: I need a way to avoid create custom properties for an object. This is my code: object_to_instance = function () { this["elem1"] = 0; this["elem2"] = 0; // .... this["elem_n"] = 0; } my_obj = new object_to_instance(); my_obj.elem1 =7; What I want is a way to avoid that : my_obj.ele2 = 8 // (The m of elem2 is missing) could be possible. Now I have a ele2 property but I'd want an error! Also, using strict mode does not help. Any ideas ?
has comment: http://stackoverflow.com/comment/38248601

http://stackoverflow.com/comment/112251543
type: Comment
comment on: http://stackoverflow.com/a/38365031
score: 0
type: AnswerComment
has text: @GaganPrajapati could you share your snippet in codepen/jsdiffle ? I'm still not clear about the bug.

http://stackoverflow.com/q/24656679
tagged with: jquery
has body: I have .viewPort Area that contain large element with scroll. And create function some thing like flowing code: jQuery: $('.part').each(function(){ if( $(this).is(':in-viewport') ){ var partID = $(this).attr('id'); if($('.part #content-id-'+(partID)+').length &lt; 1) { partLoader(partID); } } }); function partLoader(id) { // do some ajax actions //$.ajax({....}); console.log('done'); } when I scroll I get a lot of done in console.log and the browser crashed!!! I know that is for sending too much partLoader() to server because of scroll event! so... how can I call partLoader once with scroll?
score: 0
has answer: http://stackoverflow.com/a/24657863
tagged with: jquery-events
tagged with: scroll
has title: How to call function once with scroll function in jQuery?
accepted answer: http://stackoverflow.com/a/24657863
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38222412
has comment: http://stackoverflow.com/comment/38224367
type: Question
tagged with: function
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/24634111
type: Question
has comment: http://stackoverflow.com/comment/38180310
has comment: http://stackoverflow.com/comment/38180117
has comment: http://stackoverflow.com/comment/38180654
tagged with: javascript
has comment: http://stackoverflow.com/comment/38180376
has body: Can anyone help me. I have made looping using javascript but i dont know how to redirect after playing all the text animation. Here's my source code. CSS JS HTML i am.
score: 0
has comment: http://stackoverflow.com/comment/38180232
has comment: http://stackoverflow.com/comment/38180584
tagged with: css
has comment: http://stackoverflow.com/comment/38179976
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/38181103
type: UnansweredQuestion
tagged with: http-redirect
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38180478
linked to: http://stackoverflow.com/q/503093
has title: Redirect after animation
duplicate of: http://stackoverflow.com/q/503093

http://stackoverflow.com/q/24731741
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: Forcing multiple selects (dropdowns) to have unique values
favorite count: 0
possible better answer: http://stackoverflow.com/a/24732036
has answer: http://stackoverflow.com/a/24732036
has comment: http://stackoverflow.com/comment/38365911
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38365096
has comment: http://stackoverflow.com/comment/38366215
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/24732318
accepted answer: http://stackoverflow.com/a/24732318
has body: On my page, there are select dropdown which need to be validated in certain way before I submit the page. Here is how those selects looks like:- HTML 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Rules:- What I want is as follows:- All the selects would be defaulted to Blank Value (-1) Value of 1, 2 and 3 will be uniquely selected for all selects. This means that there would be only one select with a value of "1", only one select with a value of "2" and only one select with a value of "3". All the remaining should have the value of "0". What I did is below in JS. It's basically not much helpful :-( JS $("#submit-selection").click(function(e){ var count_selects = $(".select_style").length; if (count_selects >=5 ) { alert(count_selects + "is >=5"); } else { alert(count_selects + "is <5"); } e.preventDefault(); }); My JsFiddle is JSFiddle Link
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38364779
score: 0
upvote count: 1

http://stackoverflow.com/comment/38219543
comment on: http://stackoverflow.com/q/24653740
score: 0
has text: What do mean by my JSON response is incorrect?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24659204
has comment: http://stackoverflow.com/comment/38264111
answers question: http://stackoverflow.com/q/24658557
has comment: http://stackoverflow.com/comment/38263823
score: 0
has body: You could put the userId in a hit-level custom dimension and have it fire on each hit to GA. Then use a custom segment e.g. userId equals 123, and look at all actions, events, pageviews for that specific user. EDIT: I mistook your code for Universal Analytics, which if you're doing any new implementations, I would highly suggest migrating as you'll get all the new bells and whistles that GA has to offer. But to illustrate how you would track userId at the hit-level, you'll first need to get the clientId: var clientId = ga.getAll()[0].get('clientId'); *Note: if you have multiple trackers, this will only retrieve the first one, and you'll have to wait until ga loads completely in order to get access to the ga object. Next, you would set the clientId in the custom dimension. Set it prior to the pageview, so that every hit on the page gets tagged with the clientId. You should be able to set it prior to the ga('send', 'pageview'); command; however, the ga object might not be available, and then you won't have a value for the customDimension. &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-XXXXXX-Y', 'auto'); var clientId = ga.getAll()[0].get('clientId'); ga('set', 'dimension1', clientId); ga('send', 'pageview'); &lt;/script&gt;
type: Answer
has comment: http://stackoverflow.com/comment/38228018

http://stackoverflow.com/a/24683767
has comment: http://stackoverflow.com/comment/38272879
score: 1
accepted answer of: http://stackoverflow.com/q/24683727
has comment: http://stackoverflow.com/comment/38272912
answers question: http://stackoverflow.com/q/24683727
type: AcceptedAnswer
upvote count: 1
type: Answer
has body: You are comparing string objects not dates. Use a Date() Object var date1 = new Date('05/05/2012'); var date2 = new Date('06/06/2014');
downvote count: 0

http://stackoverflow.com/a/24728518
upvote count: 2
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24716469
has body: Fixed it - but don't understand the root cause: As described above - there was a massive delay every time I clicked the "Next Page" link. Javascript profiling proved that jquery 1.9.1 was hanging for ~6 seconds on b.event.remove(). No idea why. I thought to myself: "Hmm... maybe I've triggered some weirdly inefficient tear-down function. That #stuff div is rather large (lots of sub-forms etc)." So I tried clearing it out first by adding this command to the link click code: $('#stuff').html(''); No dice. Then I tried: $('#stuff').empty(); Same deal - took even longer. On a lark I then tried the non-jquery method: document.getElementById('stuff').innerHTML = ''; It worked! The rest of the click-code executed immediately - no more delay! Question is why?????? Thanks all!
answers question: http://stackoverflow.com/q/24716469
score: 2

http://stackoverflow.com/q/24635339
has comment: http://stackoverflow.com/comment/38183563
has answer: http://stackoverflow.com/a/24638364
type: Question
answer count: 2
score: 2
has comment: http://stackoverflow.com/comment/38183118
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: Basically what I'm trying to achieve is to get a secondary navigation to stick to the bottom of the main navigation as soon as it meets the bottom of the main navigation on scroll. I'm still learning with jQuery and I've started to tear my hair out! EDIT: Realised I didn't explain where I'd got to so far; the class is being added to the element however instead of fixing below the main header it's going off up out of the viewport. EDIT 2: JSFiddle If anyone could offer some help/advice I would appreciate it so much! Outer-Header height: 160px Markup is as follows: HTML &lt;div class="outer-header" id="header"&gt; &lt;header&gt; .... &lt;/header&gt; &lt;/div&gt; &lt;div id="page-wrap"&gt; &lt;div class="upper-content"&gt; ..... &lt;/div&gt; &lt;nav id="secondary_nav"&gt; .... &lt;/nav&gt; CSS .sticky{ position: fixed; top: 206px; /*top of viewport + height of secondary nav and outer-header*/ } JS var stickyNavTop = $('#secondary_nav').offset().top - 160; var stickyNav = function(){ var scrollTop = $(window).scrollTop(); if (scrollTop &gt; stickyNavTop) { $('#secondary_nav').addClass('sticky'); } else { $('#secondary_nav').removeClass('sticky'); } }; stickyNav(); $(window).scroll(function() { stickyNav(); });
favorite count: 0
tagged with: sticky
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38183178
has answer: http://stackoverflow.com/a/24639901
upvote count: 2
tagged with: css
type: AnsweredQuestion
has title: Sticking an element to the bottom of a fixed element on scroll?
possible better answer: http://stackoverflow.com/a/24638364
accepted answer: http://stackoverflow.com/a/24639901

http://stackoverflow.com/comment/38217367
has text: Sorry I have some model to be passed to the view which is pretty big. Return View("Purchase", model). I think then I should post this data right?
comment on: http://stackoverflow.com/a/24653655
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24699394
score: 0
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Angular select option value not setting
has comment: http://stackoverflow.com/comment/38301832
has comment: http://stackoverflow.com/comment/38302129
type: Question
has body: I have my array of objects assigned to $scope.roles: [{"id":1,"friendly_name":"Super Admin"},{"id":2,"friendly_name":"Admin"},{"id":3,"friendly_name":"User"}]; In my HTML I then have the following Super Admin Admin User The value is incorrect, as it should be relating to the id, rather than just starting from 0. Any clues why?
tagged with: javascript

http://stackoverflow.com/comment/38358749
has text: didn't notice the way you organized it, +1
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24727933
type: Comment

http://stackoverflow.com/a/24664225
has comment: http://stackoverflow.com/comment/38236843
type: Answer
has body: This has nothing to do with JavaScript It looks like the base64 encoding for your image is incorrect. This renders a broken image &lt;img src="[binary]"&gt; To get the proper base64 encoding of your image, in your terminal try cat image.png | base64 Or base64 &lt; image.png If you don't have access to terminal-based tools to do this, you can try this online converter: http://webcodertools.com/imagetobase64converter (untested). Learn more about Data URI scheme here Let's try with our own image from the internet https://i.sstatic.net/vNo64.png In your terminal curl https://i.sstatic.net/vNo64.png 2&amp;&gt;1 | base64 Now, take that output and use it as your image data src &lt;img src="data:image/png;base64,iVBOR..."&gt; See it here on jsfiddle
upvote count: 2
has comment: http://stackoverflow.com/comment/38237699
has comment: http://stackoverflow.com/comment/38236877
has comment: http://stackoverflow.com/comment/38237257
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38237094
accepted answer of: http://stackoverflow.com/q/24664199
answers question: http://stackoverflow.com/q/24664199

http://stackoverflow.com/a/24626168
answers question: http://stackoverflow.com/q/24626070
type: Answer
has body: Try this var subarray= []; for(var i = 0; i&lt;yourarray.length; i++) { subarray.push(yourarray[i][1]); //1 for 2nd element } return subarray; Update check this fiddle There were two mistakes in your fiddle 1) you are pushing twice array1 in your Array Array.push(Array1) Array.push(Array1) 2) you are looping using Array1 instead of Array $.each(Array1, function (index, value)
score: 0
has comment: http://stackoverflow.com/comment/38165178
has comment: http://stackoverflow.com/comment/38165152
has comment: http://stackoverflow.com/comment/38165204

http://stackoverflow.com/q/24700615
downvote count: 0
has comment: http://stackoverflow.com/comment/38304133
has comment: http://stackoverflow.com/comment/94426462
favorite count: 0
has comment: http://stackoverflow.com/comment/38304091
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24700826
tagged with: checkbox
score: 18
tagged with: model-view-controller
accepted answer: http://stackoverflow.com/a/24700826
has comment: http://stackoverflow.com/comment/104324962
answer count: 1
has title: Javascript Html.Checkbox onchange event
has body: I tried below event in order to reach onchange of checkbox. @Html.CheckBox("AutoCalculateMandate", true , new { onchange = "AutoCalculateMandateOnChange" }) Javascript: function AutoCalculateMandateOnChange() { alert("working"); } When i try above javascript code , alert never displays nothing(not working). How can i enable/disable below input on Html.Checkbox value changed ? &lt;input type="text" id="LevyFee" class="form-control" data-required="true" "&gt; Any help appreciates. Thanks.
has comment: http://stackoverflow.com/comment/104273231
tagged with: asp.net-mvc
tagged with: javascript
upvote count: 18
type: AnsweredQuestion

http://stackoverflow.com/comment/38336330
type: AnswerComment
score: 0
type: Comment
has text: You can hide it. $('#jumbotronDivId').hide(); call this when you show tab content
comment on: http://stackoverflow.com/a/24717025

http://stackoverflow.com/comment/38291363
comment on: http://stackoverflow.com/q/24693747
has text: @user3695637 what is the response of `alert(xmlhttp2.responseText);`
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38249729
type: AnswerComment
type: Comment
has text: This is a good solution and a very valid workaround! Thanks for this
comment on: http://stackoverflow.com/a/24671602
score: 0

http://stackoverflow.com/comment/130931645
has text: Also from https://en.wikipedia.org/wiki/Cross-site_request_forgery#SameSite_cookie_attribute :`Various other techniques have been used or proposed for CSRF prevention historically. Verifying that the request's headers contain [...] HTTP Origin header. However, this is insecure – a combination of browser plugins and redirects can allow an attacker to provide custom HTTP headers on a request to any website, hence allowing a forged request`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/67020180

http://stackoverflow.com/q/24671100
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41191627
has comment: http://stackoverflow.com/comment/38281711
has title: Cordova Android plugin FileTransfer not returning a callback from native
type: Question
downvote count: 0
tagged with: javascript
has body: I have been trying to figure this out for the last three days and as of yet have not figured out a solution. I'm creating an app for android and iOS in which the iOS version works as it should but the android version is not downloading the content that I need it to in order to actually load the next next page. The issue is that I make a call to download a zip using FileTransfer plugin v0.4.4 the javascript side works fine and I have done a step through on the native source and it's coming through but it is not returning a callback for either success, error or onprogress which means that the scripts that need to run in the callback never get fired. I've looked and the data folder that it's being saved to and the file is being downloaded it is just the callbacks that are not working.Whats even stranger is that sometimes it will work but if I reinstall the app it will 9/10 times start failing again. I've tried reverting to v0.4.2 of the plugin which from research sometimes solved the issue but in my case it has not. Has anyone else encountered this problem at all? or as any idea how to fix it. Thanks in advance
has comment: http://stackoverflow.com/comment/41186690
tagged with: android
score: 1
has comment: http://stackoverflow.com/comment/38253040
favorite count: 0
tagged with: cordova
answer count: 0

http://stackoverflow.com/comment/38321089
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24709157
has text: Inline JS is a clear sign of bad code design and it's hardly maintainable.
type: AnswerComment

http://stackoverflow.com/comment/38270475
comment on: http://stackoverflow.com/q/24670055
score: 0
type: Comment
type: QuestionComment
has text: Is there a link online that we can look at?

http://stackoverflow.com/comment/38329612
comment on: http://stackoverflow.com/q/24713684
score: 0
type: Comment
type: QuestionComment
has text: it's only here, not in the userscript, sorry

http://stackoverflow.com/comment/38161308
has text: a was needed on the end of wrapper, but I've got this working and I *think* I'm starting to get a grip on closure and scope. Thanks ever so much for your help!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24608790
type: AnswerComment

http://stackoverflow.com/a/24734876
downvote count: 0
score: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24733166
answers question: http://stackoverflow.com/q/24733166
type: Answer
has body: I have discovered how to do this: you can use Blob, createObjectURL() and anchor tags. This JSFiddle shows a solution that works in Chrome and Internet Explorer and even supports drag-and-drop saving in Chrome (you can drag the Save-button into Windows Explorer to save the document.) http://jsfiddle.net/fa9y6/9/ First, you must construct a Blob to save: var blob = new Blob([ $('#documentContent').val() ], { type: mimeType }); Saving it as a file is easiest in Internet Explorer: if (window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveOrOpenBlob(blob, filename); } In Chrome (and Firefox), you can construct an anchor tag and click() it: var a = document.createElement('a'); a.download = filename; a.href = window.URL.createObjectURL(blob); a.click(); if (a.remove) a.remove(); To support drag-and-drop file saving, you need to attach a handler to dragstart: if (window.chrome) { document.body.addEventListener('dragstart', function(e) { // Some use a class, here. My sample only has one save button. if (e.target.id == 'downloadButton') { var blob = new Blob([ $('#documentContent').val() ], { type: mimeType }); e.dataTransfer.setData('DownloadURL', [mimeType, $('#fileName').val(), window.URL.createObjectURL(blob)].join(':')); } }); } (I have not performed thorough browser-compatibility testing in older browser versions.)
has comment: http://stackoverflow.com/comment/65830967
upvote count: 4

http://stackoverflow.com/comment/38092566
type: Comment
type: QuestionComment
has text: Please make a http://jsfiddle.net to demonstrate. Also keep in mind that `id` attributes are *not* meant to be duplicative; they are meant to be *unique* to the element. Use a `class` instead.
comment on: http://stackoverflow.com/q/24588701
score: 0

http://stackoverflow.com/q/24646432
tagged with: ajax
possible better answer: http://stackoverflow.com/a/24646957
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38203883
answer count: 4
has comment: http://stackoverflow.com/comment/38203529
type: AnsweredQuestion
has body: This is my sample code. Here on click of a radio button, the if condition should be checked and the following ajax call should be fired. But its always fires the first ajax call $(document).ready(function (){ $('#save').click(function (event) { if ($("#im").is(":checked")) //check not working { $.get('../bus.php', { fxn: 'A', jsn: '{"name":"' + name + '"}' }); } else if ($("#gm").is(":checked")) { $.get('../bus.php', { fxn: 'B', jsn: '{"name":"' + name + '"}' }); } else { $.get('../bus.php', { fxn: 'C', jsn: '{"name":"' + name + '"}' }); } });}); A B c
has answer: http://stackoverflow.com/a/24647046
accepted answer: http://stackoverflow.com/a/24647046
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38203948
has comment: http://stackoverflow.com/comment/38204548
type: Question
has answer: http://stackoverflow.com/a/24646957
has comment: http://stackoverflow.com/comment/38203438
tagged with: javascript
has answer: http://stackoverflow.com/a/24646565
upvote count: 1
has comment: http://stackoverflow.com/comment/38203460
has title: Choosing Ajax Calls by checking radio button
tagged with: jquery
has answer: http://stackoverflow.com/a/24647055
favorite count: 0

http://stackoverflow.com/q/24715666
answer count: 1
has comment: http://stackoverflow.com/comment/38334029
has comment: http://stackoverflow.com/comment/38333377
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38334441
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38333642
has answer: http://stackoverflow.com/a/24716061
has title: How to calculate time interval between two "keyup" events
has body: i need to create some kind of elementary pos with javascript. I have an barcode scanner that work like a keyboard. So i want to automaticaly detect when the input come from the barcode and then create a report with that codes. I think an good idea is to calculate the difference of typing speed because the scanner is really fast: if there a dalay between keyup &gt; 300ms = another scan var speed = new Date().getTime() - lastkey; lastkey = (new Date()).getTime(); console.log(speed); if(speed &gt; 300) { //little delay for prevent computer overhead o_O var create_d = setTimeout(createchange,300) } else { //barcode sanning continue clearTimeout(create_d) } JsFiddle link &lt;
has comment: http://stackoverflow.com/comment/38333260
tagged with: time
has comment: http://stackoverflow.com/comment/38333186
downvote count: 3
upvote count: 1
type: AnsweredQuestion
score: -2
accepted answer: http://stackoverflow.com/a/24716061
has comment: http://stackoverflow.com/comment/38333204
has comment: http://stackoverflow.com/comment/38333405
has comment: http://stackoverflow.com/comment/38334324
type: Question
has comment: http://stackoverflow.com/comment/38334212

http://stackoverflow.com/comment/39876804
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24683275
has text: I have the same problem. It seems Ember data by default not putting the id in the payload for both POST and PUT. What I do, I add another properties in my model as an id but with a different name for example for post I use postId. And before save() i assign the id: postiD = post.id. Ember only prevent us from adding id as model properties. Other name is fine :D
score: 0

http://stackoverflow.com/a/24737064
has comment: http://stackoverflow.com/comment/38374924
has body: Well first, I see something is not right in this line of code: e1.onclick = totalPrice(this); this will not attach totalPrice function to the onclick event of the e1 element. Also, the keyword this in the current context refers to the window object, so there is no meaning to send it as a parameter to the totalPrice function It should be like this instead: e1.onclick = totalPrice; You should also adjust your totalPrice function to get the totalnumber of items and calculate the price accordingly Edit: the function shall look like this function totalPrice(){ var x = this.id; var y = this.value*Number(sessionStorage.getItem("price"+x)); document.getElementById('total'+x).innerHTML = y+' Kč'; }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24736756
has comment: http://stackoverflow.com/comment/38374408
answers question: http://stackoverflow.com/q/24736756
type: Answer
has comment: http://stackoverflow.com/comment/38374535
has comment: http://stackoverflow.com/comment/38374884
has comment: http://stackoverflow.com/comment/38375062
has comment: http://stackoverflow.com/comment/38374758
has comment: http://stackoverflow.com/comment/38375205
has comment: http://stackoverflow.com/comment/38374798
score: 0

http://stackoverflow.com/comment/38162548
type: Comment
comment on: http://stackoverflow.com/a/24615063
score: 0
type: AnswerComment
has text: Everything works but the `$location.path` which for some reason doesn't redirect (the path part is correct if that helps)

http://stackoverflow.com/q/24657953
has comment: http://stackoverflow.com/comment/38225363
answer count: 2
has answer: http://stackoverflow.com/a/24658164
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38225030
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24658164
possible better answer: http://stackoverflow.com/a/24658094
has answer: http://stackoverflow.com/a/24658094
upvote count: 1
has title: Get table cell and row knowing the position
type: AnsweredQuestion
has body: I used this to access a table specific cell $('table').find('td:eq(' + pos + ')'); So, for a 3x3 table,like: the positions would equal: 012 345 678 How can I get the cell positions knowing its position, like knowing 1, to get [0][1]?
score: 1
has comment: http://stackoverflow.com/comment/38225077
type: Question

http://stackoverflow.com/comment/38298107
comment on: http://stackoverflow.com/a/24697629
type: Comment
has text: OP has stated that the HTML cannot be changed. You might want to remove or edit before any downvotes come your way.
type: AnswerComment
score: 0

http://stackoverflow.com/a/24708406
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/38670860
has comment: http://stackoverflow.com/comment/38387350
has comment: http://stackoverflow.com/comment/38638415
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38637218
has body: The issue isn't that you don't have access to the data, the issue is that user making the request doesn't have access to run the query job in the project. For billing and accounting purposes, all jobs (including queries) must be attributed to a Cloud project. The project permissions set who is allowed to run jobs in that project (since the project is responsible for billing). This is true even when you don't have billing enabled, since there is a quota for unbilled query usage that gets charged to the project. So you tried to run a job in the project master-smithy-c33, which the user making the request didn't have rights to. You can set project rights via the google developer console (https://console.developers.google.com/). Or you can run in a different project that you have rights to run jobs in.
has comment: http://stackoverflow.com/comment/38633957
answers question: http://stackoverflow.com/q/24706727
has comment: http://stackoverflow.com/comment/38670418
type: Answer
has comment: http://stackoverflow.com/comment/38670940
accepted answer of: http://stackoverflow.com/q/24706727

http://stackoverflow.com/q/24747884
has comment: http://stackoverflow.com/comment/38394704
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/24747904
has title: Change src of img tag without knowing id or src of replacement
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24747904
has body: I've found some similar questions but never exactly this one: I want to change the src of my img tag &lt;div id="probe1pic"&gt;&lt;img height="193" width="150" src=""/&gt;&lt;/div&gt; and I want to do so with my jquery code from my variable x x = {word: "David", pic: "&lt;img id='pic' src='images/stimuli/david.gif'/&gt;", type: "probe", cat: "perp"} and if I isolate the pic element with x.pic I get: &lt;img id='pic' src='images/stimuli/david.gif'/&gt; I thought about this to get the src element (unsuccessful): x.pic.attr('src') I probably need the id for of the img tag I want to get the attribute from which I do not know beforehand. I do not know the id nor the src beforehand, only my variable x with these elements, so I need to find a way to extract the src element from x (or the id at least). Any ideas?

http://stackoverflow.com/comment/38295368
has text: @zx81, I can accept your answer only after a hour, because somebody else could answer me, you know? This is how SO works...
type: Comment
comment on: http://stackoverflow.com/a/24695872
score: 0
type: AnswerComment

http://stackoverflow.com/q/24627075
accepted answer: http://stackoverflow.com/a/24627467
has title: Jquery Ajax url path Issue
score: 8
has comment: http://stackoverflow.com/comment/38167507
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26590904
has comment: http://stackoverflow.com/comment/38166939
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/24627467
favorite count: 0
possible better answer: http://stackoverflow.com/a/26590904
upvote count: 8
type: Question
answer count: 2
has body: I am trying to design a message system for my website, but i can't get my ajax running. So I make a simpler version of the interaction between the files. Here is my file both test.php and load.php is under the root folder ( public_html). i have the ajax function in test.php. load.php is just simply echoing "wow". $("#test").click(function(){ alert("Clicked."); $.ajax({ url:"/load.php", type:"POST", beforeSend: function(){ alert("testing"); }, success:function(result){ $("#result").html(result); alert(" sss "+result); } }).error(function(){alert("wrong");}); }); Now It works perfectly. ...........how to set relative path ................... Here is the more complicated design 3 files, all in different folder : messages.php (under root) showing all the messages control.php (root/panels) a panel will be included in messages.php load.php (root/functions) control.php will use ajax to call it then display result in control.php so when user load in messages.php, it will load control.php then run the ajax call control.php. I am so confused about how to set up these paths for ajax ( including control.php in messages.php works fine) Thanks
tagged with: php

http://stackoverflow.com/comment/38203119
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24646067
has text: Typically the time in microseconds is enough ;-)

http://stackoverflow.com/a/24725741
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: You can just look at the checked property directly on the clicked on item like this: if (!$(this).prop("checked")) { // code here for when the item is not checked } Once you have the DOM element (which you have in this), there is no need to use further selectors as you can just examine the properties of that item directly.
answers question: http://stackoverflow.com/q/24725687

http://stackoverflow.com/comment/38357401
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24727955
type: Comment
has text: Thank you, and thanks for suggesting the value-add :)

http://stackoverflow.com/comment/38369960
score: 0
type: Comment
type: QuestionComment
has text: I don't know backbone.js and I am a bit lost with your code too... Is your `park_data` available in the render function where you create the marker?
comment on: http://stackoverflow.com/q/24726077

http://stackoverflow.com/q/24643556
upvote count: 1
has body: I am new to this (really new to Jasmine testing, ExtJs, and JS), and I have to fix this bug/error. I am running some unit tests and I keep getting the following error: TypeError: object is not a function TypeError: object is not a function at eval (eval at &lt;anonymous&gt; (...main/lib/ext/ext-4.2.0-gpl/ext-all-debug.js:5499:56), &lt;anonymous&gt;:3:8) at Object.Ext.ClassManager.instantiate (...main/lib/ext/ext-4.2.0-gpl/ext-all-debug.js:5471:53) at Object.create (...main/lib/ext/ext-4.2.0-gpl/ext-all-debug.js:2110:39) at Ext.define.urnSearchBasic (../../../../main/app/model/SecurityGatewayUrnSearchResponse.js:72:26) at urnSearchBasic (...test/spec/model/SecurityGatewayUrnSearchResponseTest.js:68:27) at null.&lt;anonymous&gt; (...test/spec/model/SecurityGatewayUrnSearchResponseTest.js:150:17) at jasmine.Block.execute (...test/lib/jasmine/jasmine.js:1024:15) at jasmine.Queue.next_ (...test/lib/jasmine/jasmine.js:2025:31) at jasmine.Queue.start (...test/lib/jasmine/jasmine.js:1978:8) at jasmine.Spec.execute (.../test/lib/jasmine/jasmine.js:2305:14) timeout: timed out after 10000 msec waiting for passed === true The code for the SecurityGatewanyUrnSeachResponse (posted only partial code from lines 61-84 ) is: 61 urnSearchBasic: function (basic, config) { config = Ext.apply({}, config); var proxy = Deft.ioc.Injector.resolve('securityGatewayUrnMultiSearchProxy'), urn = Ext.create('CAS.securityAdminUrnProv.model.Urn'), formWriter, createdProxy; urn.data.urn = basic; urn.data.pageNo = 0; urn.data.pageSize = this.configData.getUrnPageSize(); 72 formWriter = Ext.create('CAS.securityAdminUrnProv.model.SearchFormWriter'); formWriter.setUrn(urn.data); createdProxy = Ext.create(proxy.$className); createdProxy.url = createdProxy.url + '/basic'; createdProxy.setApiUrl(createdProxy.url); createdProxy.headers = this.configData.getGatewayProxyHeaders(); createdProxy.setWriter(formWriter); this.setProxy(createdProxy); this.save(config); 84 }, Line 72 is causing the problem (Ext.creat…
answer count: 1
tagged with: javascript
tagged with: jasmine
favorite count: 0
tagged with: extjs
has title: TypeError: object is not a function - Javascript, ExtJS, Jasmine and TypeError: Converting circular structure to JSON
has answer: http://stackoverflow.com/a/24643673
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/q/24599644
has body: I wanna toggle 3 div. In the start situation I have the first div that is not trigger able for the clic because its ID. When I click the second or third div (triggered), the DIV clicked have to become unclickable and the others 2 clickable. I attach my live example: http://jsfiddle.net/YV3V5/ HTML: Div 1 Div 2 Div 3 JAVASCRIPT: $( "#selectable" ).click(function(e) { var className = $(this).attr('class'); alert(className); if (className == "btn1") { $("btn1").attr("selectable","not-selectable"); $("btn2").attr("not-selectable","selectable"); $("btn3").attr("not-selectable","selectable"); } else if (className == "btn2") { $("btn2").attr("selectable","not-selectable"); $("btn1").attr("not-selectable","selectable"); $("btn3").attr("not-selectable","selectable"); } else if (className == "btn3") { $("btn3").attr("selectable","not-selectable"); $("btn1").attr("not-selectable","selectable"); $("btn2").attr("not-selectable","selectable"); } }); In this situation when I click the second DIV, it should became unclickable....but nothing happens. Thanks for you're help!
has answer: http://stackoverflow.com/a/24599710
favorite count: 0
has comment: http://stackoverflow.com/comment/38113560
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24599881
answer count: 4
has comment: http://stackoverflow.com/comment/38113628
upvote count: 1
tagged with: toggle
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24599881
has comment: http://stackoverflow.com/comment/38113601
possible better answer: http://stackoverflow.com/a/24599793
has title: jQuery toggle 3 Div
has answer: http://stackoverflow.com/a/24599793
tagged with: switch-statement
type: Question
has answer: http://stackoverflow.com/a/24599825
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery

http://stackoverflow.com/q/24644557
has answer: http://stackoverflow.com/a/24697275
type: Question
has title: How to click a button until the button isn't visible?
tagged with: casperjs
has comment: http://stackoverflow.com/comment/38200133
has body: I'm trying to write a step that clicks a more button until that button changes to display: none;. CLARIFICATION: The page I'm working with is a Google+ business page. There is a more button that loads about 10 reviews at a time until they are all loaded. Once they are, Google sets the button to display: none; I've played around with a ton of different ways to accomplish it. Right now I'm working with something like: This one is not working, and I'm sure there is an elegant way to accomplish this. casper.then(function() { while (this.visible('.d-s.L5.r0')){ console.log("Click"); this.click('.d-s.L5.r0'); } }); This new code is working, but I have to set how many times it repeats which is pretty hacky: casper.repeat(15, function() { console.log("Click"); this.click('.d-s.L5.r0'); this.wait(400); });
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/24697275
has comment: http://stackoverflow.com/comment/38200120
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/comment/38298642
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24697749
has text: How do I refresh page? Should I use onclick="windows.reload()" in the input?

http://stackoverflow.com/comment/38163487
type: QuestionComment
comment on: http://stackoverflow.com/q/24624807
has text: @ChrisPreston Try re arranging "six" element multiple times you can see that it breaks
score: 0
type: Comment

http://stackoverflow.com/comment/38400298
has text: Well, the GC ***should*** be able to do that. IE 6's famous memory leak was because it couldn't work that out—certain circular references were never garbage collected. ;-)
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24748654
type: Comment

http://stackoverflow.com/comment/38319179
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24689611
type: Comment
has text: @DaveLee Yes it's an array. There is a documentation link to the operator manual page in the answer.

http://stackoverflow.com/comment/38286778
has text: @MikeNQ ok no prob, then let this question open.
score: 0
comment on: http://stackoverflow.com/a/24690996
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38173204
comment on: http://stackoverflow.com/q/24630578
has text: You have given the `id` wrong.It should be `$('#campaign_range_ids_4')` not `$('#campaign_beacon_range_ids_4')`
type: Comment
type: QuestionComment
score: 0

timer
tag name: timer
tags question: http://stackoverflow.com/q/24623116
type: Tag
tags question: http://stackoverflow.com/q/24621457
tags question: http://stackoverflow.com/q/24594604
tags question: http://stackoverflow.com/q/24590844
tags question: http://stackoverflow.com/q/24680291

http://stackoverflow.com/q/24682172
tagged with: javascript
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24682255
has body: To test out using JavaScript with PhantomJS I'm trying to write a script that will go to the url "http://phantomjs.org/quick-start.html" and then click on the PhantomJS logo bringing the page to the PhantomJS homepage. My goal is to navigate to a url and successfully click on an html element. However I am getting the error: TypeError: 'null' is not an object (evaluating 'document.querySelector('img [alt ="PhantomJS"]').click') phantomjs://webpage.evaluate():3 phantomjs://webpage.evaluate():5 phantomjs://webpage.evaluate():5 Here is my code: var page = require('webpage').create(); page.open('http://phantomjs.org/quick-start.html', function(status) { console.log(status); page.render('websiteBeforeClick.png'); page.evaluate(function() { document.querySelector('img [alt="PhantomJS"]').click(); }); page.render('websiteAfterClick.png'); phantom.exit(); }); Is my css selector incorrect?
answer count: 1
has title: Phantomjs page automation getting TypeError: 'null'
tagged with: phantomjs
linked to: http://stackoverflow.com/q/15739263
score: 0
has answer: http://stackoverflow.com/a/24682255

http://stackoverflow.com/q/24637408
has answer: http://stackoverflow.com/a/24637462
tagged with: javascript
has answer: http://stackoverflow.com/a/24637660
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24637660
accepted answer: http://stackoverflow.com/a/24637462
has title: javascript :how to insert object to innerHtml?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38186221
tagged with: innerhtml
has body: I create a table dynamically. And I want to add a text into one of the cell. After click the text, it will send an alert. I don't know what's the problem about my code. It looks doesn't work. my code as follows: Row1 cell1 Row1 cell2 Row2 cell1 Row2 cell2 Row3 cell1 Row3 cell2
type: Question

http://stackoverflow.com/comment/38387142
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24743481
has text: You are correct, but I did say `something like this`. God forbid someone might have to slightly adapt an answer that's being given to them in order for it to work perfectly.
type: AnswerComment

http://stackoverflow.com/a/24710011
answers question: http://stackoverflow.com/q/24707328
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38327519
has comment: http://stackoverflow.com/comment/38324768
score: 3
downvote count: 0
type: Answer
has body: Use Meteor.settings. Development Define settings in .config/development/settings.json. Create shell script (dev.sh) in root of your meteor project: #!/bin/bash meteor --settings .config/development/settings.json Instead using command meteor run ./dev.sh Production (deploy using mup) mup init creates 'deployment directory' with generated files mup.json and settings.json. It is important to execute mup init outside of your meteor app directory, so deployment configuration will not be stored on app server. Usage Example of settings.json: { "service_id":"...", "service_secret":"...", "public":{ "service_name":"..." } } If the settings object contains a key named public, then Meteor.settings.public will be available on the client as well as the server. All other properties of Meteor.settings are only defined on the server. server only: Meteor.settings.service_id Meteor.settings.service_secret server and client : Meteor.settings.public.service_name Update: Changed paths accordingly to Hubert OG's comment
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24707328

http://stackoverflow.com/a/24703069
answers question: http://stackoverflow.com/q/24702883
type: Answer
accepted answer of: http://stackoverflow.com/q/24702883
downvote count: 0
has comment: http://stackoverflow.com/comment/38313104
score: 3
has body: try this $('span div').each(function() { $(this).insertBefore('span div:first'); }); http://jsfiddle.net/BS4g3/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38309215
upvote count: 3

http://stackoverflow.com/a/24664297
answers question: http://stackoverflow.com/q/24664021
type: Answer
has comment: http://stackoverflow.com/comment/38236962
score: 1
upvote count: 1
has body: Why not this: 1 Word 2 Words 3 Words 4 Words Js: var wordbank = ['rock', 'paper', 'scissor', 'apple', 'beer', 'potato']; $('#gen').click(function () { var wordCount = document.getElementById('wordCount').value; var wordBin = document.getElementById('wordBin'); words = ''; for (var i = 0; i < wordCount; i++) { if (words != '') words += ' '; words += getRandomWord(); wordBin.innerHTML = words; } }); function getRandomWord() { return wordbank[Math.floor(Math.random()*wordbank.length)]; } http://jsfiddle.net/N988s/3/
downvote count: 0

http://stackoverflow.com/q/24644290
linked to: http://stackoverflow.com/q/13136688
has comment: http://stackoverflow.com/comment/38199370
has comment: http://stackoverflow.com/comment/38199433
has title: Why do some methods modify the calling object in place and others return a value to be assigned?
has answer: http://stackoverflow.com/a/24644326
type: Question
has comment: http://stackoverflow.com/comment/38199495
has answer: http://stackoverflow.com/a/24644426
has comment: http://stackoverflow.com/comment/38199380
tagged with: javascript
upvote count: 3
answer count: 3
accepted answer: http://stackoverflow.com/a/24644418
has comment: http://stackoverflow.com/comment/38199455
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38200159
possible better answer: http://stackoverflow.com/a/24644326
has comment: http://stackoverflow.com/comment/38199445
has comment: http://stackoverflow.com/comment/38199524
has answer: http://stackoverflow.com/a/24644418
has comment: http://stackoverflow.com/comment/38199419
type: AnsweredQuestion
score: 3
has body: For example, in JavaScript if you call Array.sort it sorts the array in place: var myArray = ['c','b','a']; myArray.sort(); // Now the array is sorted Why was sorting in place chosen instead of this: // myArray is preserved, the sortedArray is a sorted copy of myArray var sortedArray = myArray.sort(); Are there best practices for when you should modify an object in place?
tagged with: oop

http://stackoverflow.com/a/24640892
type: Answer
answers question: http://stackoverflow.com/q/24640709
has body: Without seeing the rest of your code, it looks like you might be recursively calling the procesarPdf() too many times in whatever you are doing. Here is a post that gets at the root of why another user was having a similar issue and getting the same error.
score: 0

http://stackoverflow.com/comment/38192102
comment on: http://stackoverflow.com/q/24640260
has text: then try to prepare a http://jsfiddle.net/ you will get more help for sure ;)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24624212
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38224702
has body: lstMultipleValues.Attributes.Add("onClick", "FindSelectedItems('" + txtSelectedMLValues.ClientID + "');"); if IE click event is only the problem then you should use onClick instead of onclick
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24622414
answers question: http://stackoverflow.com/q/24622414
score: 1

mysql
tags question: http://stackoverflow.com/q/24600562
tags question: http://stackoverflow.com/q/24631917
tags question: http://stackoverflow.com/q/24738233
tag name: mysql
tags question: http://stackoverflow.com/q/24709817
tags question: http://stackoverflow.com/q/24634049
tags question: http://stackoverflow.com/q/24707655
tags question: http://stackoverflow.com/q/24728070
tags question: http://stackoverflow.com/q/24602615
tags question: http://stackoverflow.com/q/24592028
tags question: http://stackoverflow.com/q/24633735
tags question: http://stackoverflow.com/q/24734737
tags question: http://stackoverflow.com/q/24704486
tags question: http://stackoverflow.com/q/24709728
tags question: http://stackoverflow.com/q/24689780
tags question: http://stackoverflow.com/q/24723664
tags question: http://stackoverflow.com/q/24599361
tags question: http://stackoverflow.com/q/24699059
tags question: http://stackoverflow.com/q/24650651
tags question: http://stackoverflow.com/q/24635625
tags question: http://stackoverflow.com/q/24632406
tags question: http://stackoverflow.com/q/24732124
tags question: http://stackoverflow.com/q/24588952
tags question: http://stackoverflow.com/q/24602594
tags question: http://stackoverflow.com/q/24683136
tags question: http://stackoverflow.com/q/24649778
tags question: http://stackoverflow.com/q/24594478
tags question: http://stackoverflow.com/q/24682843
type: Tag
tags question: http://stackoverflow.com/q/24601245
tags question: http://stackoverflow.com/q/24696329
tags question: http://stackoverflow.com/q/24701853
tags question: http://stackoverflow.com/q/24714252
tags question: http://stackoverflow.com/q/24703132
tags question: http://stackoverflow.com/q/24657341
tags question: http://stackoverflow.com/q/24651234
tags question: http://stackoverflow.com/q/24648790
tags question: http://stackoverflow.com/q/24591588
tags question: http://stackoverflow.com/q/24647180
tags question: http://stackoverflow.com/q/24741175
tags question: http://stackoverflow.com/q/24728747
tags question: http://stackoverflow.com/q/24675125

http://stackoverflow.com/a/69881804
score: 8
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/24647839
upvote count: 8
has body: You may deactivate ssr for the whole component (check Trect's answer), but it's overkill since you only need to skip one line in ssr. You should only check if document is defined (determining if the function is called server-side -no document- or client-side -document defined-): if (typeof document === 'undefined') { // during server evaluation } else { // during client's browser evaluation } In your case, you don't need to do anything server-side, you may do something like: var body = null; if (typeof document !== 'undefined') { // will run in client's browser only body = document.getElementsByTagName("body")[0]; }

http://stackoverflow.com/a/24679164
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24679003
answers question: http://stackoverflow.com/q/24679003
has body: Your syntax is not correct your code: &lt;input type="submit" value="Confirm" onclick="return(confirm('Confirm that you've chosen ' + "&lt;?php echo $value['info']['title']; ?&gt;"));"&gt; Is going to be rendered as &lt;input type="submit" value="Confirm" onclick="return(confirm('Confirm that you've chosen ' + "Whatever title"));"&gt; You have double quotes in double quotes so it messes with the element rendering and the onclick attribute, you also have a single quote in single quotes: &lt;input type="submit" value="Confirm" onclick="return(confirm('Confirm that you\'ve chosen &lt;?php echo $value['info']['title']; ?&gt;'));"&gt; NOTE This does not mean your php code is being executed from an onclick event, you are simply rendering some text in place where your javascript can use it. So when the page is rendered in the browser your code actually looks like: &lt;input type="submit" value="Confirm" onclick="return(confirm('Confirm that you\'ve chosen Some Title Text'));"&gt;

http://stackoverflow.com/q/24608757
favorite count: 0
linked to: http://stackoverflow.com/q/11780959
has title: SecurityError: The operation is insecure.when using AjaxUpload library
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/16275104
has body: I'm using Valums AjaxUpload library for uploading images, and all of a sudden I'm getting SecurityError: The operation is insecure. errors. Nothing's changed apart from a bit of html, (I've added value attributes to text inputs and a src to an img tag). I've seen a few answers this and this but I'm not sure these apply as this was working before, and now it isn't. I'm uploading files from the same directory I always have been. Has anyone else had the issue with this warning randomly starting to appear? The domain the script is running on doesn't use SSL so I can see any reason this error would be a http/https thing, especially since none of the JS code has changed. EDIT: The error seems to get thrown on this line $('input[name=image]').val(response.data.url); I'll do some digging see if I can figure out why Here's the JS for my upload function new AjaxUpload( $('#imageUpload'),{ action: '/sivactivities/ajax/upload', name: 'image', data: { 'itemId' : DataBridge.itemId }, onSubmit : function(file, ext){ // If you want to allow uploading only 1 file at time, // you can disable upload button this.disable(); }, onComplete: function(file, response){ // enable upload button this.enable(); response = SIV.decode(response); console.log(response); DataBridge.imageHeight = response.data.height; DataBridge.imageWidth = response.data.width; DataBridge.thumbSrc = response.data.url; $('#image-upload-load').hide(); $('input[name=image]').val(response.data.url); $('#uploadedImg').attr('src', response.data.url); } }); And the HTML Image Please make sure this image is 246 x 164 BROWSE
has answer: http://stackoverflow.com/a/24609721
score: 1
duplicate of: http://stackoverflow.com/q/11780959
linked to: http://stackoverflow.com/q/14878406
upvote count: 1
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38153729
has text: look at this documentation https://developers.google.com/maps/documentation/javascript/infowindows#add. I don't see `width`,`heigh`t and `maxHeight` parameters. Did you add an overload for these elements?
type: AnswerComment
comment on: http://stackoverflow.com/a/24619844
score: 0
type: Comment

http://stackoverflow.com/comment/38247761
type: Comment
has text: Just Google it. i found many examples from google.
comment on: http://stackoverflow.com/a/24669860
score: 1
type: AnswerComment

http://stackoverflow.com/comment/38373614
has text: @RoyMJ, thanks for your comment, but I don't think the problem is in the base64 image code, since the 2D drawing are working fine, or am I mistaken something?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24735821
score: 0

http://stackoverflow.com/q/24712970
accepted answer: http://stackoverflow.com/a/24713048
answer count: 1
tagged with: database
tagged with: javascript
score: 0
tagged with: web-sql
tagged with: sqlite
has answer: http://stackoverflow.com/a/24713048
type: AnsweredQuestion
tagged with: nonblocking
has body: I have a problem and no idea how to solve it. I'm working on a small web application. In the application there is a posting system where the users can post articles. Now, when the user logs in, I save his email (which is unique to every user) in the SQLite database and when the user adds a post, I send all the data from the 'post form' and his email to the server (Then I save it in mongoDB). The problem is that the email is always undefined. Here are the relevant parts of the code: Extracting the data from the DB function extractDetalisFromDB(){ db.transaction(queryDB, errorCB); } // Extracting the relevant data - there is always only one user in the db, hence the 'id=1' function queryDB(tx) { tx.executeSql('SELECT * FROM currentUser WHERE id=1', [], querySuccess, onError); } function querySuccess(tx, results) { var len = results.rows.length; currentUserName = results.rows.item(0).name; currentUserEmail = results.rows.item(0).data; } currentUserName and currentUserEmail are global variables. Validating and Posting the form function validateNewPost() { // Here I validate the data from the form... works well. if(error_appear === "false") { extractDetalisFromDB(); console.log(currentUserName + ' ' + currentUserEmail); // This is undefined var newPostJson = { writer: currentUserEmail, title: title.value, artist: artist.value, albumOrSong: albumSong.value, content: content.value, genre: genre.value}; $.post(URLAddress + '/addPost', newPostJson).done(function(data) {}); window.location = '#index'; } } The problem is: The console log and the data I send to the server is always undefined because it happens before the callback functions that retrieves that data from the SQLite ends. How should I refactor my code so that the extraction from the db will end and only then will the data be sent to the server? I looked up this problem but could not find an answer.
has title: Extracting data from SQLite
type: Question

http://stackoverflow.com/q/24700543
downvote count: 1
has title: Google maps API javascript
type: Question
tagged with: google-maps
tagged with: api
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
has answer: http://stackoverflow.com/a/24700828
type: UnansweredQuestion
has body: HI I'm having problem with google maps API on my page http://topdoctor.eu.pn/ where a name associated with doctors includes link to their address. As I'm creating API key in code.google.com under API access and creating the key under Simple API Access where the key is generated. Then I have the scipt on my site var map; var directionsDisplay = new google.maps.DirectionsRenderer({ 'map': map,draggable: true }); var mapprint; function initialize() { var myCenter=new google.maps.LatLng(00,00); var marker; var mapProp = { center:myCenter, zoom:14, mapTypeId:google.maps.MapTypeId.ROADMAP }; map=new google.maps.Map(document.getElementById("googleMap"),mapProp); marker=new google.maps.Marker({ position:myCenter, icon:"Your image path on map", }); marker.setMap(map); var info ="Your Info"; var myOptions = { content: info ,disableAutoPan: false ,maxWidth: 0 ,pixelOffset: new google.maps.Size(20, -158) //used for positioning left,right ,zIndex: null ,boxStyle: { background: "" ,opacity: 1.0 ,width: "220px" } ,closeBoxMargin: "10px 2px 2px 2px" ,closeBoxURL: "" ,infoBoxClearance: new google.maps.Size(1, 1) ,isHidden: false ,pane: "floatPane" ,enableEventPropagation: false ,url:"http://www.topdoctor.eu.pn/" }; var ib = new InfoBox(myOptions); google.maps.event.addListener(marker, "click", function (e) { ib.open(map, this); }); google.maps.event.addListener(map, "click", function (e) { ib.closeListener_ = google.maps.event.addDomListener(map, 'click', ib.getCloseClickHandler_()); ib.close(); }); google.maps.event.addListener(ib, "click", function (e) { window.parent.location.href = "http://www.topdoctor.eu.pn/"; }); google.maps.event.trigger(map, 'resize'); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; &lt;style type="text/css"&gt; body{background-color:#fff;} &lt;/style&gt; &lt;div id="googleMap" class="gmap" style="width: 100%; height: 100%;"&gt;&lt;/div&gt; &lt;div id="map-canvas"&gt; &lt;/div&gt;&lt;!-- map --&gt; but the map doesn't show or…
upvote count: 1
tagged with: php

http://stackoverflow.com/a/24640095
score: 1
has body: Try to convert absolute values of playersOnline to percentage values so that the maximum value of this chart was equal to 100%. But you need to show absolute values in the tooltip. To resolve it, you can use tooltip.formatter. In this callback function you can convert back percentage values of playersOnline to absolute values.
answers question: http://stackoverflow.com/q/24625856
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/38387136
score: 0
type: AnswerComment
has text: I changed `fut.ret` to `fut.return`. That should work.
comment on: http://stackoverflow.com/a/24743650
type: Comment

http://stackoverflow.com/comment/38248284
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24652292
has text: @user3818821 sure! See [this](https://developers.google.com/maps/documentation/geocoding/?hl=ru#GeocodingRequests) link, and I'm update answer.
score: 0

http://stackoverflow.com/comment/38340983
type: AnswerComment
has text: You're welcome. You *might* be able to do it as a browser add-on/extension. But you cannot do that with a script running from your website.
comment on: http://stackoverflow.com/a/24718795
score: 0
type: Comment

http://stackoverflow.com/comment/38305155
comment on: http://stackoverflow.com/q/24701165
has text: So you want static content on the left and right of a carousel? Also, I think you need to remove the bootstrap tag from your question. That tag refers to bootstrap procedures run on the server at start up (it specifically says: NOT to be confused with Twitter Bootstrap in the description).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24593935
has body: I have tried install the yo generator for angular-full-stack. But I just got the following error: "the package yo does not satisfy its siblings' peerDependencies requirements!"
score: 3
type: Question
has title: yo generator installation error: "the package yo does not satisfy its siblings' peerDependencies requirements!"
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38102849
answer count: 0
type: UnansweredQuestion
upvote count: 3

http://stackoverflow.com/comment/38352043
type: Comment
has text: Could you send me some examples about that. I look for it on google but actually i don't understand how to use it.
comment on: http://stackoverflow.com/a/24725267
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38094056
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24589444
has text: thanks, what about the code? do you see anything wrong?
type: AnswerComment

http://stackoverflow.com/a/24644704
has body: Thanks Devnull69, your point 2 was spot on! It was causing an error. No change is needed to the manifest file, all we are doing is checking the ID exists before changing them. Here is the fixed javascript (replace.js) as mentioned above. // Elements on the main page if(document.getElementById('productSelectorTab')){ document.getElementById('productSelectorTab').innerHTML = ' Hello World '; }; if(document.getElementById('downloadCenterTab')){ document.getElementById('downloadCenterTab').innerHTML = ' Hello World '; }; // Elements within an iFrame if(document.getElementById('product0')){ document.getElementById('product0').innerHTML = 'XB4BV31 Hello World'; }; if(document.getElementById('product1')){ document.getElementById('product1').innerHTML = 'XB4BV33 Hello World'; };
answers question: http://stackoverflow.com/q/24622354
score: 0
type: Answer

http://stackoverflow.com/a/24679600
has body: jQuery is clever enough to parse the response as it is, even if dataType isn't specified. In your case, it is specified and therefore, it is already parsed and data is the parsed JSON object. What you are doing is therefore parsing an Object. Doc says: dataType: (default: Intelligent Guess (xml, json, script, or html)) Type: String The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are:
type: Answer
score: 1
answers question: http://stackoverflow.com/q/24679531
upvote count: 1
has comment: http://stackoverflow.com/comment/38265067
downvote count: 0

http://stackoverflow.com/comment/38159555
type: AnswerComment
has text: The directions service can accept either a string representing an address or a google.maps.LatLng specifying coordinates for both the origin and the destination properties of the [DirectionsRequest](https://developers.google.com/maps/documentation/javascript/reference#DirectionsRequest).
type: Comment
comment on: http://stackoverflow.com/a/24622849
score: 0

http://stackoverflow.com/a/24640823
type: Answer
score: 2
answers question: http://stackoverflow.com/q/24640628
has body: There's a difference between undefined and "non-existent" In the first two lines, global and req are existing variables, they just don't have the keys that you're asking for - so you get undefined. However, blah simply doesn't exist - node has no place to even ask for the key you're looking for. Note that you can test for undefined as per this answer. If you had defined blah above, but set no value to it (var blah;), you'd get another undefined error there instead.
downvote count: 0
has comment: http://stackoverflow.com/comment/38193736
has comment: http://stackoverflow.com/comment/38193299
upvote count: 2
has comment: http://stackoverflow.com/comment/38197600

http://stackoverflow.com/a/24715003
upvote count: 4
answers question: http://stackoverflow.com/q/24712534
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24712534
has body: If BadgeSentTo contains the objectId of the User, you'll need to wrap that in a Parse Object. The SDK will convert it to a pointer to _User when it saves. myBadge.set("SentTo", new Parse.User({id: BadgeSentTo}));
has comment: http://stackoverflow.com/comment/38333362
has comment: http://stackoverflow.com/comment/38332815
score: 4

http://stackoverflow.com/comment/38342971
type: Comment
comment on: http://stackoverflow.com/a/24720433
has text: Buddy this fiddle demonstrates that you are wrong: jsfiddle.net/jT8SR/ or maybe your requirements are still not clear.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38354174
comment on: http://stackoverflow.com/q/24726434
has text: No, there's no way to generate random colors in CSS without javascript.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38151033
type: QuestionComment
has text: yes, but make sure req.params.id contains the value... if you're calling a custom endpoint, not a function, I don't think it has what you want.
comment on: http://stackoverflow.com/q/24617006
score: 0
type: Comment

http://stackoverflow.com/comment/38301543
score: 0
comment on: http://stackoverflow.com/q/24685895
type: Comment
type: QuestionComment
has text: @user299448 In that case i have posted a recommended approach below. What kind of data are you working with? If it is Geo-Spacial for example you could use Postgres and PostGIS if you're considering a database.

http://stackoverflow.com/comment/38206220
score: 0
comment on: http://stackoverflow.com/q/24647721
type: Comment
type: QuestionComment
has text: So, with this 3 comments I guess the best way is having a server-generated file with all the "public" (usable by the frontend) data structure/enum definitions from the server. I guess I'll think about a class to generate this static file from multiple backend files, since all the definitions can be in different places..

http://stackoverflow.com/comment/38321418
comment on: http://stackoverflow.com/q/24709336
has text: Inherits what? Local variables? You said properties and methods in your question title but your function has neither of these. You should probably be asking a different question.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38324850
type: Comment
type: QuestionComment
score: 0
has text: Stop browsing to sites like that!!
comment on: http://stackoverflow.com/q/24711090

http://stackoverflow.com/a/24722004
score: -1
accepted answer of: http://stackoverflow.com/q/24721771
upvote count: 0
type: AcceptedAnswer
type: Answer
has body: as long as you are using jQuery, the following code should work: $("#myform").submit(function() { myFunction(); // the form will continue on submission });
answers question: http://stackoverflow.com/q/24721771
downvote count: 1

http://stackoverflow.com/q/24627715
answer count: 1
has comment: http://stackoverflow.com/comment/38168111
has comment: http://stackoverflow.com/comment/38168511
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38168090
has comment: http://stackoverflow.com/comment/38168743
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24627850
type: UnansweredQuestion
type: Question
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/38168164
has title: IE8 binding event in document.ready not working
has body: This is happening in IE8. I am binding a click event like this in a very general way $(document).ready(function () { $('#my-btn').click(function () { // do something }); }); But the click event is not getting called. When I change it to $(document).on() it works fine. I am aware that dynamically loaded DOM elements needs to be bound using this way. But my markup contains my-btn element, so there's no way I am dynamically adding this element. Also, the markup is valid. My &lt;script&gt; tag is also added into bottom. I believe this should be sufficient and I shouldn't have to bind within document.ready? Is there any possible reason which may be causing this? jQuery: 1.10.2
has comment: http://stackoverflow.com/comment/38168058
score: 0
has comment: http://stackoverflow.com/comment/38168078

http://stackoverflow.com/comment/38375564
comment on: http://stackoverflow.com/q/24737457
type: Comment
type: QuestionComment
score: 1
has text: So 'scratch when itch': build the sources array as suggested here; there might be no actual performance issue as long as you have so few images that the assetloader can easily load them... ;-)

http://stackoverflow.com/comment/38380235
type: QuestionComment
comment on: http://stackoverflow.com/q/24739897
has text: I have looked into service, but I have three further functions in this controller which work completely fine. So I do not understand how I would fit those three functions in the service.
score: 0
type: Comment

http://stackoverflow.com/q/24709003
has comment: http://stackoverflow.com/comment/38321153
has answer: http://stackoverflow.com/a/24744148
has answer: http://stackoverflow.com/a/24709079
has title: two js function loading in one page
has comment: http://stackoverflow.com/comment/38387871
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38341323
has comment: http://stackoverflow.com/comment/38321043
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24822422
possible better answer: http://stackoverflow.com/a/24744353
accepted answer: http://stackoverflow.com/a/24744148
has comment: http://stackoverflow.com/comment/38320820
has comment: http://stackoverflow.com/comment/38321175
has comment: http://stackoverflow.com/comment/38321059
has answer: http://stackoverflow.com/a/24744353
type: Question
has answer: http://stackoverflow.com/a/24774195
has comment: http://stackoverflow.com/comment/38521591
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38320964
has comment: http://stackoverflow.com/comment/38320790
has answer: http://stackoverflow.com/a/24743755
has comment: http://stackoverflow.com/comment/38416377
has comment: http://stackoverflow.com/comment/38320927
has comment: http://stackoverflow.com/comment/38397360
has comment: http://stackoverflow.com/comment/38320854
has comment: http://stackoverflow.com/comment/38523709
has comment: http://stackoverflow.com/comment/38529521
has comment: http://stackoverflow.com/comment/38320887
has answer: http://stackoverflow.com/a/24852490
upvote count: 3
has comment: http://stackoverflow.com/comment/38382057
downvote count: 2
has comment: http://stackoverflow.com/comment/38320825
has body: i made a simple website where i have 2 function that loads my pages in menu in one page the problem is when i load one it works ok but when i click on the other same page is load is it not possible to use this kind of function?this is the code $('#firstcontent1').click(function(){ $('#content1').load('pages/firstcontent1.php'); }); $('#firstcontent2').click(function(){ $('#content1').load('pages/firstcontent2.php'); }); $('#firstcontent3').click(function(){ $('#content1').load('pages/firstcontent3.php'); }); this the HTML firstcontent1 firstcontent2 firstcontent3 the other is $('#secondcontent1').click(function(){ $('#content2').load('page/secondcontent1.php'); }); $('#secondcontent2').click(function(){ $('#content2').load('page/secondcontent2.php'); }); $('#secondcontent3').click(function(){ $('#content2').load('page/secondcontent3.php'); }); this is the HTML secondcontent1 secondcontent2 secondcontent3 as you can see the id are different and the page name are different as well as the container but for example i load/click id of pages1, content1 will load pages1 and content2 will load page1 as well..i thought when i click on id pages1 content1 will load pages1 but content2 will not load page1 because i did not click the id of page1. UPDATE: i notice this only content1 is loaded in content2 for example when i click id pages1 content1 and content2 will load pages1 but when i click pages2 only content2 will load and content1 stays the same meaning the correct page
has comment: http://stackoverflow.com/comment/38321070
answer count: 7

http://stackoverflow.com/q/24602661
has title: How to access a data element of a CSV file?
tagged with: d3.js
has answer: http://stackoverflow.com/a/24603396
type: UnansweredQuestion
has body: I have a CSV file as my data set. I am using this code below to load it : var dataset = d3.csv("mydata.csv"); My question is how I can have access to the elements inside the dataset var. As I checked, dataset variable is an object. Imagine I need the data element in row 4 and column 7, how can I get that piece of data?
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
score: 0
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/24604495
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/38120372

http://stackoverflow.com/comment/38259433
comment on: http://stackoverflow.com/q/24657386
score: 0
type: Comment
type: QuestionComment
has text: @jcubic i have given much more detailed regarding old and new angular versions with that right

http://stackoverflow.com/a/53368322
score: 1
upvote count: 1
has body: Change href="#" to href="javascript:void(0)" full example: BEER
answers question: http://stackoverflow.com/q/24707824
downvote count: 0
type: Answer

http://stackoverflow.com/a/24669080
has comment: http://stackoverflow.com/comment/38252113
has body: On newer browsers, you can use the navigation timing API (HTML5 rocks article on navigation timing) to get a fine-grained break down of the time that it takes to load your page. You can simply subtract the relevant fields from "performance.timing" to get the timing that you are interested in. The (secureConnectionStart - connectStart) or (connectEnd - connectStart), depending on whether the connection is an SSL connection, looks like a reasonable approximation of ping time (though, as rekire@ points out, you probably want to include more than just that if you are trying to measure the overall user-visible latency of your website for end users).
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24668875
has comment: http://stackoverflow.com/comment/38253902

http://stackoverflow.com/a/50750067
upvote count: 1
answers question: http://stackoverflow.com/q/24673500
has body: i was able to do it at v.3.9.0 only using CSS .fc-row .fc-content-skeleton{ padding-bottom: 2em; } and add a class to yout event and use: .fc-event.your-class{ position: absolute; bottom: 0; }
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/40287611
has text: But that is exactly hte problem. When you set the position to 0,0,0 your objectcenter must be 0,0,0. if that is not the case you need to edit the vertex positions.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24694706
type: AnswerComment

http://stackoverflow.com/comment/38355477
comment on: http://stackoverflow.com/a/24726558
type: Comment
has text: No, no you dont understand. I´m not sending the html code in all scenarios. Only if there´s an error, in one case and then I have to send back a list of rows to be added into an error table. And precisely I dont want redirect because is when I´m trying to save the info, when I know how many rows cannot be inserted, and then send them back into the view to be added into the DOM. If I have to redirect to check those errors rows again would be repeat the action again, so I think that would be very inefficient.
score: 0
type: AnswerComment

http://stackoverflow.com/q/24713986
has comment: http://stackoverflow.com/comment/38330211
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am facing a little problem using ajax. I need when I change the value of 'select' tag's 'option' then it will call ajax and the value which I get from the ajax call will show in 'input' tag named 't_name'. But its not working. What the problem in my code?How can I solve it? thank you. Below is my code : Select Teacher <?php while($row=mysql_fetch_assoc($teacher) ): ?> <option value="<?php echo $row['t_id'];?>"><?php echo $row['t_name'];?> <?php endwhile; ?> Ajax : $('#teacher_select').click(function(){ $.ajax({ type:'post', url:'get_taken_credit.php', data: 't_id='+ $('#teacher_select').val(), success: function(reply_data){ $('#t_credit').html(reply_data); } }); }); get_taken_credit.php : include('db_connection.php'); $t_id = $_POST['t_id']; $result = mysql_query("SELECT t_credit FROM teacher WHERE t_id = '$t_id'"); echo $result; exit();
tagged with: ajax
has title: Ajax call after changing the value of a 'option' tag
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/38330323
has answer: http://stackoverflow.com/a/24714120
has comment: http://stackoverflow.com/comment/38330221
tagged with: database
type: Question
score: 0

http://stackoverflow.com/a/24732318
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24731741
answers question: http://stackoverflow.com/q/24731741
type: Answer
has body: If i clearly understood your problem, here is solution: Add attribute selected="selected" to each tag "option" with value="-1". Here is JS: $(document).ready(function(){ $("#submit-selection").click(function(e){ var uniqueVals = [1,2,3]; var selectedVals = []; var inputs = $(".select_style"); inputs.each(function(){ if(this.value == -1){ this.value = 0; } var intVal = parseInt(this.value) if(uniqueVals.indexOf(intVal) != -1){ if(selectedVals.indexOf(intVal) != -1){ alert('validation is not passed'); return 0; }else{ selectedVals.push(intVal); } } }); e.preventDefault(); }); }); Fiddle: http://jsfiddle.net/weeklyTea/L9JEK/
upvote count: 2
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/38323936
has text: Unless someone else can reproduce the problem, I don't see how we can help you. It seems like something is messed up in your Chrome, it's not a general problem.
comment on: http://stackoverflow.com/q/24710306
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38294638
has text: Hi FreeAsinBeer, i used the above solution Tree Panel is coming back to its position, but first it moves to the right and then comes back is there any solution that it wont move towards right.
score: 0
comment on: http://stackoverflow.com/a/24677310
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24704570
has comment: http://stackoverflow.com/comment/38359473
score: 1
upvote count: 1
has body: Mobile devices require direct, physical, synchronous interaction from the user to play audio or video. You've avoided the common pitfall of trying to play audio on page load by requiring the user to actually click a button, but you've broken the synchronous rule by making an asynchronous request with $.getJSON. You have stumbled across one of the only exceptions to the "never use synchronous XHRs" rule. I have never recommended this before, but try replacing your play() function with this: function play() { var audioId = $("#btnPlayPause").attr('playing'); //get id of audio $.ajax({ url:"/wap.php/AjaxLoadAudio" data: { audio_id: audioId }, dataType: "json", async: false, success: function(response){ realSounder.src = response.audio_share_url; }, error: function() { console.log("Error"); } }); }
accepted answer of: http://stackoverflow.com/q/24690258
has comment: http://stackoverflow.com/comment/79410460
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24690258
type: Answer

http://stackoverflow.com/comment/38391504
type: Comment
has text: Are you testing this on a running web server? Or are you just loading the file locally from a path @user3829754?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24745533

http://stackoverflow.com/q/24705598
has body: I see a lot of requests about this, looked a bit and didn't see my particular issue but I very well could have missed it. Apologies if so. I'm making a website that calls out to a service stack service. The service is published and hosted on a server. I encountered this error earlier when trying to make a GET call to the service and found that adding this base.SetConfig(new EndpointHostConfig { GlobalResponseHeaders = { { "Access-Control-Allow-Origin", "*" }, { "Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS" }, { "Access-Control-Allow-Headers", "Content-Type" }, }, }); Resolved the issue. Now however when making an ajax call via the site $.ajax({ type: 'POST', url: "https://pirates.com/SHIPSWS/shipDemo", data: { "Bow": $("#BowTypes").val(), "BodyContent": CKEDITOR.instances.body.getData() }, success: function (data) { EmailBody = data; } }) I get the same error XMLHttpRequest cannot load https://pirates.com/SHIPSWS/shipDemo. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:58032' is therefore not allowed access. Which confuses me since I set the above and the GET statements that are called prior in the website through ajax work like a charm. What further confuses me is that if I use say, the postman add on for chrome to make an actual post request to the service. It works without issue. Would anyone have any ideas what I'm doing wrong? Edit #1 Headers via chrome when calling from the local website. Request URL:https://pirates.com/SHIPSWS/shipDemo Request Headers CAUTION: Provisional headers are shown. Accept:*/* Content-Type:application/x-www-form-urlencoded; charset=UTF-8 Origin:http://localhost:58032 Referer:http://localhost:58032/Default.aspx User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 Form Dataview sourceview URL encoded Bow:Front BodyContent: Yarrrrrrr Matey Edit #2 Working Get Call In The Site $.ajax ({ url: "http…
answer count: 2
has comment: http://stackoverflow.com/comment/38314405
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38315430
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/24706412
has comment: http://stackoverflow.com/comment/38316084
has comment: http://stackoverflow.com/comment/38314584
possible better answer: http://stackoverflow.com/a/24705678
tagged with: http://stackoverflow.com/tag/html
tagged with: servicestack
has title: XMLHttpRequest cannot load. No Access-Control-Allow-Origin only on POST call and only through actual local website
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/24705678
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38314165
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38315052
has comment: http://stackoverflow.com/comment/38314204
has answer: http://stackoverflow.com/a/24706412
score: 1

http://stackoverflow.com/comment/38384755
has text: is there any way doing it with javascript and saving the links ? for example if someone has a link for a page Downloads ( http://example.com/index.php#downloads ) would it load the downloads page or will just give an error?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24742577
type: Comment

http://stackoverflow.com/comment/38235296
type: Comment
score: 1
has text: Can't you just do `$(htmlString).find("tr").addClass("someClass"):`
type: QuestionComment
comment on: http://stackoverflow.com/q/24663360

http://stackoverflow.com/comment/38375595
type: AnswerComment
type: Comment
has text: ... though I *thought* jQuery has code to avoid setting things like the "disabled" attribute to the string "true" ...
comment on: http://stackoverflow.com/a/24737748
score: 0

acrobat
type: Tag
tags question: http://stackoverflow.com/q/24636690
tags question: http://stackoverflow.com/q/24624092
tag name: acrobat

http://stackoverflow.com/a/24639010
has body: From what the console outputs it looks like what array.php is returning is an object with arrays in it.
answers question: http://stackoverflow.com/q/24637463
has comment: http://stackoverflow.com/comment/38192096
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38189801

http://stackoverflow.com/comment/38317676
comment on: http://stackoverflow.com/q/24707222
score: 0
type: Comment
type: QuestionComment
has text: @Barmar: LOL, no, Chris is a CSS whiz but not much of a JS guy. (Don't know about Tyler Sticka, as it's a guest post, so not by Chris.)

http://stackoverflow.com/comment/38369195
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24728150
has text: Could you provide a complete working and minimal example please? It's a lot of code and the error is probably due to something small.
score: 0

http://stackoverflow.com/comment/114356655
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/55424097
has text: This pattern is called Active Record https://en.wikipedia.org/wiki/Active_record_pattern I would recommend reading about Data mapper pattern before final decision https://en.wikipedia.org/wiki/Data_mapper_pattern

http://stackoverflow.com/q/24629092
downvote count: 0
tagged with: javascript
tagged with: phonegap-plugins
accepted answer: http://stackoverflow.com/a/24632038
linked to: http://stackoverflow.com/q/24544117
answer count: 3
has comment: http://stackoverflow.com/comment/38173518
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38171519
has comment: http://stackoverflow.com/comment/38171491
favorite count: 0
has comment: http://stackoverflow.com/comment/38171301
possible better answer: http://stackoverflow.com/a/41697609
tagged with: cordova
tagged with: angularjs
has title: PhoneGap Camera , Cannot read property 'getPicture' of undefined
has answer: http://stackoverflow.com/a/41697609
has comment: http://stackoverflow.com/comment/38171060
has comment: http://stackoverflow.com/comment/43174013
has comment: http://stackoverflow.com/comment/38170770
has comment: http://stackoverflow.com/comment/38171077
has comment: http://stackoverflow.com/comment/38171458
has comment: http://stackoverflow.com/comment/38173143
has comment: http://stackoverflow.com/comment/38171275
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/24632038
has body: I am trying to get the Camera API to work in my PhoneGap android app, but i keep getting this error "Cannot read property 'getPicture' of undefined". Now i have checked countless answers on StackOverflow and tutorials all over the web,and tried all the answer there(with no luck), and i cant seem to find the issue. This is the button that calls the function Camera This is the controller that handles the camera myApp.controller('EditProfileCtrl', function ($scope, $http, navigateFactory) { $scope.getPic = function () { navigator.camera.getPicture(onSuccess, onFail, { quality: 60, destinationType: Camera.DestinationType.DATA_URL, sourceType: 1 }); function onSuccess(imageData) { var image = document.getElementById('myImage'); image.src = "data:image/jpeg;base64," + imageData; } function onFail(message) { alert('Failed beause' + message); } }; }); Please comment if there is any additional information required. Any and all help will be hugely appreciated. EDIT: So after following Aravin's advice i added now it atleast looks like something is happening, but now im getting these errors in my eclipse logcat: I/System.out(3871): Error adding plugin org.apache.cordova.CameraLauncher D/PluginManager(3871): exec() call to unknown plugin: Camera
upvote count: 3
has answer: http://stackoverflow.com/a/38914075
has comment: http://stackoverflow.com/comment/38173900
has comment: http://stackoverflow.com/comment/38171209
type: Question
has comment: http://stackoverflow.com/comment/38171546
has comment: http://stackoverflow.com/comment/38170951
has comment: http://stackoverflow.com/comment/38173560

http://stackoverflow.com/comment/103660493
has text: ReferenceError: window is not defined
type: Comment
score: 31
comment on: http://stackoverflow.com/a/44090009
type: AnswerComment

http://stackoverflow.com/a/24657899
accepted answer of: http://stackoverflow.com/q/24657468
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38253032
upvote count: 2
has comment: http://stackoverflow.com/comment/38227730
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24657468
has body: That script remove every text nodes of the parent of the target : $('p').parentsUntil('body').each(function(){ $(this).contents().each(function(){ if(this.nodeType === 3) this.parentNode.removeChild(this); }); }); http://jsfiddle.net/RDNTc/;

http://stackoverflow.com/q/24747603
has comment: http://stackoverflow.com/comment/38394228
has title: validating a dropdown option (menu)
has answer: http://stackoverflow.com/a/24747641
type: AnsweredQuestion
score: 2
has body: Working on a small website that contains a form, one of the options is a drop-down option(menu) that look like this adduser.html Username: Select Level... Boss Employee Password: And I'm doing this to validate if not option is selected uservalidation.php if(empty($_POST['username'])) { die("Enter a username back"); } if(empty($_POST['password'])) { die("Enter a password back"); } if(isset($_POST['level']) && ($_POST['level'] == '1')) { die("Select level back"); } But this is not working any idea why, or how to fix this? Thanks in advance
has comment: http://stackoverflow.com/comment/38394201
has comment: http://stackoverflow.com/comment/38394468
has comment: http://stackoverflow.com/comment/38394314
downvote count: 0
has comment: http://stackoverflow.com/comment/38394174
has comment: http://stackoverflow.com/comment/38394496
has comment: http://stackoverflow.com/comment/38394218
has comment: http://stackoverflow.com/comment/38394300
has comment: http://stackoverflow.com/comment/38394248
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/38394441
has comment: http://stackoverflow.com/comment/38394397
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/24747641
has comment: http://stackoverflow.com/comment/38394326
has comment: http://stackoverflow.com/comment/38394489
has answer: http://stackoverflow.com/a/24747785
accepted answer: http://stackoverflow.com/a/24747785
has comment: http://stackoverflow.com/comment/38394270
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38394518
favorite count: 0
tagged with: php

http://stackoverflow.com/q/24630694
has title: google map info window show on random time
has body: How can I make on google map info window to show on random pin every 3 seconds? Info window shows on a pin, then closes and after 3 seconds is shown on another random pin with the informations of that pin. It's a Wordpress website. Any suggestions?
type: Question
has comment: http://stackoverflow.com/comment/38173390
tagged with: javascript
tagged with: jquery
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/24631099
type: UnansweredQuestion
score: -3
tagged with: php
upvote count: 0
has answer: http://stackoverflow.com/a/24631089
downvote count: 3
tagged with: wordpress

http://stackoverflow.com/comment/38144166
type: Comment
has text: @Boogiechillin So basically your front-end doesn't have to know what is the transformation source. It can be prerecorded static data, some animation or physics engine. You will simply feed transformation to some WebGL rendered like three.js So If you learn how to use it and how to setup WebSockets then it will be trivial task. I'm afraid there is no easy way :)
comment on: http://stackoverflow.com/a/24611617
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38281816
comment on: http://stackoverflow.com/q/24688040
has text: these scripts shows in every page ?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/24660296
upvote count: 3
type: AcceptedAnswer
has body: The feature you can use to solve your problem is dynamic property access using string indexing. obj["foo"] is the same as obj.foo. var properties = myString.split('.'); var obj = {}; var curr = obj; for(var i=0; i&lt;properties.length; i++){ var next = {} curr[properties[i]] = next; curr = next; }
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24660203
score: 3
answers question: http://stackoverflow.com/q/24660203
has comment: http://stackoverflow.com/comment/38233816

http://stackoverflow.com/comment/38396233
type: Comment
score: 0
type: AnswerComment
has text: So I've tried these out. Both javascript:void(0) and #void. Since you said the latter case was preferable, when I do this the URL briefly appends at #void at the end, then loads the new page and it jumps to the top of the page again. I've fixed the height of the frame (a div that contains all the content that varies with the link, and it sits below the menu code) div so that it doesn't change to make sure that wasn't it (it changes height based on the link in my original code). Still trying to think through a solution for this one, and am confused why it doesn't work in my case.
comment on: http://stackoverflow.com/a/24747689

http://stackoverflow.com/q/24672554
tagged with: sapui5
type: UnansweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24688229
has title: SAP UI5: Fill XML-Dropdown dynamically using Lifecycle Hook Function
score: 1
linked to: http://stackoverflow.com/q/55082731
has body: I've done the Tutorial for building Fiori-like UIs with SAPUI5 and tried adding a sort-function. The Dropdown-Box is filled with the Names of the JSON-Model-Data: { "SalesOrderCollection": [ { "SoId": "300000097", "ApprovalStatus": "", "Status": "Initial", "ConfirmationStatus": "", "BillingStatus": "Initial", ... } ... I implemented this function in my View Controller to fill the dropdown: fillDropdown : function(evt) { // Get current view and dropdownbox var oView = this.getView(); var oDropdown = oView.byId("ddbox"); // Get names of nodes in model var metaArray = Object.getOwnPropertyNames(oView.getModel() .getProperty("/SalesOrderCollection/0")); // Add every name to dropdownbox var arrayLength = metaArray.length; for ( var i = 0; i &lt; arrayLength; i++) { oDropdown.addItem(new sap.ui.core.ListItem("item" + i) .setText(metaArray[i])); } } Finally, here comes my problem: How can I run this function automatically when the View gets rendered? I know the lifecycle hook functions onInit &amp; onBeforeRendering but I can't use them in my XML-View: I can register the eventhandler for UI-Elements like here: &lt;uicom:DropdownBox id="ddbox" editable="true" change="handleListSort"&gt; But not for the View or the Page like I tried here: &lt;Page title="myPage" onBeforeRendering="fillDropdown"&gt; &lt;core:View controllerName="sap.ui.demo.myFiori.view.Master" (...) onBeforeRendering="fillDropdown"&gt; Possible dirty workaround: Call the function when clicking on the Sort-Button in the IconTabBar &lt;IconTabBar select="fillDropdown"&gt; Thanks for your help! Update If I used a JavaScript-View instead of an XML-View, I could simply implement my fillDropdown function in the onAfterRendering function of my View. But why do XML Views not throw lifecycle hook events? Update 2 I also can't use the onAfterRendering of my View Controller; oView.getModel().getProperty("/SalesOrderCollection/0"); returns no object because the content of my model is (whyever) only available after the h…
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/55082731
tagged with: http://stackoverflow.com/tag/xml

http://stackoverflow.com/a/24686850
has body: According to the documentation JSON feed is expected to be an array of Event objects. http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/ - first sentence. I made an example feed using the data you provided in yours (modified so it had 3 real dates). https://api.myjson.com/bins/1zibm. You tried to make an Agenda object but it just expects Event objects in an array.
accepted answer of: http://stackoverflow.com/q/24683973
answers question: http://stackoverflow.com/q/24683973
score: 1
has comment: http://stackoverflow.com/comment/38299702
has comment: http://stackoverflow.com/comment/38306688
type: AcceptedAnswer
downvote count: 0
upvote count: 1
type: Answer

http://stackoverflow.com/a/24719477
type: Answer
accepted answer of: http://stackoverflow.com/q/24716316
score: 2
downvote count: 0
has body: After using node.js / express.js in some projects, I have found Kraken's (1.+) structure very useful. It uses folders as part of the routes. Also, it comes with a scaffolding tool, so the mvc structure is easy to keep. This is not the only solution, but it is a good one indeed. Disclosure: This is copy from kraken.js /config Application configuration including environment-specific configs /controllers Routes and logic /locales Language specific content bundles /lib Common libraries to be used across your app /models Models /public Web resources that are publicly available /public/templates Server and browser-side templates /tasks Grunt tasks to be automatically registered by [grunt-config-dir] /tests Unit and functional test cases index.js Application entry point
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24716316

http://stackoverflow.com/q/24744762
favorite count: 0
accepted answer: http://stackoverflow.com/a/24744971
tagged with: twitter-bootstrap
upvote count: 1
tagged with: ruby-on-rails
has title: Fullcalendar 2 not rendering, Bootstrap 3 & Rails 4 Incompatibility? (Jsfiddle included)
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6149961
score: 1
tagged with: fullcalendar
has body: I've been trying to render a calendar in my rails 4 app and the calendar doesn't show up when I'm using Bootstrap 3. I rebuilt the app with JUST the fullcalendar 2 and bootstrap 3 files and it still doesn't render. These are 2 jsfiddles in the comments (each with a separate js call for the calendar). They both use the files I'm trying to require for my app. I've been working for several days on this and I can't understand what's going on. I haven't changed any files or done anything. As you can see, I'm using clean, cdn assets. Any help would be greatly appreciated. Please see jsfiddles in the comment section.
type: Question
has comment: http://stackoverflow.com/comment/38389148
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38389206
has comment: http://stackoverflow.com/comment/38388806
has answer: http://stackoverflow.com/a/24744971
answer count: 1

http://stackoverflow.com/q/24746950
type: Question
has title: Scale Leaflet container to increase performance, issues with calculations
accepted answer: http://stackoverflow.com/a/24866203
tagged with: javascript
score: 0
tagged with: css-transforms
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
type: AnsweredQuestion
tagged with: leaflet
has body: I have a full-screen map that is suffering from some performance issues, due many markers (I'm using Mark Cluster already, wonderful plugin) and the size of it. Then I tought of experimenting with the size. If I shrink the container size by half, and then by CSS3 scale it up twice as big again, I get a huge performance boost! Much like the ol' HTML% Canvas trick (scale it up by CSS). Like this: /* Before */ #map { width:1000px; height:400px; } /* After */ #map { width: 500px; height:200px; -webkit-transform: scale(2,2); ... } However, now the calculations is a bit screwed. For example setZoomAround() calculates wrong point, and pinch-zoom is iffy on mobiles. Also panning is too quick (since its moving twice the speed). I tried to tweak this myself, but am not very involved in the mechanics under the hood in Leaflet. Somewhere I need to counteract this scale by 2, does anyone know this better than me?
has answer: http://stackoverflow.com/a/24866203

http://stackoverflow.com/q/24676552
tagged with: jquery
possible better answer: http://stackoverflow.com/a/24676727
has title: jQuery count link and element
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24676803
answer count: 4
has answer: http://stackoverflow.com/a/24676659
accepted answer: http://stackoverflow.com/a/24676659
type: AnsweredQuestion
has body: I am working on a simple jquery snippet where I add a number on the hand of counted elements to each element. But is something going wrong. I add a link and element with a number for each existing element as #links span, but in the beginning my function gives the numbers 1, 1, 2, 3, 4 etc to the link number, because he sees no #links span's the first time. Watch my jsFiddle to understand my problem: http://jsfiddle.net/RVermeulen/26VeD/ function numbers() { var number = 0; if($('#links span').length <= 1) { number = 1; } else { number = $('#links span').length; } return number; } $('#add').on('click', function() { $('#links').append('Link'+ numbers() +' '); $('#elements').append(' Element '+ numbers() +' '); });
has answer: http://stackoverflow.com/a/24676727
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24676838

http://stackoverflow.com/a/24590241
accepted answer of: http://stackoverflow.com/q/24590194
answers question: http://stackoverflow.com/q/24590194
has body: Disable the button in form submit event instead of the click event. The following code assume $form contains the parent form of $uploadButton. $form.submit(function(){ $uploadButton.attr('disabled', 'disabled'); });
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/24652552
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38214638
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/24660004
type: Question
linked to: http://stackoverflow.com/q/9036429
has title: Openlayer2: Adding a geometry dynamically
tagged with: javascript
has body: I am getting a response JSON from a service and I need to parse it and use the geometry from it to render on a map using OL2. JSON format: {"abc":{"def":[{"ghj":5,"cvb":"m", "geometry":{ "type":"MultiPolygon","coordinates":[[[[-77.09261699781653,38.87124716098509],[-77.09261699781653,38.87125044082939],[-77.09262121055383,38.87125044082939],[-77.09262121055383,38.87126028036227],[-77.09261699781653,38.87126028036227],[-77.09261699781653,38.87126356020657],[-77.09262121055383,38.87126356020657],[-77.09262121055383,38.87127667958376],[-77.09261278507921,38.871279959428044],[-77.09261278507921,38.87127667958376],[-77.09260857234192,38.87127667958376],[-77.09260857234192,38.87126356020657],[-77.0926001468673,38.87126028036227],[-77.0926001468673,38.87125044082939],[-77.09261699781653,38.87124716098509]]]],"crs":{"type":"name","properties":{"name":"epsg:4326"}} } }]}} OL2 code: var featurecollection = { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { response.abc.def[0].geometry } ] }; var geojson_format = new OpenLayers.Format.GeoJSON(); var vector_layer = new OpenLayers.Layer.Vector(); map.addLayer(vector_layer); vector_layer.addFeatures(geojson_format.read(featurecollection)); } what I am doing wrong or how to do it in right way? EDIT: Entire file as follows: GeoJSON Example
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38214850
has answer: http://stackoverflow.com/a/24660004
tagged with: openlayers
has comment: http://stackoverflow.com/comment/38221308

http://stackoverflow.com/comment/92103922
type: Comment
type: QuestionComment
score: 1
has text: I can confirm that using `var` works.
comment on: http://stackoverflow.com/q/24721226

http://stackoverflow.com/q/24722585
tagged with: http://stackoverflow.com/tag/html
has body: I want to highlight elvis presley. elvis my name is elvis presley
has answer: http://stackoverflow.com/a/24722765
has title: Highlight text inside different html tags
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24722661
score: 0
has answer: http://stackoverflow.com/a/24722720
answer count: 3
type: UnansweredQuestion

http://stackoverflow.com/q/24589698
tagged with: javascript
has comment: http://stackoverflow.com/comment/38097364
answer count: 3
has comment: http://stackoverflow.com/comment/38094647
tagged with: public
has answer: http://stackoverflow.com/a/24589754
favorite count: 0
has title: Javascript Uncaught ReferenceError Error for defined functions
downvote count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/24589732
has answer: http://stackoverflow.com/a/24589732
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24589736
has body: I am trying to write a public function that can be called within the object function and also outside the object function. For example, here is a very simple greeting object with a public function hello that prints hello. var greeting = function() { this.hello = function(){ console.log("hello"); } this._hello = function() { hello(); // first call, Uncaught ReferenceError: hello is not defined } _hello(); // second call, Uncaught ReferenceError: hello is not defined } var g = new greeting(); g.hello(); // third call, Good The hello function is obviously defined in the greeting function itself, but Why it is getting Uncaught ReferenceError: hello is not defined from the first call and the second call, but not in the third call above.
accepted answer: http://stackoverflow.com/a/24589754
score: -1
has comment: http://stackoverflow.com/comment/38095227
type: Question
tagged with: function

http://stackoverflow.com/q/24723164
tagged with: spreadsheet
tagged with: javascript
tagged with: jquery
has body: I checked already that if this was asked by others. But, every question was regarding input or textarea only and there was no perfect answer for me. Please note that I want this to work on div keydown. I have set div tabindex already and I can get key codes in keydown event for that div. I am creating a spreadsheet in javascript using jQuery. And, in spreadsheet user starts typing on any cell in any row in any column. Now, I want to detect if a valid character is pressed so that I show the editing textbox right away in the selected cell. So, when I convert keyCode to character using String.fromCharCode, I get a character for everything even if it is shift key or ctrl key. So, this is not what I want. This will give me 2 characters for shift &amp; lets say G. I do not know how to check if only a valid character like a, h, 0, 7 etc. was pressed by the user so that I show him the editing cell right away like google sheets or microsoft excel does. Also, I could have done it checking >= 65 and so on. But, I want to make it work for every type of keyboard in every language. I am sure that its a very difficult job to achieve this, but I wonder how Google and Microsoft do this. Any help will be greatly appreciated.
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38582847
favorite count: 0
has comment: http://stackoverflow.com/comment/38348848
tagged with: keydown
has title: How to check keydown on div that if a valid character was pressed
has answer: http://stackoverflow.com/a/24729502
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/38572204
type: Question
has comment: http://stackoverflow.com/comment/38347996
accepted answer: http://stackoverflow.com/a/24729502
has comment: http://stackoverflow.com/comment/38348535

http://stackoverflow.com/comment/60532672
type: Comment
comment on: http://stackoverflow.com/a/33266798
has text: @sivatumma, see here for an example: https://github.com/Download/polymer-cdn/blob/master/lib/paper-tabs/demo/tabs-with-content-example.html
score: 1
type: AnswerComment

http://stackoverflow.com/comment/38466568
has text: That's a file URI. You're supposed to just pass it a file path. `.send(new File("C:\\Temp\\test.txt"));`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24746459
type: Comment

http://stackoverflow.com/comment/38282996
has text: I think the OP rather wants to use `data: JSON.stringify(loginCredentials), contentType: 'application/json'`, but you're right: +1
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24689110

http://stackoverflow.com/comment/38338329
comment on: http://stackoverflow.com/a/24717916
has text: In order for this to work I would need to put the {{}} into an empty page except for the content type. As far as I know I won't be able to execute angularjs javascript in that page.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24680750
accepted answer: http://stackoverflow.com/a/24681161
tagged with: firefox
has title: Show an alert from a Firefox extension when a browser window opens
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/38267650
tagged with: firefox-addon
has answer: http://stackoverflow.com/a/24681161
favorite count: 0
has body: I'm trying to make a very simple Firefox extension. I need it to show an alert box when the Firefox window opens. The message doesn't show up when I open the window but it does when I reload all chrome (through the Extensions Developer Add-On). My overlay file: &lt;?xml version="1.0"?&gt; &lt;overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&gt; &lt;script type="application/x-javascript" src="chrome://adTest/content/alert.js" /&gt; &lt;/overlay&gt; My script file: alert("HI!"); My chrome.manifest file: content adTest content/ contentaccessible=yes overlay chrome://browser/content/browser.xul chrome://adTest/content/adTestOverlay.xul I'm pretty sure the rest of the code is correct because I've added XUL elements for testing purposes and everything worked apart from the alert box.
has answer: http://stackoverflow.com/a/24687037
tagged with: xul
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/38267384
possible better answer: http://stackoverflow.com/a/24687037
type: Question
answer count: 2

http://stackoverflow.com/comment/38368476
has text: @ivarni does the controller always die?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24733790

http://stackoverflow.com/comment/38297868
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24697272
has text: Is it possible to refresh just the div after clicking the radio button?

http://stackoverflow.com/comment/38178811
score: 0
type: Comment
has text: You can always resort to a hidden field for a variable. ;)
comment on: http://stackoverflow.com/a/24632784
type: AnswerComment

http://stackoverflow.com/comment/38165208
type: QuestionComment
comment on: http://stackoverflow.com/q/24625697
score: 0
has text: Probably an encoding error, but without a link to your site, we'd just be taking wild guesses.
type: Comment

http://stackoverflow.com/q/24600526
favorite count: 0
type: Question
score: 1
tagged with: meteor
tagged with: asynchronous
has title: Meteor / Node.js: Multiple http requests within a for loop, evenly across a timed interval?
has body: Dear fellow JS developers - I'm trying to make a batch of server-side http requests within a Meteor app on a timed interval and make updates to the MongoDB database based on the responses received. Every 15 seconds, the batch of requests should begin and the set of requests should be spread evenly across the 15 seconds (rather than flooding the API server all at once). To spread the requests evenly, I am attempting to use the setTimeout method. There are two parameters that change between each http request, and these varying values are stored in two separate arrays. Rather than spelling out each and every http request (if you count all the combinations between the two arrays, 20*4=80), I've written a for loop within a for loop to greatly consolidate the code. For each response, if it comes back OK, two switch statements handle how the response should be treated by evaluating it's i and y values. The problem: I seem to be in "callback hell". When the responses arrive from the server, the values of i and/or y sometimes have already been incremented by the loop system, so I cannot with 100% certainty handle the responses with the switch statements. The updatedb() function ends up performing certain calculations on the wrong responses (storing them in the wrong places in the database). Hoping someone can provide some guidance on what I can do differently to fix this as I'm at my wit's end. P.S. I tried doing this with a recursive approach but got a Maximum call stack size exceeded error. test = function test(){ // API base URL var baseURL = "https://example.com/"; // Array1 var array1 = ['item1', // i = 0 'item2', // i = 1 'item3', // i = 2 'item4', // i = 3 'item5', // i = 4 'item6', // i = 5 'item7', // i = 6 'item8', // i = 7 'item9', // i = 8 'item10', // i = 9 'item11', // i = 10 'item12', // i = 11 'item13', // i = 12 'item14', // i = 13 'item15', // i = 14 'item16', // i = 15 'item17', // i = 16 'item18', // i = 17 'item19', // i = 18 'item20']; // i = 19 // Arra…
has answer: http://stackoverflow.com/a/24605409
possible better answer: http://stackoverflow.com/a/24600570
answer count: 2
has answer: http://stackoverflow.com/a/24600570
upvote count: 1
linked to: http://stackoverflow.com/q/750486
tagged with: node.js
accepted answer: http://stackoverflow.com/a/24605409
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38116791
downvote count: 0
tagged with: javascript
tagged with: callback

http://stackoverflow.com/comment/38374301
type: Comment
score: 0
type: AnswerComment
has text: This would depend on the database that you are using. The way you could structure it is to have a database running wherever your application is hosted. Then whenever the form is submitted, your application would be able to access the database and save the information. I would recommend you check out MongoDB if you are considering different database solutions.
comment on: http://stackoverflow.com/a/24698590

http://stackoverflow.com/a/30631265
score: 0
type: AcceptedAnswer
has body: Request.Form['videoPlayer' + count] More generally you can use Request.Form['clientID'] for dynamically created controls.
type: Answer
accepted answer of: http://stackoverflow.com/q/24641388
answers question: http://stackoverflow.com/q/24641388

http://stackoverflow.com/a/24819617
answers question: http://stackoverflow.com/q/24740474
score: 0
accepted answer of: http://stackoverflow.com/q/24740474
type: AcceptedAnswer
has body: For anyone else out there, I found the problem: The path I specified above was a relative path that worked on my system but not on the server because the working directories are obviously different. So instead of using a relative path, I just changed the script to have the correct absolute path. To find the current working directory path, just enter pwd into terminal.
type: Answer

http://stackoverflow.com/comment/38295547
score: 0
comment on: http://stackoverflow.com/q/24696238
type: Comment
type: QuestionComment
has text: @Grimbode if this is Javascript, the semicolon is optional.

http://stackoverflow.com/q/24682843
tagged with: arrays
has title: can i move array from php to javascript retrive from mysql database
has comment: http://stackoverflow.com/comment/38271384
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38271416
has answer: http://stackoverflow.com/a/24683197
downvote count: 2
upvote count: 1
answer count: 1
duplicate of: http://stackoverflow.com/q/23740548
favorite count: 0
has body: my php code get_marker_connect2.php <?php $servername = "localhost"; $username = "root"; $passcode = ""; $dbname = "complaint_system"; $con=mysqli_connect($servername,$username,$passcode,$dbname); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } //store query $result = mysqli_query($con,"SELECT l_longitude,l_latitude FROM register_complain"); echo " Latitude Longitude "; while($row = mysqli_fetch_array($result)) { echo " "; echo " " . $row['l_longitude'] . " "; echo " " . $row['l_latitude'] . " "; echo " "; } echo " "; header('Location:http://localhost/cca/View_Map.html'); mysqli_close($con); ?> This is my javascript named as javascript1.js function initialize() { var myLatLng = new google.maps.LatLng(24.86, 67.01); var mapOptions = { center: myLatLng, zoom: 14, mapTypeControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP}; alert('alert array here'); /*for (var i = 0; i < latlong1.length; i++) { alert(" Longitude = ". latlong1[i].longitude); alert(" Latitude = ". latlong1[i].latitude); } */ map = new google.maps.Map(document.getElementById("view-map"), mapOptions); var marker = new google.maps.Marker({ position: simple, map: map, title: 'Hello Karachi!'}); } google.maps.event.addDomListener(window, 'load', initialize); can i move php array $row['l_longitude'] and $row['l_latitude'] directly to my javascript? i have google it alot but have not found solution yet. i want to alert that array in my javascript at "alert array here"
has comment: http://stackoverflow.com/comment/38271116
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/23740548
tagged with: mysql
accepted answer: http://stackoverflow.com/a/24683197
type: Question

http://stackoverflow.com/comment/38303999
score: 0
has text: @AlexC That's the concern I had. This particular app isn't large at all, but I wasn't sure if there was a "better way" to handle routing for a larger app. I'll go with direct `$location` calls for this app but keep the advice in mind for future projects.
comment on: http://stackoverflow.com/q/24699779
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24738989
has comment: http://stackoverflow.com/comment/38378085
has comment: http://stackoverflow.com/comment/38378951
upvote count: 0
answer count: 1
tagged with: javascript
score: -6
favorite count: 0
type: UnansweredQuestion
has body: I am in group of teachers getting ready to teach Computer Science next year to high schoolers who have most likely never programmed before. We were looking for a quick reference chart that lists the same functions across several languages. We are using python, javascript, php, css, and html. We go in depth on python and just touch the surface of the others so we wanted to find a chart that would compare the functions in pythons to other languages for quick reference as students begin programming. EX. Nesting Python - Indentation Javascript - "{}" End line Python - colon after function, otherwise nothing Javascript - nothing after function, otherwise semicolon If anybody has a resource like this we would greatly appreciate it!
has title: Common Language Function Chart
tagged with: python
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/24739218
downvote count: 6
type: Question

http://stackoverflow.com/comment/38120221
has text: use a database with built-in geo features, like mongoDB
comment on: http://stackoverflow.com/q/24602594
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/38191466
has text: You don't need to repeat something that you already wrote in your question (`page is not showing in chrome.. it is working fine in safari`). Anyway [jsfiddle.net/YSg36](http://jsfiddle.net/YSg36/) runs perfectly fine (I just set `graph` directly to test). So either your callback gets an error instead of graph or something else is wrong. But no matter what it is, if it works in Safari and not in Chrome and that is all you code then there **IS** an error message in the console, that tells you what is wrong. Or did you disable js in Chrome?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24628232

http://stackoverflow.com/comment/38321323
has text: please elaborate your goal on this code.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24709274

http://stackoverflow.com/comment/45911588
comment on: http://stackoverflow.com/a/24661816
score: 1
type: AnswerComment
has text: That's kind of limited. For example if you have a scripts task that builds your scripts and in some cases you want to do a clean task first. In gulp you have to make 'clean' a dependency of scripts. This has the effect that clean becomes mandatory.
type: Comment

http://stackoverflow.com/a/24683937
score: 0
has comment: http://stackoverflow.com/comment/38274259
type: Answer
has body: you can get selected objects from the selectedItems property of ngGrid. Also, you can get id from selected object itseld and his index in data source array and pass this data into deleteProviderMedicalService function for each selected item. var selectedItems = []; $scope.gridOptions = { data: 'myData', showSelectionCheckbox: true, selectedItems: selectedItems }; $scope.deleteSelected = function(){ angular.forEach(selectedItems, function(svc){ $scope.deleteProviderMedicalService(svc.id, myData.ondexOf(svc)); }); };
answers question: http://stackoverflow.com/q/24683678

http://stackoverflow.com/comment/38288692
type: QuestionComment
has text: Create a wrapper of over content with display:none; once you check using document.ready() just change the wrapper style to `visible` also you can add "loading please wait.." div out of wrapper to make it more interactive.
comment on: http://stackoverflow.com/q/24684003
score: 0
type: Comment

http://stackoverflow.com/a/24725270
has comment: http://stackoverflow.com/comment/38451727
score: 0
has comment: http://stackoverflow.com/comment/38507163
type: Answer
has comment: http://stackoverflow.com/comment/38446842
has comment: http://stackoverflow.com/comment/38451119
has body: You can get the height of the body of the html element and set the height to the iframe:- var iframe = document.createElement("iframe"); iframe.src = 'test.html'; iframe.style.width = "100%"; iframe.onload = function(){ iframe.contentWindow.document.body.style.margin = 5+'px'; iframe.style.height = (iframe.contentWindow.document.body.clientHeight+10)+"px"; } iframe.frameBorder = 0; document.getElementById("loadContainer").appendChild(iframe);
has comment: http://stackoverflow.com/comment/38402687
has comment: http://stackoverflow.com/comment/38506293
has comment: http://stackoverflow.com/comment/38402718
has comment: http://stackoverflow.com/comment/38451814
has comment: http://stackoverflow.com/comment/38399415
answers question: http://stackoverflow.com/q/24723467

http://stackoverflow.com/comment/38260440
type: QuestionComment
has text: which editing mode you use? The problem is that `custom_func` of `editrules` is **common** property used for form editing, inline editing and cell editing. The error message will be shown in **different ways** depend of editing mode.
score: 0
comment on: http://stackoverflow.com/q/24676643
type: Comment

http://stackoverflow.com/comment/38309648
type: QuestionComment
comment on: http://stackoverflow.com/q/24703378
has text: You could insert a newline after X characters, but you would just be guessing as to the width of the text unless you had a fixed width font.
score: 0
type: Comment

http://stackoverflow.com/comment/38367669
type: QuestionComment
comment on: http://stackoverflow.com/q/24733434
score: 0
has text: Please post your current code. Nobody can help you with just an image.
type: Comment

http://stackoverflow.com/q/24698005
has comment: http://stackoverflow.com/comment/38473121
upvote count: 3
has body: Im using http://aehlke.github.io/tag-it/ for tagging but I am having a hard time adding a value when the autocomplete comes up and you hit enter or tab. If I use my mouse I can easily select a value like so: And click on the value it correctly selects it: However if I use the enter key it only adds the tag based on the text I've typed so far... For instance, assume I wanted to add "tryme" as a tag so I start typing try and I use my cursor on my keyboard and select the value I want and I hit the enter key I end up like so: Before: Then I press enter, I get "try" instead of "tryme": Here is my code: var entityId = '&lt;%=(int)Module.Company%&gt;'; //parameter for web service. $("#MainContent_txtTags").tagit({ singleField: true, singleFieldDelimiter: " ", autocomplete: ({ delay: 0, minLength: 1, source: function(request, response) { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "/Code/WebServices/Tags.asmx/GetTags", dataType: "json", data: '{"entityId":"' + entityId + '","search":"' + request.term + '"}', success: function(data) { response($.map(data.d, function(item) { return { label: item.TagName, value: item.TagName } })); } }); }, open: function() { $(this).removeClass("ui-corner-all").addClass("ui-corner-top"); }, close: function() { $(this).removeClass("ui-corner-top").addClass("ui-corner-all"); }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); }, search: function(event, ui) { $(this).addClass('autocompleteloading'); // custom minLength var term = extractLast(this.value); //alert(term); if (typeof(term) !== 'undefined') { if (term.length &lt; 1) { return false; } } return true; }, select: function(event, ui) { alert("hi"); }, focus: function() { // prevent value inserted on focus return false; }, response: function() { $(this).removeClass('autocompleteloading'); } }) }); I tried playing with the select event but that only fires when I use the mouse. How can I handle the enter / tab key using this librar…
has comment: http://stackoverflow.com/comment/38298959
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38467002
has answer: http://stackoverflow.com/a/24761202
accepted answer: http://stackoverflow.com/a/24761202
has title: How to add value in autocomplete when pressing tab or enter?
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38418553
has comment: http://stackoverflow.com/comment/38299271
has comment: http://stackoverflow.com/comment/38298990
possible better answer: http://stackoverflow.com/a/24698137
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38407952
has comment: http://stackoverflow.com/comment/38298961
tagged with: tag-it
has comment: http://stackoverflow.com/comment/38298925
tagged with: javascript
has comment: http://stackoverflow.com/comment/38416561
tagged with: jquery
has answer: http://stackoverflow.com/a/24698137

http://stackoverflow.com/a/24605290
score: 0
answers question: http://stackoverflow.com/q/24605210
type: Answer
has body: With respect to your angle of code.. try the below one. function call(){ var i=0; setInterval(function(){ document.getElementById("pics").innerHTML="&lt;img src='img"+i+".jpg' width=300 height=300 alt='image' /&gt; "; i++; if(i&gt;=3){ i= i%3; } },3000); } "pics" is a div tag declared in html page.

http://stackoverflow.com/comment/38209983
type: Comment
has text: That's perfect. How come I have to ignore the container width (so no `-300`)?
comment on: http://stackoverflow.com/a/24649829
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38317101
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24705720
has text: That would make it wonderfully easy, but unfortunately I have a click event attached to the text. Basically I want the text to be my click element and my circle to be my drag and collapse element.

http://stackoverflow.com/a/24730978
score: 4
accepted answer of: http://stackoverflow.com/q/24730529
upvote count: 4
answers question: http://stackoverflow.com/q/24730529
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Your HTML markup is wrong it should be &lt;div id="d1" style="background-color:blue;"&gt; syntax for setAttribute element.setAttribute(name, value); check attribute reference so, the javascript code should be var m=document.getElementById('d1'); m.setAttribute("style","height:50%"); because height can be directly applied to the following elements &lt;canvas&gt;, &lt;embed&gt;, &lt;iframe&gt;, &lt;img&gt;, &lt;input&gt;, &lt;object&gt;, &lt;video&gt; Live Example http://codepen.io/krish4u/pen/bicCL(in example height set to 50px In your case you can use %

http://stackoverflow.com/a/24747914
answers question: http://stackoverflow.com/q/24746104
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38419297
has comment: http://stackoverflow.com/comment/38420733
has body: The primary issue is that you are sending back the results in the response before they have been fully retrieved. Your res.json(results) is outside the Message.find(...) callback. Additionally, since you push the attendee object onto the results array in that same callback, it too will be missing, and your returned results array will simply be the original empty array. You need something more like this: router.route('/data') //get all data .get(function(req, res) { var results = []; Attendee.find(function(err, attendees) { if (err) {res.send(err);} else { q.all(attendees.map(function(attendee) { return Message .find({userID: attendee._id}, "") .exec() .then(function(messages) { results.push({ attendee: attendee, messages: messages }); }) })) .then(function() { res.json(results); }) } }); });

http://stackoverflow.com/q/24736632
tagged with: javascript
has comment: http://stackoverflow.com/comment/38373599
accepted answer: http://stackoverflow.com/a/24737647
score: 0
answer count: 2
tagged with: jquery
has title: jQuery, add days to date
has comment: http://stackoverflow.com/comment/38373652
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24736936
type: Question
has answer: http://stackoverflow.com/a/24736936
has answer: http://stackoverflow.com/a/24737647
has body: In my Ruby on Rails application I have a field in which user can set date. This field value has the following format: $('#search_form_handover_date').val() #returns "15-07-2014 09:00" Now How can I for example add to this date 3 days, to have: "18-07-2014 09:00"

http://stackoverflow.com/q/24744913
upvote count: 1
type: Question
tagged with: javascript
tagged with: sharepoint
has answer: http://stackoverflow.com/a/24751033
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: Here is my Javascript code to get all the users from a sharepoint 2013 (office 365). But I get a error what I don't have permissions. Am I missing a trick? It is used in a sharepoint hosted APP. function retrieveAllUsersAllGroups() { var clientContext = Context; this.collGroup = clientContext.get_web().get_siteGroups(); clientContext.load(collGroup); clientContext.load(collGroup, 'Include(Users)'); clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); } function onQuerySucceeded() { var userInfo = ''; var groupEnumerator = collGroup.getEnumerator(); while (groupEnumerator.moveNext()) { var oGroup = groupEnumerator.get_current(); var collUser = oGroup.get_users(); var userEnumerator = collUser.getEnumerator(); while (userEnumerator.moveNext()) { var oUser = userEnumerator.get_current(); this.userInfo += '\nGroup ID: ' + oGroup.get_id() + '\nGroup Title: ' + oGroup.get_title() + '\nUser: ' + oUser.get_title() + '\nLogin Name: ' + oUser.get_loginName(); } } alert(userInfo); } function onQueryFailed(sender, args) { alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); }
score: 1
has title: Sharepoint 2013 Access denied. You do not have permission to perform this action or access this resource. - get_siteGroups()

http://stackoverflow.com/comment/38111066
score: 0
type: QuestionComment
type: Comment
has text: It's not really clear what you're asking. Why don't you try putting more examples? Even pseudo-code could help :)
comment on: http://stackoverflow.com/q/24598319

http://stackoverflow.com/comment/38355190
has text: I already tried that! But it did not work well.
score: 0
comment on: http://stackoverflow.com/q/24726713
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38720603
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24708047
has text: Good to hear that you've solved your problem! Please move your "Update" section into its own answer and [accept it](http://blog.stackoverflow.com/2009/01/accept-your-own-answers/) so that this question can be closed as resolved. Thanks!
score: 0

http://stackoverflow.com/q/24716516
has comment: http://stackoverflow.com/comment/38335153
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/38335249
downvote count: 1
has comment: http://stackoverflow.com/comment/38335494
has comment: http://stackoverflow.com/comment/38335303
has title: jQuery validation not updating error message
tagged with: javascript
has body: I have a form that asks the user for an address, on this form there's a postal code field. This field is remotely checked against a Canadian postal code RegEX for validity. If the data in the field doesn't pass the test, an error message is displayed showing what is typed in the field + "is not a valid postal code". i.e. if I type "44444" and try to validate, the error says "44444 is not a valid postal code". The PHP scripted has been tested and works, the remote check through the jQuery validation script works, it returns true or false correctly, but if you play around with the postal code to test it, and change it enough times, the error message stops updating so what you get is, instead of "44444 is not a valid postal code", it will say something like "44 is not a valid postal code", it always seems to be an older combination that you tried within the same "page load". When this happens, the script will still work, if you type a correct postal code in it will pass and the error message disappears. Typing in an incorrect one will fail and show the error message again, but that error message doesn't show the new data you typed in, it shows you something you typed in earlier, i.e. if you type "L3B 555", instead of showing "L3B 555 is not a valid postal code" it will say "44 is not a valid postal code" and stay stuck on an earlier input until you refresh the page and start over. Again, even once this starts happening, the script will still pass a valid postal code and allow you through the form. This is my first shot at validation this complicated so forgive me if it's something obvious. Here is the javascript: var validator = $("#newReviewForm").validate({ onkeyup: false, rules: { //Here we name each field from the page that we are validating streetNo: { required: true, }, streetName : { required: true, }, town: { required: true, }, postal: { required: true, remote: { url: "_libraries/PHP/newReview_postalRegex.php", type: "post", }, }, province: { required: true, },…
type: Question
score: 0
tagged with: validation
tagged with: apache
tagged with: jquery
has comment: http://stackoverflow.com/comment/38334963
favorite count: 0
has comment: http://stackoverflow.com/comment/38335335
tagged with: php
answer count: 0

http://stackoverflow.com/q/24706203
tagged with: javascript
has comment: http://stackoverflow.com/comment/38315390
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38315150
type: UnansweredQuestion
has body: So, I'm trying to read a json file and access the attributes that were written in the file. The file is: { 'name': 'SpectrumApp', 'version': '0.1.0a', 'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a lectus quis odio semper suscipit. Duis ac placerat mauris, vitae lacinia orci. Fusce ultrices enim ligula, in suscipit arcu volutpat a. Proin posuere aliquam consequat. Proin porttitor ullamcorper ligula. Sed sit amet dictum erat. Curabitur eget sem diam. Quisque hendrerit, sem vitae egestas mollis, sem ipsum porttitor nibh, a faucibus urna urna eu nulla. Integer orci felis, vestibulum eget nibh eu, pellentesque scelerisque velit. Maecenas vel mollis tellus. Integer commodo mauris scelerisque consectetur tempus. Nulla eu turpis ornare, scelerisque eros et, convallis urna. Quisque ac sapien sed lacus posuere fringilla vel eu ante. Suspendisse felis enim, viverra eu diam eu, posuere convallis ante. Etiam vel arcu turpis.', 'keys': ['spectrum', 'video game', 'portable'] } It's like the package.json of the npm/grunt. And for read the file, I use: /** * JSON */ var json = fs.readFileSync(__dirname + '/apps/SpectrumApp/package.json'); log.debug('json = ' + json); log.debug('json.name = ' + json['name']); Finally the first output it's the same as above and the second is "undefined" even if I do json.name. Other things I've tried was JSON.stringify and then JSON.parse, and just JSON.parse... but nothing works and when I try to access any of the attributes, the output is the same "undefined". What I did wrong? Thank you so much! EDIT: When I try to do JSON.parse in the var json, the output is: undefined:2 'name': 'SpectrumApp', ^ SyntaxError: Unexpected token ' at Object.parse (native) at Object.&lt;anonymous&gt; (/home/todi/Projetos/Spectrum/src/server/server.js:178:28) 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 Functio…
tagged with: node.js
has answer: http://stackoverflow.com/a/24706248
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Can't access attributes of json object using nodejs

http://stackoverflow.com/comment/38117765
score: 2
has text: @zelliott inject the `$filter` service itself into your `d3Pie` directive and then you can invoke your `shortenNum` filter in the form of: `$filter('shortenNum')(array, expression, comparator)`.
type: QuestionComment
comment on: http://stackoverflow.com/q/24601551
type: Comment

http://stackoverflow.com/comment/38378990
score: 0
type: QuestionComment
has text: But you said you don't wont to use Phantom JS, Batik or canvas.. btw, how would help asking how XXX works, while you don't want to use that? Anyway, go to the Highcharts github account and open sources - everything is there.
type: Comment
comment on: http://stackoverflow.com/q/24729663

http://stackoverflow.com/comment/50258544
score: 0
type: Comment
comment on: http://stackoverflow.com/a/31062397
has text: Thanks, but then how does Android java turn that base64 encoded string back into binary?
type: AnswerComment

http://stackoverflow.com/q/24716422
tagged with: php
possible better answer: http://stackoverflow.com/a/24716811
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24716811
score: 1
has comment: http://stackoverflow.com/comment/38334826
has title: Autorefresh content
has comment: http://stackoverflow.com/comment/38335038
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38335455
has comment: http://stackoverflow.com/comment/39143033
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am using Dreamweaver CS5. I have a SQL database set up with weather descriptions that have been set up to change at a set interval, however they do not refresh on their own unless the page is physically refreshed. I have users that are logged in for hours at a time so that doesn't exactly work. I know I can fairly easily set a refresh for the entire page, but I'd prefer not to do that. I would like to just used some kind of javascript or jquery to auto refresh that section of code. This is the section of code I want to refresh: &lt;?php echo ucfirst($row_Recordset1['description']); ?&gt; I saw this as a solution, but I am not sure how to implement this to work for me, or if there is a better solution all together. &lt;script type="text/javascript"&gt; function refreshDiv() { gg1.refresh(getRandomInt(0, 100)); } $(document).ready(function () { setInterval(refreshDiv, 5000); }); &lt;/script&gt;
has answer: http://stackoverflow.com/a/24716451
tagged with: dreamweaver
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/24716451

http://stackoverflow.com/q/24727475
has comment: http://stackoverflow.com/comment/38356631
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38371273
has comment: http://stackoverflow.com/comment/38356576
has comment: http://stackoverflow.com/comment/38356589
tagged with: node.js
has comment: http://stackoverflow.com/comment/38356881
has comment: http://stackoverflow.com/comment/38356413
has comment: http://stackoverflow.com/comment/38364560
type: Question
has title: why unlink function doesn't delete my file in node.js and nitrous.io
tagged with: nitrousio
has body: I'm trying to delete an existing file but each time I get error why ? fs.unlink('test.txt',function(err){ console.log(err); }); Update : console.log(err) -> null I'm using nitrous.io box Update 2 : tried same program on my Mac Osx it works so seems there is a problem with nitrous.io box
has comment: http://stackoverflow.com/comment/38361406
tagged with: javascript
has comment: http://stackoverflow.com/comment/38356373
score: 0
has comment: http://stackoverflow.com/comment/38356658

list
type: Tag
tags question: http://stackoverflow.com/q/24590077
tags question: http://stackoverflow.com/q/24594897
tags question: http://stackoverflow.com/q/24686891
tag name: list
tags question: http://stackoverflow.com/q/24746785
tags question: http://stackoverflow.com/q/24728020
tags question: http://stackoverflow.com/q/24706197
tags question: http://stackoverflow.com/q/24665513

http://stackoverflow.com/comment/38113145
type: Comment
has text: @RajaprabhuAravindasamy It allocates memory whether or not one uses `var a`. That is, (see @Brad's answer), the variable will become global (attatched to the `window` object).
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24599437

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/24684592
tags question: http://stackoverflow.com/q/24716422

http://stackoverflow.com/q/24660202
score: 0
tagged with: visualization
answer count: 1
has answer: http://stackoverflow.com/a/24672716
accepted answer: http://stackoverflow.com/a/24672716
tagged with: d3.js
has title: Dimplejs can deal with array of objects in each Json Object
has body: I'm trying to create vis with array of objects and in each object there is another array of objects. dataTest.push({"userId": d["userId"], "LevAvg": d["LevAvg"], "Changes": [{ "Day": formattedDate, "Lev": d["Lev"], "Class": d["Class"], "ActiveLocation": d["ActiveLocation"] }] }); i can create vis in X axis userId Y axis is days and each of the values in the array of user is bubble?
type: AnsweredQuestion
tagged with: dimple.js
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38195169
score: 2
type: QuestionComment
has text: I agree with @elclanrs. In my experience on SO, "*why do you want that?*" very often leads to important, very productive and informative discussions on better strategies to achieve the original poster's goals. Even if it's not helpful to you, it may be helpful to other readers that might have a similar problem. If you're just asking out of curiosity, that's fine, but let's not discourage constructive discussions about the problem at hand.
comment on: http://stackoverflow.com/q/24642070
type: Comment

http://stackoverflow.com/q/24588408
tagged with: express
possible better answer: http://stackoverflow.com/a/65601638
accepted answer: http://stackoverflow.com/a/24588458
answer count: 2
has answer: http://stackoverflow.com/a/65601638
downvote count: 0
favorite count: 0
has title: busboy not firing finish event
has body: I am trying to pass a request object from my routes to a controller which processes the uploads, here is the route - app.post('/upload/notes',auth.requiresApiLogin,function(req,res){ upload.file(req,res); }); here is the controller (upload.js) code which has the exported file method var fs = require('fs'), uuid = require('node-uuid'), path = require('path'), Busboy = require('busboy'); exports.file = function(req, res) { var busboy = new Busboy({ headers: req.headers}); busboy.on('file', function(fieldname, file, filename,transferEncoding,mimeType) { console.log("inside upload function"); console.log(file); }); busboy.on('field', function(fieldname, val, valTruncated,keyTruncated) { console.log("inside field function"); console.log(fieldname); }); busboy.on('finish',function(){ console.log('finished'); }); req.pipe(busboy); // // req.pipe(req.busboy); // req.busboy.on('file', function(fieldname, file, filename,transferEncoding,mimeType) { // var fName = uuid.v4(); // console.log(filename); // var fileext = filename.substr(filename.lastIndexOf('.') + 1); // // console.log(transferEncoding); // console.log(mimeType); // var filepath = path.normalize(__dirname + '/../../'); // var fstream = fs.createWriteStream(filepath+'/server/uploads/'+fName+'.'+fileext); // file.pipe(fstream); // fstream.on('close', function () { // res.redirect('back'); // }); // }); }; So, what i see that both the fields and the files are being logged in console but the finish event is not getting fired. What else should i try ?
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24588458
type: Question
linked to: http://stackoverflow.com/q/24632474
score: 18
tagged with: javascript
upvote count: 18

http://stackoverflow.com/a/24672656
answers question: http://stackoverflow.com/q/24656256
downvote count: 0
has body: It seems that hack to this problem might be overriding onreset property. There is no guarantee it works in other browers. form.onreset=function(){ var b = input.value; logger.innerHTML += b + "&lt;br/&gt;"; }; please find here example I've prepared http://jsbin.com/muzahuye/20/edit?html,js,output works fine on firefox, at least 28 https://browserling.com/queue?uri=http%3A%2F%2Fjsbin.com%2Fmuzahuye%2F20%2F%3Foutput&amp;browser=firefox&amp;version=nightly
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/q/24657748
tagged with: web
favorite count: 0
accepted answer: http://stackoverflow.com/a/24657911
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38224642
downvote count: 2
tagged with: wordpress
has comment: http://stackoverflow.com/comment/38226558
has body: I started on a project where we want to go from a Wordpress site we currently have to a non-cms based site for specific reasons. I downloaded a plugin for the site which converted all my pages and such to HTML but now I have a bunch of pages with absolute links to certain wordpress folders that will not be there anymore. I would like to (for the time) convert all links that use absolute paths to relative paths as I have changed the file structure of the website. I currently use Sublime 3 and Phpstorm, but if those tools can't help me I can absolutely get another one to help me with this task. Thanks!
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/24657911
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/38226683
has title: Replacing a lot of absolute links at once
answer count: 1

http://stackoverflow.com/a/24690466
answers question: http://stackoverflow.com/q/24686588
type: AcceptedAnswer
score: 18
upvote count: 18
type: Answer
has body: I think you have to accept that it's impossible to know with certainty. Markdown borrows its syntax from existing customs—for example underscores for italics was popular on Usenet (though single asterisks meant bold, not italics as well). And of course, people have been using dashes as obvious substitutes for plaintext bullet points, long before Markdown. Having decided it's subjective though, we may now embark on the task of determining degrees of likelihood that a piece of text contains Markdown. Here are some things I'd consider evidence for Markdown, in order of decreasing strength: Consecutive lines beginning with 1., e.g. (^|[\n\r])\s*1\.\s.*\s+1\.\s. (See the Markdown behind this answer, for example.) I'd consider this a dead giveaway, because there's even that joke: There are only two kinds of people in this world. &#49;. Those who understand Markdown. &#49;. And those who don't. Link markdown, e.g. \[[^]]+\]\(https?:\/\/\S+\). Double underscores or asterisks when a left-right pair (indicated by whether the whitespace is to the left or right, respectively) can be found, e.g. \s(__|\*\*)(?!\s)(.(?!\1))+(?!\s(?=\1)). Let me know if you want me to explain this one. And so on. Ultimately, you'll have to come up with your own "scoring" system to determine the weight of each of these things. A good way to go about this would be to gather some sample inputs (if you have real ones, then even better), classify them manually as having Markdown or not, and running your regexes and scoring system to see what weights sort them out most accurately.
accepted answer of: http://stackoverflow.com/q/24686588
downvote count: 0

http://stackoverflow.com/comment/38377026
type: AnswerComment
comment on: http://stackoverflow.com/a/24738268
type: Comment
has text: Try to change mimetype return to return HttpResponse(response, mimetype='application/javascript')
score: 0

http://stackoverflow.com/a/24685886
upvote count: 1
has comment: http://stackoverflow.com/comment/38277687
has comment: http://stackoverflow.com/comment/38277281
has comment: http://stackoverflow.com/comment/38277657
answers question: http://stackoverflow.com/q/24685581
downvote count: 0
has comment: http://stackoverflow.com/comment/38277125
has body: I have a working sample here: JSFiddle I think you have a few issues with the function. There were several missing ; that chrome may have not liked, try the following. Full Javascript: $(function () { var onSampleResized = function (e) { var columns = $(e.currentTarget).find("th"); var rows = $(e.currentTarget).find("tr"); var full_msg = ""; var row_msg = ""; columns.each(function () { full_msg += $(this).attr('id') + ":" + $(this).width() + "x" + $(this).height() + ";\n"; }); rows.each(function () { row_msg += $(this).attr('id') + ":" + $(this).width() + "x" + $(this).height() + ";\n"; }); document.getElementById("hf_data").value = full_msg; document.getElementById("hf_rowdata").value = row_msg; }; $("#MatrixTable").colResizable({ onResize: onSampleResized }); $("#MatrixTable tr").resizable(); $("#MatrixTable td").resizable(); });
has comment: http://stackoverflow.com/comment/38277830
type: Answer
score: 1

http://stackoverflow.com/q/24734347
tagged with: node.js
has comment: http://stackoverflow.com/comment/38370024
answer count: 0
has comment: http://stackoverflow.com/comment/38370245
score: 0
duplicate of: http://stackoverflow.com/q/750486
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/111102
tagged with: javascript
has body: I do not know how js engine handle the difference between two scripts below: var a = []; for (i = 0 ; i&lt; 10 ; i++ ){ var temp = {}; var k = i; temp.test = function (){ return k; } a.push(temp); } for (i = 0 ; i&lt;10 ;i++ ){ console.log(a[i].test()); } Output 999999999 var a = []; for (i = 0 ; i&lt; 10 ; i++ ){ var temp = {}; temp.test = function (){ var k = i; //&lt;--------------------- this line is moved return k; } a.push(temp); } for (i = 0 ; i&lt;10 ;i++ ){ console.log(a[i].test()); } output 123456789 The output is from running the script in node.js Sometime even bizarre: If the script is run in chrome, the output is both: 999999999 I think chrome and node.js all use V8 engine, why different?
has comment: http://stackoverflow.com/comment/38369697
favorite count: 0
has comment: http://stackoverflow.com/comment/38370344
has title: Javascript set callbacks in a loop
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38369849
upvote count: 1
has comment: http://stackoverflow.com/comment/38369334
linked to: http://stackoverflow.com/q/750486

http://stackoverflow.com/comment/38717064
has text: Also, how to deal with internals ? - eg, you want "protected" methods - they shouldn't be accessible through the element but be available internally and for elements that extend
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24765515
type: Comment

http://stackoverflow.com/q/24679946
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/38266198
tagged with: d3.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24683910
has title: Stacked bar chart reversed
has body: I have little problem. I created a bar chart , you can see it on this link: Stacked Bar Chart The problem is that if you refresh 2-3 times this page , it will reverse the bar charts like that: why it's happen? and how can I solve it? Thanks!! and the CSV file in this link: CSV file
type: Question
has comment: http://stackoverflow.com/comment/38266544
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24683910

http://stackoverflow.com/a/24721847
has body: Not 100% sure where you are fuzzy but if you are asking why the option isn't always in the styles drop-down menu: It's because the behaviour is context-sensitive depending on where the caret is and/or what is currently selected. Selecting an image allows you to retrospectively apply styles to it via this menu, but not insert new images - for that you'd need to add your own control. As far as adding classes to objects goes, what you have should work as long as CKEDITOR knows about the stylesheet. Because the content pane of the editor uses an &lt;iframe&gt; element, a stylesheet would need to be added to it's respective document. This can be done via the global config (docs): CKEDITOR.config.contentsCss = '/path/custom.css'; ...or on an individual editor instance since version 4.4 (docs): CKEDITOR.instances['myEditorId'].addContentsCss( '/path/custom.css' );
type: Answer
has comment: http://stackoverflow.com/comment/38372596
answers question: http://stackoverflow.com/q/24711074
score: 0
has comment: http://stackoverflow.com/comment/38364152
has comment: http://stackoverflow.com/comment/38364380

widget
tags question: http://stackoverflow.com/q/24742484
type: Tag
tags question: http://stackoverflow.com/q/24730210
tag name: widget
tags question: http://stackoverflow.com/q/24729299
tags question: http://stackoverflow.com/q/24710319

http://stackoverflow.com/q/24655892
has comment: http://stackoverflow.com/comment/38629797
upvote count: 1
has comment: http://stackoverflow.com/comment/38221664
type: Question
tagged with: firebase
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/24840319
tagged with: javascript
score: 1
has body: im writting an app using backbone.js in roder to learn. you can find what I actually got here: https://the-todo-app.firebaseapp.com/ My idea is to allow people register in the app using simpleLogin with facebook to create user, then they are redirected to their users and are allowed to create and modify their todos, but the problem i have is that actually every user has the posibility to write on the users folder, which means they can enter and delete or modify data from other users. I would like to restrict the security from firebase to allow them create their user based on their id but doesnt allow them to write if they are not authenticated. This is what i actually have: { "rules": { ".read": true, ".write": true, ".validate": "data.hasChildren(['name', 'picture'])", "users": { "$user": { ".read": "$user == auth.id", ".write": "$user == auth.id" } } } } Aso tried this: { "rules": { ".read": true, "users": { "$user": { ".read": "$user == auth.id", ".write": "$user == auth.id" } } } } but this approach doesnt allow the client to create an user id. This is how my data actually looks: { "users" : { "10152111176005069" : { "name" : "Jhonnatan Gonzalez Rodriguez", "picture" : "url to pic" }, "10154397958535078" : { "name" : "Diana Rincón P", "picture" : "url to pic" }, "10152167159946759" : { "name" : "Sebastian Ayala", "picture" : "url to pic" } }, "title" : "The todo app" } I will appreciate if you guys have an idea of how to do this. Based on ArneHugo's answer i just setted up this rules and seems to work pretty well, I will need to do more testing in order to be sure. { "rules": { "users": { ".write": "!data.child(auth.id).exists()", "$user": { ".read": "$user == auth.id", ".write": "$user == auth.id", ".validate": "newData.hasChildren(['name', 'picture'])" } } } } I actually had to add the users the .read rule to true in order to allow them to check if data exist, this is how rules looks now. { "rules": { "users": { ".read": "true", ".write": "!data.child(auth.id)…
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/38522175
has comment: http://stackoverflow.com/comment/38277635
has comment: http://stackoverflow.com/comment/38283225
tagged with: firebase-security
type: AnsweredQuestion
tagged with: firebasesimplelogin
has title: Let client create user but not modify untill authenticated
has comment: http://stackoverflow.com/comment/38516254
accepted answer: http://stackoverflow.com/a/24840319

http://stackoverflow.com/a/24766503
has comment: http://stackoverflow.com/comment/38433228
has body: There are two simple problems that I see here. First problem is that you are using == when you should be using =. == - check if the left side is equal to the right side. Example: if(x == 5) { = - set the left side to the value of the right side. Example: x = 5 In the first example we leave x alone, but in the second example we change x to 5. So your code should look like: } else { Retirement.rawValue = Retirement.rawValue; } However, when you think about this, this code doesn't actually do anything. Retirement.rawValue will not change. This leads us to the second mistake in the code, at least, it looks to me like a mistake. if(Retirement.rawValue &gt; 60000) { Retirement.rawValue = 0; } This actually changes Retirement.rawValue, which might potentially change what's inside the Retirement field of your form. Worse, its possible that the form would look the same, but act differently when some other field calculates, since you've changed its rawValue. That would be a very tough bug to catch. The solution is to create a new variable: http://www.w3schools.com/js/js_variables.asp So now we can create a new variable, set that variable to either the retirement amount or nothing, and then add that variable to the other rawValues at the end: var retirementOrZero; if(Retirement.rawValue &gt; 60000) { retirementOrZero = 0; } else { retirementOrZero = Retirement.rawValue; } this.rawValue = TotalAssets.rawValue - (ValueHome1.rawValue + ValueVehicle1.rawValue + retirementOrZero); Now we have a number that we can name anything we want, and we can change it however we want, without affecting any code but our own. So we start by checking if our retirement value is greater than 60000. If it is greater, we set our variable to 0. Otherwise, we set our variable to the retirement value. Then we add that variable we made, to the home and value cost. As a final question, is it supposed to do if(Retirement.rawValue &gt; 60000) { retirementValueOrZero = 0; } or is it supposed to do if(Retirem…
has comment: http://stackoverflow.com/comment/38429801
has comment: http://stackoverflow.com/comment/38429911
accepted answer of: http://stackoverflow.com/q/24745590
answers question: http://stackoverflow.com/q/24745590
score: 0
has comment: http://stackoverflow.com/comment/38429669
has comment: http://stackoverflow.com/comment/38430286
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/24616238
type: Question
has body: I am currently creating a grid of Triangles using a for loop using a predetermined set of coordinates in a separate array. Like so: function createTri(x, y, z, a) { var tri = new Kinetic.RegularPolygon({ id: a, x: x, y: y, sides: 3, radius: 15, rotation: z, fillRed: 17, fillGreen: 17, fillBlue: 17, closed: true, shadowColor: '#5febff', shadowBlur: 5, shadowOpacity: 0.18 }); layer.add(tri); } for (var i = 0; i &lt; pax.length; i++){ for (var j = 0; j &lt; pax[i].length; j++){ createTri(pax[i][j][0],pax[i][j][1],pax[i][j][2],(i+'')+(j+'')); }; } However when I try to return a console.log() of a specfic id from the layer container, I am getting nothing but code instead of an id number. Im not entirely sure if Im calling it wrong for Kinetic, or calling it wrong in general. So I guess I need to know what the normal way to call the object by the id property would be, or how to properly call it from a Kinetic.Layer. Edit: to expound, how im trying to call it is defined within the Kinetic documentation as node.find('selector);, so when attempting to find by id, I am trying to log to the console: console.log(layer.find('#1674')); However when I do this, the console logs a prototype object with all possible associated functions instead of the object Im trying to call.
score: 0
answer count: 1
tagged with: javascript
tagged with: kineticjs
type: UnansweredQuestion
has title: How are objects stored within a Kinetic.Layer within Kineticjs?
has answer: http://stackoverflow.com/a/24623235

http://stackoverflow.com/a/24708206
has comment: http://stackoverflow.com/comment/38319229
has comment: http://stackoverflow.com/comment/38319279
upvote count: 5
answers question: http://stackoverflow.com/q/24708165
accepted answer of: http://stackoverflow.com/q/24708165
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38319355
has comment: http://stackoverflow.com/comment/38319293
score: 5
type: Answer
has body: You need to be able to match across multiple lines. You are looking for the s (dotall) modifier. Unfortunately this modifier does not exist in JavaScript. A common workaround is replacing the dot . with the following: [\S\s] So you can use the following regular expression: /# userid name uniqueid connected ping loss state rate([\S\s]*?)#end/ Explanation: ( # group and capture to \1: [\S\s]*? # any character of: # non-whitespace (all but \n, \r, \t, \f, and " "), # whitespace (\n, \r, \t, \f, and " ") # (0 or more times matching the least amount possible) ) # end of \1 JavaScript Demo

http://stackoverflow.com/q/24733263
tagged with: amazon-web-services
has title: Creating multiple signed url for multiple objects of AWS S3
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/28202332
type: Question
tagged with: node.js
score: 15
answer count: 1
has body: Can we create multiple signed URL of S3(AWS), for multiple object in single request in node.js. Suppose there is a need to generate 100 signed URL for accessing 100 objects and for that we are using getSignedUrl() function of AWS -sdk which is called 100 times. Can we do it in an optimize manner and reduce the request counts?
upvote count: 15
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/38206808
comment on: http://stackoverflow.com/q/24647981
score: 1
has text: "Source code" or "page source" options typically refer to the unmodified content that was received from the server. You can alter the live Element created from the markup and "*Inspect*" it in the developer tools most browsers have. But, you can't make the browser pretend it downloaded the altered version.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24697062
upvote count: 1
has body: &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; [..] var tempVar = &lt;c:out value="${varName}"/&gt;; It will change double quotes into &amp;quot; etc. If varName is declared inside a scriptlet, you must make it visible to Expression Language: &lt;% pageContext.setAttribute("varName", varName); %&gt;
type: Answer
answers question: http://stackoverflow.com/q/24696651
downvote count: 0
score: 1

http://stackoverflow.com/a/24743796
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/24737403
has body: simple way possible — via firefox addons SDK (Jetpack) That's actually more or less the "hardest way possible". The SDK makes things easy for stuff it supports out of the box, like adding toolbar button to the main window, or context menu items, etc. But when it comes to things the SDK is not tailored for, like is the case here, you'd actually have to write SDK boilerplate + low-level XUL/XPCOM stuff and cannot use XUL overlays as an added bonus (because restartless add-ons don't support those). Scratchpad - with a XUL overlay Here is a complete XUL overlay add-on. install.rdf <?xml version="1.0"?> <em:id>my@addon</em:id> <em:name>My Add-on</em:name> <em:version>1</em:version> <em:creator>Nils Maier</em:creator> <em:targetApplication> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>30.0</em:minVersion> <em:maxVersion>33.*</em:maxVersion> </em:targetApplication> chrome.manifest content my-addon ./ overlay chrome://browser/content/devtools/scratchpad.xul chrome://my-addon/content/overlay.xul overlay.xul <?xml version="1.0"?> <command id="my-addon-button-command" oncommand="alert('hellow, world');"/> <toolbarbutton id="my-addon-button" command="my-addon-button-command" class="devtools-toolbarbutton" label="My Add-on button"/> The point is: Modify scratchpad.xul as you like. Scatchpad - Using the SDK In the SDK, since you cannot use overlays, you'd have to: Register an observer via nsIWindowWatcher.registerNotification (The SDK used to have something for this, but it has been deprecated) Listen for windows with the proper chrome://browser/content/devtools/scratchpad.xul locations, disregarding other windows. Once such a window is opened, listen for it to load. Once loaded, use the DOM API to manually inject the DOM elements you want in there (replacing the overlay) Make sure you handle things correctly when the window is unloaded again. Make sure to clean up after yourself when your add-on is disabled (remove any UI from any still-open windows again…
downvote count: 0
type: Answer

http://stackoverflow.com/q/24612549
has title: Long if statement, a better way?
favorite count: 0
has body: I have this horrible verbose code that runs on mouse move: if (distance &lt; 215) { moveSmile(1) } if (distance &lt; 200) { moveSmile(2) } if (distance &lt; 185) { moveSmile(3) } if (distance &lt; 170) { moveSmile(4) } if (distance &lt; 155) { moveSmile(5) } if (distance &lt; 140) { moveSmile(6) } And the function it calls: function moveSmile (frameNum) { mouthX = startMouthPos + mouthFrameWidth * frameNum $('#mouth').css('background-position', -mouthX + 'px -359px') } I am moving a div's background position at 15px intervals the closer it get's to the target div. Is there a way to make this shorter and more efficient?
has comment: http://stackoverflow.com/comment/38138796
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24612672
has comment: http://stackoverflow.com/comment/38138785
has comment: http://stackoverflow.com/comment/38138832
type: Question
has answer: http://stackoverflow.com/a/24612656
accepted answer: http://stackoverflow.com/a/24612656
has answer: http://stackoverflow.com/a/24612632
score: 0
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/24612632
downvote count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/24622367
score: 1
has comment: http://stackoverflow.com/comment/38158496
has comment: http://stackoverflow.com/comment/38158285
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: inheritance
favorite count: 0
has body: This question includes some math concepts but they're irrelevant to the meat of the question. I'm implementing an API for studying automata on graphs. I have an abstract class called AutomataGraph which is inherited by the different types of AutomataGraph's I'm interested in. Each type has different rules for how it progresses through its states. For each type I have a builder/factory class inheriting from AutomataGraphBuilder for doing different interesting things with the graphs/automata. One such thing is generating all of the unlabeled graphs with n nodes. In the AutomaGraphBuilder class this method looks like: AutomataGraphBuilder.prototype.genAllUnlabeledGraphs = function(n){ var graphs = []; var graph; for(all possible graphs){ graph = new AutomataGraph(); if (should add graph) { graphs.push(graph); } } return graphs; } This works fine except when I want to extend this call to the JohnConwayAutomataGraphBuilder I have to copy all of the code just to change the "graph = new AutomataGraph()" line to "graph = new JohnConwayAutomataGraph()". Any suggestions? I'm more interested in looking for some general structural insights and not the fact that this is javascript. EDIT: The pseudocode is of course fairly different from the actual algorithm and just there to demonstrate that there's excessive code copying.
tagged with: structure
has title: Implementing Inheritance In Factory Classes Without Copying Code In Javascript
has comment: http://stackoverflow.com/comment/38158346
upvote count: 1
tagged with: factory
type: Question
has comment: http://stackoverflow.com/comment/38158546
type: AnsweredQuestion
tagged with: oop
has comment: http://stackoverflow.com/comment/38158355
has answer: http://stackoverflow.com/a/24622458
accepted answer: http://stackoverflow.com/a/24622458

http://stackoverflow.com/q/24646322
upvote count: 2
score: 1
linked to: http://stackoverflow.com/q/1710424
has answer: http://stackoverflow.com/a/55945789
downvote count: 1
has answer: http://stackoverflow.com/a/59721643
type: Question
tagged with: javascript-function-declaration
has title: All JavaScript Function Types?
possible better answer: http://stackoverflow.com/a/55945789
tagged with: javascript
has comment: http://stackoverflow.com/comment/38203373
has answer: http://stackoverflow.com/a/24646516
has comment: http://stackoverflow.com/comment/38203232
answer count: 3
linked to: http://stackoverflow.com/q/111102
tagged with: anonymous-function
tagged with: function
tagged with: function-expression
has comment: http://stackoverflow.com/comment/38203204
has body: While making several test projects for my small library of code I have come across many tutorials that go about making functions in many different ways. For example: Function Declarations FunctionDeclaration : function Identifier ( FormalParameterList opt ){ FunctionBody } Function Expressions FunctionExpression : function Identifier opt ( FormalParameterList opt ){ FunctionBody } Anonymous Self-Executing Functions (function(msg){ alert(msg); })('SO'); // alerts "SO" Anonymous Self-Executing Functions that I have seen in source code that I suspect may be incorrect but I want to make sure (function(msg){ alert(msg); }('SO')); // alerts "SO", but the passed parameter appears inside the parenthesis that wrap the function, not after like I think is correct. With all this said, I want to clear the air about a few questions I had regarding each of the types of functions. A function declaration: function display(){ //this function is evaluated at parse time, can be called any time } Is it true that a function declaration (that is evaluated at parse time and does not require parenthesis after the brackets) can be overwritten by function expressions as this question seems to indicate and this source code seems to back up?: var display = function(){ //this function will be called as opposed to the //display() declaration (above) any time //display() is used after this variable assignment }; A function expression: var display = function nameOptional(){ }; Is the semi-colon after the bracket in function expressions that has been assigned to a variable necessary? And also, does that mean that this: function name(){ //... }; is different than this:? function name(){ //... }//no semi-colon Is the first name() a function expression, and the second name() a function declaration? Or is the first name() a function expression and the second name() a function expression with an optional left-out semi-colon. Because I have read that in function expressions, the semi-colon is only recomme…
favorite count: 0
has comment: http://stackoverflow.com/comment/38228850
linked to: http://stackoverflow.com/q/1834642
accepted answer: http://stackoverflow.com/a/24646516
has comment: http://stackoverflow.com/comment/38203283
linked to: http://stackoverflow.com/q/336859
has comment: http://stackoverflow.com/comment/38203236
linked to: http://stackoverflow.com/q/13965702
linked to: http://stackoverflow.com/q/3384504
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/98544192

fetch
tags question: http://stackoverflow.com/q/24659784
type: Tag
tag name: fetch

http://stackoverflow.com/a/24725060
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24725023
has body: fadeIn() lets you run a callback function once the function itself has completed its job, see documentation here: http://api.jquery.com/fadein/ JS $("#test").fadeIn(1000, function(){ //--- do whatever you need once the fade in is completed }) FIDDLE http://jsfiddle.net/TFtt3/

http://stackoverflow.com/a/71832903
has body: If you want to access the HTML DOM Document Object directly in Typescript, this implies that you will use the browser as the environment and have the Type Script tooling generate the code behind, while you use a code editor like VsCode to debug through your typescript. const document: Document = document as Document; or if you want to use it into a class just do: class ExampleClass { private document: Document; private btn: HTMLElement; constructor() { this.document = document as Document; } public exampleOfGettingAButton(): void { this.btn = this.document.getElementById("my-btn"); } }
score: 0
answers question: http://stackoverflow.com/q/24647839
type: Answer

http://stackoverflow.com/comment/38129053
comment on: http://stackoverflow.com/a/24607411
type: Comment
has text: You r completely wrong
score: 0
type: AnswerComment

http://stackoverflow.com/q/24657246
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/24657537
answer count: 3
has answer: http://stackoverflow.com/a/24657385
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38223629
has answer: http://stackoverflow.com/a/24657417
favorite count: 0
has comment: http://stackoverflow.com/comment/38223608
tagged with: css
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/24657417
has body: I have an image that is being shown and after a while it fades out... i want the second image to be hidden and when the first image has faded out the second image to fade in. I have the first image fading out i am struggling to hide and then show the second image. in the with the id #container. Any suggestions? Thanks
downvote count: 1
has title: How do i hide an image and make it appear on a timer.
type: Question
accepted answer: http://stackoverflow.com/a/24657385

http://stackoverflow.com/a/67923821
has comment: http://stackoverflow.com/comment/130010902
has comment: http://stackoverflow.com/comment/138392533
has comment: http://stackoverflow.com/comment/120056781
type: Answer
has body: CSS scroll-margin and scroll-padding You might want to have a look at new CSS properties scroll-padding and scroll-margin. You can use scroll-padding for the scrolling container (html in this case), and scroll-margin for the element within the container. For your example, you would want to add scroll-margin-top for the element that you want to scroll into view, like this: .example { scroll-margin-top: 10px; } This affects scrollIntoView code, like this code: const el = document.querySelector(".example"); el.scrollIntoView({block: "start", behavior: "smooth"}); This will cause the viewport to scroll to align the top border of the viewport with the top border of the element, but with 10px of additional space. In other words, these properties of the element are taken into account: padding-top border-top scroll-margin-top (and not margin-top) In addition, if the html element has scroll-padding-top set, then that is taken into account too.
score: 252
upvote count: 252
answers question: http://stackoverflow.com/q/24665602
has comment: http://stackoverflow.com/comment/130496451
has comment: http://stackoverflow.com/comment/131661575
has comment: http://stackoverflow.com/comment/129457197
has comment: http://stackoverflow.com/comment/129082519
has comment: http://stackoverflow.com/comment/121923295
has comment: http://stackoverflow.com/comment/124229434
downvote count: 0
has comment: http://stackoverflow.com/comment/124729489
has comment: http://stackoverflow.com/comment/136902386
has comment: http://stackoverflow.com/comment/129463826
has comment: http://stackoverflow.com/comment/121882160

http://stackoverflow.com/comment/38322054
has text: Yeah, that should work. But, shouldn't my code do the same thing? Why is that not working?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24709467
type: Comment

http://stackoverflow.com/comment/38392899
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24746706
has text: Then just call the function again from the load more posts, after it is done.
score: 4

http://stackoverflow.com/comment/38292984
type: QuestionComment
has text: What is a *.js page*? Is this an HTML document generated from Node.js or something?
score: 0
comment on: http://stackoverflow.com/q/24694918
type: Comment

http://stackoverflow.com/comment/38232103
comment on: http://stackoverflow.com/q/24661710
type: QuestionComment
type: Comment
has text: Have you tried with `document.getElementsByTagName('td')[]` and then loop through each item of the array to change background?
score: 3

http://stackoverflow.com/comment/38192369
comment on: http://stackoverflow.com/a/24636430
has text: To my (limited) knowledge, no; I'm using PHP to interface with my database using SQL. I'll update the post to reflect it so you can see what I mean...
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38159594
score: 0
comment on: http://stackoverflow.com/q/24623113
type: QuestionComment
has text: You can use socket.io where the connection will persist across questions
type: Comment

http://stackoverflow.com/comment/38124890
type: Comment
type: QuestionComment
has text: where is your `ChangeImage()` ?
comment on: http://stackoverflow.com/q/24605144
score: 0

http://stackoverflow.com/q/24666974
has answer: http://stackoverflow.com/a/24666999
has title: JSON - changing the key value pair based on users input
type: Question
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/24666999
has body: I'm trying to get the users input and make it a part of the json I'm building, what I want to achieve is like this. When the user fills the textbox, I could get that value and alert it? however currently the output that I'm getting is only "[object HTMLInputElement]". Here's my code and a fiddle: http://jsfiddle.net/u3a4f/ Any COmment Suggestions is appreciated: Run
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24666992
accepted answer: http://stackoverflow.com/a/24666992
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/24666994

http://stackoverflow.com/comment/38287147
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24678553
has text: Try to remove that part of code which contains PHP or some images or other dependent sources. Post that code which can give us HTML markup and JS associated with it...

http://stackoverflow.com/q/24678581
favorite count: 0
upvote count: 1
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24678658
possible better answer: http://stackoverflow.com/a/24678954
has body: I used CSS and Javascript in order to rotate a div after a click on it (from 0deg to 45deg). It's working good. I want the div to rotate back after a second click on it (from 45deg to 0deg), but nothing happens on the div... I didn't find more topics to fix this problem. If you have any idea, it would be great ! Thanks. Style .home { -webkit-transition-duration: 0.5s; -moz-transition-duration: 0.5s; -o-transition-duration: 0.5s; transition-duration: 0.5s; -webkit-transition-property: -webkit-transform; -moz-transition-property: -moz-transform; -o-transition-property: -o-transform; transition-property: transform; } .home.active { -webkit-transform:rotate(45deg); -moz-transform:rotate(45deg); -o-transform:rotate(45deg); } Script $(document).ready(function(){ $('.home').click(function(){ $('.home').removeClass('active'); $(this).addClass('active'); }); });
has answer: http://stackoverflow.com/a/24678954
type: Question
has title: Rotate back div after the second click on it
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24678658
score: 1

http://stackoverflow.com/comment/116000400
has text: I won't down-vote (because is still useful about VOD etc) but this is a **wrong** understanding of Youtube's video serving method... Things like _"videos posted on YouTube are first encrypted with 128- bit SSL encryption..." and _"...impossible to download the video in one go"_ are not true. It is even possible to parse the direct links to MP4 files from the video page's own source code (with some extract and clean-up effort on certain values in source). I will explain later when time allows.
type: AnswerComment
comment on: http://stackoverflow.com/a/65579284
type: Comment
score: 2

http://stackoverflow.com/q/24677759
has answer: http://stackoverflow.com/a/24679063
tagged with: javascript
has answer: http://stackoverflow.com/a/24690685
tagged with: replace
answer count: 3
possible better answer: http://stackoverflow.com/a/24677812
downvote count: 0
has body: trying (still 2 days) to figure out how i can remove the first number(s), followes by an ";" and leave the rest of numbers but remove still all ";" and replace them with an tab ("\t"). The base numbers (loaded by script from one .txt file): 1;999.99;999.99;-999.99 &lt;-- should be 999.99 999.99 -999.99 --&gt;&lt;br /&gt; 2;248.22;257.78;-10.58 &lt;-- should be 248.22 257.78 -10.58 --&gt;&lt;br /&gt; 3;235.54;149.58;-14.32 &lt;-- should be 235.54 149.58 -14.32 --&gt;&lt;br /&gt; 10;225.54;147.58;-14.32 &lt;-- should be 225.54 147.58 -14.32 --&gt;&lt;br /&gt; the List goes up to 99; i tried replace(/.*;(?! \.d+;)/g, "\t"); but this will remove all ";" and numbers, except the last numbers. I can't figure i out. who can help? my complete code tryed with the answer from "hex494D49": function readTheNpFile01() { var initNpFile = new ActiveXObject("Scripting.FileSystemObject"); projektname = projektname_input.value; openNP01 = initNpFile.OpenTextFile("C://wamp/www/CM5_demo/cnc_temp/" + projektname + ".cnc.01np", 1, false); readALLofNP01 = openNP01.ReadAll().replace(/0;0.0;0.0;0.0/i, "");//.slice(7); for(i = 0; i &lt; readALLofNP01.length; i++){ console.log(readALLofNP01[i].replace(/(^\d+;)|;/g, '\t')); } $('#NP01row').html(readALLofNP01); //put the numbers in my html ID openNP01.Close(); }
has answer: http://stackoverflow.com/a/24677812
favorite count: 0
accepted answer: http://stackoverflow.com/a/24679063
tagged with: regex
type: AnsweredQuestion
has title: remove first number(s) followed by a ";" and remove then also the rest of ";" but keep the followed numbers
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/a/24767398
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43163445
type: Answer
answers question: http://stackoverflow.com/q/24717403
upvote count: 1
has comment: http://stackoverflow.com/comment/38431490
has comment: http://stackoverflow.com/comment/38431443
has body: I was experiencing the same problem and initially thought it was a Wildfly issue, but then noticed that Firefox was triggering @OnClose. When I added an @OnError, Chromium was triggering that. I found an another StackOverflow question referring to the same behavior. It also appears that Chromium may have just fixed this issue as of a month ago.

http://stackoverflow.com/a/24696441
has comment: http://stackoverflow.com/comment/38299648
has comment: http://stackoverflow.com/comment/38296959
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38296201
has comment: http://stackoverflow.com/comment/38296430
upvote count: 2
has body: The html input attrtibute value is a string type value. So when used on javascript it's a best pratice to parse them to the type you want, like the parseInt to tell javascript this is a integer value. can you show up the code of the innerHTML you are using?
answers question: http://stackoverflow.com/q/24696322
type: Answer

http://stackoverflow.com/comment/38506293
has text: Sorry but its internal server. Thanks for trying.
type: Comment
comment on: http://stackoverflow.com/a/24725270
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38340929
type: Comment
comment on: http://stackoverflow.com/a/24711949
score: 0
type: AnswerComment
has text: Sorry not clear.. Why the parse function not use the response passed in?

http://stackoverflow.com/comment/38338449
has text: even if this code worked like you wanted it to, you would end up with `orig` self referencing itself in the element at index 4
comment on: http://stackoverflow.com/q/24718062
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24738026
tagged with: socket.io
type: Question
score: 3
tagged with: javascript
tagged with: express
upvote count: 3
tagged with: highcharts
answer count: 1
favorite count: 0
has title: Updating Highcharts realtime using Socket.io
tagged with: node.js
has body: I'm making a dashboard using node.js, socket.io and highcharts. I want my chart to update dynamically on receiving a request from socket.io. How do I do that? Here is my client side code, &lt;script&gt; var socket=io(); var sales=0; var e1tcount=0; var e1scount=0; var e2tcount=0; var e2scount=0; $(function () { $('#container').highcharts({ chart: { type: 'column', events: { load: function(){ socket.on('response', function(arr){ $('#c1').html(arr[0]); sales+=arr[2]; $('#sales').html(sales); if(arr[1]=="CT") { e1tcount++; $('#e1t').html(e1tcount); e1scount+=arr[2]; $('#e1s').html(e1scount); //Tried this, doesnt work var sold=chart.series[0].data[0].y; chart.series[0].data[0].update(sold+1); } if(arr[1]=="AB") { e2tcount++; $('#e2t').html(e2tcount); e2scount+=arr[2]; $('#e2s').html(e2scount); } }); } } }, title: { text: 'Stacked column chart' }, xAxis: { categories: ['Event 1', 'Event 2'] }, yAxis: { min: 0, title: { text: 'Total fruit consumption' }, stackLabels: { enabled: true, style: { fontWeight: 'bold', color: (Highcharts.theme &amp;&amp; Highcharts.theme.textColor) || 'gray' } } }, legend: { align: 'right', x: -70, verticalAlign: 'top', y: 20, floating: true, backgroundColor: (Highcharts.theme &amp;&amp; Highcharts.theme.background2) || 'white', borderColor: '#CCC', borderWidth: 1, shadow: false }, tooltip: { formatter: function() { return '&lt;b&gt;'+ this.x +'&lt;/b&gt;&lt;br/&gt;'+ this.series.name +': '+ this.y +'&lt;br/&gt;'+ 'Total: '+ this.point.stackTotal; } }, colors: ['#FFCC99','#3366CC'], plotOptions: { column: { stacking: 'normal', dataLabels: { enabled: true, color: (Highcharts.theme &amp;&amp; Highcharts.theme.dataLabelsColor) || 'white', style: { textShadow: '0 0 3px black, 0 0 3px black' } } } }, series: [{ name: 'Sold', data: [0, 0] }, { name: 'Available', data: [20, 20] }] }); }); &lt;/script&gt; Intially the number of tickets is 20, but as soon as I post data using curl, the number of sold tickets should increase and available tickets should d…
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/24739567
accepted answer: http://stackoverflow.com/a/24739567

http://stackoverflow.com/q/24718433
has title: Using as source with clmtrackr
type: AnsweredQuestion
tagged with: iframe
type: Question
tagged with: javascript
tagged with: html5-video
accepted answer: http://stackoverflow.com/a/24718795
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24718795
has body: I am working with the example for clmtrackr here. I am trying to use an &lt;iframe&gt; as a source of video for the code (as opposed to using a tag, and doing this returns no results. The example code : &lt;div id="container"&gt; &lt;video id="video" width="368" height="288" autoplay="" loop=""&gt; &lt;source src="./media/franck.ogv" type="video/ogg"&gt; &lt;/video&gt; &lt;canvas id="canvas" width="368" height="288"&gt;&lt;/canvas&gt; &lt;/div&gt; &lt;script&gt; var videoInput = document.getElementById('video'); var ctracker = new clm.tracker(); ctracker.init(pModel); ctracker.start(videoInput); function positionLoop() { requestAnimationFrame(positionLoop); var positions = ctracker.getCurrentPosition(); // do something with the positions ... // print the positions var positionString = ""; if (positions) { for (var p = 0;p &lt; 10;p++) { positionString += "featurepoint "+p+" : ["+positions[p][0].toFixed(2)+","+positions[p][1].toFixed(2)+"]&lt;br/&gt;"; } document.getElementById('positions').innerHTML = positionString; } } positionLoop(); var canvasInput = document.getElementById('canvas'); var cc = canvasInput.getContext('2d'); function drawLoop() { requestAnimationFrame(drawLoop); cc.clearRect(0, 0, canvasInput.width, canvasInput.height); ctracker.draw(canvasInput); } drawLoop(); &lt;/script&gt; Has anyone attempting this yet? Any help would be much appreciated! Thank you,

http://stackoverflow.com/q/24702191
has body: I'm making a vertical parallax scrolling site with ScrollMagic which includes a navigation menu at the top to link within the site. The menu itself works correctly when no parallax animation is applied to the scroll but when the parallax is added (ie the 2nd section moves up over the intro section), it seems unable to take the reduction in overall height into account when moving to the section, so it overshoots. Here is some code: var site = { smController : {}, init : function () { site.setupScroll(); site.setupMainNavigation(); site.setupAnimation(); }, setupScroll : function () { // init the smController var controller = new ScrollMagic({ globalSceneOptions: { triggerHook: "onLeave" } }); site.smController = controller; }, setupMainNavigation : function () { $('.menuclick').on('click', function (event) { event.preventDefault(); var anchor = $(this), sectionId = $(anchor.attr('href')); site.scrollToSection(sectionId); }); }, /** * uses tweenlite and scrolltoplugin from greensock * @param {string} sectionId id of section to scroll to * @return {void} */ scrollToSection : function (sectionId) { var scrollYPos = $(sectionId).offset().top; TweenLite.to(window, 0.5, { scrollTo:{ y: scrollYPos } }); }, setupAnimation : function () { // parallax animation - move marginTop back by 100% var tween = new TimelineMax() .to('#section1', 2, { marginTop: '-100%', ease:Linear.easeNone }); var controller = site.smController, scene = new ScrollScene({ duration: 500 }) .setTween(tween) .addTo(controller); // show indicators (requires debug extension) scene.addIndicators(); } }; $(document).ready(function () { site.init(); }); Does anyone have a strategy to deal with moving (parallax) sections like this please? Thanks
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29663427
tagged with: gsap
has answer: http://stackoverflow.com/a/29663427
score: 0
tagged with: scrollmagic
has answer: http://stackoverflow.com/a/25690151
accepted answer: http://stackoverflow.com/a/25690151
has title: Using links within a parallax ScrollMagic site
tagged with: parallax
type: AnsweredQuestion

http://stackoverflow.com/comment/38180163
has text: Or configure the cookie to be set on '.site.com', so the cookie works across both hostnames.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24630441
score: 0

http://stackoverflow.com/a/24711457
has comment: http://stackoverflow.com/comment/38381830
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24701705
accepted answer of: http://stackoverflow.com/q/24701705
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/38380546
upvote count: 4
has body: Your directive creates its own child scope - that's a good thing. It owns all the $watches on it, and should clean up after itself when its scope is destroyed. It is good practice to: Create a child or isolate scope when you set up $watches and plan to destroy the scope later. Since the directive created the scope, it should also be the one to destroy it when necessary and release all its $watches. Detect when the element is being removed and destroy the scope if necessary. Sometimes this makes sense to do if your $watches are heavy, and you don't want them hanging around when the element that the directive is bound to is removed from the DOM. This may not make sense to do if the removal is temporary - i.e. toggle visibility of an element A directive should never destroy a scope belonging to another. i.e if you inherited the scope from the parent controller then let the parent controller clean up after itself - it is not the job of the child directive to do it. If the directive has set up any $watches, it should listen for the scope $destroy event so that it can unregister them. If the directive has registered any javascript event listeners with on(), it should unregister them with off() when the scope is destroyed. It is possible to perform clean-up when an element is removed from the DOM by handling the $destroy event on the jQuery element itself: // creates a child scope owned by the directive scope: true, link: function(scope, element, attr) { // set up a click handler element.on('click', function() { ... }); // set up a $watch on the child scope. It returns a // function that you can call to unregister the $watch var unregister = scope.$watch('test', function() { ... }); // when the element is removed from the DOM, // destroy the scope and all its $watches. element.on('$destroy', function() { // remove the $watch unregister(); // remove the click handler element.off('click'); // call $destroy on the child scope // so that it can propagate to any children scope.…

http://stackoverflow.com/q/24629769
has body: Hi guys I'm using this function to open a popup and close it after 3 seconds. The popup opens successfully, but, the settimeout function doesn't works and eventually doesn't close the opened popup. What am I doing wrong here? &lt;script type="text/javascript"&gt; function popUp(id,entry,escape) { popupWindow = window.open('process_concur.php?id='+id+'&amp;entry='+entry+'&amp;escape='+escape,'Concur','resizable=yes,scrollbars=yes,width=250,height=250'); popupWindow.focus(); setTimeout(function () { popupWindow.close();}, 3000); } //reload the current window when the popup is closed. function popUpClosed() { window.location.reload(); } &lt;/script&gt; The popup page which opens (Code) &lt;?php include 'classes/class.user.php'; $userMain = new user(); //get parameters $id = isset($_GET['id']) ? $_GET['id'] : ''; $entry = isset($_GET['entry']) ? $_GET['entry'] : ''; $escape = isset($_GET['escape']) ? $_GET['escape'] : ''; //now, $escape is sha1 and $entry is base64 encoded..decode entry and check if sha1 of decoded entry matches escape $dentry = base64_decode($entry); if(sha1($dentry)==$escape) { //process concur if($userMain-&gt;reviewExists($id)) { if($userMain-&gt;increaseConcur($id)) { echo "Done"; exit(); } } else { //review doesnt no exist echo "Some problems occured at id doesn't exist"; } } else { echo "Some problems occured dentry"; } ?&gt; &lt;script&gt; window.onunload = function() { if (window.opener &amp;&amp; !window.opener.closed) { window.opener.popUpClosed(); } }; &lt;/script&gt;
has comment: http://stackoverflow.com/comment/38176710
has comment: http://stackoverflow.com/comment/38171679
has answer: http://stackoverflow.com/a/24629899
has comment: http://stackoverflow.com/comment/38171832
linked to: http://stackoverflow.com/q/2550858
has comment: http://stackoverflow.com/comment/38171824
type: Question
has comment: http://stackoverflow.com/comment/38171649
has comment: http://stackoverflow.com/comment/38171644
has comment: http://stackoverflow.com/comment/38172408
has comment: http://stackoverflow.com/comment/38171783
tagged with: javascript
has comment: http://stackoverflow.com/comment/38171742
has comment: http://stackoverflow.com/comment/38171650
score: 0
has comment: http://stackoverflow.com/comment/38171654
answer count: 1
has title: Javascript settimeout doesn't close the popup
has comment: http://stackoverflow.com/comment/38171575
has comment: http://stackoverflow.com/comment/38171669
has comment: http://stackoverflow.com/comment/38171562
has comment: http://stackoverflow.com/comment/38171590
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38171860
has comment: http://stackoverflow.com/comment/38171809
has comment: http://stackoverflow.com/comment/38171603

http://stackoverflow.com/comment/38119950
score: 1
comment on: http://stackoverflow.com/q/24602615
has text: To echo above conmments, doing this client side is a terrible idea. Honestly you shouldn't really even give indication that a username exists or not, as this is bas security practice"
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24739486
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24739582
has answer: http://stackoverflow.com/a/24739784
has body: I have an anchor tag which created dynamically and this anchor tag has an onclick event like this: $('#'+educationHistoryId).append(""+degreeTitle+"" + "Delete"); when I click on this anchor I got js error saying: TypeError: 'click' called on an object that does not implement interface HTMLElement. I suspect some character escaping issue but unable to resolve. Added generated html: A LevelDelete
tagged with: html-escape-characters
has comment: http://stackoverflow.com/comment/38379068
has comment: http://stackoverflow.com/comment/38379017
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24739784
has title: Onclick event on dynamic created anchor tag
type: Question
accepted answer: http://stackoverflow.com/a/24739582
has comment: http://stackoverflow.com/comment/38379141
has answer: http://stackoverflow.com/a/24739785
tagged with: javascript
tagged with: jquery
score: 0

wicket
tags question: http://stackoverflow.com/q/24619385
type: Tag
tags question: http://stackoverflow.com/q/24600343
tag name: wicket

http://stackoverflow.com/comment/38129194
type: Comment
comment on: http://stackoverflow.com/a/24607754
score: 0
type: AnswerComment
has text: You have just described a `promise`-based solution to a newbie *without explanation*. You might want to explain it in some detail.

http://stackoverflow.com/comment/38277587
score: 0
type: AnswerComment
type: Comment
has text: Well of course it doesn't, split the numbers and do them one by one.
comment on: http://stackoverflow.com/a/24677812

http://stackoverflow.com/q/24635276
linked to: http://stackoverflow.com/q/237104
has title: Something other than looping through array?
has answer: http://stackoverflow.com/a/24635422
has answer: http://stackoverflow.com/a/24636207
has comment: http://stackoverflow.com/comment/38182906
duplicate of: http://stackoverflow.com/q/237104
has comment: http://stackoverflow.com/comment/38182332
has comment: http://stackoverflow.com/comment/38182248
has answer: http://stackoverflow.com/a/24635460
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38182439
linked to: http://stackoverflow.com/q/6682951
answer count: 4
has body: My question is, how can I make the program do something if some variable is equal to any element in an array? Is there any other simpler way than just looping through the entire array? For example: Suppose there is a variable, line = 0; and an array, characters = [1,2,3,4]; So, what I want to do is that, if the variable "line", changes to any of the four elements in the array "characters" (i.e. 1,2,3,4), then the program needs to do something specific. (The array can be way bigger than that and the elements in the array might be created during the program not beforehand.)
type: Question
has comment: http://stackoverflow.com/comment/38182253
has comment: http://stackoverflow.com/comment/38182365
has comment: http://stackoverflow.com/comment/38182251
tagged with: javascript
has answer: http://stackoverflow.com/a/24635423
score: 0

http://stackoverflow.com/q/24653737
has title: Pending message - all 3 buttons (accept, reject, edit) missing from Yahoo Group
has comment: http://stackoverflow.com/comment/38218957
type: UnansweredQuestion
answer count: 0
score: 0
type: Question
has comment: http://stackoverflow.com/comment/38217526
has body: (Chrome) Console says: RAPID WARNING: Specified module not in DOM: masterNav combo... RAPID WARNING: Specified module not in DOM: uhWrapper combo... DARLA notice: 310 combo... The page at 'https://groups.yahoo.com/neo/groups/.../management/pendingmessages' was loaded over HTTPS, but displayed insecure content from 'http://...: this content should also... Since all 3 buttons (accept, reject, edit) have vanished, what is easiest way to access Pending Messages (to delete the problem messages)? Thank you.
tagged with: javascript

http://stackoverflow.com/a/25207120
has comment: http://stackoverflow.com/comment/39261188
has comment: http://stackoverflow.com/comment/85082166
has comment: http://stackoverflow.com/comment/39260395
has comment: http://stackoverflow.com/comment/39259652
has comment: http://stackoverflow.com/comment/39326576
has comment: http://stackoverflow.com/comment/39260107
has comment: http://stackoverflow.com/comment/39262851
has comment: http://stackoverflow.com/comment/39261365
has comment: http://stackoverflow.com/comment/39260324
has comment: http://stackoverflow.com/comment/39259640
downvote count: 1
has comment: http://stackoverflow.com/comment/39259927
upvote count: 12
has comment: http://stackoverflow.com/comment/39260508
has comment: http://stackoverflow.com/comment/39260219
has comment: http://stackoverflow.com/comment/39262008
has comment: http://stackoverflow.com/comment/39262520
type: Answer
score: 11
has comment: http://stackoverflow.com/comment/39262034
has comment: http://stackoverflow.com/comment/39260668
has comment: http://stackoverflow.com/comment/39325812
has comment: http://stackoverflow.com/comment/39326826
has comment: http://stackoverflow.com/comment/39326764
has comment: http://stackoverflow.com/comment/39260178
has body: This is happening because a Gif requires the thread to be open to display the next image. If you were using a pure css approach you would not see this issue. Take font-awesome for example - Because this is a pure CSS approach the spinner will continue to spin even when the thread bogs down loading all of of your new records and associating their related entities. If you need to continue spinning I would highly including this bit of CSS from the Font-Awesome source - @-moz-keyframes spin { 0% { -moz-transform: rotate(0deg); } 100% { -moz-transform: rotate(359deg); } } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); } } @-o-keyframes spin { 0% { -o-transform: rotate(0deg); } 100% { -o-transform: rotate(359deg); } } @-ms-keyframes spin { 0% { -ms-transform: rotate(0deg); } 100% { -ms-transform: rotate(359deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(359deg); } } .icon-spin { display: inline-block; -moz-animation: spin 2s infinite linear; -o-animation: spin 2s infinite linear; -webkit-animation: spin 2s infinite linear; animation: spin 2s infinite linear; } And using either a static icon, image or sprite and just applying class of 'icon-spin' to it, regardless of whether it is an icon or not. Edit Add this wherever you are declaring your CSS - Change this - to this - The reason it is fa instead of icon is the current version of FontAwesome changed to use fa instead of icon due to collisions Last Edit Your problem now is that your logic is faulty. I have tried to explain this in comments but I will give one last update with EXACTLY how your logic should look if you want to show your spinner and have it spinning. isSpinning(true) context.getData(name, records).then(function (data) { isLoading(false); setTimeout(function () { isSpinning(false); }, 1000); }) .fail("Record not found"); The reason this wasn't working is in your logic. Copy this EXACTLY to your solution and it wi…
has comment: http://stackoverflow.com/comment/39262796
answers question: http://stackoverflow.com/q/24656805

http://stackoverflow.com/comment/38123259
has text: are you able to see alert()? have you added e in function(e)?
comment on: http://stackoverflow.com/a/24604327
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/38353175
type: AnswerComment
type: Comment
has text: I don't seem to have the node_modules directory. I was just following a youtube video and it worked for him
comment on: http://stackoverflow.com/a/24725795
score: 0

http://stackoverflow.com/a/24733059
has comment: http://stackoverflow.com/comment/38367427
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/24733033
score: 3
downvote count: 0
has body: just use the html input tag, &lt;input type="file" name="file"/&gt; as it comes with the browse button. that allows you to upload . To upload a excel file , For Excel Files 2003-2007 (.xls), use: &lt;input type="file" accept="application/vnd.ms-excel" /&gt; For Excel Files 2010 (.xlsx), use: &lt;input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" /&gt; validates the whether its a excel file
has comment: http://stackoverflow.com/comment/38366976

http://stackoverflow.com/comment/38174183
score: 0
type: QuestionComment
type: Comment
has text: @GôTô the above fiddle is not working. In firefox when you click in the checkbox it says `click` and in chrome, when you click in teh checkbox it says `checkbox` but when you close the alert another one is popping saying `click`
comment on: http://stackoverflow.com/q/24630827

http://stackoverflow.com/comment/38201567
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24645493
has text: only add this keyword
score: 0

http://stackoverflow.com/q/24597496
has title: Insert a dash before the last three characters
has answer: http://stackoverflow.com/a/24597612
has answer: http://stackoverflow.com/a/24597611
has comment: http://stackoverflow.com/comment/38109471
tagged with: php
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24597613
has comment: http://stackoverflow.com/comment/38109529
has body: I need to be able to add a dash before the last three characters in a text field using either javascript or php. For example, the user enters 1dsb3rs and the input changes to 1dsb-3rs. It doesn't matter if the user sees the change (javascript) or if it happens server-side (PHP) I just need the change to happen. I have already tried this javascript code, but I can't get it to work: $("#rid").html(function(i,v){ return v.replace( /^([\w]{4})/, "$1-" ); Here is my textbox code: &lt;input class="form-control" type="text" id="rid" placeholder="Enter ID" size="15px" maxlength="10" name="rid" required value="&lt;?php echo $rid; ?&gt;"&gt;
possible better answer: http://stackoverflow.com/a/24597596
has comment: http://stackoverflow.com/comment/38109377
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 3
score: 0
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24597596
accepted answer: http://stackoverflow.com/a/24597611
favorite count: 0
has comment: http://stackoverflow.com/comment/38109367

http://stackoverflow.com/comment/104972439
has text: @DarrylR.Norbert process is a global object that provides information about, and control over, the current Node.js process. You can find more at https://nodejs.org/api/process.html
type: Comment
comment on: http://stackoverflow.com/a/24682157
score: 1
type: AnswerComment

http://stackoverflow.com/q/24632990
has body: This is my pen: http://codepen.io/anon/pen/IszKj What I want to do is how it so when I click on either any status or any date I open up a hidden div which gives a list of options. My question is, how do I approach this in the best way? Do I have two different divs and then open the one which is relevant to the list item which was clicked: Option 1 Option 2 Option 1 Option 2 Do I have one div and only show the content inside it which is relevant to that button? ... ... In addition to this, should I be using toggle or the traditional open / close function. It would be nice for it to be degradable if JS is disabled.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38178219
has comment: http://stackoverflow.com/comment/38177810
has comment: http://stackoverflow.com/comment/38178171
score: 0
has answer: http://stackoverflow.com/a/24633828
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24633132
tagged with: css
answer count: 4
accepted answer: http://stackoverflow.com/a/24633828
has answer: http://stackoverflow.com/a/24633345
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24633345
type: Question
has answer: http://stackoverflow.com/a/24633323
has title: Jquery showing hidden content

http://stackoverflow.com/comment/38173164
type: QuestionComment
type: Comment
score: 1
has text: If you want to animate along a cubic bezier curve you need at least four points per segment, since each Segments consists of a starting and endpoint, plus two control points. In your code you describe a line, starting at `1200, 445`, to `0,500`, with controlepoints at `900,520` and `660,600`.
comment on: http://stackoverflow.com/q/24628903

http://stackoverflow.com/comment/38268844
type: QuestionComment
has text: thats correct. But what If I want to use the same code in each function, without I have write the same in each function - Is there some way I can write it once and include it, in each function?
score: 0
comment on: http://stackoverflow.com/q/24681528
type: Comment

http://stackoverflow.com/comment/38277128
comment on: http://stackoverflow.com/a/24685914
type: AnswerComment
score: 0
type: Comment
has text: He's using jQuery, meaning `A.) that will catch a lot of elements` and `B.) he could just as easy $('.ui-widget-content')`

http://stackoverflow.com/comment/90238312
type: Comment
comment on: http://stackoverflow.com/a/24660323
has text: @Bergi I'm pretty sure there is memory leaking with `promiseFor` but your promiseWhile doesn't leak, but I doesn't know why ?
score: 0
type: AnswerComment

http://stackoverflow.com/q/24657386
has comment: http://stackoverflow.com/comment/38259433
has answer: http://stackoverflow.com/a/24657601
accepted answer: http://stackoverflow.com/a/24657601
has answer: http://stackoverflow.com/a/58124279
tagged with: javascript
has answer: http://stackoverflow.com/a/48483805
has title: How to display &nbsp; or any raw html in angular data?
has comment: http://stackoverflow.com/comment/38224092
score: 28
favorite count: 0
linked to: http://stackoverflow.com/q/18340872
tagged with: angularjs
answer count: 5
linked to: http://stackoverflow.com/q/9381926
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24657419
downvote count: 0
possible better answer: http://stackoverflow.com/a/24672107
has answer: http://stackoverflow.com/a/24672107
has comment: http://stackoverflow.com/comment/38259232
upvote count: 28
type: Question
has body: How can I display &amp;nbsp; as space not as string. Is there raw filter like in twig? &lt;div&gt;{{item}}&lt;/div&gt; $scope.item = '&amp;nbsp;'; But the result is escaped &amp;amp;nbsp;. I need this because ' ' have height of 0.

http://stackoverflow.com/a/24636818
type: Answer
has comment: http://stackoverflow.com/comment/38185225
has comment: http://stackoverflow.com/comment/38185042
answers question: http://stackoverflow.com/q/24636763
score: 0
has body: I guess the form is being submitted via POST, but you have defined the route only for GET

http://stackoverflow.com/a/24664832
type: Answer
has comment: http://stackoverflow.com/comment/38238774
has comment: http://stackoverflow.com/comment/38238551
answers question: http://stackoverflow.com/q/24664805
has comment: http://stackoverflow.com/comment/38238903
has body: Try waiting for the destroy to complete before continuing.. something like: query.find({ success: function(posts) { Parse.Object.destroyAll(posts).then(function() { status.success("success"); }); }, error: function(error) { status.error("Error finding posts " + error.code + ": " + error.message); }, }); Asynchronous JavaScript trips everyone up.
has comment: http://stackoverflow.com/comment/38238008
has comment: http://stackoverflow.com/comment/38238678
has comment: http://stackoverflow.com/comment/38237956
upvote count: 5
has comment: http://stackoverflow.com/comment/38238656
has comment: http://stackoverflow.com/comment/38240599
has comment: http://stackoverflow.com/comment/38237969
downvote count: 0
has comment: http://stackoverflow.com/comment/38238707
has comment: http://stackoverflow.com/comment/38238640
has comment: http://stackoverflow.com/comment/38237917
score: 5

http://stackoverflow.com/comment/38126532
score: 0
type: AnswerComment
has text: Can you please post jsfiddle for same ?
type: Comment
comment on: http://stackoverflow.com/a/24606259

http://stackoverflow.com/comment/38980434
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24859040
has text: yes, I didn't realise that you can use JS/jQuery to add styles e.g. .css() etc. thanks.
type: AnswerComment

http://stackoverflow.com/a/25273870
answers question: http://stackoverflow.com/q/24606212
downvote count: 0
upvote count: 11
has body: Try using Ladda.stopAll(); See here: https://github.com/hakimel/Ladda
type: Answer
score: 11

http://stackoverflow.com/comment/38135979
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24610839
has text: Three slashes (the hostname may go between number 2 and 3). The path (after 3rd slash) has to be correct. Remember enclosing quotes.
score: 0

http://stackoverflow.com/q/24588547
has comment: http://stackoverflow.com/comment/38092250
answer count: 2
has answer: http://stackoverflow.com/a/24588687
possible better answer: http://stackoverflow.com/a/24588687
has body: I have this very basic code that I feel should be working but isn't. I have this form: &lt;form id="search-box" action=""&gt; &lt;input id="search" type="text" placeholder="Search here.." onkeyup="search(this.value)"&gt;&lt;!-- --&gt;&lt;input id="submit" type="submit" value="Search"&gt; &lt;/form&gt; This form fires a JS search function. This search function contains: function search(input){ alert(input); } I have linked the JS file containing the function in the head of the html document: &lt;script src="js/ajax.js"&gt;&lt;/script&gt; But the problem is this isn't working. I'm getting an error when the onkeyup is fired: Uncaught TypeError: object is not a function localhost:16:201 onkeyup localhost:16:201 May I get some assitance?
has title: Firing JS function from onkeyup event input
has comment: http://stackoverflow.com/comment/38092269
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24588589
linked to: http://stackoverflow.com/q/9158238
score: 0
has comment: http://stackoverflow.com/comment/38092301
tagged with: onkeyup
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24588589

http://stackoverflow.com/a/24686912
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38279069
type: Answer
accepted answer of: http://stackoverflow.com/q/24686849
upvote count: 2
has comment: http://stackoverflow.com/comment/38385543
has body: You can access variables by name: var file4 = 42; this["file"+4]++; alert(file4) // 43 Not sure if it is more appropriate to use this or window to access global variables.
score: 2
answers question: http://stackoverflow.com/q/24686849
has comment: http://stackoverflow.com/comment/38279127

http://stackoverflow.com/comment/38215321
type: QuestionComment
comment on: http://stackoverflow.com/q/24652787
has text: sessionStorage is string, not Date() instance. See : http://stackoverflow.com/a/24652916/2226755
score: 0
type: Comment

http://stackoverflow.com/q/24667087
tagged with: regex
answer count: 4
has answer: http://stackoverflow.com/a/24668145
has answer: http://stackoverflow.com/a/24668171
has comment: http://stackoverflow.com/comment/38243360
has comment: http://stackoverflow.com/comment/38243387
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38247471
has comment: http://stackoverflow.com/comment/38242276
type: Question
has title: jQuery .test returns false with regular expression
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24668173
score: 0
has answer: http://stackoverflow.com/a/24667111
has body: Here's a simple code that test input value if it does exist on regular expression. The main problem is that it always returns to false though the inputted value should return to true with regex. HTML &lt;input id="user" type="text" /&gt; jQuery $("#user").on("input propertychange",function(){ var user = $(this).val(); var pattern = /[^a-zA-Z 0-9 . -]/g; var clean_user = user.replace(/[^a-zA-Z 0-9 . -]+/g, ''); // Filter text box $("#user").val(clean_user); var fresh_user_value = $("#user").val(clean_user); if(pattern.test(fresh_user_value) == true){ alert("Working!"); } });

http://stackoverflow.com/q/24619690
has body: I have a file (jquerymenucss.js) in app/assets/javascripts. And I have a picture (arrow-down.gif) in app/assets/images. But this picture in not view on page!!! (view a empty picture). How to correct write a path? My js file: var arrowimages={down:['downarrowclass', 'arrow-down.gif', 25], right:['rightarrowclass', 'arrow-right.gif']} var jquerycssmenu={ fadesettings: {overduration: 350, outduration: 100}, //duration of fade in/ out animation, in milliseconds buildmenu:function(menuid, arrowsvar){ jQuery(document).ready(function($){ var $mainmenu=$("#"+menuid+"&gt;ul") var $headers=$mainmenu.find("ul").parent() $headers.each(function(i){ var $curobj=$(this) var $subul=$(this).find('ul:eq(0)') this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()} this.istopheader=$curobj.parents("ul").length==1? true : false $subul.css({top:this.istopheader? this._dimensions.h+"px" : 0}) $curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: arrowsvar.down[2]} : {}).append( '&lt;img src="'+ (this.istopheader? arrowsvar.down[1] : arrowsvar.right[1]) +'" class="' + (this.istopheader? arrowsvar.down[0] : arrowsvar.right[0]) + '" style="border:0;" /&gt;' ) $curobj.hover( function(e){ var $targetul=$(this).children("ul:eq(0)") this._offsets={left:$(this).offset().left, top:$(this).offset().top} var menuleft=this.istopheader? 0 : this._dimensions.w menuleft=(this._offsets.left+menuleft+this._dimensions.subulw&gt;$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft $targetul.css({left:menuleft+"px"}).fadeIn(jquerycssmenu.fadesettings.overduration) }, function(e){ $(this).children("ul:eq(0)").fadeOut(jquerycssmenu.fadesettings.outduration) } ) //end hover }) //end $headers.each() $mainmenu.find("ul").css({display:'none', visibility:'visible'}) }) //end document.ready } } //build menu with ID="myjquerymenu" on page: jquerycssmenu.buildmenu("myjquerymenu", arrow…
has answer: http://stackoverflow.com/a/24619910
type: UnansweredQuestion
score: -4
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/38153064
has title: How to write a correct path to picture?
has answer: http://stackoverflow.com/a/24619760
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/38153143
upvote count: 0
tagged with: javascript
tagged with: assets
favorite count: 0

http://stackoverflow.com/comment/38125460
has text: Actually it should work but still form is getting submitted, though I haven't selected all the radio buttons.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24605430
type: Comment

http://stackoverflow.com/q/24595219
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/24595453
linked to: http://stackoverflow.com/q/11903289
has answer: http://stackoverflow.com/a/24595388
type: UnansweredQuestion
tagged with: php
has title: php display all the images of a folder in a carousel
type: Question
tagged with: image
answer count: 2
has body: I have multiple tables and for each of them there is a button that when clicked should make all the images of a specific folder related to this button title appear in a carousel. I am able to pass the variable containing the folder name via AJAX but from there I don't know how to pass that value back to the php file and load/reload that div to display the images. Any suggestions? PHP file: echo " View Images "; /* some code*/ /*some code to display images of a folder in a carousel, the folder name of which is in data of ajax call*/ AJAX call: $(".view").click(function () { $.ajax({ url:"view.php", data:{view:$(this).val()}, type:"POST", success:function(data){ console.log(data); if (data!=""){ alert(data); } }, error:function(data){ alert("Network ERROR"); } }) return false; });

http://stackoverflow.com/comment/38173059
type: Comment
type: QuestionComment
has text: How on earth should anyone be able to answer a code question, just by looking at a screenshot? It would be pure guess.
score: 0
comment on: http://stackoverflow.com/q/24630487

http://stackoverflow.com/q/24665155
tagged with: audiocontext
has comment: http://stackoverflow.com/comment/68795833
tagged with: icecast
downvote count: 0
tagged with: html5-audio
answer count: 0
score: 1
type: Question
has body: I want to create a visual player for an icecast stream in HTML5/JS. I understand you have to use AudioContext to get this working, but I'm having trouble getting it working outside of Chrome, and have no clue why. Chrome works ok Firefox/Opera does nothing IE alerts Web Audio API not supported See the fiddle below for a working example. http://jsfiddle.net/L37qq/4/ Whats odd is that if I try a local mp3 file everything works fine in Chrome/FF/(Opera?) I'm fairly sure it has something to do with the line.. var source = context.createMediaElementSource(audio);
tagged with: javascript
has comment: http://stackoverflow.com/comment/38242211
has title: Icecast stream not loading through AudioContext
upvote count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38116376
score: 0
type: Comment
type: QuestionComment
has text: @IlyaIvanov can you please expand you things? As I understand I should create custom filter `myFilter` with 1 argument `filterCriteria`, also create separete event-handlers for each button, and inside those event-handlers I need to modify the `filterCriteria` scope varialbe? If so, then I think it's not good idea, because my custom filter will actually encapsulate behaviors of several different filters
comment on: http://stackoverflow.com/q/24600861

http://stackoverflow.com/comment/38279464
comment on: http://stackoverflow.com/q/24686879
has text: @wiesion http://jsfiddle.net/klebermo/M5G4D/
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24622908
has answer: http://stackoverflow.com/a/24634268
type: Question
tagged with: javascript
answer count: 1
tagged with: drop-down-menu
tagged with: jquery
has body: I have a kendo grid, and an html drop down. When I configure the drop down as single select, I'm able to successfully filter the kendo grid using the string value of the selected item from the drop down. Here's the filtering code that works when the drop down is a single select: $("#LocationListDropDown").on("change", function(e) { var ds = $("#grid").data("kendoGrid").dataSource; var dropdownVal = $(this).val(); ds.filter([ {"logic":"and", "filters":[ { "field":"Freight", "operator":"eq", "value": dropdownVal} ]} }); However, once I change that drop down to a multi-select, the filter only filters by the first selection. When the multi-select has more than one selection, the value is in an array of strings format. How do I filter the grid with multiple selections from the drop down?
tagged with: kendo-ui
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Filter kendo grid with multiselect drop down
score: 0

http://stackoverflow.com/q/24609327
downvote count: 0
has answer: http://stackoverflow.com/a/24619742
tagged with: java
has title: How to find input field is readonly or not in using selenium webdriver with java
has answer: http://stackoverflow.com/a/24612641
accepted answer: http://stackoverflow.com/a/24612641
type: Question
has comment: http://stackoverflow.com/comment/38136588
has body: I am using selenium webdriver with java to write the script. However, we have few fields which are getting disabled after click on button. We need to find this field are getting readonly mode or not. I have use isEnabled and isDisplayed but it is not working, the system displays NoSuchElementFound expection. Is there any way to handle this?
score: 5
tagged with: javascript
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/24609476
has answer: http://stackoverflow.com/a/53005854
upvote count: 5
has answer: http://stackoverflow.com/a/24609633
tagged with: selenium-webdriver
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24619742

http://stackoverflow.com/comment/38244719
type: Comment
type: QuestionComment
has text: is the loadFeed.js present on the same level as main_Window.js?
comment on: http://stackoverflow.com/q/24668428
score: 0

http://stackoverflow.com/comment/38354513
comment on: http://stackoverflow.com/q/24725877
score: 0
type: QuestionComment
type: Comment
has text: Yup! This was the only way I knew how to do it. Its a sort of "parallax" effect where different text will appear at a fixed location for a certain time and as you scroll the content above it, a new title will appear.

http://stackoverflow.com/comment/38110982
comment on: http://stackoverflow.com/a/24598258
has text: As I understood he needs to do it the opposite way
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24673098
accepted answer of: http://stackoverflow.com/q/24673028
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You forgot to echo the $totalPages variable. So the PHP part should read &lt;?php echo $totalPages; ?&gt;.
type: Answer
answers question: http://stackoverflow.com/q/24673028

http://stackoverflow.com/a/24713638
has body: Contents of abc.php that responses to the ajax call <?php //perform your work here with span id if(isset($_GET['value'])){ $id = $_GET['value']; //contains the span id sent using ajax $output['id']=$id; // I'm just going to echo the id header('Content-type: application/json'); echo json_encode($output); } ?> Content of test.php from which ajax calling is done Hello
answers question: http://stackoverflow.com/q/24712785
type: Answer
score: 0

http://stackoverflow.com/a/24717704
accepted answer of: http://stackoverflow.com/q/24689891
downvote count: 0
answers question: http://stackoverflow.com/q/24689891
type: AcceptedAnswer
type: Answer
has body: if you are developing in ts, you can concatenate all the js files into one by using the tag in your csproj like this: app.js using this tag is equivalent to using --out option with tsc.exe. this answer provides the mapping between tsc.exe options and equivalent tags to use in a csproj file. Note that the ts compiler relies on the <reference> tags in ts files to determine the order in which the generated js classes should appear in the final output file. if that order is incorrect, you will run into errors like this one.
score: 1
upvote count: 1

http://stackoverflow.com/a/24730752
accepted answer of: http://stackoverflow.com/q/24730741
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/24730741
type: Answer
score: 1
has body: You can use .each() in jquery for this $('options.high').each(function () { alert($(this).html()); }); Note: Remove the . before options, if it is not the class name.
upvote count: 2

http://stackoverflow.com/comment/38204401
has text: Hi Tim, thanks, I'm actually truing to query the mybadges class and return the badges that belong to the user that has been captured in friendRequest, really to show a list of that users activity.So in the variable friendRequest I actually want the a3aePaphBF ref not the one being returned so that the query works. If that makes sense~?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24634140

http://stackoverflow.com/comment/38278488
has text: Sorry to have offended you with my laziness. Next time, I will print screen my computer so that you can understand precisely everything that is going on. The plot method is part of a jQuery plug in that plots the graph, but you can see from the ordered pair values that that will be the case. I've done it with an array too, the fact I used an object notation was because I had tried a different method after I tried it with an array, and neither have worked. Apparently I was too lazy to change this. But you're right; I'm new to the forum and I will curb my laziness for future posts :p
type: AnswerComment
comment on: http://stackoverflow.com/a/24686444
type: Comment
score: 1

http://stackoverflow.com/comment/38248772
score: 0
type: Comment
type: QuestionComment
has text: @RubyRacer while searching to solve this, i just have added `jwplayer.js` file. Error is gone now. but i still cant see my video player
comment on: http://stackoverflow.com/q/24670055

http://stackoverflow.com/comment/38169484
has text: I think that the way you are looking is something like this: 1- Get all the img tags into that div. 2- Iterate all of them and get the src attribute. 3- When the name of src suits you, use the after or before command to append you new image.
comment on: http://stackoverflow.com/q/24628237
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38181145
has text: added it still nothing :( could the other javascripts be effecting it at all ?
type: AnswerComment
comment on: http://stackoverflow.com/a/24633633
score: 0
type: Comment

http://stackoverflow.com/q/24745899
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24745986
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38396166
tagged with: jquery-selectors
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38391080
has body: I'd like to select a set of elements and their children from the DOM. Then, I would like to run a set of selections on the DOM that excludes those elements, as if they were removed. .not() seems to match both parent elements and child elements and doesn't properly exclude. .find(':not(.myclass)') returns a list of about a bajillion elements and doesn't properly exclude. What's my trouble? This seems simple but the functions I expect to do this don't behave as I expect. I thought about cloning the DOM, removing the elements, and then running my selection matches on the cloned DOM... but that seems bad. Like, a major performance hit. What's the best way to do this? Here's the code I have: jQuery('html').not(".page-node,.quote").find(selector).each(function(){ //do stuff here to returned elements .page-node is a body class and should return the body element on nearly all pages and exclude the selector from being matched on those pages. Edit: I have created a jsFiddle to demonstrate what I'm talking about: http://jsfiddle.net/glassdimly/H4tJe/4/
accepted answer: http://stackoverflow.com/a/24745986
has title: Exclude matched DOM & children from selection?
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/38391215
downvote count: 2
tagged with: dom

http://stackoverflow.com/comment/38335583
score: 0
type: Comment
has text: @charlietfl xdebug shows nothing weird. Digging into chrome debugging now...
type: QuestionComment
comment on: http://stackoverflow.com/q/24716469

http://stackoverflow.com/q/24736591
score: 4
has comment: http://stackoverflow.com/comment/38375657
has comment: http://stackoverflow.com/comment/38375494
has title: Trying to create a carousel effect with jQuery
accepted answer: http://stackoverflow.com/a/24737858
possible better answer: http://stackoverflow.com/a/24737846
upvote count: 4
has answer: http://stackoverflow.com/a/24737562
has answer: http://stackoverflow.com/a/24738971
has answer: http://stackoverflow.com/a/24737846
tagged with: javascript
tagged with: jquery
answer count: 4
type: AnsweredQuestion
has body: There are four characters of which only one is being shown when the page is loaded. There are two arrows. One on the left and one on the right. When clicked on left arrow, the character present will fadeout and the previous character is faded in. When clicked on right arrow, the character present will fadeout and the next character is faded in. I've figure out how to fadeOut the present character in the screen, but don't know how to fadeIn the next or previous character when clicked on the arrows. Here is the fiddle which I created to illustrate the problem: http://jsfiddle.net/9K7bf/32/ And here is the code: The HTML: CSS: #characters{ width: 100%; height: 100px; } #one{ height: 50px; width: 50px; display: block; background-color: green; margin: 100px auto; } #two{ height: 50px; width: 50px; display: none; background-color: blue; margin: 100px auto; } #three{ height: 50px; width: 50px; display: none; background-color: purple; margin: 100px auto; } #four{ height: 50px; width: 50px; display: none; background-color: black; margin: 100px auto; } #arrow-left{ height: 25px; width: 25px; display: block; background-color: black; float: left; } #arrow-right{ height: 25px; width: 25px; display: block; background-color: black; float: right; } jQuery: $(document).ready(function(){ $("#arrow-right").on('click', function(){ $(".character").fadeOut().this(); }); $("#arrow-left").on('click', function(){ $(".character").fadeOut().this(); }); });
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24737858
type: Question
has comment: http://stackoverflow.com/comment/38375735
tagged with: css

http://stackoverflow.com/comment/38337345
type: QuestionComment
has text: HTML doesn't have arrays.
score: 2
type: Comment
comment on: http://stackoverflow.com/q/24717741

http://stackoverflow.com/comment/38279525
comment on: http://stackoverflow.com/a/24687243
type: AnswerComment
score: 0
type: Comment
has text: This won't work as when the `type='submit'` button is clicked the form is already submit. That's why we have 'onSubmit' event.

http://stackoverflow.com/a/24653373
answers question: http://stackoverflow.com/q/24651893
type: Answer
score: 0
has body: Hope you are looking for this, I understood and I made this, check out this once and ask what you exact needed.Below is the code for you... my =[ { "companyName" : "Amazon", "assets": 35, "users": 3 }, { "companyName" : "AT&amp;T", "assets": 35, "users": 3 }, { "companyName" : "Birla Tech", "assets": 35, "users": 3 }, { "companyName" : "Capgemini", "assets": 35, "users": 3 }]; var result=[]; var isFound=false; my.forEach(function(a){ for(var j=0; j&lt; result.length; j++){ if(a.companyName[0]==Object.keys(result[j])[0]){ isFound=true; temp=result[j]; temp[a.companyName[0]].push(a); }else { isFound=false; } } if(!isFound){ temp={}; temp[a.companyName[0]]=[a]; result.push(temp); } }); console.log(my);

http://stackoverflow.com/q/24708373
tagged with: jasmine
favorite count: 0
type: UnansweredQuestion
has body: This is my function in the controller code that I have exposed. //unit test code $.getMessagesUnit = function(chatId) { if (!(Titanium.Network.networkType === Titanium.Network.NETWORK_NONE)) { apiHelper.APIGetRequest(xxxxxxxx + '/messages/' + args.chatId, function(e) { $.view_indicator.visible = true; var status = this.status; if (status == 200) { console.log('get chats'); var data = JSON.parse(this.responseText); console.log(data); var rows = []; var i = 0; var blob; for (x in data.messages) { //Ti.API.debug(JSON.stringify(messages[x])); var nickname = null; var chatBlob = null; var picture = null; var timeStampCon = null; chatBlob = data.messages[x].message; nickname = data.messages[x].user.nickname; picture = data.messages[x].user.pictures[0]; //alert(data.messages[x].message); timeStampCon = utilities.getCurrentTimeFromStamp(data.messages[x].timestamp); textArea.addLabel(timeStampCon); //alert(data.messages[x].user.id); if (args.pickedId == data.messages[x].user.id) { textArea.recieveMessage(chatBlob); textArea.addLabel("\n"); } else { textArea.sendMessage(chatBlob); textArea.addLabel("\n"); } } //return rows; //end $.view_indicator.visible = false; } }, function(err) { alert('Unknown error from api'); $.view_indicator.visible = false; }); } else { alert('No internet connection found'); $.view_indicator.visible = false; } }; //end Here is my unit test code: it('test chat window function.', function() { $ = Alloy.createController('chatWindow', {}); expect($.getMessagesUnit(123).chatBlob). toBeDefined(); }); I want to test if the variables in the JSON request are defined, after the api call is made: var nickname = null; var chatBlob = null; var picture = null; var timeStampCon = null; to ensure that the data I am getting back from the unit test is defined. I am getting the following error: [INFO] : . ============================================================ [ERROR] : . THERE WERE FAILURES! [ERROR] : . ============================================================…
upvote count: 1
has answer: http://stackoverflow.com/a/24719123
tagged with: unit-testing
type: Question
has title: Unit testing void methods - Jasmine, javascript
tagged with: titanium-alloy
score: 1
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/38136891
type: Comment
type: QuestionComment
has text: We are planning on updating the self hosted copy of JW6 to 6.8 either today or tomorrow (early this week), I believe.
comment on: http://stackoverflow.com/q/24591927
score: 0

http://stackoverflow.com/a/24745390
has body: You can edit the innerHTML of the element to append your new item. var listElement = document.getElementById('hsubmenuitems'); listElement.innerHTML += ' Rosters '; With jQuery the syntax is a little shorter. $("#hsubmenuitems").append(' Rosters ');
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24745272
upvote count: 1
type: Answer

http://stackoverflow.com/q/24673560
has title: How to pass javascript variables values from twig to controller using href path in Symfony2?
accepted answer: http://stackoverflow.com/a/24673699
tagged with: href
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24674562
tagged with: twig
has answer: http://stackoverflow.com/a/24674562
has body: I would like to know how to pass javascript variables values from twig to controller using href path in Symfony2. this is my code: The problem is that it displays this message: Variable "a" does not exist . So, my question is: what is the correct code to do that?
has answer: http://stackoverflow.com/a/24673699
type: Question
answer count: 2
tagged with: javascript
tagged with: variables
score: 0
tagged with: symfony

http://stackoverflow.com/q/24744482
has answer: http://stackoverflow.com/a/24745274
has title: Disable Sessions in Kraken or node
tagged with: kraken.js
type: Question
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has body: Hey everyone I need to remove Sessions in my Kraken.js project when NODE_ENV=production due to this: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. Here is my Index.js file. 'use strict'; var kraken = require('kraken-js'), app = require('express')(), options = require('./lib/spec')(app), port = process.env.PORT || 8000; app.use(kraken(options)); app.listen(port, function (err) { console.log('[%s] Listening on http://localhost:%d', app.settings.env, port); }); here is the production.json that configures all of my prod options. This was duplicated from development.json "middleware": { "devtools": { "enabled": true, "priority": 35, "module": { "name": "kraken-devtools", "arguments": [ "path:./public", "path:./.build", { "template": { "module": "kraken-devtools/plugins/dustjs", "files": "/templates/**/*.js", "base": "templates", "i18n": "config:i18n" }, "css": { "module": "kraken-devtools/plugins/less", "files": "/css/**/*.css" }, "copier": { "module": "kraken-devtools/plugins/copier", "files": "**/*" } } ] } } }
tagged with: node.js

http://stackoverflow.com/comment/38236639
score: 0
has text: ahh... the ageless awful question... even here on SO, there must be dozens of attempts at this. Best bet, use a library, or use code from a library
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24664097

http://stackoverflow.com/comment/38302425
has text: this was where i struggled to ask the question accurately as depending on the site depends on what scripts i run, hence the bad example as a guide lol. One one site i clone an entire menu below a certain size, others affect layout, what images to load, the list goes on, hence looking for general ideas about how to achieve improved performance across the board.
comment on: http://stackoverflow.com/a/24698806
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24692201
has comment: http://stackoverflow.com/comment/38288299
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/24691908
has body: You can also do this without keyframes, by just using transition property #card.card { left: 10px; top: 0px; -webkit-transform: rotate(720deg); } #card { -webkit-transition: all 5s; position:absolute; } demo
has comment: http://stackoverflow.com/comment/38289877
has comment: http://stackoverflow.com/comment/38288321
downvote count: 0

http://stackoverflow.com/comment/38338118
comment on: http://stackoverflow.com/a/24718040
type: Comment
has text: @elclanrs Should I always use (or prefer to use) the mozilla developer network for references on answers?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38158285
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24622367
has text: Is the only code changing always the type of `AutomataGraph` created for each concrete factories? Where the arguments (`args`) comes from? Are they hard-coded, are they always the same?

http://stackoverflow.com/comment/38371128
score: 0
type: Comment
type: QuestionComment
has text: Imagine that a new folder is added to the structure, then I must change the code, otherwise, If I tell to jsTree the path, If any folder is added, it will change automatically.
comment on: http://stackoverflow.com/q/24735159

http://stackoverflow.com/comment/38387760
has text: @RobertHarvey I have briefly, but according to the documentation I shouldn't need to use that. It may be a good idea, but I just want to understand why the others aren't working.
comment on: http://stackoverflow.com/q/24743518
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/24656722
tagged with: ng-animate
answer count: 0
has title: How do I prevent angular from rending both views when switching routes with an ng-view
type: Question
tagged with: angular-strap
has body: I'm using angularjs with angular strap, and I have an ng-view that acts as the main container for my views and get updated with each route change. The problem I have is that Angular is showing both views, I looked at this question (how to prevent AngularJs from having old view and new view on dom when route changes), but it doesn't really answer my question of how to either prevent it, or apply nice animations to it, because right now it just shows the new one below the old for for a split second. I tried ng-animate="fadeIn", ng-animate="{enter: 'am-fade-and-scale', leave:'am-fade-and-scale'}", ng-animate="{enter: 'fadeIn', leave:'fadeOut'}" and ng-animate="none" and in all cases I didn't get any animation, and both were visible at the same time. My HTML is below. Update: I did get the animations works, I should have put the animation name on the class. , but the problem still remains that it puts the new content below the old content. So you both sets of content at the same time.
tagged with: javascript
has comment: http://stackoverflow.com/comment/38225593
score: 0
has comment: http://stackoverflow.com/comment/38225365
has comment: http://stackoverflow.com/comment/38233993
linked to: http://stackoverflow.com/q/20895111
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/24740379
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38380916
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38380857
tagged with: php
score: 1
has comment: http://stackoverflow.com/comment/38380690
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38380877
has comment: http://stackoverflow.com/comment/38380653
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38380583
has comment: http://stackoverflow.com/comment/38380772
has body: I have created a very simple "Picture Gallery" for internal research at my lab. I have an array with the file names (over 1000) from which I can call each one to be set into a table, displaying a 5 image row by five image column fashion. The initial links are thumbnail size images, which should be the links to the low resolution version of the same image, which I have on a directory called lowres with the same file name. I have created a hidden input field with the file name on them on a attempt to call the value of the input field and use this as the real value of the link. how can I get the image links to work so I can call the low resolution image buy using an AJAX call? Here is the PHP Code: ==================== $array = array("IMG_3944.jpg","IMG_3946.jpg","IMG_3947.jpg","IMG_3948.jpg","IMG_3951.jpg","IMG_3954.jpg","IMG_3955.jpg","IMG_3957.jpg","IMG_3958.jpg","IMG_3959.jpg","IMG_3960.jpg","IMG_3962.jpg","IMG_3963.jpg","IMG_3964.jpg","IMG_3965.jpg","IMG_3967.jpg","IMG_3971.jpg","IMG_3973.jpg","IMG_3980.jpg","IMG_3981.jpg","IMG_3983.jpg","IMG_3985.jpg","IMG_3990.jpg","IMG_3993.jpg","IMG_3996.jpg","IMG_4002.jpg","IMG_4005.jpg"); $l = count($array); $z = $l/25; ?> <?php /*================= Page numbers =====================*/ echo ' '; for($w = 1; $w < $z; $w++){ echo ' '.$w.' '; if($w == 13){ echo ' '; continue; }; }; echo ' '; ?> <?php $x = 0; $y = 1; $cut = 4; $nxtpg = 24; echo " "; for($x = 0; $x <= $l; $x++){ if($x <= $cut){ echo " "; if($x == $cut){ echo " "; $cut = $cut + 5; continue; }; if($cut == $nxtpg){ $y = $y+1; echo " "; $nxtpg = $nxtpg +25; }; }; }; ==================== Jquery Here I am attempting to "Alert me" with the result from the click. $(document).ready(function(){ $("#image").click(function(){ var cCode = $("#hiddenInput").val(this); alert(cCode); }); });
has answer: http://stackoverflow.com/a/24745701
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38380798
has title: PHP creates dynamic links, how to call the right div on Jquery upon click to execute AJAX call

http://stackoverflow.com/a/43413426
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24647749
has body: I faced something similar, perhaps it would be helpful. I needed to work through a tree via AJAX calls to build an object that represented the whole tree. When I made the AJAX call it would give me data about the child nodes which I then had to make AJAX calls to get their data. I needed to have the entire tree before I could render it, so I needed to know when I was done. The issue with $q.all is that yes you can pass it an array of promises, but the array is fixed at that point even if you add more promises to the array later. My (admittedly hacky) solve was to track the number of unanswered request and redo the $q.all if there were outstanding requests. var promisesArr = []; var unresolved = 0; function getChildNodes(node) { var url = BASE_URL + '/' + node.id; var prom = $q(function (resolve, reject) { unresolved++; $http.get(url).then(function (resp) { angular.forEach(resp.data.children, function(v){ var newNode = {}; newNode.id = v.id; getChildNodes(newNode); node.children.push(newNode); }); resolve(); unresolved--; }, function () { // Need to handle error here console.log('ERROR'); reject(); unresolved--; }) }); promisesArr.push(prom); } rootNode = {id: 1} getChildNodes(rootNode); allResolved(); function allResolved() { if (unresolved &gt; 0) { $q.all(promisesArr).then(allResolved); } else { RenderTree(rootNode); } }

http://stackoverflow.com/a/24742849
score: 1
has comment: http://stackoverflow.com/comment/38385152
has comment: http://stackoverflow.com/comment/38388746
has comment: http://stackoverflow.com/comment/38385632
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38390145
has comment: http://stackoverflow.com/comment/38390616
has comment: http://stackoverflow.com/comment/38390430
type: Answer
has body: It looks like it is opening a whole new page because it is. Your only option would be javascript. If I were wanting to do this, I would always only load the index page with nothing in your content div except the loading icon. Then once the page is loaded have jquery read the get variable and make an ajax request for the content of the page and load it into the div. Then, to make it easier on you since you are unfamiliar with javascript I would include the following jquery plugin: https://github.com/allmarkedup/purl then in .js file: $( document ).ready(function() { var loading_annimation = " "; var page = $.url().param("page"); if(page){ $('#page').load(loading_annimation ).load('/special_php_file_that_includes_JUST_content.php?page='+page); } else { $('#page').load(loading_annimation ).load('/special_php_file_that_includes_JUST_content.php?page=index'); } $(document).on('click','.link', function(e){ e.preventDefault(); var page = $(this).attr("data-link"); $('#page').load(loading_annimation ).load('/special_php_file_that_includes_JUST_content.php?page='+page); }); }); Then you will need to change your links to do something like this: Beta
has comment: http://stackoverflow.com/comment/38413908
has comment: http://stackoverflow.com/comment/38396019
has comment: http://stackoverflow.com/comment/38414008
has comment: http://stackoverflow.com/comment/38390730
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24742438
answers question: http://stackoverflow.com/q/24742438

http://stackoverflow.com/comment/38410613
score: 0
type: AnswerComment
has text: this.setPosition(); is not a function
type: Comment
comment on: http://stackoverflow.com/a/24732245

http://stackoverflow.com/a/24729502
has body: I solved this myself. When keydown event happens for the div, I create an input box and append it to body and I attach keyup event to that input box. In keyup event, I can easily find that if something is typed or not. If something is typed, then user wants to edit the cell otherwise I can check for special keys like Ctrl+End, Ctrl+Home and so on. Please note that input looks annoying as it comes up as soon as user starts typing. So, I make it somewhere at -1000px with position:absolute. I also tried making input box width and height 0, but then I could not read the .val() from the box. So, I used position:absolute; left:-1000px instead. May be this helps someone in any other related things. So, here is the code. $(spreadsheet).keydown(function(e) { if (e.keyCode == /*movement_keys*/) { //move between cells } else { var input = $('&lt;input type="text" style="position:absolute; left: -1000px; top: 0px;"/&gt;').appendTo('body'); $(input).focus(); $(input).keyup(function(e) { if ($(this).val() != '') { setTimeout(function() { spreadsheet.editCell($(this).val()); }, 1); } $(this).remove(); $(spreadsheet).focus(); }); } }); I had to wait for 1ms using setTimeout function to make focus perfect, otherwise focus was not going on the cell editor.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24723164
type: AcceptedAnswer
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/24723164
score: 2

http://stackoverflow.com/a/24735800
has body: Actually a function name followed by parentheses '()' is an invokation, while the name itself represents only a reference to that function (which you want to assign to a handler like .onclick).
answers question: http://stackoverflow.com/q/24735726
score: 0
type: Answer

http://stackoverflow.com/comment/38312511
type: QuestionComment
type: Comment
score: 2
has text: And I really frightened to use this in production... It feels like blackmagic being ruled by another even more powerful blackmagic.
comment on: http://stackoverflow.com/q/24700210

http://stackoverflow.com/comment/38175419
score: 0
has text: @Patrick: You're right. Upvoted. It wasn't that I was too lazy to search. I just didn't expect that month starts from zero when days start from one. The language should be consistent. Feel like a damn fool now. What a trivial question.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24629937

http://stackoverflow.com/q/24622428
has answer: http://stackoverflow.com/a/24622599
type: AnsweredQuestion
type: Question
has title: How can I prevent Express from parsing Angular templates?
accepted answer: http://stackoverflow.com/a/24622599
tagged with: javascript
tagged with: express
score: 0
has body: If I'm creating a view in Express and I'm using Hogan for server-side templating, how can I include templates for Angular to consume as well? For example, the following is a simple Express view with Angular's 'hello world' included: Document Message: {{message}} How do I prevent {{message}} from being parsed by the Express on the server?
linked to: http://stackoverflow.com/q/18174856
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/24653704
accepted answer of: http://stackoverflow.com/q/24599045
score: 2
answers question: http://stackoverflow.com/q/24599045
has comment: http://stackoverflow.com/comment/38218468
type: AcceptedAnswer
downvote count: 0
has body: The window that you create dynamically is not properly caught by the selector until you add it as an element in the page (for Chrome anyway). To solve this issue you could either append the GenericWindow to the body and dismiss it when you close the window. Or store the element in a variable and call your load on the variable. Working examples with Chrome in jsfiddle : Solution 1 :http://jsfiddle.net/4c3hu/ $(document).ready(function(){ openWindow('blerg', 'test', null); }); function openWindow(id, which, windowOptions) { $('&lt;div&gt;') .attr('id', 'GenericWindow') .addClass('modal hide fade') .html('&lt;div class="modal-header"&gt;&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;&lt;h3 id="WindowHeader"&gt;Loading...&lt;/h3&gt;' + '&lt;/div&gt;&lt;div id="divWindowContent" class="modal-body"&gt;Content!&lt;/div&gt;&lt;div id="WindowButtons" class="modal-footer"&gt;&lt;input type="button" id="btnWindowCancel" value="Cancel" class="btn" data-dismiss="modal" aria-hidden="true" /&gt;' + '&lt;input type="button" id="btnWindowSave" value="Save" class="btn btn-info" /&gt;') .modal({"keyboard":"true"}) .appendTo('body') .on('hidden', function (e) { var src = $(e.target); if (!src.hasClass('popover-link')) { $('#GenericWindow').remove(); clearErrors(); } }); if (!windowOptions) { //THIS IS THE ALERT. console.log('huh'); var link = '@Url.Action("replace", "Operations")' link = link.replace("replace", which) link = '/echo/html/' console.log(link); $('#divWindowContent').load(link, { id: id }, function (response, status, xhr) { console.log('after load'); if (status == "error") { var msg = "Error loading details : "; $('#divWindowContent').html(msg + xhr.status + " " + xhr.statusText); } }); } else { if (windowOptions.action) { var action = windowOptions.action; var link = '@Url.Action("view", "controller", new { Area = "MvcMembership" })'; if (!$.isNull(action.area)) link = link.replace("MvcMembership", action.area);…
type: Answer
upvote count: 2

http://stackoverflow.com/q/24648254
score: 1
type: Question
has answer: http://stackoverflow.com/a/24648363
has comment: http://stackoverflow.com/comment/38206858
tagged with: javascript
has answer: http://stackoverflow.com/a/24648597
accepted answer: http://stackoverflow.com/a/24648597
has body: I'm totally lost here. I'm trying to display information on my website on only using one line of text. If more info need to be shown, the extra info will be shown on second line. But how can I hide the second line and show a button "show more" instead? Once the user clicks on the show more button, the extra info/texts on second line will only be shown. Thanks... Below is my javascript for the button, I have no idea how to code the html part where the second line will be hidden automatically and display the "show more" button. var hide2 = 1; $('#showmorerates').click(function(){ if(hide2 == 1){ $('.morerates').toggle(300); document.getElementById("showmorerates").innerHTML = 'Show Less'; hide2 = 0; } else { $('.morerates').toggle(300); document.getElementById("showmorerates").innerHTML = 'Show More'; hide2 = 1; } });
upvote count: 1
has answer: http://stackoverflow.com/a/24648434
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/24648363
tagged with: css
has answer: http://stackoverflow.com/a/24648959
has title: Show "show more" button and hide second line
answer count: 4
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/24704020
has comment: http://stackoverflow.com/comment/38312471
has comment: http://stackoverflow.com/comment/38313667
has body: Trying to temporarily disable the jQuery tooltip $(document).tooltip( "option", "disabled", true ); When I try to re-enable them again, all of the title attributes are gone. I was trying to re-enable them using: $(document).tooltip( "option", "disabled", false); The title attributes is actually being removed completely when i first set it to disabled to true. Also tried: $(document).tooltip("disable"); $(document).tooltip("enable"); It is doing the same thing... Update Found a solution to my own question with the help of Jasen and zgr024. See below.
tagged with: jquery-ui-tooltip
has comment: http://stackoverflow.com/comment/38311995
has answer: http://stackoverflow.com/a/24705022
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/38314049
has title: How to re-enable jQuery tooltip after disabled = true?
type: Question
has comment: http://stackoverflow.com/comment/38311624
has comment: http://stackoverflow.com/comment/38311860
has answer: http://stackoverflow.com/a/24707759
accepted answer: http://stackoverflow.com/a/24707759
tagged with: javascript
has comment: http://stackoverflow.com/comment/38312180
possible better answer: http://stackoverflow.com/a/24705022
has answer: http://stackoverflow.com/a/36625413
score: 12
answer count: 3
has comment: http://stackoverflow.com/comment/38311095
tagged with: jquery
has comment: http://stackoverflow.com/comment/38312776
has comment: http://stackoverflow.com/comment/38312370
favorite count: 0
upvote count: 12
has comment: http://stackoverflow.com/comment/38311568

http://stackoverflow.com/q/24743114
has title: Webpack multiple named chunks ignoring names at runtime
tagged with: javascript
answer count: 1
downvote count: 0
has body: I am having trouble with webpacks code splitting functionality. I am trying to have 2 named chunks for two routes in my application which are not often visited. mysite.com/settings and mysite.com/access. here is my webpack.config.coffee module.exports = contentBase: "#{__dirname}/src/" cache: true entry: app: './src/coffee/app' head: './src/coffee/head' output: path: path.join(__dirname, 'build') publicPath: '/' filename: '[name].js' chunkFilename: '[name]-[chunkhash].js' plugins: [] And here is my router.coffee access: (slug) -&gt; _this = @ require.ensure ['../view/page/access-page.coffee'], (require) -&gt; AccessPage = require '../view/page/access-page.coffee' accessPage = AccessPage.getInstance() accessPage.render() unless accessPage.isRendered _this.showPage accessPage , 'access' settings: (slug) -&gt; _this = @ require.ensure ['../view/page/settings-page.coffee'], (require) -&gt; SettingsPage = require '../view/page/settings-page.coffee' settingsPage = SettingsPage.getInstance() settingsPage.render() unless settingsPage.isRendered _this.showPage settingsPage , 'settings' I am not using the webpack dev-server, instead I am watching simply by using the following cmd-line tool webpack -d --progress --colors --watch The problem is that it ignores the names when requiring the files, as you can see the format is '[name]-[hash].js' it generates files with the correct format e.g. settings-2j3nekj2n3ejkn2.js but during development, when I attempt to load the page, the browser complains that '-2j3nekj2n3ejkn2.js' cannot be found, somehow the mapping of the files, ignores the names. If I leave out the names, then it works. So the question is how can I setup mulitple named chunks correctly. Thanks in advance. Note I have checked out their examples in the docs at https://github.com/webpack/docs/wiki/code-splitting and I have followed their optimization docs aswell at https://github.com/webpack/docs/wiki/optimization But I am stuck
favorite count: 0
has answer: http://stackoverflow.com/a/24801540
type: UnansweredQuestion
score: 3
upvote count: 3
tagged with: amd
tagged with: coffeescript
type: Question
tagged with: commonjs
tagged with: webpack

http://stackoverflow.com/comment/38170040
comment on: http://stackoverflow.com/q/24628421
score: 0
type: Comment
has text: Huh? You said "I want to remove this vulnerability but i don't want to remove or change code in JQuery js file." The solution to add a page called "a" does _exactly_ that.
type: QuestionComment

http://stackoverflow.com/a/24633983
answers question: http://stackoverflow.com/q/24633803
upvote count: 1
has body: If I am correct then check this code it will help you $.getJSON('../_client/index.php', function(data) { for(var key in data) { // In comment check first loop data for each record. // key = 'frfgt55'; // For 1st loop var yourArrayRecord = data[key]; // For 1st loop &lt;- ["ABC","frfgt55","Aberdeen"] var perticularValue1 = yourArrayRecord[0]; // For 1st loop &lt;- "ABC" var perticularValue2 = yourArrayRecord[1]; // For 1st loop &lt;- "frfgt55" var perticularValue3 = yourArrayRecord[2]; // For 1st loop &lt;- "Aberdeen" } });
downvote count: 1
score: 0
type: Answer

http://stackoverflow.com/q/24635341
has answer: http://stackoverflow.com/a/24636426
has title: Using Node.js to access azure tablestorage
favorite count: 0
accepted answer: http://stackoverflow.com/a/24636426
upvote count: 1
tagged with: azure-storage
tagged with: node.js
tagged with: visual-studio
has body: I've been trying to write a typescript application in visual studio using node.js to store and access data in an azure table store. I've been having some trouble with the tutorials I've found. I've yet to get one to work properly. I have Node installed on my machine and a tablestore set up in azure. I'm not exactly sure what needs to be done in visual studio to get all the necessary packages/modules/whatever installed correctly. Many of the tutorials I've read have used express.js and or have "npm install"ed things and while I have no issue running the commands I don't really understand what I'm installing. tl;dr I want to make an html page where I can submit and display items to/from azure table store using node.js, typescript, and visual studio Also: I'd be willing to drop the typescript in favor of javascript if need be.
tagged with: typescript
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/24644948
has answer: http://stackoverflow.com/a/24644948
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41805092
score: 1
has text: Creating a `SimpleDateFormat` in a getter each time the object is accessed definitely isn't a good practice.
comment on: http://stackoverflow.com/a/26592388
type: AnswerComment
type: Comment

http://stackoverflow.com/a/48011082
upvote count: 2
score: -3
has comment: http://stackoverflow.com/comment/87700149
answers question: http://stackoverflow.com/q/24662289
has body: Instead of words, good example. Following code (if first promise resolved): Promise.resolve() .then ( () =&gt; { throw new Error('Error occurs'); }, err =&gt; console.log('This error is caught:', err) ); is identical to: Promise.resolve() .catch ( err =&gt; console.log('This error is caught:', err) ) .then ( () =&gt; { throw new Error('Error occurs'); } ) But with rejected first promise, this is not identical: Promise.reject() .then ( () =&gt; { throw new Error('Error occurs'); }, err =&gt; console.log('This error is caught:', err) ); Promise.reject() .catch ( err =&gt; console.log('This error is caught:', err) ) .then ( () =&gt; { throw new Error('Error occurs'); } )
has comment: http://stackoverflow.com/comment/87706348
downvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/121142932

http://stackoverflow.com/q/24590817
type: Question
tagged with: javascript
score: 0
has body: url = "http://api.soundcloud.com/tracks/&lt;ID&gt;/stream?client_id=YOUR_CLIENT_ID" request.head(url, function(e, r, b) { var headcontentlength = r.headers["content-length"]; } request(url, function(e, r, b) { var getcontentlength = r.headers["content-length"]; }).pipe(fs.createWriteStream(fileName)); fs.stat(fileName, function(e, s) { var statscontentlength = s.size } Issue is that headcontentlength !== getcontentlength !== statscontentlength. None of these match. For some realson the fileStream closes and doesn't match the content-length from the head request. Why would that be the case? Would the head and get request give different content-lengths? How can I over come this? Might have something to do with the soundcloud api?
answer count: 1
has comment: http://stackoverflow.com/comment/38097654
has title: Content Length doesn't match write size
type: UnansweredQuestion
tagged with: request
has answer: http://stackoverflow.com/a/24590975
tagged with: http
tagged with: node.js
has comment: http://stackoverflow.com/comment/38097306
has comment: http://stackoverflow.com/comment/38097447

http://stackoverflow.com/comment/38219780
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24655080
has text: Added some source code

http://stackoverflow.com/a/59721643
answers question: http://stackoverflow.com/q/24646322
score: 0
has body: Here are useful links that provide some details and examples, about all types of JavaScript functions: Function declaration, Function expressions, Function expression with grouping operators, Named function expression, Immediately-Invoke Function Expression (IIFE), Function constructor, Object constructor, ES6 Arrow function, Cloures, Closure and scope ... JavaScript Scope Context and ‘this’ under the hood Different ways of defining functions in JavaScript (this is madness!) Different ways of defining a function in JavaScript JavaScript Function 6 Ways to Declare JavaScript Functions Functions - Browser compatibility How do JavaScript closures work? These are articles and tutorials that I found that can help to better understand JavaScript types of functions and applications of function expressions. I hope they can help you.
type: Answer

el
tags question: http://stackoverflow.com/q/24615758
type: Tag
tag name: el

http://stackoverflow.com/comment/38307138
comment on: http://stackoverflow.com/q/24691717
score: 0
type: Comment
type: QuestionComment
has text: I meant "flaw" there, not "flow".

http://stackoverflow.com/comment/38237191
has text: @zerkms how can i do this in reverse manner ?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24664157
type: Comment

http://stackoverflow.com/a/24702565
has comment: http://stackoverflow.com/comment/38307827
has body: "value on selected index of selObj " : it has an apostrophe. You'll need to escape that.
answers question: http://stackoverflow.com/q/24702497
has comment: http://stackoverflow.com/comment/38307991
score: 0
type: Answer

http://stackoverflow.com/comment/38196184
has text: looking good. Another issue, if you click inside but release out of the control (mouseup is not captured by that directive) the car does not stop
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24641608

http://stackoverflow.com/q/24666632
score: 0
has body: I am trying to learn a little about jquery and working with some UI widgets (JQWidgets). I am trying to get call a php script and call back some data in json format. I know that the json format is correct because I can get a listbox to show and run correctly if I just run it straight through. I am trying to type a value into a textbox and when I click on a submit button it will return a list of data into the listbox. When I click the button, the outline of box shows then disappears. I am not sure what I am doing. Javascript Code: $(document).ready(function() { //create jqxButton widget $("#btnSubmit").jqxButton({ width: '150'}); //create jqxListBox widget $("#btnSubmit").bind('click', function() { //Do som var textValue = $("#txtSearch").val(); var url = "include/showsearch.php?show_name='" + textValue + "'"; //returns json data var source = { datatype: "json", datafields: [ { name: 'name' }, { name: 'id' } ], url:url }; var dataAdapter = new $.jqx.dataAdapter(source); dataAdapter.dataBind(); //crate jqxList widget $("#search_grid").jqxListBox({source: dataAdapter,selectedIndex: 0,theme:'classic',displayMember: "name", valueMember:"id",itemHeight:70,height:'75%',width:'100%'}); }); }); Partial HTML: Search For: Thanks in advance. EDIT: I also want to mention that I am using 000webhost and I turned off the tracking script they use.
type: UnansweredQuestion
has title: jquery jqwidgets listbox disappearing when submit button clicked
type: Question
tagged with: listbox
answer count: 1
has answer: http://stackoverflow.com/a/24674392
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38355677
has text: Haha, not a retard Michel....just one of many people who had yet to have made that particular mistake! Catches most people at one point or another.
comment on: http://stackoverflow.com/a/24727180
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38165150
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24625907
has text: Aha, I overcomplicated it again. This worked - thank you!

http://stackoverflow.com/a/24724326
downvote count: 0
upvote count: 2
has body: Note that isNaN can behave in unintuitive ways. For example: isNaN('') evaluates to false, and parseInt('') evaluates to NaN. EDIT: MDN shows an example of stricter way to parse integers, ensuring that only strings consisting of decimal digits (or the string Infinity) are parsed as integers. This prevents the string "50 ways to leave your lover" from being parsed as 50, as parseInt will do. This will need to be modified to allow for floating point numbers, and strings will need leading/trailing whitespace trimmed before this function is used: filterInt = function (value) { if(/^(\-|\+)?([0-9]+|Infinity)$/.test(value)) return Number(value); return NaN; } console.log(filterInt('421')); // 421 console.log(filterInt('-421')); // -421 console.log(filterInt('+421')); // 421 console.log(filterInt('Infinity')); // Infinity console.log(filterInt('421e+0')); // NaN console.log(filterInt('421hop')); // NaN console.log(filterInt('hop1.61803398875')); // NaN console.log(filterInt('1.61803398875')); // NaN
has comment: http://stackoverflow.com/comment/38355498
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/38350930
answers question: http://stackoverflow.com/q/24724257
has comment: http://stackoverflow.com/comment/38350737

http://stackoverflow.com/comment/38309760
comment on: http://stackoverflow.com/q/24702032
score: 0
type: Comment
type: QuestionComment
has text: Quick answer: you could try [`index`](http://jongware.mit.edu/idcs6js/pc_TextVariableInstance.html#index), available for most (if not *all*) Text based elements.

http://stackoverflow.com/q/24616858
has body: I am working on ASP.NET Web Forms application. I have added some angular controllers and other angular funcatinlity to application. Now i need to apply minification of JS and CSS files and i am trying to use in built bundling provider by System.Web.Optimization dll. I am getting error when applying bundling on angular.js and my angular code files. I am not understanding that what is causing error. collection.Add(new ScriptBundle("~/bundles/startupbundle") .Include("~/Scripts/jquery-2.1.0.js") .Include("~/Scripts/jquery-ui-1.10.4.min.js") .Include("~/Scripts/jquery-migrate-1.2.1.min.js") .Include("~/Scripts/bootstrap.min.js") .Include("~/Scripts/modernizr-2.7.2.js") .Include("~/Scripts/jquery.blockUI.min.js") .Include("~/Scripts/select2.mi![enter image description here][1]n.js") .Include("~/Scripts/jquery.nicescroll.js") .Include("~/Scripts/jquery.smartWizard.js") .Include("~/Scripts/scripts.js") .Include("~/Scripts/kendo.all.min.js") .Include("~/Scripts/toastr.min.js") .Include("~/Scripts/underscore-min.js") .Include("~/Scripts/bootstrap.min.js") .Include("~/WebApp/AppScripts/master-page.js") .Include("~/WebApp/AppScripts/Dasboard.js") .Include("~/Scripts/angular.min.js") );
type: Question
has title: Bundling not working for angularJS
tagged with: javascript
tagged with: optimization
score: 0
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/26301936
linked to: http://stackoverflow.com/q/23845679
tagged with: angularjs
type: UnansweredQuestion
tagged with: system.web.optimization

http://stackoverflow.com/q/24616250
has answer: http://stackoverflow.com/a/24616294
has comment: http://stackoverflow.com/comment/38146743
has comment: http://stackoverflow.com/comment/38146273
has comment: http://stackoverflow.com/comment/38146343
has comment: http://stackoverflow.com/comment/38146828
has comment: http://stackoverflow.com/comment/38146887
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/38146796
has body: I want to replace the current page url with a new url then execute some javascript code once the new url has finished loading. Right now this is my code. My Title When I open my html file the alert(location.href) executes first then the window.open executes. I want this to be reversed where the window.open executes first, then once the new url is finished loading my second function executes. Also which way is better to change the url window.location.href = "http://www.example.com"; window.open("http://www.example.com", "_self");
has answer: http://stackoverflow.com/a/24616308
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38147006
has comment: http://stackoverflow.com/comment/38146913
has title: Execute JavaScript after new page load

http://stackoverflow.com/comment/38136588
has text: share the HTML snippet of the disabled field, before and after clicking on button.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24609327

http://stackoverflow.com/q/24709388
answer count: 1
has comment: http://stackoverflow.com/comment/38321559
has comment: http://stackoverflow.com/comment/38321565
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/24709467
type: Question
has body: In my 'todo list' project here, the Add button needs to be enabled only when the textarea is not blank. For that I have added the code: // show add button only when text is entered $("#new_todo_item").on("change input propertychange paste", function(){ // line # 64 in JS $("#add").prop('disabled' , ! $("#new_todo_item").val().length ); }); To reproduce the problem, add the first item, then for second item an empty item is allowed to be added, even at third too. This part of the code was working earlier. I think because of the further changes made, something is conflicting with this. What am I doing wrong here? Can someone please point me to the corect direction? jsFiddle EDIT: I changed that part of code to: $(document).on("change input propertychange paste", "#new_todo_item", function(){ ... });, but it did not make any difference.
tagged with: javascript
tagged with: jquery
has title: Blank element getting added even when restricted
accepted answer: http://stackoverflow.com/a/24709467
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38110491
type: Comment
type: QuestionComment
has text: could it be that something with angular or mean.io is deregistering the click event?
comment on: http://stackoverflow.com/q/24597943
score: 0

http://stackoverflow.com/comment/38197121
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24642893
has text: JavaScript runtime error: Unable to get property 'length' of undefined or null reference in code39.js function filterInput(data) { var Result = ""; var datalength = data.length; //** errors here

http://stackoverflow.com/comment/38329256
comment on: http://stackoverflow.com/a/24709157
has text: @FrankConijn I noticed the image wasn't actually blurred, but the OP specifically asked for "blurred" so I provided that in addition to they grey out/overlay
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38176158
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24631740
has text: I edited my question with my new jquery but it isnt changing the class of the product-title div
type: Comment

http://stackoverflow.com/q/24613536
has comment: http://stackoverflow.com/comment/38141176
has body: I have a Web form. Based on its user input, a score is calculated. I want to reflect/represent that score on a gauge. My problem is, the variable which contains the value of score is calculated in code behind but the javascript for the gauge is in the ASPX file. How do I retrieve the value with the script and run it to get my score value reflected in the gauge? Any examples/help would be highly appreciated. &lt;script&gt; var g1, g2, g3, g4, total; var total= document.getElementById('&lt;%=HiddenField1.ClientID%&gt;').value; function gauge() { var g1 = new JustGage({ id: "g1", value: total, min: 0, max: 100, title: "Big Fella", label: "pounds" }); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/38144718
answer count: 0
has comment: http://stackoverflow.com/comment/38142748
type: Question
has title: Reflect changes Dynamically in javascript gauge in c#
tagged with: c#
has comment: http://stackoverflow.com/comment/38143642
has comment: http://stackoverflow.com/comment/38148081
tagged with: javascript
has comment: http://stackoverflow.com/comment/38142303
has comment: http://stackoverflow.com/comment/38142484
has comment: http://stackoverflow.com/comment/38142929
has comment: http://stackoverflow.com/comment/38143985
has comment: http://stackoverflow.com/comment/38168737
has comment: http://stackoverflow.com/comment/38143901
score: 0
has comment: http://stackoverflow.com/comment/38143459
has comment: http://stackoverflow.com/comment/38142892
tagged with: asp.net
type: UnansweredQuestion

http://stackoverflow.com/a/24711721
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: Do the operations on the data returned by the query in the success callback of the query. At the time of $(document).ready(), the data wont be available :)
answers question: http://stackoverflow.com/q/24711663

http://stackoverflow.com/q/24618723
tagged with: c++
type: AnsweredQuestion
downvote count: 2
upvote count: 1
has body: I am writing a WCF RESTFUL service over a c++ console application. client uses a browser and connects to that c++ application via my restful wcf service,Whenever my wcf service gets an update from c++ application, I need to send that status update to a browser client without the browser refreshing the page. How can I do this? please help me out. Thanks a lot in advance.
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/24618854
has title: restful wcf service makes a client callback whenever there is update in a server
score: -1
accepted answer: http://stackoverflow.com/a/24618854
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: rest
tagged with: wcf

http://stackoverflow.com/a/24721277
type: AcceptedAnswer
has body: Try this, var outOff = 1000; var value = 20; var result = (value * 100) / outOff; $("#divID").width( result.toString() + '%');
accepted answer of: http://stackoverflow.com/q/24721207
answers question: http://stackoverflow.com/q/24721207
type: Answer
upvote count: 14
score: 13
downvote count: 1

http://stackoverflow.com/q/24624609
has title: jquery post file and button value and get response from script
type: Question
linked to: http://stackoverflow.com/q/166221
has comment: http://stackoverflow.com/comment/38164547
tagged with: javascript
linked to: http://stackoverflow.com/q/2320069
has body: I am trying to post file and button value and process it in php. Issue is in my php script ha2e.php condition if (isset($_FILES['file'])) {} always goes false html: &lt;div id="htmlar2en" style="text-align:center"&gt; &lt;div class="container"&gt; &lt;div style="text-align:center"&gt; &lt;h1&gt; Arabic to English HTML &lt;/h1&gt; &lt;form method="post" enctype="multipart/form-data" target="iframe4" id = "htmla2e"&gt; *.XLSX &lt;input type="file" name="file" /&gt;&amp;nbsp;&amp;nbsp;&lt;input type="submit" id="submit4" name="submit4" value="HTML Arabic to English" /&gt; &lt;/form&gt; &lt;iframe name="iframe4" id="iframe4" src="" style="display:none" &gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; jquery: $(document).ready(function() { var extra_data = "This is more stuff to send"; var Bvalue = $(this).attr("value"); $('#submit4').click(function() { $.ajax({ type: "POST", url: "he2a.php", data: {'form': $("#htmla2e").serialize(), 'other': extra_data, 'submit4': Bvalue}, success: function(msg) { alert("Form Submitted: " + msg); } }); }); }); php: &lt;?php if (isset($_FILES['file'])) { header('Content-Type: text/html; charset=UTF-8'); echo '&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" /&gt;'; require_once "simplexlsx.class.php"; require '../../Arabic.php'; $Arabic = new I18N_Arabic('Transliteration'); $xlsx = new SimpleXLSX( $_FILES['file']['tmp_name'] ); echo "df"; echo '&lt;table border="1" cellpadding="3" style="border-collapse: collapse"&gt;'; $eng = array(); list($cols,) = $xlsx-&gt;dimension(); foreach( $xlsx-&gt;rows() as $k =&gt; $r) { // if ($k == 0) continue; // skip first row echo '&lt;tr&gt;'; for( $i = 0; $i &lt; $cols; $i++) { if ($_POST['submit3'] == 'HTML English to Arabic') { $temp = $Arabic-&gt;en2ar($r[$i]); } else if ($_POST['submit4'] == 'HTML Arabic to Englis') { $temp = $Arabic-&gt;ar2en($r[$i]); } else continue; echo '&lt;td&gt;'.( (isset($r[$i])) ? $temp : '&amp;nbsp;' ).'&lt;/td&gt;'; } echo '&lt;/tr&gt;'; } …
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/24625409
tagged with: jquery
has answer: http://stackoverflow.com/a/24625504
favorite count: 0
has comment: http://stackoverflow.com/comment/38164356
type: UnansweredQuestion
tagged with: php
downvote count: 0
score: 1

http://stackoverflow.com/comment/38154485
type: Comment
type: QuestionComment
has text: @DavidShorthose: I presume I can do that, but it doesn't quite fit the business requirement. It's one of those pages that are supposed to be visible anonymously (e.g. display all products you have in your store), and when the user wants to purchase it, then they need an account. If you force them to log in too early, they might not even be interested in what you have to offer at all.
comment on: http://stackoverflow.com/q/24617839
score: 0

http://stackoverflow.com/q/24659530
has answer: http://stackoverflow.com/a/28868102
tagged with: twitter-bootstrap
has title: What is difference between Bootstrapper.bindDOMParsed( function ) and Bootstrapper.bindDOMLoaded( function )?
type: UnansweredQuestion
has body: What is difference between Bootstrapper.bindDOMParsed( function ) and Bootstrapper.bindDOMLoaded( function ) ?
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/38138385
has text: Its a rank. I need all the columns to sort their values, but not this first and second columns, I don't want the rank to move at all
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24612284
type: AnswerComment

http://stackoverflow.com/q/24690481
has title: JWPlayer - undefined is not a function
has answer: http://stackoverflow.com/a/36046541
type: AnsweredQuestion
upvote count: 5
has answer: http://stackoverflow.com/a/24691275
has comment: http://stackoverflow.com/comment/38306379
type: Question
tagged with: jwplayer
answer count: 2
accepted answer: http://stackoverflow.com/a/24691275
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38285439
favorite count: 0
score: 5
has body: Im wondering if someone could help me out. Im trying to load a video using jwplayer but am getting errors. This is the code im using. &lt;script type="text/javascript"&gt; jwplayer("legacyPlayer").setup({ width:370, height:240, file: "https://s3.amazonaws.com/legacy/videoname.mp4", }); &lt;/script&gt; &lt;div id="legacyPlayer" align="center"&gt;&lt;/div&gt; The error my console is showing is as follows: Uncaught TypeError: undefined is not a function Any help getting this working would be greatly appreciated. Cheers,
has comment: http://stackoverflow.com/comment/38285412
has comment: http://stackoverflow.com/comment/38285579
possible better answer: http://stackoverflow.com/a/36046541

http://stackoverflow.com/comment/38218017
has text: You would just put Nick Johnson in the first element of the doctors array: http://jsfiddle.net/CZ95C/1/ Is that what you mean?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24626929

listener
tags question: http://stackoverflow.com/q/24733289
tags question: http://stackoverflow.com/q/24687834
tags question: http://stackoverflow.com/q/24735807
tags question: http://stackoverflow.com/q/24649924
tags question: http://stackoverflow.com/q/24652398
type: Tag
tag name: listener
tags question: http://stackoverflow.com/q/24649215
tags question: http://stackoverflow.com/q/24626312

http://stackoverflow.com/a/24698913
answers question: http://stackoverflow.com/q/24698827
has body: You can use method chaining. Just return this; at the end of your functions and use them like controller.filterByDate(date).filterByClient(client); So your methods would look like $.fn.filterbyDate = function (filterValue) { //Do Stuff return this; }; $.fn.filterbyClient = function (filterValue) { // Do Stuff return this; }; EDIT: If its used by different controllers, you have to abstract your controllers, so that the methods don't have to filter the controllers itself, but a list which they use. So you can do something like: var list = controller1.list.filterByDate(date); controller2.list = list.filterByClient(client);
type: Answer
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/38300619

http://stackoverflow.com/q/24591912
has body: While sending a JSONObject response to my dojo 1.9.3 request/xhr callback function I receive a Invalid character synatx error. I checked my JSON format with JSONLint and its valid. Really confused by what I'm doing wrong. JSON format being sent: { "issuer":"CN=***** CA , OU=*******, O=*********, L=****, ST=***, C=**", "Thumbprint":"*********", "valid to":"Mon *************", "valid from":"*****", "version":2 } Servlet Code: JSONObject cert = new JSONObject(); cert.put("version", x509certificate.getVersion()); cert.put("valid from", x509certificate.getNotBefore()); cert.put("valid to", x509certificate.getNotAfter()); cert.put("issuer", x509certificate.getIssuerDN().getName()); cert.put("Thumbprint", getThumbPrint(x509certificate)); System.out.println(cert); System.out.println(cert.toString()); out.print(cert); DOJO/HTML Code: Start Output: Start
tagged with: dojo
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/38110268
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has title: JSON invalid character syntax error - Dojo
type: Question
has comment: http://stackoverflow.com/comment/38102171
linked to: http://stackoverflow.com/q/22919643
has comment: http://stackoverflow.com/comment/38114715
has comment: http://stackoverflow.com/comment/38112882
tagged with: javascript
tagged with: servlets
linked to: http://stackoverflow.com/q/2483771
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38103403
has answer: http://stackoverflow.com/a/24603923
favorite count: 0
has comment: http://stackoverflow.com/comment/38113833
accepted answer: http://stackoverflow.com/a/24603923
has comment: http://stackoverflow.com/comment/38099345

http://stackoverflow.com/q/24714649
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38346225
has answer: http://stackoverflow.com/a/24734672
downvote count: 0
has body: just want to add jquery UI button style to all buttons in the following way but it does not work. Please help. $(document).ready(function() { $("button").button(); }); here is the example code of my button(view file): $data = array( 'name' =&gt; $places_id, 'class' =&gt; 'review', 'content' =&gt; 'Write a Review' ); echo form_button($data);
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38347749
has comment: http://stackoverflow.com/comment/38331656
possible better answer: http://stackoverflow.com/a/24734672
has answer: http://stackoverflow.com/a/24741202
type: AnsweredQuestion
has title: Cannot add jquery UI button style to all buttons Codeigniter
accepted answer: http://stackoverflow.com/a/24741202
tagged with: codeigniter
upvote count: 1
type: Question
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/38331724
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38331519
answer count: 2

http://stackoverflow.com/q/24682804
tagged with: javascript
tagged with: flask
has comment: http://stackoverflow.com/comment/38272304
has comment: http://stackoverflow.com/comment/38274105
downvote count: 0
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38271135
tagged with: http://stackoverflow.com/tag/html
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/38271277
upvote count: 2
type: UnansweredQuestion
has title: If I need to populate HTML elements, where should I do it?
has body: I have a select field on an html page. This can be in a Jinja2 template with Flask (what I happen to be using) or whatever template you want. If I need to dynamically populate this select based on external data, in my case a database, how should I do it? As I see it, I have three options: Load the page and populate everything through ajax calls. Calling some script on the back end, getting the data, and returning it. The javascript would then handle actually creating the html to put into the select. Generate the html on the back end before the page even loads and then insert it with a variable. This seems more straight-forward than #1, since the "flow" doesn't have to go back and forth between the front- and back-end. A hybrid of #1 and #2 where I would get the data on the back end before the page loads. Then pass it off to the front end, using javascript to generate the html. Writing these out finally, I would probably go with number 3, but since I have not had any formal training or guidance on this sort of stuff, I wouldn't know exactly what is best. Additionally, is there a fourth or even fifth option? I am learning so I am open to anything.
type: Question

http://stackoverflow.com/q/24630849
tagged with: http://stackoverflow.com/tag/html
has title: How to change html5 pattern error messages for email
favorite count: 0
has body: Html5 required attribute adds normally the error message "Please fill out this field." and it can easily be changed with the following code oninvalid="setCustomValidity('Custom text in another language..')" oninput="setCustomValidity('')" However, I have noticed that when I use inputs with type email I still get messages such as "Please enter a part following '@." and "Please include an '@' in the email address", how can I change them?
type: Question
has answer: http://stackoverflow.com/a/25667479
tagged with: required
answer count: 1
has comment: http://stackoverflow.com/comment/38206200
upvote count: 3
accepted answer: http://stackoverflow.com/a/25667479
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38173697
type: AnsweredQuestion
score: 3

dom
tags question: http://stackoverflow.com/q/24745899
tags question: http://stackoverflow.com/q/24594280
type: Tag
tags question: http://stackoverflow.com/q/24659648
tags question: http://stackoverflow.com/q/24720782
tags question: http://stackoverflow.com/q/24665602
tags question: http://stackoverflow.com/q/24743637
tags question: http://stackoverflow.com/q/24746699
tags question: http://stackoverflow.com/q/24660603
tags question: http://stackoverflow.com/q/24717095
tags question: http://stackoverflow.com/q/24695290
tags question: http://stackoverflow.com/q/24723267
tags question: http://stackoverflow.com/q/24623179
tags question: http://stackoverflow.com/q/24743308
tags question: http://stackoverflow.com/q/24663169
tags question: http://stackoverflow.com/q/24596499
tags question: http://stackoverflow.com/q/24597559
tags question: http://stackoverflow.com/q/24650469
tags question: http://stackoverflow.com/q/24715433
tags question: http://stackoverflow.com/q/24749183
tags question: http://stackoverflow.com/q/24671034
tags question: http://stackoverflow.com/q/24677894
tags question: http://stackoverflow.com/q/24666636
tags question: http://stackoverflow.com/q/24624791
tags question: http://stackoverflow.com/q/24593510
tags question: http://stackoverflow.com/q/24638129
tags question: http://stackoverflow.com/q/24596091
tags question: http://stackoverflow.com/q/24600465
tags question: http://stackoverflow.com/q/24594267
tags question: http://stackoverflow.com/q/24678468
tags question: http://stackoverflow.com/q/24608723
tags question: http://stackoverflow.com/q/24736756
tags question: http://stackoverflow.com/q/24593579
tags question: http://stackoverflow.com/q/24605280
tags question: http://stackoverflow.com/q/24679556
tags question: http://stackoverflow.com/q/24671258
tag name: dom
tags question: http://stackoverflow.com/q/24662927
tags question: http://stackoverflow.com/q/24657468
tags question: http://stackoverflow.com/q/24615977
tags question: http://stackoverflow.com/q/24636080
tags question: http://stackoverflow.com/q/24597353
tags question: http://stackoverflow.com/q/24642021
tags question: http://stackoverflow.com/q/24684003
tags question: http://stackoverflow.com/q/24746060
tags question: http://stackoverflow.com/q/24589908
tags question: http://stackoverflow.com/q/24633562
tags question: http://stackoverflow.com/q/24693480

http://stackoverflow.com/a/24722001
has body: You should work with functions. e.g. function createModelPattern(name, start, end) { var i, j, model = {}; for(i = start, j = 0; i &lt;= end; i++, j++) { model[name + i] = j; } return model; } console.log(createModelPattern("param", 1, 10));
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24721926
answers question: http://stackoverflow.com/q/24721926
type: Answer
has comment: http://stackoverflow.com/comment/38346459
upvote count: 1
score: 1

http://stackoverflow.com/comment/38338703
score: 0
type: AnswerComment
type: Comment
has text: something is going wrong with the post-vars and the way PHP gets them. the `undefined index` errors means that PHP does not find the index `email` in the `$_POST` variable. using firebug or another tool, find out what is exactly being send to the PHP-server and `print_r($_POST)` reveals what the `$_POST` actually receives
comment on: http://stackoverflow.com/a/24708562

http://stackoverflow.com/comment/38327695
type: Comment
has text: The main disadvantages is probably that it's invalid, arrays have numbered indexes. Then again, there are no associative arrays?
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24712625

http://stackoverflow.com/q/24715702
has answer: http://stackoverflow.com/a/24715831
has comment: http://stackoverflow.com/comment/38333379
linked to: http://stackoverflow.com/q/12630891
has answer: http://stackoverflow.com/a/24759587
duplicate of: http://stackoverflow.com/q/12630891
has title: Scraping Javascript generated content in PHP
score: 0
tagged with: web-scraping
tagged with: php
linked to: http://stackoverflow.com/q/21221571
accepted answer: http://stackoverflow.com/a/24759587
type: AnsweredQuestion
has body: I'd like to get the data from this page https://widgets1.fxpro.com/Home/CurrencyMovers, basically getting plain text content TRY 0.33%, GOLD 0.26%,... What's the esiest way to do that using PHP based software or some web based service? I have tried to study the source code, but was unable to get the data source directly. Therefor I'll need to use something like a headless browser.
tagged with: screen-scraping
has comment: http://stackoverflow.com/comment/38333502
has comment: http://stackoverflow.com/comment/38333425
has comment: http://stackoverflow.com/comment/38333350
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/24715831
tagged with: javascript
has comment: http://stackoverflow.com/comment/38344449

http://stackoverflow.com/comment/38350882
type: QuestionComment
has text: Yeah you are right I spelt it wrong in this function... It's been a long day.. thanks guys!
comment on: http://stackoverflow.com/q/24724729
score: 0
type: Comment

http://stackoverflow.com/comment/38273575
type: Comment
has text: The problem is that I'm not clicking too fast. I'm actually clicking manually, and waiting quite a bit between clicks. The id is clearly set on the record, but does not get serialized. This is such a basic failure (basically preventing all updates) that I cannot believe it is a problem in Ember. It must be me doing something wrong...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24683397

http://stackoverflow.com/comment/38374798
has text: And that would be the var f element, which I wanted. But it doesn't work.
comment on: http://stackoverflow.com/a/24737064
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24806902
answers question: http://stackoverflow.com/q/24683953
score: 0
type: Answer
has body: Answer: read_ratio = pendulum.elements.read_ratio; followed by const0 = read_ratio.value; reads the value from the form.

http://stackoverflow.com/a/49582314
type: Answer
has body: In your node code, make sure you put these two lines of code var express = require('express'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyparser.urlencoded({ extended: false })); app.use(bodyparser.json()); ......then your other code follows.. enjoy...
answers question: http://stackoverflow.com/q/24687633
score: 0

http://stackoverflow.com/q/24742195
type: UnansweredQuestion
tagged with: input
has comment: http://stackoverflow.com/comment/38384112
has answer: http://stackoverflow.com/a/24742479
tagged with: select
has comment: http://stackoverflow.com/comment/38383919
type: Question
has title: Why is dropdown returning incorrect value?
has comment: http://stackoverflow.com/comment/38383965
tagged with: javascript
has comment: http://stackoverflow.com/comment/38384186
has body: I'm having an issue where I'm using jQuery to get the value of a drop down, however, it is only returning the value that was originally selected. The page is written with php and gets values from a database. If a select element is previously selected, then the option with that value has the selected attribute put on it. This results in something like this: 1 2 3 The problem that I'm having with the javascript is that no matter what gets selected, the option that has the selected attribute to start is always returned as the value for that input. It doesn't matter what option is actually selected, option 2 is always returned as the selected element. Here is the javascript that I'm using. $.each( inputs, function( key, value ){ var element = $( "[name='" + key + "']" ); var this_val = $( element ).val(); console.log( this_val ); //always returns 2 }); The variable inputs is an associative array with key and value pairs that match input names in the form. Any help you could provide on why this is happening would be appreciated. Thanks!
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38384305
tagged with: jquery

http://stackoverflow.com/comment/38369314
type: Comment
type: QuestionComment
has text: @AshokRathodHi, thanks for taking an interest. That was my conclusion as well. I had wrapped my function in '$(document).ready(function() {}' but still the same error
comment on: http://stackoverflow.com/q/24732401
score: 0

http://stackoverflow.com/a/24632852
accepted answer of: http://stackoverflow.com/q/24632069
has comment: http://stackoverflow.com/comment/38178563
type: Answer
answers question: http://stackoverflow.com/q/24632069
has comment: http://stackoverflow.com/comment/38183133
has comment: http://stackoverflow.com/comment/38179177
has comment: http://stackoverflow.com/comment/38179018
has comment: http://stackoverflow.com/comment/38180979
score: 3
has body: Add a button to your panel. On click, self.port.emit some message telling your main.js code to hide the panel. Upon receiving the message, call panel.hide(). Working example main.js var self = require("sdk/self"); var panel = require('sdk/panel').Panel({ width : 400, height : 400, contentURL : self.data.url('prompt.html'), contentScriptFile: self.data.url('prompt.js') }); // On "close" messages from the content script... panel.port.on("close", function() { console.log("asked to close"); // hide/close the panel. panel.hide(); }); // Initially show the panel for testing purposes. panel.show(); prompt.html MyPanel close MyPanel div1 div2 prompt.js // Wire-up an on click event listener. document.getElementById("close_button").addEventListener("click", function() { // Emit a "close" message to main. self.port.emit("close"); });
has comment: http://stackoverflow.com/comment/38180465
upvote count: 3
has comment: http://stackoverflow.com/comment/38178638
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38183234

http://stackoverflow.com/comment/38280763
score: 0
comment on: http://stackoverflow.com/q/24687961
type: Comment
type: QuestionComment
has text: Images can be used in one of two ways: 1) As a URL where the browser will fetch the image from some host. 2) As a data URI where the actual image data is encoded into the URI and the browser decodes it from the URI and uses it directly (e.g. the image data was already included in the page). The second way is generally more complicated and not supported in older browsers so I'm wondering why you would just expose the image as an image resource so it could be accessed by the browser via URL just like your other image?

http://stackoverflow.com/comment/38209588
comment on: http://stackoverflow.com/a/24607059
has text: You are 100% correct! I thought that this didn't happen with i.e. result["123"] but it does.. Shame on me!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24700204
tagged with: datepicker
upvote count: 1
accepted answer: http://stackoverflow.com/a/24701551
tagged with: css
has comment: http://stackoverflow.com/comment/38303401
type: AnsweredQuestion
score: 1
has title: Datepicker javascript - Cannot read property 'valueOf'
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38303454
tagged with: jquery
has answer: http://stackoverflow.com/a/24701551
has body: i want to use datepicekr as check-in - check-out so I have HTML: Datum: Od I try to make it workable with js: var nowTemp = new Date(); var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0); var checkin = $("#dp1").datepicker({ onRender: function(date) { return date.valueOf() < now.valueOf() ? 'disabled' : ''; } }).on('changeDate', function(ev) { if (ev.date.valueOf() > checkout.date.valueOf()) { var newDate = new Date(ev.date) newDate.setDate(newDate.getDate() + 1); checkout.setValue(newDate); } checkin.hide(); $("#dp2")[0].focus(); }).data('datepicker'); var checkout = $("#dp2").datepicker({ onRender: function(date) { return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : ''; } }).on('changeDate', function(ev) { checkout.hide(); }).data('datepicker'); but I get error: Uncaught TypeError: Cannot read property 'valueOf' of undefined What that exactly mean? What I can do to solve this problem? I use the code from official web resource for datepicker for bootstrap...
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/38303346

http://stackoverflow.com/a/24644085
has comment: http://stackoverflow.com/comment/65302433
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24643058
upvote count: 11
has body: You can 'initialize' your buttons with the data attribute when you load the page using standard jQuery: $('button').data('loading-text', 'Bezig...'); OR, you can set the options for the button component like you would other components in Bootstrap: $('button').button({loadingText: 'Bezig...'}); DEMO
type: Answer
answers question: http://stackoverflow.com/q/24643058
downvote count: 1
score: 10

http://stackoverflow.com/comment/41692621
comment on: http://stackoverflow.com/a/26427838
score: 1
type: AnswerComment
has text: On your example, when you click multiple times on slide left, it breaks. I'm currently using this code above on my website and it's working. You always can do console.log in your array and see what happens with the indexes!
type: Comment

http://stackoverflow.com/comment/38393019
comment on: http://stackoverflow.com/q/24746930
has text: Your question is confusing but maybe this is what you want: https://github.com/rogerwang/node-webkit
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38124654
has text: Your plnkr does not match what you have shown here.
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24604890

http://stackoverflow.com/comment/38202927
type: Comment
comment on: http://stackoverflow.com/a/24645928
score: 0
type: AnswerComment
has text: The css for this line already has fill set to none and set the stroke and still not working. I see the behavior is more like area rather than a path.Not sure what is wrong!

http://stackoverflow.com/q/24686652
has comment: http://stackoverflow.com/comment/38278434
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38278566
score: 1
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/38278447
has body: In JS, I want to do something if a variable is defined or not. I was under the impression this syntax would work: if (foo) { console.log('foo is defined'); } else { console.log('foo is not defined'); } But I get a "Uncaught Reference Error: foo is not defined": http://jsfiddle.net/cfUss/ Am I missing something? I thought this was very basic js and had used this syntax a ton before.
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/24686673
downvote count: 1
has comment: http://stackoverflow.com/comment/38278537
linked to: http://stackoverflow.com/q/24686001
has comment: http://stackoverflow.com/comment/38278585
has answer: http://stackoverflow.com/a/24686693
has comment: http://stackoverflow.com/comment/38278533
favorite count: 0
possible better answer: http://stackoverflow.com/a/24686673
has title: Do something if a variable is defined
has answer: http://stackoverflow.com/a/24686833
accepted answer: http://stackoverflow.com/a/24686833
has comment: http://stackoverflow.com/comment/38278601

http://stackoverflow.com/comment/38333204
comment on: http://stackoverflow.com/q/24715666
type: Comment
type: QuestionComment
has text: What is your question?
score: 1

http://stackoverflow.com/comment/38236230
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24663670
score: 0
has text: Give me just a moment

http://stackoverflow.com/a/24702103
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/38324994
answers question: http://stackoverflow.com/q/24701922
type: Answer
has comment: http://stackoverflow.com/comment/38308422
has comment: http://stackoverflow.com/comment/38308562
has body: It would be much more versatile and effective to send the mail on the server side, rather than asking the client to rely on their own mail client (when someone clicks a mailto link in the browser, the browser attempts to open a mail client like Outlook or Thunderbird, which may or may not be configured). You can print various forms on the page which include subject, to address and message inputs, ingest them via post (i.e. the user submits the form), and then send the emails from the server directly in response to the form submission. Start with this: https://www.php.net/manual/en/function.mail.php And check out PHPMailer: https://github.com/PHPMailer/PHPMailer Also if you're working with a framework, they've likely got their own utilities for sending mail, which is preferable to the above 2 approaches. A very simple example of what I'm talking about might look something like this: &lt;form action='/' method='post'&gt; To Address: &lt;input type='text' name='to_addr' /&gt; &lt;br/&gt; Subject: &lt;input type='text' name='subject' /&gt; &lt;br/&gt; Message: &lt;textarea name='to_addr'&gt;&lt;/textarea&gt; &lt;br/&gt;&lt;br/&gt; &lt;input type='submit' name='send' value='Send Message' /&gt; &lt;/form&gt; &lt;?php if(!empty($_POST['send'])) mail( $_POST['to_addr'] , $_POST['subject'] , $_POST['message'] , 'From: no-reply@somedomain.com');

http://stackoverflow.com/comment/38185078
score: 0
has text: Yep I ran a `layer.children.length` and got back 500 something. Which, Im assuming is the correct number, but now I might have to actually count each triangle on the visible canvas to be sure. The question about the scope though... that Im not entirely sure. Also good catch with that but Ive noticed for the id naming that it ends up being i=01, j=11 or i=11, j=01 so there wont be much issue there. Also, im unsure of how searching for a specific id within the stage container will give me the correct parent of the node?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24623235

http://stackoverflow.com/comment/38199973
type: AnswerComment
comment on: http://stackoverflow.com/a/24644494
type: Comment
has text: Although req.body.AddressValidateRequest.Address.length did work.
score: 0

http://stackoverflow.com/comment/38140795
comment on: http://stackoverflow.com/q/24613489
score: 0
has text: This question has absolutely nothing to do with [tag:jquery]!!!
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24749068
has comment: http://stackoverflow.com/comment/38397144
score: 1
type: Question
has comment: http://stackoverflow.com/comment/38397171
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/24749250
has body: I've got a table column definition that looks like this: &lt;td class="dvRequiredField validationFailed"&gt; *&amp;nbsp; &lt;input name="ctl00$MainContent$dvCustomer$ctl04" type="text" title="First Name" class="validationFailed"&gt; &amp;nbsp;Required Field. &lt;/td&gt; How do remove the "asterisk" (or in a sense replace it with '') using jquery? I've tried the following: $('td.validationFailed').each(function () { $(this)[0].innerHTML = $(this)[0].innerHTML.replace(/\*/g, ''); }); It does not work. It replaces/removes the text value of my input control. Thanks, JohnB
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38396891
upvote count: 1
has answer: http://stackoverflow.com/a/24749250
has title: How do I remove an asterisk (*) from a the text contained with a using jquery?
type: AnsweredQuestion

http://stackoverflow.com/comment/38344783
type: QuestionComment
comment on: http://stackoverflow.com/q/24711247
type: Comment
has text: @ParagGangil yes i know about console,the code isn't working,any suggestions?
score: 0

http://stackoverflow.com/comment/38190875
type: QuestionComment
comment on: http://stackoverflow.com/q/24639189
has text: I see. So the `index` script will call `queue`, and everything is included after the `Loader.js`?
score: 0
type: Comment

http://stackoverflow.com/a/24723726
score: 0
answers question: http://stackoverflow.com/q/24723508
type: Answer
has body: This will get the value 'month' into your alert box but I'm not sure what you're trying to achieve so there may be a better method. jQuery(document).ready(function(){ alert(&lt;%=month=&gt;); }

http://stackoverflow.com/comment/43598800
comment on: http://stackoverflow.com/a/24707921
type: Comment
has text: Where did you get that is deprecated?
score: 1
type: AnswerComment

http://stackoverflow.com/comment/38250387
type: Comment
type: QuestionComment
has text: @AmitKumar isn't working
score: 0
comment on: http://stackoverflow.com/q/24671113

http://stackoverflow.com/comment/38131906
has text: Using your solution this is the console.log() of my form.serialize `clientName=Teste+EST&clientEmail=teste%40est.pt&clientAddressone=&clientAddresstwo=&clientCPostal=&clientCity=&clientNif=&clientBirthdate=&documenttype=BI&documentNumber=1231231&documentNumberSec=&clientPhonePri=31231231231&clientPhoneSec=&profiles=1&profiles=2&profiles=3&clientActivationTime=&clientDeactivationTime=&submitNewClient= `
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24607024

http://stackoverflow.com/a/24728023
answers question: http://stackoverflow.com/q/24726984
type: Answer
score: 1
upvote count: 1
has body: My question is when add5(2) returns function(y), how does it determine the value of y when y is not explicitly assigned anywhere within or outside of makeAdder(x)? The function returned by makeAdder is: function(y) { return x + y; } where x has already been assigned the value 5. So there is your y. It's inclusion as a formal parameter in the function expression is effectively the same as declaring it with var, x is initialised the same way in makeAdder. Also, is add5(2) = makeAdder(5)(2)? Yes, though I think you meant == (equals), not = (assignment). And if so, how can this function execute when makeAdder(x)(y) is not defined in this example? makeAdder returns a function, so the second set of parenthesis causes it to be called with whatever value is provided (including none): makeAdder(5)(2) // 7 is the same as: var foo = makeAdder(5); var bar = foo(2); the only difference being that in the second case, the intermediate result is stored as foo before being called. Also, is there a way that describing it as such might help clarify this issue for someone who's having a hard time internalizing the logic behind closure? The real power of a closure is that a function can return another function that continues to have the same scope chain it had when it was created, so that it has exclusive access to local variables of all the execution contexts on its scope chain (other than global variables, they aren't exclusive) after those functions have finished executing. Complex inheritance structures can be created with closures (not recommended though). It's this persistence that makes a closures really useful, and not just scope chain resolution.
downvote count: 0

http://stackoverflow.com/q/24684978
accepted answer: http://stackoverflow.com/a/24689336
linked to: http://stackoverflow.com/q/3964646
score: 0
tagged with: php
answer count: 1
has title: Ajax posting troubles
has comment: http://stackoverflow.com/comment/38276408
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24689336
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: Question
has body: I am working on a feature that involves posting to ajax. The relevant bit of code is supposed to pick out a certain class, loop through its elements, put the desired elements in an array and post that array. It works fine for getting background image links. However, the same concept seems to fail when applied to text written in an html textarea. Even though I use the .val method to get the text from the textarea and push it into the relevant array, which I then post, no text gets uploaded to the database. Here is javascript. $('#createButton').click(function() { var getImages = []; var getText = []; var count = $('.count').length; var tcount = $('.tcount').length; if ( count &gt;= 1 ) { $('.count').each(function () { if ($(this).css('background-image')) { var src = $(this).css('background-image'); var parseSrc = src.replace(/^.*(?=images)|\W+$/g, ''); //parse out the actual link from url( link ) getImages.push(parseSrc); }//end nested if });//end each function }//end count if if ( tcount &gt;= 1 ) { $('.tcount').each(function () { if ($(this).val()) { var textVal = $(this).val(); getText.push(textVal); }//end if });//end each }//end tcount if $.post('fileHandler.php', {image: getImages, text: getText});//end post });//end createButton click And the PHP include('classes/fileclass.php'); $f = new Files (); $storyID = $f-&gt;idHandler(); if ($_POST['image']) { foreach($_POST['image'] as $imageSrc) { $f-&gt;insertStoryImages($storyID, $imageSrc); }//end foreach if ($_POST['text']) { foreach($_POST['text'] as $textBox) { $f-&gt;insertStoryText($storyID, $textBox); }//end foreach }//end text if }//end image if And the bit that actually does the server call from the OOP script (for the text call only, the image works just fine): public function insertStoryText ($storyID, $textBox) { $db = new pdo("mysql:host=localhost;dbname=storyboard;charset=utf8", "someuser", "somepass"); $stmt = $db-&gt;prepare("INSERT INTO sbData(storyID, textBox) VALUES (:storyID, :textBox)"); $stmt-…
has comment: http://stackoverflow.com/comment/38277435

http://stackoverflow.com/a/24691390
answers question: http://stackoverflow.com/q/24691312
type: Answer
has body: Don't put manually quotes to your data object. try JSON.stringify(data) It will convert that to acceptable string format.
score: 0

angular-ui-router
tags question: http://stackoverflow.com/q/24644366
tags question: http://stackoverflow.com/q/24613202
tags question: http://stackoverflow.com/q/24616367
tags question: http://stackoverflow.com/q/24637800
tags question: http://stackoverflow.com/q/24622120
tag name: angular-ui-router
tags question: http://stackoverflow.com/q/24636171
tags question: http://stackoverflow.com/q/24634119
tags question: http://stackoverflow.com/q/24725777
tags question: http://stackoverflow.com/q/24638677
tags question: http://stackoverflow.com/q/24663973
tags question: http://stackoverflow.com/q/24674284
tags question: http://stackoverflow.com/q/24622474
type: Tag

http://stackoverflow.com/comment/38330516
comment on: http://stackoverflow.com/q/24714227
score: 0
type: Comment
type: QuestionComment
has text: This is unrelated, but `img` is self-closing: ` `, not ` `.

http://stackoverflow.com/q/24629937
upvote count: 3
accepted answer: http://stackoverflow.com/a/24629972
downvote count: 1
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/24629996
has comment: http://stackoverflow.com/comment/38175558
tagged with: date-formatting
tagged with: date
has answer: http://stackoverflow.com/a/24629984
type: Question
has comment: http://stackoverflow.com/comment/38171871
has comment: http://stackoverflow.com/comment/38172085
tagged with: javascript
has body: I have this date variable in javascript $scope.dt and the contents is Tue Jul 08 2014 00:00:00 GMT+0800 (Malay Peninsula Standard Time). I want to convert it to return a string that is 2014-7-8 (YYYY-MM-DD). Below is the function I wrote; function convertDate_YYYYMMDD(d) { var curr_date = d.getDate(); var curr_month = d.getMonth()+1; //why need to add one? var curr_year = d.getFullYear(); return (curr_year + "-" + curr_month + "-" + curr_date ); } It works fine. What I don't understand is why do I need to add 1 to get the correct curr_month? If I do not do this, the month will always be off by one. The code works but I don't know why it works. Can someone advise?
has comment: http://stackoverflow.com/comment/38175419
answer count: 3
has title: Why there is need to add 1 to the month for this date conversion?
tagged with: datetime
has comment: http://stackoverflow.com/comment/38172580
linked to: http://stackoverflow.com/q/1453043
favorite count: 0
possible better answer: http://stackoverflow.com/a/24629996
has answer: http://stackoverflow.com/a/24629972

http://stackoverflow.com/comment/38267553
type: Comment
has text: What was the problem? What did you change?
comment on: http://stackoverflow.com/a/24677845
type: AnswerComment
score: 0

foreground
type: Tag
tags question: http://stackoverflow.com/q/24632762
tag name: foreground

http://stackoverflow.com/comment/38295788
type: QuestionComment
score: 0
has text: I have got some idea through answer...thank you :)
comment on: http://stackoverflow.com/q/24695991
type: Comment

http://stackoverflow.com/q/24596768
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38108075
downvote count: 1
has comment: http://stackoverflow.com/comment/38108154
score: -1
has title: document.write will not show output
type: Question
upvote count: 0
has body: When i write array element it will not show output when i click asending and desending no output will be printed....plese check my query if fault in it ...i think function is stop working when i click button it nothing show me <TITLE>Javascript Arrays Implementation of Sort and Reverse Functions </h> Enter number of Elements
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24596905
has comment: http://stackoverflow.com/comment/38108232

http://stackoverflow.com/q/24730229
answer count: 1
tagged with: asp.net
has title: webmethod shows 500 (Internal Server Error)
type: UnansweredQuestion
tagged with: vb.net
score: 0
has answer: http://stackoverflow.com/a/24730273
tagged with: webmethod
type: Question
has comment: http://stackoverflow.com/comment/38361956
tagged with: javascript
has body: I am trying to call a webmethod from alertBook.aspx.vb. But I received an error 500 (internal Server Error) whenever I click on button. Is this a right way to call the webmethod from javascript? I am new to javascript. Thanks in advance. My javascript as follow: function webMethod() { setInterval(function () { $.ajax({ type: "post", url: "alertBook.aspx/newUid", contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { OnSuccess(result); }, error: function (xhr, status, error) { OnFailure(error); } }); }, 3000); } function OnSucceeded(response) { alert(response); //pushNoti(response, "info", "y"); } function OnFailure(error) { alert(error); } alertBook.aspx is WebMethod My webmethod as follow: <WebMethod()> _ Public Shared Function newUid(ByVal msg As String) As String Dim objForm As New alertBook Dim objUtl As New uClass.fUtilities Dim sqlQuery As String Dim UID1, UID2 As String Dim notiStr As String Dim objDb As New uClass.dbFunctions("myCon") Dim dtRecords As DataTable sqlQuery = "select top 1 UID from alertsBook order by UID desc" If objDb.getDataTable(dtRecords, sqlQuery) = False Then Return objForm.displayMessage("Error", objDb.errDesc) End If For rCount = 0 To dtRecords.Rows.Count - 1 UID1 = dtRecords.Rows(rCount)("UID") Next If UID1 <> UID2 Then notiStr = " " UID2 = UID1 'scriptDiv.InnerHtml = notiStr Else notiStr = "" End If Return notiStr End Function

http://stackoverflow.com/comment/38148274
has text: If you found the answer helpful, can I ask for you to upvote and accept it, thanks.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24615886
score: 0

http://stackoverflow.com/q/24657341
type: AnsweredQuestion
has body: Good day all, I'm new to CodeIgniter and I really need some help. I'm trying to make a confirmation message(div id="delmsg") using jquery when deleting a mysql record. But only the delete operation works but I don't see any message. Code for Model page: function delete_post($postID) { $this->db->where('post_id', $postID); $this->db->delete('khanposts'); } Code for Controller page: function deletepost($postID) { $this->khanpost->delete_post($postID); redirect(base_url().'khanposts/index/'); } Code for View page: if (!isset($posts)){ echo " There are currently no active posts. "; }else{ echo ' '; echo ' Email Address Contact No. Actions '; foreach ($posts as $row){ echo ' ' .$row['email']. ' ' .$row['contact']. ' Delete '; } echo ' '; echo ' '; } Is there any way that I could use jquery message in codeigniter? And also do I've to load any jquery plugin file manually in codeigniter? Any help would be grateful. Tnx.
tagged with: mysql
accepted answer: http://stackoverflow.com/a/24657892
possible better answer: http://stackoverflow.com/a/24657880
answer count: 2
has comment: http://stackoverflow.com/comment/38224524
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24657892
has answer: http://stackoverflow.com/a/24657880
score: 0
has title: showing confirmation message using jquery in codeigniter
has comment: http://stackoverflow.com/comment/38223811
tagged with: codeigniter
tagged with: php
type: Question

http://stackoverflow.com/q/24640869
has comment: http://stackoverflow.com/comment/38192806
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/38192970
has title: How to convert an vertical menu to an accordion menu
has answer: http://stackoverflow.com/a/24641145
type: Question
tagged with: javascript
score: 0
has body: I'm trying to build a responsive tab menu but I'm trying to go for a accordion like menu (e.g. the content between the tabs ) when the menu go into the vertical view, but I have no idea how to go about it without losing the responsiveness. HTML Responsive Tabs Test1 Test2 Test3 Test1 Test2 Test3 CSS body { font-family: Arial, sans-serif; } div.tabBox { width:99.9%; float:left; overflow: visible; } div.tabBox h3 { padding:20px 0px; } ul.tabs { margin: 0; padding: 0; float: left; list-style: none; height: 32px; width:99.9%; } ul.tabs li { float: left; margin: 0; padding: 0; height: 32px; line-height: 32px; margin-bottom: -1px; overflow: hidden; position: relative; } ul.tabs li a { display: block; padding: 0 5px; outline: none; background:none; } .tabContainer { border-top: none; overflow: hidden; clear: both; float: left; width:99.9%; min-height:300px; margin-bottom:10px; } .tabContent { padding: 20px; } .tabContent h3 { padding:0px; } /**** TABS STYLES ****/ div.tabBox h3 { } ul.tabs { border-bottom: 1px solid #ccc; border-left: 1px solid #ccc; border-top-left-radius:5px; -moz-border-top-left-radius:5px; -webkit-border-top-left-radius:5px; } ul.tabs li { } ul.tabs li a { background:#eee; text-decoration: none; font-size: 11px; color: #000; outline: none; border: 1px solid #ccc; border-left: none; border-top-left-radius:5px; -moz-border-top-left-radius:5px; -webkit-border-top-left-radius:5px; border-top-right-radius:5px; -moz-border-top-right-radius:5px; -webkit-border-top-right-radius:5px; } ul.tabs li a:hover { background: #eee; } ul.tabs li.active { border-bottom:1px solid #fff; } ul.tabs li.active a, ul.tabs li.active a:hover { background: #fff; } div.tabContainer { border-bottom:1px solid #ccc; border-left:1px solid #ccc; border-right:1px solid #ccc; background:#fff; } @media only screen and (max-width: 767px) { div.tabBox { border: 1px solid #ccc; } ul.tabs { height: auto; display: block; width:100%; border-left:0px; } ul.tabs li { width:100%; } ul.tabs li a { b…
linked to: http://stackoverflow.com/q/9715112
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/38243592
score: 0
has text: can you please share your requirement briefly, so we can help you
comment on: http://stackoverflow.com/q/24668296
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24619977
answers question: http://stackoverflow.com/q/24619903
type: Answer
downvote count: 0
score: 1
has body: You could do something like this to group all the records with the same user name together in an array: _.chain(users) .groupBy('username') .value(); Or this to handle them some other way you like _.chain(users) .groupBy('username') .map(function(userArray, username) { ... }) .object() .value(); For example: var users = [ { username: 'one' }, { username: 'two' }, { username: 'two' } ]; var obj = _.chain(users) .groupBy('username') .map(function(userArray, username) { return (userArray.length === 1) ? [[username, userArray[0]]] : _.map(userArray, function(v, i) { return [username + '_' + (i+1), v] }); }) .flatten(true) .object() .value(); console.log(obj); Will produce: {one: Object, two_1: Object, two_2: Object} Where Object represents a reference the original object declared in users. Demonstration
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24619903

http://stackoverflow.com/a/24708858
score: 0
answers question: http://stackoverflow.com/q/24708676
has comment: http://stackoverflow.com/comment/38320493
type: Answer
has body: Do like $(document).ready(function(){ var male = 'yes'; $(document).on('click', '#button1', function() { var value = $(this).val(); $('#button2').html(eval(value)); }); }) Fiddle
has comment: http://stackoverflow.com/comment/38320809

http://stackoverflow.com/comment/38359132
has text: @FelixKling I'm pretty sure that is exactly what `.getScript` does.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24728795
score: 0

http://stackoverflow.com/comment/38205748
comment on: http://stackoverflow.com/q/24647721
type: Comment
score: 2
has text: Generating JS on the server is accepted practive, though elclanrs suggestion to use JSON sound like a solid solution.
type: QuestionComment

http://stackoverflow.com/comment/38331157
score: 0
type: Comment
type: QuestionComment
has text: the sps-modules in the machine, which will read later this txt file Need it like that what i've described......
comment on: http://stackoverflow.com/q/24699268

http://stackoverflow.com/comment/38195661
score: 0
type: Comment
type: QuestionComment
has text: Does your ruby code actually open more than one page as it is?
comment on: http://stackoverflow.com/q/24642085

http://stackoverflow.com/a/24669182
type: Answer
downvote count: 0
score: 1
has body: You can define the model of your full collection as another independent collection. Then after fetch(), you will get your collections as the model of your full one. var PurchaseCollection = Backbone.Collection.extend({ model: Backbone.Collection }) var purchaseCollection = new PurchaseCollection({url:endpoints.purchases}); purchaseCollection.fetch() purchaseCollection.each(function (purchaseItem, index) { //the purchaseItem is what you want... //do anything... }); If you want a demo, click here.
answers question: http://stackoverflow.com/q/24664510
upvote count: 1

http://stackoverflow.com/q/24745308
has answer: http://stackoverflow.com/a/24745466
accepted answer: http://stackoverflow.com/a/24745452
has body: I'm having a problem with loading controllers to a specific route in AngularJS when using routeProvider service. It works fine if I define the controller in the same file as the file I declared the module in, but I want the controllers to be in a separate file. When I try to load them from a separate file I get an error, saying the controller was not found. Here's my code: (pixelApp.js) 'use strict'; var pixelApp = angular.module('pixelApp',['ngRoute']) .config(function routing($routeProvider) { $routeProvider.when('/', { templateUrl: '../directory/home.html', controller: 'homeCTRL' } ); $routeProvider.otherwise( { redirectTo: '/' } ); }); (homeCTRL.js) 'use strict'; pixelApp.controller('homeCTRL', function homeCTRL($scope) { $scope.message = "Welcome to home."; } ); (index.html) I have looked spent a lot of time looking for a solution and couldn't find it, it would be greatly appreciated if anybody could help me out with this.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38390016
type: AnsweredQuestion
type: Question
has title: routingProvider not working with controller form separate file
has answer: http://stackoverflow.com/a/24745452
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24745466

http://stackoverflow.com/q/24739310
favorite count: 0
has title: display div when "element" reaches top of page
type: UnansweredQuestion
tagged with: scroll
downvote count: 1
has answer: http://stackoverflow.com/a/24739895
score: -1
has answer: http://stackoverflow.com/a/24739484
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38379389
tagged with: http://stackoverflow.com/tag/html
has body: I am new to jQuery, I built this page and what I would like to happen is when a block e.g. 2011 1 October reaches the top of the page it displays the content for that specific div via the id or date-attr. When you click on a date it will display the content for that date but I would like it to appear once that date block reaches the top of the page. I have looked around the net but no luck thus far.

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/24737277
type: Tag
tags question: http://stackoverflow.com/q/24664079
tags question: http://stackoverflow.com/q/24701788

http://stackoverflow.com/comment/38299994
type: Comment
type: QuestionComment
has text: @EliasVanOotegem, I quite agree with you. Your answer is excellent. I just put the link to show there is an old history and wisdom for this problem. I should have written so. And I guess some developper have to deal with old browsers or mobile browsers which don't support the workers. http://caniuse.com/webworkers
score: 0
comment on: http://stackoverflow.com/q/24697923

http://stackoverflow.com/comment/38268774
has text: It seems like that's the problem. I tried initialising variables instead of alert() and everything worked fine. However, the browser console showed nothing. Thanks a lot!
type: Comment
comment on: http://stackoverflow.com/a/24681161
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38193364
comment on: http://stackoverflow.com/a/24636962
type: AnswerComment
score: 0
has text: No, if that works, thats great! From my knowledge, CSS based fixed navbars are always at 0px from the top, and therefore have no positional data you can pull. I suggest using a jquery sticky script and then use a script that makes anchors at any point you want on that page. I suggest using these two scripts to achieve your results: http://stickyjs.com/ http://imakewebthings.com/jquery-waypoints/
type: Comment

http://stackoverflow.com/a/24673383
score: 1
has comment: http://stackoverflow.com/comment/38253172
has body: You can get all classes using attr() funciton $('.drag-circle').each(function(){ var classes = $(this).attr('class').split(" "); //Your code here to check a class in array of classes }) Yet I'd rather suggest you storing the values in data attribute. Ex. HTML and access it by $('.drag-circle[data-zoneID]') or specific zone by $('.drag-circle[data-zoneID="37"]')
downvote count: 0
answers question: http://stackoverflow.com/q/24673329
type: Answer
upvote count: 1

http://stackoverflow.com/a/40195757
has comment: http://stackoverflow.com/comment/133675201
has comment: http://stackoverflow.com/comment/112824862
answers question: http://stackoverflow.com/q/24718349
upvote count: 91
downvote count: 3
has body: ES2015 findIndex: var array = ['I', 'hAve', 'theSe', 'ITEMs'], indexOf = (arr, q) =&gt; arr.findIndex(item =&gt; q.toLowerCase() === item.toLowerCase()); console.log( indexOf(array, 'i') ) // 0 console.log( indexOf(array, 'these') ) // 2 console.log( indexOf(array, 'items') ) // 3
type: Answer
has comment: http://stackoverflow.com/comment/119971433
score: 88
has comment: http://stackoverflow.com/comment/73767627
has comment: http://stackoverflow.com/comment/106607331

http://stackoverflow.com/q/24701710
has comment: http://stackoverflow.com/comment/38307537
has answer: http://stackoverflow.com/a/24701847
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38308713
has comment: http://stackoverflow.com/comment/38307500
has title: How to parse an XML from string
accepted answer: http://stackoverflow.com/a/24701847
has body: I'm developing a cordova/phonegap app and I want to read an xml in order to show some data to user. I found a way to get my xml file: getXML.onclick=function(){ var url = 'http://....cloudfront.net/TestFile.xml'; var xmlhttp; var x,xx,i; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { x=xmlhttp.response; alert(x); // Here it shows my xml file for (i=0;i&lt;x.length;i++) { alert(x[i]); // This shows letter by letter my file } } } xmlhttp.open("GET",url,true); xmlhttp.send(); } So, how should I parse my xml file? Thanks
tagged with: http://stackoverflow.com/tag/xml
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38308517
has comment: http://stackoverflow.com/comment/38306181
type: AnsweredQuestion

http://stackoverflow.com/a/31755504
has comment: http://stackoverflow.com/comment/134738400
has comment: http://stackoverflow.com/comment/78885723
has comment: http://stackoverflow.com/comment/70301849
has body: Personally I think the best is: alphabet = 'abcdefghijklmnopqrstuvwxyz'.split(''); Concise, effective, legible, and simple! EDIT: I have decided, that since my answer is receiving a fair amount of attention to add the functionality to choose specific ranges of letters. function to_a(c1 = 'a', c2 = 'z') { a = 'abcdefghijklmnopqrstuvwxyz'.split(''); return (a.slice(a.indexOf(c1), a.indexOf(c2) + 1)); } console.log(to_a('b', 'h'));
upvote count: 177
answers question: http://stackoverflow.com/q/24597634
has comment: http://stackoverflow.com/comment/52626827
has comment: http://stackoverflow.com/comment/77637401
has comment: http://stackoverflow.com/comment/58019104
score: 175
has comment: http://stackoverflow.com/comment/72862629
downvote count: 2
type: Answer

http://stackoverflow.com/a/24685751
has comment: http://stackoverflow.com/comment/38276737
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38277703
has body: It looks like your request is asking for permission to send a content-type request header, and it requires permission to send credentials. Your request headers appear to be correct as far as I can tell. However your response should contain two more headers: Access-Control-Allow-Credentials:true Access-Control-Allow-Headers:content-type Here is an example of a preflight request from another site I've worked on, and the preflight response: Here is the preflight option requestion headers Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Access-Control-Request-Headers:accept, applicationname Access-Control-Request-Method:GET Cache-Control:no-cache Connection:keep-alive Cookie:*sanitized cookie data* Host:sanitized.domain.com Origin:https://sanitized.domain.com Pragma:no-cache Referer:https://sanitized.domain.com/ User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 Subsequently here is the preflight response headers: Access-Control-Allow-Credentials:true Access-Control-Allow-Headers:applicationname Access-Control-Allow-Origin:https://sanitized.domain.com Cache-Control:no-cache Connection:keep-alive Content-Length:0 Date:Thu, 10 Jul 2014 20:19:25 GMT Expires:-1 Pragma:no-cache Server:Microsoft-IIS/8.0 X-AspNet-Version:4.0.30319 X-Powered-By:ASP.NET Notice the addition of the Access-Control-Allow-Credentials, and Access-Control-Allow-Headers headers. Also notice my request sent "accept" in the Access-Control-Request-Headers header, and the response didn't contain "accept". This is because "accept" is considered a simple header as defined here: http://www.w3.org/TR/cors/#simple-header. Additionally content-type qualifies as a simple header only when it's value is one of the following: text/plain multipart/form-data application/x-www-form-urlencoded In your case since the content type is application/json, you would need a response header that contains "content-type", as displayed a…
upvote count: 1
has comment: http://stackoverflow.com/comment/38277092
type: Answer
has comment: http://stackoverflow.com/comment/38277967
has comment: http://stackoverflow.com/comment/38278283
answers question: http://stackoverflow.com/q/24685330
has comment: http://stackoverflow.com/comment/38277166
accepted answer of: http://stackoverflow.com/q/24685330
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38277841

http://stackoverflow.com/comment/38327649
has text: Ok, I see I get the same error _// Maximum recursion depth exceeded_
comment on: http://stackoverflow.com/a/24700014
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24677694
has comment: http://stackoverflow.com/comment/38262160
tagged with: php
has comment: http://stackoverflow.com/comment/38262706
has comment: http://stackoverflow.com/comment/38263102
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38262195
has body: Trying to create a FAN area on facebook where I need to post all products available only to my facebook fans. My php file creates plain HTML, which I would like to grab from Facebook end. How this can be done if this can be done at all? The following is entire content of my script.js file $.ajax({ type:"POST", url:"https://www.mysite.com/includes/facebook_fan_page.php", data: data, dataType:"html", error:function(){}, success:function(response){ $('#products').html(response); } }) and here is my index.html style.css script.js I do not know how to write output in to the empty div that I have on my apps index.html page Also, the app I use on facebook is Static HTML iFrame Tabs, if it makes any difference Please help Thanks to you all in advance My skills of ajax and js are very limited, so please be patient with me on this one.
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: post JSON object into specified div
has comment: http://stackoverflow.com/comment/38262387
has comment: http://stackoverflow.com/comment/38262002
has comment: http://stackoverflow.com/comment/38261873
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24678648
tagged with: facebook

http://stackoverflow.com/comment/38239000
type: QuestionComment
comment on: http://stackoverflow.com/q/24664934
score: 1
has text: Don't you have to call the CSS file in your ? Check the height of the body as well.
type: Comment

http://stackoverflow.com/a/24746442
score: 0
type: Answer
has body: Attach a click handler with javascript to that link, and then call window.close() for the callback. Ex (with jQuery): $('[link selector here]').click(function() { window.close(); }); Make sure this is added to the code in the iFrame, otherwise it will close your main window.
has comment: http://stackoverflow.com/comment/38394149
has comment: http://stackoverflow.com/comment/38396106
answers question: http://stackoverflow.com/q/24745982

http://stackoverflow.com/comment/38629797
comment on: http://stackoverflow.com/q/24655892
type: QuestionComment
has text: Question, do you want unauthenticated users to be able to read or write? Or do you agree that that part is now working correctly (e.g. they have now access)? Cause I don't see a reason to allow unauthenticated users any access whatsoever.
score: 0
type: Comment

http://stackoverflow.com/a/37990969
answers question: http://stackoverflow.com/q/24743518
has body: In case you need to react to hover on the host-Component itself, you should use listeners: Hoverable Component
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/38137360
comment on: http://stackoverflow.com/q/24611759
has text: jquery sss - http://supersimpleslider.com/
type: Comment
score: 0
type: QuestionComment

transition
tags question: http://stackoverflow.com/q/24600120
tags question: http://stackoverflow.com/q/24673447
tags question: http://stackoverflow.com/q/24704517
tag name: transition
tags question: http://stackoverflow.com/q/24653538
tags question: http://stackoverflow.com/q/24714000
tags question: http://stackoverflow.com/q/24674717
type: Tag
tags question: http://stackoverflow.com/q/24610547
tags question: http://stackoverflow.com/q/24603073
tags question: http://stackoverflow.com/q/24605210

http://stackoverflow.com/a/24718702
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/24718694
accepted answer of: http://stackoverflow.com/q/24718694
has body: Use zoneArray[key] to access the array. for (var key in zoneArray) { var arr = zoneArray[key] for(i = 0; i&lt;arr.length; i++) { if(arr[i] == place) { zone = key; return zone; } } }
type: AcceptedAnswer
downvote count: 0
score: 4

http://stackoverflow.com/comment/38306645
comment on: http://stackoverflow.com/q/24701853
score: 0
has text: what does your rendered javascript1.js file look like? And if the javascript file is separate from your php file how are you getting the `$ab` variable to it?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24717909
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/59535634
has comment: http://stackoverflow.com/comment/38337751
has answer: http://stackoverflow.com/a/24718007
accepted answer: http://stackoverflow.com/a/24718007
has body: I have a pretty average jQuery Mobile app. On the bottom there is a navbar with icons and text. This is how it should look but when I tap/click on the page it toggles to this To save myself some repetition, I've been appending the same footer to each page using this basic script. $(function () { $("div[data-role='page']").append($("#footer").html()); $("body").trigger('create'); }); And here's the HTML. Maps Rules Schedule Settings I believe this script is the cause of this issue. Any ideas for how to fix this behavior? EDIT: In inspecting the DOM I found that a class called "ui-fixed-hidden" is being toggled on the data-role="footer" div when I click.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38339680
has comment: http://stackoverflow.com/comment/38337818
type: Question
tagged with: jquery-mobile
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38337858
answer count: 1
has comment: http://stackoverflow.com/comment/38337740
tagged with: jquery
has title: Weird jQuery Mobile highlight behavior on click

http://stackoverflow.com/a/24677754
has body: It's all about encoding. £ is character number 0xA3. This, when encoded "properly" (ie. in UTF-8), is converted to 0xC2A3 - coincidentally, you have the same A3 in there, which means the rendered result, &#xC2;&#xA3;, looks like it just acquired a "random" &#xC2; out of nowhere. Solution: Encode the £ properly. Try &amp;pound; first, and if that doesn't work try %A3.
score: 3
accepted answer of: http://stackoverflow.com/q/24661124
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24661124
downvote count: 0
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/38268474
has comment: http://stackoverflow.com/comment/38267642

http://stackoverflow.com/q/24647839
has answer: http://stackoverflow.com/a/71832903
upvote count: 79
has comment: http://stackoverflow.com/comment/38210583
has answer: http://stackoverflow.com/a/47624515
has title: ReferenceError: document is not defined (in plain JavaScript)
type: Question
has answer: http://stackoverflow.com/a/74433063
tagged with: javascript
score: 78
has answer: http://stackoverflow.com/a/70003078
answer count: 13
favorite count: 0
has answer: http://stackoverflow.com/a/69954008
has comment: http://stackoverflow.com/comment/38205979
has answer: http://stackoverflow.com/a/44090009
has answer: http://stackoverflow.com/a/72835588
has answer: http://stackoverflow.com/a/60265922
downvote count: 1
has answer: http://stackoverflow.com/a/78238890
has answer: http://stackoverflow.com/a/24648001
has answer: http://stackoverflow.com/a/76086560
linked to: http://stackoverflow.com/q/10807156
has answer: http://stackoverflow.com/a/69881804
has answer: http://stackoverflow.com/a/72149739
has body: I get the a "ReferenceError: document is not defined" while trying to var body = document.getElementsByTagName("body")[0]; I have seen this before in others code and didn't cause any trouble. Why is it now? The companied HTML page is just a div inside the body. Next the code is the following: (function(){ var body = document.getElementsByTagName("body")[0]; function Question(question, choices, correctAns) { this.question = question; this.choices = choices; this.correctAns = correctAns; } Question.prototype.checkAns = function(givenAns){ if (this.correctAns === givenAns) { console.log("OK"); } }; function Quiz() { this.questions = []; } Quiz.prototype.showAllQuestions = function(){ this.questions.forEach(function(questions){ console.log(questions.question); }); }; Quiz.prototype.showQuiz = function(){ this.questions.forEach(function(questions){ for (var i=0; i < questions.choices.length; i+=1) { body.innerHTML( " " + questions.choices[i] + " "); } }); }; var q1 = new Question("What is red?", ["Color","Animal","Building"],1); var q2 = new Question("Most popular music?", ["Latin","Pop","Rock"],2); var quiz = new Quiz(); quiz.questions.push(q1); quiz.questions.push(q2); quiz.showAllQuestions(); })(); Try the whole code in this link HERE
type: UnansweredQuestion

http://stackoverflow.com/a/24612168
type: Answer
answers question: http://stackoverflow.com/q/24611572
downvote count: 0
score: 1
has body: I guess you could just use the /{page_id}/posts?limit=10 for that. Have a look at https://developers.facebook.com/docs/graph-api/reference/v2.0/page/feed/ I'd recommend that you generate a Page Access Token as described at https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens and use this for your requests.
upvote count: 1

http://stackoverflow.com/q/24672476
accepted answer: http://stackoverflow.com/a/24672512
has comment: http://stackoverflow.com/comment/38251261
has comment: http://stackoverflow.com/comment/38251469
has comment: http://stackoverflow.com/comment/38251558
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24672512
type: Question
has body: I have divided the page into two halves, on the top layer i have a profile page(myprofile.jsp) with a button saying edit profile, on clicking the button i want the editprofile.jsp to open in the below frame. Request CLI
tagged with: jsp
has comment: http://stackoverflow.com/comment/38251178
tagged with: javascript
has comment: http://stackoverflow.com/comment/38251223
score: 0
has title: opening a page within a frame onclicking a button
answer count: 1
has comment: http://stackoverflow.com/comment/38251242
has comment: http://stackoverflow.com/comment/38251611

http://stackoverflow.com/comment/140272354
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/72964868
has text: Works in Bootstrap 5.3. Use `translateX` for x-axis positioning.
type: Comment

http://stackoverflow.com/comment/38294512
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24695593
type: Comment
has text: @Murtaza Thanks a lot its working like champ. It should be acceptable one if it is an answer.

http://stackoverflow.com/comment/38367187
type: QuestionComment
has text: you don't need to have another `$.each()` loop you can get it in your second loop with this `audio.audio.audio.url` http://jsfiddle.net/Dk7rh/1/
comment on: http://stackoverflow.com/q/24732798
score: 0
type: Comment

http://stackoverflow.com/comment/38292666
type: Comment
has text: @Prashant First, there is nothing to waste time. Second, thanks for making the fiddle, that's what I exactly mean. As you can see there are three tabs and what I want is to add hover effects per tab. Possible to have each one of these magnify and highlight once mouse is hovered over top?
comment on: http://stackoverflow.com/q/24693721
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38304262
type: Comment
has text: Then you are not putting it on the right elements, see the fiddle i linked, i put `position:relative` on the two divs you dynamically create
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24700563

http://stackoverflow.com/a/24708648
score: 1
has comment: http://stackoverflow.com/comment/38320123
has comment: http://stackoverflow.com/comment/38320200
accepted answer of: http://stackoverflow.com/q/24708602
answers question: http://stackoverflow.com/q/24708602
has comment: http://stackoverflow.com/comment/38320260
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38320139
has body: Looking at the Codeacademy link, it seems as if there are some dependancies. You need to make sure to include those. Your HTML file should look like this. Note: You should probably combine all of your JS into an external file and link it with tags. Also, make sure that your script tags come at the end of the page (but before the ), it will make your page faster as your JS won't block the DOM construction. Update If you included all of the known dependancies and it still doesn't seem to work, Codecademy probably buried some important code somewhere. The easiest way to get around this would be to just download the web page itself as an HTML file (option click on the link on mac) and either use that or poke around to make sure you have everything.
type: Answer
downvote count: 0

http://stackoverflow.com/q/24745100
score: 0
has answer: http://stackoverflow.com/a/24745155
linked to: http://stackoverflow.com/q/8396407
tagged with: jquery
has body: I have a DIV (.container) and a button (.btn) which i want to hide until the page is fully loaded.I managed to do it by using dispay:none on a small jquery snippet, but it would be better if i could use visibillity:hidden because the page wouldnt shift (like it does with display:none). basically, I have: &lt;style&gt; .container {visibility:hidden;} .btn {visibility:hidden;} &lt;/style Is there any nice soul that could help me with jquery part so it only shows once the page is fully loaded?
accepted answer: http://stackoverflow.com/a/24745178
has title: Hide DIV until page loads using visibility property
tagged with: css
answer count: 4
possible better answer: http://stackoverflow.com/a/24745186
has answer: http://stackoverflow.com/a/24745178
has answer: http://stackoverflow.com/a/24745153
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38389458
has answer: http://stackoverflow.com/a/24745186
has comment: http://stackoverflow.com/comment/38389717
tagged with: javascript
type: Question

http://stackoverflow.com/q/24733612
answer count: 1
downvote count: 0
score: 1
has body: I am using angular js for development. Initializing ck editor on controller function initEditor(){ CKEDITOR.replace( 'editor1', { on: { pluginsLoaded: function( evt ) { var doc = CKEDITOR.document, ed = evt.editor; if ( !ed.getCommand( 'bold' ) ) doc.getById( 'exec-bold' ).hide(); if ( !ed.getCommand( 'link' ) ) doc.getById( 'exec-link' ).hide(); } } }); } Html &lt;textarea cols="100" id="editor1" name="editor1" rows="50"&gt;&lt;/textarea&gt; I have tried several way to find key up but not working CKEDITOR.instances["editor1"].on('keyup', function() { alert('key up'); } I have refereed some other SO answers also , nothing seems to be working . Is it because of i am using angular js controller . Please suggest a way to do this
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: How to use keyup in ckeditor
has answer: http://stackoverflow.com/a/24735691
upvote count: 1
type: Question
tagged with: javascript
tagged with: ckeditor
tagged with: jquery

http://stackoverflow.com/q/24630611
possible better answer: http://stackoverflow.com/a/24630806
has title: readmore javascript plugin first item open
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/24738114
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24630806
type: Question
has body: I'm using this wonderful plugin and would like to know how I can set the first item to be open and the rest closed. Any idea? Javascript var options = { moreLink: 'more...', lessLink: 'less...', heightMargin: 50, sectionCSS: 'display: inline-block; width: 100%;', }; $('.content-top-wide, .content-bottom-item').each(function(){ var el = $(this), content = el.find('div:first,span:first,p:first, article:first'), maxHeight = 0; if (content.length) { maxHeight = content.outerHeight(); content.prevAll().each(function(){ maxHeight += $(this).outerHeight(true); }); // set maxHeight to 200px if the element has hight greater than 200 options.maxHeight = Math.min(200, maxHeight); el.readmore(options); }; }); HTML Title Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus, consequatur inventore iure aliquam praesentium molestiae facilis labore! Magni, dolorem, ex? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus, consequatur inventore iure aliquam praesentium molestiae facilis labore! Magni, dolorem, ex?
accepted answer: http://stackoverflow.com/a/24738114

http://stackoverflow.com/comment/38138047
type: Comment
comment on: http://stackoverflow.com/a/24611831
has text: Updated my post.. according to what you posted for code it looks like you didn't include script tags, which would be your issue. Also, make sure you're including the JS library.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25071949
score: 0
type: Answer
has body: This issue got resolved. As I learnt more about require imports it was easy to make the corrections and run the project. As is, the Automata package comes with flawed imports.
answers question: http://stackoverflow.com/q/24626101

http://stackoverflow.com/comment/38172061
comment on: http://stackoverflow.com/a/24630020
score: 0
type: AnswerComment
has text: @RevanProdigalKnight I included `>` and was considering including quotes too, just in case OP was considering using it in other places
type: Comment

http://stackoverflow.com/comment/38338906
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24718435
has text: Before moving to help answer, I just want ask/wonder if you've considered using media queries instead? based on your code, it seems like you're trying to accomplish using device heights to determine styles..no?
score: 0

http://stackoverflow.com/q/24721211
type: Question
linked to: http://stackoverflow.com/q/203198
has title: .click() from an object property on appended buttons in jQuery
tagged with: javascript
tagged with: jquery
has body: I'm making several buttons from an object and append them to the only div in the body: #main, everything works fine except for actual click function: I can't seem to make the buttons alert different properties. This is my object: var BrushDesc = function (n, i, t) { this.presetName = n; this.elemId = i; this.preset = t; }; var brush = {}; brush.circ = new BrushDesc("circle", "circle", "basic circle"); brush.rect = new BrushDesc("rectangle", "rect", "19-2"); brush.softy = new BrushDesc("round soft", "softy", "softy"); brush.rake = new BrushDesc("|||", "rake", "21-3"); that was my first attempt appending the buttons but this always alerts last .preset property of the object: for (var i in brush) { $('&lt;button id="'+brush[i].elemId+'"&gt;'+brush[i].presetName+'&lt;/button&gt;') .appendTo("#main") .click(function() {alert(brush[i].preset)}); } So I thought 'okay :('. Then I made it differently and this seems to work but in the same time this looks really wrong (mostly because this relies on .elemId and brush.property having the same name: for (var i in brush) { $('&lt;button id="'+brush[i].elemId+'" class="main"&gt;'+brush[i].presetName+'&lt;/button&gt;') .appendTo("#main") } $(".main").click(function() { var buttonId = $(this).attr("id"); for (var i in brush) { if (brush[i].elemId == buttonId) alert(brush[i].preset) } }); Can anyone please make it right? edit: Thanks for pointing the Closures thread (haven't used them yet) Felix, but I'm not sure I understand how to apply this to my objects var tps = []; function createTps(i) {return function() {alert(br[i].preset)}} //doh for (i = 0; i&lt;5; i++) {tps[i] = createTps(i)} //but I should have keys here, not numbers? var j = 0; for (var i in br) { $('&lt;button id="' + br[i].elemId + '" class="main"&gt;' + br[i].presetName + '&lt;/button&gt;') .appendTo("#main") .click(function() {tps[j](); j++}); //yeah, sure } edit2 Actually a friend of mine suggested to use Immediately-Invoked Function Expression instead of closure a…
upvote count: 1
tagged with: photoshop
favorite count: 0
duplicate of: http://stackoverflow.com/q/750486
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/750486
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38344364

http://stackoverflow.com/a/24723780
has comment: http://stackoverflow.com/comment/38349169
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Can you not just achieve this with one form? HTML Monday Tuesday
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24723730
has comment: http://stackoverflow.com/comment/38349637
answers question: http://stackoverflow.com/q/24723730
score: 1
has comment: http://stackoverflow.com/comment/38349225

http://stackoverflow.com/comment/38234020
score: 0
type: Comment
type: QuestionComment
has text: Probably want `sum.toString()` too, but `console.log` usually takes care of conversion as necessary. Lots of little errors here. You need to pay very close attention to case and using the correct method names. Keep the [Mozilla MDN Documentation](https://developer.mozilla.org/en/docs/Web/JavaScript) at the top of your bookmarks.
comment on: http://stackoverflow.com/q/24662687

http://stackoverflow.com/comment/38116855
type: AnswerComment
score: 0
has text: So basically the prototype keyword is used to add a function to an object that is not static to the original object. I have done a lot of Java OOP program so I am not new to OOP concepts, but I have not done enough with Javascript to really see the difference. In your opinion what is the best way to create an object in Javascript. I have seen a lot of different ways, but which one is the most common and used the most.
type: Comment
comment on: http://stackoverflow.com/a/24600784

http://stackoverflow.com/comment/38330170
type: QuestionComment
score: 0
has text: @naota Thanks Buddy!!!!!!!!!!! It works...thats what I wanted!!!
type: Comment
comment on: http://stackoverflow.com/q/24713317

http://stackoverflow.com/q/24718349
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38338848
has title: How do I make Array.indexOf() case insensitive?
has answer: http://stackoverflow.com/a/61297803
has answer: http://stackoverflow.com/a/45270149
has comment: http://stackoverflow.com/comment/38338708
type: Question
linked to: http://stackoverflow.com/q/8993773
tagged with: javascript
has answer: http://stackoverflow.com/a/24718430
answer count: 13
favorite count: 0
has body: I am making a piece of code for a website that will have a list of names in an array and pick a random name, I want to add a feature that will let the user add or delete a name from the array. I have all of these features but when deleting a name, the user has to type the name to match the Case in the array. I tried to make the so it would be Case-Insensitive, what am I doing wrong? Remove Name from List
has answer: http://stackoverflow.com/a/72131610
has answer: http://stackoverflow.com/a/33159946
possible better answer: http://stackoverflow.com/a/40195757
has answer: http://stackoverflow.com/a/49914714
has answer: http://stackoverflow.com/a/51100248
has answer: http://stackoverflow.com/a/40195757
has answer: http://stackoverflow.com/a/24718630
upvote count: 90
has answer: http://stackoverflow.com/a/42945445
has comment: http://stackoverflow.com/comment/38338844
has answer: http://stackoverflow.com/a/24718799
accepted answer: http://stackoverflow.com/a/24718430
has answer: http://stackoverflow.com/a/57848584
has answer: http://stackoverflow.com/a/24718680
score: 89

http://stackoverflow.com/comment/38436602
has text: $("#pageTmpl").render(pageData) seems to be rendering the correct HTML. Did you mean to write: this.$el.html($("#pageTmpl").render(pageData)); ? $("this.$el") doesn't look right at all...
type: Comment
comment on: http://stackoverflow.com/q/24722222
score: 0
type: QuestionComment

http://stackoverflow.com/q/24598529
favorite count: 0
has answer: http://stackoverflow.com/a/25136020
has title: JSPlumb show connection label on hover
upvote count: 4
tagged with: css
tagged with: hover
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: javascript
tagged with: jsplumb
score: 4
has body: I'm using JSPlumb to connect a bunch of blocks and I am able to set a label for a connection using: JSPLUMB_INSTANCE.bind("connection", function (info) { info.connection.getOverlay("label").setLabel("w="+width+"&lt;br&gt;p="+pipelining); }); This way the label is always visible on the connection. Is there a way to make the label only appear on mouse hover?
accepted answer: http://stackoverflow.com/a/25136020
answer count: 1

http://stackoverflow.com/q/24743653
has body: I'd like a gulp module that would let me modify the stream(s) by running a simple javascript function over the lines in the stream: var runjs= require('gulp-runjs'); function grep(regexp) {&lt;filter out lines not matching regexp&gt;}; gulp.task('modify-sources', function () { return gulp.src("src/") .pipe(runjs(grep('...'))) .pipe("dest/"); }); My specific need is to simulate grep on the gulp stream. There is a gulp-grep-stream but that is only for filtering the files, not for modifying them. There is a gulp-shell module but I'd like to avoid that. Is there one already? Can it be done? How would I do it without gulp but just raw node?
score: 1
has answer: http://stackoverflow.com/a/24774850
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/59421622
tagged with: javascript
has title: Gulp Task for running Javascript over files
has comment: http://stackoverflow.com/comment/59411220
answer count: 1
downvote count: 0
tagged with: gulp
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38126743
score: 0
type: AnswerComment
type: Comment
has text: You were doing well until the last two paragraphs. The point of a form is that you should use it to access the posted data after validation, via `form.cleaned_data['fieldname']`, rather than accessing the request.POST data directly.
comment on: http://stackoverflow.com/a/24606312

http://stackoverflow.com/a/24729270
score: 4
has body: Transcluded contents are compiled against a child scope of your parent scope (also known as transclusion scope, but this is not the same as your directive's isolated scope). That being said, you can specify the template in your parent HTML (although it is a bit outside of the normal use case in angular) and manually compile it against your directive's isolated scope. HTML {{item.label}} and {{item.id}} Notice that the inner HTML of my-directive references 'item' which must be defined in the directive's scope. Directive function directive($compile) { return { restrict: 'E', scope: { source: '=' }, compile: function(element, attr) { // in the compile phase, remove the contents // of element so that it is not compiled by angular. // We will be manually compiling it in the link function. var template = angular.element(' ' + element.html() + ' '); element.empty(); // link function return function(scope, element, attr) { // append the template element.append(template); // compile and link the template against the isolated scope. $compile(template)(scope); } } }; } Demo Plunker
accepted answer of: http://stackoverflow.com/q/24729019
has comment: http://stackoverflow.com/comment/38360532
has comment: http://stackoverflow.com/comment/38360457
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38360153
type: Answer
has comment: http://stackoverflow.com/comment/38360213
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/24729019

http://stackoverflow.com/comment/38353885
score: 0
comment on: http://stackoverflow.com/a/24726263
type: Comment
has text: Ugh, I knew it was something completely obvious. Thank you.
type: AnswerComment

http://stackoverflow.com/q/24662908
has comment: http://stackoverflow.com/comment/38329506
tagged with: codeigniter
has answer: http://stackoverflow.com/a/24722827
has answer: http://stackoverflow.com/a/24663001
type: Question
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/24695524
score: 0
has answer: http://stackoverflow.com/a/24713607
has body: I have a CI folder structure like this: -&gt; root - - &gt;application - - &gt;resources - - &gt;system In the resources folder, I have separate folders like 'css', 'images', 'js', 'js/plugins' etc. I have a twitter plugin in js/plugins folder which needs the base path of the site. I used it like this : modpath: 'resources/plugins/twitter/', And it works if the url that i visited is localhost/myapp/ , but doesn't work when the url is localhost/myapp/index.php/welcome What i have to do ? Because it is not a controller or a view, i can't use it as &lt;?=site_url();?&gt; right? So what i need to do? Thanks for help !
has comment: http://stackoverflow.com/comment/38336808
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24826478
has title: Using JavaScript with Codeigniter
tagged with: php
has answer: http://stackoverflow.com/a/24666617

http://stackoverflow.com/q/24694086
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: geojson
has title: change icon when i drag my feature and i touch other feature openLayers
tagged with: drag
type: Question
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/38293858
downvote count: 0
favorite count: 0
tagged with: openlayers
has body: I need your help please I'm looking for trick which allows me to change the icon of feature when i touch other feature. What i need exactly when i drag my feature geojson_etat3 and i put in on mh_layer i want the icon of geojson_etat3 became ./images/Etat3.png ======================================================================== var geojson_etat3 = new OpenLayers.Layer.Vector("etat3", { styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ externalGraphic: './images/Etat3.png', graphicWidth: 21, graphicHeight: 25, graphicYOffset: -24, label : "${name}" } ), }), // renderers: renderer, //'draggable': true, projection: epsg4326, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "data/data_etat3.json", format: new OpenLayers.Format.GeoJSON() }) }); this is my second feature which will be touched by geojson_etat3: var mh_layer = new OpenLayers.Layer.Vector("Equipe", { styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ pointRadius: 5, fillColor: "red", strokeColor: "#0d4cd6", strokeWidth: 1, strokeOpacity: 0.8, label: "\n${name}" } ), }), //renderers: renderer, // 'draggable': true, projection: epsg4326, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "data/data_ot.json", format: new OpenLayers.Format.GeoJSON({ extractAttributes: true }) }) }); i did that but in vain : controls = { drag3 : new OpenLayers.Control.DragFeature(geojson_etat3,{ autoActivate: true, overFeature: function(feature){ styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ externalGraphic: './images/Etat4.png' } ) }) } //onComplete: function() {alert('Are you sure this is the right postion?')} }) }; for(var key in controls) { map.addControl(controls[key]); } Thank you in advance.
score: 2
answer count: 0

http://stackoverflow.com/comment/38387560
comment on: http://stackoverflow.com/q/24742637
score: 0
has text: to confirm with jared, is the log displayed when $location.path is outside your success event or the log does not display in both cases but your post(title, content) are inserted to the database ?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38222915
has text: Ah that makes more sense. So since I'm trying to draw a focus+context, I would have to clarify the series from my data and use dimple.plot.area instead of dimple.plot.bubble, right?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24650423

http://stackoverflow.com/comment/38092464
score: 0
comment on: http://stackoverflow.com/q/24588147
type: Comment
has text: you can put url params in the script src, or find the linking tag from the external script, and examine the textContent to find config, or eval() it to run code.
type: QuestionComment

http://stackoverflow.com/q/24649814
favorite count: 0
upvote count: 3
accepted answer: http://stackoverflow.com/a/24649917
has title: What does "no-ops" mean in Javascript
has answer: http://stackoverflow.com/a/24649917
has body: I'm looking at Mozilla scope cheat sheet and it states: var function-scoped hoist to the top of its function redeclarations of the same name in the same scope are no-ops I can't find any reference to the definition of "no-ops"? What does it mean? Does it mean "no operation", meaning it doesn't redeclare it, simply changes the value?
type: AnsweredQuestion
score: 3
downvote count: 0
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/38172896
comment on: http://stackoverflow.com/a/24629956
score: 0
type: AnswerComment
has text: still not working.i m able to do this for empty array like{ "rname":[]) but not getting to do for the null array.
type: Comment

http://stackoverflow.com/a/45244198
answers question: http://stackoverflow.com/q/24744894
upvote count: 1
has body: I think the following should do: marker.getPosition()
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38346422
comment on: http://stackoverflow.com/q/24722386
score: 0
type: Comment
type: QuestionComment
has text: Please elaborate a bit more in your question what your problem exactly is and what exactly are you trying to do. Ideally paste some minimal code that reproduces your problem.

http://stackoverflow.com/comment/38133642
type: AnswerComment
comment on: http://stackoverflow.com/a/24609534
type: Comment
has text: Thanks, but this still requires me to name each specific element. If possible I'd like something which applies to every input in the form. http://jsfiddle.net/XF6wT/7/
score: 0

http://stackoverflow.com/comment/38122879
type: QuestionComment
comment on: http://stackoverflow.com/q/24604060
type: Comment
has text: Then how do i test which part is not working :) ?
score: 0

http://stackoverflow.com/a/33034308
answers question: http://stackoverflow.com/q/24633042
has body: I was facing same issue and that was resolved by this. You can try using "orderClasses": false,
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/53890139

http://stackoverflow.com/q/24649276
accepted answer: http://stackoverflow.com/a/24649298
has comment: http://stackoverflow.com/comment/38208978
type: Question
has comment: http://stackoverflow.com/comment/38208680
has body: I need some advice. Lets see, I have html code like this: Example Text Other Text Yes, there is no div! How can I repalce text between span with class="example" ? I tried: var elem = document.getElementByClassName("example"); elem.innerHTML = "change example text to something other"; But it does not work, of course if there would be div and take getElementById and then ClassName, it works perfectly. Problem is that there is no div :) Is it even possible? Regards, Tagon
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24649671
score: 0
has comment: http://stackoverflow.com/comment/38208614
has title: getElementByClassName without divs
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
possible better answer: http://stackoverflow.com/a/24649671
answer count: 4
has answer: http://stackoverflow.com/a/24649612
upvote count: 1
has answer: http://stackoverflow.com/a/24649298
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24649295

http://stackoverflow.com/q/24665423
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: So I have a setup like this: Container is 100px wide, innercont is 400px wide, the images are 100px wide and LI's are floated left, and I'm using controls and jQuery to shift the position of innercont to 'reveal' the frames. My goal was to get the 'height' of the frame that was visible. This is the code I'm using: height = jQuery("#innercont ul").children("li").filter(':visible').css('height'); But I always get the height of the first image regardless of which one is visible. Am I just daft?
answer count: 0
has comment: http://stackoverflow.com/comment/38239419
type: Question
has comment: http://stackoverflow.com/comment/38239006
tagged with: javascript
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/38239589
has title: jQuery :visible filter not working as I expect it (Emphasis on 'I')
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38239044
has comment: http://stackoverflow.com/comment/38239027

http://stackoverflow.com/q/24594889
tagged with: http://stackoverflow.com/tag/html
tagged with: fancybox
accepted answer: http://stackoverflow.com/a/24596415
type: Question
score: 0
has answer: http://stackoverflow.com/a/24596415
answer count: 1
tagged with: fancybox-2
has comment: http://stackoverflow.com/comment/38107241
has comment: http://stackoverflow.com/comment/38106830
has title: Fancybox opening issue - works on JSFiddle but not in live environment
tagged with: javascript
has body: I'm trying to get a fancy box popup opening when the user click on "CONTACT" in the navigation menu. It works on JSFiddle, see http://jsfiddle.net/88X6D/1/ but for some reason it doesn't work in live environment, see http://goo.gl/lkfxeO (nothing happens when clicking on "contact" in the menu) I initially thought there was a conflict between the "smooth scrolling" script and the "contact form" script but since it works on JSfiddle, the issue must be somewhere else. (also fancybox JS files and jquery are correctly called). Thanks for your help HTML Contact SCRIPTS (located in this file: js/scripts.js) //============== //! Smooth scrolling //============== $(function () { $('a[href*=#]:not([href=#])').click(function () { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top - 100 }, 'normal'); return false; } } }); }) window.onscroll = scrollFunction; function scrollFunction() { var doc = document.documentElement, body = document.body; var top = (doc && doc.scrollTop || body && body.scrollTop || 0); if (top > 200) { $('.back-to-top').fadeIn(); } else { $('.back-to-top').fadeOut(); } } //============== //! Contact form //============== function validateEmail(email) { var reg = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return reg.test(email); } $(document).ready(function() { $(".modalbox").fancybox(); $("#contact").submit(function() { return false; }); $("#send").on("click", function(){ var emailval = $("#email").val(); var msgval = $("#msg").val(); var msglen = msgval.length; var mailvalid = validateEmail(emailval); var nameval = $("#name").val(); if(mailvalid == false) { $("#email").addClass("error"); } else if(mailva…
tagged with: jquery
has comment: http://stackoverflow.com/comment/38106341
type: AnsweredQuestion

http://stackoverflow.com/comment/38237956
type: AnswerComment
comment on: http://stackoverflow.com/a/24664832
type: Comment
has text: Well, you said it was a job (not just a function.) It's probably timing out after 15 seconds.
score: 0

http://stackoverflow.com/comment/59189571
type: Comment
has text: Were you using Internet Explorer by any chance?
comment on: http://stackoverflow.com/a/24668861
type: AnswerComment
score: 0

browser-detection
tags question: http://stackoverflow.com/q/24608122
tag name: browser-detection
type: Tag

http://stackoverflow.com/comment/38375273
has text: @ArunPJohny and also see this http://jsfiddle.net/laraprabhu/c6g8h/1/.. that was not specified in the DOCS..
score: 0
comment on: http://stackoverflow.com/q/24737478
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24698073
has comment: http://stackoverflow.com/comment/38299410
has body: If you dont have access to div or the css , this is the solution you can consider : UPDATED jsfiddle : http://jsfiddle.net/P5LNx/7/ jQuery(document).ready(function ($) { $('.hero_text').html(function (index, text) { var bgcolor = $(this).css('background'); $(this).css('background', 'transparent'); var txt = text.split(' '); var content = '' + txt[0] + ' '; content += '' + txt[1] + ''; return content; }); }); Steps : Removed background of the div. Added 2 with same background as div To s, added your words (1 in each)
type: Answer
answers question: http://stackoverflow.com/q/24697518
score: 0

http://stackoverflow.com/q/24647563
has title: Reading line-by-line file in JavaScript on client side
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
upvote count: 24
has answer: http://stackoverflow.com/a/24778093
tagged with: client-side
favorite count: 0
has answer: http://stackoverflow.com/a/45227205
tagged with: filereader
has body: Could you please help me with following issue. Goal Read file on client side (in browser via JS and HTML5 classes) line by line, without loading whole file to memory. Scenario I'm working on web page which should parse files on client side. Currently, I'm reading file as it described in this article. HTML: &lt;input type="file" id="files" name="files[]" /&gt; JavaScript: $("#files").on('change', function(evt){ // creating FileReader var reader = new FileReader(); // assigning handler reader.onloadend = function(evt) { lines = evt.target.result.split(/\r?\n/); lines.forEach(function (line) { parseLine(...); }); }; // getting File instance var file = evt.target.files[0]; // start reading reader.readAsText(file); } The problem is that FileReader reads whole file at once, which causes crashed tab for big files (size >= 300 MB). Using reader.onprogress doesn't solve a problem, as it just increments a result till it will hit the limit. Inventing a wheel I've done some research in internet and have found no simple way to do this (there are bunch of articles describing this exact functionality but on server side for node.js). As only way to solve it I see only following: Split file by chunks (via File.split(startByte, endByte) method) Find last new line character in that chunk ('/n') Read that chunk except part after last new line character and convert it to the string and split by lines Read next chunk starting from last new line character found on step 2 But I'll better use something already existing to avoid entropy growth.
type: AnsweredQuestion
score: 24
possible better answer: http://stackoverflow.com/a/24778093
type: Question
has answer: http://stackoverflow.com/a/27191289
accepted answer: http://stackoverflow.com/a/27191289
tagged with: javascript

http://stackoverflow.com/comment/38321027
type: Comment
comment on: http://stackoverflow.com/a/24709147
type: AnswerComment
has text: what if one has looots of links and stories on one page?
score: 0

http://stackoverflow.com/comment/38109712
comment on: http://stackoverflow.com/a/24597611
has text: Is there a way to execute your server side code ONLY if $_POST['rid'] doesn't already contain a dash?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38231524
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24636328
has text: There is! The event is $locationChangeStart
type: QuestionComment

http://stackoverflow.com/a/24659969
type: Answer
has body: A simple solution, without a custom filter: HTML: &lt;input ng-model="countries" ng-list&gt; &lt;tr ng-repeat="dataItem in data | filter:countryFilter"&gt; JS: $scope.countryFilter = function(dataItem) { if (!$scope.countries || $scope.countries.length &lt; 1) return true; var matched = false; $scope.countries.filter(function(n) { matched = matched || dataItem.countries.indexOf(n) != -1 }); return matched; }; DEMO PLUNKR
score: 2
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24653779

http://stackoverflow.com/comment/71317785
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24589101
has text: My mind and bacon has been saved! Thank you so much. Using .off with multiple transition events was twisting my melon as it was firing for each event (note to self - read documentation in full).

http://stackoverflow.com/comment/38199781
type: QuestionComment
has text: Do you want the value in the textbox or you are trying to do something with the texbox itself?
comment on: http://stackoverflow.com/q/24643029
score: 0
type: Comment

http://stackoverflow.com/q/24695852
has comment: http://stackoverflow.com/comment/38294890
has comment: http://stackoverflow.com/comment/38294836
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/38296632
has body: can you please tell me how to add hidden div or button behind the button?Actully I need to increase the click area without increase the x image size so that user can click in whole area.? here is my code JS Bin openPOP Close TestCase Name: Done js Code $(function(){ $('#openPopup').click(function(){ $( "#testCaseId" ).popup( "open" ); }) })
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38294944
has comment: http://stackoverflow.com/comment/38294851
has answer: http://stackoverflow.com/a/24708102
has comment: http://stackoverflow.com/comment/38294870
has title: how to add hidden div or button behind the button?
has answer: http://stackoverflow.com/a/24695955
type: Question
has answer: http://stackoverflow.com/a/24708215
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24698806
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24698020
has comment: http://stackoverflow.com/comment/38302425
has comment: http://stackoverflow.com/comment/38301518
answers question: http://stackoverflow.com/q/24698020
has comment: http://stackoverflow.com/comment/38302041
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38301948
has body: START EDIT Currently during resize your div is being resized to the same value at every increment. To answer the question, the resize event is triggered very frequently - too fast to perform much processing / DOM manipulation each time. (See below for my suggestion for reducing the number of executions of the code inside the consitions.) END EDIT It seems you conditions are not correct to get the desired effect (code executed only once when changing into a different width range). Maybe you should try taking into account the current div width: function resizeFrame() { var wWidth = $(window).width() var currentWidth = $('.sample').width(); // for debug var updated = false; if ((currentWidth != 300) &amp;&amp; (wWidth &gt;= 100) &amp;&amp; (wWidth &lt; 500)){ $('.sample').width(300); updated = true; } else if ( (currentWidth != 700) &amp;&amp; (wWidth &gt;= 500) &amp;&amp; (wWidth &lt; 900)){ $('.sample').width(700); updated = true; } else if (currentWidth != 900 &amp;&amp; wWidth &gt;= 900) { $('.sample').width(900); updated = true; } // for debug $('.sample').html("window:" + wWidth + " div:" + currentWidth + " updated: " + updated); }; jQuery(function($){ $(window).resize(resizeFrame); }); See my fiddle
type: Answer
has comment: http://stackoverflow.com/comment/38301773
score: 1

http://stackoverflow.com/comment/38294386
has text: Sorry, I think the return needs to be "javascript:alert('No Link');" to run as Client-Side JavaScript. value property returns the content for the anchor tag's href property, which is not initially CSJS but can be run CSJS
type: AnswerComment
comment on: http://stackoverflow.com/a/24693609
score: 0
type: Comment

http://stackoverflow.com/comment/38180714
type: Comment
comment on: http://stackoverflow.com/q/24634456
score: 0
has text: Don't name your functions after events. You also have no element with the ID of year.
type: QuestionComment

http://stackoverflow.com/a/24723967
type: Answer
answers question: http://stackoverflow.com/q/24723730
has body: Looking at the tags that you have added to the question, I assume that you use PHP on the server side. In this case I would use arrays for your input field names: Maandag Dinsdag Then it is easy to access all of the fields in PHP because PHP will add an (zero-based) index to each of the []: <?php echo $_POST['days']['maandag']['verantwoording']['klant'][0]; echo $_POST['days']['maandag']['verantwoording']['klant'][1]; echo $_POST['days']['maandag']['verantwoording']['klant'][2]; See also the documentation on HTML forms
score: 0

http://stackoverflow.com/q/24738526
has comment: http://stackoverflow.com/comment/38377611
tagged with: ajax
upvote count: 2
has body: I have ajax code in my javascript file as follows: // Default settings for Ajax requests $.ajaxSetup({ type: 'POST', url: path + '/relay.php'+ '?curr=' + currency + "&amp;ver=" + Math.random(), success: function(response) { // Refresh the cart display after a successful Ajax request container.html(response); $('#jcart-buttons').remove(); }, ....... The above will post as (in firebug): POST http://www.myshop.com/cart/relay.php?curr=EUR&amp;ver=0.5750630930208085 I have a remove function as follows: function remove(link) { // Get the query string of the link that was clicked var queryString = link.attr('href'); queryString = queryString.split('='); // The id of the item to remove var removeId = queryString[1]; // Remove the item and refresh cart display $.ajax({ type: 'GET', data: { "jcartRemove": removeId, "jcartIsCheckout": isCheckout } }); } The remove will display as follows(firebug) GET http://www.myshop.com/cart/relay.php?curr=EUR&amp;ver=0.5750630&amp;jcartRemove=5 I need to remove the curr variable too... How can i do it in my remove link code above ???
favorite count: 0
has answer: http://stackoverflow.com/a/24739357
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24738633
tagged with: php
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38377271
has title: unset a variable passed through post in ajax
tagged with: post
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38333688
has text: Just tried console.log(newArray). Still comes back as "scrabble is undefined"
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24715896

http://stackoverflow.com/a/24685786
accepted answer of: http://stackoverflow.com/q/24685639
type: Answer
has body: You can either declare them in the original object like you did here: var MyNamespace = { helloWorld: function() { console.log('hi!'); }, goodbyeWorld: function() { console.log('I &lt;3 Titanic'); } } MyNamespace.helloWorld(); MyNamespace.goodbyeWorld(); Or, you can declare the namespace and then add the methods afterwards like this: // declare namespace object var MyNamespace = {}; // add methods to the namespace MyNamespace.helloWorld = function() { console.log('hi!'); }; MyNamespace.goodbyeWorld = function() { console.log('I &lt;3 Titanic'); }; MyNamespace.helloWorld(); MyNamespace.goodbyeWorld(); This lets you add methods to the namespace in different places or even in different source files. And, if you want to have some private, but static variables, you can use an IIFE (immediately invoked function expression) to encapsulate those variables like this: var MyNamespace = (function() { var privateCntr = 0; return { getUniqueCnt: function() { return ++privateCntr; }, goodbyeWorld: function() { console.log('I &lt;3 Titanic'); } }; })(); var uniqueID = MyNamespace.getUniqueCnt(); MyNamespace.goodbyeWorld(); All three options accomplish the same goal. The third option gives you the option of private variables (which the other two do not) and you can also use the second method to add on more methods after declaring the namespace in any of the other ways (though methods you add outside the IIFE won't have access to the private variables). If I need any private variables, I use the third option. If I don't have any need for private variables and I'm going to define all the methods in one place, I prefer the first option as it just seems to be more obvious what you're doing - you're declaring an object with a bunch of methods and all the methods are declared in one place. If I'm adding methods across multiple files and don't need any private variables, I will use the second option.
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/24685639
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24666893
has comment: http://stackoverflow.com/comment/38242040
type: Question
has comment: http://stackoverflow.com/comment/38243417
has comment: http://stackoverflow.com/comment/38242262
possible better answer: http://stackoverflow.com/a/26592388
tagged with: javascript
tagged with: date
tagged with: struts2
upvote count: 3
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Struts 2 JQuery Datepicker Issues
has comment: http://stackoverflow.com/comment/38245028
accepted answer: http://stackoverflow.com/a/24703783
has answer: http://stackoverflow.com/a/26592388
tagged with: datepicker
has comment: http://stackoverflow.com/comment/38248344
has comment: http://stackoverflow.com/comment/38242288
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/24703783
has body: I am using Struts 2 Jquery Date picker for selection of date. Like below &lt;sj:datepicker name="testDate" parentTheme="simple" zindex="2006" timepicker="true" changeYear="true" displayFormat="dd/mm/yy" timepickerFormat="HH:mm:ss" timepickerShowSecond="true" duration="fast" readonly="true" &gt;&lt;/sj:datepicker&gt; If you can see the format I mentioned there is dd/mm/yy and time format is HH:mm:ss, here everything is working fine when the user selecting the date .. When User selects the date I am getting date In expected format in my Action class. But When I redirect to same page after completing the action my date pickers text fields are being set by the wrong format like this mm/dd/yyy .. I want my date datepickers formats to be set to the date format I mentioned in my datepicker tag. Becuase of this user is getting confused can any one tell me how to set the same format what the user has selected before the action even after the action completed I m using struts2 jquery plugin
has comment: http://stackoverflow.com/comment/38245891

http://stackoverflow.com/comment/38092398
score: 0
type: AnswerComment
type: Comment
has text: I just tried it (with your correction -- thx) and it worked for me.
comment on: http://stackoverflow.com/a/24588481

http://stackoverflow.com/a/39385338
has body: When you write response or request. It should contain string so you need to change it to response.write(querystring.stringify(res)); or response.write(JSON.stringify(res));
answers question: http://stackoverflow.com/q/24690711
type: Answer
score: 0

http://stackoverflow.com/comment/38218782
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24653333
type: AnswerComment
has text: What do you mean by "expand"? Nothing on Definitely Typed for a SOAPService :(

http://stackoverflow.com/comment/38287325
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24691592
has text: Is curl enabled on the server? To check- see php.ini file and see if `;` is removed in line `;extension=php_curl.dll`

http://stackoverflow.com/comment/44572867
type: AnswerComment
has text: I am in the same situation. Hammer.js v2.0.4 has regressed from Hammer.js v1.x functionality in regards to touchstart and touchend. In the latest hammer you must use press and pressup, and pressup does not fire if the user drags their finger beyond a certain threshold before releasing it.
comment on: http://stackoverflow.com/a/24721634
type: Comment
score: 3

http://stackoverflow.com/comment/38380604
has text: Sorry that comment above explains thing incorrectly; `&&` returns its first operand (left side) if that value is "falsy", and the second operand (right side) otherwise.
comment on: http://stackoverflow.com/a/24739150
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24715206
has answer: http://stackoverflow.com/a/24715286
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/24715284
tagged with: http://stackoverflow.com/tag/html
score: -1
has comment: http://stackoverflow.com/comment/38332575
has title: Display the following AJAX in a blank/new page
type: UnansweredQuestion
tagged with: php
downvote count: 1
type: Question
has body: I want to display the part which comes with the AJAX code in a new or blank page, without getting the requested url under the "old" html code on the same page. d$(document).ready(function() { $("#bestello").submit(function() { if($("#nn").val() == "" || $("#vn").val() == "" || $("#strt").val() == ""){ $("#response").html("Bitte f&amp;uuml;llen Sie alle Felder aus!"); } else { $.ajax({ type: "POST", url: "test.php", data: "nn=" + $("#nn").val() + "&amp;vn=" + $("#vn").val() + "&amp;strt=" + $("#strt").val(), success: function(msg) { $("#response").html(msg); } }); } return false; }); }); Everything after the else or $.ajax({ should be displayed in a blank/new page. How can I solve this problem?
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/24606516
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24606801
type: AnsweredQuestion
score: 3
has title: AngularJs $resource dynamic URL
has body: I have this REST service, which speaks with LDAP server. In order to get all available data about user, I must visit this: GET /users/:userId Because user in LDAP is described by attributes, I want to get only some not all attributes. In this case must do this: GET /users/:userId/o/mail/displayName/....(list of attributes required) How to create this dynamic url for attribute list while using AngularJS $resource? .factory('User', ['$resource', 'REST_API_URL', function ($resource, REST_API_URL) { var User = $resource( REST_API_URL + '/users/:id', {id: '@id'} ); return User; }])
downvote count: 0
favorite count: 0
tagged with: ldap
tagged with: rest
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/24606801
linked to: http://stackoverflow.com/q/11850025
upvote count: 3
linked to: http://stackoverflow.com/q/18003092

http://stackoverflow.com/a/24620981
has comment: http://stackoverflow.com/comment/38189791
accepted answer of: http://stackoverflow.com/q/24620914
has comment: http://stackoverflow.com/comment/38178209
answers question: http://stackoverflow.com/q/24620914
type: AcceptedAnswer
downvote count: 0
has body: If I understood correctly, and you can't use JSON.parse, use eval: var data = '{"Other": 0.003986666666136848, "last": {"project": "0414_007_Breakdance_Sample_CINEMATIC", "time": 1400678804.523}, "0414_007_Breakdance_Sample_CINEMATIC": 0.00026972221003638376}' data = eval('(' + data + ')');
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/q/24746622
tagged with: javascript
tagged with: jquery
tagged with: google-maps-api-3
answer count: 2
has title: get the coordinates(latitude and longitude) of google map by street address - angular
favorite count: 0
possible better answer: http://stackoverflow.com/a/24746996
has comment: http://stackoverflow.com/comment/38426467
has answer: http://stackoverflow.com/a/24746973
accepted answer: http://stackoverflow.com/a/24746973
tagged with: angularjs
has answer: http://stackoverflow.com/a/24746996
score: 6
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/3652951
type: Question
tagged with: google-maps
upvote count: 6
has body: so i have random street address, lets say: 5707 dogwood ave. all i want is to get the coordinates of that address so i can view my google map at the street location using angular. i've search but wasn't able to find anything useful. the map code(very basic map) $scope.map = { center: { latitude: 33.025859, longitude: -96.844698 }, zoom: 8 }; html code: &lt;google-map class="full-image" center="map.center" zoom="map.zoom"&gt;&lt;/google-map&gt;

http://stackoverflow.com/q/24725454
score: 2
upvote count: 2
type: AnsweredQuestion
has body: I created something similar to an ENUM like this: var ContentStatusId = { All: 0, Production: 1, Review: 2, Draft: 3, Concept: 4 } so when I set: var a = ContentStatusId.All it gets the value of 0 How can I go in the other direction? If I know a = 0 and a comes from ContentStatusId then how can I get the string "All"?
has answer: http://stackoverflow.com/a/24725605
has answer: http://stackoverflow.com/a/24725510
type: Question
has title: How can I find the string value of a property given it's value
has answer: http://stackoverflow.com/a/24725515
accepted answer: http://stackoverflow.com/a/24725515
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24725547
has comment: http://stackoverflow.com/comment/38352335
answer count: 4
possible better answer: http://stackoverflow.com/a/24725510

http://stackoverflow.com/comment/38111857
score: 21
comment on: http://stackoverflow.com/a/24597821
type: AnswerComment
type: Comment
has text: `stuff() || default` is an idiomatic expression in Javascript, and is not hard to read once one gets used to it. Some more whitespace would help, but I feel separating it into `if` and `else` statements would be overly verbose for most Javascript programmers.

http://stackoverflow.com/q/24632326
has answer: http://stackoverflow.com/a/24632538
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38176340
has comment: http://stackoverflow.com/comment/38176447
has answer: http://stackoverflow.com/a/24632525
type: UnansweredQuestion
has body: I have the elements in the div as mentioned below: Child 1 of first div Child 2 of first div Child 3 of first div Child 4 of first div Child 1 of second div Child 2 of second div Child 3 of second div Child 4 of second div Child 1 of third div Child 2 of third div Child 3 of third div Child 4 of third div I need to retrieve the next element from comment id comment-4. $('#comment-4').next().attr('id') gives me result as undefined.I need the target div to be comment id - comment-5.How to retrieve the next element of div from another div using jquery?
has comment: http://stackoverflow.com/comment/38176433
answer count: 12
has comment: http://stackoverflow.com/comment/38176353
upvote count: 3
has comment: http://stackoverflow.com/comment/38176333
downvote count: 3
has comment: http://stackoverflow.com/comment/38176839
has answer: http://stackoverflow.com/a/24632632
has title: How to find element of div from another div
type: Question
has answer: http://stackoverflow.com/a/24632916
has comment: http://stackoverflow.com/comment/38176440
has answer: http://stackoverflow.com/a/24633158
has comment: http://stackoverflow.com/comment/38176465
has answer: http://stackoverflow.com/a/24632510
tagged with: javascript
has answer: http://stackoverflow.com/a/24633419
has answer: http://stackoverflow.com/a/24632530
has answer: http://stackoverflow.com/a/24632518
has answer: http://stackoverflow.com/a/24632634
score: 0
has answer: http://stackoverflow.com/a/24632667
has answer: http://stackoverflow.com/a/24632885

http://stackoverflow.com/a/26097523
has body: I came across the same problem only with chrome.runtime.onMessageExternal.addListener and chrome would complain about onMessageExternal. Like @scott-f pointed out the reason for this bug is 'abusing' th reload button. I removed and reinstalled the extension and it worked. In hindsight I would suggest you use the --load-extensions='extension/path' from the cli to test your extension with the mouse just to avoid the overhead of navigating around chrome's menus, and use Selenium to automate your tests.
downvote count: 0
answers question: http://stackoverflow.com/q/24673181
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/24710795
has body: It seems to me you are using Bootstrap. The problem here is that hide class has higher priority due to !important keyword. That's why you can't show it by simply adding inline display: inline styles (by using .show method). Instead you can toggle hide class, it will also make your code shorter: $('#addNew').on('mouseenter mouseleave', 'tr', function() { $(this).find('.glyphicon').toggleClass('hide'); }); You can also go with separate removeClass('hide') and addClass('hide') of course: $('#addNew').on({ mouseenter: function() { $(this).find('.glyphicon').removeClass('hide'); }, mouseleave: function() { $(this).find('.glyphicon').addClass('hide'); } }, 'tr'); Demo: http://plnkr.co/edit/m0hfHYy4LdBp7hjJd59U?p=preview
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24710686
type: Answer
answers question: http://stackoverflow.com/q/24710686
has comment: http://stackoverflow.com/comment/38324282
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38385870
type: AnswerComment
has text: I accepted the answer because it led me to correct thinking. Thank you. However, I am having one more problem that the handler is not detecting the event. What can be the reason for this? Is it possible that if I bind these custom events in a function instead of `$(document).ready()`, and then when the function call gets over, the handlers are removed(not unbinding them myself though)?
type: Comment
comment on: http://stackoverflow.com/a/24723948
score: 0

http://stackoverflow.com/q/24683373
downvote count: 0
has title: Using ng-model with Select2 is not updating the model value
tagged with: javascript
has comment: http://stackoverflow.com/comment/38273108
favorite count: 0
tagged with: angularjs
has body: I am using angular ng-model for select2 for data binding. {{number.text}} {{number.text}} I am facing two issues here: 1) ng-change doesn't seem to be working, hence I had to use document.getElementByID.. 2) value of select2.text is not getting updated here function sampleController($scope,$timeout){ $scope.select2={text:"",id:""}; $scope.range=[{text:"name1", value:"id1"}, {text:"namea2", value:"id2"}, {text:"name3", value:"id3"}]; $timeout(function(){ $("#e1").select2();},10 ) document.getElementById("e1").onchange = function(){ $scope.select2.id = "selected"; } }
answer count: 0
tagged with: angularjs-select2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38273223
has comment: http://stackoverflow.com/comment/38284104
score: 2
has comment: http://stackoverflow.com/comment/38283107
type: Question
upvote count: 2

http://stackoverflow.com/a/24713207
downvote count: 0
has comment: http://stackoverflow.com/comment/38381034
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/24702032
answers question: http://stackoverflow.com/q/24702032
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38444718
has comment: http://stackoverflow.com/comment/38412413
has body: The storyOffset property of your textVariableInstance yields an insertionPoint, whose index is the actual numeric offset inside the containing story. the storyOffset property is available on many other objects that can be placed within text. For anchored page items use the parent property instead - it will yield a character. var t = app.activeDocument.textFrames.item(0); $.writeln(t.textVariableInstances.item(0).storyOffset.index); $.writeln(t.rectangles.item(0).parent.index); EDIT Following your edit, you must be doing something wrong how you build the Text. As already suggested, you can use isValid and toSpecifier() in the debugger to find out where it breaks. The following code works for me, but for a generic approach you'll need to consider plenty more things that can be embedded within text, e.g. special characters including the various paragraph ends, hyperlinks, xml elements, anchored page items. #target indesign-8.0 function main() { var doc = app.activeDocument; for( var fi=0; fi&lt;doc.textFrames.length; fi++ ) { var f = app.activeDocument.textFrames.item(fi); var s = f.parentStory; for( var pi=0; pi&lt;f.paragraphs.length; pi++ ) { var p = f.paragraphs.item(pi); var pl = p.characters.lastItem(); for( var ri=0; ri&lt;p.textStyleRanges.length; ri++ ) { var r = p.textStyleRanges.item(ri); var rf = r.characters.firstItem(); var rl = r.characters.lastItem(); var t = r; if( rl.index&gt;pl.index ) // range goes beyond paragraph t = s.texts.itemByRange(rf,pl); $.writeln("text=",t.contents); if( t.textVariableInstances.length&gt;0 ) { var tv = t.textVariableInstances.item(0); $.writeln("variable=",tv.name," ",tv.storyOffset.index); } } $.writeln("\\n"); } } } main();

http://stackoverflow.com/comment/38355848
has text: Yes i did not mention it because none of the jQuery functions are used in this page. (i guess you are talking about this )
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24726970

internet-explorer
tags question: http://stackoverflow.com/q/24595592
tags question: http://stackoverflow.com/q/24661678
tags question: http://stackoverflow.com/q/24609414
tags question: http://stackoverflow.com/q/24720171
tags question: http://stackoverflow.com/q/24694563
tags question: http://stackoverflow.com/q/24620805
tags question: http://stackoverflow.com/q/24660102
tags question: http://stackoverflow.com/q/24674020
tags question: http://stackoverflow.com/q/24737706
tag name: internet-explorer
tags question: http://stackoverflow.com/q/24653858
tags question: http://stackoverflow.com/q/24744895
tags question: http://stackoverflow.com/q/24614868
tags question: http://stackoverflow.com/q/24701376
tags question: http://stackoverflow.com/q/24613343
tags question: http://stackoverflow.com/q/24656621
tags question: http://stackoverflow.com/q/24693429
tags question: http://stackoverflow.com/q/24659540
tags question: http://stackoverflow.com/q/24619411
tags question: http://stackoverflow.com/q/24604364
tags question: http://stackoverflow.com/q/24679845
tags question: http://stackoverflow.com/q/24693052
tags question: http://stackoverflow.com/q/24617183
tags question: http://stackoverflow.com/q/24673612
tags question: http://stackoverflow.com/q/24646732
tags question: http://stackoverflow.com/q/24706463
tags question: http://stackoverflow.com/q/24748446
tags question: http://stackoverflow.com/q/24608122
tags question: http://stackoverflow.com/q/24614899
tags question: http://stackoverflow.com/q/24731906
tags question: http://stackoverflow.com/q/24706907
type: Tag
tags question: http://stackoverflow.com/q/24675548
tags question: http://stackoverflow.com/q/24676240
tags question: http://stackoverflow.com/q/24653712
tags question: http://stackoverflow.com/q/24637908

http://stackoverflow.com/q/24689046
has comment: http://stackoverflow.com/comment/38594145
tagged with: naming
has title: What are the common solutions for making clean id space in a SPA?
has answer: http://stackoverflow.com/a/24829721
has answer: http://stackoverflow.com/a/24728157
type: Question
upvote count: 12
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24741735
score: 11
has comment: http://stackoverflow.com/comment/38340026
has comment: http://stackoverflow.com/comment/38499725
has comment: http://stackoverflow.com/comment/38282890
has body: Situation: several developers working remotely on different section/modules of a SPA. As a result they may accidentally introduce HTML elements with the same id. What are the common ways to avoid that situation (without refusing id-usage if possible) before final assemblage? My shallow guesses: pre-arrange id for all names(a bit ridiculous but...) structure names with architecture e.g. for an app/collection/model dedicate a name like app-collection-model refuse using ids in general or use only for large modules?
tagged with: single-page-application
answer count: 7
has comment: http://stackoverflow.com/comment/38339811
has answer: http://stackoverflow.com/a/24814261
favorite count: 0
has answer: http://stackoverflow.com/a/24834380
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24741735
tagged with: uniqueidentifier
has answer: http://stackoverflow.com/a/24728059
possible better answer: http://stackoverflow.com/a/24719056
has answer: http://stackoverflow.com/a/24719056

http://stackoverflow.com/q/24619837
downvote count: 2
has body: I'm using the select2 component (Version: 3.4.8), but suddenly it stopped working. This is my code: $('#acompanhantes').select2({ formatNoMatches: 'Nenhum resultado encontrado', formatSearching: 'Buscando...', formatSelection: format, formatResult: format, multiple: true, ajax: { url: "query.php?acao=listar_nome_usuarios&amp;exceto=&lt;?=$_SESSION["usuario"]["id_colaborador"];?&gt;", dataType: 'json', type: "POST", data: function (term) { return { termo: term }; }, results: function (data) { return {results: data}; } }, }); function format(item) { return capitalize(item.text); } Does anyone know how can I debug to know where it went wrong? I'm still getting a result, but when I type in the input, it does not search and also does not insert underline.
type: Question
score: -2
has answer: http://stackoverflow.com/a/24619968
has title: SELECT2 STOPPED TO WORK
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38153431
has comment: http://stackoverflow.com/comment/38153699
type: UnansweredQuestion

http://stackoverflow.com/comment/38314716
has text: I'm dealing with thousands of images so I don't want to be a CPU-raper.
comment on: http://stackoverflow.com/a/24705837
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24719643
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
has title: Google Maps API - results.geometry.location[0] returning null
favorite count: 0
type: Question
has body: fairly new to javascript and trying to make a simple map application. I am trying to center a new map around an address that is passed through a function. The issue I have is it is always being returned null which I do not understand, do I have to specify return types in the function format? My code: &lt;script&gt; var geocoder; var map; function initialize() { var address = document.getElementById('address').value; var latlng = GetLatLong(address); alert(latlng); var mapOptions = { zoom: 8, center: latlng } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } function GetLatLong(address) { var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { alert(results[0].geometry.location) return results[0].geometry.location; } else { alert('Geocode was not successful for the following reason: ' + status); } }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; I have a div for the address text and a div for the map location. To debug I put alert("") in some places to see the order in which it gets called on runtime, why would the line I put the first alert be called before the function is called? Thanks
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24719680
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/24719680
tagged with: google-maps

country
tag name: country
tags question: http://stackoverflow.com/q/24657139
type: Tag

http://stackoverflow.com/q/24689347
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/24689828
has title: Do Javascript mousemove event handlers block mousemove events?
has comment: http://stackoverflow.com/comment/38283400
has comment: http://stackoverflow.com/comment/38283419
answer count: 2
tagged with: mousemove
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24689828
tagged with: events
possible better answer: http://stackoverflow.com/a/24689497
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24689497
has body: If I have an intensive mousemove handler window.moveEventCounter = 0; window.addEventHandler("mousemove", function(e) { for (var i = 0; i &lt; 100; i++) { console.log(i); } window.moveEventCounter++; }); the count of mousemove events handled is less than the count of events when a quick event handler is registered instead for the same (or similar) mouse action. I figure this is the browser engine being clever about not overfilling the event queue when there's heavy execution, but it's not what I expected. What is the browser's policy for dropping (or not emitting) mousemove events? (This behaviour was observed on Firefox 30)
score: 1

http://stackoverflow.com/comment/38300670
type: QuestionComment
comment on: http://stackoverflow.com/q/24698827
has text: That very much depends on what `do stuff` is. If you did just return a [`filter`ed](http://api.jquery.com/filter/) collection, it would be working with chaining. But they seem to modify some external things (or: the same external thing) using side effects? Not a good idea.
score: 0
type: Comment

http://stackoverflow.com/q/24685066
possible better answer: http://stackoverflow.com/a/24685120
has comment: http://stackoverflow.com/comment/38275433
tagged with: javascript
has title: Conditionally change value of ng-model for input
accepted answer: http://stackoverflow.com/a/24685233
answer count: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 2
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/24685233
has answer: http://stackoverflow.com/a/24685120
has body: I have following HTML code: &lt;input type="text" ng-model="search.isOrdered"/&gt; If user types ordered word to input then I want ng-model = true, if user types unordered word to input, then I want ng-model = false. In other cases I want to ng-model = undefined or ng-model = null. Suppose I can't use radio-button or checkbox. How to achieve this? Thanks
type: Question

http://stackoverflow.com/comment/38205601
score: 0
comment on: http://stackoverflow.com/q/24647478
has text: @Sid M I think I have the options of both.
type: Comment
type: QuestionComment

closures
tags question: http://stackoverflow.com/q/24686806
tags question: http://stackoverflow.com/q/24744147
tags question: http://stackoverflow.com/q/24640776
tags question: http://stackoverflow.com/q/24596671
tags question: http://stackoverflow.com/q/24726984
tag name: closures
tags question: http://stackoverflow.com/q/24687155
tags question: http://stackoverflow.com/q/24621865
type: Tag
tags question: http://stackoverflow.com/q/24644562
tags question: http://stackoverflow.com/q/24613489
tags question: http://stackoverflow.com/q/24645315

http://stackoverflow.com/q/24606212
tagged with: javascript
tagged with: jquery
has title: JQuery Stopping ladda animation spinning wheel of death
tagged with: http://stackoverflow.com/tag/html
has body: I have a terms & condition checkbox. If it's checked, it submits the form otherwise it throws up an alert. When the alert dialogue box is thrown, the spinning wheel spins for eternity. I am using the ladda zoom-in gif as listed here: http://lab.hakim.se/ladda/ Before clicking on the button, here's the generated html code: Book appointment now When spinning begins: Book appointment now For the alert I have: $('#ladda-purple-step4').unbind('click').click(function (e) { if (!document.getElementById('termsagree').checked) { e.preventDefault(); alert("You must accept the Terms & Conditions."); } }); I have managed to stop this on parts of the website using this code: $('#ladda-purple-step4').on('click', function (e) { $('#ladda-purple-step4').attr("disabled", false); $('#ladda-purple-step4').removeAttr("data-loading"); }); But it's not working here as this initiates before the spinning begins. My question is, I'm looking for a way to stop the spinning. I was thinking if I can find the attribute data-loading, then fire off my code? What do you recommend? How would I do that? Thanks
favorite count: 0
downvote count: 0
type: UnansweredQuestion
score: 6
has answer: http://stackoverflow.com/a/25273870
has comment: http://stackoverflow.com/comment/38130665
type: Question
answer count: 1
upvote count: 6

http://stackoverflow.com/comment/38316108
type: QuestionComment
score: 2
has text: Do you have any error in your JS? Take a look at the console. Also include the markup for these select elements. The reason why I ask for markup is because your "y" in year is lower case, while in the rest is upper case. You even write it upper case at the end.
comment on: http://stackoverflow.com/q/24706676
type: Comment

http://stackoverflow.com/q/24717298
tagged with: java
tagged with: http://stackoverflow.com/tag/json
has title: Get Nashorn JsonObject in Java
type: Question
has answer: http://stackoverflow.com/a/25290971
answer count: 2
downvote count: 0
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/24722145
accepted answer: http://stackoverflow.com/a/24722145
favorite count: 0
possible better answer: http://stackoverflow.com/a/25290971
has body: In my JavaScript I have a JSON Object which I use as a parameter of a Java object. On the Java side I receive a jdk.nashorn.internal.scripts.JO4 but only the jdk.nashorn.internal.scripts.JO class exits. How can I access this JSON Object? var test = { "id": 10, "Hello": "World", "test": { "Lorem" : "Ipsum", "java" : true } } m.call(test);
tagged with: nashorn
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/24730503
has answer: http://stackoverflow.com/a/24741132
accepted answer: http://stackoverflow.com/a/24741132
type: Question
tagged with: google-analytics
has title: _gaq.push Not Working
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
has body: Here is my piece of code in head.php And here is another piece of code: Order by Phone So the thing is I have to work on already built website and this code part of code is not working. Google analytics is totally new part for me. So can anyone help me to know this code works and what are the mistakes?
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38381872

http://stackoverflow.com/a/24729607
answers question: http://stackoverflow.com/q/24729526
has body: First you have to create a valid json. Right now, If you paste your returned String to jsonlint, you can see it is invalid json. To check the validtity of the json object, you can use jsonlint create json from php code - http://php.net/manual/en/function.json-encode.php eg of valid json string: { "Work": 11, "Eat": 2 } var myJSONString = // your JSON string var jsobj= JSON.parse(myJSONString);
score: 0
type: Answer

http://stackoverflow.com/a/24695604
has comment: http://stackoverflow.com/comment/38295597
type: Answer
has comment: http://stackoverflow.com/comment/38295680
has comment: http://stackoverflow.com/comment/38294887
has comment: http://stackoverflow.com/comment/38294947
accepted answer of: http://stackoverflow.com/q/24695494
has body: You can use below jQuery : $(function(){ $('#save').click(function(){ $(this).closest('table').find('tbody').append('&lt;tr&gt;&lt;td&gt;'+$('#name').val()+' and '+$('#data').val()+'&lt;/td&gt;&lt;/tr&gt;'); }); }); Demo EDIT - to eliminate input and select box id dependency use below code : $(function(){ $('#save').click(function(){ var name = $(this).closest('tr').find('input[type=text]').val(); var data = $(this).closest('tr').find('select').val(); $(this).closest('table').find('tbody').append('&lt;tr&gt;&lt;td&gt;'+name+' and '+data+'&lt;/td&gt;&lt;/tr&gt;'); }); }); Demo
has comment: http://stackoverflow.com/comment/38294463
answers question: http://stackoverflow.com/q/24695494
has comment: http://stackoverflow.com/comment/38295853
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38294757
score: 0
has comment: http://stackoverflow.com/comment/38294559

http://stackoverflow.com/a/24713681
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: The code you've added to the question show only assignment of IDs and nothing else. I can't see the entire source code of Account control but usually fields with leading underscore are protected or private and, to expose these fields, public properties are used so please check if it's present a public property named txtPhone. EDIT ctrlAccount.txtFirstName.Attributes.Add("onchange", "alert('hello,world')"); ctrlAccount.txtPhone.Attributes.Add("onchange", "alert('hello,world')"); Try to press F12 with the caret over txtFirstName or txtPhone on the lines above to see where these property are defined. P.S.: Do not confuse the names of id and public properties of a class
has comment: http://stackoverflow.com/comment/38470049
answers question: http://stackoverflow.com/q/24612609

http://stackoverflow.com/q/24695219
tagged with: http://stackoverflow.com/tag/json
tagged with: jqgrid
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38294413
has answer: http://stackoverflow.com/a/24696090
score: 0
accepted answer: http://stackoverflow.com/a/24696090
has body: I am working with JqGrid. I have some JSON from server [{"Id":1,"Name":"product1","Price":234,"Size":"Small"},{"Id":18,"Name":"product2","Price":3242,"Size":"Large"}] and Jquery code $("#table").jqGrid({ url: '@Url.Action("GetProductsAtJSON", "Product")', datatype: 'json', mtype: 'GET', colNames: ['Id', 'Name', 'Price', 'Size'], colModel: [ { name: 'Id', index: 'Id', width: 55, key: true, editable: true, editoptions: { readonly: true }, sortable: true, search:true }, { name: 'Name', index: 'Name', width: 150, editable: true, editoptions: { size: 25 }, editrules: { required: true }, search: true }, { name: 'Price', index: 'Price', width: 100, align: 'center', editable: true, editoptions: { size: 25 }, editrules: { required: true, number: true, minValue: 1, maxValue: 10000 } }, { name: 'Size', index: 'Size', width: 150, editable: true, edittype: "select", editoptions: { value: "0:Large;1:Medium;2:Small" } } ], pager: '#pager', rowNum: 10, rowList: [10, 20, 30], sortname: 'Id', sortorder: "asc", viewrecords: true, caption: 'All product', height: '400', jsonReader: { repeatitems: false, loadonce: true, id: "Id", root: function (obj) { return obj; }, page: function (obj) { return 1; }, total: function (obj) { return 1; }, records: function (obj) { return obj.length; } } }); I have read the documentation and a lot of forums, but I don't understand why sorting and search doesn't work. Maybe my JSON format is incorrect and I must write total page records, but that's not working either. I use key: true from rows id, but it's not working. What am I doing wrong?
has comment: http://stackoverflow.com/comment/38293987
answer count: 1
has comment: http://stackoverflow.com/comment/38294352
has title: Search and sorted doesn't work in JqGrid (json)
type: AnsweredQuestion

http://stackoverflow.com/a/24695688
answers question: http://stackoverflow.com/q/24695323
has body: Well i found the solution i will add it here for your reference. we have to get data from the object so i used object.data.listbox_name onsubmit: function(v) { alert(v.data.level)
type: Answer
score: 0

http://stackoverflow.com/a/24747877
type: Answer
has body: The correct way to handle this, as of Socket 1.x, is to use the Manager object for a given socket. It throws a connect_error event that can be handled as shown: socket.io.on('connect_error', function(err) { // handle server error here console.log('Error connecting to server'); });
upvote count: 43
has comment: http://stackoverflow.com/comment/131703357
answers question: http://stackoverflow.com/q/24683572
score: 43
accepted answer of: http://stackoverflow.com/q/24683572
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38325121
has text: Can you pls provide me with at least some suggestions on how to fix this issue? @TrueBlueAussie
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24691432

http://stackoverflow.com/q/24726475
downvote count: 1
type: AnsweredQuestion
has title: Jquery Append remove the escaped quote
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/24726539
accepted answer: http://stackoverflow.com/a/24726492
has answer: http://stackoverflow.com/a/24726539
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38354402
has body: I've a Javascript with Jquery. http://jsfiddle.net/P5gD7/3/ var libelle = 'tes\'te'; var id = 1; var toAdd = "&lt;input type='text' name='choix[" + id + "]' value='" + libelle + "' /&gt;"; $("#test").append(toAdd); The problem is when I've a quote in "libelle" variable (i've escaped this quote), when I use append, Jquery put only tes in the "value" attribute. I have to do with simple quote. For info an alert(toAdd) return me the entire input with no errors. Any ideas ? Thanks
favorite count: 0
has answer: http://stackoverflow.com/a/24726492
upvote count: 1

http://stackoverflow.com/comment/38299393
score: 0
type: Comment
has text: We use a timeout to stop the trigger of resize when the resize is coming in too fast. Basically the resize only triggers when an average user is done resizing the window.
type: QuestionComment
comment on: http://stackoverflow.com/q/24698020

http://stackoverflow.com/a/24676802
has body: .val() on an img tag (I suppose that #image is an img tag) does not retrieve the url of the image. The attributte "src" does. Try something like this: function checkImage(){ var file1,exts,statusFile; file1=$('#image').attr("src"); var get_ext=file1.split("."); statusFile=$('#imageP'); if($.inArray(get_ext,['gif','png','jpg','jpeg']) != -1) { statusFile.html(""); } else{ statusFile.html("invalid extension!"); } } I'm assuming that #image exists and is an img tag. But it looks more probably that #image doesn't exists
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/24676699
upvote count: 0
type: Answer

specifications
type: Tag
tags question: http://stackoverflow.com/q/24596499
tag name: specifications

http://stackoverflow.com/a/24613797
score: 0
type: Answer
has body: I just get one solution to solve your problem, but not with the Range Object. You can set the attribute contenteditable=false to the div, and then set the same attribute with true to the span you need to edit. As I don't know the specific use scene you need, my solution is just useful for your example. If it is useless for your scene, don't downvoting me please. UPDATE In addition, if you still need contenteditable=true of your whole container, you could set contenteditable=true to the container(body or another tag), false to the tag of the line, and true to the tag you need to edit. Here is the jsbin link: http://jsbin.com/jolopela/5/edit Thanks, Edison
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38141394
answers question: http://stackoverflow.com/q/24612922

http://stackoverflow.com/a/24656504
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24651944
score: 1
type: AcceptedAnswer
has body: Initialise WOW.js within the onLoadComplete callback: /* Query Loader 2 */ $("body").queryLoader2({ backgroundColor: "#3f4134", percentage: true, deepSearch: true, barHeight: 0, completeAnimation: "fade", onLoadComplete: function() { new WOW().init(); } });
answers question: http://stackoverflow.com/q/24651944
downvote count: 0

http://stackoverflow.com/comment/38319248
has text: Are you using jQuery at all, I usually just do $.post, you could try sending header('Content-Type: application/json'); but I'm not sure if that would have any effect.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24708187

http://stackoverflow.com/q/24715200
score: -1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/24715305
has title: Animate width of 3 columns so that they always occupy entire space
favorite count: 0
type: UnansweredQuestion
has body: I have a simple page containing 3 divs within a container like this: They are meant to be 3 even columns that occupy entire page. Whenever you hover one of them it expands to 50%, and the others shrink to 25%. It's hard to explain where the problem is so here's jFiddle: http://jsfiddle.net/FWcC5/2/ If you move cursor quickly all over the place, you will notice white space appear on the right side. It happens in Firefox. Oddly enough in Chrome it behaves exactly as it should. I tried using the same thing with flex-grid, which worked but the performance dropped drastically in Chrome. Any help would be appreciated.
tagged with: css
has comment: http://stackoverflow.com/comment/38332998
upvote count: 0
has comment: http://stackoverflow.com/comment/38332752
has comment: http://stackoverflow.com/comment/38332320
has answer: http://stackoverflow.com/a/24715439
has comment: http://stackoverflow.com/comment/38333335
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38332555
tagged with: javascript

http://stackoverflow.com/a/24731732
has body: You can use: $("elementselector").parent().children('input[type=file]').index($("elementselector")); Find all the type of elements to you want(like i have got all the childerns that are of type file). Then pass the selector to index method to get its index in matched elements.
upvote count: 1
answers question: http://stackoverflow.com/q/24731683
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24731683
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38365099

http://stackoverflow.com/a/24641056
has body: Try this: var text = ajaxResponse.responseText; var jsonObject = JSON.parse(text.replace('while(1);', '')); Another way without using replace: var jsonObject = JSON.parse(text.substring(text.indexOf(';') + 1); Updated with your function: function myFunction() { $.get('/v1/servers').success(function(response) { var data = JSON.parse(response.responseText.substring(text.indexOf(';') + 1)); data.servers.forEach(function(server){ presentServer(server); }); }); }
has comment: http://stackoverflow.com/comment/38193236
score: 4
has comment: http://stackoverflow.com/comment/38218840
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38194475
type: Answer
accepted answer of: http://stackoverflow.com/q/24640958
has comment: http://stackoverflow.com/comment/38193683
answers question: http://stackoverflow.com/q/24640958

http://stackoverflow.com/q/24731590
has title: How can I add custom image to typeahead drop-down menu?
upvote count: 3
type: Question
tagged with: javascript
tagged with: jquery
tagged with: typeahead.js
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24735420
has body: The drop-down is populated from a remote table which also contains the url of the corresponding image. I am using typeahead 0.9.3. What method can be used to add custom images to the autocomplete? &lt;?php $dbh = new PDO('mysql:host=localhost;dbname=****', 'root', '*****'); $query ='%'.$_GET['query'].'%'; $stmt = $dbh-&gt;prepare("SELECT event FROM events WHERE event LIKE :query"); $stmt-&gt;bindParam(':query', $query, PDO::PARAM_STR); $stmt-&gt;execute(); $results = array(); foreach ($stmt-&gt;fetchAll(PDO::FETCH_COLUMN) as $row) { $results[] = $row; } echo json_encode($results); ?&gt;
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24735420
score: 3

http://stackoverflow.com/q/24656480
tagged with: javascript
has body: I'm using DevExpress Web Development Charts for JavaScript charts. I got a big surprise when I downloaded the trial for testing some basic implementation. It downloads an .exe file with a couple of samples implemented in .NET technology. Well, for my project I must use Java/JSP. Is it possible to use the HTML5 charts of DevExpresswith Java? I've been looking in the downloaded files but it seems a bit complicated to extract only the js/HTML code related to the charts. So, my question is: is it possible to use DevExpresscharts with JSP? If yes, where can I download the required libraries?
downvote count: 0
has comment: http://stackoverflow.com/comment/38269130
tagged with: jsp
favorite count: 0
type: UnansweredQuestion
tagged with: devexpress
has comment: http://stackoverflow.com/comment/47104228
answer count: 0
score: 1
tagged with: java
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38289278
tagged with: charts
has title: DevExpress Charts for Java
has comment: http://stackoverflow.com/comment/38244353
has comment: http://stackoverflow.com/comment/38249903

http://stackoverflow.com/comment/38362449
type: QuestionComment
comment on: http://stackoverflow.com/q/24730436
has text: Please show the exact line of code that causes the error. Also, it is possible to trace through the jQuery call where the error occurs in the debugger and see exactly what is unhappy. That's probably the only way to truly get to the bottom of what is happening. Your jQuery version is pretty old and many, many, many bugs have been fixed since 1.6.
score: 0
type: Comment

http://stackoverflow.com/comment/56000448
comment on: http://stackoverflow.com/a/24749277
type: AnswerComment
score: 0
type: Comment
has text: Pagination with firebase using FIrebase.util.js?

http://stackoverflow.com/q/24658374
has body: Does anybody know if it is possible to call two separate functions on the same event with d3.js? I know you can do this in JavaScript by just separating the two with a semicolon but have not been successful doing this with my particular case. I am using a force-layout graph with tool-tips and have two separate tool-tips that I want to use. On mouseover, a tool-tip appears saying the name of the node and then on click, I want a second tool-tip to show its description. On that click though, I would like for the first tool tip to go away. Here is the block of code that I am using: .on("click", describe_tip.show) .on("mouseover", tip.show) .on("mouseout", tip.hide) I want to call tip.hide along with describe_tip.show but do not know the correct syntax. Any suggestions or help would be appreciated.
tagged with: tooltip
tagged with: javascript
has answer: http://stackoverflow.com/a/24658569
has title: Calling two functions on same click event with d3.js
answer count: 1
downvote count: 0
favorite count: 0
tagged with: d3.js
upvote count: 13
accepted answer: http://stackoverflow.com/a/24658569
type: AnsweredQuestion
tagged with: onclick
score: 13
type: Question

http://stackoverflow.com/a/24615118
accepted answer of: http://stackoverflow.com/q/24614717
answers question: http://stackoverflow.com/q/24614717
type: Answer
has body: It seems that the translate function is internally using a relative position to translate the elements. And if you have an absolute positioned element in a relative positioned parent the position is relative to the parent. So the only option you have is to move the popover div out of a relative positioned parent. I usually place them directly into the body: <-- Sidebar --> Maor Back ...
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/24675479
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24675280
has body: You can try the following code $('input[rel="first"]').parent().nextAll('div').has('input:not(:disabled)').first()

http://stackoverflow.com/a/60700623
has body: Pak Phone Number
upvote count: 1
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24734405

http://stackoverflow.com/a/24630267
has comment: http://stackoverflow.com/comment/38174197
score: 1
answers question: http://stackoverflow.com/q/24629564
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24629564
type: Answer
has body: setTimeut is not a problem. The problem comes from initialization application after each note. improved events delegation events: function() { var self = this; this.submit.on('click', function(){ self.addNote(); }); this.list.on('click', '.del', function() { self.delNote($(this).parent()); }).on('mouseenter', '.del', function() { $(this).parent().addClass('to-del'); }).on('mouseleave', '.del', function() { $(this).parent().removeClass('to-del') }); } http://codepen.io/anon/pen/wobCj?editors=001
has comment: http://stackoverflow.com/comment/38175267
upvote count: 1
has comment: http://stackoverflow.com/comment/38174505

http://stackoverflow.com/q/24672983
upvote count: 4
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/24673086
type: Question
has comment: http://stackoverflow.com/comment/38252381
has body: Imagine I have X, Y and Z functions, all returning promises and ready to chain. What I want to do is to notify about the progress after they are complete and handle error. What is better to write and why (what are the consequences): A. function my_func(index, size){ return X .then(Y) .then(Z) .then( function(data){ var dfd = new $.Deferred(); dfd.notify("progress", index / size, 'OK'); dfd.resolve(data); return dfd.promise(); }, function(){ return handleError(arguments, size, index); } ); } or B. function my_func(index, size){ var dfd = new $.Deferred(); X .then(Y) .then(Z) .then( function(data){ dfd.notify("progress", index / size, 'OK'); dfd.resolve(data); }, function(){ return handleError(arguments, size, index); } ) return dfd.promise(); } Also, what is the difference between: X.then(Y).then(Z); and: $.when(X).then(Y).than(Z); If $.when part is unnecessary, why doeas it exist in jQuery at all?
tagged with: jquery-deferred
has comment: http://stackoverflow.com/comment/38252286
tagged with: javascript
answer count: 2
has title: How to return a promise from JavaScript function?
has answer: http://stackoverflow.com/a/24673086
downvote count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/24673068
accepted answer: http://stackoverflow.com/a/24673068
tagged with: deferred
favorite count: 0
tagged with: promise
linked to: http://stackoverflow.com/q/23803743

http://stackoverflow.com/q/24746584
tagged with: javascript
score: 0
answer count: 1
tagged with: passport.js
tagged with: angularjs
has body: I am trying to access the email attribute of the current user on my website. Some of my code looks like this: $scope.deleteit = function(data) { var deletepost = data; console.log(Auth.currentUser()); // console.log(Auth.currentUser().email) //returns undefined } This is what the output looks like in my browser dev console: Resource { $promise={...}, $resolved=false, $get=function(), more...} When I click on it - in the dev console - I can see: $promise Object { then=function(), catch=function(), finally=function()} $resolved true __v 0 _id "53c3ef3f8766558e16233dd0" email "xxx@gmail.com" name "xxx" provider "local" role "user" $delete function(params, success, error) $get function(params, success, error) $query function(params, success, error) $remove function(params, success, error) $save function(params, success, error) $update function(params, success, error) __proto__ Resource { $get=function(), $save=function(), $query=function(), more...} How do I access the email attribute? BTW - I am trying to create a way to verify whether or not the owner of the post is the one who is trying to delete it.
has title: Accessing info from Passport JS Auth request - Angular JS
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24747565
accepted answer: http://stackoverflow.com/a/24747565
tagged with: authentication
type: Question

http://stackoverflow.com/comment/38485940
type: Comment
has text: See this blog post for more info on `kernel`: http://jakevdp.github.io/blog/2013/06/01/ipython-notebook-javascript-python-communication/
comment on: http://stackoverflow.com/a/24727903
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38167718
type: AnswerComment
score: 0
type: Comment
has text: Thanks for your suggestions. #1 seems best as you say, but unfortunately it's not possible in my environment.
comment on: http://stackoverflow.com/a/24612260

http://stackoverflow.com/comment/38260670
score: 0
comment on: http://stackoverflow.com/q/24677295
type: QuestionComment
type: Comment
has text: In those mouse event functions, check for something that is defined in your media query. For example, let say your media query has an element display set to none. You can use js to check and see if that element's display is none or not and gate the function's functionality to execute or not

http://stackoverflow.com/comment/38325471
comment on: http://stackoverflow.com/a/24709852
score: 0
type: Comment
has text: url:run.php, but on data: what should i fill? also how to set interval for each process..? i mean from row 1 to row 2 it need about 2 - 5 second before continue
type: AnswerComment

http://stackoverflow.com/comment/38198739
has text: I would rather they add some sort of identifier, class or id, to more easily target the desired textarea. If this is to be implemented for multiple textareas this needs an additional loop to iterate over all selected text areas.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24643738

http://stackoverflow.com/q/24649861
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24649957
tagged with: asp.net-mvc
tagged with: javascript
has body: How can I redirect to page with key ?i.e. I want to redirect to specifc entry on the table ,how should I do that ? I need something like RedirectToAction("Edit" ,"2" );,how should I do that ? for example here I redirect to page index but RedirectToAction("Index");
type: AnsweredQuestion
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/24649957
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38209778
has title: RedirectTo page with key
tagged with: asp.net-mvc-4

http://stackoverflow.com/comment/38142915
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24614558
has text: With Rafael's suggestion, note: [JavaScript closure inside loops – simple practical example](http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example)

http://stackoverflow.com/comment/38310732
type: AnswerComment
comment on: http://stackoverflow.com/a/24660177
type: Comment
has text: I tried both a string and a number. Neither works. The store_user_id shows in the console as well.
score: 0

http://stackoverflow.com/a/24709499
has body: You want to extend the String's prototype methods? You'll need to do something like this: String.prototype.MyMethod = function() { console.log("MyMethod()"); }; var x = "mystring"; x.MyMethod(); See also: How does JavaScript .prototype work? Or if you want to be really clever, study: MDN Reference: Define Property
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38321756
has comment: http://stackoverflow.com/comment/38321951
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/24709466
answers question: http://stackoverflow.com/q/24709466
upvote count: 1
has comment: http://stackoverflow.com/comment/38322120
has comment: http://stackoverflow.com/comment/38321740

http://stackoverflow.com/a/24746978
type: Answer
has body: The documentation suggests using .checkValidity() which Method Description checkValidity() Returns true if the element's value has no validity problems; false otherwise. If the element is invalid, this method also causes an invalid event at the element. while (as @soktinpk's answer correctly states) .willValidate simply flags it as available for validation, not passing validation. Thus I recommend using this: function() { alert('Validates: '+field.checkValidation()); alert('Value missing: '+field.validity.valueMissing); } off-topic, alert is a terrible debugging tool. Consider using console.log or debugger;
has comment: http://stackoverflow.com/comment/38422551
has comment: http://stackoverflow.com/comment/38413920
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24746707
upvote count: 2
has comment: http://stackoverflow.com/comment/38411527

http://stackoverflow.com/q/24640973
has body: I'm trying to make my add-ons option button show in the addon manager. But when user clicks it, i want it to notifyObserver rather than load the add-ons option page. My goal is: My observer will catch that notify, figure out window, and do stuff in that window. In other case when user clicks it, to open new tab. Is there a way to do this?
tagged with: javascript
favorite count: 0
tagged with: firefox-addon
accepted answer: http://stackoverflow.com/a/24642286
type: AnsweredQuestion
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/24642286
has title: Override default action of the Options/Preferences button in about:addons
downvote count: 0
answer count: 1

http://stackoverflow.com/a/24589367
upvote count: 1
answers question: http://stackoverflow.com/q/24589258
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38155302
has body: I think you might want append, but NOT replace. So if in this case, you should remember where you go off. I just make an example: // remember the last id fetched. var last_id = 0; setInterval(function(){ $.ajax({ // here, send the last_id, and only fetch data newer than that. url: "confess_show.php?newer_than="+last_id, type: "GET", dataType: "html", success: function(data){ // also, here, after data was fetched, update the last_id with the latest one. last_id = getLastId(data); $('.content').append(data); } }); }, 6000);

http://stackoverflow.com/q/24598840
has body: I have this block of javascript in a Rails app, with turbo-link enabled: Usually, I get the error that the .dataTable() function is undefined, and a refresh can solve the problem. However, refresh is not always pleasant, so I added the setTimeout for 100ms to wait for the js from CDN to load. So far I don't see any issue in my dev environment, but I am afraid that if there is a slow client, the js won't finish loading within 100ms. I wonder if there would be a better way to solve this, like checking if the two js files have been loaded, similar to $(document).ready for DOM. Thanks!
has comment: http://stackoverflow.com/comment/38111921
has answer: http://stackoverflow.com/a/24613638
type: Question
has title: Wait for Javascript load from CDN
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/24599061
tagged with: cdn
has answer: http://stackoverflow.com/a/24599373
type: UnansweredQuestion
tagged with: ruby-on-rails

http://stackoverflow.com/q/24632762
tagged with: foreground
type: Question
has answer: http://stackoverflow.com/a/24677612
score: 0
upvote count: 1
tagged with: alarm
downvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/24677612
tagged with: firefox-os
tagged with: background
type: AnsweredQuestion
tagged with: javascript
has title: Firefox OS alarm to wake up closed app
favorite count: 0
has body: Looking at documentation it looks like the alarm api can be used to restart an app at a certain time I changed the code from boilerplate example in this way // Alarm API var alarmDate = new Date("Jul 8, 2014 19:35:00"), addAlarm = document.querySelector("#add-alarm"), alarmDisplay = document.querySelector("#alarm-display"); if (addAlarm) { addAlarm.onclick = function () { var alarm = navigator.mozAlarms.add(alarmDate, "honorTimezone", { "optionalData" : "I am data" }); alarm.onsuccess = function () { var request = window.navigator.mozApps.getSelf(); request.onsuccess = function() { navigator.mozSetMessageHandler("alarm", function (mozAlarm) { request.result.launch(); alert("alarm fired: " + JSON.stringify(mozAlarm.data)); }); }; request.onerror = function() { alert("Error: " + request.error.name); }; }; The code seems to bring up the app only if the app is running (even in background) BUT not if the app is closed. Is this the intended behaviour? Any way to restart a closed app? Also is it possible to bring up the app in foreground and make it unlock the screen? Thanks UPDATE Just as a clarification, the issue appears when the system memory load requires killing an app. Android provides a way to schedule restart of an app (while iOS, afaik, does not...). It would be useful if an app could be restarted at the moment in which it's required. That's also saving a lot of battery...

http://stackoverflow.com/a/24697139
has body: You can do it spliting the text : var str = "Screen Shot"; var res = str.split(" "); And you have an array (res) with values.
score: 0
answers question: http://stackoverflow.com/q/24697009
type: Answer

http://stackoverflow.com/comment/38231368
comment on: http://stackoverflow.com/a/24656342
type: Comment
has text: hi @rob thanks for sharing the above code but when i try adding the above code i am getting error call method getContext of null
score: 0
type: AnswerComment

http://stackoverflow.com/q/24599647
tagged with: javascript
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/24599906
accepted answer: http://stackoverflow.com/a/24599906
favorite count: 0
has comment: http://stackoverflow.com/comment/38113655
has comment: http://stackoverflow.com/comment/38119340
tagged with: ruby-on-rails
type: AnsweredQuestion
downvote count: 0
tagged with: onclick
score: 1
has body: I want to be able to generate a button tag with a nested icon element. Particularly, I want to be able to use this: &lt;%= tag "input", { "class" =&gt; "btn btn-info", "type" =&gt; "button", "onclick"=&gt; "codeAddress()" }%&gt; but with nested icon. I tried putting in class icon-search, it worked but it didn't looked good. I stumbled upon so many questions, they pointed at solutions like this. And I altered the code of line to this : &lt;%= tag "input", { "class" =&gt; "btn btn-info", "type" =&gt; "button", "onclick"=&gt; "codeAddress()" } do %&gt; &lt;i class="icon-search"&gt;&lt;/i&gt; &lt;% end %&gt; But none of them worked. Also, this does not seem to do it neither. I am using Rails 4 and Twitter-bootstrap-rails 2.x
has comment: http://stackoverflow.com/comment/38113493
has title: How to generate a button tag with nested elements
type: Question

http://stackoverflow.com/q/24618815
type: Question
type: AnsweredQuestion
favorite count: 0
upvote count: 2
tagged with: highcharts
answer count: 1
has answer: http://stackoverflow.com/a/24628347
accepted answer: http://stackoverflow.com/a/24628347
tagged with: javascript
has comment: http://stackoverflow.com/comment/38161727
score: 2
downvote count: 0
has title: highcharts - changing color of area depending on y-value
has body: How can I change the color of an area type plot depending on y-values which are in same series ? type of chart - area y- values possible - 1, 2 and 3 desired output - Green color area for values between 3 &amp; 2, red color area for values between 2 &amp; 1

http://stackoverflow.com/q/24728068
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38358786
tagged with: javascript
tagged with: jquery
has body: I have a php script that takes a while and thus wanted to report to an AJAX listener where we are ... so my php has something like this: &lt;?php ... while (something == true) { // lots of loops and work here to do file_put_contents('progress-info.txt',$progress_info); } ... ?&gt; In my javascript, I read this info into a div: &lt;script type="application/javascript"&gt; ... setInterval(function () { //load data from file and display in element id="progress" $('#progress').load('/progress-info.txt'); }, 1000); //every second ... &lt;/script&gt; While this works well for the most part of the progress, occasionally (out of 10,000 loops maybe 3 to 5 times) I get a "failed to open stream: invalid argument" warning. So it's not the name itself (or missing slashes) - I rather suspect an occasional access conflict since two loops are running on the same file, one writing to it, the other (should be) only reading from it. Is this because the jQuery load function locks the file while loading? If so, what are my options to avoid this conflict? I tried to keep the file open in php and then truncate it before writing to it again, but this filled it up with NULLs and made it longer and longer in each loop - not sure what I could do about this issue either. Any pointers are most appreciated!
favorite count: 0
has answer: http://stackoverflow.com/a/24814801
has title: loop over file_put_contents triggers occasional "failed to open stream" warnings
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38357631
upvote count: 1
tagged with: php
score: 1
tagged with: warnings
has comment: http://stackoverflow.com/comment/38357640
type: Question
has comment: http://stackoverflow.com/comment/38358726

http://stackoverflow.com/q/24644848
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/38208256
has comment: http://stackoverflow.com/comment/38208174
has body: I am making a Cordova/Phonegap app using Appframework and Knockout js for front and back end. The issue I am running into is occurring in the header of the firstly loaded panel. The HTML: Classes Grade: Back So in the first panel of id="classList" the addClass button in the header does not get triggered when clicked, tapped, or any other sort of user interaction. If I tap on a list item with a link to the panel of id="categoryList" and transition to that panel, the button in the top right of that header with event click:addCategory DOES work. The only way I can get the addClass click event to fire is when I init my models... ko.applyBindings(classModel, document.getElementById('classList')); ko.applyBindings(categoryModel, document.getElementById('categoryList')); is by not specifying the second parameter for the classModel ko binding. Of course this will be a problem, because I have multiple views and need to specify which container each of my models should observe. VIEW MODELS ClassModel: function classInfo(name, id, parent) { var self = this; self.name = ko.observable(name); self.score = ko.observable(''); self.id = ko.observable(id); self.openClass = function(data, event) { parent.currentClass(event.currentTarget.name); }; } function classListViewModel() { var self = this; //class array object self.classes = ko.observableArray([]); //current class name self.currentClass = ko.observable().publishOn("currentClass"); //remove a class from the model self.removeClass = function(obj) { //remove the class }; //add a new class to the model self.addClass = function() { //add a new using classInfo object }; } So, what is going on here? Is Appframework doing something weird to the header on the main page causing the click:addClass event to not fire? Any insight/help would be much appreciate, thanks!
tagged with: javascript
score: 0
tagged with: appframework
tagged with: cordova
type: UnansweredQuestion
has title: Knockout click event in Appframework header not triggering
has comment: http://stackoverflow.com/comment/38222784
answer count: 0
has comment: http://stackoverflow.com/comment/38208179

http://stackoverflow.com/q/24644740
possible better answer: http://stackoverflow.com/a/24644821
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/24644795
type: AnsweredQuestion
score: 1
has title: returning array from function in javascript
type: Question
linked to: http://stackoverflow.com/q/500431
answer count: 2
tagged with: soundcloud
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24644795
has answer: http://stackoverflow.com/a/24644821
tagged with: scope
has body: so I come from a heavy python background, and I'm trying to wrap my head around javascript. Here I have a function that returns an array of track IDs for soundcloud songs by the artist 'v-2-followers'. How would I go about assigning the output of SC.get(stuff) to a variable to reuse the track list in another function. I'm sure I'm missing something fundamental. I'm less looking for an answer that explains how to do this, but more why it's done like that. That said I would also very much appreciate the how. :) (function() { SC.initialize({ client_id:'__CLIENTID__'; }); // Would like to set a variable equal to the output of SC.get('/tracks', { q: 'v-2-followers' }, function(tracks) { trackIdList = []; tracks.forEach(function(track){ trackIdList.push(track.id); }); return trackIdList; }); // And use the variable here. SC.stream('/tracks/'+trackIdList[Math.floor(Math.random() * myArray.length)], function(sound) { sound.play(); sound.pause(); $('#fabrizio').hover(function(e){ sound.resume(); }, function(e){ sound.pause(); }); }); })(); I can see that I'm missing something fundamental about variable assignment and scope, or function callbacks here. I've exhausted myself skimming docs on the subject. If anyone can tell me how to do this, and more importantly, why it's done that way, for future reference.
tagged with: variable-assignment

http://stackoverflow.com/comment/38133286
type: Comment
has text: what are the products exactly? what format, are they checkboxes or what? how do you even know a user selected something?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24609759

http://stackoverflow.com/q/24702593
tagged with: javascript
has title: PHP file upload with ajax not updating the session[upload_progress] cookie
favorite count: 0
linked to: http://stackoverflow.com/q/15418608
tagged with: ajax
tagged with: file-upload
answer count: 0
type: UnansweredQuestion
tagged with: php
type: Question
score: 1
tagged with: session
has body: Quick version Submitting a file upload form via AJAX results in no $_SESSION[upload_progress] array whereas normal submission does. How can I force creation/allow access to display a % completion of the upload. Are alternatives like iframes and XRH2 the best way to do this? Slow version I have an upload function that uses xmlHttpRequest to upload multiple files by upload.php. These are then zipped in upload.php, and the database updated with the url of the zipped file. Parallel to this, I have another form next to the first which submits directly to upload.php (to compare against) with the same processing (upload.php). The file uploading works for both, however I would like to get a progress % and have extra control via the AJAX form. I'm aware I could use XHR2 with the progress and load etc. event listeners, but I haven't had much luck with those, and I don't believe they are IE9 compliant anyway. So instead I wanted to query the progress using a separate AJAX call, uploadProgress.php. I should be able to do that by using the session cookie, which creates various session values when a file is being uploaded. <input type="hidden" value="file-item" name="<?php echo ini_get("session.upload_progress.name"); ?>"> Upload your work <input type="hidden" value="file-item" name="<?php echo ini_get("session.upload_progress.name"); ?>"> Upload 0% General AJAX function function loadXMLDoc(url,method="GET",fd="",cfunc) { if (window.XMLHttpRequest) {xmlhttp=new XMLHttpRequest();} else {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");} xmlhttp.onreadystatechange=cfunc; xmlhttp.open(method,url,false); xmlhttp.send(fd); } Main upload function document.querySelector("#file-select").addEventListener('change',function(e) { var files = fileSelect.files; var formData = new FormData(); document.getElementById('upload-button').innerHTML = 'Uploading...'; for (var i = 0; i < files.length; i++) { var file = files[i]; formData.append('files[]', file, file.name); } loadXMLDoc("homeworkUpload.ph…
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/38272962
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24644601
has text: No problem, I am glad you got it cleared. Make sure to mark your answer as the working solution.

http://stackoverflow.com/a/24644795
type: Answer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/24644740
has comment: http://stackoverflow.com/comment/38200404
answers question: http://stackoverflow.com/q/24644740
has comment: http://stackoverflow.com/comment/38200424
has comment: http://stackoverflow.com/comment/38201864
has body: You have trackIdList as a global variable because it is not created using var. So as it is, you can already access it from any other function. If you wanted to limit its scope to just the outer function, add var trackIdList; as the first line of your function. You should be declaring variables with var everywhere in order to limit their scope. (function() { var trackIdList; ... })(); Further reading: What is the scope of variables in JavaScript? The other concept you need to understand is regarding asynchronous execution and callbacks in JavaScript. Your code that populates trackIdList is contained within a callback function which is (most likely) called after your call to SC.stream(). If SC.stream() depends on the value of trackIdList, it should be called from the callback function. It may help to illustrate what's going on by separating out your callback functions. (function () { var trackIdList = []; SC.initialize({ client_id: '__CLIENTID__' }); SC.get('/tracks', { q: 'v-2-followers' }, processTracks); var randomIndex = Math.floor(Math.random() * myArray.length); SC.stream('/tracks/' + trackIdList[randomIndex], processSound); function processTracks(tracks) { tracks.forEach(function (track) { trackIdList.push(track.id); }); } function processSound(sound) { sound.play(); sound.pause(); $('#fabrizio').hover(function (e) { sound.resume(); }, function (e) { sound.pause(); }); } })(); SC.get() makes an asynchronous request and returns immediately. Then SC.stream() is called without waiting for the request to return. processTracks() isn't called until the request comes back. The trouble is that SC.stream() depends on processTracks(), but is called immediately. To fix this, call SC.stream() from the callback function of SC.get(): (function () { SC.initialize({ client_id: '__CLIENTID__' }); SC.get('/tracks', { q: 'v-2-followers' }, processTracks); function processTracks(tracks) { var trackIdList = []; tracks.forEach(function (track) { trackIdList.push(track.id); }); var r…
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38201003
upvote count: 3
has comment: http://stackoverflow.com/comment/38201512

http://stackoverflow.com/q/24722202
answer count: 1
has title: Deactivate masonry animation
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25199693
type: Question
tagged with: masonry
tagged with: javascript
has body: I've developed a web page using masonry in order to rearrange a set of items of different heights, when user scroll down a "Loading..." message is shown and new items are loaded and layout is recalculated by masonry, so far so good. The problem is that the new items fly from the top left corner of the screen to their new position in the layout and I would like to deactivate that effect, I would prefer to fade in for example better than fly in from the top, or even do not have animation at all, just display the new item in their positions directly. I am using masonry 3.1.5 I've tried with $('#container').masonry().masonry( 'transitionDuration', 0 ); $('#container').masonry().masonry( 'isAnimated', false ); What can I do?
accepted answer: http://stackoverflow.com/a/25199693
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38113374
score: 0
comment on: http://stackoverflow.com/q/24599437
has text: @DavidKnipe: I'm not sure what you mean. There are no optimizations for global variables for that very reason. I just meant that if he was trying to create a global, but the `var` was getting in the way, then he would need to be explicit in its declaration. He may be thinking that a global will get rid of the need to allocation every time the function is called, and that's probably true, but it doesn't mean it'll be more efficient overall.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24629403
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/24629470
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/24629674
has body: I have an anchor tag which has a style with !important, cant remove this !important from the css because its a default style. I am trying to add my custom style and I should not use the !important. Is there a better way to achieve this with out important. Here it is what I have tried: HTML: Change background CSS: a { background: black !important; color: white; } body .anchor{ background: blue; } Fiddle Demo
has answer: http://stackoverflow.com/a/24629533
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38171173
has title: How to override already added important element
type: Question
has comment: http://stackoverflow.com/comment/38171114
tagged with: javascript
has comment: http://stackoverflow.com/comment/38170966
tagged with: jquery
has comment: http://stackoverflow.com/comment/38170934
has comment: http://stackoverflow.com/comment/38171148
answer count: 3
has comment: http://stackoverflow.com/comment/38171305

file-upload
tags question: http://stackoverflow.com/q/24671287
tags question: http://stackoverflow.com/q/24626177
tags question: http://stackoverflow.com/q/24674194
tags question: http://stackoverflow.com/q/24732236
tags question: http://stackoverflow.com/q/24664776
tags question: http://stackoverflow.com/q/24736318
type: Tag
tags question: http://stackoverflow.com/q/24673645
tags question: http://stackoverflow.com/q/24661949
tags question: http://stackoverflow.com/q/24671005
tags question: http://stackoverflow.com/q/24633352
tag name: file-upload
tags question: http://stackoverflow.com/q/24702593
tags question: http://stackoverflow.com/q/24610310

http://stackoverflow.com/comment/38343995
comment on: http://stackoverflow.com/q/24720923
score: 0
type: Comment
type: QuestionComment
has text: I thought so too, then when I looked at SO source, didn't find any app id/ client id visible. They seem to be using a span approach. Haven't figured out how to do that. That looks more professional

http://stackoverflow.com/q/24644095
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/24645854
answer count: 1
tagged with: highcharts
downvote count: 0
tagged with: drilldown
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24645854
has title: Highcharts column drilldown
has body: From my php file, my array prints something this: Array ( [2011] =&gt; Array ( [name] =&gt; 2011 [total] =&gt; 963 [drilldown] =&gt; true ) [2012] =&gt; Array ( [name] =&gt; 2012 [total] =&gt; 1997 [drilldown] =&gt; true ) [2013] =&gt; Array ( [name] =&gt; 2013 [total] =&gt; 1188 [drilldown] =&gt; true ) ) And this is the json_encode: {"2011":{"name":2011,"total":963,"drilldown":"true"}, "2012":{"name":2012,"total":1997,"drilldown":"true"}, "2013":{"name":2013,"total":1188,"drilldown":"true"}} from this working link: highcharts/drilldown data: [{ name: 'Animals', y: 5, drilldown: true }, { name: 'Fruits', y: 2, drilldown: true }, { name: 'Cars', y: 4, drilldown: true }] I want to change this part with my json.
upvote count: 3
type: Question
score: 3

http://stackoverflow.com/comment/38146691
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24615815
has text: Thanks. How do I append the values then. I selected 3 numberOfFloors then it loads 1,2,3 whichFloorYouStay. But now when I select 4 numberOfFloors I would need to see 1,2,3,4 whichFloorYouStay instead of the 1,2,3.
score: 0

http://stackoverflow.com/comment/38168793
type: QuestionComment
has text: Welcome to Stack Overflow. Please read [Stack Overflow: How to ask](http://stackoverflow.com/questions/how-to-ask) and [Jon Skeet's Question Checklist](http://msmvps.com/blogs/jon_skeet/archive/2012/11/24/stack-overflow-question-checklist.aspx) to find out how to ask a good question that will generate good useful, answers.
comment on: http://stackoverflow.com/q/24628149
score: 0
type: Comment

http://stackoverflow.com/a/24751152
type: Answer
has comment: http://stackoverflow.com/comment/38404615
downvote count: 1
has comment: http://stackoverflow.com/comment/38405380
has comment: http://stackoverflow.com/comment/38407217
has body: var dojoConfig = { async: true, parseOnLoad: false } parseOnLoad should be false
score: -1
has comment: http://stackoverflow.com/comment/38443215
answers question: http://stackoverflow.com/q/24730210
upvote count: 0
has comment: http://stackoverflow.com/comment/38407466

http://stackoverflow.com/comment/38169294
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24628232
has text: You should check if there is an error message in the console and if there is one the show it with your question.

http://stackoverflow.com/a/24735605
answers question: http://stackoverflow.com/q/24735400
score: 0
type: Answer
has body: I'm not entirely sure what your issue is, but if you're just trying to loop the obj and use starttime and endtime of alternative objects, you can use: for (var i in obj){ if(i%2 ==0){ alert(obj[i].starttime); }else{ alert(obj[i].endtime); } } Please tell me if this is what you're looking for.

http://stackoverflow.com/q/24619829
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/csv
accepted answer: http://stackoverflow.com/a/24619876
has answer: http://stackoverflow.com/a/24620345
has title: Variables pulled from .csv won't add
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/24619876
linked to: http://stackoverflow.com/q/23667086
has body: I'm having a bit of trouble adding a couple variables together. Nothing I've tried has fixed the problem, and I'm doing some stuff I've never done before which is making me wonder what is actually causing the problem. I have a .csv file which I need to read through to find the line I want, pull some variables from there, add them together, and display all this on a page. Here's my code: &lt;script src="jquery_min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="jquery.csv-0.71.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; jQuery.get('fileName.csv', function(data) { var csv = $.csv.toArrays(data); var index, value, result, var1, var2, var3; for (index=0; index &lt; csv.length; ++index) { value = csv[index]; if (value[3] === "1234") { window.var1 = parseFloat(value[5]); window.var2= parseFloat(value[6]); window.var3= var1 + var2; alert(var3); result = var3; break; } } }); &lt;/script&gt; and here's a sample line from the .csv file: "NEW YORK","A123","SMITH INC","1234","JOHN SMITH",4112237,5279,,"Y" I'm writing to the page with this: &lt;script&gt; $('td#id1').html(var1); $('td#id2').html(var2); $('td.class1').html(var3); &lt;/script&gt; The alert pops back with "undefined" while var1 and var 2 are written to the page correctly, as 4112237 and 5279 respectively. Var3 writes to the page as NaN. At this point I've tried too many fixes to recall. Any help would be appreciated.
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24620345
has comment: http://stackoverflow.com/comment/38153354
type: Question
answer count: 2

http://stackoverflow.com/a/24728157
type: Answer
score: 2
has body: When a project is being developed in parallel by multiple teams the key factor in it's success is communication between the teams. The teams should get together at set intervals to discuss cross-cutting concerns (e.g. naming strategies for ids). For instance if using the Scrum agile development methodology, the teams would meet periodically in a "Scrum of Scrums" meeting to discuss such an issue. By having a conversation the teams will be able to agree on a naming convention (and document the agreed convention for future reference) which best suits the components being developed at that time (and when I say best at that time, I mean simplest and most easy to read whilst avoiding any naming clashes). Hence your suggestion to "pre-arrange" id's whilst work is being carried out in parallel isn't as ridiculous as you may think!
downvote count: 0
has comment: http://stackoverflow.com/comment/38373393
answers question: http://stackoverflow.com/q/24689046
has comment: http://stackoverflow.com/comment/38373192
upvote count: 2

http://stackoverflow.com/comment/38287365
type: Comment
comment on: http://stackoverflow.com/q/24691676
type: QuestionComment
score: 1
has text: open up the debug log in chrome and check the Network traffic, it will help you and us with more info

http://stackoverflow.com/comment/38207786
type: Comment
score: 0
has text: I've run into cases in the past where a programmatic change to a hidden input's value wasn't "complete" until I triggered a `change` event on the hidden input. It's been a while, and I don't recall the particulars, so I can't provide you with any more details atm.
type: QuestionComment
comment on: http://stackoverflow.com/q/24647180

http://stackoverflow.com/q/24617670
tagged with: javascript
score: 0
has title: Google Maps on website, center is offset?
tagged with: css
has body: I want to center my map at these coords here (google maps website) I copy pasted the coordinates in my website code: &lt;script&gt; function initialize() { var map_canvas = document.getElementById('map_canvas'); var map_options = { center: new google.maps.LatLng(56.4611388, -2.9719832), zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(map_canvas, map_options) } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; Because my map slides down from the top of the page when user hovers over some text I call the function to refresh the map at the end of the animation: $('#map').mouseover(function() { if ($(this).offset().top == mapHiddenHeight) { $(this).animate({ top: 0 }, 500, function() { google.maps.event.trigger(map,'resize'); // refresh map }); } }) But the map is slightly offset from the center on my website. (Map drops down when you hover over "Find us on the map", top right) NB: Actually I just noticed, if I clear the browser cache and load the website it appears at the right location. It's when you reload the page with cache full that it constantly displays with the same location offset. No matter how many times you refresh the page after that. So it only displays at correct location with a cleared cached, which of course is annoying. I don't even know where to start debugging this. Tested on Chrome and Firefox,
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24618310
type: Question
accepted answer: http://stackoverflow.com/a/24618310
tagged with: google-maps
answer count: 1

http://stackoverflow.com/comment/38146742
type: Comment
has text: @Gudmundur I've edited the answer to include further information.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24616390

http://stackoverflow.com/a/24588613
answers question: http://stackoverflow.com/q/24588516
score: 2
downvote count: 0
has body: You'd have to post more input, because your data format is vague right now... But I'll try to answer anyway: ^\s*Product(.+?)Style(.+?)Location(.+?)\s*$ Your info is in the 3 captured groups. I can't say more until I know the language you're using. EDIT: In JS: var re = /^\s*Product(.+?)Style(.+?)Location(.+?)\s*$/gm; var inputString = "ProductTable ChairStyleNewproductLocationUnited Kingdom"; // Add another line of data inputString += "\nProductDeskStyleOldproductLocationGermany"; var match; while((match = re.exec(inputString))) { console.log({ product: match[1], style: match[2], location: match[3] }); }
has comment: http://stackoverflow.com/comment/38092881
type: AcceptedAnswer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24588516
type: Answer

http://stackoverflow.com/q/24709927
has comment: http://stackoverflow.com/comment/38322647
has comment: http://stackoverflow.com/comment/38322822
has comment: http://stackoverflow.com/comment/38322775
has title: How to use angular forEach with firebase
downvote count: 0
score: 1
type: Question
tagged with: firebase
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/38322968
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/24715654
accepted answer: http://stackoverflow.com/a/24715654
tagged with: angularfire
favorite count: 0
has body: I'm new to angular. I'm attempting to use angular foreach with firebase, but it didn't work. Any pointers on how to do this? var app = angular.module('MyApp',["firebase"]); app.controller('ItemCtrl', function($scope, $firebase){ var ref = new Firebase("https://url.firebaseio.com"); $scope.menu = $firebase(ref); $scope.total = function(){ var total = 0; angular.forEach($scope.menu, function(item) { total += item.price * item.quantity; }) return total; }; }); html &lt;div class=" sliding" &gt; &lt;a href="#"class="button open" &gt; Total: &lt;/a&gt; &lt;/div&gt; json [ {"name": "Ham, Egg &amp; Cheese CROISSAN'WICH ", "quantity": 0, "price": 20, "description": "description", "comment": "comment", "imgURL": "http://url" }, ...]
tagged with: angularjs

http://stackoverflow.com/comment/38346878
score: 1
has text: `JSQR is not defined` is a clear enough error. What makes you think it should be defined?
comment on: http://stackoverflow.com/q/24722287
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38425211
comment on: http://stackoverflow.com/a/24744318
type: AnswerComment
has text: Oh whoops yep, you are right. that was a typo. Updated my answer.
type: Comment
score: 1

http://stackoverflow.com/comment/38132316
comment on: http://stackoverflow.com/a/24606307
has text: Why the downvote? If you don't explain what it is that you think is wrong, it can't improve the answer.
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/38311151
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24704103
has text: My bad there is question mark in URL but while typing here I missed it.

http://stackoverflow.com/q/24629434
has body: I'm using the following function to determine the number of days in a month: function daysInMonth(month,year) { return new Date(year,month,0).getDate(); } Now when I do the following for example, it works great: var currMonth = currDate.getMonth(), currYear = currDate.getFullYear(), daysInMonth = daysInMonth(currYear,currMonth+1); However, if I try to use the same function again like so: var test = daysInMonth(currYear,currMonth+2); I get the following error: Uncaught TypeError: number is not a function Why is this happening?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24629544
has title: Days in month function only has single use
type: Question
tagged with: javascript
tagged with: date
accepted answer: http://stackoverflow.com/a/24629520
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24629544
has answer: http://stackoverflow.com/a/24629520

http://stackoverflow.com/comment/38315395
comment on: http://stackoverflow.com/q/24706197
has text: `todos.unshift(todo)`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24656854
accepted answer: http://stackoverflow.com/a/24657296
type: AnsweredQuestion
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38222880
has answer: http://stackoverflow.com/a/24657296
type: Question
has comment: http://stackoverflow.com/comment/38222767
has comment: http://stackoverflow.com/comment/38223025
tagged with: javascript
has comment: http://stackoverflow.com/comment/38222997
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has body: I have an array of objects in the following structure var projects = [ {id:'1',name:'project1', parentid:"null"}, {id:'2',name:'project2', parentid:"null"}, {id:'3',name:'subproject1', parentid:"1"}, {id:'4',name:'subproject2', parentid:"1"}, {id:'5',name:'subproject3', parentid:"2"} ]; I would like to make a new array with the following structure var newProjects = [ {text:'project1', children:[ {id:'3',name:'subproject1', parentid:"1"}, {id:'4',name:'subproject2', parentid:"1"} ]}, {text:'project2', children:[ {id:'5',name:'subproject3', parentid:"2"} ]} ] I have been able to do this using a bunch of loops and if statements but would like to clean it up by using Underscore.js but been unable to do so. could someone please point me in the right direction?
has title: Underscore.js New Array of Objects with child arrays
has comment: http://stackoverflow.com/comment/38222964
has comment: http://stackoverflow.com/comment/38222911
has comment: http://stackoverflow.com/comment/38222816

http://stackoverflow.com/comment/38299900
comment on: http://stackoverflow.com/a/24695923
type: AnswerComment
has text: Could you post a complete example that shows the problem please?
score: 0
type: Comment

http://stackoverflow.com/a/24689208
answers question: http://stackoverflow.com/q/24687011
has body: You can do all of that with a single update call that combines all three of those operations (which is the only way to make a combination of updates atomic). You don't sum the transactions during the update, instead you update balance with the amount of the change: var transaction = { amount: 500, added: new Date() }; Account.update({owner: owner}, { // Adjust the balance by the amount in the transaction. $inc: {balance: transaction.amount}, // Add the transaction to transactions while sorting by added. $push: {transactions: { $each: [transaction], $sort: {added: 1} }} }, callback); Note that this does utilize the $sort modifier for the $push which was added in 2.4 and updated in 2.6 so you need to be using a recent build.
type: Answer
has comment: http://stackoverflow.com/comment/38283465
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24687011

http://stackoverflow.com/a/24719670
type: Answer
score: 3
upvote count: 3
has body: You can use :not() in combination with the :has() selector: $("#tblVisualAidResult tbody tr:not(:has('.errorLine'))").hide(); And then to show the rows again you could repeat that selector, though it's simpler to just show everything: $("#tblVisualAidResult tr").show(); Demo: http://jsfiddle.net/Z86dq/29/ You may or may not find it more readable to break the big selector up by using the .not() method rather than the :not() selector: $("#tblVisualAidResult tbody tr").not(":has('.errorLine')").hide(); Demo: http://jsfiddle.net/Z86dq/30/
answers question: http://stackoverflow.com/q/24719648
accepted answer of: http://stackoverflow.com/q/24719648
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38320908
type: Comment
type: AnswerComment
has text: @James Yeah, I don't use it often, but in cases like these it comes in quite handy :)
comment on: http://stackoverflow.com/a/24708889
score: 0

http://stackoverflow.com/a/24765527
upvote count: 1
has body: All requests to the Contacts API must be sent with https://. Sending a GET request to the Contacts API over HTTP will result in a redirect and a POST/PUT/DELETE will result in a 401/403. There is no way around this. (Your title says "without HTTPS" and your question says "with HTTPS". I am assuming the former.)
has comment: http://stackoverflow.com/comment/38442683
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/24742037
score: 1

http://stackoverflow.com/comment/38281929
type: QuestionComment
comment on: http://stackoverflow.com/q/24688539
has text: @orciny can any one guide me how to do that please. or any examples
score: 0
type: Comment

http://stackoverflow.com/q/24696058
type: UnansweredQuestion
tagged with: jplayer
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: http://stackoverflow.com/tag/xhtml
downvote count: 0
tagged with: javascript
tagged with: wav
has comment: http://stackoverflow.com/comment/38323264
has comment: http://stackoverflow.com/comment/38359536
favorite count: 0
has title: JPlayer and wav file
has body: There is an issue with jPlayer and playing wav files. I tried to play a wav file but some of my buttons are not working as what they should like, my 'stop' button only pauses, then another is that I can't use my 'seekbar'. Do you an idea on how to fix this thing?

http://stackoverflow.com/q/24613997
tagged with: javascript
has comment: http://stackoverflow.com/comment/38141584
score: 0
has title: How can I move my + button to the right of my web page?
answer count: 3
has comment: http://stackoverflow.com/comment/38141748
has answer: http://stackoverflow.com/a/24614134
has comment: http://stackoverflow.com/comment/38141712
has answer: http://stackoverflow.com/a/24614233
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38141591
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38141996
tagged with: css
has answer: http://stackoverflow.com/a/24614140
has comment: http://stackoverflow.com/comment/38141640
type: Question
has body: Here is my HTML Javascript Read More Test Projects Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Some more text Some more text Some more text + Here is my Javascript function showMoreOrLess(thisObj,bonusContent){ var caption = thisObj.innerHTML; //alert(caption); if ( caption == "+" ) { document.getElementById(bonusContent).style.display = "inline"; thisObj.innerHTML = "-"; } else { document.getElementById(bonusContent).style.display = "none"; thisObj.innerHTML = "+"; } } And here is my CSS body { text-align: left; } h3 { text-align: left; } p1 { text-align: right; } + { text-align: right; } I want my + button aligned to the right of the page but each time I try to edit the + sign the hidden text within the + sign moves to the right. Is there anyway to move only the + sign? I am also new to this site and coding in general. I apologize for any mistakes in advance.

input
tags question: http://stackoverflow.com/q/24721771
tags question: http://stackoverflow.com/q/24616324
tags question: http://stackoverflow.com/q/24616444
tags question: http://stackoverflow.com/q/24742195
tags question: http://stackoverflow.com/q/24629613
tags question: http://stackoverflow.com/q/24683564
tags question: http://stackoverflow.com/q/24591588
tags question: http://stackoverflow.com/q/24635375
tags question: http://stackoverflow.com/q/24595971
tags question: http://stackoverflow.com/q/24696625
tags question: http://stackoverflow.com/q/24672794
tags question: http://stackoverflow.com/q/24727791
tags question: http://stackoverflow.com/q/24612734
tags question: http://stackoverflow.com/q/24611120
tags question: http://stackoverflow.com/q/24738022
tags question: http://stackoverflow.com/q/24687381
tags question: http://stackoverflow.com/q/24656424
tags question: http://stackoverflow.com/q/24652851
tags question: http://stackoverflow.com/q/24607624
tags question: http://stackoverflow.com/q/24745185
tags question: http://stackoverflow.com/q/24628748
tag name: input
tags question: http://stackoverflow.com/q/24700477
type: Tag
tags question: http://stackoverflow.com/q/24718592

http://stackoverflow.com/q/24681994
has title: Opening a new window using javascript with information from previous window
tagged with: css
answer count: 1
accepted answer: http://stackoverflow.com/a/24684562
has comment: http://stackoverflow.com/comment/38271445
score: 0
has comment: http://stackoverflow.com/comment/38269922
has comment: http://stackoverflow.com/comment/38269574
tagged with: javascript
tagged with: jquery
has body: I am working on a project where I am using vanilla javascript and jquery to open a new window when I double click a certain element in a page. I know how to open a new window in javascript/jquery, what I do not know how to do is how to send information from the original window to the new window. Say I double click something in the original window. This will then create a new object and open a new window. I would like to know if there was a way to send the newly created object over to the new window from the original window.
has answer: http://stackoverflow.com/a/24684562
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: web
has comment: http://stackoverflow.com/comment/38269416
type: Question

http://stackoverflow.com/a/24689573
has comment: http://stackoverflow.com/comment/38284628
has comment: http://stackoverflow.com/comment/38284265
has comment: http://stackoverflow.com/comment/38284218
accepted answer of: http://stackoverflow.com/q/24689034
has body: According to my understanding :): Let's say you have this markup (im confused with your mark up, just tell me if this is wrong): X GO Show Guesses Where id in is your id_game, value in is your team_1, value in is your team_2, value in is your number of loop. Then to get these in javascript: In your controller you receive the post data like this (my way of doing it): public function salve_guess() { $id_game = $this->input->post('id_game', TRUE); $team_1 = $this->input->post('team_1', TRUE); $team_2 = $this->input->post('team_2', TRUE); $json_arr = array( // incrementing ID => array(id_game, team_1, team_2) 1 => array( 'id_game' => 1, 'team_1' => 2, 'team_2' => 3 ), 2 => array( 'id_game' => 1, 'team_1' => 2, 'team_2' => 3 ) ); echo json_encode($json_arr); } Note: $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
answers question: http://stackoverflow.com/q/24689034
score: 0
has comment: http://stackoverflow.com/comment/38319886
has comment: http://stackoverflow.com/comment/38284122
has comment: http://stackoverflow.com/comment/38285323
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38284182
has comment: http://stackoverflow.com/comment/38284173
has comment: http://stackoverflow.com/comment/38319394
type: Answer
has comment: http://stackoverflow.com/comment/38284306
has comment: http://stackoverflow.com/comment/38284158
has comment: http://stackoverflow.com/comment/38284346
has comment: http://stackoverflow.com/comment/38284109

http://stackoverflow.com/q/24653858
has comment: http://stackoverflow.com/comment/38217068
tagged with: internet-explorer
tagged with: internet-explorer-8
type: Question
has title: Unable to get property 'scopeName'
has comment: http://stackoverflow.com/comment/38217525
downvote count: 0
tagged with: javascript
has body: I've done a google search for this error: TypeError: Unable to get property 'scopeName' of undefined or null reference In IE8 and can't find a single reference to this error. I'm fairly certain that I've checked my markup for unclosed tags as I'm aware that IE8 routinely chokes on those. It's an AngularJS application. I'm at a loss here, and I was just wondering if anyone else had run across this error.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26280224
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38217195
score: 2

http://stackoverflow.com/q/24646313
type: UnansweredQuestion
tagged with: servlets
has comment: http://stackoverflow.com/comment/38250407
answer count: 0
has title: Charcter '+' is getting replace by space in request parameter
tagged with: jsp
has comment: http://stackoverflow.com/comment/38250192
tagged with: javascript
tagged with: security
has comment: http://stackoverflow.com/comment/38247741
type: Question
has body: // jsp abc.jsp Code: &lt;% String a = (String)session.getAttribute("CSRF_NONCE"); String b = a.replace("+","%2B") %&gt; &lt;a href="javascript:newWin=void(window.open('&lt;%=Url%&gt;netmarkets/jsp/meeting/xyz.jsp?&amp;u8=1&amp;height=450,&amp;CSRF_NONCE=&lt;%=a%&gt;','','toolbar=no'))"&gt;Action Items &lt;/a&gt; Requirement: I want to pass one request parameter in above link after reading that from session(attr-"CSRF_NONCE"). Problem: When I read "CSRF_NONCE" parameter in xyz.jsp, I find that character '+' is replaced by space in parameter CSRF_NONCE. I tried string b in link but I got the same problem. Actually from xyz.jsp, An api is called which checks that CSRF_NONCE is present in both session and request. // debug output using System.out.println-&gt;SOP // In xyz.jsp SOP(request.getSession().getAttribute("CSRF_NONCE"))-&gt; tqEtncjrVemCzNXjsFLu4sYDSuvZFw6g6j4meBSbXXQ=:1404880919271:6HVrHD/ZKeOME+1k76KOUA== SOP(request.getParameter("CSRF_NONCE")) -&gt; tqEtncjrVemCzNXjsFLu4sYDSuvZFw6g6j4meBSbXXQ=:1404880919271:6HVrHD/ZKeOME 1k76KOUA==
score: 0
tagged with: jakarta-ee

http://stackoverflow.com/comment/38199575
comment on: http://stackoverflow.com/a/24644326
score: 0
type: AnswerComment
has text: Then what about `String.prototype.replace()`? Surely it could do that in place too :)
type: Comment

http://stackoverflow.com/comment/38107837
has text: Nothing seems to happen when I click the image in your example.
comment on: http://stackoverflow.com/a/24596374
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24733063
has comment: http://stackoverflow.com/comment/38367083
linked to: http://stackoverflow.com/q/24499531
has comment: http://stackoverflow.com/comment/38367422
has title: Read textbox value from javascript/jquery
has answer: http://stackoverflow.com/a/24733471
accepted answer: http://stackoverflow.com/a/24733471
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38367062
has comment: http://stackoverflow.com/comment/38367760
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have created a google map with a bubble as the marker. I have created an array in code behind and set a textbox with these values. The textbox gets populated with the correct values, but I cannot read the values from jquery/javascript... When using these statement: var markers = $('#txtMarkers').val(); var markers = document.getElementById('&lt;%=txtMarkers.ClientID%&gt;') I get this error message: 0x800a138f - JavaScript runtime error: Unable to get property '0' of undefined or null reference And when I use this : var markers = document.getElementById('&lt;%=txtMarkers.ClientID%&gt;').value; I get this error message: 0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference But, the textbox is getting populated. This is what gets populated in the textbox (added manual values to see what is getting populated in the textbox): [{"title":"DRIVER","lat":"25.9820333333333","lng":"28.1289333333333","description":"0.6608917"}, {"title":"DRIVER","lat":"-25.982","lng":"28.1289333333333","description":"0.6643902"}, ...more values}] Adding these values manually loads the map and markers, but it doesn't seem to read the values from the textbox. Am I doing something wrong? More Information When I put the $(document).ready(function () {}); on the page I get an error of 0x800a1391 - JavaScript runtime error: 'initialize' is undefined So I took the onload="initialize()" in the body tag out, thus resulting in this error: 0x800a138f - JavaScript runtime error: Unable to get property 'lat' of undefined or null reference in this piece of code since there is no information as a method has to run before this gets loaded (information from db): var mapOptions = { center: new google.maps.LatLng(markers[0].lat, markers[0].lng), zoom: 8, mapTypeControl: true, panControl: true, zoomControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP };
tagged with: asp.net
score: 0

http://stackoverflow.com/a/68248682
score: 1
has body: curl --include \ --no-buffer \ --header "Connection: Upgrade" \ --header "Upgrade: websocket" \ --header "Host: echo.websocket.org" \ --header "Origin: http://echo.websocket.org" \ --header "Sec-WebSocket-Version: 13" \ http://echo.websocket.org Add the header if you have an additional sub-protocol configured for the WebSocket endpoint: --header "Sec-protocol: protocol-name" Replace thee Origin, Host and endpoint to test with your own server. If you have basic auth enabled, add the Authorization header like this: --header "Authorization: Basic RVZCLVAxNzI2MzAzOv"
downvote count: 0
answers question: http://stackoverflow.com/q/24704097
type: Answer
upvote count: 1

http://stackoverflow.com/a/31220949
type: Answer
score: 1
answers question: http://stackoverflow.com/q/24621903
upvote count: 1
downvote count: 0
has body: I recently faced with same issue. To answer your question how to turn Buffer into String so it can be made a Buffer again, you need to convert it to base64 encoded string. That way you won't lose any data: buf = Buffer(4) buf.fill(128) base64String = buf.toString('base64') newBuf = Buffer(base64String, 'base64') buf.equals(newBuf) //true

http://stackoverflow.com/q/24615781
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24616000
downvote count: 2
accepted answer: http://stackoverflow.com/a/24616059
upvote count: 1
has comment: http://stackoverflow.com/comment/38145359
type: Question
has comment: http://stackoverflow.com/comment/38145463
tagged with: javascript
score: -1
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/24616059
favorite count: 0
has body: I want to make a simple bootstrap based information fill out form, in which I wanted to make a button remove the "hidden" class from an element. I now want to add a second button that will remove the class of another hidden section. This is the type of code that I was told would work: It does but I want to add another button that removes class from a section called "add more products". Add More: Product Container: Container 1 Container 2 Container 3
tagged with: twitter-bootstrap
has title: Making buttons do different things in a form
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38145589
tagged with: css
has answer: http://stackoverflow.com/a/24616004
has comment: http://stackoverflow.com/comment/38145381
possible better answer: http://stackoverflow.com/a/24616000

http://stackoverflow.com/q/24705380
has comment: http://stackoverflow.com/comment/38313540
has comment: http://stackoverflow.com/comment/38313525
has comment: http://stackoverflow.com/comment/38313638
has title: Understanding top level window property
answer count: 3
has body: I get a js error when I declare the following script. &lt;script&gt; window.onload=init; init = function(){alert("Yahoo!");} &lt;/script&gt; It works when I declare init as: &lt;script&gt; window.onload=init; var init = function(){alert("Yahoo!");} &lt;/script&gt; Shouldn't the top level init should implicitly become the property of window object? Please help me understand the concept.
downvote count: 1
has comment: http://stackoverflow.com/comment/38313566
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24705487
has answer: http://stackoverflow.com/a/24705520
has answer: http://stackoverflow.com/a/24705472
score: 1
favorite count: 0
type: Question
upvote count: 2

http://stackoverflow.com/q/24607309
type: Question
has body: I'm wrapping UI Bootstraps typeahead in a directive and have trouble accessing $viewValue in the template. I want to be able to call the getAutocompleteList function specified in the typeahead-attribute in the template with the current $viewValue. Currently the value is always undefined. In my actual application getAutocompleteList makes an ajax call to the server where the are millions of records to choose from. This example is just to show the problem. I've also made a Plunker App.js var app = angular.module('plunker', ['ui.bootstrap']); app.controller('MainCtrl', function($scope,list) { $scope.modell = {}; $scope.modell.grupp = {label: "Your State", placeholder:'Write state name', namn: "aaa"}; $scope.modell.getAutocompleteList = function(namn) {return list.getList(namn); }; }); app.directive('myautocomplete', function() { return { scope: { modell: "=", getAutocompleteList: "&amp;" }, templateUrl: 'skriv.html', } }); app.factory('list', function($q){ return { getList: function(search) { console.log(search); states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']; var result = states; if(search) { result = []; for (var i = 0; i &lt; states.length; i++) { if(states[i].toLowerCase().indexOf(search) === 0){ result.push(states[i]); } } } else {result = states} var deferred = $q.defer(); deferred.resolve(result); return deferred.promise; } } }); Html file &lt;body ng-controller="MainCtrl"&gt; &lt;div mya…
tagged with: javascript
tagged with: angular-ui-bootstrap
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24614395
tagged with: angularjs
type: UnansweredQuestion
has title: Trying to make directive wrapping UI Bootstraps typeahead to work

http://stackoverflow.com/comment/38296022
type: QuestionComment
comment on: http://stackoverflow.com/q/24669555
has text: It might be easier to use the first form, i.e. `q.defer(d3.json, url)` for each task and then handle all the data in the `awaitAll` callback.
score: 0
type: Comment

http://stackoverflow.com/comment/38384350
type: Comment
comment on: http://stackoverflow.com/q/24705770
has text: Hi, I update the code, see: [DEMO](http://jsfiddle.net/gutierrez100/gM35F/9/)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38162579
type: Comment
comment on: http://stackoverflow.com/a/24622030
has text: Yes, my suggestion would be to use jQuery to detect the keypress events.
type: AnswerComment
score: 0

http://stackoverflow.com/q/24704921
has comment: http://stackoverflow.com/comment/38313237
accepted answer: http://stackoverflow.com/a/24705676
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/38312821
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38312628
has comment: http://stackoverflow.com/comment/38313415
downvote count: 3
has comment: http://stackoverflow.com/comment/38313358
has comment: http://stackoverflow.com/comment/38312940
linked to: http://stackoverflow.com/q/6787383
type: Question
has title: Is There a Way For a Single Instance of a CSS Class be on multiple Elements, but Only One Element at a Time?
tagged with: javascript
has answer: http://stackoverflow.com/a/24705676
upvote count: 0
has body: I'm wondering if there's a way to create an array of dom elements where all elements can have a particular css, and have the option for one element at a time to not have this class? For instance I have 2 divs and each has one css class called outer-div and the class I want a single instance to be able to not have is minimized that can be applied in addition to outer-div. Right Now, I have this javascript: function oneWindow(){ var windowList = document.getElementsByClassName('outer-div'); console.log(windowList); var openList = new Array(); if(windowList.length&gt;0){ for(var i = 0; i&lt;windowList.length; i++){ if(windowList[i].className.indexOf('minimize')==-1){ openList.push(windowList[i]); } } } if(openList.length&gt;1){ for(var j=1; j&lt;openList.length; j++){ openList[j].className += ' minimize'; } } else if(openList.length&lt;1){ for(var t=0; t&lt;windowList.length; t++){ //not sure what to put here but should allow one element to not have minimize } } } So in short, I want to allow one Element in the windowList to not have minimize but allow all elements to be able to have minimize and all have the ability to become the single element without minimize. By The Way, I have to use pure javascript and not jquery.
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38312760

http://stackoverflow.com/comment/38343909
comment on: http://stackoverflow.com/q/24720923
has text: you can put script in seperate js file
score: 0
type: Comment
type: QuestionComment

titanium
type: Tag
tags question: http://stackoverflow.com/q/24640493
tags question: http://stackoverflow.com/q/24668428
tags question: http://stackoverflow.com/q/24724554
tags question: http://stackoverflow.com/q/24704112
tag name: titanium
tags question: http://stackoverflow.com/q/24676555
tags question: http://stackoverflow.com/q/24734560

http://stackoverflow.com/comment/38215102
comment on: http://stackoverflow.com/q/24652861
type: Comment
type: QuestionComment
has text: Look into server log, why the 500 error was caused.
score: 3

http://stackoverflow.com/q/24704897
type: Question
tagged with: javascript
score: -1
has body: I just encountered a problem trying to populate two dropdown selection menus using jQuery, Ajax and php. The code keeps loading the same value from database even if a different option is selected from the dropdown menu. Here is a snippet of the code test.html class: Select a Class Nursery Primary Secondary Sub-Class: Select a Sub - Class Subject: Select a Subject JQuery data.php <?php $options = ""; $query = ""; $type = isset($_REQUEST["type"]); switch($type){ case "sub_class": $sub_class_id = intval($_REQUEST["sub_class_id"]); $default_value = ""; $default_text = "Select a Sub - Class"; $options = " ".$default_text." "; if($class_id == "" || $class_id == 0) { $options = " Select a Class First "; } $con = mysql_connect('localhost', 'root', ''); $database = mysql_select_db('admin_glisten'); $sql="SELECT sub_class_id,sub_class FROM sub_class WHERE class_id = '".$class_id."'"; $result = mysql_query($sql); if (!$result) { die("Query failed: " . mysql_error()); } while ($row = mysql_fetch_assoc($result)) { $options .= " ".$row['sub_class']." "; } echo $options; mysql_close($con); break; case "subject": $sub_class_id = intval($_REQUEST["sub_class_id"]); $default_value = ""; $default_text = "Select a Subject"; $options = " ".$default_text." "; if($sub_class_id == "" || $sub_class_id == 0) { $options = " Select a Sub - Class First "; } $con = mysql_connect('localhost', 'root', ''); $database = mysql_select_db('admin_glisten'); $sql="SELECT subject_scheduler.subject_id,subject.subject_id,subject.name FROM subject_scheduler INNER JOIN subject ON subject_scheduler.subject_id=subject.subject_id WHERE sub_class_id = '".$sub_class_id."'"; $result = mysql_query($sql); if (!$result) { die("Query failed: " . mysql_error()); } while ($row = mysql_fetch_assoc($result)) { $options .= " ".$row['name']." "; } echo $options; mysql_close($con); break; default: } ?> PS Never mind my insecure code am just trying to get it to work. Any help will be gratefully appreciated, as i have been on th…
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/24705363
has comment: http://stackoverflow.com/comment/38313015
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38313911
has answer: http://stackoverflow.com/a/24705363
has title: Ajax POST function returning the same result
downvote count: 1

http://stackoverflow.com/a/24696245
downvote count: 0
has body: I'm guessing your code is failing here: ajdi = table.getDataTable().getValue(selection[i].row,0); It looks as if you have closed your for loop before this line so your selection[i] will be undefined Try moving the parenthesis } that appears before this line to after the selection[i] code block A tip - try keeping your code nicely formatted so you can see where your ifs and fors start and end easily - http://jsfiddle.net/6JLfX/1/
score: 3
accepted answer of: http://stackoverflow.com/q/24695280
answers question: http://stackoverflow.com/q/24695280
type: AcceptedAnswer
upvote count: 3
type: Answer

http://stackoverflow.com/a/24725797
has body: Make the following changes to overlay: css #overlay { left: 0; top: 0; width: 100%; height: 100%; display: none; z-index: 28; background: gray; position: fixed; /*Add fixed position */ opacity:0.3; /*Add opacity optional */ } js var button = $('#loginButton'); var box = $('#loginBox'); var form = $('#loginForm'); button.removeAttr('href'); button.mouseup(function(login) { box.toggle(); button.toggleClass('active'); $("#overlay").css('display','block'); //add block }); form.mouseup(function() { return false; }); $(this).mouseup(function(login) { if(!($(login.target).parent('#loginButton').length &gt; 0)) { button.removeClass('active'); box.hide(); $("#overlay").css('display','none'); //hide overlay when close modal } }); fiddle
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/24725704
answers question: http://stackoverflow.com/q/24725704

http://stackoverflow.com/a/24625338
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39003359
has comment: http://stackoverflow.com/comment/38200598
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24624963
has comment: http://stackoverflow.com/comment/38192408
answers question: http://stackoverflow.com/q/24624963
has comment: http://stackoverflow.com/comment/38200370
score: 1
has comment: http://stackoverflow.com/comment/38196468
has body: You want the $elemMatch operator to select the element that has both conditions and the positional $ operator for projection: Models.Message.find( { "to": { "$elemMatch": { "username": "user2", "section.archive": true } } }, { "created": 1, "message": 1, "to.$": 1 } ).sort('to.updated','descending').exec(function (err, messages) { }); Please note that this only works in matching the "first" element for projection. Also you want to "sort" on the value of the matching array element, and you cannot do that with .find() and the .sort() modifier. If you want more than one match in the array then you need to use the aggregate method. This does more complex "filtering" and "projection" than is possible otherwise: Models.Message.aggregate([ // Match documents { "$match": { "to": { "$elemMatch": { "username": "user2", "section.archive": true } } }}, // Unwind to de-normalize { "$unwind": "$to" }, // Match the array elements { "$match": { "to.username": "user2", "to.section.archive": true }}, // Group back to the original document { "$group": { "_id": "$_id", "created": { "$first": "$created" }, "message": { "$first": "$message" }, "to": { "$push": "$to" } }} // Sort the results "correctly" { "$sort": { "to.updated": -1 } } ],function(err,messages) { }); Or you can avoid using $unwind and $group by applying some logic with the $map operator in MongoDB 2.6 or greater. Just watching that your array contents are "truly" unique as $setDifference is applied to the resulting "filtered" array: Models.Message.aggregate([ { "$match": { "to": { "$elemMatch": { "username": "user2", "section.archive": true } } }}, { "$project": { "created": 1, "message": 1, "_id": 1, "to": { "$setDifference": [ { "$map": { "input": "$to", "as": "el", "in": { "$cond": [ { "$and": [ { "$eq": [ "$$el.username", "user2" ] }, "$$el.section.archive" ] }, "$$el", false ] } } }, [false] ] } }}, { "$sort": { "to.updated": -1 } } ],function(err,messages) { }); Or even using $redact: Models.Messages.aggregate([…
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38240706

http://stackoverflow.com/q/24588077
score: 0
answer count: 1
tagged with: charts
has title: Google Charts: 'undefined is not a function' when adding hAxis-options
accepted answer: http://stackoverflow.com/a/24588490
tagged with: api
type: AnsweredQuestion
tagged with: google-visualization
tagged with: javascript
has body: I've got Google Charts up and running, and it's working fine. The only thing is that the line chart Y-axis goes to -20,000, whilst there is no value beneath 0. I tried setting the minValue of both axis to 0, but when I add the 'vAxis'-part, it returns a 'undefined is not a function'. When I leave the 'vAxis'-part out of it, it works just fine... I was hoping anybody could help me with this? var options2 = { 'width': 1920, 'height': 1000, 'chartArea':{ 'left': 70, 'top': 50, 'width': 1700, 'height': 750, }, //'legend':'none', 'curveType': 'function', //'titlePosition':'none', 'backgroundColor':{fill: 'transparent'}, 'title': '', 'lineSize':5, 'hAxis':{ 'minValue':0, 'viewWindowMode':'explicit', 'viewMode':{ 'min': 0, }, 'textStyle':{ 'color':'white', }, }, 'vAxis':{ 'minValue':0, 'maxValue':50000, 'viewWindowMode': 'explicit', 'viewMode':{ 'min':0, 'max':50000, }, 'textStyle':{ 'color':'white', }, }, 'animation':{ 'duration':1000, 'easing': 'out' }, 'pointSize': 15, };
type: Question
has answer: http://stackoverflow.com/a/24588490

http://stackoverflow.com/a/24722543
upvote count: 1
score: 1
has body: Alternatively, you could use a source array containing all digits from 0 to 9, and each time pick and remove one of them from the source: function genNum(){ var arr = [], // target array source = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0], // source array sourceLen = source.length, i, r; for (i=0; i&lt;4; i++) { r = Math.floor(Math.random()*(sourceLen-i)); // pick a random index // remove it from the source and add it to the target arr.push(source.splice(r, 1)[0]); } // return it return arr; } Read more about the .splice method on MDN.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24722489
accepted answer of: http://stackoverflow.com/q/24722489
type: Answer

http://stackoverflow.com/a/24691343
accepted answer of: http://stackoverflow.com/q/24691312
type: Answer
answers question: http://stackoverflow.com/q/24691312
downvote count: 0
has comment: http://stackoverflow.com/comment/103301939
has body: Try to use JSON.stringify $.ajax({ data: JSON.stringify(data) });
score: 5
has comment: http://stackoverflow.com/comment/38438084
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/comment/38367807
type: QuestionComment
score: 0
has text: @aayushshrestha I tried to do that, it didn't work. if i try to type in one search box, the other box losses its functionality. There is some problem with keyup() function that i am using. do you have any idea about it?
comment on: http://stackoverflow.com/q/24733256
type: Comment

http://stackoverflow.com/q/24588346
score: -2
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/24588402
has body: I want to change class="active" dynamically. when I click a link on otherlink.aspx then it should become active link. and when I click on default.aspx link then that should become class = "active". Home Founder Principal Sub-Principal Departments Departments Courses Please suggest me how should i do that?
upvote count: 0
has title: Change css class dynamically
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24588626
has answer: http://stackoverflow.com/a/24588430
tagged with: css
has comment: http://stackoverflow.com/comment/38091946
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24588402
downvote count: 2
possible better answer: http://stackoverflow.com/a/24588430
type: Question
has comment: http://stackoverflow.com/comment/38091964
has comment: http://stackoverflow.com/comment/38092048

http://stackoverflow.com/comment/38115963
score: 0
has text: Please refer to this tutorial https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide Read all of it - it is very helpful
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24600772

http://stackoverflow.com/q/24626711
upvote count: 1
has title: Javascript API: Function outside of scope
has answer: http://stackoverflow.com/a/24626772
type: AnsweredQuestion
has body: I am a getting the following error: SyncNavigationSetCssToState is not defined $(function () { var NavigationSetApi = { SyncNavigationSetCssToState: function (navigationSet) { var navigationSetContent = navigationSet.find(".navigation-set-content"); var navigationSetHeaderButton = navigationSet.find(".navigation-set-header-button"); if (navigationSetContent.is(":visible")) navigationSetHeaderButton.removeClass("closed").addClass("open"); else navigationSetHeaderButton.removeClass("open").addClass("closed"); }, GetAllNavigationSets: function () { return $(".navigation-set"); }, SyncAllNavigationSetCssToState: function () { this.GetAllNavigationSets().each(function () { SyncNavigationSetCssToState($(this)); }); } } NavigationSetApi.SyncAllNavigationSetCssToState(); } I can't work out how I can get access to SyncNavigationSetCssToState from within the each() function within SyncNavigationSetCssToState. How can I reference the main api object from here please?
score: 1
possible better answer: http://stackoverflow.com/a/24626772
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/24626757
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38166299
favorite count: 0
accepted answer: http://stackoverflow.com/a/24626757

http://stackoverflow.com/a/24636453
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4
accepted answer of: http://stackoverflow.com/q/24635583
has body: You have to reference the appropriate version of JQuery that you have in your Scripts folder.
answers question: http://stackoverflow.com/q/24635583
upvote count: 4

http://stackoverflow.com/comment/38532568
has text: I will suggest you to use as directive and write all the common code for chart inside that directive. Then, add attribute as additional function. So, your chart directive should looks like or . Then you can use angular restrict on attribute to add different function to directive.
score: 0
comment on: http://stackoverflow.com/q/24743393
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38388657
comment on: http://stackoverflow.com/q/24733903
has text: To "open popup youself" is get the XUL panel element of his popup and then initiate [`openPopup`](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/openPopup), this page shows that you can pass an anchor element to this `openPopup` function.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38226758
type: AnswerComment
has text: Very interesting. I've never seen this cite before either, this is awesome. It did make some difference, yet hardly. I guess there isn't anything substantially wrong about doing this, but I get this uneasy feeling about doing so. I think there's something a little bit more going on, just a little past what we know. I'll be sure to keep checking this out. Sorry for getting a little sour before, I get pretty passionate at times, but I still think that declaring a variable in a loop isn't a good practice unless your absolutely sure what your doing.
type: Comment
comment on: http://stackoverflow.com/a/24638825
score: 0

http://stackoverflow.com/q/24714221
possible better answer: http://stackoverflow.com/a/24714470
downvote count: 2
has title: List all combinations for x length
has answer: http://stackoverflow.com/a/24714470
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38331684
accepted answer: http://stackoverflow.com/a/24714259
upvote count: 1
has comment: http://stackoverflow.com/comment/38330600
has comment: http://stackoverflow.com/comment/38330523
type: Question
tagged with: function
has body: I have created a function that is supposed to list all number combinations for x length. The only problem is that it does nothing and I can't see why. Function: function combos(l) { var o = '', max = '', tmp = '', out = []; for(var i=0;i&lt;l.length;i++) { o+='0'; max+='9'; } max = +max; for(var j=0;j&lt;max;j++) { console.log(o.split('').join(' - ')); tmp = o++; while ((''+tmp).length != l) { tmp = '0' + tmp; } o = tmp; out.push(o); } return out; } The expected output of combos(2) would be: 0 - 0 0 - 1 0 - 2 ... 9 - 7 9 - 8 9 - 9 Along with an array of each entry. Why won't this work?
has comment: http://stackoverflow.com/comment/38335409
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38330487
answer count: 2
has comment: http://stackoverflow.com/comment/38330501
has answer: http://stackoverflow.com/a/24714259
has comment: http://stackoverflow.com/comment/38330533
has comment: http://stackoverflow.com/comment/38330565
favorite count: 0
has comment: http://stackoverflow.com/comment/38330588

http://stackoverflow.com/a/24678801
answers question: http://stackoverflow.com/q/24678433
downvote count: 0
has body: Check out unbind. $('#button').click(function(){ $('#frmLogin').unbind("keypress"); });
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/24612171
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: So I was challenged to make a table that its value is based on search result from Google. I was tasked with three things that's totally new for me: For example, I have the name of Barrack Obama and Abraham Lincoln, when I click on Barrack Obama, the table (with three columns: Number, Page Title, and URL) will be updated according to the Google search result of "Barrack Obama" and when Abraham Lincoln is clicked, the table will be updated again accordingly. I was asked to make the table changeable, must able to swap columns, resize, order it by ascending or descending. and finally, when I click on the URL or any of the list, the result page could appear on the same page (on a reading panel, a different section from the table but still on the same page, let's say it's on the right side section of a webpage), and should be resize-able as well Can somebody give me a pointer or clue on where should I start looking or doing? I was only given clue as using JSON, Jquery, or Google API, but I don't quite sure of the specifics. Any help is appreciated, sorry for the multiple question, I had to since it was related in some way (I think). Thank you for the response!
score: 0
has answer: http://stackoverflow.com/a/24613100
tagged with: google-api
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: How to update table value from Google search result

http://stackoverflow.com/comment/38377820
comment on: http://stackoverflow.com/q/24738541
score: 0
has text: No you can not. see this fiddle http://jsfiddle.net/vpTR6/.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24646309
has comment: http://stackoverflow.com/comment/38203135
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: php
has body: i have tried for a solution on web , i couldn't find any answer still, i followed the below code ., still my data is not going into the database ., this is my controller pages.php <?php class pages extends CI_Controller { function view($page = 'index') { $this->load->view('pages/index'); } function insert_data(){ $data = array( 'name' => $this->input->post('name'), 'email' => $this->input->post('email'), 'message' => $this->input->post('message') ); $this->load->model('contact_model'); $this->contact_model->insert_entry($data); echo json_encode($data); } } ?> this is my view pages/index.php name email message Send this is my model contact_model.php <?php class contact_model extends CI_Model { function insert_entry($data) { $this->db->insert('contactus', $data); } } ?> this is my js file custom.js $("#submit1").on('click',function(){ $.ajax({ url: "<?php echo site_url('pages/insert_data');?>", type: 'POST', data: {"name": $("#name").val(), "email": $("#email").val(), "message": $("#message").val()}, success: function(data) { $("#ack").html(data); } }); });
has title: using codeigniter data is not inserting into the database
score: 1
tagged with: codeigniter
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24646784
has comment: http://stackoverflow.com/comment/38203818
has answer: http://stackoverflow.com/a/24646476
tagged with: javascript
has answer: http://stackoverflow.com/a/24646366

http://stackoverflow.com/q/24686443
favorite count: 0
has comment: http://stackoverflow.com/comment/38278050
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24686535
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: iframe
has title: Setting content of iframe using javascript fails in firefox
has body: I'm trying to set the content of a iframe using javascript. I've the html string. And I'm writing:- var iframe = $('iframe')[0], content = ' test '; $(iframe).contents().find('html').html(content); It works fine in google chrome, but in firefox is shows the content for a moment and the disappears. Please help me to fix it.
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24686535
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/24620975
tagged with: selenium-webdriver
tagged with: selenium
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29268812
has answer: http://stackoverflow.com/a/24623309
has title: Cannot launch Internet Explorer with WebDriverJs in Selenium
has body: I followed the directions at this link: https://code.google.com/p/selenium/wiki/WebDriverJs and was able to get Chrome running. I tried changing this line: var driver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); to: var driver = new webdriver.Builder(). withCapabilities({'browserName':'internet explorer'}). build(); I started my node with: java -jar selenium-server-standalone-2.42.1.jar -ro le node -hub http://localhost:4444/grid/register -Dwebddriver.ie.driver=IEDrive rServer -browser browserName="internet explorer" and it continues to open in Chrome. I'm using IE11 and I know there are some issues with IE11 but I followed the work around with the zone settings and registry key. I cannot seem to even get the browser to launch. Other info: Using Windows 8.1 browser IE11
type: UnansweredQuestion

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/24650427

http://stackoverflow.com/comment/38340783
comment on: http://stackoverflow.com/a/24715654
type: AnswerComment
score: 0
type: Comment
has text: ugh....and what should i do, if i want to modify the data in firebase, like increase quantity.

http://stackoverflow.com/a/24657369
has comment: http://stackoverflow.com/comment/38223931
has body: If you're sure that thumbIndex contains the last filename, you can get away with this: var data = '53bd570ba13ef.jpg,53bd570c964c3.jpg,53bd570d311c9.jpg,53bd570db8997.jpg'; // or $('#images').val() var thumbIndex = '53bd570db8997.jpg'; var result = data.substr(0, data.indexOf(thumbIndex) - 1);
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24657220

http://stackoverflow.com/comment/38134459
type: Comment
comment on: http://stackoverflow.com/a/24609614
has text: Its targetting all the div's last child... but i want the current context childrens last div.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38323197
type: AnswerComment
type: Comment
has text: Thank you for that. Do you recommend another way of directing people on mobile to our mobile website? Making a responsive website would be too much work at the moment I think. I hope there is a way to direct without losing the track of original referrers.
comment on: http://stackoverflow.com/a/24702376
score: 1

http://stackoverflow.com/comment/38317605
has text: @anubhava I never noticed this link of regex101. Thanks next time I'll try to make it lower.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24707168

http://stackoverflow.com/a/24753642
score: 0
has body: The form element can access fields by name, for this purpose you should get the form element. You can do it in many ways, use document.getElementById() or document.forms[], or $("#formid"). Whatever way you choose doesn't matter. Just note that a document can contain many forms, so you should reference a correct one. Getting form element by id returns an element that has an id attribute, getting it by the index in the forms property you should know the correct index. Once you get the form element you can reference input fields by name. For example &lt;form id="formid"&gt; &lt;input name="service"&gt; &lt;/form&gt; &lt;script&gt; var v = document.getElementById("formid")['service']; &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/24732899

http://stackoverflow.com/a/24723161
has comment: http://stackoverflow.com/comment/38537253
has comment: http://stackoverflow.com/comment/38440597
accepted answer of: http://stackoverflow.com/q/24718762
answers question: http://stackoverflow.com/q/24718762
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38359752
has comment: http://stackoverflow.com/comment/38450772
has comment: http://stackoverflow.com/comment/38411325
has comment: http://stackoverflow.com/comment/38518684
type: Answer
has body: You can solve this problem, but it's not a simple case of "add this line to your JavaScript and everything will be fine." You're running up against the same-origin security policy built into every web browser. 'Origin' basically means 'the same site'; my JavaScript on example.com can access whatever it likes on example.com, but it's not allowed to read anything from demonstration.com, example.net, or api.example.com. That's got a different origin. Here's a table of what counts as the same origin. Without it, I could write a web page that steals all your gmail and private Facebook photos. My malicious JavaScript would make web requests to gmail.com and facebook.com, find the links to your emails &amp; photos, load that data too, and then send it off to my own server. Obviously, some web pages are designed to be used by other people. APIs, for instance, generally want to allow access to their data so people can build web apps. The people building those APIs can serve their content with Access-Control- headers that tell browsers it's OK to allow requests from other sites. This is called CORS - Cross-Origin Resource Sharing. The reason you get that error message is because the ctabustracker.com developers haven't added any CORS headers. Thus, you can't access their API from your JavaScript. So what's the solution? you have two options: Email the ctabustracker.com admins and ask them to add CORS headers to allow access from other domains. This is the least work for you, but you're at the mercy of the knowledge, infrastructure, &amp; promptness of their development team. Write your own proxy server. The same-origin policy is only standing in your way in your JavaScript. You can do whatever you like on the server; at its simplest, you could create an apiproxy.php along these lines: $allExceptMethod = $_GET; // PHP arrays are copy-by-value unset($allExceptMethod['method']); $url = "http://www.ctabustracker.com/bustime/api/v1/{$_GET['method']}?key=xx&amp;" . http_build_query…
has comment: http://stackoverflow.com/comment/38369088
has comment: http://stackoverflow.com/comment/38420259
has comment: http://stackoverflow.com/comment/38359672

http://stackoverflow.com/a/24678181
has body: Your binding for the removeFromCart is wrong. It calls the function when you bind, which happens when the cart observable array changes as it is in a foreach binding. Replace click: $parent.removeFromCart($data) With click: $parent.removeFromCart Demo
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24677709
answers question: http://stackoverflow.com/q/24677709
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24696224
linked to: http://stackoverflow.com/q/17768814
has body: As given in the link http://angular-ui.github.io/bootstrap ( select modal from Directive drop down on top), there is a parameter called windowTemplateUrl which is used to over ride the modal content. So, in case we are using this, what to give in templateUrl or template, as one of these is required for calling the open function of modal. For e.g. the code is given below. $scope.open = function(){ var modalInstance = $modal.open({ windowTemplateUrl : '/client/content.html' }) } If I run the code as above, it gives error that templateUrl or template is required. So, how do I use windowTemplateUrl.
has answer: http://stackoverflow.com/a/27686207
has comment: http://stackoverflow.com/comment/38295528
has comment: http://stackoverflow.com/comment/38295493
type: Question
has comment: http://stackoverflow.com/comment/54562016
answer count: 3
has answer: http://stackoverflow.com/a/27601999
tagged with: bootstrap-modal
tagged with: javascript
tagged with: angular-ui-bootstrap
has title: Angular UI Bootstrap modal - use custom modal window
tagged with: angularjs
has answer: http://stackoverflow.com/a/24696315
score: 0
type: UnansweredQuestion

http://stackoverflow.com/q/24692655
has answer: http://stackoverflow.com/a/24692836
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/24693278
has comment: http://stackoverflow.com/comment/38289158
has comment: http://stackoverflow.com/comment/38289233
tagged with: javascript
tagged with: jquery
answer count: 6
has answer: http://stackoverflow.com/a/24692821
has answer: http://stackoverflow.com/a/24692834
possible better answer: http://stackoverflow.com/a/24692776
has comment: http://stackoverflow.com/comment/38289284
has answer: http://stackoverflow.com/a/24692776
has title: How to highlight an image after selection using css or jquery?
tagged with: http://stackoverflow.com/tag/html
has body: I have multiple images in a page that is selectable by user. User can select any image by simply click on that image. One solution would be to add border to that image but border is already applied on all images. How can i highlight that image after selection? In particular, how can i highlight selected image using css or jquery?
favorite count: 0
upvote count: 8
has answer: http://stackoverflow.com/a/24693278
tagged with: css
has answer: http://stackoverflow.com/a/24692876
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38289096
score: 7

http://stackoverflow.com/comment/38248232
comment on: http://stackoverflow.com/q/24670798
has text: JSBin is great as a supplement, but please add all relevant code here too, just in case JSBin doesn't exist in the future :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24632713
has body: I currently have the following code: When I try to add a fourth column I add in But this gives me the fourth column under the first. Although I specified right align. How do I get the fourth column in? Also I tried putting in a empty line in my code. So I did the following : myTable+=" " + myArray[i] + " "; But this gave me empty lines before my heading? In conclusion my two questions are, how do I get the fourth column and an empty line.
has title: Having trouble adding column 4 and empty line
score: 0
accepted answer: http://stackoverflow.com/a/24633073
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38177587
has comment: http://stackoverflow.com/comment/38177290
tagged with: javascript
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/24633073

http://stackoverflow.com/comment/38334748
has text: The length of the audio file is 10 ms.
comment on: http://stackoverflow.com/q/24715986
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38340577
type: Comment
has text: Don't be afraid to make your code more readable by indenting it properly. Also, what's the problem with the code? Why you think it needs to be "corrected"?
score: 0
comment on: http://stackoverflow.com/q/24719273
type: QuestionComment

http://stackoverflow.com/q/24590194
has comment: http://stackoverflow.com/comment/38095644
has answer: http://stackoverflow.com/a/24590244
type: Question
has body: I have some simple jQuery to change the text of a button once it's clicked Upload $uploadButton.click(function(){ $(this).text('please wait').attr("disabled", "disabled"); }); The trouble is it seems doing this blocks default behavior (a form submission, which I still want to happen). Is there a way to make sure the default behavior is preserved or an alternate way to do what I'm trying above that would work?
has comment: http://stackoverflow.com/comment/38095654
tagged with: javascript
score: 0
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/24590226
has title: Change button text but preserve default behavior
linked to: http://stackoverflow.com/q/1414365
has answer: http://stackoverflow.com/a/24590241
accepted answer: http://stackoverflow.com/a/24590241
possible better answer: http://stackoverflow.com/a/24590244
type: AnsweredQuestion

http://stackoverflow.com/a/24694897
has body: See this Sample : http://jsfiddle.net/S7n2b/84/ I have give the id for each li Home DropDown 1 $('#d1').hover( function(){ $('#content1').fadeIn(); $('#content2').fadeOut(); } ); $('#d0').hover( function(){ $('#content1').fadeOut(); $('#content2').fadeOut(); } ); $('#d2').hover( function(){ $('#content1').fadeOut(); $('#content2').fadeIn(); } ); $('#nav_menu').hover( function(){ },function(){ $('#content1').fadeOut(); $('#content2').fadeOut(); } );
has comment: http://stackoverflow.com/comment/38293897
answers question: http://stackoverflow.com/q/24693835
score: 0
type: Answer

http://stackoverflow.com/q/24740927
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24741065
favorite count: 0
possible better answer: http://stackoverflow.com/a/24740950
duplicate of: http://stackoverflow.com/q/3250685
has answer: http://stackoverflow.com/a/24740950
has comment: http://stackoverflow.com/comment/38381755
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: JS: $( '.copydump' ).click(function(){ var cp = $('.copy'); $('.bin').html( $(cp).html() ); }); HTML cows I need to take a complete copy of some dynamic content but with the new values of the form elements. The above js will only move the form as it loaded up, ie the old form values. In this jsFiddle, if you alter the content from 'cows' then press 'go' you will see what i mean. I know I can query the value of the textarea before moving the content, but does anyone know an automated way within jQuery to do this?
has title: jQuery not returning edited HTML
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24741065
has comment: http://stackoverflow.com/comment/38381937
linked to: http://stackoverflow.com/q/3250685
tagged with: forms
score: 0

http://stackoverflow.com/comment/38127021
comment on: http://stackoverflow.com/q/24606364
type: QuestionComment
type: Comment
has text: ok, if the only difference between the script which _does_ print rows and this one is that you now let it output javascript, you should 1) see the javascript if you look in the document source and 2) most probably there is something wrong with your javascript... As for a starter, the first line in the while loop you omit the last parameter of the `dTree.add` function. Fix that, then create us a fiddle of the javascript output.
score: 0

http://stackoverflow.com/comment/38262117
has text: Hi ADENEO, thanks at first! >This works, but only for the first numbers... now n all numbers the ";" is gone, but the first two numbers are still there (only first numbers "999.99 999.99 -999.99" are perfekt.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24677812
type: Comment

http://stackoverflow.com/comment/38153760
score: 0
type: Comment
has text: Thank you for the prompt response. Your solution will ultimately be what I use, but I also discovered that my code worked if I added window. to each variable in the addition line. So it read window.var3 = window.var1 + window.var2;
comment on: http://stackoverflow.com/a/24619876
type: AnswerComment

http://stackoverflow.com/a/24708298
has comment: http://stackoverflow.com/comment/38319579
score: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38320114
accepted answer of: http://stackoverflow.com/q/24708257
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/24708257
has comment: http://stackoverflow.com/comment/38319737
has body: You can use something like this (?:.*\n){2}.{6}\s+(\w+) Where this would get word of line 2+1 starting at character 6+1. Edit: Figured I'd robustify it a bit. The above fails to match anything if you provide a character-index in the middle of a word. The following will skip ahead untill the start of a word before it starts capturing: (?:.*\n){2}.{6}.*?\b(\w+)\b. PS: Regex in javascript doesn't support positive lookbehind, so skipping back to the start of the word is quite a bit trickier. Edit2: Making the string.replace work requires us to capture the other parts of the string. This seems to do the trick: text.replace(/((?:.*\n){2}(?:.{6}.*?))\b(\w+)\b((?:.*\n?)*)/g, "$1[the-replacement]$3") but it does complicate things. It might be better to use the more direct approach in this case. Simplicity is king!
downvote count: 0

http://stackoverflow.com/comment/38248783
comment on: http://stackoverflow.com/q/24654704
has text: @Juffy Hello Juffy, I changed the question already. Do help me take a look when you free.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/24693595
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24693610
has title: Variable scope in loops
accepted answer: http://stackoverflow.com/a/24693633
answer count: 3
has comment: http://stackoverflow.com/comment/38290597
favorite count: 0
has comment: http://stackoverflow.com/comment/38290605
has answer: http://stackoverflow.com/a/24693627
score: 2
type: AnsweredQuestion
upvote count: 3
has body: I am a bit confused http://jsfiddle.net/ { for (var counter = 1; counter &lt; 6; counter++) { } } console.log(counter); If variables from loops are available in the scope the for loop is created, then why do I have access to the variable one level higher, since I created another scope by putting those brackets?
has answer: http://stackoverflow.com/a/24693610
has comment: http://stackoverflow.com/comment/38290582
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24693633

http://stackoverflow.com/comment/38349890
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24724257
has text: `innerHTML` will never return `NaN`, it's always a string. You have to try to parse it first, and that will return `NaN` if it's not a numeric string.

http://stackoverflow.com/comment/39467072
score: 0
has text: A month have passed... :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24699086

http://stackoverflow.com/q/24595809
has body: I have a web application that used textareas and buttons to gather data that is processed (calculations, filtering and concatenation into a string) into an array. The buttons and textareas are part of a form. This array can grow up to several hundred entries. This data is also displayed to the screen by setting innerhtml to a div, this data is highlighted at key points using with italic and color. I was using some Javascript to make a mailto link and write this to a div so that the user could email the data. The problem is that this mailto will only work if a mail client is set up on the machine, it will not work for a webmail system. I have made a textarea in the form and using some javascript onsubmit() I write the array to this text area after joining the array together with \n , submit then posts the form to a PHP script on the server that then emails the data. The text area is deliberately small as it has no use other than acting as a go between and I do not want it to take up space and be a distractionon an already cluttered screen. Reading around it appears that should I have in an attempt to not pollute my screen display:none for this go between textarea that some browsers will not let this non displayed textarea be posted to the PHP script as part of the form. Have I any other way of sending this array data to a PHP script? I could make the textarea very small, have no border, background and text color the same white and tuck it away, make it read only but that seems very clunky. I would appreciate suggestions. Many thanks.
tagged with: php
has comment: http://stackoverflow.com/comment/38106843
tagged with: forms
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24595850
answer count: 1
has title: posting data that is not an input field or a form, looking for a way to submit calculated data
type: UnansweredQuestion

http://stackoverflow.com/comment/38272575
has text: Are you actually asking about `CName`, not `carrName`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24683569

http://stackoverflow.com/q/24685152
answer count: 2
possible better answer: http://stackoverflow.com/a/24685327
tagged with: algorithm
has answer: http://stackoverflow.com/a/24685327
tagged with: javascript
has comment: http://stackoverflow.com/comment/38276079
has answer: http://stackoverflow.com/a/24685350
linked to: http://stackoverflow.com/q/237104
has body: Hi! I have an interesting problem. I have drawn in a HTML canvas a series of hexagons (ignore the dots) For each hexagon I have it's x and y coordinates of their center, that's how I identify them. I store the hexagons in an array called hexagons where I store Hexagons function Hexagon() { this.shape this.x this.y } I have a function that returns an object with all the adjacent hexagons of a given hexagon function get_adjacent_hexagons(hexagon) { var x = hexagon.x var y = hexagon.y var adjacents = [] for(var i=0; i&lt;editor_hexagons.length; i++) { if(editor_hexagons[i].x === x &amp;&amp; editor_hexagons[i].y == y - (2*s)) { adjacents.push(editor_hexagons[i]) } if(editor_hexagons[i].x === x &amp;&amp; editor_hexagons[i].y == y + (2*s)) { adjacents.push(editor_hexagons[i]) } if(editor_hexagons[i].x === x - (s*1.5) &amp;&amp; editor_hexagons[i].y == y - s) { adjacents.push(editor_hexagons[i]) } if(editor_hexagons[i].x === x - (s*1.5) &amp;&amp; editor_hexagons[i].y == y + s) { adjacents.push(editor_hexagons[i]) } if(editor_hexagons[i].x === x + (s*1.5) &amp;&amp; editor_hexagons[i].y == y - s) { adjacents.push(editor_hexagons[i]) } if(editor_hexagons[i].x === x + (s*1.5) &amp;&amp; editor_hexagons[i].y == y + s) { adjacents.push(editor_hexagons[i]) } } return adjacents } Given this information, is it possible to make an algorithm to check if all the hexagons are connected That is if there is no hexagon or group of hexagons on their own? For example in the picture provided they are all connected. ----- EDIT ----- This seems to be working function check_connection() { visited = [] visit_hexagon(hexagons[0]) } function visit_hexagon(hexagon) { var not_visited = true for(var i=0; i&lt;visited.length; i++) { if(visited[i] === hexagon) { not_visited = false break } } if(not_visited) { visited.push(hexagon) var adjacents = get_adjacent_hexagons(hexagon) for(var i=0; i&lt;adjacents.length; i++) { visit_hexagon(adjacents[i]) } } }
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38275911
has comment: http://stackoverflow.com/comment/38275805
accepted answer: http://stackoverflow.com/a/24685350
upvote count: 1
has comment: http://stackoverflow.com/comment/38275890
type: AnsweredQuestion
score: 1
has title: Check If All Tiles Are Connected
has comment: http://stackoverflow.com/comment/38280811
type: Question

http://stackoverflow.com/comment/38288064
type: QuestionComment
has text: yap actually this is the response header of credentials 'Access-Control-Allow-Credentials:true' but it does not send the JSESSIONID as firefox does
score: 0
comment on: http://stackoverflow.com/q/24691699
type: Comment

http://stackoverflow.com/comment/38095827
type: Comment
comment on: http://stackoverflow.com/a/24590219
type: AnswerComment
has text: so i remove the set values then replace `map = new google.maps.Map(document.getElementById('map'), myOptions);` with your suggestion?
score: 0

http://stackoverflow.com/comment/38471984
comment on: http://stackoverflow.com/a/24749301
score: 0
type: AnswerComment
has text: Thanks, one last question: some image urls that I'm getting are base64 encoded data strings. data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ... and when that's the case browser throws an error saying XMLHttpRequest cannot load data:image, cross origin requests are only supported for HTTP. How do I download those images?
type: Comment

http://stackoverflow.com/comment/38176555
type: Comment
type: QuestionComment
score: 0
has text: The click handlers are working fine! When I put a console.log in before the $.getJSON request, I can see a log to the console. When I look at the Network tab in Chrome Dev Tools, I see my file as GET request, so it's picking up my file, it's just not alerting anything after it gets it.
comment on: http://stackoverflow.com/q/24631863

http://stackoverflow.com/comment/38359470
type: Comment
comment on: http://stackoverflow.com/q/24728736
score: 0
has text: You must know what is `csrf` XD see here https://github.com/balderdashy/sails-docs/blob/08b3b7b0b3b8652d23ee449ac79278d711075365/config.csrf.md
type: QuestionComment

http://stackoverflow.com/comment/53513642
has text: @Antoine: I published v3.1.0 last night which re-introduced `document.l10n.requestLanguages()`.
comment on: http://stackoverflow.com/a/24666060
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38166720
score: 0
comment on: http://stackoverflow.com/a/24598143
type: AnswerComment
has text: Still the same, works via a web browser but not via the app once built by phonegap. I assume this is something which is possible via android?! Or am I just being totally dumb?
type: Comment

http://stackoverflow.com/a/25995372
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24734812
upvote count: 1
type: Answer
has body: As stated in this answer: Grunt server does not use virtual host name for my app..vhost and httpd are set up but grunt is not using them The hostname option is only used to specify where livereload should connect to. This doesn't change the default url which is opened when you start Grunt. What you need is to specify a URL for open in your livereload options. For example: livereload: { options: { open: 'http://myapp.dev:9000', base: [ '.tmp', '&lt;%= yeoman.app %&gt;' ] } }

http://stackoverflow.com/comment/38219143
has text: could you be more specific please? I don't know how to use the $apply() function.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24653876

http://stackoverflow.com/a/24623535
has comment: http://stackoverflow.com/comment/38160560
downvote count: 0
has body: The best thing, if you want to load the HTML code dynamically when click on a button is to use AJAX. Here are the steps you may consider. Keep the dynamic content in a separate .ASPX or .HTML file. In Main file, keep a button and call the script. The script should call the AJAX method to the earlier created page. Display the output anywhere (prefer take some DIV and fill its innerHTML) Alternately, You can check the IsPostBack method and check whether the server side control innerHTML is blank or not and fill it up (without using AJAX).
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24623365
has comment: http://stackoverflow.com/comment/38160498
score: 1

http://stackoverflow.com/a/24668771
has body: You should make 2 separate controllers and push the shared logic into a service. Then injected the shared logic service into both controllers. Hope this helps.
answers question: http://stackoverflow.com/q/24668728
has comment: http://stackoverflow.com/comment/38267296
has comment: http://stackoverflow.com/comment/38283754
upvote count: 2
has comment: http://stackoverflow.com/comment/38268703
has comment: http://stackoverflow.com/comment/38245709
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/38138928
comment on: http://stackoverflow.com/a/24612632
has text: `distance` as 214 returns `1.0666666666666667`. You need some rounding of some sort.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38301335
comment on: http://stackoverflow.com/q/24699241
score: 2
has text: new Date("2014-07-24 17:35:00" * 1000) -> Invalid Date
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38240202
has text: Just tested it again. console.log(tweets) works. It's the console.log(result) that doesn't work, which is why I posted that part of the code. There must be a problem with it, but I don't know what.
comment on: http://stackoverflow.com/q/24665820
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38159820
type: QuestionComment
type: Comment
has text: @user3657302 : yes both sessions are same..
comment on: http://stackoverflow.com/q/24616189
score: 0

http://stackoverflow.com/q/24597943
type: Question
has comment: http://stackoverflow.com/comment/38110289
has comment: http://stackoverflow.com/comment/38111388
tagged with: javascript
has title: jQuery click function not triggering
has comment: http://stackoverflow.com/comment/38110491
tagged with: jquery
has comment: http://stackoverflow.com/comment/38115506
has comment: http://stackoverflow.com/comment/38110313
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38110735
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38112354
has body: I am trying to integrate a bootstrap layout into my angular.js project. I have added the bootstrap.js and bootstrap.css and the layout custom CSS and JS. my project have jquery added to it. The problem that I am facing is that a click handler is not being triggered. this is my code: $(document).ready(function () { alert('ready'); $('[data-toggle="offcanvas"]').click(function () { alert('click'); $('.row-offcanvas').toggleClass('active') }); }); a popup with "ready" popups at each page refresh however when i click the button that has the attribute data-toggle="offcanvas" nothing pops up. I have even tried to ad an id attribute to the button and target the button in jquery as follows with no success: $('#toggleButton').click(....); the button is html looks like the following: Toggle nav what seems to be going wrong? Thanks in advance.
tagged with: twitter-bootstrap-3
answer count: 0
score: 0

security
tags question: http://stackoverflow.com/q/24680302
tags question: http://stackoverflow.com/q/24646313
tags question: http://stackoverflow.com/q/24694665
tags question: http://stackoverflow.com/q/24605361
tags question: http://stackoverflow.com/q/24654589
tags question: http://stackoverflow.com/q/24739519
tags question: http://stackoverflow.com/q/24644330
tags question: http://stackoverflow.com/q/24707214
tags question: http://stackoverflow.com/q/24622588
tags question: http://stackoverflow.com/q/24617452
type: Tag
tag name: security

http://stackoverflow.com/a/24636137
type: Answer
has body: jQuery ($) is not defined, so : it might not be loaded at all it might be loaded after the signalIR file you might be using noConflict
answers question: http://stackoverflow.com/q/24635583
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/24656805
has answer: http://stackoverflow.com/a/25224086
favorite count: 0
has comment: http://stackoverflow.com/comment/38223192
has comment: http://stackoverflow.com/comment/38223502
tagged with: breeze
has comment: http://stackoverflow.com/comment/38233069
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25207120
has comment: http://stackoverflow.com/comment/38222690
has title: Spin icon freezes while loading records
has comment: http://stackoverflow.com/comment/38230133
score: 14
has answer: http://stackoverflow.com/a/25206587
has comment: http://stackoverflow.com/comment/39254918
has comment: http://stackoverflow.com/comment/38222860
has comment: http://stackoverflow.com/comment/39255457
linked to: http://stackoverflow.com/q/1124149
type: Question
tagged with: http://stackoverflow.com/tag/gif
upvote count: 16
has comment: http://stackoverflow.com/comment/39256702
tagged with: javascript
has comment: http://stackoverflow.com/comment/38223019
has comment: http://stackoverflow.com/comment/38223411
has comment: http://stackoverflow.com/comment/38223096
has comment: http://stackoverflow.com/comment/39104534
downvote count: 2
answer count: 3
has body: I am trying to load records using breeze. While loading record i am showing spin icon. But somehow spin icon seems to stop while records are being loaded in grid. Here is my html here is my code to load image isSpinning(true) context.getData(name, records).then(function (data) { isSpinning(false); setTimeout(function () { isSpinning(false); }, 300); }) .fail("Record not found"); Update1 I tried below code as per answer but nothing happens. I also included css. But cant see anything.
linked to: http://stackoverflow.com/q/12133577
has comment: http://stackoverflow.com/comment/39256884
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38228450

http://stackoverflow.com/q/24734152
has body: I need to update the form divs after an ajax was successfully called via jQuery. There're some form elements on my page. And I'd like to fill it with the values sent back from ajax call. Which is in json format. While #inst_name is an input[type=text] in which doing 2 things. As an autocomplete input via jquery autocomplete. As a name reference for mysql query in this script. HTML : Bangkok Chiang Mai Samui Phuket Dep 1 Dep 2 Dep 3 jQuery : $('#inst_name').keyDown(function(){ $.ajax({ url: 'inc/form_institute.json.php', dataType:'json', data: {name:$('#inst_name').val()}, success: function(data){ $('#inst_addr').html(data.addr); $('#inst_prov').val(data.prov); $('#inst_zip').val(data.zip); $('#inst_tel').val(data.tel); $('#inst_fax').val(data.fax); $('#inst_dep').val(data.dep); } }); }); JSON : { "addr":"123/4 Kitty Ave.", "prov":"80", "zip":"12345", "tel":"0753245675", "fax":"075123456", "dep":"2" }
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42177540
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/24734353
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/38368961
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: How to update multiple form elements with ajax call

http://stackoverflow.com/comment/38689442
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24600409
has text: You can try to store ids or text of expandedparentgrid in hiddenfield and manually set them expanded after post back.

http://stackoverflow.com/q/24613524
has body: I've noticed that HTML number fields change value when the mouse scrolls within the field. I would like to disable this (ideally without JS). I've found this Disable scrolling on `&lt;input type=number&gt;` but again I would like to accomplish this without any JS. Is there an HTML tag or setting I can use to disable this functionality? Ideally I would like to keep the field as a number as well. Thanks for your help.
has comment: http://stackoverflow.com/comment/38140677
type: Question
duplicate of: http://stackoverflow.com/q/9712295
upvote count: 1
linked to: http://stackoverflow.com/q/7571370
has comment: http://stackoverflow.com/comment/38140853
has comment: http://stackoverflow.com/comment/38140799
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/38146376
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38140671
has title: HTML Number Field Increases/Decreases With Mouse Scroll
linked to: http://stackoverflow.com/q/9712295
duplicate of: http://stackoverflow.com/q/7571370
score: 1
favorite count: 0

http://stackoverflow.com/comment/38197882
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24642893
has text: okay so i figured out how to make the div id unique by adding a guid as such: <div id="a+<%=Guid.NewGuid().ToString() %>"><%#Container.DataItem("PONumber")%> but how do i pass this to javascript? <div id="a+<%=Guid.NewGuid().ToString() %>"><%#Container.DataItem("PONumber")%>
score: 0

http://stackoverflow.com/q/24643139
tagged with: javascript
has comment: http://stackoverflow.com/comment/38197218
linked to: http://stackoverflow.com/q/17731457
has body: I want to create a simple website page that allows my users to flip through a few different sets of data (kind of like mini-pages) but without reloading the page. The data could all be preloaded or requested with Ajax for each selection. I tried using Bootstrap to create Tabs, but the first screen would never disappear. I'm not aware of any other way to do this, other than with complicated Javascript that sets visibility to invisible. Are there any clean, convenient, HTML/CSS-only ways to go about this? Below, are some prototype screenshots of what the page would look like, and how it changes with each sidebar selection.
has comment: http://stackoverflow.com/comment/38197252
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: How to create page with multiple pages of data that can be toggled via a sidebar?
type: Question
has answer: http://stackoverflow.com/a/24643297
answer count: 2
has answer: http://stackoverflow.com/a/24643686
tagged with: user-interface

http://stackoverflow.com/q/24623705
has body: I use $(document).ready to fire the event. However, it works fine with IPHONE4S and IPHONE5S(both runs 7.1.1). But on IPHONE5(7.1.1), it doesnt fire at all. When i change to window.onload, all work fine. This confused me as all the IPhones are running exactly the same iOS. Why only IPHONE5 doesn't work with $(document).ready? Is this a bug of JQuery or iOS? $(document).ready( function(){ alert("fired"); }); window.onload=function(){ if(navigator.userAgent.match(/iPhone/i)) alert("fired"); }
answer count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/24623785
has comment: http://stackoverflow.com/comment/38160792
has title: JQuery event $(document).ready doesn't fire with mobile safari on IPhone 5
upvote count: 4
type: AnsweredQuestion
tagged with: ios
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
score: 3
has comment: http://stackoverflow.com/comment/38160738
has answer: http://stackoverflow.com/a/24623785
has comment: http://stackoverflow.com/comment/38160978

http://stackoverflow.com/comment/38286860
comment on: http://stackoverflow.com/a/24691117
type: AnswerComment
has text: Yes finally figured that out, was about to come back and tell you.
score: 0
type: Comment

http://stackoverflow.com/q/24642988
score: 4
has answer: http://stackoverflow.com/a/24645529
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Make ordered bootstrap column float at top of screen
tagged with: css
has comment: http://stackoverflow.com/comment/38200517
has comment: http://stackoverflow.com/comment/38199876
type: Question
has comment: http://stackoverflow.com/comment/38227317
has body: I have a tricky little problem I can't wrap my head around. Please see http://jsfiddle.net/KKczd/ for reference. Scenario: I have two bootstrap ordered columns: On large screens, they sit next two each other, on smaller screens the one on the right flows above the left column. Header section ... ... This basic layout and functionality works perfectly. Goal: For large screens, when the page scrolls down, I want the right column to stay on the top of the page at all times. For small screens, I want the right column (now the first row) to stay on top with content scrolling underneath it as the content scrolls up. Problem: I've written some javascript that only seems to make the right column get lower and lower - and it has no impact on the section on smaller screen widths - except some magical disappearing. I have played with offset, and resetting offset, I have also tried using some css positioning but it just gets hackier and hackier. Also, I'm trying to use as many default bootstrap styles as possible, and as few positioning hacks as possible. Is this even possible to do?
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24703685
type: Answer
downvote count: 0
score: 1
has body: by jquery you can do this: $("#inputID").submit(function(e){ e.preventDefault(); ...do whatever you want... });
upvote count: 1
answers question: http://stackoverflow.com/q/24703584

http://stackoverflow.com/q/24690230
tagged with: angularjs-ng-repeat
favorite count: 0
has comment: http://stackoverflow.com/comment/38285303
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38286606
has comment: http://stackoverflow.com/comment/38285467
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38285515
has title: How to sort this numeric array in foreach in angularjs?
has body: I have the following scope in controller: for(x = 1; x <= 15; x++) { x = parseInt(x); Scope.numArr[x] = x; } And in the view, I have the following dropdown box using above Scope "numArr", Print options I am hitting my head against the wall for not able to sort this simple array. As mentioned in Angularjs doc, it's integer array and not string type. What is the simplest Angular expression to show the values in natural order like 1,2,3,4,5...15. Currently, Angularjs automatically sorts and shows the dropdown box as 1, 11,12... 15, 2,3..etc. In PHP or Python, if I utilize the above array, I will have the dropdown in the same order I specified in the array and no headache. Here in AnguarJs, things are bizarre. This statement is just to make it clear that things should be as simple as possible which is what programmers like. I strongly believe AngularJS team has over complicated this simple diplay of array values into an automatically natural-sorted list in dropdown box. It would be great if the team keeps things as simple as possible. Any help is greatly appreciated.
score: -5
has answer: http://stackoverflow.com/a/24690576
type: Question
has answer: http://stackoverflow.com/a/24690363
linked to: http://stackoverflow.com/q/12139152
has answer: http://stackoverflow.com/a/24691111
upvote count: 0
linked to: http://stackoverflow.com/q/19287716
downvote count: 5
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/38285427

http://stackoverflow.com/comment/38365316
comment on: http://stackoverflow.com/q/24728512
type: Comment
type: QuestionComment
has text: I'm not sure whether that's [bug 265895](https://bugzilla.mozilla.org/show_bug.cgi?id=265895) or [bug 575470 ](https://bugzilla.mozilla.org/show_bug.cgi?id=575470). Your only option is to download the source code of Firefox and fix the bug or pay someone else to do so.
score: 0

http://stackoverflow.com/q/24744311
favorite count: 0
accepted answer: http://stackoverflow.com/a/24744377
answer count: 3
linked to: http://stackoverflow.com/q/28422752
has answer: http://stackoverflow.com/a/24744377
tagged with: angularjs
has body: I'm creating a AngularJS directive that is supposed to have a C3.js-based chart in it. Problem is that the C3 library does not see the DOM element it's supposed to attach to. The directive's link function looks something like this: link: function(scope, element, attrs) { scope.someid = 'id'; scope.chart = c3.generate({ bindto: "#somechart"+scope.someid, data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250], ['data2', 50, 20, 10, 40, 15, 25] ] } }); console.log($("#somechart"+scope.someid).size()); // this is a test, outputs 0 } The template for the directive has this in it: &lt;div id="#somechart{{ scope.someid }}"&gt;...&lt;/div&gt; The problem is that the c3.generate()'s bindto does not see the #somechartid. The console.log() I've put in outputs 0 which means the element is not present in the DOM at the moment when the link function is called. If I call the same chart-generating code from the browser's console or even from some ng-click the chart gets rendered. Is there a way to overcome this problem without using a solution like $timeout? UPDATE 2014-07-15 15:33 Changed the code sample and added relevant line from directive's template.
has comment: http://stackoverflow.com/comment/38388684
score: 6
has comment: http://stackoverflow.com/comment/38416524
has answer: http://stackoverflow.com/a/24744671
has comment: http://stackoverflow.com/comment/38404172
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/79864391
has answer: http://stackoverflow.com/a/24744893
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/24744671
type: Question
upvote count: 6
tagged with: javascript
has title: DOM elements not ready in AngularJS Directive's link() function
linked to: http://stackoverflow.com/q/12240639
has comment: http://stackoverflow.com/comment/38408599

http://stackoverflow.com/comment/38149087
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24617433
type: Comment
has text: My project is really big from my college. And I've update again..,

http://stackoverflow.com/comment/38103633
type: Comment
type: QuestionComment
has text: @AmalMurali you forgot a `+` after the second `\S`. And with the new tlds I guess something like `name@mailcomp`, without any dot in the domain name is not unlikely.
score: 0
comment on: http://stackoverflow.com/q/24594108

http://stackoverflow.com/a/24661970
has body: The best answer to this is to stay away from using inline scripts. It is best to add event listeners using the DOM to keep everything clean. To answer the question, you can return false; to stop the event from propagating to the li element. Similarly if you bind the event to the DOM, you can stop the propagation using the event object: function myClickHandler(evt) { //do stuff evt.preventDefault(); evt.stopPropagation(); return false; }
answers question: http://stackoverflow.com/q/24661867
score: 0
type: Answer

http://stackoverflow.com/q/24668296
possible better answer: http://stackoverflow.com/a/24668389
answer count: 4
accepted answer: http://stackoverflow.com/a/24668388
has title: Build select options based on JSON result
has comment: http://stackoverflow.com/comment/38243592
has answer: http://stackoverflow.com/a/24668388
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24668447
has comment: http://stackoverflow.com/comment/38243645
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/24668389
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/24668393
has body: I have this JSON: { "message":"", "entities":[ { "city":"1", "state":"VE.01", "country":"VE", "name":"Maroa" }, { "city":"2", "state":"VE.01", "country":"VE", "name":"Puerto Ayacucho" }, { "city":"3", "state":"VE.01", "country":"VE", "name":"San Fernando de Atabapo" } ] } I need to build a select options based on city and name results. I have the empty HTML select: Select a city And, maybe I'm wrong, but I can move from the result (stored in data.entities javascript var) as follow: $each.(data.entities, function(){ // here I should build the options }) But I don't know where to go from there, can any give me some push or advice? This is how the select#city should be: Select a city Maroa Puerto Ayacucho San Fernando de Atabajo Clean SELECT before append new values All the answers works as I want but see my code: $(".state").change(function() { state = $('.state option:selected').val(); $.get(Routing.generate('cities') + '/VE/' + state).success(function(data) { if (data.message) { message = data.message; } else { $.each(data.entities, function(i, d) { $('#city').append(' ' + d.name + ' '); }); } }).error(function(data, status, headers, config) { if (status == '500') { message = "No hay conexión con el servidor"; } }); }); I need to clean the SELECT but leaving the default option Select one before append the new values, how I do that?

http://stackoverflow.com/q/24589189
favorite count: 0
tagged with: parse-platform
type: UnansweredQuestion
has title: Image is shown in pop up box correctly, but when saving returns an undefined error. Why?
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/24593481
has body: Using parse.com and JS SDK, at the moment badgeselected is being saved as undefined. However the image is being captured within the pop up box correctly. I must have missed something basic, like having to declare the the badgeselected variable again? Pop up box that contains the image to be saved. $(document).ready(function () { $('.go img').css('cursor', 'pointer'); $('.go').on('click', 'img', function (e) { $(this).width(100).height(100).appendTo('#badgeselect'); $('#modal').reveal({ animation: 'fade', animationspeed: 600, closeonbackgroundclick: true, dismissmodalclass: 'close' }); return false; }); }); Where the image is saved to parse var MyBadge = Parse.Object.extend("myBadges"); var badgeselected = $('#badgeselect .go').attr("src"); $(document).ready(function () { $("#send").click(function () { var myBadge = new MyBadge(); var badgeselected = $('#badgeselect .go').attr("src"); var uploadercomment = $('#UploaderComment').val(); myBadge.set("BadgeName", badgeselected); //got this working using .set myBadge.set("Comment", uploadercomment); //got this working using .set myBadge.set("uploadedBy", Parse.User.current()); myBadge.save(null, { success: function (results) { console.log("Done"); //location.reload(); }, error: function (contact, error) { // The save failed. alert("Error: " + error.code + " " + error.message); } }); return false; }); });
type: Question
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/38168090
type: QuestionComment
has text: I am using jQuery version 1.10.2
comment on: http://stackoverflow.com/q/24627715
score: 0
type: Comment

http://stackoverflow.com/a/24748813
has comment: http://stackoverflow.com/comment/38418996
answers question: http://stackoverflow.com/q/24748669
score: 0
type: Answer
has body: Reffer to this JSFiddle JQuery $('a').click(function(){ var a = $('img').getRotateAngle(); var d = Math.abs($('#degree').val()); if($(this).attr('id') == 'counter'){ //d = -Math.abs(+a - +d); d = a - d; } else{d = +a + +d;} $('img').rotate({animateTo:d}); }); /* image preview */ $('#file').change(function(){ var oFReader = new FileReader(); oFReader.readAsDataURL(this.files[0]); console.log(this.files[0]); oFReader.onload = function (oFREvent) { $('#preview').html('&lt;img src="'+oFREvent.target.result+'"&gt;'); }; });

http://stackoverflow.com/comment/38232323
comment on: http://stackoverflow.com/a/24661831
has text: *update scratch that, browser caching is my enemy. This does work, but is better explained by someone else, you still get an upvote! :D
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/24668302
downvote count: 1
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/24668355
favorite count: 0
has title: Usage of String[..] Array operation
has comment: http://stackoverflow.com/comment/38243782
possible better answer: http://stackoverflow.com/a/24668430
has body: I have seen the following javascript in a webpage. s = String["fromC" + aa.nodeValue]; May I know what is the usage of String[...]?
has answer: http://stackoverflow.com/a/24668430
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/24668355
upvote count: 1

http://stackoverflow.com/a/24750031
answers question: http://stackoverflow.com/q/24748854
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: Steps to integrate full calendar in a rails app First Download moment.min.js and fullcalendar.min.js file and place them inside vendor/assets/javascripts directory. Download fullcalendar.css and fullcalendar.print.css file and place them inside vendor/assets/stylesheets directory. Now in your application.js file add the javascript files right after jquery like #application.js //= require jquery //= require jquery_ujs //= require moment.min //= require fullcalendar.min //= require turbolinks //= require_tree . In your application.css file add reference to the css files like *= require_tree . *= require fullcalendar *= require fullcalendar.print *= require_self In your view add a div with an id calender &lt;div id='calendar'&gt;&lt;/div&gt; Now create a js file calendar.js inside app/assets/javascript with the following code $(document).on('ready page:load', function () { $('#calendar').fullCalendar({ // put your options and callbacks here }) });
has comment: http://stackoverflow.com/comment/38483039
type: Answer
accepted answer of: http://stackoverflow.com/q/24748854
score: 2

http://stackoverflow.com/comment/38364555
has text: @Nathan Lee:I have added few colors and modified some contents in the div for debugging.Please bare it :)
comment on: http://stackoverflow.com/a/24731689
type: AnswerComment
score: 0
type: Comment

three.js
tags question: http://stackoverflow.com/q/24666732
tag name: three.js
tags question: http://stackoverflow.com/q/24620682
tags question: http://stackoverflow.com/q/24662398
tags question: http://stackoverflow.com/q/24719184
tags question: http://stackoverflow.com/q/24634971
tags question: http://stackoverflow.com/q/24662674
tags question: http://stackoverflow.com/q/24738070
tags question: http://stackoverflow.com/q/24677566
tags question: http://stackoverflow.com/q/24724366
tags question: http://stackoverflow.com/q/24741419
tags question: http://stackoverflow.com/q/24675838
tags question: http://stackoverflow.com/q/24680303
tags question: http://stackoverflow.com/q/24679283
tags question: http://stackoverflow.com/q/24716145
tags question: http://stackoverflow.com/q/24662720
tags question: http://stackoverflow.com/q/24723471
type: Tag
tags question: http://stackoverflow.com/q/24608561
tags question: http://stackoverflow.com/q/24719864
tags question: http://stackoverflow.com/q/24690731
tags question: http://stackoverflow.com/q/24678711
tags question: http://stackoverflow.com/q/24635753
tags question: http://stackoverflow.com/q/24682343
tags question: http://stackoverflow.com/q/24634452
tags question: http://stackoverflow.com/q/24738527
tags question: http://stackoverflow.com/q/24633835

http://stackoverflow.com/comment/38230641
score: 0
type: Comment
has text: Alright. So what I am understanding at this point is that you're not telling me not to use the `onready`, but rather you just have a different style of coding than I do, and I misunderstood it.
comment on: http://stackoverflow.com/a/24659776
type: AnswerComment

http://stackoverflow.com/comment/38152822
has text: You will need to provide a public URL (or URLs) that exhibit the problem for us to tell what is going on. Another option would be to check the returned status ([KmlStatus](https://developers.google.com/maps/documentation/javascript/reference#KmlLayerStatus)) of the KmlLayer to see if it loaded successfully.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24619410
score: 0

http://stackoverflow.com/q/24705825
has title: Loading dynamically generated pdf to iframe
type: Question
tagged with: javascript
score: 0
has body: I created a little application which receives a form via POST method and in return generate a pdf file using the form data. I would like to load the response pdf file into a &lt;iframe&gt; for printing purposes. All i found works only if you know your pdf file source or you can set your pdf generator url. &lt;iframe src='yourpdf.pdf'&gt; or &lt;iframe src='path/to/your/script'&gt; My issue is that i have to post my form first to generate the pdf file. Is there any way to do it? If not how should i pass the form data else since via the url would be really messy.
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/24706271
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38314596
has comment: http://stackoverflow.com/comment/38314788
has comment: http://stackoverflow.com/comment/38314723
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38314513

http://stackoverflow.com/q/24748507
answer count: 1
has body: Here is the jfiddle: http://jsfiddle.net/RHbzv/ What I am trying to do is that when the answer is displayed, 'See more' turns into 'See less' but I can't seem to get it right. I have tried: $('.see_more').on('click', function(){ if ($(this).text() == 'See more'){ $(this).text('See less') } else { $(this).text('See more') } $('.answer').slideToggle('slow') }) Any ideas???
has comment: http://stackoverflow.com/comment/38395903
has title: Change Text on slideToggle
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24748540
type: Question
tagged with: javascript
tagged with: jquery
tagged with: show-hide
score: 0
has answer: http://stackoverflow.com/a/24748540

http://stackoverflow.com/a/24729726
type: Answer
answers question: http://stackoverflow.com/q/24729467
has body: Since you included the '$' sign, let me make this addition too, As many of us have said here, the below one is correct function post() { var heading = document.blog.bhead.value; var content = document.blog.bpost.value; document.getElementById('col1').innerHTML=' '+heading+' &nbsp '+content+' '; } Also, Since '$' is a valid JavaScript identifier, the below code also hold correct function post() { var $heading = document.blog.bhead.value; var $content = document.blog.bpost.value; document.getElementById('col1').innerHTML=' '+$heading+' &nbsp '+$content+' '; }
score: 0

http://stackoverflow.com/a/24628332
downvote count: 0
answers question: http://stackoverflow.com/q/24628224
has body: In javascript you can add a new manager like this: var select = document.getElementById("dropDownId"); var option = document.createElement('option'); option.text = "Manager John"; select.add(option, 0);
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/38390684
comment on: http://stackoverflow.com/q/24745664
type: Comment
has text: would this be for pages on your site, or pages anywhere out there?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38203604
score: 0
type: Comment
type: QuestionComment
has text: RGragam..you are right .My question is "How we can use the id which is in other page?"(either this #xxx or this $.xxx).
comment on: http://stackoverflow.com/q/24626079

http://stackoverflow.com/q/24705156
linked to: http://stackoverflow.com/q/9050345
tagged with: key
duplicate of: http://stackoverflow.com/q/3216013
has comment: http://stackoverflow.com/comment/38313110
has answer: http://stackoverflow.com/a/24705181
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24705183
has body: Good evening, I'm facing a simple problem in JSON. I'm developping a smartwatch (Pebble) app which gets data from an API, which returns the following : { "name": "toto", "count": 55, "results": { "collection1": [ { "article": "Content number 1" }, { "article": "Content number 2" }, { "article": "Content number 3" } ] } } The problem is the following : is it possible to access only the latest "article" content from this JSON ? So in this case, it would be "Content number 3". Here is what I've got so far, but it returns only the 1st element : ajax({ url: 'MY_API_URL', type:'json' }, function(data){ simply.vibe(); // Vibrate the watch var message = data.results.collection1[0].article; simply.body(message); // display the message on the watch Thanks a lot !
linked to: http://stackoverflow.com/q/3216013
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: pebble-sdk
tagged with: javascript
has title: Access last JSON element with javascript
score: 0
answer count: 2

http://stackoverflow.com/q/24623922
has answer: http://stackoverflow.com/a/24809365
tagged with: pug
answer count: 1
has body: Is it possible to have a Jade mixin call pass through the attributes passed to the current mixin? Example: mixin A() A=attributes.x mixin B() +A B=attributes.x +B()(x="test") It outputs: test Because the attribute x doesn't get passed through to A. This is desired in most cases. But in my case, I would like to pass through any attributes passed to B into A, without having to list them a priori (i.e. +A()(x=attributes.x). Is this possible? This question is similar to Passing attributes in a jade mixin But the answer posted there does not work as far as I can tell.
tagged with: javascript
has title: Inheriting attributes in Jade mixins
score: 0
linked to: http://stackoverflow.com/q/24599006
tagged with: node.js
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/24627282
has comment: http://stackoverflow.com/comment/38167496
has body: As I understood you need to enter class name in radio_button_tag.... then radio_button_tag should have format like below: radio_button_tag(name, value, checked = false, options = {}) Try with this: &lt;%= f.radio_button :owner_type,"Self", :id=&gt;"self-group", :checked =&gt;true, :class=&gt; 'class-name' %&gt; which will allowed class attribute :checked=&gt;true means by default it will check the radio button.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24626888
has comment: http://stackoverflow.com/comment/38167748
has comment: http://stackoverflow.com/comment/38167650

http://stackoverflow.com/a/24741837
downvote count: 1
upvote count: 0
score: -1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24720093
has body: overflow:hidden got the work done!
type: Answer
has comment: http://stackoverflow.com/comment/129938827
accepted answer of: http://stackoverflow.com/q/24720093

http://stackoverflow.com/a/24612329
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38138759
answers question: http://stackoverflow.com/q/24611759
has body: jsFiddle JS var img, img2, imagesSize = 2; $( function() { img = $( "&lt;img src='http://placehold.it/1042x222&amp;text=1' /&gt;" ); img.load( imgLoaded ); img2 = $( "&lt;img src='http://placehold.it/1042x222&amp;text=2' /&gt;" ); img2.load( imgLoaded ); } ); function imgLoaded() { imagesSize--; if ( imagesSize == 0 ) { $( ".slider" ).append( img, img2 ).sss(); } } Better wait when all images all loaded. UPD Try `jQuery( ".slider" ).sss();` Your sss loads strange... There is no $.fn.sss, but jQuery.fn.sss exists. Maybe something overrides that jQuery acessible by $.
has comment: http://stackoverflow.com/comment/38139939

express
tags question: http://stackoverflow.com/q/24746104
tags question: http://stackoverflow.com/q/24588408
tags question: http://stackoverflow.com/q/24660034
tags question: http://stackoverflow.com/q/24714572
tags question: http://stackoverflow.com/q/24736089
tags question: http://stackoverflow.com/q/24607510
tags question: http://stackoverflow.com/q/24746508
tags question: http://stackoverflow.com/q/24716316
tags question: http://stackoverflow.com/q/24638077
tags question: http://stackoverflow.com/q/24654479
tags question: http://stackoverflow.com/q/24609991
tags question: http://stackoverflow.com/q/24632474
tags question: http://stackoverflow.com/q/24600596
tags question: http://stackoverflow.com/q/24741547
tags question: http://stackoverflow.com/q/24635563
tags question: http://stackoverflow.com/q/24709348
tags question: http://stackoverflow.com/q/24666331
tags question: http://stackoverflow.com/q/24622428
tags question: http://stackoverflow.com/q/24635322
tags question: http://stackoverflow.com/q/24665907
tags question: http://stackoverflow.com/q/24687984
tags question: http://stackoverflow.com/q/24592126
tags question: http://stackoverflow.com/q/24695093
tags question: http://stackoverflow.com/q/24707655
tags question: http://stackoverflow.com/q/24687633
tags question: http://stackoverflow.com/q/24685154
tags question: http://stackoverflow.com/q/24712182
tags question: http://stackoverflow.com/q/24736707
tags question: http://stackoverflow.com/q/24700047
tags question: http://stackoverflow.com/q/24622151
tags question: http://stackoverflow.com/q/24719397
tags question: http://stackoverflow.com/q/24628006
tags question: http://stackoverflow.com/q/24717847
tags question: http://stackoverflow.com/q/24738026
tags question: http://stackoverflow.com/q/24669288
tags question: http://stackoverflow.com/q/24592760
tags question: http://stackoverflow.com/q/24636763
tag name: express
tags question: http://stackoverflow.com/q/24734532
type: Tag
tags question: http://stackoverflow.com/q/24665039
tags question: http://stackoverflow.com/q/24694185
tags question: http://stackoverflow.com/q/24621940
tags question: http://stackoverflow.com/q/24602874
tags question: http://stackoverflow.com/q/24728710
tags question: http://stackoverflow.com/q/24607990
tags question: http://stackoverflow.com/q/24714508

http://stackoverflow.com/comment/38308769
has text: Hi, yeah - i'm trying to INSERT the clients data to SQL by calling the "form_handler.php".... it's got all the querys....i've tried 'true'... didn't work so far...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24702932

http://stackoverflow.com/q/24685428
accepted answer: http://stackoverflow.com/a/24686061
type: AnsweredQuestion
has title: Why does one AngularJS service bind work but the other doesn't
type: Question
answer count: 1
tagged with: javascript
has body: If you take the following Plunkr you will see a simple service - increments a count and it gets reported to the user. What I am trying to understand is why this works (the increment is reported to the user on a click) - binding to the function in the view: From the HTML &lt;p&gt; This is my countService variable : {{countService()}}&lt;/p&gt; From the controller $scope.countService = testService.getCount And why this Doesn't work - binding the function to the scope: From the HTML &lt;p&gt; This is my countService variable : {{countService}}&lt;/p&gt; From the controller $scope.countService = testService.getCount() Ultimately we're binding to a function in the service, though the second one doesn't bind the new value. A clear, easy to understand, explanation would be great :)
score: 0
has answer: http://stackoverflow.com/a/24686061
tagged with: angularjs

http://stackoverflow.com/a/24688187
accepted answer of: http://stackoverflow.com/q/24688146
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24688146
has comment: http://stackoverflow.com/comment/38281311
has body: There's really not a lot of good reason to try to do this: $(el).myLib.func1(); Because the this pointer when func1() executes will be myLib and you won't be able to access $(el). So, it doesn't do you a whole lot of good unless all you want is static methods. If that's what you actually want, then you can do this: $.fn.myLib = {}; $.fn.myLib.func1 = function(...) {...}; $.fn.myLib.func2 = function(...) {...}; If you actually want to be able to have acceess to the jQuery object (which I presume), then stick to one level and use a name prefix which gives you about the same level of name conflict protection anyway. $.fn.myLibFunc1 = function(...) {...}; $.fn.myLibFunc2 = function(...) {...}; Then, you can do: $(el).myLibFunc1(); And, the this pointer in myLibFunc1 will be the jQuery object that called it.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/78227751
comment on: http://stackoverflow.com/a/45327208
type: Comment
has text: check the code now ... its so simple to understand ... html code at top and below the js code thats it...
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38243736
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24666948
has text: Except for the odd `defineProperties`, it would look like [this code](https://stackoverflow.com/questions/15045080/javascript-inheritance-calling-object-create-when-setting-a-prototype) with prototypal inheritance. You'd define the `getId`/`getName`/`setName` methods on `this` and call `Person` differently, but how `id` is created stays the same.
score: 1

http://stackoverflow.com/comment/38154523
has text: Use different scripts for serving AJAX and page display. Or have your script check `$_SERVER['REQUEST_METHOD']` -- if it's `GET`, it displays the page, if it's `POST` it returns the AJAX response.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24620354

http://stackoverflow.com/comment/38281128
has text: @jt0dd Can you provide an example of the request to `POST /login`? What format of data is being sent in the request? The `express.bodyParser()` middleware was previously a bundle of `json()`, `urlencoded()`, and `multipart()` middleware. And, only 2 of those remain with [`body-parser`](https://github.com/expressjs/body-parser).
score: 0
comment on: http://stackoverflow.com/q/24687633
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38386588
type: QuestionComment
has text: Try to change the parameter for `String data` and do the conversion within the method `mJSONArray = new JSONArray(data);`. For these types I do not think Java does automatic conversion coming from a webview. By the way make sure you call these `loadUrl` when the page has been completely loaded.
comment on: http://stackoverflow.com/q/24743400
score: 0
type: Comment

http://stackoverflow.com/comment/38375104
comment on: http://stackoverflow.com/q/24737478
type: QuestionComment
score: 0
has text: itemTarget.html(itemContent.html()); ?
type: Comment

http://stackoverflow.com/comment/38240722
has text: It looks like your load function is appending this `.lay5_wrap .single_post` to the URLs ( and probably getting a 404 error or worse ( like what you would get if you tried to browse to `http://bscserver.com/bsg/?page_id=49%3Fpaged%3D2?paged=1.lay5_wrap .single_post`
type: AnswerComment
comment on: http://stackoverflow.com/a/24666002
type: Comment
score: 1

http://stackoverflow.com/comment/79156340
comment on: http://stackoverflow.com/a/24646493
score: 0
type: AnswerComment
type: Comment
has text: Hi. I have used 'allowedTagsPattern', but if I also want to show the user the reason for any tag to be invalid then how to do that? Can i use 'onInvalidTag' for it? If yes, then can you kindly show me how? Thanks in advance.

http://stackoverflow.com/q/24639382
has title: Does polymer core-ajax reuse bindings?
has body: I created two polymer elements: http://jsbin.com/vusere/1 sparkline-chart node-list My goal is to render a list of sparkline charts backed up by data out of a REST API. Now I've got the problem that on each iteration over nodes all sparkline-chart values are set to those of the actual iteration. But this only occures for the history binding and not the node.id binding. Do I miss a point here? node-list {{node.id}} sparkline-chart {{values}} {{values}}
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24641737
type: Question
tagged with: polymer
has answer: http://stackoverflow.com/a/24641737
tagged with: javascript
tagged with: ajax
score: 0
answer count: 1

http://stackoverflow.com/comment/38152441
type: Comment
comment on: http://stackoverflow.com/q/24619353
score: 0
has text: What isn't working? What does "after images" mean?
type: QuestionComment

http://stackoverflow.com/q/24623179
has answer: http://stackoverflow.com/a/24623264
type: AnsweredQuestion
has body: There have been a few situations where I'm trying to generate content, but the elements are siblings. So, I want to generate tags that are siblings, and then just append 1 element to the actual DOM to reduce DOM calls. For example (starting with element generation): var tr = $(' '); var td = $(' ') .append( $(' Label 1 ') ) .append( "some text" ); tr.append(td); var tr2 = $(' '); var td2 = $(' ') .append( $(' Label 2 ') ) .append( "other text" ); tr2.append(td2); This would generate something that looks like this for the first tr element: Labe 1 some text and the second element would look similar. This is fine, but my question is is there a way to add the second to the first and then only have to append the first to the actual table in the dom? Looking to do something like: $('#someTable').append( /*append 1 thing instead of both tr's*/ ); The idea is to reduce calls to the actual DOM, if there are tons of elements. Note: I realize that document.createElement is way faster than $('create element')
has title: JQuery generating elements that are siblings and then appending all at once
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/24623556
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/24623206
accepted answer: http://stackoverflow.com/a/24623206
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/24623264

http://stackoverflow.com/a/24609260
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24608998
has body: your jquery $('.rd').on('change',function(){ var last='r'+$(this).val(); $('select > option').hide(); $('select > option[value^="'+last+'"]').show(); $("select option").filter(function () { return $(this).attr('value') == last+'1'; }).attr('selected', true); }); RV RF RG RV1 RV2 RF1 RF2 RG1 RG2 DEMO DEMO2

http://stackoverflow.com/comment/38184490
type: Comment
comment on: http://stackoverflow.com/q/24636451
score: 0
type: QuestionComment
has text: ok. so I guess I'm asking if there is a way to listen for changes in the `DOM` besides `setInterval`?

http://stackoverflow.com/comment/38148470
comment on: http://stackoverflow.com/a/24615815
has text: sorry you're right - this doesn't work - it'll just continue removing elements until there are none left - i updated the code so that there's a section of code that appends elements
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38211534
type: Comment
comment on: http://stackoverflow.com/q/24650861
type: QuestionComment
has text: It would be more interesting if you showed us the actual code that loads the content in the modal
score: 0

http://stackoverflow.com/comment/38509072
type: AnswerComment
comment on: http://stackoverflow.com/a/24744861
score: 0
type: Comment
has text: I have not downvoted your answer, I just unaccepted it, because it didn't work for me...

http://stackoverflow.com/comment/83961673
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/48483805
has text: Isn't it suppose to be `"value | trustHtmlContent"`?

http://stackoverflow.com/comment/38383100
type: Comment
has text: Since the OP is refreshing the page every 5 seconds, the timer will get reset with each load...
type: AnswerComment
comment on: http://stackoverflow.com/a/24741617
score: 0

http://stackoverflow.com/q/24694533
tagged with: angularjs
linked to: http://stackoverflow.com/q/14514461
has answer: http://stackoverflow.com/a/24694598
accepted answer: http://stackoverflow.com/a/24694598
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I have several checkboxes in angular.js and I am trying to get the ng-model value from the selected checkbox when clicked. Any suggestions? &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox" ng-model="hyp" value="false" ng-click="selection($event)"&gt; Hypertension &lt;/label&gt; &lt;/div&gt; $scope.selection = function($event){ console.log($event.target.value); } I hope that this is clear enough :/
type: Question
has title: Can you get this ng-model value from ng-click?
tagged with: javascript
has answer: http://stackoverflow.com/a/24694612
answer count: 2
has comment: http://stackoverflow.com/comment/38292635
upvote count: 1
has comment: http://stackoverflow.com/comment/38292410
possible better answer: http://stackoverflow.com/a/24694612
favorite count: 0

http://stackoverflow.com/q/24699081
downvote count: 0
answer count: 1
tagged with: javascript
has body: I'm trying to add a new entry to a table I have this query $scope.addClient = function() { var clientId = $scope.items.length; //alert(empid); $scope.client.id = clientId++; $scope.items.push($scope.client); } this is my form Ajouter client Nom : Age : Sexe : Email : Société : Confirmer Annuler It tells me Cannot set property 'id' of undefined and nothing is added.
has comment: http://stackoverflow.com/comment/38302856
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/24699178
upvote count: 7
type: AnsweredQuestion
score: 7
type: Question
has title: angularjs add value Cannot set property 'id' of undefined
accepted answer: http://stackoverflow.com/a/24699178

http://stackoverflow.com/q/24674066
tagged with: menuitem
has body: How can I call a Javascript function test() as below for the onselect event (upon selection of menu item) of a menu item as for my below code? I have always worked on OnClick event in button but I have no idea about OnSelect events for the menuitems, how to call a function onselection of menuitem. Can anyone suggest how can my code below work and call my function test() (code 1) on selection of menu item named Log Report as in code-2? Log Report Code-1 Code-2 Test screen Database Log Log Report
type: AnsweredQuestion
has title: How to call a Javascript function onselection of menuitem?
accepted answer: http://stackoverflow.com/a/24674387
has answer: http://stackoverflow.com/a/24674167
has answer: http://stackoverflow.com/a/24674181
type: Question
tagged with: onselect
possible better answer: http://stackoverflow.com/a/24674167
tagged with: javascript
tagged with: jquery
score: 0
tagged with: jquery-events
has answer: http://stackoverflow.com/a/24674387
answer count: 4
has answer: http://stackoverflow.com/a/24674177

http://stackoverflow.com/a/25454149
type: Answer
accepted answer of: http://stackoverflow.com/q/24642057
downvote count: 0
answers question: http://stackoverflow.com/q/24642057
score: 1
has body: I figured out a good work around since nobody seemed to know the solution to this. Task: Needed to post a form to a 3.0 servlet using multipart/form-data that had text fields and a file all within the AJAX method. Dojo request methods fell short on most mehtods and sometimes couldn't work with AJAX. They would require a new page. Solution: I added in an iframe tag and changed the form to target the iframe. SOLVED! &lt;iframe id="uploadTrg" name="uploadTrg" height="0" width="0"&gt;&lt;/iframe&gt; Now Ajax and form with text and file are working.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/24651842
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38213976
has comment: http://stackoverflow.com/comment/38213586
tagged with: local-storage
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/38213367
accepted answer: http://stackoverflow.com/a/24651996
tagged with: javascript
has comment: http://stackoverflow.com/comment/38213545
possible better answer: http://stackoverflow.com/a/39788985
has body: I need to store a users profile and his preferences in a localStorage object \ cookies in a way that they'll be accessible(readable) and writable from both the web-app, and the chrome extension (that are basically part of the same product). I found this cool library and this article that specifies how to use it. The problem is that xauth.org is down, and so is the server page that is required to use the library. Any alternatives
has comment: http://stackoverflow.com/comment/38213796
answer count: 2
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/24651996
downvote count: 0
favorite count: 0
score: 8
has title: Sharing a local storage object across a web-app and a Chrome extension
has comment: http://stackoverflow.com/comment/38213404
has comment: http://stackoverflow.com/comment/38213325
has answer: http://stackoverflow.com/a/39788985

http://stackoverflow.com/a/24665584
score: 2
downvote count: 0
upvote count: 2
has body: The fix to your problem is stopPropagation(). The jQuery documentation tells you that this function "Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event." Basically, the event will not be fired for any of the parent elements. In order to use this method, handle the first parameter that your click function provides you. Then you call the method inside the function. Your method should look like this $("#nav li").click(function(e) { e.stopPropagation() $LiValue = this.value; alert($LiValue); });
type: Answer
answers question: http://stackoverflow.com/q/24665513

google-maps
tags question: http://stackoverflow.com/q/24600016
tags question: http://stackoverflow.com/q/24695101
tag name: google-maps
tags question: http://stackoverflow.com/q/24646827
tags question: http://stackoverflow.com/q/24732223
tags question: http://stackoverflow.com/q/24702489
tags question: http://stackoverflow.com/q/24617670
tags question: http://stackoverflow.com/q/24592725
tags question: http://stackoverflow.com/q/24691233
tags question: http://stackoverflow.com/q/24680247
tags question: http://stackoverflow.com/q/24633331
tags question: http://stackoverflow.com/q/24619410
tags question: http://stackoverflow.com/q/24710546
tags question: http://stackoverflow.com/q/24630280
tags question: http://stackoverflow.com/q/24715739
tags question: http://stackoverflow.com/q/24697284
tags question: http://stackoverflow.com/q/24715553
tags question: http://stackoverflow.com/q/24602728
tags question: http://stackoverflow.com/q/24698393
tags question: http://stackoverflow.com/q/24687069
tags question: http://stackoverflow.com/q/24740381
tags question: http://stackoverflow.com/q/24647468
tags question: http://stackoverflow.com/q/24700543
tags question: http://stackoverflow.com/q/24684358
tags question: http://stackoverflow.com/q/24597643
tags question: http://stackoverflow.com/q/24660992
tags question: http://stackoverflow.com/q/24706020
tags question: http://stackoverflow.com/q/24633472
tags question: http://stackoverflow.com/q/24611842
tags question: http://stackoverflow.com/q/24703288
tags question: http://stackoverflow.com/q/24682335
tags question: http://stackoverflow.com/q/24622737
tags question: http://stackoverflow.com/q/24604087
tags question: http://stackoverflow.com/q/24671169
tags question: http://stackoverflow.com/q/24746622
tags question: http://stackoverflow.com/q/24701371
tags question: http://stackoverflow.com/q/24619723
tags question: http://stackoverflow.com/q/24640246
tags question: http://stackoverflow.com/q/24678464
tags question: http://stackoverflow.com/q/24650351
tags question: http://stackoverflow.com/q/24712965
tags question: http://stackoverflow.com/q/24682641
tags question: http://stackoverflow.com/q/24690603
tags question: http://stackoverflow.com/q/24725785
tags question: http://stackoverflow.com/q/24673402
tags question: http://stackoverflow.com/q/24702581
tags question: http://stackoverflow.com/q/24726770
tags question: http://stackoverflow.com/q/24635625
tags question: http://stackoverflow.com/q/24629603
tags question: http://stackoverflow.com/q/24699861
tags question: http://stackoverflow.com/q/24631894
tags question: http://stackoverflow.com/q/24701124
tags question: http://stackoverflow.com/q/24619738
tags question: http://stackoverflow.com/q/24656193
tags question: http://stackoverflow.com/q/24625633
tags question: http://stackoverflow.com/q/24590112
tags question: http://stackoverflow.com/q/24735562
type: Tag
tags question: http://stackoverflow.com/q/24660628
tags question: http://stackoverflow.com/q/24702029
tags question: http://stackoverflow.com/q/24719643
tags question: http://stackoverflow.com/q/24714071
tags question: http://stackoverflow.com/q/24611321
tags question: http://stackoverflow.com/q/24730075
tags question: http://stackoverflow.com/q/24647813
tags question: http://stackoverflow.com/q/24726795
tags question: http://stackoverflow.com/q/24700144
tags question: http://stackoverflow.com/q/24744401
tags question: http://stackoverflow.com/q/24593786
tags question: http://stackoverflow.com/q/24726077
tags question: http://stackoverflow.com/q/24691318
tags question: http://stackoverflow.com/q/24670752
tags question: http://stackoverflow.com/q/24601633
tags question: http://stackoverflow.com/q/24660391
tags question: http://stackoverflow.com/q/24682859
tags question: http://stackoverflow.com/q/24682597
tags question: http://stackoverflow.com/q/24597210
tags question: http://stackoverflow.com/q/24650433
tags question: http://stackoverflow.com/q/24747965
tags question: http://stackoverflow.com/q/24717206

http://stackoverflow.com/a/24675623
score: 1
has body: I think I understood your questions correctly. I did not include the timer but here is how you could maintain the order of clicked buttons in the input array. http://jsfiddle.net/6qDap/1184/ $('button').click(function(){ input.push( $(this).attr('id') ); console.log(input); }); Don't forget to check the console to view the output. Hope this helps! Let me know if you have any questions or if I misunderstood.
accepted answer of: http://stackoverflow.com/q/24675418
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24675418
has comment: http://stackoverflow.com/comment/38258407
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/38258134

http://stackoverflow.com/comment/38261698
comment on: http://stackoverflow.com/q/24677898
has text: "No positive or negative signs before the number are allowed"... then why on Earth do you have `[-+]?` in your regex?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/24740299
upvote count: 0
has comment: http://stackoverflow.com/comment/38380571
answer count: 1
has comment: http://stackoverflow.com/comment/38380618
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24740404
has body: As shown below: I want to trigger the function doneTyping() after the user is done typing (wait for 2 seconds) but it gets triggered only after I load the page for the first time or hit refresh. In case I change the contents in the textbox ResidentialZipCode multiple times, it doesn't work at all. $(document).ready(function () { var typingTimer; //timer identifier var doneTypingInterval = 2000; //on keyup, start the countdown function checkForChange() { debugger; clearTimeout(typingTimer); if ($('#Residential_txt').val) { typingTimer = setTimeout(doneTyping, doneTypingInterval); } } function doneTyping() { //do something } $("#Residential_txt").on('input change paste cut', checkForChange); } Any pointers on what needs to be rectified?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38380686
has comment: http://stackoverflow.com/comment/38380744
has comment: http://stackoverflow.com/comment/38380554
has comment: http://stackoverflow.com/comment/38381299
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38380376
has comment: http://stackoverflow.com/comment/38380424
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38380442
has title: Jquery function executes only once after page load
has comment: http://stackoverflow.com/comment/38380568

http://stackoverflow.com/a/24644418
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24644290
type: Answer
downvote count: 0
score: 1
has body: This is all in the hands of the developer. It depends on how you are modeling the behavior of the object. Whenever you call a function from within an object, it is like as if you are asking the object to do something. If the sort method sorts the elements within the object itself, then the sort method is meant to modify the state of the object. Its like asking the object to sort itself. In the other case its returning a sorted array. So its like your asking the object to return the data that it contains after sorting it. In my personal opinion the second case function should be named returnSortedArray or something in that sense. The function sort applies more to the object sorting itself. If you are dealing with a huge array of data then sort in place should be the best approach, since it will not create duplicate data in the memory. If you require to preserve the original order of the data for some reason then returning the sorted array and not sorting the object itself will be better.
accepted answer of: http://stackoverflow.com/q/24644290
upvote count: 1

http://stackoverflow.com/comment/38370893
type: Comment
type: QuestionComment
score: 0
has text: @Kunal But I'm telling you, it works fine for me, doing exactly that. I can search with a string, select values, then search the second list whether I delete the first string or not. The code works fine. Try restarting your browser or something, it seems to be a problem on your end, not with the code.
comment on: http://stackoverflow.com/q/24734934

http://stackoverflow.com/comment/38389157
comment on: http://stackoverflow.com/a/24744779
type: AnswerComment
has text: Thank you. I should be more cautious :)
score: 0
type: Comment

transclusion
type: Tag
tags question: http://stackoverflow.com/q/24746243
tag name: transclusion

http://stackoverflow.com/comment/38093095
type: AnswerComment
score: 0
type: Comment
has text: the `request` function is not written with his extra variable in mind, and it's only going to pass 3 arguments.
comment on: http://stackoverflow.com/a/24588741

http://stackoverflow.com/a/24610495
answers question: http://stackoverflow.com/q/24610170
has comment: http://stackoverflow.com/comment/38135655
has body: Well, if I understand well, you try to make a fade in / fade out animation on hover on your projects ? Currently, you are adding a class that provides extra styles on hover. You'd better do that only with CSS (so it will be easier to manage than javascript events). Example : .panel-image img.panel-image-preview { width: 100%; border-radius: 2px 2px 0px 0px; transition: opacity .2s ease-in-out; /* you may use prefixes */ } .panel-image:hover img.panel-image-preview { opacity: .5; } .panel-image .img-overlay { background-color: #000; bottom: 0; color: #fff; opacity: 0; filter: alpha(opacity = 0); position: absolute; width: 100%; z-index: 9999; transition: opacity .2s ease-in-out; /* you may use prefixes */ } .panel-image:hover .img-overlay { opacity: 1; } I simply added transition on elements that will need a transition on hover and and made style modifications on hover (instead on class you added with javascript). So you'll have to remove the class toggle from your JS code. Update : You're obviously encountering a Chrome bug. Here's a workaround : .img-wrap { overflow: hidden; position: relative; -webkit-transform: translate3d(0,0,0); /* this will do the job */ } Note that it is just a workaround. Still, I highly recommand to use full CSS solution : smoother, and it surely will be easier to handle and maintain it.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24610170
has comment: http://stackoverflow.com/comment/38135742
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38135425
has comment: http://stackoverflow.com/comment/38135007
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/38319195
has text: if there is arbitrary text, that would indicate that you don't want to hard code line and character numbers. the customer's always right though, so give me two seconds.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24708174

http://stackoverflow.com/q/24746217
has comment: http://stackoverflow.com/comment/38391666
has comment: http://stackoverflow.com/comment/38391591
has answer: http://stackoverflow.com/a/24746314
type: Question
has comment: http://stackoverflow.com/comment/38392253
tagged with: javascript
tagged with: jquery
score: 4
has body: I have an issue at the moment, I'm using a set of image blocks for an upload system, as shown below. When i click on each of the squares who are input type="file" i get the image preview with the File reader API, all of that is working fine, what i do is replace the background image of the div (whose dimensions are 100px X 100px) for the preview, using .css( "background", 'url(' + e.target.result + ')' ) But the image doesn't adjust to the div width and height, and it shows only one portion. I tried with css map setting "background-size": "100%" or even "background-size": "100px 100px", but the results remain the same. Any ideas? Thanks in advance
has title: Adjust background image to div size using File API
has comment: http://stackoverflow.com/comment/38392277
answer count: 1
favorite count: 0
tagged with: filereader
upvote count: 4
tagged with: css
accepted answer: http://stackoverflow.com/a/24746314
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/24638375
tagged with: checkbox
type: AnsweredQuestion
has body: I have a check box that I need to keep checked after navigating away from the page. I am using AngularJS and bootstrap. Right now I am resetting the bound variable to false every time I reload the page (when the controller runs): how can I store my most up to date variable ($scope.disableCheck)? In my controller.... $scope.disableCheck = false; $scope.removeCheck = function () { $scope.disableCheck = !$scope.disableCheck; } And in my HTML... &lt;input class="notification-checkbox" type="checkbox" value="{{disableCheck}}" ng-click="removeCheck()" ng-clicked="{{disableCheck}}"&gt;
accepted answer: http://stackoverflow.com/a/24638437
type: Question
tagged with: javascript
score: 0
has title: Keep checkbox checked after navigating away from page
answer count: 1
has answer: http://stackoverflow.com/a/24638437
tagged with: angularjs

http://stackoverflow.com/a/24627113
upvote count: 1
has body: To always show the scrollbar at the bottom, you could just use overflow-x: scroll; as a CSS attribute. I could not see why a change to the parent element would break this behavior. If you want to know more, please post your code so we can see what's going on.
score: -1
answers question: http://stackoverflow.com/q/24626698
type: Answer
has comment: http://stackoverflow.com/comment/38169924
has comment: http://stackoverflow.com/comment/38173194
downvote count: 2

http://stackoverflow.com/a/24768710
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24744250
type: Answer
accepted answer of: http://stackoverflow.com/q/24744250
score: 0
has body: I have gotten help for the fist part now, and I have now successfully been able to get the products listed 2 side by side. Here's the Jfiddle for that body { font-family:'Arial'; color:#646464; } .continents-wrap { float:left; width:20%; margin:0 5% 0 0; padding:0; } .flowers-wrap { float:left; width:20%; margin:0 5% 0 0; padding:0; position:relative; } .flowers { float:left; width:600px; border:1px solid #FF00FF; } .flowers div { float:left; width:300px; height:68px; line-height:68px; padding:0 10px; background:#eee; margin:0; position:relative; border:1px solid #00FF00; box-sizing: border-box; } It would be so great if I could the the code to paste variables to the URL, as this could help preserve the selections when coming back from looking at a product in detail. Is there anyone who can help here? Another thing, I have tried to add a series of radio buttons, that has nothing to do with the actual checkboxes or jQuery, but for some reason the jQuery reacts to the radio buttons when clicked. Are there any way to "disable" this? JSFiddle for that is here Vis alle Vis noget Filter flowers by colour: Kartofler Gulerødder Løg Agurker Peber Rødbeder Selleri Andre Salat Emballage Filter flowers by size: Frasortering - sten/grus Vaske Polere Tørre Sortering Skrælle Skære Transport Veje/tælle Pakke/fylde Storkøkken Palletering 3-Dimensionel skiveskærermaskine 3D-skærer til Sticks og tern Automatisk gulerodsskærer og slicer Automatisk gulerodsskærer og slicer Automatisk kassefylder Automatisk løgskræller USM-100A Automatisk Pallelaster Automatisk strapmaskine incl. påsætning af hjørnebeskytter Automatisk Vejemaskine Basisenhed Even if the radio buttons are untouched, when filtering with the existing checkboxes, it behaves wrongly by hiding everything when supposed to show everything. ---- UPDATE ---- I no longer need the second part where the URL are taken in consideration. Therefore I close the question.

http://stackoverflow.com/a/24614095
has body: There would be a bit of work involved for this poly, but what you need to do, is alter HTMLInputElement's prototype, so each new instance has those methods and propertyes (validity, checkValidity and so on). Something along these lines: HTMLInputElement.prototype.testMethod = function (e) { console.log(e) }; HTMLInputElement.prototype.testProp = 'foo'; var input = document.createElement('input'); input.testMethod(input.testProp);
has comment: http://stackoverflow.com/comment/38173375
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/24610509
score: 2
downvote count: 0

http://stackoverflow.com/comment/38178727
score: 0
type: Comment
type: QuestionComment
has text: Shouldn't it be `overflow:"justify"` ??
comment on: http://stackoverflow.com/q/24633254

http://stackoverflow.com/a/24614386
score: 1
answers question: http://stackoverflow.com/q/24597559
upvote count: 1
downvote count: 0
type: Answer
has body: If you wish to log the element's HTML, just use console.log(myElement.outerHTML).

http://stackoverflow.com/q/24653019
has title: Why am I unable to get phone numbers from my Contacts with the Cordova Contact API?
tagged with: cordova
has comment: http://stackoverflow.com/comment/38237889
downvote count: 0
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/38218181
score: 1
has body: I'm building a phone app with with Steroids.js which is built on top of Phonegap. Right now, with the code below, I'm unable to retrieve phone numbers from my Contacts Why am I unable to get phone numbers from my Contacts with the Cordova Contact API? &lt;script&gt; // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready // function onDeviceReady() { // find all contacts var options = new ContactFindOptions(); options.filter=""; options.multiple=true; var fields = ["*"]; navigator.contacts.find(fields, onSuccess, onError, options); } // onSuccess: Get a snapshot of the current contacts // function onSuccess(contacts) { for (var i=0; i&lt;contacts.length; i++) { for (var j=0; j&lt;contacts[i].phoneNumbers.length; j++) { alert(contacts[i].phoneNumbers[j].value ); } } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/42616535
upvote count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/38135135
comment on: http://stackoverflow.com/q/24610406
type: Comment
type: QuestionComment
has text: @user2132742 See my answer, it should work for you in case I got you right
score: 0

http://stackoverflow.com/q/24728067
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24728202
answer count: 1
tagged with: jquery
has title: Attaching event handler for onerror to an image does not work in IE
favorite count: 0
has body: I am trying to attach an event handler for the onerror event to an img element so that it will replace it with some text if there is an error while loading it. I can get it to work in Chrome and Firefox but it will not work in IE. I am using IE11. This is my image element: And the javascript: I have tried binding the event in the html itself with: I noticed when debugging in Chrome that after executing the $(this).error(handler) line, the img element still had onerror defined as null. Does anyone know why this is not working in IE, and how I could get it to work in IE?
tagged with: onerror
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24728202
type: AnsweredQuestion
downvote count: 3
upvote count: 1
type: Question

http://stackoverflow.com/q/24698594
tagged with: css
has comment: http://stackoverflow.com/comment/38300003
upvote count: 0
downvote count: 2
type: AnsweredQuestion
has body: Please help me ! I have two divs, in each div is a table. How can I change the content of first table by clicking in the second table. The first table is on the left side, and the second table is on the right side. "Image 1" I want to change the content on the left table by clicking on the right table on the "Table 1" , "Table 2" One more thing, how can I keep the both tables in line when the content of the first table is to long. when I add more data in the first table the tables are changing their position like this
has title: HTML multiple Tables
has comment: http://stackoverflow.com/comment/38300254
score: -2
type: Question
tagged with: html-table
has comment: http://stackoverflow.com/comment/38300321
has comment: http://stackoverflow.com/comment/38301391
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24698893
accepted answer: http://stackoverflow.com/a/24698893

http://stackoverflow.com/comment/38116740
has text: Ah, I had a suspicion ajax was the answer. Thanks!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24601157

http://stackoverflow.com/comment/38201465
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24645331
has text: I use mRender parameter to add checkboxes in all rows.
score: 0

http://stackoverflow.com/comment/79410460
has text: Is there a way to make the audio element queue the audio, so that there is no delay before it actually plays? On Android, I set the audio element's src attribute, and then wait for the 'canplay' event before I enable the play button. With iOS, it seems like it won't emit the 'canplay' until after calling play() on it. That doesn't make much sense to me, tbh, so I'm wondering if I have something wrong.
comment on: http://stackoverflow.com/a/24704570
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38100699
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24592656
has text: Yes they, Let me try.. Thanks
score: 0

http://stackoverflow.com/comment/38109371
comment on: http://stackoverflow.com/a/24596415
type: AnswerComment
score: 0
type: Comment
has text: Thanks for your answer! Indeed, it fixes the fancy box issue but now the "back to top" button that I have on other pages doesn't work anymore, probably because you removed this: $('.back-to-top').fadeIn(); } else { $('.back-to-top').fadeOut();

http://stackoverflow.com/q/24628396
has comment: http://stackoverflow.com/comment/38169289
has comment: http://stackoverflow.com/comment/38169324
has comment: http://stackoverflow.com/comment/38169239
type: UnansweredQuestion
has title: Type/properties of Object.prototype
has comment: http://stackoverflow.com/comment/38170032
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/38169238
tagged with: javascript
has body: var prototypeType = typeof Object.prototype console.log(prototypeType); var hasOwn = Object.prototype.hasOwnProperty("hasOwnProperty"); console.log(hasOwn); Why is nothing printed to the console with this code? Should it? If it shouldn't print anything, a brief explanation as to why would be appreciated. Note: this is part of a Codecademy course which is explaining how plain objects inherit from Object.prototype, but surely if Object.prototype contains nothing to inherit then it's pointless? Edit: I think there must just be a bug with Codecademy after being told what it should print.
score: 0

http://stackoverflow.com/comment/38263172
type: AnswerComment
type: Comment
has text: But this is not a view file. This is a js source file. I think base_url() function will not work, since it's not in the application folder.
comment on: http://stackoverflow.com/a/24666617
score: 0

http://stackoverflow.com/comment/38179430
has text: So add a flag that says I am over 800 and if it is set, than fire away.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24633831
score: 3

http://stackoverflow.com/comment/38358428
score: 0
type: Comment
type: QuestionComment
has text: Please make a JSFiddle with external resources
comment on: http://stackoverflow.com/q/24728397

http://stackoverflow.com/comment/38232439
score: 0
type: AnswerComment
has text: a hint: you might able to keep most of your code, but that variable you are using to check if the video is playing must be coming from onPlayerStateChange somehow. I will post a solution later :)
type: Comment
comment on: http://stackoverflow.com/a/24659316

http://stackoverflow.com/comment/38246673
has text: @Yad Smood I still think it can be avoided I do not say that it will be easier, but is avoidable.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24669353

http://stackoverflow.com/a/24596904
has body: You have mistake in configuration file. modules parameter is RELATIVE url from public folder (see documentation). So it must be "modules": "./modules" instead of "modules": "/modules"
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24596805
score: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24596805
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38351505
comment on: http://stackoverflow.com/a/24725079
score: 0
type: AnswerComment
has text: One returns the number of forms that contain any file inputs, the other returns the number of file inputs. Either will work for testing for existence or nonexistence of file inputs.
type: Comment

http://stackoverflow.com/q/24612687
tagged with: excel
type: Question
has answer: http://stackoverflow.com/a/24613626
answer count: 1
has title: How to implement MS Excel style "Freeze Panes" in HTML/CSS
downvote count: 0
tagged with: javascript
score: 1
linked to: http://stackoverflow.com/q/11030371
tagged with: http://stackoverflow.com/tag/html
tagged with: css
duplicate of: http://stackoverflow.com/q/11030371
favorite count: 0
has comment: http://stackoverflow.com/comment/87771500
type: UnansweredQuestion
upvote count: 1
has body: I'm using Angular JS in an HTML5/CSS3 webapp for iPad, and I have a rather large table that needs to have both horizontal and vertical scroll, with the "freeze - pane" feature that is found on MS Excel. Right now, I've implemented a div based layout splitting the table into 3, a top, left and middle region as shown in the image. I'm detecting scroll on the scrollable regions (top and left), and then fixing the position of the middle region to be in sync, using Javascript. This works, but is jerky. Is there a cleaner way to implement this? I'm trying to not use any plugins because my code is already pretty heavy, but if there are lightweight slick plugins, I'm open to those as well. TIA

http://stackoverflow.com/q/24720148
has answer: http://stackoverflow.com/a/24720487
tagged with: css
has comment: http://stackoverflow.com/comment/38342798
has body: I have following: $compile .= " " . $title . " " . $content . " "; And get the error: Element div not allowed as child of element h5 in this context. I tried to change the inner div with span but after that I've got more errors. How do I correct this?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38342337
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Element div not allowed as child of element h5 in this context
has comment: http://stackoverflow.com/comment/38342270
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38342250

http://stackoverflow.com/q/24605466
has answer: http://stackoverflow.com/a/24605716
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/24605607
score: 1
has title: Fluid/Continuous image scroll for the Background
has comment: http://stackoverflow.com/comment/38125492
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38128667
has comment: http://stackoverflow.com/comment/38125553
has comment: http://stackoverflow.com/comment/38125388
answer count: 2
downvote count: 0
has body: I have successfully created a full background image scrolling effect using a single image. The code I used to achieve this is like so: BackGround Slide This works as expected. However, there is a clear demarcation between the beginning and the end of the image. Is there a way to say, achieve a continuous effect wherein the image's beginning and end isn't so obvious. I mean, can this be achieved using CSS/JS or do I need to edit/modify the image itself? This is what the current output looks like: Thank you
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38212196
type: QuestionComment
comment on: http://stackoverflow.com/q/24619875
has text: I think the semicolon on the third line (after return !isNaN(number) }; ) will break your code. You can put a semicolon before that }, though. Other than that, yes that code is correct now.
score: 0
type: Comment

http://stackoverflow.com/comment/38296330
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24694722
has text: No probs. `@Patrick Evans` is correct, you should read the docs properly before any of us pointing it out.
score: 0

http://stackoverflow.com/comment/38338882
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24718425
has text: Maybe there is coding missing, but what does the code in the controllers do? Do you mean $scope.educations = ...?
score: 0

http://stackoverflow.com/q/24704504
downvote count: 3
accepted answer: http://stackoverflow.com/a/24704599
upvote count: 1
type: Question
has title: window.open javascript window not showing complete content
type: AnsweredQuestion
has body: Im using the window.open command to open a new browser window, but when it happens it doesnt render the complete height of the page, even Im adding a height=1600 it only shows the complete height of the window plus like 150px, any idea? MyUrl
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/38312426
answer count: 1
has answer: http://stackoverflow.com/a/24704599
favorite count: 0
has comment: http://stackoverflow.com/comment/38312190
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38312408
has comment: http://stackoverflow.com/comment/38311722

http://stackoverflow.com/comment/38175158
type: QuestionComment
comment on: http://stackoverflow.com/q/24631581
has text: all your functions work for me. Show us how you call them
score: 0
type: Comment

http://stackoverflow.com/comment/38104336
comment on: http://stackoverflow.com/q/24594659
score: 0
type: Comment
type: QuestionComment
has text: have you tried storing the links in an array first like `var links = document.getElementsByTagName('a');` then iterated through the array? It worked fine for me.

http://stackoverflow.com/q/24637255
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38185959
has body: How to put calEvent.id into #id in appended html? $("#id").val(calEvent.id); if(calEvent.status == 'open') { $('#append .appact').remove(); $('#append').append("&lt;div class='appact'&gt;&lt;form id='update'&gt;&lt;input type='hidden' name='id' id='id'&gt;&lt;br/&gt;&lt;input type='submit' name='submit'&gt;&lt;/form&gt;&lt;/div&gt;"); }
has comment: http://stackoverflow.com/comment/38185966
has answer: http://stackoverflow.com/a/24637343
type: AnsweredQuestion
has title: Add dynamic jquery data into appended html
type: Question
accepted answer: http://stackoverflow.com/a/24637343
has comment: http://stackoverflow.com/comment/38186034
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/24637404
has answer: http://stackoverflow.com/a/24637404

http://stackoverflow.com/comment/38110317
type: AnswerComment
score: 0
type: Comment
has text: Nope, you're not doing anything that involves authentication.
comment on: http://stackoverflow.com/a/24597325

http://stackoverflow.com/comment/38141184
type: Comment
comment on: http://stackoverflow.com/a/24613813
has text: I found about this and posted it just before you answered.
type: AnswerComment
score: 0

http://stackoverflow.com/q/24684698
has comment: http://stackoverflow.com/comment/38277801
has title: PhantomJS click on an image and wait for load
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/38276101
linked to: http://stackoverflow.com/q/16807212
answer count: 2
has comment: http://stackoverflow.com/comment/38274843
score: 2
downvote count: 0
tagged with: javascript
has body: I'm trying to do page automation with PhantomJS. My goal is to be able to go to a website, click an image, and continue with other code once the page has loaded from the click. To test this I'm trying to write a script that will go to the url of the quick start guide on the PhantomJS website and then click on the PhantomJS logo bringing the page to the PhantomJS homepage. Also to render a picture of the website before and after the click to make sure the click worked. This is my current code: var page = require('webpage').create(); page.open('http://phantomjs.org/quick-start.html', function(status) { console.log(status); page.render('websiteBeforeClick.png'); console.log(page.frameUrl); //check url before click var element = page.evaluate(function() { return document.querySelector('img[alt="PhantomJS"]'); }); page.sendEvent('click', element.offsetLeft, element.offsetTop, 'left'); window.setTimeout(function () { console.log(page.frameUrl); //check url after click }, 3000); console.log('element is ' + element); //check that querySelector() is returning an element page.render('websiteAfterClick.png'); phantom.exit(); }); Problem is my before and after pictures are the same. This is my output when I run it. success element is [object Object] Im using their sendEvent method from here "http://phantomjs.org/api/webpage/method/send-event.html" but I'm not sure if its working. Also why doesnt the console.log(page.frameUrl) in my window.setTimeout() get executed? I was looking at their page automation examples on the PhantomJS website. Particularly this one "https://github.com/ariya/phantomjs/blob/master/examples/imagebin.js". I noticed their examples used document.querySelector('input[name=disclaimer_agree]').click() But when I tried it with my code I got an error. document.querySelector('img[alt="PhantomJS"]').click(); TypeError: 'undefined' is not a function EDIT#1: I changed the end section of my code to this: page.sendEvent('click', element.offsetLeft, element.offsetTop,…
favorite count: 0
has answer: http://stackoverflow.com/a/29044978
has answer: http://stackoverflow.com/a/24695425
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/24655801
has comment: http://stackoverflow.com/comment/38220986
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38220917
linked to: http://stackoverflow.com/q/2939122
has answer: http://stackoverflow.com/a/24655997
type: AnsweredQuestion
has body: I am trying to select all the text in a textbox when tabbed over to the text box and when its clicked. Thought I had a good thing when I had function selectField() {$(this).select();} to select it but then I discovered that I could just use onfocus and onclick and set those directly with this.select(); Problem is that I can do it when I tab to the text field but clicking it. Have a fiddle showing what I'm talking about http://jsfiddle.net/t9jJX/ edit. When I click the textbox the highlighted text does not stay highlighted.
has comment: http://stackoverflow.com/comment/38220798
type: Question
has comment: http://stackoverflow.com/comment/38220898
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/24655997
possible better answer: http://stackoverflow.com/a/24656023
has title: Use Onfocus and Onclick to select text in a textbox
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24656023

http://stackoverflow.com/comment/38245558
has text: I try it and let you know, but it seems very complex, i have single page view only not two page view in my app.
type: AnswerComment
comment on: http://stackoverflow.com/a/24669310
score: 0
type: Comment

http://stackoverflow.com/comment/38192565
type: QuestionComment
comment on: http://stackoverflow.com/q/24640610
score: 0
has text: @shanet, thanks for reply but in my last post I already tried that and people told me to do this way! how ever , here is the link http://jsfiddle.net/Behseini/uZEs4/2/
type: Comment

http://stackoverflow.com/comment/86100584
has text: This is a fantastic solution! Adding this to a barebones replacement of jQuery's draggable was exactly the ticket to solving a simple drag n drop JS module without the bloat of jQuery UI.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24638604
type: Comment

http://stackoverflow.com/comment/38256678
type: QuestionComment
has text: Correct. I want to cache the data just to improve page loads and reduce server requests.
score: 0
comment on: http://stackoverflow.com/q/24658584
type: Comment

http://stackoverflow.com/comment/38338826
comment on: http://stackoverflow.com/a/24717916
type: AnswerComment
has text: I flagged a duplicate question as the answers over there should help to solve your problems. If flash is an option for you you definitely should have a look at Downloadify.
score: 0
type: Comment

http://stackoverflow.com/comment/38141710
score: 0
type: Comment
has text: @TimPietzcker Technically true, although I find most regex questions on SO want both validation and capturing even when the question doesn't explicitly ask for it, so I add them by default most of the time.
type: AnswerComment
comment on: http://stackoverflow.com/a/24613914

http://stackoverflow.com/comment/38221926
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24656381
has text: @christof13 That's what I am trying to avoid
score: 0

http://stackoverflow.com/q/24601193
has comment: http://stackoverflow.com/comment/38140332
has comment: http://stackoverflow.com/comment/38125816
type: Question
has body: I've been frustrated for weeks, not been able to figure out what is wrong with my template. I used many methods in order to create the mansory layout (2 column post) but I have failed on most of them. It's my first try with java-script for the and I'm beginning to believe either is my html / css is failing or just simply I'm not good enough for js challenge... This is my tumblr http://thegreysanctuary.com/ &lt;script&gt; (function () { var $tumblelog = $('#container'); $tumblelog.infinitescroll({ navSelector: ".pagination", nextSelector: ".pagination a:jump_page", itemSelector: ".item", }, function (newElements) { var $newElems = $(newElements).css({ opacity: 0 }); $newElems.imagesLoaded(function () { $newElems.animate({ opacity: 1 }); $tumblelog.masonry('appended', $newElems); }); }); $tumblelog.imagesLoaded(function () { $tumblelog.masonry({ columnWidth: function (containerWidth) { return containerWidth / 100; } }); }); })(); &lt;/script&gt; HTML5 ------------------------------ img { height: auto; width: auto; } #container { width: 960px; margin: 30px auto 30px auto; padding: 0px 0px 0px 0px; clear:both; } .mansory { width:auto; border-width: 1px; border-color: #fff; border-style: solid; } .item{ width: 400px; margin: 10px 20px 0px 10px; border-width: 8px; border-color: #fff; border-style: solid; background-color: #fff; border-radius: 5px; -o-border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; float: left; color: #73654D; display: inline-block; } .pagination { margin: 20px auto 0px auto; padding: 10px 0px 10px 0px; clear: both; visibility:hidden; }
has comment: http://stackoverflow.com/comment/38716934
tagged with: javascript
downvote count: 0
has title: Unable to achieve the mansory layout+infinite scroll on tumblr
score: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
answer count: 0
tagged with: tumblr
upvote count: 1

http://stackoverflow.com/q/24622021
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38158126
possible better answer: http://stackoverflow.com/a/24622159
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24622159
has comment: http://stackoverflow.com/comment/38157616
tagged with: ajax
has comment: http://stackoverflow.com/comment/38157785
has comment: http://stackoverflow.com/comment/38159440
has answer: http://stackoverflow.com/a/24647207
tagged with: iframe
tagged with: php
has comment: http://stackoverflow.com/comment/38158106
has body: I've searched high and low for an answer to this question but have yet to find a similar question or an answer. I apologize if this is a "re-ask". Essentially my problem is this: I have an iframe inside of my parent page, and inside the iframe is a php page that includes my .js file containing my AJAX. I want button clicks in the iframe to create an AJAX request and update the iframe. As far as I know I have it all set up correctly but when I attempt to echo my $_POST (I've tried GET too) variables to test them they never change. Here's my code: Parent: Employee Web Service Home Modules Module 1 Module 2 Module 3 Module 4 Scores Calendar Logout test.php inside Iframe: <?php if(isset($_POST['begin'])){ $test = true; echo($_POST['begin']); } else if (isset($_POST['backToSlides'])){ echo($_POST['backToSlides']); } ?> <div id = "startTest" <?php if(isset($test)){echo 'style = "visibility: hidden; disabled: true;"';}?> > Test <?php echo $id; ?> testScript.js: $(document).ready(function(){ $('input[name = "backToSlides"], input[name = "begin"]').click(function(event){ event.preventDefault(); post = $(this).attr("name") + "=" + $(this).val(); $.ajax({ url: "/test.php", type: "POST", data: post, //Data purposely not serialized due to the way submit-type input field values are handled success: function(){ console.log("Processing request...");}, error: function(){ console.log("Error submitting request");} }); }); }); This ALWAYS calls the success function, but I never see the value of the submit buttons in the post data. I know they're being passed into the ajax call properly because I've tried calling alert($(this).attr("name") + "=" + $(this).val()) and I get the expected result of "key=value". A speedy response is greatly appreciated!
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24647207
has title: Ajax in iframe not updating the iframe
has comment: http://stackoverflow.com/comment/38157640
has comment: http://stackoverflow.com/comment/38157834

http://stackoverflow.com/q/24634694
has comment: http://stackoverflow.com/comment/38182401
has body: I have the following function: function mattes_create_matte_array(mattes, selected_type) { ... $(mattes).each(function(i, el) //loop through the mattes xml { fillets = $(el).find("fillet")[0]; console.log("i: " + i); if(typeof(fillets) !== "undefined") { switch (i) { case 0: fillet_selected_matte = "fillet_matte_layer_top"; console.log(fillet_selected_matte);break; case 1: fillet_selected_matte = "fillet_matte_layer_middle"; console.log(fillet_selected_matte);break; case 2: fillet_selected_matte = "fillet_matte_layer_bottom"; console.log(fillet_selected_matte);break; } fillet_change($(fillets).find("imgsrc").text(), $(fillets).find("cid").text(), $(fillets).find("sku").text()); } ... } When I output fillet_selected_matte, I always get back "fillet_matte_layer_top", when I am expecting to output each "fillet_matte_layer_..." console.log(el) is the following 11852997eab43ff5c7b1803692bee608 0 20 4208 113a2584b32539ecdc35d70b39fde504 0.31 9352 TD00060S1 579767cea6941301e6f91d43580a1948 0.5 0 4390 fee7ec5a4b50b65e94801682ae076a5a 0.31 9348 TD00052S0 11852997eab43ff5c7b1803692bee608 0.5 0 42089349 5ade25e607b6302691c318a94792e6eb 0.31 9349 TD00060GL1 Here's the code for fillet_change: function fillet_change(thumb, cid, sku) { if (mattes_selected_type == 15) //letter mattes { alert("Fillets can only be applied to rectangular openings. Your current layout does not contain any rectangular openings, fillet was not applied"); return; } var img = new Image(); img.src = SITE_URL + '/system/components/compimg/' + thumb + '/pattern'; img.onload = function() { width = .31; img.width = width * ppi; //TODO: Get actual width from xml? img.height = width * ppi; //TODO: Get actual width from xml? $( document ).ready(function() { $("div[id^='opening_']").each(function(i) //for each div that has an id of opening_(number) { //Set the values in the array with the width and height switch(fillet_selected_matte) { case "fillet_matte_layer_bottom": moulding_matte_canvas_width[i] = $("#opening_…
has comment: http://stackoverflow.com/comment/38182276
score: 0
has comment: http://stackoverflow.com/comment/38182589
has comment: http://stackoverflow.com/comment/38182502
has comment: http://stackoverflow.com/comment/38182244
has comment: http://stackoverflow.com/comment/38182578
has comment: http://stackoverflow.com/comment/38181888
tagged with: loops
has title: Why am I always getting the same output in this loop?
has comment: http://stackoverflow.com/comment/38181365
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38181389
has comment: http://stackoverflow.com/comment/38181221
has comment: http://stackoverflow.com/comment/38182554
has comment: http://stackoverflow.com/comment/38182498
type: Question
has answer: http://stackoverflow.com/a/24635380
has comment: http://stackoverflow.com/comment/38181538
accepted answer: http://stackoverflow.com/a/24635380
has comment: http://stackoverflow.com/comment/38181185
has comment: http://stackoverflow.com/comment/38181233
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24645469
has comment: http://stackoverflow.com/comment/38201569
answers question: http://stackoverflow.com/q/24644601
type: Answer
has comment: http://stackoverflow.com/comment/38215740
score: 2
downvote count: 0
has body: Try setting autocomplete="off" at the &lt;form&gt; or &lt;input&gt; level. The docs for autocomplete can be found in Mozilla's &lt;input&gt; section
upvote count: 2

http://stackoverflow.com/comment/38187097
has text: We've actually discussed adding something like this to Bluebird in the past (with getters). Here's what I'd do - if getData on makePotion requires getData on getPixieDust - have getPixieDust call the promise itself on `makePotion` and cache it.
comment on: http://stackoverflow.com/q/24637850
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38228018
comment on: http://stackoverflow.com/a/24659204
type: Comment
has text: Could I see a sample? is your idea similar to the code I already have running?
score: 0
type: AnswerComment

http://stackoverflow.com/a/24739163
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38417566
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38851755
has comment: http://stackoverflow.com/comment/38774503
has comment: http://stackoverflow.com/comment/38811123
accepted answer of: http://stackoverflow.com/q/24603119
type: Answer
answers question: http://stackoverflow.com/q/24603119
has body: Please enter this code, and make sure flowtype.js is called before the code. &lt;script type="text/javascript"&gt; $j = jQuery.noConflict(); $j(document).ready(function() { /*$j('body').flowtype({ minimum : 500, maximum : 1200, minFont : 12, maxFont : 20 }); */ $j("body").flowtype({ minFont: 16, maxFont: 40, fontRatio: 65 }); $j("#heading").flowtype({ fontRatio: 36 }); $j("#content p").flowtype({ minFont: 12, maxFont : 22, fontRatio: 20 }); $j("#menu a").flowtype({ minFont: 16, fontRatio: 5 }); $j("p.bookings").flowtype({ minFont: 11, fontRatio: 30 }); $j("div.opening-hours").flowtype({ minFont: 18, fontRatio: 30 }); }); &lt;/script&gt; Also, please note the following lines mentioned on the plugin website. Line-height In v1.0 of FlowType, we made the plugin set a specific line-height in pixels. We received many statements that setting a specific line-height is very dangerous. So, what did we do? We removed support for line-height in v1.1. What do I do now? It's quite simple: use unitless line-height in your CSS. It will make automatically make changes based on whatever the font-size. Here's an example of what we suggest for line-height: fontRatio : 30; If you have further issue, then please mention the link to your jsfiddle code.
has comment: http://stackoverflow.com/comment/38417746

http://stackoverflow.com/a/24610451
type: Answer
has body: You need to make use of promise in order to wait for the http call to fetch the response from the server. After the promise is resolved then only it should populate the articlesSlide scope variable. In the template have a ng-show check on the articlesSlide variable so that when it is null then nothing is displayed (till the time promise is resolved) DOCUMENTATION: Angular Promise Example
upvote count: 1
answers question: http://stackoverflow.com/q/24609801
accepted answer of: http://stackoverflow.com/q/24609801
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/comment/38119685
comment on: http://stackoverflow.com/a/24602275
type: AnswerComment
has text: In fact the inner edge of the phone does not coincide with the edge of the image, we have to calculate these offsets by using some image editor (such as paint) or simply using trial and error method until the result is OK, so the ranges are `[5, magnify's width - 5]` and `[4, magnify's height - 3]`, here is the updated demo http://jsfiddle.net/viphalongpro/dhCLd/4/
score: 0
type: Comment

http://stackoverflow.com/comment/38097366
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24590662
has text: do a google search of the error, results should help you analyze the circular problem. Some part of your object has a circular reference in it

http://stackoverflow.com/comment/38340818
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24719017
type: AnswerComment
has text: is it because of how I call the upload_window ? The fine-uploader is in upload_window. This is how I call the upload_window : function open_upload_window() { document.getElementById('fade_background').style.display = 'block'; document.getElementById('upload_window').style.display = 'block'; }

http://stackoverflow.com/a/24683393
has comment: http://stackoverflow.com/comment/38272228
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38272386
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/38272440
accepted answer of: http://stackoverflow.com/q/24683354
has comment: http://stackoverflow.com/comment/38272699
answers question: http://stackoverflow.com/q/24683354
type: Answer
has comment: http://stackoverflow.com/comment/38272371
upvote count: 7
has body: for(var key in theReturnedData) { theReturnedData[key] // This is the object you want access to } Update Also make sure to implement a check for each key. You need to filter out the properties that could be inherited from the objects Prototype (lots of frameworks add custom properties to object Prototypes. You can check that through Object.hasOwnProperty(property_name), so basically use this loop: for(var key in theReturnedData) { if(!theReturnedData.hasOwnProperty(key)) continue; theReturnedData[key] }

http://stackoverflow.com/comment/38158592
type: Comment
type: QuestionComment
has text: @jt0dd: No. It's a constructor. (which has a prototype, but you haven't used that).
comment on: http://stackoverflow.com/q/24622383
score: 0

http://stackoverflow.com/q/24714824
answer count: 1
has comment: http://stackoverflow.com/comment/38331582
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24715295
type: UnansweredQuestion
has title: Show hidden tables until search button clicked
type: Question
has body: I have a search box that makes a request within a table and displays the queried results. I want the tables to remain hidden until the user starts the search. HTML John john.doe Jane Vanda jane@vanda Alferd Penyworth alfred JS (function(document) { 'use strict'; var TableFilter = (function(Arr) { var _input; function _onInputEvent(e) { _input = e.target; var tables = document.getElementsByClassName(_input.getAttribute('data-table')); Arr.forEach.call(tables, function(table) { Arr.forEach.call(table.tBodies, function(tbody) { Arr.forEach.call(tbody.rows, _filter); }); }); } function _filter(row) { var text = row.textContent.toLowerCase(), val = _input.value.toLowerCase(); row.style.display = text.indexOf(val) === -1 ? 'none' : 'table-row'; } return { init: function() { var inputs = document.getElementsByClassName('table-filter'); Arr.forEach.call(inputs, function(input) { input.oninput = _onInputEvent; }); } }; })(Array.prototype); document.addEventListener('readystatechange', function() { if (document.readyState === 'complete') { TableFilter.init(); } }); })(document);

http://stackoverflow.com/q/24594134
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38103265
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has answer: http://stackoverflow.com/a/24594192
score: 0
has answer: http://stackoverflow.com/a/24594193
has comment: http://stackoverflow.com/comment/38103240
has title: Removing parent element by clicking on div?
type: UnansweredQuestion
has body: I have a form being generated like this &lt;%for (var i = 0; i &lt; user.categories.length; i++) {%&gt; &lt;div class="form-group" id="&lt;%=i %&gt;"&gt; &lt;input type="text" class="form-control" name="category&lt;%=i %&gt;name" value="&lt;%=user.categories[i].taskname%&gt;" placeholder = "Enter task name"&gt; &lt;input type="number" class="form-control" name="category&lt;%=i %&gt;priority" value="&lt;%=user.categories[i].taskpriority%&gt;" placeholder = "Enter task priority" min="1" max="3"&gt; &lt;input type="number" class="form-control" name="category&lt;%=i %&gt;duration" value="&lt;%=user.categories[i].taskduration%&gt;" placeholder = "Enter task duration" min="0" max="24"&gt; &lt;button class = "delete" id="&lt;%=i %&gt;" type="button"&gt;Delete&lt;/button&gt; &lt;!--&lt;input type="text" class="form-control" name="category&lt;%=i %&gt;" value="&lt;%=user.categories[i] %&gt;"&gt; --&gt; &lt;br&gt; &lt;/div&gt; &lt;br&gt; &lt;%} %&gt; And this script $(".delete").click(function(){ var parent = this.parent(); alert(this.id); parent.empty(); }); I'm creating a delete button with an id i, and I thought that the jquery would grab the element I clicked, then find its parent div and delete the entire div. However, this isn't happening, any ideas why?
has comment: http://stackoverflow.com/comment/38103263

detection
tags question: http://stackoverflow.com/q/24666636
tags question: http://stackoverflow.com/q/24664186
type: Tag
tag name: detection

http://stackoverflow.com/q/24725678
score: 2
type: AnsweredQuestion
has title: Add a class tag to "the changable content DIV of the chosen "
upvote count: 2
has answer: http://stackoverflow.com/a/24725749
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24725821
answer count: 2
accepted answer: http://stackoverflow.com/a/24725749
possible better answer: http://stackoverflow.com/a/24725821
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have some menus in a ul. When a user clicks one of those menu, a content in one DIV will change. ---------- fisrt choice hidden div that is going to show in #zen-content hidden div that is going to show in #zen-content .... .... .... .... .... I want that: when the hidden div from one of the has been transfered to the blank div (which it is #zen-conten), then the div inside the #zen-conten will have a class of easyzoom easyzoom--overlay It will look like this: it is a hidden DIV from li Here is the Jquery I used: $(document).ready(function(){ $('#zen-content').html($('#choice li:first').html()); $('#choice li').click(function(event) { $('#zen-content').html( $(this).html()); }); }); Thanks in advance ...

http://stackoverflow.com/comment/38319687
score: 0
type: Comment
has text: Actually here is my fiddle http://jsfiddle.net/p943a/ ..I need to increase the area of cross button.Please check my update Question
comment on: http://stackoverflow.com/a/24708215
type: AnswerComment

http://stackoverflow.com/q/24643827
has answer: http://stackoverflow.com/a/24643865
type: Question
has body: So, I'm working on figuring out how to post data from Jquery to PHP, And as much as I follow the examples I've found on the threads here, I keep getting an "Undefined Index Name" error. My code thus far for the JQuery side is The html forms and buttons I'm using Um Errrr And the PHP side I'm going to <?php echo $_POST['name']; $myFile = "testFile.txt"; $fh = fopen ($myFile, 'a+') or die("Cannot Open File"); fwrite ($fh, $_POST['name']); fclose($fh); ?> I'm about at a loss from where to do. All files are within the same folder and filenames are correct as far as I can find.
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38198464
score: 0
has comment: http://stackoverflow.com/comment/38198477
favorite count: 0
tagged with: undefined-index
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38199512
upvote count: 1
tagged with: php
downvote count: 1
has title: Undefined Index Name when trying to pass values from Jquery to PHP

http://stackoverflow.com/a/24663729
has body: You could simply make the button a link with right href and target set, which has an additional event listener, which submits the form. The controller could redirect afterwards. Template %a.step1-button.submit.js-submit-form{href: "your_page2_url", target: "_blank"} Get Started Controller @form = FormSubmit.create(:name =&gt; name, :form =&gt; "/") redirect_to :page_3 JS $(function(){ $('.js-submit-form').on('click', function() { $(this).parent('form').submit(); }); });
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24663597
has comment: http://stackoverflow.com/comment/38236544
has comment: http://stackoverflow.com/comment/38236429
score: 1
accepted answer of: http://stackoverflow.com/q/24663597
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38236674

http://stackoverflow.com/q/24666774
has answer: http://stackoverflow.com/a/24666800
has body: I'm wanting to ensure the "Email" radio button is checked on load rather than the phone. For some reason the "Phone" radio button is checked onload yet both inputs are showing, I don't quite understand that. DEMO HERE Here is my jQuery var ebuForm = { init : function() { ebuForm.showInput(); }, showInput : function(e) { var radioInput = $("input[type='radio']"), emailRadio = $("input[value='email']"); radioInput.prop('checked', true); radioInput.change(function(){ var emailInput = $('.email-input'), phoneInput = $('.phone-input'); if($(this).val()=="email") { emailInput.show(); phoneInput.hide(); console.log('Email Enabled'); } else { emailInput.hide(); phoneInput.show(); console.log('Phone Enabled'); } }); } }; $(function() { ebuForm.init(); });
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38241740
has answer: http://stackoverflow.com/a/24666901
score: 0
has title: Enable Radio Button Checked On Load
has answer: http://stackoverflow.com/a/24666855
favorite count: 0
accepted answer: http://stackoverflow.com/a/24666855
has answer: http://stackoverflow.com/a/24666869
has comment: http://stackoverflow.com/comment/38241922
upvote count: 1
has comment: http://stackoverflow.com/comment/38241949
answer count: 4
possible better answer: http://stackoverflow.com/a/24666800
has comment: http://stackoverflow.com/comment/38242036
type: AnsweredQuestion

http://stackoverflow.com/comment/38310820
type: Comment
type: QuestionComment
has text: The first version (passing a value to make decisions) is called *command coupling* and is best avoided. "managers make decisions and workers work" is the usual analogy for ensuring worker functions do not make decisions. You could just wire up additional handlers for the extra work (if your code suits). They will fire in the order they were registered.
comment on: http://stackoverflow.com/q/24703885
score: 0

http://stackoverflow.com/a/24679799
answers question: http://stackoverflow.com/q/24679661
score: 0
type: Answer
has body: You can use regex with: var $element = $('.currency strong'); var text = $element.text(); var newText = text.replace(/(\$)\s*/g, '$1'); $element.text(newText);

http://stackoverflow.com/a/24625852
upvote count: 2
answers question: http://stackoverflow.com/q/24625633
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38164661
type: Answer
has body: Google doesn't have 45°-Images everywhere. The Documentation states: 45° Imagery The Google Maps API supports special 45° imagery for certain locations. This high-resolution imagery provides perspective views towards each of the cardinal direction (North, South, East, West). These images are available at higher zoom levels for supported map types. [...] The existing google.maps.MapTypeId.SATELLITE and google.maps.MapTypeId.HYBRID map types support 45° perspective imagery at high zoom levels (where available). You can see the currently available locations on this map.
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24625633
has comment: http://stackoverflow.com/comment/38164817

http://stackoverflow.com/q/24654652
type: AnsweredQuestion
tagged with: cookies
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/20477937
has answer: http://stackoverflow.com/a/24654906
has title: Angular $cookieStore service - share cookie with sub domains
has body: I was wondering if there is a way to access an cookie set using angular $cookieStore service, from several different subdomains, let's say: api.yoursite.com www.yoursite.com and jsut yoursite.com The documentation doesn't mention this issue at all. Is there a solution, or do I have to use the lower level JavaScript cookies API?
tagged with: angularjs
upvote count: 1
accepted answer: http://stackoverflow.com/a/24654906

http://stackoverflow.com/a/24651713
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24651340
has comment: http://stackoverflow.com/comment/38213249
has body: I may suggest you to use opacity instead of display. Check this jsfiddle $('.item').hover(function(){ $(this).css('opacity','1'); }); And change the css to .item { background: yellow; opacity: 0; width: 300px; height: 300px; float: left; }

ruby-on-rails
tags question: http://stackoverflow.com/q/24648412
type: Tag
tags question: http://stackoverflow.com/q/24655934
tags question: http://stackoverflow.com/q/24707324
tags question: http://stackoverflow.com/q/24663597
tags question: http://stackoverflow.com/q/24679346
tags question: http://stackoverflow.com/q/24694780
tags question: http://stackoverflow.com/q/24686093
tags question: http://stackoverflow.com/q/24704043
tags question: http://stackoverflow.com/q/24613446
tags question: http://stackoverflow.com/q/24598840
tags question: http://stackoverflow.com/q/24664619
tags question: http://stackoverflow.com/q/24609912
tags question: http://stackoverflow.com/q/24599647
tags question: http://stackoverflow.com/q/24663610
tags question: http://stackoverflow.com/q/24728219
tags question: http://stackoverflow.com/q/24624698
tags question: http://stackoverflow.com/q/24718042
tags question: http://stackoverflow.com/q/24735169
tags question: http://stackoverflow.com/q/24616970
tags question: http://stackoverflow.com/q/24731369
tags question: http://stackoverflow.com/q/24664934
tags question: http://stackoverflow.com/q/24629059
tags question: http://stackoverflow.com/q/24687961
tags question: http://stackoverflow.com/q/24667041
tags question: http://stackoverflow.com/q/24608273
tags question: http://stackoverflow.com/q/24649171
tags question: http://stackoverflow.com/q/24729079
tags question: http://stackoverflow.com/q/24622098
tags question: http://stackoverflow.com/q/24631944
tags question: http://stackoverflow.com/q/24639677
tags question: http://stackoverflow.com/q/24630972
tags question: http://stackoverflow.com/q/24666411
tags question: http://stackoverflow.com/q/24619690
tags question: http://stackoverflow.com/q/24744396
tags question: http://stackoverflow.com/q/24673989
tags question: http://stackoverflow.com/q/24748854
tags question: http://stackoverflow.com/q/24642425
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/24732798
tags question: http://stackoverflow.com/q/24673018
tags question: http://stackoverflow.com/q/24734081
tags question: http://stackoverflow.com/q/24726527
tags question: http://stackoverflow.com/q/24626888
tags question: http://stackoverflow.com/q/24675751
tags question: http://stackoverflow.com/q/24602815
tags question: http://stackoverflow.com/q/24664948
tags question: http://stackoverflow.com/q/24744762
tags question: http://stackoverflow.com/q/24637505
tags question: http://stackoverflow.com/q/24719607
tags question: http://stackoverflow.com/q/24677164
tags question: http://stackoverflow.com/q/24747805
tags question: http://stackoverflow.com/q/24670055
tags question: http://stackoverflow.com/q/24714010
tags question: http://stackoverflow.com/q/24605950
tags question: http://stackoverflow.com/q/24730611
tags question: http://stackoverflow.com/q/24722487
tags question: http://stackoverflow.com/q/24592141
tags question: http://stackoverflow.com/q/24711696
tags question: http://stackoverflow.com/q/24640824
tags question: http://stackoverflow.com/q/24614849
tags question: http://stackoverflow.com/q/24630578
tags question: http://stackoverflow.com/q/24679879
tags question: http://stackoverflow.com/q/24638369
tags question: http://stackoverflow.com/q/24721962
tags question: http://stackoverflow.com/q/24589504

http://stackoverflow.com/comment/38312625
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24664023
has text: https://github.com/tarlepp/angular-sailsjs-boilerplate/blob/master/frontend/src/app/partials/Directives/NavigationHeader/header.html here. I want to put a "div" visible only when a state is, for example: "anon.about". Is it possible?
type: AnswerComment

http://stackoverflow.com/comment/38205608
has text: Hasn't this question been asked once?
comment on: http://stackoverflow.com/q/24647620
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38196538
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24641133
has text: because history.back(); is make browser go to the previous page in history but if it was a direct link there is no previous page... You should find another way to go back, for example manually cat off part of the url
score: 1

http://stackoverflow.com/comment/38509753
has text: This is getting off-topic quite rapidly. Post another question please.
comment on: http://stackoverflow.com/a/24746459
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24703098
has answer: http://stackoverflow.com/a/24703238
has comment: http://stackoverflow.com/comment/38309283
favorite count: 0
has comment: http://stackoverflow.com/comment/74936214
has comment: http://stackoverflow.com/comment/38308981
tagged with: angularjs
type: UnansweredQuestion
has title: Angular.js - How do I check to see if a string is contained within an array object using a filter?
upvote count: 1
type: Question
tagged with: firebase
score: 1
has body: I'm using Angular and Firebase to create an app that will allow users to post new topics for discussion, as well as vote on existing topics. When a user is logged in their username is stored in currentUser.username. If they've upvoted a topic than their username also appears in topic.upvotes. The problem I'm running into is topic.upvotes is storing an array of values. So if Kenneth and Tyler have both upvoted a topic, topic.upvotes = {"Kenneth":"Kenneth","Tyler":"Tyler"}. All I need to know is if a user has upvoted a topic so that I can apply some conditional CSS to give them visual feedback that they've already voted on that topic. I've been trying to accomplish this with: ng-class="{user_has_upvoted : signedIn() &amp;&amp; topic.upvotes === currentUser.username}" My intent is to apply the user_has_upvoted class to the div only if the user is both signed in and they've actually upvoted the topic. But obviously topic.upvotes (an array) doesn't == or === currentUser.username (a string). I was hoping there was some way of using some sort of inArry() function, but angular doesn't have anything that I've found that will work. Any advice? Thanks!
tagged with: arrays
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/38389458
comment on: http://stackoverflow.com/q/24745100
has text: `$(window).load(function() { // code here });` or you can do `window.onload = function() { // code here }`
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38423835
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24731435
has text: Thanks. Is " imagesArray[i].setMap(map);" in the for loop not supposed to display one overlay after the other ? Or did i overlook something ?
score: 0

http://stackoverflow.com/comment/38387596
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24743815
score: 0
has text: Are you actually looking for the string "undefined" or for an actual undefined value of maxnumId in your if? If you're looking for an undefined value, then you'll need to drop the quotation marks. If that's not the issue, what output are you getting back from the server?

http://stackoverflow.com/a/24605840
has comment: http://stackoverflow.com/comment/38126328
accepted answer of: http://stackoverflow.com/q/24605317
type: AcceptedAnswer
downvote count: 0
has body: Performance issue has nothing to do with .each. DOM is tens of times slower than any way to iterate collection you choose. Instead of iterating table on every toggle you can make CSS do it for you. Demo. $(function() { var togglers = $('#togglers'), //cache toggler ref addToggler = function(idx, text) { togglers.append('&lt;span class="toggler" data-id="' + idx + '"&gt;' + text + '&lt;/span&gt;'); }, table = $('#table'), //cache table ref columns = 0; //generate styles for 100 columns table :) (function generateStyleSheet(len){ var styles = [], i = 0; for(; i &lt; len; i++) { styles.push('.hide-' + i + ' .column-' + i + ' {display: none;}') ; } $('&lt;style&gt;' + styles.join('\n') + '&lt;/style&gt;').appendTo(document.body); }(100)) //bind on click once using event delegation togglers.on('click', '.toggler', function(e){ var id = $(e.target).toggleClass('pressed').data('id'); table.toggleClass('hide-' + id); }); //generate all togglers and count em table.find('th').each(function(idx, header){ header = $(header); addToggler(idx, header.text()); //make toggler header.addClass('column-' + idx); //add class column-i columns++; }); //add column-i class to tds table.find('td').each(function(idx, td) { $(td).addClass('column-' + (idx%columns)); }); });
has comment: http://stackoverflow.com/comment/38126568
has comment: http://stackoverflow.com/comment/38126430
has comment: http://stackoverflow.com/comment/38129024
has comment: http://stackoverflow.com/comment/38127108
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/24605317
score: 2
has comment: http://stackoverflow.com/comment/38127369
has comment: http://stackoverflow.com/comment/38126863

http://stackoverflow.com/comment/38304844
score: 0
has text: ah, thanks for clearing that up. Now I can explain why something I wrote isn't a bug, lol.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24700989

http://stackoverflow.com/comment/38371552
score: 0
comment on: http://stackoverflow.com/q/24735327
type: QuestionComment
type: Comment
has text: Tomalak, is there a better way to achieve this, see that I am looping through the list multiple times to list the elements, I am looking for a better way to achieve this, without redundant loops may be with a ko templates even better,

http://stackoverflow.com/comment/38326860
has text: That perfectly suits my needs! Also a lot simpeler than I thought it would be, hehe. Thanks a lot!
comment on: http://stackoverflow.com/a/24712165
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24613251
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/24589773
type: Answer
has body: I looked at the DateTime Picker website. I'm not sure if it would make a difference but, try format="dd.mm.yyyy hh:ii" Perhaps the uppercase 'HH' caused problems. Edit: I see now that 'HH' is 12 hour while, 'hh' is 24 hour. I still believe that it would be the problem though.
downvote count: 1
has comment: http://stackoverflow.com/comment/45721813

http://stackoverflow.com/a/52719376
downvote count: 1
upvote count: 17
answers question: http://stackoverflow.com/q/24718709
has body: Yes. It calls the render() method every time we call setState only except when shouldComponentUpdate returns false.
type: Answer
has comment: http://stackoverflow.com/comment/92364719
score: 16

http://stackoverflow.com/comment/38274145
has text: Well you would need nested JSON callbacks or use something like [queue](https://github.com/mbostock/queue).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24669555

http://stackoverflow.com/comment/38373080
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24736232
has text: Define "doesn't work." What *does* it do? Is there an error on the JavaScript console? When you debug this, what happens? Is the click event handled? Does the function get called? Where/how does the function complete? "It doesn't work" isn't a helpful problem description.

http://stackoverflow.com/a/33067244
has body: This was a brilliant post that taught me many things. I modified the above fiddle to create expandable buttons that show text on hover. test test test test .div2 { display: none; } .columnContainer:hover > section:nth-of-type(1):hover .div2 { display: block; } .div4 { display: none; } .columnContainer:hover > section:nth-of-type(2):hover .div4 { display: block; } https://jsfiddle.net/CWrU2/24/ I'm really grateful to you all and I hope my additions will be useful to someone!
answers question: http://stackoverflow.com/q/24590718
score: 0
type: Answer

http://stackoverflow.com/q/24631394
answer count: 2
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/12215844
has answer: http://stackoverflow.com/a/24632269
score: 2
type: UnansweredQuestion
has body: I'd like to save this webpage as html http://www.wix.com/demone2/cupcakes-shop but the saved file is too much different because the page has a bootstrap.js which generates styles for the classes wysiwyg_viewer_skins... The closest answer I found is this Get HTML with current styles (maybe inlined) of a page that finished rendering and finished running scripts but I tried his phantomjs code and it makes all images datauri and doesn't work it very well with this page
has answer: http://stackoverflow.com/a/24631510
tagged with: javascript
has title: Save HTML with javascript generated styles
type: Question
upvote count: 2

http://stackoverflow.com/a/24606755
answers question: http://stackoverflow.com/q/24589873
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 8
upvote count: 8
has body: Instead of using data, use body: var request = require('request'); var authOptions1 = { url: 'https://api.spotify.com/v1/users/' + username + '/playlists', body: JSON.stringify({ 'name': name, 'public': false }), dataType:'json', headers: { 'Authorization': 'Bearer ' + access_token, 'Content-Type': 'application/json', } }; request.post(authOptions1, function(error, response, body) { console.log(body); }); that should make it.
accepted answer of: http://stackoverflow.com/q/24589873

http://stackoverflow.com/comment/38286511
type: Comment
type: QuestionComment
has text: Great that you do! Really. I am using that almost a year, for simple as well as for complex applications. That is radical change in usage of `angular`, because we can start to think in `states` *(business logic pieces ala menu, nav, main-game section)*... great to see that you at least try. I am *almost* sure that you'll be at the end using it ;) good luck ;) PS: http://stackoverflow.com/a/24690519/1679310 there are links to great blog posts... which will help to understand
comment on: http://stackoverflow.com/q/24639491
score: 0

http://stackoverflow.com/a/25441739
type: Answer
score: 1
has body: In your example code, you are recursively calling the getter you have defined. City.getter["enabled"] = function() { // this.enabled calls City.getter["enabled"] return this.enabled + "x" }; The value retrieved from DB is stored in __data property. Here is the corrected getter function: City.getter["enabled"] = function() { return this.__data.enabled + "x" };
upvote count: 1
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24713445
answers question: http://stackoverflow.com/q/24713445

http://stackoverflow.com/comment/38324836
has text: Had you understood my question. @hairmot
type: AnswerComment
comment on: http://stackoverflow.com/a/24699333
type: Comment
score: 0

http://stackoverflow.com/q/24701361
has body: In our web application, we are trying to allow users download large files (upwards of tens of gigabytes) for a file storage application. Currently we have a client side download method using the (now discontinued) LocalFileSystem (https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem) feature. Our reason for moving from our previous method of server-side downloads to a javascript-based solution was for error handling and progress reporting. The files actually stored in chunks, and we need to stream them from the server to the client upon download. However, due to compression and several other factors, we cannot determine the content length before initializing the download, so any attempt to set a content-length header would be futile. Without using LocalFileSystem, browsers like FireFox are forced to load the entire file in a javascript object in ram out of local storage to prompt the user to save the file. My question is this: Is there any way to save these files via javascript (without loading the entire thing in ram)? or are we forced to move back to our server side download?
has answer: http://stackoverflow.com/a/24701469
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: file-io
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has title: How can I efficiently buffer a network stream to a file in javascript?
type: Question
score: 1

http://stackoverflow.com/q/24658487
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: rerun Javascript when dom updates from ajax
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24658548
type: Question
possible better answer: http://stackoverflow.com/a/24658764
has body: I've been trying for a while to solve this problem I'm currently having, to no use untill now. I have a main html file with a menu that loads content to a div trough ajax. The problem is that the loaded content (witch has a 'next' button to go to the...next dynamic loaded page) doesn't work, so I had to add a recall to the function I'm running on the parent page. Obviously this didn't went so well, because after clicking trough some of the links, I end up crashing the browser with more than 3000 request to the same function... How can I make it so the function re-runs, or listens to DOM changes? And .on isn't working. Script on the main file: var din = function () { $('.dinMenu').on('click', 'a', function(event) { event.preventDefault(); $('#dinContent').html('loading...'); var $this = $(this); var module = $this.data("module"); var folder = 'modules/module_' + module + '/'; var href = $this.data("href"); var url = folder + href; console.log(url); $.ajax({ url: url, type: 'GET', dataType: 'html', cache: false }).done(function(data) { $('#dinContent').html(data); }).fail(function(jqXHR, textStatus, errorThrown) { $('#dinContent').html("Error!! File is not loaded"); }); }); $(document).ready(function() { din(); }); The HTML: ... link ... ... and the dynamic pages: Next If I remove the script from the "child.html" file, nothing happens when I press next.
has answer: http://stackoverflow.com/a/24658764
tagged with: javascript
score: 4
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/38225975
has answer: http://stackoverflow.com/a/24658548

http://stackoverflow.com/q/24659501
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38227941
has comment: http://stackoverflow.com/comment/38228549
tagged with: ajax
has body: I'm attempting to create a form that submits data that includes a path to an uploaded image. The form is a basic HTML form that passes information to a PHP script that interfaces with a database. The image is supposed to be uploaded with an ajax file uploader on the same page, and the resultant server filename is inserted into a hidden form field in the root form. The problem is, the ajax file upload appears to require its own form, meaning that I need to have a form within a form, which is apparently no bueno. How can I rejigger my form so that I can have the file uploader within the bounds of the form, yet not break everything? Edit: code snippet: <form action="<?php echo esc_url($_SERVER['PHP_SELF']); ?>" method="post" name="form"> Username: Email: Password: Admin? File Upload: Upload Files! Clear
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/38227856
answer count: 0
tagged with: forms
has title: How can I integrate an ajax request into another form?
type: Question

http://stackoverflow.com/comment/130834675
type: Comment
comment on: http://stackoverflow.com/a/67020180
has text: @izogfif not sure what you mean, I wanted to answer your very original question "why do I still need CSRF token?"
score: 0
type: AnswerComment

http://stackoverflow.com/q/24688515
score: 0
has body: Through the HTML shown below I am trying to disable the two sRadio1 inputs or the two sRadio2 inputs if any of them are checked, so I tried using JQuery to do so as shown below but for some reason it is not working. Can someone please tell me what exactly I am doing wrong here and how to fix it? Thanks Options Option A Option B JQuery code $(".soptions input").change(function() { if (this.checked) { $(this).parent('li').find('input').attr('disabled', true); } else { $(this).parent('li').find('input').attr('disabled', true); } });
accepted answer: http://stackoverflow.com/a/24688629
tagged with: http://stackoverflow.com/tag/html
has title: JQuery using .find to disable Radio input elements
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24688629
has answer: http://stackoverflow.com/a/24688595
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/24688595
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24695743
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24695654
answers question: http://stackoverflow.com/q/24695654
has body: It will stop when files[i] will be undefined/null. example var a = [2,3] for (var i = 0, f; f=a[i]; i++) { console.log(f); }; First time a[i] will be 2, it will print 2 Second time a[i] will be 3, it will print 3 Third time a[i] will return undefined/null, so expression f=a[i] will give result undefined and it will stop.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/24664512
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: What have you tried so far? Per the Bootstrap documentation $('#myModal').modal('hide') Please read through the documentation! http://getbootstrap.com/javascript/#modals
accepted answer of: http://stackoverflow.com/q/24664494
answers question: http://stackoverflow.com/q/24664494
score: 27
upvote count: 27
has comment: http://stackoverflow.com/comment/38237550

winjs
tags question: http://stackoverflow.com/q/24696127
tag name: winjs
type: Tag
tags question: http://stackoverflow.com/q/24588500
tags question: http://stackoverflow.com/q/24659188

http://stackoverflow.com/comment/38157093
type: Comment
has text: That's not a property, but a class?
score: 0
comment on: http://stackoverflow.com/q/24621807
type: QuestionComment

http://stackoverflow.com/comment/38388799
type: AnswerComment
has text: Since I am using px for all of my elements, do you know how many px are in a standard 8.5 x 11 page? Based on the value the code is returning, it should be around 200 but that doesn't seem right.
type: Comment
comment on: http://stackoverflow.com/a/24738805
score: 0

http://stackoverflow.com/comment/38278746
comment on: http://stackoverflow.com/a/24686188
type: AnswerComment
has text: Are you checking `$mail` or `$_POST['mail']`?
score: 0
type: Comment

http://stackoverflow.com/a/24711804
has body: I didn't tried with processing.js but in Javascript you would do something like this : Assuming you've got a Json file like this : { "test": { "votes": [ "1", "1", "2", "3", "4", "5" ] } } in your html page add in a &lt;script&gt; tag : function getVotes(url) { var ajax = new XMLHttpRequest() || new ActiveXObject('MSXML2.XMLHTTP'); ajax.open('get', url, true); ajax.onreadystatechange = function(){ if(ajax.readyState==4){ parseJSON(ajax.responseText); } }; ajax.send(null); } function parseJSON(json){ var chatVotes = JSON.parse(json); console.log(chatVotes.test.votes); // returns " ["1", "1", "2", "3", "4", "5"] " } getVotes("yourJsonFile.json"); You should watch this link to learn how to access javascript data within your processing.js program. You might also want to look at this answer from a very similar question. Ps: AFAIK JSON.parse() can only parse valid json data. The url you're accessing in your code is html data.
answers question: http://stackoverflow.com/q/24708486
score: 0
has comment: http://stackoverflow.com/comment/38331412
type: Answer

http://stackoverflow.com/q/24618481
has comment: http://stackoverflow.com/comment/38151611
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38151536
has comment: http://stackoverflow.com/comment/38151144
has title: window.print() is avoiding a large page partially
has body: First Part --various controls like label/textbox/radio/checkbox.... This is a small part, which can be adjusted within half of an A4 size page. Second Part --various controls like label/textbox/radio/checkbox.... THis is a very large part, which should take two A4 size page Third Part --various controls like label/textbox/radio/checkbox.... This is the general structure of an HTML page. When I try to print the whole page with window.print() command, First fieldset takes a whole page. the half of the lower portion of the page remain blank. Second page shows the second fieldset but as it is larger to fit in one page, it doesn't extend to next page. Instead, the remaining controls are lost. Then the Third page shows the third fieldset. Everything is fine except the second page. How could I preview all controls of the second fieldset. If it breaks into two page that will be no problem. I am trying to use @media print{} and trying to find out to solve this problem. But after a lot of googling, no solution is found yet. If the question is not so clear, please ask to clearify. EDIT 1: @media print { div { page-break-before:auto; } } will it work for all div? I am defining it in gloabal.css. willit be ok? One more thing, i have found that, the problem is in Firefox only. in Chrome & IE, it works fine. Any solution for firefox?
has comment: http://stackoverflow.com/comment/38151870
type: UnansweredQuestion
tagged with: css
answer count: 0

dataflow
tags question: http://stackoverflow.com/q/24590841
tag name: dataflow
type: Tag

http://stackoverflow.com/comment/38376465
type: Comment
score: 1
has text: Could you please add the code of what you have tried so far.
type: QuestionComment
comment on: http://stackoverflow.com/q/24735822

http://stackoverflow.com/comment/38330567
comment on: http://stackoverflow.com/q/24714227
score: 0
type: Comment
type: QuestionComment
has text: Also, since you're using jQuery, you can use [`.hover()`](http://api.jquery.com/hover), which accepts two function parameters for `mouseenter` and `mouseleave`, to simplify your code.

http://stackoverflow.com/comment/38322485
has text: will you please post the same answer on the actual question asked in magento stack at http://magento.stackexchange.com/questions/26354/typeerror-image-elevatezoom-is-not-a-function-failure-in-magento-1-9-rwd-theme
comment on: http://stackoverflow.com/a/24672719
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/38379810
type: QuestionComment
type: Comment
has text: you cant do this clientside, you could fetch the page serverside .. or do some dirty yql-hack
comment on: http://stackoverflow.com/q/24739663
score: 0

http://stackoverflow.com/q/24641153
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has title: How to see if a drop down element is selected
has comment: http://stackoverflow.com/comment/38193337
has body: I am new to javascript, and I want to print out a selected item from a drop down menu. Here is the HTML code: &lt;fieldset&gt; &lt;label&gt;3. Select your operating system&lt;/label&gt;&amp;nbsp; &lt;select class="form-control" name="Os"&gt; &lt;option selected="selected" value="select one"&gt;- select one -&lt;/option&gt; &lt;optgroup label="Basic"&gt; &lt;option value="OSX"&gt;Mac OSX&lt;/option&gt; &lt;option value="windows"&gt;Windows&lt;/option&gt; &lt;/optgroup&gt; &lt;optgroup label="Advanced"&gt; &lt;option value="linux"&gt;Linux&lt;/option&gt; &lt;/optgroup&gt; &lt;/select&gt; &lt;/fieldset&gt; My javascript code is: &lt;script type= text/javascript&gt; var e = document.getElementByName("Os"); var strUser = e.options[e.selectedIndex].value; document.writeln(strUser); &lt;/script&gt; For some reason it won't print the selected value. Any ideas?
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24641173

http://stackoverflow.com/q/24621286
tagged with: greasemonkey
tagged with: javascript
has answer: http://stackoverflow.com/a/24621476
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: AnsweredQuestion
has title: Draw a Play button on canvas in javascript - triangle in a circle
linked to: http://stackoverflow.com/q/3688460
accepted answer: http://stackoverflow.com/a/24621476
type: Question
tagged with: canvas
has body: So I'm creating a simple userscript for me - I want to draw a play button over shaded version of any GIF image on the site to have them only played when I want to. I have inspired myself here. To make the whole thing nice, I'm drawing a green circle over the animation. This is my intended effect (I really wonder if once can make some shapes in GIMP): And this is what I currently have: The Cleese ironic face animation comes from this GIF portal I made a fiddle of my current GIF pauser userscript. The critical code for printing the circle: //Assume these variables var ctx = canvas context (2d) var w = canvas width var h = canvas height //The code: ctx.beginPath(); //I'm making sure the circle will always fit - therefore Math.min ctx.arc(w/2, h/2, Math.min(60, w/2-20, h/2-20), 0, 2 * Math.PI, false); ctx.fillStyle = 'rgba(0,180,0,0.5)'; ctx.fill(); ctx.lineWidth = 1; ctx.strokeStyle = 'red'; ctx.stroke(); ctx.closePath(); I hope it's clear that the triangle must always fit into the circle (size of which may vary). It must have the vertical line a little bit shorter then the other two, which must be of equal length. I'm totally not interested in any existing GIF pausing libraries. Keep in mind that the question is about the triangle, not the GIFs.

module
tags question: http://stackoverflow.com/q/24616001
type: Tag
tag name: module
tags question: http://stackoverflow.com/q/24722086
tags question: http://stackoverflow.com/q/24626101

http://stackoverflow.com/comment/38108533
type: Comment
comment on: http://stackoverflow.com/q/24597057
type: QuestionComment
score: 1
has text: just give the input a `readonly` attribute...it's from the 90's. why would you want to submit something the server already knows anyway?

http://stackoverflow.com/q/24632069
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38176663
has comment: http://stackoverflow.com/comment/38176584
has comment: http://stackoverflow.com/comment/38179518
type: Question
has comment: http://stackoverflow.com/comment/38178361
has title: Add button to close panel
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38177218
has comment: http://stackoverflow.com/comment/38175892
has comment: http://stackoverflow.com/comment/38176069
tagged with: firefox-addon
has comment: http://stackoverflow.com/comment/38179727
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38175913
accepted answer: http://stackoverflow.com/a/24632852
tagged with: firefox-addon-sdk
has comment: http://stackoverflow.com/comment/38180693
favorite count: 0
has comment: http://stackoverflow.com/comment/38179086
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/24632852
has body: I would like to add a close button to close a panel that appears in the browser. For that I have a javascript file that launches the prompt.html file that is my panel. var panel = require('sdk/panel').Panel({ width : 400, height : 400, contentURL : self.data.url('prompt.html') }); Then in my prompt.html I have the following : MyPanel MyPanel The script contains code to add nodes to the div and display a content. My question is : how can I add a button to close the panel ?

http://stackoverflow.com/comment/38227178
score: 0
comment on: http://stackoverflow.com/q/24657699
has text: An example would look like this: http://jsfiddle.net/GSLmE/1/
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24673612
upvote count: 2
type: UnansweredQuestion
has body: Hi! I am trying to receive a file with angularjs without page reloading and with a possibility to set a name for this file dynamically. For this I use the following block of code: var filename = "my_filename.txt"; var element = angular.element('&lt;a/&gt;'); element.attr({ href: "service/download/", target: '_blank', download: filename }); element[0].click(); This code works perfectly for Google Chrome, while it doesn't work for Firefox and Internet Explorer. In IE and FF nothing is happened after button click. Could you please point me in the right direction? How this issue can be investigated and fixed. Chrome version is 35.0.1916.153 Firefox version is 30.0 Internet Explorer version is 10.0.9200.16899 Thanks!
score: 2
has answer: http://stackoverflow.com/a/24673920
tagged with: google-chrome
type: Question
tagged with: internet-explorer
tagged with: firefox
has title: Element click does not work in Firefox and IE but works in Chrome
has comment: http://stackoverflow.com/comment/38253447
tagged with: javascript
has comment: http://stackoverflow.com/comment/38254165
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/24651340
possible better answer: http://stackoverflow.com/a/24651713
has comment: http://stackoverflow.com/comment/38212595
has title: how to show element if visible in view-port with jQuery? (UPDATE)
has comment: http://stackoverflow.com/comment/38212625
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24651931
accepted answer: http://stackoverflow.com/a/24651931
has body: I create a page that have flowing code: UPDATE HTML: CSS: .viewPort { border: 1px solid #ddd; width: 500px; height: 280px; overflow: scroll; position: relative; } .load { width: 900px; height: 900px; } .item { background: yellow; /** display: none; **/ width: 300px; height: 300px; float: left; } UPDATE jQuery: $('.load').on('mouseenter','.item',function(){ //$(this).css('display','block'); var getID = $(this).attr('id'); alert(getID); }); http://jsfiddle.net/mr_mohsen_rasouli/6Y29N/1/ and content are hidden! If I enter the mouse into .item the .item element became visible, that was bad. I decided and try to change the function to that when I scroll and enter item to viewPort become visible? but everything I tried did not work. How can I do that?
type: Question
has answer: http://stackoverflow.com/a/24651713
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38212434
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38379512
type: Comment
comment on: http://stackoverflow.com/a/24739150
score: 0
type: AnswerComment
has text: @cantera no, because the JavaScript `&&` operator returns the first non-false value *without converting it to boolean*. Thus, the return value will be either `0` or a non-empty jQuery object.

http://stackoverflow.com/q/24622737
downvote count: 1
has answer: http://stackoverflow.com/a/24622849
type: Question
possible better answer: http://stackoverflow.com/a/24622787
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24622927
accepted answer: http://stackoverflow.com/a/24622927
answer count: 3
tagged with: google-maps
has title: Problems with map: draw route with 2 coordinates
upvote count: 1
tagged with: javascript
has body: Sorry if it's something that has already been asked before. I want to load a map with 2 markers, starting and destination. When establishing 2 markers, I drew the path to follow (Mode: Drive). When I choose 2 markers, I get this error: "Uncaught InvalidValueError: in property origin: not a string; and not a LatLng or LatLngLiteral: not an Object" Please, help me with this! Simple Map
favorite count: 0
has answer: http://stackoverflow.com/a/24622787
tagged with: google-maps-api-3
score: 0

http://stackoverflow.com/a/24802963
has body: CORS is applicable only in a browser context. So, for it to work with PouchDB, you have to set the CouchDB CORS Headers to allow whatever domain you are accessing it from. CORS is a security feature meant only for browsers. Browsers try to protect the users from the website which otherwise may make AJAX requests to other domains. For example: when you are on stackoverflow.com and if it tries to make a AJAX request to mail.google.com, then your browser has a reason to believe that this may not be allowable by mail.google.com. Hence, it asks mail.google.com through a OPTIONS request to tell if stackoverflow.com is white-listed to make that particular request. If it does, then browser allows the actual request. Otherwise, it will block it as an error. Now, as far as curl or any other non-browser request tool is concerned, they work differently. They are a representative of you and hence it is assumed that you would not be doing anything wrong to yourself.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24661295
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24661295
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/38446117
comment on: http://stackoverflow.com/q/24652017
has text: @m.casey Thanks, but it doesn't work like that in Angular. $digest is not called when I push an item to an array. Specifically in my example it doesn't matter, since I only measure my own call the $digest method and if other stuff takes a lot of time, I just don't measure how much time they took.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24627026
favorite count: 0
has comment: http://stackoverflow.com/comment/38167312
score: 11
tagged with: lodash
answer count: 4
upvote count: 11
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24628719
has comment: http://stackoverflow.com/comment/38166893
has comment: http://stackoverflow.com/comment/38166824
type: Question
has comment: http://stackoverflow.com/comment/38167162
has body: I spent hours on the Lo-Dash documentation site now, and can't find a solution for my problem. I don't know how it's called, so it is a bit hard to search for. I basically want to group an array into an object so that duplicate entries are a field while different entries are an array. For example, I have this array: var characters = [ { 'name': 'barney', 'age': 42, 'pet': 'dog' }, { 'name': 'fred', 'age': 35, 'pet': 'dog' }, { 'name': 'barney', 'age': 42, 'pet': 'cat' }, { 'name': 'fred', 'age': 35, 'pet': 'goldfish' } ]; And I want to get this: [ { name: 'barney', age: 42, pet: [ 'dog', 'cat' ] }, { name: 'fred', age: 35, pet: [ 'dog', 'goldfish' ] } ] Is there a Lo-Dash method for doing this, or do I have to chain several ones? What is the best way to achieve this?
has answer: http://stackoverflow.com/a/32201602
has comment: http://stackoverflow.com/comment/38167065
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/38166808
tagged with: javascript
has comment: http://stackoverflow.com/comment/38167970
has answer: http://stackoverflow.com/a/38365031
accepted answer: http://stackoverflow.com/a/24628719
has title: Lo-Dash array grouping
possible better answer: http://stackoverflow.com/a/38365031
has answer: http://stackoverflow.com/a/24627805

http://stackoverflow.com/comment/38193316
type: QuestionComment
comment on: http://stackoverflow.com/q/24640517
type: Comment
has text: +1 for the entertaining demo:)
score: 0

http://stackoverflow.com/comment/38326573
has text: You can use http://esprima.org for example.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24712009
score: 3

http://stackoverflow.com/a/24749277
has comment: http://stackoverflow.com/comment/38405172
has comment: http://stackoverflow.com/comment/38400320
accepted answer of: http://stackoverflow.com/q/24748313
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38402808
answers question: http://stackoverflow.com/q/24748313
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/38401975
has comment: http://stackoverflow.com/comment/56000448
upvote count: 3
has comment: http://stackoverflow.com/comment/38400278
has body: You're really close, just a couple of things. We need to create an AngularFire binding by passing in a Firebase reference. Since we're using ng-model we can grab the properties from $scope. However, it's probably a good idea to provide a default value for the name and comment properties. When we call addMessage we need to go to a child location for messages by calling $child. Then we can add a new message by calling $add. Plunker Demo app.controller('CommentCtrl', ['$scope', '$firebase', function($scope, $firebase){ var myRootRef = new Firebase("my://app/link"); $scope.messages = $firebase(myRootRef); // AngularFire binding created here // default values $scope.name = ''; $scope.msg= ''; $scope.addMessage = function() { // go to the messages location and push the item by calling $add $scope.messages.$child('messages').$add({ name: $scope.name, comment: $scope.msg }); // clear out the values after adding them to Firebase $scope.msg= ''; $scope.name = ''; $scope.modal.hide(); } }]);
has comment: http://stackoverflow.com/comment/38402939
has comment: http://stackoverflow.com/comment/38400138
has comment: http://stackoverflow.com/comment/55985055

http://stackoverflow.com/q/24744178
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38388380
has comment: http://stackoverflow.com/comment/38387972
has comment: http://stackoverflow.com/comment/38388190
has answer: http://stackoverflow.com/a/24808633
has comment: http://stackoverflow.com/comment/38388660
has comment: http://stackoverflow.com/comment/38388502
tagged with: css
has comment: http://stackoverflow.com/comment/38388534
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38388770
has title: Class of an object doesn't change the first time, after that it does
possible better answer: http://stackoverflow.com/a/24744861
type: Question
has body: Now, the title might seem a little vague, because my question is a bit hard to describe in one sentence. I'll try to explain it as good as possible. My website has a fixed header, and in that are 4 buttons. I made a little javascript file that changes the class of each button whenever you click it (If you click a button, the class changes to "menuButtonSelected" and all the other classes change to "menuButton"). Here's my javascript file: function setButtonOne() { if(document.getElementById("buttonOne").className == "menuButton") { document.getElementById("buttonOne").className = "menuButtonSelected"; document.getElementById("buttonTwo").className = "menuButton"; document.getElementById("buttonThree").className = "menuButton"; document.getElementById("buttonFour").className = "menuButton"; } else if(document.getElementById("buttonOne").className == "menuButtonSelected") { // Do nothing } } function setButtonTwo() { if(document.getElementById("buttonTwo").className == "menuButton") { document.getElementById("buttonTwo").className = "menuButtonSelected"; document.getElementById("buttonOne").className = "menuButton"; document.getElementById("buttonThree").className = "menuButton"; document.getElementById("buttonFour").className = "menuButton"; } else if(document.getElementById("buttonTwo").className == "menuButtonSelected") { // Do nothing } } function setButtonThree() { if(document.getElementById("buttonThree").className == "menuButton") { document.getElementById("buttonThree").className = "menuButtonSelected"; document.getElementById("buttonTwo").className = "menuButton"; document.getElementById("buttonOne").className = "menuButton"; document.getElementById("buttonFour").className = "menuButton"; } else if(document.getElementById("buttonThree").className == "menuButtonSelected") { // Do nothing } } function setButtonFour() { if(document.getElementById("buttonFour").className == "menuButton") { document.getElementById("buttonFour").className = "menuButtonSelected"; do…
tagged with: javascript
has answer: http://stackoverflow.com/a/24744861
has comment: http://stackoverflow.com/comment/38388854
accepted answer: http://stackoverflow.com/a/24808633
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38388323

http://stackoverflow.com/comment/38278384
score: 0
type: Comment
type: QuestionComment
has text: The first character in HTML (excluding white spaces) will always be `<`
comment on: http://stackoverflow.com/q/24686588

http://stackoverflow.com/a/24701512
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38362388
type: Answer
answers question: http://stackoverflow.com/q/24698175
has comment: http://stackoverflow.com/comment/38356206
has body: You could select every element within the body with $("body *") and apply jQuery's .filter() to it. Working example: var $elementsContainingData $("body *").filter(function() { if($.hasData(this)) return this; }); console.log($elementsContainingData); Edit As @spokey mentioned before, there's an internal variable named "cache" within the jQuery object: $.cache. This variable consists of a bunch of objects which contain keys like "data" or "events": 5: Object data: Object events: Object handle: function (a){return typeof m===K||a&amp;&amp;m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)} __proto__: Object You can iterate through that object and filter for the data: var filteredCache = $.each($.cache,function() { if(typeof this["data"] === "object") return this; }); Here's an working example plus a function to merge that stuff into a single and more handy object consisting only of dataKey => dataValue pairings: Fiddle Edit As mentioned in comments this solution does not work in jQuery version 2.x since $.cache is deprecated. My last suggestion is creating a hook for jQuerys data function in order to extend an own object$.dataCache = {}; each time data() is called. Extending, replacing or adding jQuerys functions is done by accessing $.fn.functionName: $.fn.data = function(fn,hook) { return function() { hook.apply(this,arguments); return fn.apply(this,arguments); } }($.fn.data,function(key,value) { var objReturn = {}; objReturn[key] = value; $.extend($.dataCache,objReturn); }); This also works great in jQuery version 2: Fiddle
accepted answer of: http://stackoverflow.com/q/24698175
has comment: http://stackoverflow.com/comment/38383291
upvote count: 1
has comment: http://stackoverflow.com/comment/38376516
score: 1
has comment: http://stackoverflow.com/comment/38380826
has comment: http://stackoverflow.com/comment/38310315

http://stackoverflow.com/comment/38285491
has text: I think this question is misleading. Are you really trying to set the controller dynamically, or just change the contents of $scope ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24639491
score: 0

http://stackoverflow.com/comment/38374870
has text: I would also check that the this.map.removeMarkers() isn't removing the markers you want to see. I don't see you adding the marker to an array, unless you are doing it in the init. If you are doing it in the init then you need to add the listener inside the init or add the listener before the init.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24701576

http://stackoverflow.com/comment/38213399
has text: Thank you. I forgot it wasn't display:none the the parent div was.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24651703

http://stackoverflow.com/q/24704357
has answer: http://stackoverflow.com/a/24705012
downvote count: 1
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has body: @{ var db = Database.Open("CMS"); //retrieving the username of the user from the session var session_username = Session["session_username"]; //get the details of the user from the database var getuserdetailscommand = "SELECT * from student where student_username = @0"; var getuserdetailsdata = db.Query(getuserdetailscommand, session_username); var statusfirstname = ""; var statuslastname = ""; var statusavatar = ""; foreach(var row in getuserdetailsdata){ statusfirstname = row.student_firstname; statuslastname = row.student_lastname; statusavatar = row.student_avatar; } //on submit execute the following queries if(IsPost){ if(Request["button"] == "sharestatus"){ //retrieve the data from the form input fields var statusbody = Request.Form["statusbody"]; var statususername = session_username; //insert the status for the username into the database var insertcommand = "INSERT into status(status_body, status_date, status_username, status_firstname, status_lastname, status_avatar) VALUES (@0, @1, @2, @3, @4, @5)"; db.Execute(insertcommand, statusbody, DateTime.Now, session_username, statusfirstname, statuslastname, statusavatar); } } } Share This is the code in my cshtml file. I want to submit the form using ajax so that the whole page doesn't get refreshed everytime a user submits anything. The C# code necessary to run the form is also provided in the code. Any help how can I submit the for using ajax? Thank you!
has answer: http://stackoverflow.com/a/24704823
type: Question
has answer: http://stackoverflow.com/a/24710707
tagged with: c#
tagged with: javascript
tagged with: jquery
score: -1
tagged with: ajax
answer count: 3
has title: Submitting a cshtml form using ajax

http://stackoverflow.com/a/24631035
type: Answer
answers question: http://stackoverflow.com/q/24630962
has body: Remove the curly braces {{ }} wrapping around note.noteId from the jade template in order to make it work so it will be: button.btn.btn-default.pull-left(ng-click="download(note.noteId,'all')") Download
has comment: http://stackoverflow.com/comment/38233841
has comment: http://stackoverflow.com/comment/38174611
has comment: http://stackoverflow.com/comment/38173918
score: 0
has comment: http://stackoverflow.com/comment/38174727
has comment: http://stackoverflow.com/comment/38232149

http://stackoverflow.com/a/25720980
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/24602728
has body: Put this on your code, origin: new google.maps.Point(0,0), anchor: new google.maps.Point(anchor_left, anchor_top)
score: 0
type: Answer

http://stackoverflow.com/comment/38241132
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24666424
type: Comment
has text: I tried this but unfortunately I'm still not seeing a location of where the other enemies are on the map

http://stackoverflow.com/comment/38206200
has text: I want to change the text to a different language, that's it.
type: Comment
comment on: http://stackoverflow.com/q/24630849
score: 0
type: QuestionComment

http://stackoverflow.com/q/24714949
downvote count: 0
possible better answer: http://stackoverflow.com/a/24715076
score: 6
has title: Alert On Button Click And Move User To Opened New Tab
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24715085
type: Question
has answer: http://stackoverflow.com/a/24715085
has answer: http://stackoverflow.com/a/24715112
upvote count: 6
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38331842
answer count: 3
has body: I have Created a Button With Link Which opens in new tab. I have also used javascript to alert. Currently this code is working perfectly. But After Clicking OK in Alert, user stays on same page. But I Want To Move User To New Opened Tab. Is it possible ? My Code Is - &lt;form&gt;&lt;input type="button" id="anchor1" style="cursor:pointer" value="Click Here" onClick="window.open(href='http://www.google.com')"&gt;&lt;/form&gt; &lt;script type="text/javascript"&gt; var anchor = document.getElementById('anchor1'); // or anchor = getElementsByTagName('a') then do ('a')[0] anchor.addEventListener('click', doSomething, false); function doSomething() { alert('You Are About To Open New Tab'); } &lt;/script&gt; Help Needed Here Is My JSFIDDLE
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24715076
has comment: http://stackoverflow.com/comment/38331863
has comment: http://stackoverflow.com/comment/38331875

http://stackoverflow.com/q/24730166
has comment: http://stackoverflow.com/comment/38361714
score: 7
has answer: http://stackoverflow.com/a/24730190
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24730180
upvote count: 7
favorite count: 0
has title: how to check falsy with undefined or null?
has body: undefined and null are falsy in javascript but, var n = null; if(n===false){ console.log('null'); } else{ console.log('has value'); } but it returns 'has value' when tried in console, why not 'null' ?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24730230
has answer: http://stackoverflow.com/a/24730306
answer count: 4
downvote count: 0

http://stackoverflow.com/comment/38131804
comment on: http://stackoverflow.com/q/24609063
type: QuestionComment
has text: Well, obviously, you didn't post all your code here. Give us more.
score: 0
type: Comment

http://stackoverflow.com/comment/38234237
type: Comment
comment on: http://stackoverflow.com/q/24662792
type: QuestionComment
has text: Usually $(form).serialize(); does the trick. It returns the form data in a query string that you can post to the server.
score: 1

http://stackoverflow.com/comment/38390591
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24745517
has text: Without creating the option elements yourself I don't believe you're going to be able to add custom attributes to them. Angular manages selects behind the scenes for you, allowing you to get back whole objects when options are selected rather than just the value of the `value` attribute, etc. I think your best bet is going to be `ng-repeat` on the options elements. Also, how is that less performant? It's performing similar iteration logic behind the scenes when you do ng-options anyway.
score: 0

http://stackoverflow.com/q/24649974
has answer: http://stackoverflow.com/a/24650198
has comment: http://stackoverflow.com/comment/38209993
type: Question
answer count: 1
has body: I'm new to jQuery and I have no idea why I'm getting this error could someone explain and give a solution?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38209937
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: JavaScript runtime error: Object doesn't support property or method 'autocomplete'
tagged with: jquery-ui

http://stackoverflow.com/a/24669166
has comment: http://stackoverflow.com/comment/38245187
answers question: http://stackoverflow.com/q/24669109
has comment: http://stackoverflow.com/comment/38245249
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38245219
has comment: http://stackoverflow.com/comment/38245276
has body: The arguments variable is an array: you are passing an array as the first argument. What is happening is that it is iterating the arguments array, and calling .toString() on each celebrity's array, which automatically adds the commas. What you want is to iterate arguments[0]. Something like: for (var i=0; i &lt; arguments[0].length; i++) { msg += arguments[0][i] + " "; }
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24669109

http://stackoverflow.com/a/24675083
has body: It seems your bars are too thin for the hover to trigger. You might need to put a barWidth in your bars options. By default, the barwidth is 1, in x-axis unit. In a time axis, 1 = 1ms, and at your scale, a one ms width bar isnt represented (we only see the stroke, not the bar itself) From the doc: "barWidth" is the width of the bars in units of the x axis (or the y axis if "horizontal" is true), contrary to most other measures that are specified in pixels. For instance, for time series the unit is milliseconds so 24 * 60 * 60 * 1000 produces bars with the width of a day. example: bars: { show: true, fill: true, order: 2, barWidth: 1*3600*1000 } Here is your fiddle with barwidth set at 1 hour: http://jsfiddle.net/zNXBd/42/
accepted answer of: http://stackoverflow.com/q/24673625
answers question: http://stackoverflow.com/q/24673625
upvote count: 5
type: AcceptedAnswer
downvote count: 0
score: 5
type: Answer

http://stackoverflow.com/q/24591406
favorite count: 0
has answer: http://stackoverflow.com/a/24594970
has comment: http://stackoverflow.com/comment/38098229
has comment: http://stackoverflow.com/comment/38104707
downvote count: 1
has title: My script runs perfectly until I wrap it in this if (screen.width < 980) { } statement to check screen size
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24594970
has comment: http://stackoverflow.com/comment/38104214
score: 3
tagged with: if-statement
has comment: http://stackoverflow.com/comment/38101122
type: Question
upvote count: 4
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38101008
has body: @John Ok, I had the greater than sign mixed up. The simple things....What I'm looking to do is have codeMagic() run on page load only if the browser.width() > 941px, if the page is resized < 941px stop codeMagic() from running. If the page is again resized & the browser width is >= 941px turn codeMagic() on. Then of course if the page loads less than 941px don't run codeMagic(), but keep the resizing awareness. Here is my example code: CSS: HTML: home! footer! JS: jQuery( document ).ready(function($) { // set element height based on 'window height' - 'footer height' function codeMagic() { var docHeight = parseInt($( window ). height()); var footerHeight = parseInt($( 'footer' ).outerHeight( true )); var homeHeight = +docHeight - +footerHeight + 'px'; $( 'body #home' ).height(homeHeight); console.log( homeHeight, footerHeight); }; if (jQuery(window).width() >= 941) { codeMagic(); // init codeMagic //Set codeMagic to run on browser resize $( window ).resize( function() { codeMagic(); }); } }); What is the proper way to do this?

http://stackoverflow.com/a/24750226
has body: It turns out that using $location.path('/xxx') wasn't enough, I needed to also use res.redirect on the express side for the redirect to actually work. (Had to use both).
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/24742637
type: Answer
answers question: http://stackoverflow.com/q/24742637

http://stackoverflow.com/comment/38159557
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24622504
has text: Which label do you mean? I'm seeing the year label change to 2014 after the transition.

http://stackoverflow.com/comment/38389325
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24744423
score: 0
has text: Are the notification_id and the response.notification_id expected to match?

datatable
tags question: http://stackoverflow.com/q/24693134
tags question: http://stackoverflow.com/q/24747067
tag name: datatable
tags question: http://stackoverflow.com/q/24636193
tags question: http://stackoverflow.com/q/24642456
type: Tag
tags question: http://stackoverflow.com/q/24610233
tags question: http://stackoverflow.com/q/24740990
tags question: http://stackoverflow.com/q/24683596
tags question: http://stackoverflow.com/q/24681641

http://stackoverflow.com/comment/38396944
type: Comment
has text: I guess I should have asked how to uncheck it with No button. I see .prop(checked,false)option but it breaks things when i duplicate the code above with the no radio button and the false attribute.
score: 0
comment on: http://stackoverflow.com/a/24748797
type: AnswerComment

http://stackoverflow.com/q/24703761
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/38310327
type: Question
accepted answer: http://stackoverflow.com/a/24704963
answer count: 1
tagged with: javascript
score: 0
has title: my .json file is not accessible from d3.json
has comment: http://stackoverflow.com/comment/38435557
has body: Here is my script to create a line chart. The json file is not accessible from the d3.json () command. I am new to d3.js in general and I am using Dimple.js for plotting charts picking data from back end. I have also listed the json content below from my file. var svg = dimple.newSvg("#charts", 800, 600); d3.json("C:/dev/reports/data1.json", function (jsonfile) { // Create a new chart object based on this data and svg var myChart = new dimple.chart(svg, data); myChart.addCategoryAxis("x", "Word"); myChart.addMeasureAxis("y", "Awesomeness"); myChart.addSeries(null, dimple.plot.line); myChart.draw(); }); JSON content: [ { "Word":"Hello", "Awesomeness":2000 }, { "Word":"World", "Awesomeness":3000 } ]
tagged with: d3.js
has answer: http://stackoverflow.com/a/24704963

http://stackoverflow.com/a/24599909
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/38114070
answers question: http://stackoverflow.com/q/24599843
downvote count: 0
score: 1
has body: I created jsfiddle and it works -- http://jsfiddle.net/volkhin/YGgzL/, I only added result object as var result = {a: 1, b: 2};. The only things that comes to my mind is that result is not simple object. It definitely will not work for null, undefined, numbers and so on. Edit: Then I believe it's due to getters/setters. And it would be better to avoid modifying such object because modifying it can lead to unknown consequences inside mongoose. If you just need to access some data in this object you can try create shallow copy (for example, using underscorejs _.clone or manually iterating over its keys) which will return simple object. Which you can modify, of course. But I'm not sure if it will contain all the data -- again, it might heavily depend on getters/setters.

http://stackoverflow.com/q/24664610
has comment: http://stackoverflow.com/comment/38237501
upvote count: 1
has title: How do I run jquery after anchor tag click?
has answer: http://stackoverflow.com/a/24664641
type: Question
has comment: http://stackoverflow.com/comment/38237627
has comment: http://stackoverflow.com/comment/38237639
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24664652
answer count: 2
downvote count: 0
score: 1
has body: I Have an anchor tag like this: Java Hello paragraph for . When I click it I want to go to my second page and append a paragraph within that div how do I accomplish this here's my jquery but it doesn't seem to work? $(document).ready(function(){ $("a#seeVid").click(function(){ $('div.allVid').append(" Second Paragraph "); }); }); Here I am trying to see when my anchor tag with the id "seeVid" is clicked and then I go to my div in my second page with class "allVid" and I want to append a paragraph, but this isn't working?
has comment: http://stackoverflow.com/comment/38237581
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4656843
linked to: http://stackoverflow.com/q/503093
has comment: http://stackoverflow.com/comment/38237659

http://stackoverflow.com/q/24718350
score: 9
type: Question
answer count: 2
has title: element.replaceWith in a custom directive's link only work at first time called
accepted answer: http://stackoverflow.com/a/24718593
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I am new to Angularjs, and don't understand too much behind the scene. Basically I want to create an 'E' kink directive, base on the data in controller I dynamically create the html, like a whole 'table' thing, to replace the directive. The directve in my html file is like this: &lt;matrixrows&gt;&lt;/matrixrows&gt; My directive code is like this: angular.module('matrix', [.....]) .directive('matrixrows', [..., function (...) { return { restrict: 'E', replace: true, require: '^matrix', link: function (scope, element, attr, ctrl) { ......... scope.$watch('currentPage', function (newValue, oldValue) { if (newValue &amp;&amp; newValue != oldValue) { var html = ""; ....................... here is the code to generate the html ....................... element.replaceWith(html); } }); } }]) Through watching currentPage's change I recreate the html and replace the directive tag. When the first time I change 'currentPage', the element.replaceWith(html) works fine. Then I change 'currentPage angin, the watching function will be triggered, but the element.replaceWith(html) won't work. Then I stepped into Angularjs source code, I found, after the first time element.replaceWith's execution, element[0].parentNode became null, this caused the replaceWith crash. Anybody know how to make it work?
tagged with: angularjs
has answer: http://stackoverflow.com/a/32847819
has answer: http://stackoverflow.com/a/24718593
tagged with: angularjs-directive
type: AnsweredQuestion
upvote count: 9
possible better answer: http://stackoverflow.com/a/32847819

http://stackoverflow.com/q/24740611
favorite count: 0
accepted answer: http://stackoverflow.com/a/24790042
has comment: http://stackoverflow.com/comment/140219235
score: 13
tagged with: favicon
linked to: http://stackoverflow.com/q/6642
upvote count: 13
linked to: http://stackoverflow.com/q/9150691
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/120420
linked to: http://stackoverflow.com/q/23849377
linked to: http://stackoverflow.com/q/55113724
type: Question
has answer: http://stackoverflow.com/a/24790042
has title: multiple favicon sizes, How, Where and when to use them?
tagged with: javascript
linked to: http://stackoverflow.com/q/626371
linked to: http://stackoverflow.com/q/37073
has body: I was reading an article(s): Create a favicon for your site and Why so many files?. According to them, If you need to use an favicon for various purposes, you'll need to create different for each purpose(For tiles in WIN8, For speed dial in Opera &amp; Chrome). Okay That's fine, I still use an 16X16 .ico file which I think is suitable for optimization purposes. But now after reading those articles, I've various questions like(Assume that I've created various icons for various purposes using photoshop): -How to detect that which icon should be served to browser (how to detect that browser is asking favicon for showing it in address bar? or for to save as tile? or for a speed dial?) -How to serve that specific icon to browser without losing speed of connection because of large icon size? -what lines of (html)code should be added where in html(file) for the specified purpose? Currently for 16X16 icon I use: &lt;link rel="icon" type="image/x-icon" href="favicon.ico"/&gt; &lt;link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/&gt;&lt;!-- IE8 --&gt; -By Loading all the icons on index.html page, can a browser cache them all for all the subpages?(By placing all the icons in root directory of site?) -But again that will affect the performance of site by increasing the load time of index page itself. so, Is there anyway to detect for which purpose the favicon is needed and then to serve it dynamically(using JavaScript for example), without losing speed of page load? Also how to have a favicon for chromes webstore?(ie, what lines of (html)code). Hope experts here will help me. Thanks in advance. PS: I've already read: How to have multiple favicon sizes, yet serve only a 16x16 by default? , Image icon beside the site URL , What is currently the best way to get a favicon to display in all browsers that support Favicons? , Preferred way to use favicons? and How can I add a picture in address bar of the browser when my page is browsed? . But they were of very little o…
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/2057636
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/38185857
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24637249
has text: http://stackoverflow.com/questions/22945735/condensing-a-collection-of-objects-using-underscore-js
score: 0

http://stackoverflow.com/comment/38256597
type: QuestionComment
comment on: http://stackoverflow.com/q/24670598
score: 2
has text: Store the mouse position in the onmove handler. If you get another onmove event fired, where the current coords are the same as last time, you know that it's a click, not a move.
type: Comment

http://stackoverflow.com/comment/38127369
has text: You are welcome. And by the way it is a general performance advice: reduce the amount of DOM access/modifications. If something can be accomplished without javascipt - do not use javascript. Especially for older browsers (IE < 9) :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24605840
type: AnswerComment

http://stackoverflow.com/comment/38497316
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24728955
has text: I will explore this in a few moments, as I am just now getting into work. Thank you again for all of your help. I clearly have so far to go on learning javascript ...

http://stackoverflow.com/q/24664079
has comment: http://stackoverflow.com/comment/38245069
answer count: 1
downvote count: 0
tagged with: tooltip
tagged with: javascript
has answer: http://stackoverflow.com/a/24702554
favorite count: 0
has body: I'm looking to modify the out-of-the-box tooltips for dc.js, and it seems there is a solution using d3.js tooltips as in this question. However, I'm confused about how to implement this so that the tooltip is modified for all linked graphs in a dc.js dashboard. The examples in the GitHub repo lend themselves well to individual graphs, but I'm currently working with six linked graphs and need to modify tooltips on all graphs. Any help would be appreciated.
has title: d3-tooltips for multiple linked dc.js charts
linked to: http://stackoverflow.com/q/21992972
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/24702554
type: AnsweredQuestion
upvote count: 9
tagged with: dc.js
has comment: http://stackoverflow.com/comment/38283822
type: Question
score: 9

http://stackoverflow.com/q/24638492
has body: I have checkbox which onchange calls a function and does some operations. At the end of the function I get 2 values. I need to send these values to the server onsubmitting the form. How can i do this?? myjsp &lt;script&gt; function fnsimplecalc(){ //some calculations... var w1=/*some value*/; var w2=/*some value*/; } &lt;/script&gt; &lt;form name="test" id= "testid" action="Controller" method="post" &gt; &lt;input type="checkbox" id="checkid" onchange="fnsimplecalc()"&gt; &lt;/form&gt; I need to submit the form to the server after i get the values from the fnsimplecalc() function. How do I do this?
has comment: http://stackoverflow.com/comment/38188451
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38188349
accepted answer: http://stackoverflow.com/a/24638678
has comment: http://stackoverflow.com/comment/38188277
has title: Onchange of a checkbox call a function , get return values and then submit form
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/24638678
answer count: 1
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/38188577
downvote count: 1
favorite count: 0
upvote count: 0

http://stackoverflow.com/a/27689041
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24671240
has body: After wasting 1 day i came up with the following code(solution), hope it may save someone's time ... in my return url ("http://stereotribes.dev/login") i have written following code ... if($_REQUEST['code']) { $model-&gt;getPaypalEmail($_REQUEST['code']); } $_REQUEST['code'] (token) will be send by paypal and same code we have send back via curl to confirm identity... public function getPaypalEmail($code){ if($code){ $strGetCodePaypalLoginDetails = $code; if ($strGetCodePaypalLoginDetails != '') { // Change this curl_init url according to your environment. $ch = curl_init("https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice"); $flag_result = 1; curl_setopt_array($ch, array( CURLOPT_POST =&gt; 1, CURLOPT_POSTFIELDS =&gt; 'client_id=********&amp;client_secret=*****&amp;grant_type=authorization_code&amp;code=' . $strGetCodePaypalLoginDetails, CURLOPT_RETURNTRANSFER =&gt; 1 ) ); $arrResponse = curl_exec($ch); if ($arrResponse === false) { $arrResponseToken = 'Curl error: ' . curl_error($ch); $flag_result = 0; } else { //Operation completed without any errors $arrResponse = json_decode($arrResponse); $strAccess_Token = $arrResponse-&gt;{'access_token'}; // Change this curl_init url according to your environment. $chToken = curl_init("https://api.sandbox.paypal.com/v1/identity/openidconnect/userinfo/?schema=openid&amp;access_token=" . $strAccess_Token); curl_setopt_array($chToken, array( CURLOPT_RETURNTRANSFER =&gt; 1 ) ); $arrResponseToken = curl_exec($chToken); if ($arrResponseToken === false) { $arrResponseToken = 'Curl error: ' . curl_error($chToken); $flag_result = 0; } } } $arrResponseToken = json_decode($arrResponseToken, true); print_r($arrResponseToken); //here you will get info from paypal } }
accepted answer of: http://stackoverflow.com/q/24671240
score: 0

http://stackoverflow.com/a/24596988
downvote count: 3
upvote count: 0
has body: I hope i understood your problem well. Please check the fiddle This is the sample text This is the sample text This is the sample text #list { position:relative; } #list li { margin-left : 30px; line-height: 25px; margin-bottom:5px; } #list li:before { width:50px; line-height:25px; background:#ddd; content:'Delete'; position:absolute; left:0px; text-align:center; border:1px solid #777; }
score: -3
type: Answer
answers question: http://stackoverflow.com/q/24596877

http://stackoverflow.com/a/24719056
has body: Try to avoid using ID's except where absolutely necessary. When referencing HTML snippets from CSS or JS, stick to classes instead of IDs. Your CSS and JS shouldn't really care (separation of concerns) about the exact structure of the DOM or how many 'foo' elements are on the page... they just want to style or act on whatever 'foo' elements are there which classes are perfectly suitable for. You can't avoid ID's entirely though... for example, marking up your HTML to support accessibility will require the use of IDs... but these IDs and references to them will be constrained to the same HTML file (or SPA template) so go ahead and make them verbose/lengthy to avoid conflicts if you feel a conflict is possible with any of them. Of course this doesn't totally solve your problem. By focusing on classes you avoid the possibility of generating invalid HTML and everything blowing up but you still have the collaboration problem of making sure people aren't unexpectedly screwing up each other's work by using the same class names. In many cases, you'll actually want the same classes to be used across pages. In cases where you want to ensure there are no conflicts (for example, having common button or typography styles across the site), however, you could wrap each HTML template in something like &lt;div class='name-of-this-template'&gt;...&lt;/div&gt; and then in your CSS/JS selectors, scope the selector to only match within that template: .name-of-this-template .a-class-used-within-the-template.
downvote count: 2
has comment: http://stackoverflow.com/comment/38340188
upvote count: 5
answers question: http://stackoverflow.com/q/24689046
score: 3
type: Answer

http://stackoverflow.com/comment/38316264
comment on: http://stackoverflow.com/q/24706471
score: 0
type: QuestionComment
has text: I have learned more here https://coderwall.com/p/40axlq
type: Comment

http://stackoverflow.com/a/24692863
answers question: http://stackoverflow.com/q/24689672
has comment: http://stackoverflow.com/comment/38323058
score: 0
has comment: http://stackoverflow.com/comment/38335253
has body: At the moment, your values will be available in Request["id"] as a comma-separated list. That is because you have multiple elements in the same form with the same name attribute value. You can process the values on the server individually by using the string.Split method: if(IsPost &amp;&amp; !Request["id"].IsEmpty()){ foreach(var id in Request["id"].Split(new[]{','}, StringSplitOptions.RemoveEmptyEntries)) // process the id } }
type: Answer

http://stackoverflow.com/comment/38319394
score: 0
has text: sure :D if have question just tell me
comment on: http://stackoverflow.com/a/24689573
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24588159
answers question: http://stackoverflow.com/q/24588120
has comment: http://stackoverflow.com/comment/38092011
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/38091985
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38092374
has comment: http://stackoverflow.com/comment/38092037
has body: You could try the below regex to capture Key,Value pair separately \s*(\S+)\s*:\s*([^;\s]*(?:\s*\w+)) DEMO
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38092322
accepted answer of: http://stackoverflow.com/q/24588120
has comment: http://stackoverflow.com/comment/38091528

http://stackoverflow.com/a/24598258
type: Answer
has comment: http://stackoverflow.com/comment/38113205
has comment: http://stackoverflow.com/comment/38113113
has comment: http://stackoverflow.com/comment/38111045
score: 1
answers question: http://stackoverflow.com/q/24597856
has comment: http://stackoverflow.com/comment/38112964
upvote count: 1
has comment: http://stackoverflow.com/comment/38112852
downvote count: 0
has comment: http://stackoverflow.com/comment/38110982
has body: two.forEach(function(o){ var key = [o.from.sid, o.from.id, o.to.id].join('-'); if(key in one) o.oneid = { id: one[key] }; }); Javascript in operator Array.prototype.forEach Polyfill (for old browsers)

http://stackoverflow.com/q/24742150
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38385129
upvote count: 6
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/38385903
has comment: http://stackoverflow.com/comment/38384267
has answer: http://stackoverflow.com/a/24743237
type: Question
has body: I just learned about contenteditable and I would like to use it in my project here. So, I have commented out on("click", ..) for &lt;p&gt; and I have added that attribute to it in the HTML. But, the content is not editable. I am not sure why it is not working. I also added the DOCTYPE but it made no difference. There is not error in the console. Can anyone please point me in the right direction? jsFiddle EDIT: Recreating the problem: Try adding an item with the Add button. Now, if you click on the newly added item, it should be editable, but it isnt.
has title: contenteditable not working
has comment: http://stackoverflow.com/comment/38384342
has comment: http://stackoverflow.com/comment/38384467
tagged with: javascript
has comment: http://stackoverflow.com/comment/38386378
score: 4
has comment: http://stackoverflow.com/comment/38384374
answer count: 1
accepted answer: http://stackoverflow.com/a/24743237
tagged with: jquery

http://stackoverflow.com/a/24642276
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24642201
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38195456
has body: What about setting a default for the menu position? like so... var menu = $('.menu'); var menuposition = menu.offset() || {top:0}; $('.other').css('top', menuposition.top + 100);

http://stackoverflow.com/a/24662842
has comment: http://stackoverflow.com/comment/38234624
has body: jQuery provides a serializeArray function that will serialize the form data into an array. You can then take the resultant array and create a data object out of it. var arrayData = $('#myForm').serializeArray(), data = {}, i = 0; for(; i &lt; arrayData.length; i++) { data[arrayData[i].name] = arrayData[i].value; } Alternatively, jQuery provides as serialize function that provides a serialized string of the form data. var data = $('#myForm').serialize();
score: 0
has comment: http://stackoverflow.com/comment/38234478
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/38234280
answers question: http://stackoverflow.com/q/24662792
downvote count: 1
has comment: http://stackoverflow.com/comment/38234456
has comment: http://stackoverflow.com/comment/38234335

http://stackoverflow.com/comment/38303726
type: QuestionComment
has text: Have you tried inspecting your traffic with Wireshark to make sure that Node isn't actually getting a response?
comment on: http://stackoverflow.com/q/24700047
score: 0
type: Comment

http://stackoverflow.com/comment/38389316
type: QuestionComment
comment on: http://stackoverflow.com/q/24632835
score: 0
has text: Nope, it is a template for Magento Webshop - using Magento Community.
type: Comment

http://stackoverflow.com/a/48483805
score: 1
answers question: http://stackoverflow.com/q/24657386
has comment: http://stackoverflow.com/comment/83963644
has comment: http://stackoverflow.com/comment/83961673
has body: You can also create a filter for that. Filter app.filter("trustHtmlContent", ['$sce', $sce =&gt; htmlCode =&gt; $sce.trustAsHtml(htmlCode)]); usage &lt;ANY ng-bind-html="value | trustHtmlContent"&gt;&lt;/ANY&gt; src: How do you use $sce.trustAsHtml(string) to replicate ng-bind-html-unsafe in Angular 1.2+
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/38278919
type: AnswerComment
type: Comment
has text: *"...unlike JavaScript closures can be defined as anonymous functions..."* JavaScript anonymous functions (all JS functions for that matter) create a closure.
score: 1
comment on: http://stackoverflow.com/a/24686901

http://stackoverflow.com/q/24644058
has comment: http://stackoverflow.com/comment/38199264
tagged with: yui
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38198999
has answer: http://stackoverflow.com/a/24665350
has comment: http://stackoverflow.com/comment/38201775
type: Question
has body: Please look into below line of js code. It can able to get YAHOO object and works fine in Dev and Test websites but not in production. The only difference between these three sites is SSL. The Dave and Test are 'http' and the Prod is https. YAHOO.util.Event.onContentReady("productsandservices", function () {} Any help would be appreciated.
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: drupal-6
tagged with: yahoo
score: 0
accepted answer: http://stackoverflow.com/a/24665350
has comment: http://stackoverflow.com/comment/38199232
has title: YAHOO object error with https site in drupal 6

http://stackoverflow.com/a/24697972
has body: Here's my solution to your problem: Fiddle I used the localStorage to save which radioButton is checked with a fallback to cookies: function saveData(key,value) { localStorage.setItem(key,value) || (document.cookie = key + "=" + value); } On page load, the data is loaded from the used storage to check the belonging button and to activate the appropriate box. Plus I simplified your function setting the active box. If you have any questions, feel free to ask.
answers question: http://stackoverflow.com/q/24697272
type: Answer
score: 0

http://stackoverflow.com/q/24611572
downvote count: 0
type: UnansweredQuestion
score: 1
has body: I am working on a asp.net web application in which I have to show top 10 latest status or updates of facebook page that I have created for client. For Eg : If I added a status that Mr X will organise the show on my FB page then this status will be shown on my website under the Recent update tab automatically. I have searched google but at the end I land on to the FB developers page where I am getting confused between the functionality for fetching data from the page. PLEASE HELP
tagged with: javascript
type: Question
tagged with: api
upvote count: 1
answer count: 1
tagged with: facebook-graph-api
tagged with: asp.net
favorite count: 0
has title: How to get latest status or updates from facebook page
tagged with: facebook
has answer: http://stackoverflow.com/a/24612168

http://stackoverflow.com/comment/38109973
comment on: http://stackoverflow.com/a/24594934
type: Comment
score: 1
has text: Javascript is not like php, where you can insert variable values into strings: `$ctxt = "string"; $ns = "contains(text(), '$ctxt')"`. In javascript you need to concatenate (`+`) the string parts into a bigger string: `"contains(text(), "+ctxt+")"`. `ctxt` is not null if it was previously initialized. You did initialize it. If you didn't define it first with `var` it will be a global variable.
type: AnswerComment

http://stackoverflow.com/q/24743730
has body: I am relatively new to the world of client-side development and might be using the word "collapsible" in the title incorrectly, but here is what I would like to achieve in my web application: So, I have several bars in the header for different purposes and I want to allow user to fold them to a tiny chevrons and unfold them back only if they really need them. So, I am looking for a framework or sample code that would help me here. I am using Bootstrap for the main design and layouting of my web application and I would be best if they would be compatible, but I can work on it on my own. I just don't want to implement everything from scratch here...
has answer: http://stackoverflow.com/a/24748527
tagged with: navigation
type: Question
has comment: http://stackoverflow.com/comment/38388895
tagged with: javascript
score: 0
has title: How to implement collapsible navigation bars?
answer count: 1
has comment: http://stackoverflow.com/comment/38392608
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/24651436
has comment: http://stackoverflow.com/comment/38213073
upvote count: 2
has comment: http://stackoverflow.com/comment/38213203
has comment: http://stackoverflow.com/comment/38212603
downvote count: 1
has comment: http://stackoverflow.com/comment/38212957
answers question: http://stackoverflow.com/q/24651381
accepted answer of: http://stackoverflow.com/q/24651381
has body: PHP scripts are executed at server. and Javascripts(jQuery) scripts are executed at your browser. There is no way you can set variables like that. Perhaps consider switching the css entirely in javascript: script src="jquery-1.10.2.js"&gt;&lt;/script&gt; &lt;script&gt; $(function(){ var size=($(document).width()); //if large screen, swap in large css if(size&gt;300){ $('#mystyle').attr("href", "index-1024.css"); } }) &lt;/script&gt; &lt;?php //load small css as default echo '&lt;link rel="stylesheet" href="index-less-1024.css" id="mystyle"/&gt;'; ?&gt;
has comment: http://stackoverflow.com/comment/38214308
has comment: http://stackoverflow.com/comment/38213003
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/38213044
has comment: http://stackoverflow.com/comment/38213400
type: Answer
has comment: http://stackoverflow.com/comment/38246189
has comment: http://stackoverflow.com/comment/38212929
has comment: http://stackoverflow.com/comment/38212885

http://stackoverflow.com/comment/38163757
type: Comment
comment on: http://stackoverflow.com/q/24624791
score: 0
has text: You could take a look at [underscore's uniq function](http://underscorejs.org/#uniq), if you don't want to code it up.
type: QuestionComment

http://stackoverflow.com/a/24720735
has body: This is because the rest of your code is running before the image has had time to load. And it works on reload because the image is cached and so loads immediately. Use the iamge's onload property to set a load event listener and execute your code when the image is ready var img = new Image(); img.onload = function(){ // create a hidden canvas, exactly the size of our small image var hidden_canvas = document.createElement("canvas"); hidden_canvas.width = img.width; hidden_canvas.height = img.height; var hidden_context = hidden_canvas.getContext("2d"); // draw the image on the hidden canvas hidden_context.drawImage(img, 0, 0); // set up the visible canvas var visible_canvas = document.getElementById("visible canvas"); var visible_context = visible_canvas.getContext("2d"); // draw on the visible canvas using the image from the hidden canvas visible_context.drawImage(hidden_canvas,0,0); }; img.src = "http://placehold.it/250x250"; JSFiddle Demo;
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24720603
answers question: http://stackoverflow.com/q/24720603

http://stackoverflow.com/q/24743815
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/38388230
has comment: http://stackoverflow.com/comment/38387596
answer count: 1
has body: I am trying to call an ajax method recursively until maxnumId is empty or undefined. My current code only fires one time! Could any one tell me what I am doing wrong here? Thanks This is the code: call ajax first time
downvote count: 0
has answer: http://stackoverflow.com/a/24744208
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: recursion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/38387936
has title: How to call ajax recursively until a certain condition becomes true?
has comment: http://stackoverflow.com/comment/38388716
has comment: http://stackoverflow.com/comment/38387734

http://stackoverflow.com/comment/38251570
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24672607
score: 0
has text: Did you read the [documentation](http://docs.neo4j.org/chunked/stable/rest-api-configurable-auto-indexes.html) ?

http://stackoverflow.com/comment/38323830
score: 2
has text: this was a huge essential point I was missing, really getting me over the hump with knockout, thanks so much!
comment on: http://stackoverflow.com/a/24710441
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38159938
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24623264
has text: I don't think `after` will work when the elements don't have a parent element at all.

http://stackoverflow.com/comment/38102852
comment on: http://stackoverflow.com/a/24593893
score: 0
type: AnswerComment
has text: If the `name` is also dynamic, does the name always begin with a common word or pattern? If it is the only element in the form being submitted then you should `var_dump` `$_POST` and see what is returned. You may be able to target it directly using `$_POST` only.
type: Comment

http://stackoverflow.com/comment/38312665
type: QuestionComment
type: Comment
has text: Are you aware that this is tagged Q but there is not a single Q promise in here?
comment on: http://stackoverflow.com/q/24704137
score: 0

http://stackoverflow.com/a/24776146
accepted answer of: http://stackoverflow.com/q/24725641
has comment: http://stackoverflow.com/comment/38460961
answers question: http://stackoverflow.com/q/24725641
type: Answer
has body: There aren't too many gaps in your question. What you need to do: Install Node.js (this will also install the npm command line tool). The approach here is distribution-specific, on a Debian-based Linux distribution you would do: sudo apt-get install nodejs Set up the directory structure for your project: myproject/ |- package.json |- myobj.js |- myobj-sub.js |- test/ |- myobj.js You can specify lots of different parameters in package.json, the only important part however is devDependencies to make sure the test harness is installed: { "name": "myproj", "version": "1.0.0", "description": "Just some test project", "devDependencies": { "tape" : "~2.13.3" }, "scripts": { "test": "node test/*.js" } } Install dependencies. Now that they are specified in package.json this is simply a matter of running from the project directory: npm install This downloads all dependencies and places them into the node_modules subdirectory inside your project directory. Run tests: npm run-script test That's it, the tests are running. The only problem is that they are failing because your script files don't use the CommonJS format. Here is what myobj.js should look like: exports.a = function() { return 'a'; } exports.b = function() { return 'b'; } And here is myobj-sub.js: exports.x = function() { return 'x'; } exports.y = function() { return 'y'; } And finally test/myobj.js: var test = require('tape'); var MyObj = require('../myobj'); MyObj.Sub = require('../myobj-sub'); test('myobj', function(assert) { assert.equal('a', MyObj.a(), 'test a'); assert.equal('x', MyObj.Sub.x(), 'test x'); assert.end(); }); And if you re-run the tests now they succeed. What if you want to use your CommonJS modules from a webpage? You can use browserify for that. Install browserify: sudo npm install -g browserify And run it to produce a bundle: browserify myobj.js myobj-sub.js -o bundle.js bundle.js is now a script file that can be included by a webpage - and then the webpage will be able to do var MyObj = requi…
upvote count: 3
has comment: http://stackoverflow.com/comment/38471234
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24703570
has comment: http://stackoverflow.com/comment/38309875
favorite count: 0
has answer: http://stackoverflow.com/a/24703656
upvote count: 2
score: -3
type: AnsweredQuestion
has title: Add space after three numbers
downvote count: 5
accepted answer: http://stackoverflow.com/a/24703656
type: Question
has body: I'm trying to have my numbers in a format that is easier for the user to read. Eg. Instead of: 12349568483, it would be: 12 349 568 483. I was wondering if there is a simple way to do this?
linked to: http://stackoverflow.com/q/2901102
answer count: 1
has comment: http://stackoverflow.com/comment/38309913
tagged with: javascript
has comment: http://stackoverflow.com/comment/38309929
has comment: http://stackoverflow.com/comment/38309836

http://stackoverflow.com/a/24722932
answers question: http://stackoverflow.com/q/24722788
score: 0
type: Answer
has body: Try to use: closeBtn:'' instead of showCloseButton. And try to use jQuery version 1.8 or lower instead of 1.10

http://stackoverflow.com/comment/38358885
comment on: http://stackoverflow.com/q/24728633
type: Comment
has text: well, usually I have used querystring to pass parameters to an `asp.net` page that could be retrieved using `Request.QueryString()` on server side. But the resource being called is not an asp.net page here.
score: 0
type: QuestionComment

http://stackoverflow.com/q/24641332
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 1
answer count: 1
has title: Upload Attachment using Knockout.js and Ajax
has answer: http://stackoverflow.com/a/26456589
favorite count: 0
type: UnansweredQuestion
has body: I'm having trouble getting attachments to save with my MVC 4 vb website. I am able to get a file that is a media-type file to send with an AJAX call to my controller, but I don't know how to use that file type to save or be converted to HttpPostedFileBase. The error I'm receiving when uploading a .docx is: "No MediaTypeFormatter is available to read an object of type 'HttpPostedFileBase' from content with media type 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'." Here is a snippet of my html code: &lt;input id="files" name="files" class="input-file" type="file" data-bind="file: imageFile, fileObjectURL: imageObjectURL, fileBinaryData: imageBinary"&gt; Here's my ko.bindinghandler: ko.bindingHandlers.file = { init: function (element, valueAccessor) { $(element).change(function () { var file = this.files[0]; if (ko.isObservable(valueAccessor())) { valueAccessor()(file); } }); }, update: function (element, valueAccessor, allBindingsAccessor) { var file = ko.utils.unwrapObservable(valueAccessor()); var bindings = allBindingsAccessor(); if (bindings.fileObjectURL &amp;&amp; ko.isObservable(bindings.fileObjectURL)) { var oldUrl = bindings.fileObjectURL(); if (oldUrl) { windowURL.revokeObjectURL(oldUrl); } bindings.fileObjectURL(file &amp;&amp; windowURL.createObjectURL(file)); } if (bindings.fileBinaryData &amp;&amp; ko.isObservable(bindings.fileBinaryData)) { if (!file) { bindings.fileBinaryData(null); } else { var reader = new FileReader(); reader.onload = function (e) { bindings.fileBinaryData(e.target.result); }; reader.readAsArrayBuffer(file); } } } }; Here is the AJAX call: var fileData = monthView.imageFile(); $.ajax({ type: 'POST', url: "/api/Upload/FileUpload", data: fileData, async: false, cache: false, processData: false, contentType: false, success: function (data) { console.log(data); imageFile(getNameFromPath(monthView.imageFile())); }, }); Finally here is the controller to handle the ajax call: &lt;System.Web.Mvc.HttpPost&gt; Publ…
tagged with: vb.net
downvote count: 0
score: 1
tagged with: knockout.js

http://stackoverflow.com/q/24746406
score: -2
tagged with: javascript
downvote count: 2
answer count: 1
favorite count: 0
has title: how can i grab [...] section in a written text
has comment: http://stackoverflow.com/comment/38392223
tagged with: php
has body: i want to make a question box just like how SO has one.but i dont know how SO grab some special text in the page. if i want to add a link to my question i must type like [writing to appear][URL]. How SO translate this. i mean how it understand its a link.Is there a source for this? Another question SO do this in the same page too.When i type it it shows the prewiev at blow page. Is this a javascript code then? NOTE Wikipedia has same property while you editing it. i just wanted to say.
has comment: http://stackoverflow.com/comment/38392205
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24746593
upvote count: 0
has comment: http://stackoverflow.com/comment/38391979
type: Question
has answer: http://stackoverflow.com/a/24746593
has comment: http://stackoverflow.com/comment/38392141

http://stackoverflow.com/comment/38214800
has text: WebElement pt = driver.findElement(By.xpath("/html/body/div[1]/div[4]/div[1]/h1/span")); System.out.println(" " + pt);
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24651274

http://stackoverflow.com/comment/39370133
comment on: http://stackoverflow.com/q/24683199
score: 0
type: Comment
type: QuestionComment
has text: Hey tikotzky, thanxs! I didn't see that yet. :) Thanxs mate!

http://stackoverflow.com/a/24746248
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24745883
answers question: http://stackoverflow.com/q/24745883
has comment: http://stackoverflow.com/comment/38395584
type: Answer
score: 1
has body: You have a trailing "Z" in your format specifier which makes your parser return null for the dates you give to it. Here's an example that works: var parse = d3.time.format("%Y-%m-%dT%H:%M:%S").parse; parse('2013-07-11T00:00:00'); // Thu Jul 11 2013 00:00:00 GMT+0200 (CEST) You can use d3 time scales to display time-based axes with appropriate tick marks. Edit: I guess I misunderstood your question... here's another take which (hopefully) explains the usage of time scales and date formatting: var scale = d3.time.scale(), axis = d3.svg.axis(), // Assuming you have your data as strings: data = ['2013-07-11T00:00:00', '2013-08-11T00:00:00', ...], range = [0, 500], // size of chart domain = d3.extent(data, function (d) { // generate the data extent (min,max) return new Date(d); // use Date instances for values }); // Configure the scale with domain and range: scale.domain(domain).range(range); // Use the above scale for the axis: axis.scale(scale) // Print the dates in "Mmm dd" format: .tickFormat(d3.time.format('%b %d')); // Render the axis in your svg node: svg.call(axis);
upvote count: 1
has comment: http://stackoverflow.com/comment/38400935

http://stackoverflow.com/comment/38127170
has text: Thanks, it does solve the problem for the fiddle. Unfortunately it's a simplified version of my real code, for which this solution doesn't work. The real inner has a bootstrap table that contains various columns with spans and elements (among others, bootstrap glyphicons). For some reason, line-height doesn't affect it at all.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24605354

http://stackoverflow.com/a/24608303
score: 1
has body: Its simply invoke the parameter d on the returned (function) from someFunction
downvote count: 0
answers question: http://stackoverflow.com/q/24608234
type: Answer
upvote count: 1

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/24595345
type: Tag
tags question: http://stackoverflow.com/q/24637850

http://stackoverflow.com/q/24608830
tagged with: amcharts
has body: I am in the process of creating an interactive pie-chart that works on Android and iOS. I have the pie chart in the [following link]1 which works on browser. Please help me to create a web-view for it that works on both platforms properly.
tagged with: webview
type: Question
tagged with: ios
tagged with: javascript
has title: How to create a web-view for iOS/Android?
has comment: http://stackoverflow.com/comment/38131443
score: 0
tagged with: pie-chart
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38131269
has answer: http://stackoverflow.com/a/24611038
type: UnansweredQuestion

http://stackoverflow.com/a/24734078
accepted answer of: http://stackoverflow.com/q/24733668
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38369038
type: Answer
answers question: http://stackoverflow.com/q/24733668
has body: Tidy your code - remove the spaces in your data- title attribute, in both the HTML and JS, as these are causing it to break. Add a &lt;div id="display"&gt;&lt;/div&gt; in your HTML somewhere and style it how you like. Add this line to your JS click handler: $('#display').html(sel); Here's a demo. If you'd prefer the result to be the text of the radio button instead of the value, use $('#display').html($(this).html()); instead in step 3. Done.
has comment: http://stackoverflow.com/comment/38371982

http://stackoverflow.com/a/24634796
upvote count: 1
answers question: http://stackoverflow.com/q/24634564
has comment: http://stackoverflow.com/comment/38181523
type: Answer
has comment: http://stackoverflow.com/comment/38181765
downvote count: 0
score: 1
has body: The current checkbox state is returned by: var currentlyChecked = $( elem ).prop( "checked" ) The initial checkbox state (which never changes) is returned by: var initiallyChecked = ($( elem ).attr( "checked" ) == "checked") For more information check here. Of special interest: According to the W3C forms specification, the checked attribute is a boolean attribute, which means the corresponding property is true if the attribute is present at all—even if, for example, the attribute has no value or is set to empty string value or even "false". This is true of all boolean attributes. Nevertheless, the most important concept to remember about the checked attribute is that it does not correspond to the checked property. The attribute actually corresponds to the defaultChecked property and should be used only to set the initial value of the checkbox. The checked attribute value does not change with the state of the checkbox, while the checked property does. Therefore, the cross-browser-compatible way to determine if a checkbox is checked is to use the property: if ( elem.checked ) if ( $( elem ).prop( "checked" ) ) if ( $( elem ).is( ":checked" ) )

http://stackoverflow.com/q/24661295
tagged with: couchdb
favorite count: 0
tagged with: synchronization
tagged with: pouchdb
has answer: http://stackoverflow.com/a/24802963
upvote count: 3
has title: CORS errors in pouchdb
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24802963
score: 3
type: Question
has body: I'm getting CORS errors in Firefox and Chrome, but not in cURL. Here's my cURL: curl -H "Origin: http://mymachine:8080" https://wamoyo.cloudant.com/simpsons -v That's my command, here's the output: * Hostname was NOT found in DNS cache * Trying 184.173.163.133... * Connected to wamoyo.cloudant.com (184.173.163.133) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using AES256-SHA * Server certificate: * subject: C=US; ST=Massachusetts; L=Boston; O=Cloudant, Inc.; OU=Engineering; CN=*.cloudant.com * start date: 2013-01-29 00:00:00 GMT * expire date: 2016-02-19 12:00:00 GMT * subjectAltName: wamoyo.cloudant.com matched * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Assurance CA-3 * SSL certificate verify ok. &gt; GET /simpsons HTTP/1.1 &gt; User-Agent: curl/7.35.0 &gt; Host: wamoyo.cloudant.com &gt; Accept: */* &gt; Origin: http://mymachine:8080 &gt; &lt; HTTP/1.1 200 OK &lt; X-Couch-Request-ID: 1efb92f7dd * Server CouchDB/1.0.2 (Erlang OTP/R14B) is not blacklisted &lt; Server: CouchDB/1.0.2 (Erlang OTP/R14B) &lt; Date: Wed, 09 Jul 2014 18:25:37 GMT &lt; Content-Type: text/plain;charset=utf-8 &lt; Content-Length: 362 &lt; Cache-Control: must-revalidate &lt; Access-Control-Expose-Headers: content-type, accept-ranges, etag, server, x-couch-request-id, x-couch-update-newrev Here's the important bit: &lt; Access-Control-Allow-Origin: http://mymachine:8080 &lt; Access-Control-Allow-Credentials: true &lt; {"update_seq":"34-g1AAAADreJzLYWBgYMlgTmFQTElKzi9KdUhJMtPLzc_PK87IzEvVS87JL01JzCvRy0styQEqZUpkSLL___9_…
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/24724322
upvote count: 0
has answer: http://stackoverflow.com/a/24724437
tagged with: dynamic-programming
favorite count: 0
has comment: http://stackoverflow.com/comment/38350046
has comment: http://stackoverflow.com/comment/38350081
has body: I'm buidling a web service through which employees can enter worked hours for a given week. The form presents 7 days, and is thus subdivided in 7 &lt;fieldset&gt; tags. I also need to allow the employees to add fields to each day (and thus fieldset) in order to enter information on performed activities. The form is built by a php loop, running an array containing 7 days. for identification, each day has it's own value varying from 0 to 6. This also goes for the button with which the user can add fields dynamically: that how it knows to which field set the fields should be added. Now, this is all going perfect. Except for the fact that when I push the submit button, only the dynamically added fields from the first day appear in the $_POST array on my processing webpage. The code I use to add fields: var index = 0; var amount = 0; function addField(p) { //declare new textfield for company key var keyField = document.createElement("input"); keyField.type = 'text'; keyField.placeholder = 'Klant'; keyField.style.width = '50%'; keyField.style.height = '16px'; keyField.style.marginBottom = '5px'; //declare textfield for hours value var valueField = document.createElement("input"); valueField.type = 'text'; valueField.placeholder = 'Uren'; valueField.style.width = '30%'; valueField.style.height = '16px'; if(index == p) { amount = amount + 1; keyField.name = 'activityDay' + p + "-" + amount + "-" + 1; keyField.alt = 'activityDay' + p + "-" + amount + "-" + 1; valueField.name = 'activityDay' + p + "-" + amount + "-" + 2; valueField.alt = 'activityDay' + p + "-" + amount + "-" + 2; } else { index = p; amount = 1; keyField.name = 'activityDay' + p + "-" + amount + "-" + 1; keyField.alt = 'activityDay' + p + "-" + amount + "-" + 1; valueField.name = 'activityDay' + p + "-" + amount + "-" + 2; valueField.alt = 'activityDay' + p + "-" + amount + "-" + 2; } document.getElementById('urenForm'+p).appendChild(keyField); document.getElementById('urenForm'+p).appendChild(valueField); } …
has answer: http://stackoverflow.com/a/24724408
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/38350030
downvote count: 2
has comment: http://stackoverflow.com/comment/38349977
tagged with: forms
type: Question
linked to: http://stackoverflow.com/q/24723730
score: -2
tagged with: javascript
has title: Dynamically added HTML form fields not sensed through php
has comment: http://stackoverflow.com/comment/38350213
answer count: 2

http://stackoverflow.com/comment/38157608
type: Comment
has text: You can already attach any given "method" to any given event at any given time. That is the very nature of event listeners. I am not writing this to be mean, I am letting you know that this approach is not good.
type: AnswerComment
comment on: http://stackoverflow.com/a/24616856
score: 0

http://stackoverflow.com/comment/38241055
comment on: http://stackoverflow.com/a/24659181
score: 0
type: AnswerComment
type: Comment
has text: Yes - passing a jQuery object to `.replaceWith()` is perfectly fine, so long as the object makes sense.

http://stackoverflow.com/comment/38380424
comment on: http://stackoverflow.com/q/24740299
type: Comment
score: 1
type: QuestionComment
has text: TIP: Declare your `checkForChange()` and `doneTyping()` functions outside the `jQuery document ready handler`.

http://stackoverflow.com/q/24634453
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
has title: Force user to reply to the "Authorize Geolocation" input each time he try to use it
tagged with: geolocation
has body: I'm currently working on an application which use the html5 geolocation api. I've got a button meaning 'Locate me', how try to run - or rerun - the geolocation. If the user grant the access, there is no problem, but, if he refuse it, is there a way to display the authorisation prompt again? Thanks for your replies!
type: Question
has answer: http://stackoverflow.com/a/24634711
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/80348361
comment on: http://stackoverflow.com/a/24676032
type: AnswerComment
has text: If `result.length` is greater than 0, why do you need to check for `if result`?
type: Comment
score: 7

http://stackoverflow.com/comment/38226656
type: QuestionComment
comment on: http://stackoverflow.com/q/24658787
score: 0
has text: `$.each()` returns the `data` array, not a jQuery object, so `.promise()` isn't a valid method. Without more details about your callback it's hard to help you more than that.
type: Comment

http://stackoverflow.com/comment/38270430
type: AnswerComment
has text: It doesn't work. The `parent()` method returns an immediate parent. The first 'li' does not have an immediate 'li' as a parent. @arifix see my answer, please.
score: 0
comment on: http://stackoverflow.com/a/24682291
type: Comment

http://stackoverflow.com/q/24598853
possible better answer: http://stackoverflow.com/a/24599257
answer count: 2
has answer: http://stackoverflow.com/a/24599257
tagged with: jquery
tagged with: zfcuser
tagged with: zend-framework2
has answer: http://stackoverflow.com/a/24602503
type: AnsweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: i am using zf2. i want to load my second drop down by using the ajax call. i have tried with following code. i can get hard coded values. but i dont know how to add database values to a array and load that values to the drop down using ajax. Ajax in phtml : &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#projectname").change(function (event) { var projectname = $(this).val(); var projectkey = projectname.split(" - "); var projectname = {textData:projectkey[1]}; //The post using ajax $.ajax({ type:"POST", // URL : / name of the controller for the site / name of the action to be // executed url:'&lt;?php echo $this-&gt;url('userstory', array('action'=&gt;'answer')); ?&gt;', data:projectname, success: function(data){ //code to load data to the dropdown }, error:function(){alert("Failure!!");} }); }); }); &lt;/script&gt; Controller Action: public function answerAction() { // ead the data sent from the site $key = $_POST ['textData']; // o something with the data $data= $this-&gt;getProjectTable ()-&gt;getkeyproject( $key ); $projectid = $data-&gt;id; $projectusers[] = $this-&gt;getRoleTable()-&gt;fetchRoles($projectid); // eturn a Json object containing the data $result = new JsonModel ( array ( 'projectusers' =&gt; $projectusers ) ); return $result; } DB query : public function fetchRoles($id) { $resultSet = $this-&gt;tableGateway-&gt;select ( array ( 'projectid' =&gt; $id ) ); return $resultSet; }
accepted answer: http://stackoverflow.com/a/24602503
has title: How to do the ajax + json using zf2?
tagged with: javascript

jquery-templates
type: Tag
tags question: http://stackoverflow.com/q/24607541
tag name: jquery-templates
tags question: http://stackoverflow.com/q/24722222

http://stackoverflow.com/comment/38283285
type: QuestionComment
has text: just to clarify, you want to get the input value of `#team_1`, `#team_2` when `GO` is pressed and pass it in your CI controller as `$team_1 = #team_1` and `$team_2 = #team_2` and get the return of that controller back to your javascript?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24689034

http://stackoverflow.com/q/24743614
has comment: http://stackoverflow.com/comment/38391394
upvote count: 1
has title: jQuery : Prevent event to fired on page load
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24746241
accepted answer: http://stackoverflow.com/a/24958954
has comment: http://stackoverflow.com/comment/38391521
favorite count: 0
has answer: http://stackoverflow.com/a/24958954
has comment: http://stackoverflow.com/comment/38392641
has comment: http://stackoverflow.com/comment/38392595
type: AnsweredQuestion
has body: I am using Blueimp plugin for uploading multiple files. Here is the main.js : $(function () { 'use strict'; // Initialize the jQuery File Upload widget: $('#fileupload').fileupload({ // Uncomment the following to send cross-domain cookies: //xhrFields: {withCredentials: true}, url: 'index.cfm/uploads/', maxFileSize: 5242880, acceptFileTypes: /(\.|\/)(txt|csv|pdf|doc|docx|xls|xlsx|ppt|pptx)$/i }); // Enable iframe cross-domain access via redirect option: $('#fileupload').fileupload( 'option', 'redirect', window.location.href.replace( /\/[^\/]*$/, 'includes/blueimp/cors/result.html?%s' ) ); if (window.location.hostname === 'blueimp.github.io') { // Demo settings: $('#fileupload').fileupload('option', { url: '//jquery-file-upload.appspot.com/', // Enable image resizing, except for Android and Opera, // which actually support image resizing, but fail to // send Blob objects via XHR requests: disableImageResize: /Android(?!.*Chrome)|Opera/ .test(window.navigator.userAgent), maxFileSize: 5000000, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i }); // Upload server status check for browsers with CORS support: if ($.support.cors) { $.ajax({ url: '//jquery-file-upload.appspot.com/', type: 'HEAD' }).fail(function () { $('&lt;div class="alert alert-danger"/&gt;') .text('Upload server currently unavailable - ' + new Date()) .appendTo('#fileupload'); }); } } else { // Load existing files: $('#fileupload').addClass('fileupload-processing'); $.ajax({ // Uncomment the following to send cross-domain cookies: //xhrFields: {withCredentials: true}, url: $('#fileupload').fileupload('option', 'url'), dataType: 'json', context: $('#fileupload')[0] }).always(function () { $(this).removeClass('fileupload-processing'); }).done(function (result) { $(this).fileupload('option', 'done') .call(this, $.Event('done'), {result: result}); }); } $('#fileupload').bind('fileuploadadd', function (e, data) { var fileList = $.trim($("#hdnFileList").val()); if (fileList.length == 0) { $("#hdnFileList").val($.tr…
possible better answer: http://stackoverflow.com/a/24746241
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38392752
has comment: http://stackoverflow.com/comment/38392811
type: Question
tagged with: blueimp
answer count: 2

http://stackoverflow.com/q/24659978
has comment: http://stackoverflow.com/comment/38228641
tagged with: php
score: 2
upvote count: 2
type: UnansweredQuestion
has title: How to load autocomplete data with scroll
has comment: http://stackoverflow.com/comment/38228985
type: Question
tagged with: autocomplete
tagged with: javascript
has comment: http://stackoverflow.com/comment/38429925
has answer: http://stackoverflow.com/a/24660908
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have created jquery auto completed search . i have to load more than 1000 of records inside my autocomplete dropdown . I want to make it change to scroll 10 records at first time once user scroll down next record will appear , Please advice me on this /

http://stackoverflow.com/q/24691136
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24691263
has body: So I have images that when you click will grow. However, the images not being clicked move to the bottom of the containing div when an image grows. Example: http://jsbin.com/losuniti/1/edit?html,css,output How can I force the non clicked images to just stay at the top of the div? I've tried using .images img { top: 0 !important; }
type: Question
has title: Keep non active images to the top
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24691263
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css

http://stackoverflow.com/a/24608366
score: 0
has body: This JavaScript is running on the client machine. It does not have access to Rails helpers. You can build the full URL on the server side ( in your controller ) and send it in the JSON response.
answers question: http://stackoverflow.com/q/24608273
type: Answer

http://stackoverflow.com/comment/38156840
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24616367
has text: Have a look at the example demo/plnkr here: https://stackoverflow.com/a/22189954/1803298

http://stackoverflow.com/comment/38392124
score: 0
has text: Done. However, this doesn't solve the transclusion issue.
type: Comment
comment on: http://stackoverflow.com/q/24746243
type: QuestionComment

http://stackoverflow.com/a/24638272
type: Answer
upvote count: 4
score: 3
has comment: http://stackoverflow.com/comment/38187900
has body: Here's a simple solution: http://jsfiddle.net/LJHQW/2/ JavaScript: /* Toggles the style class on click */ $("button").click(function() { $(".button").toggleClass("buttonLeft"); }); CSS: .buttonLeft {margin-left:50px;} /* But with a on clicked parameter instead of active */
answers question: http://stackoverflow.com/q/24638192
has comment: http://stackoverflow.com/comment/38188236
has comment: http://stackoverflow.com/comment/38187966
downvote count: 1
has comment: http://stackoverflow.com/comment/38189051

http://stackoverflow.com/comment/116476934
has text: Apparently, yes. But it was long time back so I totally forgot what I did here.
score: 0
comment on: http://stackoverflow.com/q/24649060
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24680012
score: 4
has comment: http://stackoverflow.com/comment/38265812
answer count: 2
favorite count: 0
tagged with: angularjs
has title: how to mix and match local variables and imported variables in a directive
has answer: http://stackoverflow.com/a/24680122
accepted answer: http://stackoverflow.com/a/24680122
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has body: in angular.js a directive can use all the variables defined in its parent's scope like so: .directive('directiveName', ()-&gt; scope: true similarly, a directive can simply ignore its parents scope and define it's own like so .directive('directiveName', ()-&gt; scope: false further, a directive can chose to "isolate" specific variables it wishes to use from its parent scope like so: .directive('directiveName', ()-&gt; scope: parentScopeVar1: '=' localVarAliasOfParentVar2: '=parentVar2' the catch here is that these isolated variables must be declared in the html syntax of the directive like so: &lt;directiveName parent-scope-var-1="parentScopeVar1" parent-var-2="parentVar2" /&gt; question: I noticed that if i use the isolate method.. i can no longer use my directive defined variables in the html, for example suppose i have .directive('directiveName', ()-&gt; scope: parentScopeVar1: '=' .. link: (scope, elem, attrs) -&gt; scope.directiveDefinedVar = true and in the html: &lt;directiveName ng-class="{active:directiveDefinedVar}" /&gt; &lt;!-- This doesn't work! it used to work when I had scope: false --&gt; any idea why this is happening? the only way i can get around this is by persisting the value of parentScopeVar1 to a service.. then setting a watcher on it in the body of my directive like so: .directive('directiveName', 'parentScopeVar1Cache',(parentScopeVar1Cache)-&gt; .. link: (scope, elem, attrs) -&gt; scope.parentScopeVar1Cache = parentScopeVar1Cache scope.$watch 'parentScopeVar1Cache', (newValue)-&gt; # do stuff with newValue but i find that solution too dirty.. i would like to do it simply from the scope definition like in my first three examples..
possible better answer: http://stackoverflow.com/a/24680144
has answer: http://stackoverflow.com/a/24680144
type: Question
tagged with: javascript

http://stackoverflow.com/q/24703247
has comment: http://stackoverflow.com/comment/38309462
has title: Issue sending Http POST request to Nodejs Server
has body: I am having an issue sending over an array of information from my client.js to the node server using an http POST request. After a couple of days I think I have narrowed it down. My current set up is the following: Server After X amount of time, the server will start to ask clients to send their collected data. The server sends out only one request at a time, waiting to receive that clients info before sending a request to the next client Client The client receives the request from the server Http stuff to send POST request is set up Array data is converted to json 1000ms is waited before sending the http post request Server Post request is received &amp; that data is added to a local array My server.js var http = require('http') , connect = require('connect') , io = require('socket.io') , fs = require('fs') , uuid = require('node-uuid') , _ = require('lodash'); // omitted event handers &amp; pubnub setup var app = connect().use(connect.static(__dirname)).use(connect.directory(__dirname)); var server = http.createServer(app); server.listen(8888); io = io.listen(server); // Following handles sending request to clients function phaseTwo() { var count = 0; setTimeout(function() { pubnub.publish({ channel: 'channel' + viewers[count], message: { message: 'measurements', uuid: 'Server', receiver: viewers[count] } }); // set up server to listen for http POST app.use(function(req, res) { if (req.method == 'POST') { count++; req.on('data', function(chunk) { // add that array into one main array latencyData.push.apply(latencyData, chunk); dataCollected++; }); pubnub.publish({ channel: 'channel' + viewers[count], message: { message: 'measurements', uuid: 'Server', receiver: viewers[count] } }); } }); // end app.use }, msDuration); } client if (message.message == 'measurements') { console.log(' Received measurements event'); var http = new XMLHttpRequest(); var url = 'http://localhost:8888/'; http.open('POST', url, true); http.setRequestHeader("Content-type", "application/x-www…
type: UnansweredQuestion
tagged with: xmlhttprequest
tagged with: node.js
has answer: http://stackoverflow.com/a/24703652
has answer: http://stackoverflow.com/a/56373925
tagged with: http
has comment: http://stackoverflow.com/comment/38309600
has comment: http://stackoverflow.com/comment/38309785
type: Question
has comment: http://stackoverflow.com/comment/38309567
tagged with: javascript
has comment: http://stackoverflow.com/comment/39512947
score: 0
answer count: 2
tagged with: http-post

http://stackoverflow.com/comment/38117907
score: 0
comment on: http://stackoverflow.com/a/24601683
type: Comment
has text: @David Thomas: to be honest - it is simple. It is indeed simpler than a loop, 2 checks and 2 counters.
type: AnswerComment

http://stackoverflow.com/a/24716948
has comment: http://stackoverflow.com/comment/38339229
answers question: http://stackoverflow.com/q/24716751
upvote count: 2
has comment: http://stackoverflow.com/comment/38338494
has comment: http://stackoverflow.com/comment/38338225
type: Answer
score: 2
downvote count: 0
has body: Here is something quite fun :) Pure CSS! Improved with checked "link" state The label can be made to look like a link and will change when selected. The label is connected to the checkbox with the matching for and id attribute. Checkbox is hidden with display: none; The order of HTML elements is important. Have an improved fiddle! HTML Category One (click me) CSS input[type=checkbox] { display: none; } input[type=checkbox]:checked + .category img { transition: opacity 0.5s ease; opacity:0.5; } input[type=checkbox] + .category img { transition: opacity 0.5s ease; opacity:1; } label:hover { text-decoration: underline; cursor: pointer; color: blue; } label { display: block; } input[type=checkbox]:checked + .category label { font-weight: bold; color: #F00; }
has comment: http://stackoverflow.com/comment/38345985

http://stackoverflow.com/q/24647227
type: AnsweredQuestion
score: 1
has title: Remove BrowserAction onClicked listner
type: Question
tagged with: javascript
tagged with: google-chrome-extension
upvote count: 1
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/24648270
favorite count: 0
has answer: http://stackoverflow.com/a/24648270
has body: I am building a chrome extension in which I am adding chrome.browserAction.onClicked.addListener(function callback) listners but I need to keep only one listner at a time and remove previous ones depending on some conditions but whats happening now is, It stacks all the previous listners and fires all of then when clicked. How can I remove previous listners and keep the latest one?

http://stackoverflow.com/a/57375801
answers question: http://stackoverflow.com/q/24658204
has body: write a timeout function setTimeout(function(){ GenCalendar(); },1000);
score: 0
type: Answer

cdn
tags question: http://stackoverflow.com/q/24598840
tag name: cdn
tags question: http://stackoverflow.com/q/24708455
type: Tag

http://stackoverflow.com/comment/38149898
type: QuestionComment
score: 0
has text: Thanks DJDarkViber. Yes not sure what it's green but it doesn't work. When I send a message from the old domain I receive it instantly, here not at all. Also, if you try the newsletter on this page http://goo.gl/cZgzqq it gives you a message that the email is not valid which is not true (this message also happens when the newsletter script doesn't work)
comment on: http://stackoverflow.com/q/24618038
type: Comment

http://stackoverflow.com/a/24668781
has body: You want to sum all the budget right? You need to cast using parseFloat and check whether the parsed value is a number or not using isNaN. var data = [ {"sector": "Basic drinking water supply and basic sanitation", "budget": 558733.7, "no": 8}, {"sector": "Culture and recreation", "budget": 1550000.0, "no": 2}, {"sector": "Roads", "budget": 1221142.04, "no": 4}, {"sector": "Agriculture", "budget": "", "no": 1}, {"sector": "Health", "budget": "", "no": 4}, {"sector": "Education", "budget": 473379.58, "no": 6}, {"sector": "Energy generation &amp;amp; supply", "budget": 584624.55, "no": 1}, {"sector": "Agricultural water resources", "budget": 40000.0, "no": 1} ]; var sum = 0; for (i=0 ; i&lt;data.length ; i++){ var val = parseFloat(data[i]["budget"]); sum += isNaN(val) ? 0 : val; } console.log(sum); DEMO
score: 1
accepted answer of: http://stackoverflow.com/q/24668683
answers question: http://stackoverflow.com/q/24668683
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/a/24640406
answers question: http://stackoverflow.com/q/24640291
accepted answer of: http://stackoverflow.com/q/24640291
type: AcceptedAnswer
downvote count: 0
has body: I just replaced the line #3 from your code to var cache = $(this).next('form').find('ul'); Fiddle
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/38101852
score: 1
has text: instead of `offset().top()` use `offset().top`, just remove `()` from `top`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24593372

http://stackoverflow.com/a/24639527
has comment: http://stackoverflow.com/comment/38190517
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38190427
has comment: http://stackoverflow.com/comment/38190439
upvote count: 8
has comment: http://stackoverflow.com/comment/38190670
type: Answer
accepted answer of: http://stackoverflow.com/q/24639493
answers question: http://stackoverflow.com/q/24639493
has comment: http://stackoverflow.com/comment/38190251
score: 8
has body: I would do this a slightly different way, by adding a CSS class, and probably by using jQuery to make your life easier: $(".mydiv").addClass("no-display"); then in your CSS .no-display { display: none; } If you want to assign the specific inline attribute then you could use: $(".mydiv").css("display", "none"); edit Ok so for a pure JavaScript approach for (var i = 0; i &lt; ArrayTest2.length; i++) { ArrayTest2[i].style.display = "none"; }

http://stackoverflow.com/comment/38223601
type: QuestionComment
has text: It's questions like this that reaffirm my belief that jQuery, as powerful a tool as it is, makes people ask the worst questions...
score: 0
comment on: http://stackoverflow.com/q/24657174
type: Comment

http://stackoverflow.com/q/24615225
answer count: 1
has answer: http://stackoverflow.com/a/24615416
tagged with: javascript
duplicate of: http://stackoverflow.com/q/1710424
has body: Below is a snippet from node url module source. var punycode = require('punycode'); var util = require('util'); exports.parse = urlParse; exports.resolve = urlResolve; exports.resolveObject = urlResolveObject; exports.format = urlFormat; exports.Url = Url; function Url() { this.protocol = null; this.slashes = null; this.auth = null; this.host = null; this.port = null; this.hostname = null; this.hash = null; this.search = null; this.query = null; this.pathname = null; this.path = null; this.href = null; } As you can see, the 'Url' is used before function 'Url' was defined. As far as I know this is not valid javascript, but it works ok. Can someone tell me why this is ok? And why node writers love this convention? EDIT : Thanks. I had no understanding of 'function hoisting' because the former title was the wrong question, modified.
has title: how is using a function before it was defined valid?
has comment: http://stackoverflow.com/comment/38144162
tagged with: node.js
has comment: http://stackoverflow.com/comment/38144072
linked to: http://stackoverflow.com/q/1710424
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24615416
type: Question
score: 0

http://stackoverflow.com/comment/38232123
has text: Also, what is `if (prompting != null && prompting != null) {` for? `prompting` will never be `null` - it will always be a string (empty or non-empty)
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24661797

http://stackoverflow.com/q/24664468
favorite count: 0
tagged with: ajax
tagged with: web2py
type: AnsweredQuestion
has title: "Synchrounous" AJAX call and web2py
has body: I need some help with "synchronizing" my AJAX calls. I have a function scripted that takes in a file with certain test parameters and uses those parameters to kick off test via an AJAX call/s. The way the code is suppose to work is thatonce the test run is complete, another AJAX call is suppose to update the eventLog with the test results for that run and then move to the next iteration of the for loop. The ajax calls can be seen in the for loop towards the bottom of the code. I looked into some documentation on using the jQuery Deffered class, but I am pretty new to JavaScript in general and I'm having trouble understanding how that code works. Thanks in advance for any help. function runTest(modelName, serialNum, passArea) { //Pull in sequence file var str = ""; var table = document.getElementById('taskTable'); var output = document.getElementById('outputStrArea'); var passFail = document.getElementById(passArea).innerHTML; var rowCount = table.rows.length; for(var i=1; i&lt;rowCount; i++) { var row = table.rows[i]; str+= row.innerHTML+"\n"; } str = str.split("&lt;td&gt;"); delete str[0]; delete str[-1]; //Create a list of tests that can be read out var testList = []; for (var i=1; i &lt;str.length; i++){ str[i]= str[i].replace("&lt;/td&gt;", ""); str[i]= str[i].replace(" ", ""); if (str[i].search("checkbox") &lt; 0){ testList.push(str[i]); } } var model = document.getElementById(modelName).innerHTML; model = model.replace("&lt;b&gt;", ""); model = model.replace("&lt;/b&gt;", ""); model = model.replace(" ", ""); var serial = document.getElementById(serialNum).innerHTML; var info = model+" "+serial+" "; for(var k=0; k&lt;testList.length; k+=5){ info+= testList[k]+" "+testList[k+1]+" "+testList[k+2]+" "+testList[k+3]+" "+testList[k+4]+" "; ajax("loadTestSequence?info="+info, [], passArea); ajax("loadEventLog", [], 'eventLog'); } }
type: Question
has answer: http://stackoverflow.com/a/24664550
accepted answer: http://stackoverflow.com/a/24664550
tagged with: javascript
tagged with: jquery
score: 0
upvote count: 1
answer count: 1
downvote count: 1

http://stackoverflow.com/q/24725627
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/23740548
has comment: http://stackoverflow.com/comment/38352683
tagged with: php
type: AnsweredQuestion
has body: I need to assign the list of all files of a directory (site_img) to a javascript array but not getting any luck.Can any one pls help . i:e In the below code I want to assign the value of filename to an javascript array in each iteration of the for loop. &lt;?php foreach(glob('./site_img/*.*') as $filename){ echo $filename; echo "&lt;br&gt;"; } ?&gt;
has title: Javascript array for all the files in a directory
has answer: http://stackoverflow.com/a/24725652
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/4202175
upvote count: 0
accepted answer: http://stackoverflow.com/a/24725652
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38352648

http://stackoverflow.com/a/24655503
accepted answer of: http://stackoverflow.com/q/24655418
has comment: http://stackoverflow.com/comment/38223149
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/38225414
type: Answer
has comment: http://stackoverflow.com/comment/38223470
has comment: http://stackoverflow.com/comment/38220202
has comment: http://stackoverflow.com/comment/38220259
upvote count: 1
has comment: http://stackoverflow.com/comment/38226246
has comment: http://stackoverflow.com/comment/38224908
has comment: http://stackoverflow.com/comment/38221917
has comment: http://stackoverflow.com/comment/38223598
answers question: http://stackoverflow.com/q/24655418
downvote count: 0
has body: html shopping cart Product 1 price: 400 delete item js function one(obj){ var item = $(obj).prev().andSelf().remove(); } fiddle

http://stackoverflow.com/q/24709336
has comment: http://stackoverflow.com/comment/38321666
has comment: http://stackoverflow.com/comment/38321419
score: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38321970
has answer: http://stackoverflow.com/a/24709376
has body: Say I have a function: function parent() { var address = "house"; var getAddress = function () { return address; } } How can I make another function that inherits these things?
answer count: 1
accepted answer: http://stackoverflow.com/a/24709376
has comment: http://stackoverflow.com/comment/38321459
has comment: http://stackoverflow.com/comment/38323029
has comment: http://stackoverflow.com/comment/38321418
has comment: http://stackoverflow.com/comment/38321420
has title: How can I create a function in Javascript that inherits properties and methods of another function?
type: AnsweredQuestion

http://stackoverflow.com/comment/38260192
comment on: http://stackoverflow.com/q/24675655
has text: is there any relationship between attachment and messages
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24639075
has body: I want to build a proxy with node.js to use in my browser. I searched at google and saw that example, but some Apis are deprecated. So I changed the code following: var http = require('http'); http.createServer(function(request, response) { console.log("req for:"+ request.headers['host'] + "\nmethod: "+ request.method); var options = { host : request.headers['host'], method : request.method, headers : request.headers } var callback = function(res){ // get the proxyclient response and write to the original response res.addListener('data', function(chunk){ console.log("writing response"); response.write(chunk, 'binary'); }); res.addListener('end', function(){ console.log("end response"); response.end(); }); }; // send the original request var proxy = http.request(options, callback); // intercept the request and write to proxyclient request.addListener('data', function(chunk){ console.log("new request"); proxy.write(chunk, 'binary'); }); request.addListener('end', function(){ console.log("end request"); proxy.end(); }); }).listen(3333); After that, I changed my browser proxy settings to use localhost:3333. My problem is that event "data" isn't fired. This should work as I thought?
tagged with: node.js
has answer: http://stackoverflow.com/a/26435262
type: Question
has comment: http://stackoverflow.com/comment/38190016
tagged with: javascript
has title: Server proxy with Node JS
tagged with: proxy
score: 0
has comment: http://stackoverflow.com/comment/38217684
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/a/24593481
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24589189
has body: Solved by changing the line var badgeselected = $('#badgeselect').attr("src"); to var badgeselected = $('#badgeselect img').attr("src"); Easy when you know how :-/
upvote count: 2
type: Answer

http://stackoverflow.com/comment/38595424
type: Comment
has text: Update: The rugged edges in Chrome is due to crbug.com/395474 for updates. I've been told I can use several paths with smaller radiuses as a workaround -- but how do I do that? Thanks.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24687762

http://stackoverflow.com/a/24665534
score: 1
answers question: http://stackoverflow.com/q/24665487
upvote count: 1
type: Answer
has body: Remove the colon from border: in the f_border() function.
downvote count: 0

http://stackoverflow.com/q/24681256
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has title: How to use a JSON ENCODED data to Javascript array?
has comment: http://stackoverflow.com/comment/38268315
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/247483
has answer: http://stackoverflow.com/a/24681360
has body: I have some pages on the web which echo results like: [{"id":"1","company":"Gaurishankar","bus_no":"JHA 12 KH 1230"}, {"id":"2","company":"Gaurishankar","bus_no":"BA 2 KH 2270"}] I want to use this json_encode data to be used in Javascript array like: var data = http://api.mywebsite.com/get_data.php; for (i = 0; i&lt;data.length; i++){ //Do something here } How is this possible. I know its easy but I cant make this. I am a new learner. Plz help
duplicate of: http://stackoverflow.com/q/247483
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24681360
tagged with: http://stackoverflow.com/tag/json
upvote count: 1

http://stackoverflow.com/a/24700567
accepted answer of: http://stackoverflow.com/q/24700339
type: Answer
answers question: http://stackoverflow.com/q/24700339
has body: Try this : app.services.factory('SearchResource', [ '$resource', function ($resource) { return $resource("https://..../rest/demo/v1/AMID4?auth=demo_full:1", {}, { query: { method: 'GET', isArray: true}}); }]); Then you are using SearchResource.get in your code when you should use SearchResource.query, or you can just name it get. You have to define the actions your Resource offer and then use it, as documented here (check bottom of the page for an example). Also, make sure you don't miss any headers in your $resource definition. Finally, I prefer to use this (in my opinion) cleaner call: SearchResource.query({ param_id: stuff }).$promise.then(function(data) { return $scope.thing = data; }, function(e) { return console.log(e); });
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40063725
has text: No. `concat` takes multiple arrays as arguments - and that's just what we give it with `apply`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24713860

http://stackoverflow.com/q/24607730
answer count: 2
has body: I am using Ace Editor to build a code replay program. I store all the keys pressed when you type code, and then I replay them in Ace Editor. I have finished storing and replaying all keyboard/mouse input, but am having issues replaying tab presses. Ace Editor handles tabs within a textarea DOM. The default behavior for a textarea when tab is pressed is to move to the next DOM, so I know they are using preventDefault() and using their own handler in order to allow softTab (insertion of 1,2,3, or 4 spaces before all highlighted text). My goal is to cause Ace editor to trigger the tab event - such that whatever is currently highlighted in the Ace editor is tabbed over the correct number of spaces. Does anyone know how to do this? Here are a list of options I've tried and why they don't work: Store tab presses on keydown and then calculate the column value and insert the spaces in that location. BUT - this fails when you have some text half highlighted. The correct functionality should shift the entire word over, but this would just insert spaces in the middle of the word. Store the location and keys pressed whenever editor.on('change', some_event_handler) fires, which gives me exactly what was input and the location (perfect for replay) except it doesnt tell me whether tab or spacebar was pressed (it will fire for both and spacebar is already handled). Plus this still inserts spaces at the location (potentially in middle of a word instead of shifting word over) as in number 1. For example: editor.getSession().on('change', function(e) { if (handlers) { var text = e.data.text; if (text == ' ' || text == ' ' || text == ' ' || text == ' ') { //FAILS because it doesn't know if its space or a single space tab. Try to trick Ace Editor to trigger a tab by storing '/t' and inserting it into the ace Editor. For example (storage code): function keypress_handler(e) { var key = e.which; var text = String.fromCharCode(key); switch(key) { case 9: //Tab text = '\t'; // manually add ta…
tagged with: textarea
downvote count: 0
tagged with: events
favorite count: 0
tagged with: ace-editor
upvote count: 2
accepted answer: http://stackoverflow.com/a/24609491
has title: Ace Editor (javascript): Triggering a tab press event for Ace Editors event handlers (not just inserting '/t' or spaces)
score: 2
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/24608974
tagged with: text-editor
tagged with: javascript
has answer: http://stackoverflow.com/a/24609491
possible better answer: http://stackoverflow.com/a/24608974

http://stackoverflow.com/q/24642085
has comment: http://stackoverflow.com/comment/38198238
has answer: http://stackoverflow.com/a/24642243
tagged with: javascript
has comment: http://stackoverflow.com/comment/38195661
has answer: http://stackoverflow.com/a/24793747
tagged with: open-uri
linked to: http://stackoverflow.com/q/15902211
accepted answer: http://stackoverflow.com/a/24793747
score: 0
has title: Open URI - Opening multiple pages
tagged with: node.js
type: AnsweredQuestion
type: Question
has body: Using Node's open-uri module, is it possible to open multiple pages such as this? For example, a user's blog might have 10 pages. ruby index = 1 downloads = [] page = open("http://#{user_name}.tumblr.com/page/#{index.to_s}") do |page| page.each_line do |line| downloads.push($&amp;) if line =~ regex end end
answer count: 2
possible better answer: http://stackoverflow.com/a/24642243

http://stackoverflow.com/comment/38390709
score: 0
comment on: http://stackoverflow.com/q/24740990
type: Comment
type: QuestionComment
has text: Have you checked outputPanel's deferred loading in [the PrimeFaces Showcase?](http://www.primefaces.org/showcase/ui/panel/outputPanel.xhtml)

http://stackoverflow.com/comment/38109377
has text: You want it when the user is filling the input field or on submission?
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24597496

http://stackoverflow.com/comment/38284720
comment on: http://stackoverflow.com/a/24689818
has text: what id should be returned in the scenario where there are 2 names that are the same?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38187128
type: AnswerComment
comment on: http://stackoverflow.com/a/24617010
type: Comment
has text: Look at the [Date object details](http://www.w3schools.com/jsref/jsref_obj_date.asp) to see how you can for example `setHours` (and minutes, seconds...) on the date object you've created to get it vertically aligned. Also, a [updated JFiddle](http://jsfiddle.net/29UMJ/2/).
score: 1

http://stackoverflow.com/a/24753702
type: Answer
has comment: http://stackoverflow.com/comment/38422919
has comment: http://stackoverflow.com/comment/38422595
has comment: http://stackoverflow.com/comment/38419402
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38415481
has body: In most of the big data applications this scenario is important, especially when you have datatables with a big data to be fetched from the DB, basically it's a way of lazyloading. Before answering this question I'de like to point out that using the getters/setters for a logic/fetch is a bad idea, because they're called multiple times during the lifecycle. Steps: Separate the getters logic to another fetching/generating methods. public void fetchSpreadList() { //fetch from DB and set spreadList setSpreadList(db.findSpreadList()); } public void fetchTransList() throws Exception { //fetch from DB and set TransList setTransList(db.findTransList()); } //getters public List&lt;SpreadInformationDTO&gt; getSpreadList() { return spreadList; } public List&lt;TransHistoryDataDTO&gt; getTransList() { return transList; } Fetch data using remoteCommand &lt;p:remoteCommand name="fetchSpread" actionListener="#{transactionMB.fetchSpreadList}" update=":form1:spreadInfo" onstart="preTableIsLoading(PF('widVarMnmsInfo'))" oncomplete="postTableIsLoading(PF('widVarMnmsInfo'))"&gt; &lt;/p:remoteCommand&gt; &lt;p:remoteCommand name="fetchTrans" actionListener="#{transactionMB.fetchTransList}" update=":form2:withdrawInfo" onstart="preTableIsLoading(PF('widVarBrmOrderInfo'))" oncomplete="postTableIsLoading(PF('widVarBrmOrderInfo'))"&gt; &lt;/p:remoteCommand&gt; Each remoteCommand would fetch the data once the page is loaded, and update the datatable. onstart and oncomplete here are a loading indicators, passing a widgetVar to both preTableIsLoading and postTableIsLoading. Note: if you use PF 3.5 or lower pass the widgetVar without PF shortcut. preTableIsLoading and postTableIsLoading (javascript) function preTableIsLoading(widget) { widget.jq.find('.ui-datatable-empty-message td').hide(); widget.jq.find('.ui-datatable-empty-message') .append('&lt;span class="tableLoadingSpan" /&gt;'); } function postTableIsLoading(widget) { widget.jq.find('.ui-datatable-empty-message td').show(); widget.jq.f…
has comment: http://stackoverflow.com/comment/38420124
has comment: http://stackoverflow.com/comment/38415725
has comment: http://stackoverflow.com/comment/38418839
has comment: http://stackoverflow.com/comment/38415924
upvote count: 2
has comment: http://stackoverflow.com/comment/38415144
has comment: http://stackoverflow.com/comment/38415850
has comment: http://stackoverflow.com/comment/38417954
has comment: http://stackoverflow.com/comment/38418278
has comment: http://stackoverflow.com/comment/38418988
answers question: http://stackoverflow.com/q/24740990

http://stackoverflow.com/comment/38284211
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24689745
has text: *"As you can see, the preMonth() works right"* How am I supposed to see that if I can't run the code?

http://stackoverflow.com/comment/38222545
type: AnswerComment
has text: We had actually accidentally deleted a closing bracket in the CSS, which didn't allow the carousel to perform correctly. Thanks for the help!
type: Comment
comment on: http://stackoverflow.com/a/24654698
score: 1

http://stackoverflow.com/comment/38314534
comment on: http://stackoverflow.com/a/24702636
score: 0
type: Comment
has text: Glad to hear it. One thing you might want to look into is the `mouseleave` event. You should be able to set `$(window).on('mouseleave', ...)` which will fire when the mouse leaves the window, so you don't have to mess with e.pageX and e.pageY. Just turn it off with the same `.off()` notation described above.
type: AnswerComment

http://stackoverflow.com/q/24658089
accepted answer: http://stackoverflow.com/a/24662162
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24662162
favorite count: 0
answer count: 1
has body: I'm trying to get the image gallery functionality from Featherlight to work. It is a jQuery add-on and I've followed their directives from their web-site (http://noelboss.github.io/featherlight/) but unfortunately I can't get it to work as intended. What I'm trying to achieve is an image gallery presentation by clicking on an image thumb. From the gallery I should be able to navigate among the images included in the gallery with previous, next icons. I've added links to the css-style file as well as the js-file. Enterd the HTML-code for the gallery and added javascript code for settings to the gallery. I'm a newbie to javascript so it may be some very basic thing and I would really appreciate any hint on what is wrong. Code can be found at: http://jsfiddle.net/ovedexlin/69qZx/ HTML-code: &lt;div class="adImages"&gt; &lt;div class="row"&gt; &lt;a class="thumbnail gallery" href="http://www.tranarportalen.se/UpLoad/Breeders/b11000/digger.jpg"&gt; &lt;img src="http://www.tranarportalen.se/UpLoad/Breeders/b11000/digger.jpg" alt="thumb1" width="250" height="200"&gt; &lt;/a&gt; &lt;a class="thumbnail gallery" href="http://www.tranarportalen.se/UpLoad/Breeders/b11000/digger.jpg"&gt; &lt;img src="http://www.tranarportalen.se/UpLoad/Breeders/b11000/digger.jpg" alt="thumb2" width="250" height="200"&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; JS-code: $(document).ready(function(){ $('a.gallery').featherlightGallery({ gallery: { previous: '«', next: '»', fadeIn: 300 }, openSpeed: 300 }); });
upvote count: 1
has title: How to get Featherlight Image Gallery to work?
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/24665105
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38238597
has answer: http://stackoverflow.com/a/24665574
has body: So I am trying to access an OpenFEMA API for funding data, but I am pretty new to APIs and I am trying to access the API using Javascript. I ran into the Same-Origin Problem and started using CORS. So my code currently looks like this: function createCORSRequest(method, url) { var xhr = new XMLHttpRequest(); if ("withCredentials" in xhr) { // Check if the XMLHttpRequest object has a "withCredentials" property. // "withCredentials" only exists on XMLHTTPRequest2 objects. xhr.open(method, url, true); console.log('1'); } else if (typeof XDomainRequest != "undefined") { // Otherwise, check if XDomainRequest. // XDomainRequest only exists in IE, and is IE's way of making CORS requests. xhr = new XDomainRequest(); xhr.open(method, url); console.log('2'); } else { // Otherwise, CORS is not supported by the browser. xhr = null; console.log('3'); } return xhr; } var xhr = createCORSRequest('GET', "http://www.fema.gov/api/open/v1/PublicAssistanceFundedProjectsDetails"); alert(xhr.responseText); but the alert box is empty when it comes up. I am really not sure what I am doing wrong. would love some help.
accepted answer: http://stackoverflow.com/a/24665574
score: -1
has title: Accessing specific API
downvote count: 1
has comment: http://stackoverflow.com/comment/38238425
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38238750
type: Question
tagged with: cors
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/24680189
linked to: http://stackoverflow.com/q/34150253
has comment: http://stackoverflow.com/comment/38270754
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Get a JSON file (that contains Hebrew values) from a remote server and parse it in Node.js
has comment: http://stackoverflow.com/comment/38266418
answer count: 1
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/60393421
favorite count: 0
has comment: http://stackoverflow.com/comment/38268074
tagged with: utf-8
upvote count: 4
tagged with: node.js
has body: I have a dynamic JSON file hosted on a remote server (acting as some kind of an API), and it also contains some Hebrew text in its values. How can I save the response and parse it a a JSON object? That's what I've got so far using Request (https://www.npmjs.org/package/request): var options = { url: 'http://www.AWEBSITEHERE.com/file.json', method: 'GET' }; function callback(error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { var info = JSON.parse(body); // ... } } request(options, callback); And this code gives the following error when accessing: SyntaxError: Unexpected token ∩┐╜ at Object.parse (native) at Request.callback [as _callback] (C:\Sites\node\proj\routes\inde x.js:21:29) at Request.self.callback (C:\Sites\node\proj\node_modules\request\ request.js:122:22) at Request.EventEmitter.emit (events.js:98:17) at Request.&lt;anonymous&gt; (C:\Sites\node\proj\node_modules\request\re quest.js:1019:14) at Request.EventEmitter.emit (events.js:117:20) at IncomingMessage.&lt;anonymous&gt; (C:\Sites\node\proj\node_modules\re quest\request.js:970:12) at IncomingMessage.EventEmitter.emit (events.js:117:20) at _stream_readable.js:920:16 at process._tickCallback (node.js:415:13) I think this error has something to do with the BOM characters that the server sends. How can I solve this problem? Thanks!
downvote count: 0
type: UnansweredQuestion
tagged with: http
has answer: http://stackoverflow.com/a/26388704

http://stackoverflow.com/comment/47104228
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24656480
has text: It seems that they made all links download the .exe file. Can you please specify the direct link ?

http://stackoverflow.com/a/24663241
type: Answer
answers question: http://stackoverflow.com/q/24662897
downvote count: 0
score: 7
has body: Read this: http://sitr.us/2011/07/28/how-mobile-safari-emulates-mouse-events.html But if a clickable element also does something on mouseover then tapping on that element will trigger a mouseover event instead of a click. Tapping on the same element again will produce a click event. If you have a mouseover event, iOS (maybe other OSes) will fire that upon initial click rather than the actual click event. I'd add some alerts to your JS to see which event, exactly, is being called on that initial tap.
has comment: http://stackoverflow.com/comment/38235084
upvote count: 7

http://stackoverflow.com/comment/38212603
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24651436
type: Comment
has text: He said that needs to use a diffrent css

http://stackoverflow.com/comment/38304159
type: AnswerComment
score: 0
type: Comment
has text: @Avinash Raj. your solution is great. but here It support consecutive special characters. can we avoid those things
comment on: http://stackoverflow.com/a/24700307

http://stackoverflow.com/a/60944807
answers question: http://stackoverflow.com/q/24621940
has body: const express = require('express') const server = express() const mongoClient = require('./MongoDB.js').client const port = 3000 ;(async () =&gt; { await mongoClient.connect() server.listen(port, () =&gt; console.log(`Server is listening on port ${port}!`)) })().catch(console.error)
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/38257414
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24658584
has text: Would an intelligent caching policy (conditional GET with `Last-Modified` and `If-Modified-Since` headers, etc, for your Ajax requests) not serve the same purpose without the added complexity of yet another library?

http://stackoverflow.com/q/24637393
score: 0
has answer: http://stackoverflow.com/a/24954438
accepted answer: http://stackoverflow.com/a/24954438
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: asp.net
type: AnsweredQuestion
has body: I have been trying to create a gallery using the litebox plugin for popup effects. The website is an aspx website with a single master page. Links in the master page: Popup images:
has comment: http://stackoverflow.com/comment/38820432
type: Question
has title: Litebox plugin does not work
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins

http://stackoverflow.com/a/24669427
answers question: http://stackoverflow.com/q/24669370
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24669370
has body: What you need to do is wait for all the callbacks to complete and then call res.send. var count = datos.length; for(var i=0;i&lt;datos.length;i++){ bittrex.getticker(datos[i].Currency, function(err, data){ if (err){ console.log('ERROR:', err); return 'ERROR:'+ err; } else { if (data.message!='INVALID_MARKET') { this.LasValueBTC=data.result.Last; } else { this.LasValueBTC=''; } count--; if (count === 0) { res.send(datos); } } }.bind(datos[i])); } Or using async async.each(datos, function(dato, next) { bittrex.getticker(dato.Currency, function(err, data) { if (err){ console.log('ERROR:', err); next(err); } else { if (data.message!='INVALID_MARKET') { dato.LasValueBTC = data.result.Last; } else { dato.LasValueBTC=''; } next(); } }); }, function(err) { res.send(datos); });
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/24747351
has comment: http://stackoverflow.com/comment/38407636
downvote count: 0
upvote count: 2
has body: Replace your function loadImages with this here : function loadImages(imageUrls, $temporaryImageContainer) { for (srcKey in imageUrls) { var $image = $("&lt;img&gt;", {"id" : "imageUrl" + srcKey, "src" : imageUrls[srcKey]}) .load(function() { if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { console.log("Error loading image: " + imageUrls[srcKey]); } else { $temporaryImageContainer.append($image); console.log("Loaded image: " + imageUrls[srcKey]); } imgCount++; checkIfImagesAreLoaded(); }); } } function checkIfImagesAreLoaded() { if (imgCount === imageUrls.length) { imgCount = 0; imgAjaxComplete = true; console.log("loadImages() complete"); } } As for the explanation, the for loop completes before anything else because the jQuery load function executes the method you pass in as a parameter only when the image is loaded, so it doesn't get called right away. EDIT: You should not use for (x in array) in Javascript, as this loop is for iterating properties of an object. Unfortunately the best practice is to use for (var i = 0; i &lt; length; i++) .... See W3Schools for loop documentation here. You could also use : yourArray.forEach(function(item) { //Do crazy stuff here }); But forEach() is part of ES5 and it won't be supported in older browsers like IE8 and below.
type: Answer
answers question: http://stackoverflow.com/q/24746418
score: 2
has comment: http://stackoverflow.com/comment/38436548

http://stackoverflow.com/comment/38092277
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24588558
has text: Are you sure you can chain `bar()` to an element ? How about `bind()` (or call / apply) ?
type: AnswerComment

http://stackoverflow.com/comment/38171275
type: QuestionComment
comment on: http://stackoverflow.com/q/24629092
has text: cordova.js should be inside www folder like www/cordova.js for cordova version 3 and above..
score: 0
type: Comment

http://stackoverflow.com/comment/38288985
score: 0
has text: your code is wrapped in `$(document).ready();` ?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24692596

http://stackoverflow.com/q/24698077
has answer: http://stackoverflow.com/a/24698399
accepted answer: http://stackoverflow.com/a/24698399
has answer: http://stackoverflow.com/a/24705171
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38299611
has title: How to extract annonym javascript functions
possible better answer: http://stackoverflow.com/a/24698455
answer count: 4
has comment: http://stackoverflow.com/comment/38299019
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24698276
has answer: http://stackoverflow.com/a/24698455
has comment: http://stackoverflow.com/comment/38299540
has body: I defined my javascript jquery function in a separate file: function setupSlider($, url) { genImgUrl = url + '/gensvg/'; $("#slider").slider({ min : -2000, max : 2000, value : 0, change : function(event, ui) { $('#svgImg').hide(); $.ajax({ type : "POST", url : genImgUrl, ... }, slide : function(event, ui) { var v = 50; ... $('#value').text(ui.value).css('left', (v - 0.5) + '%'); } }); $('#min').text($('#slider').slider('option', 'min')); $('#max').text($('#slider').slider('option', 'max')); }; I would like to separate the functions for the change and slide option into a defined function changeAction and slideAction. But I have problems with my parameters $, genImgUrl and the jquery slider parameters event, ui. How do you merge them? You need the bind function, right? Thanks!
type: Question
score: 0

http://stackoverflow.com/comment/38171650
type: QuestionComment
has text: It looks correct. Do you get a console error? If you run into an uncaught exception somewhere else in the script before the timeout function runs, js *will* stop execution.
type: Comment
comment on: http://stackoverflow.com/q/24629769
score: 0

http://stackoverflow.com/a/24636915
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38185251
upvote count: 3
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/24636826
score: 3
accepted answer of: http://stackoverflow.com/q/24636826
has body: Issue with your code is that you're assigning to Camada.prototype in a constructor. Use this instead. The difference is that assigning to prototype will make this property common among all the instances of Camada. Assigning to this will make it a property of the given instance only (which is what you want). Difference between prototype and this is explained pretty well in this StackOverflow thread. Try this: function Camada(nome) { // Since you're using Camada as a constructor, you can use 'this' // and assign new objects properties to it. this.nome = nome; this.desenhar = function () {}; }; var camadas = []; for (var i = 0; i &lt; 10; i++) { var camada = new Camada('nome' + i); camadas[i] = camada; } for (var i = 0; i &lt; 10; i++) { console.log(camadas[i].nome); }
has comment: http://stackoverflow.com/comment/38185268

http://stackoverflow.com/comment/38282912
score: 3
has text: You need to read a few ajax tutorials [Using jQuery](http://learn.jquery.com/ajax/) or [Using just javascript](http://www.tizag.com/ajaxTutorial/ajaxphp.php) and search for a few other
type: Comment
comment on: http://stackoverflow.com/q/24689034
type: QuestionComment

http://stackoverflow.com/q/24616796
type: Question
has body: I have a textbox but I can't figure out a way, so that it calls a javascript function present in the same file. &lt;input type="text" style="width: 30px" disabled id="mybid" name="" value="" onkeyup="if (event.keyCode == 13) myFunction();second(1);"&gt;
score: -2
tagged with: javascript
upvote count: 0
answer count: 1
favorite count: 0
has title: How to call a function in Javascript on pressing the "Enter" key
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/24616832

http://stackoverflow.com/q/24679879
has body: I have a form which collects data and a file upload. Within the upload function in my controller, it checks if the parameters passed through the form indicate that the file is a duplicate. After the checks, I want to prompt the user in the case that the file is a duplicate. The issue is that I need the rest of the upload function to wait for that user input before continuing with the upload.
has answer: http://stackoverflow.com/a/24679954
tagged with: ruby-on-rails-4
type: AnsweredQuestion
tagged with: javascript
type: Question
has title: Rails popup with user input mid-way through controller function
accepted answer: http://stackoverflow.com/a/24679954
score: 0
tagged with: ruby-on-rails
answer count: 1

http://stackoverflow.com/comment/38391164
type: QuestionComment
has text: @gilly3 I know we can add content using Scripts but I want to know how to extract content from links such as it's title, image and meta description
comment on: http://stackoverflow.com/q/24745664
score: 0
type: Comment

http://stackoverflow.com/q/24600348
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: ajax
score: 3
has answer: http://stackoverflow.com/a/24623178
favorite count: 0
type: UnansweredQuestion
has title: Ajax-type call from PHP
has comment: http://stackoverflow.com/comment/38152681
tagged with: php
upvote count: 3
has body: I have the following situation: A frontend server redirects with HTTP Post to a backend server. At entry of the backend server, I execute some PHP code before the page has been loaded. I would like to send a notification, at this point, back to the frontend server that the redirection was successful. The entry page on the backend uses the Post/Redirect/Get pattern to prevent browser form resubmission alert, so after this the PHP code does a HTTP Get request to itself. After the Get header has been sent, the notification back to the frontend should not be sent from PHP code, to prevent sending it each time the page is refreshed on the backend server. Can this be done from PHP code, or do I have to wait until the document has loaded and then use an Ajax call from Javascript and somehow check that the notification is only sent once (the first time)?

http://stackoverflow.com/q/24620389
has body: I got this to disable on screen sizes below 1020 but any idea how to get it to check dynamically as the browser window is being resized?: &lt;script&gt; $(document).ready(function() { /*Set height of sections to window height*/ $( "#homepage-fold" ).each(function(){ if ($(window).width() &gt;= 1020) { var $this = $(this);} $this.css({'height':($(window).height())+'px'}); /*Recalculate on window resize*/ $(window).resize(function(){ $this.css({'height':($(window).height())+'px'}); }); }); });&lt;/script&gt; Any idea how to get the if statement I added to work dynamically as the browser's being resized. i tried wrapping that first if tag in the second Recalculate section but I must not have put it in the correct spot. Thanks!! -- First off, this seems to be a simple solution but the solution I tried didn't work. I'm newer to jQuery so I'm guessing it was an error in my syntax - probably improper placement of this rule. If somebody could help me figure out how to get this to work I'd greatly appreciate it. I only want this script to be active on screen sizes greater than 1020px. Screens below 1020 should see the page without this active script. &lt;script&gt; $(document).ready(function() { /*Set height of sections to window height*/ $( "#homepage-fold" ).each(function(){ var $this = $(this); $this.css({'height':($(window).height())+'px'}); /*Recalculate on window resize*/ $(window).resize(function(){ $this.css({'height':($(window).height())+'px'}); }); }); });&lt;/script&gt; I thought by adding if(screen.width &gt;= 1020){ Like this: $(document).ready(function() { /*Set height of sections to window height*/ $( "#homepage-fold" ).each(function(){ if(screen.width >= 1020){ var $this = $(this); $this.css({'height':($(window).height())+'px'}); /*Recalculate on window resize*/ $(window).resize(function(){ $this.css({'height':($(window).height())+'px'}); }); Added: }); }); });&lt;/script&gt; Any thoughts on where I messed up this code? Thank you!!
tagged with: responsive-design
has answer: http://stackoverflow.com/a/24620495
has comment: http://stackoverflow.com/comment/38155976
tagged with: javascript
has answer: http://stackoverflow.com/a/24621509
score: 0
answer count: 2
tagged with: jquery
has title: I Disabled certain jQuery script at certain screen size but how do I get it check when screen is resized?
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/38092941
comment on: http://stackoverflow.com/q/24588516
type: Comment
type: QuestionComment
score: 1
has text: So what's stopping you? Where are you stuck?

http://stackoverflow.com/comment/38348848
score: 0
has text: Thank you guys but I solved this myself. I cannot post an answer until before 8 hours. So, I will post the solution tomorrow. Thanks again.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24723164

http://stackoverflow.com/q/24681106
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/24681340
has comment: http://stackoverflow.com/comment/38268290
has comment: http://stackoverflow.com/comment/38268334
downvote count: 1
type: Question
tagged with: javascript
has body: So I know that you need to use promises in Angular to manage async, but I'm not quite sure how to do it in this instance. function getLineGraphData(promises){ var points = []; for (var i = 0; i &lt; promises.length; i++) { $http.get('/file/tsDataPoints/'+promises[i].unit+"?startDate="+promises[i].startTs+"&amp;endDate="+promises[i].endTs+"&amp;startState="+promises[i].startState+"&amp;endState="+promises[i].endState).success(function(data){ points.push(data); console.log(data); }); } console.log(points); return points; } I think what is throwing me off here is that the data I'm using to build my queries is in an array. So I don't just need to get the return from one request. There will be several. What do I need to do? Examples would be helpful. Thanks.
tagged with: ajax
accepted answer: http://stackoverflow.com/a/24681340
has title: Trouble getting Angular-JS to wait for async call before proceeding
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38268135
linked to: http://stackoverflow.com/q/21310964
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/38267987
has comment: http://stackoverflow.com/comment/38268118

http://stackoverflow.com/a/24594854
has body: You can also call the getBannerHtml method in the scope of your Vicinity by using the "apply" function. The "this" variable is set to the object you pass. $(document).ready(function () { var data = new Vicinity(pubReference, sessionId, function (result) { $("#sticky").html(result.ad.getBannerHtml.apply(result)); } ); });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24594645

http://stackoverflow.com/q/24722222
accepted answer: http://stackoverflow.com/a/24750688
tagged with: jsrender
has body: Can anyone help out on how to render a JSRender template after migrating from JQuery Templates? With the old JQuery Template system I have got the following in my HTML page: to: {{>theContentFront}} {{>theContentBack}} in the index.html, and from: $( '#pageTmpl' ).tmpl( pageData ).appendTo( this.$el ); to: $("this.$el").html( $("#pageTmpl").render(pageData) ); in jquery.flips.js. Any advice you could offer as to why this is would be appreciated.
has comment: http://stackoverflow.com/comment/38436602
has comment: http://stackoverflow.com/comment/38473760
has comment: http://stackoverflow.com/comment/38480952
type: AnsweredQuestion
tagged with: jquery-templates
has title: Syntax Change - Migrating from JQuery Templates to JsRender
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38473346
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24750688
has comment: http://stackoverflow.com/comment/38480477
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/24642889
score: 3
downvote count: 0
upvote count: 3
type: AcceptedAnswer
has body: The "global" scope way Set it on $rootScope. Although global scope is ill-advised. Also, if you must use global scope ($rootScope) to track this, you can set it in a run() block, and it will be set as soon as the application is ready: angular.module('myApp').run([ '$rootScope', 'AppConfigService', function($rootScope, AppConfigService) { $rootScope.storageUrl = AppConfigService.storageUrl } ]); The problem with global scope is that any other modules you load into your app could easily clobber your variable on $rootScope and it will be very hard to debug. Better way: Use the service directly in an "outer controller": app.controller('OuterCtrl', [ '$scope', 'AppConfigService', function($scope, AppConfigService) { $scope.config = AppConfigService; } ]); Then wrap your whole app in that controller: &lt;body ng-controller="OuterCtrl"&gt; &lt;div ng-controller="MyCtrl"&gt; other stuff here &lt;/div&gt; &lt;/body&gt; Why does this work? Because all controllers and directives under this controller prototypically inherit their scope from this controller's scope.
answers question: http://stackoverflow.com/q/24642782
type: Answer
accepted answer of: http://stackoverflow.com/q/24642782

http://stackoverflow.com/q/24632533
tagged with: javascript
tagged with: actionscript-3
has body: I've been reading this article: http://blogs.adobe.com/cantrell/archives/2011/03/native-cursors-in-air-2-6.html on how to create a native cursor in AIR without having to hack it by moving a sprite in place of a hidden cursor to fake it. However I'm using HTML/JavaScript instead of ActionScript. So far I have: function nativeCursor(){ // load in a bitmap var loader = new air.Loader(); loader.load(new air.URLRequest('./assets/cursor.png')); var bitmaps = new air.Vector["&lt;String&gt;"](); var bmd = new air.BitmapData(32, 32, true, 0x00000000); var p = new window.runtime.flash.geom.Point(0, 0); var r = new window.runtime.flash.geom.Rectangle(32 , 0, 32, 32); var image = new window.runtime.flash.display.Bitmap(loader.content); bmd.copyPixels([image.bitmapData], r, p); bitmaps.push(bmd); var mcd = new window.runtime.flash.ui.MouseCursorData(); mcd.data = bitmaps; mcd.hotSpot = new Point(0, 0); mcd.frameRate = 24; window.runtime.flash.ui.Mouse.registerCursor("defaultCursor", mcd); window.runtime.flash.ui.Mouse.cursor = "defaultCursor"; } But I get an error TypeError: Error #1034: Type Coercion failed: cannot convert []@2b9d1f1 to flash.display.BitmapData. for this line: bmd.copyPixels([image.bitmapData], r, p); If I remove the brackets for that line so it's just: bmd.copyPixels(image.bitmapData, r, p); the error becomes TypeError: Error #2007: Parameter sourceBitmapData must be non-null. So I'm assuming that the error is because the bitmap data is null... but why? The image is being loaded in fine so is the way I'm trying to get the bitmap data incorrect?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24634031
type: Question
tagged with: air
has title: Native cursor in Adobe AIR JavaScript with MouseCursorData
score: 0
has answer: http://stackoverflow.com/a/24634031
answer count: 1

http://stackoverflow.com/comment/61879303
score: 7
type: AnswerComment
comment on: http://stackoverflow.com/a/24690917
type: Comment
has text: Heads up to anyone else looking at this issue, you also need to ensure that the element is appended to the document body, not just that it has a submit button. If this isn't working, try these lines, courtesy of https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms/Sending_forms_through_JavaScript `form.style.display = "none";` `document.body.appendChild(form);`

http://stackoverflow.com/a/24708612
score: 0
type: Answer
has body: You can add inline JavaScript by using the &lt;script&gt; tag. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script EDIT Sorry I didn't notice that you've already tried the script tags. Can you post your HTML with the script tags?
answers question: http://stackoverflow.com/q/24708602
has comment: http://stackoverflow.com/comment/38320056
has comment: http://stackoverflow.com/comment/38320021
has comment: http://stackoverflow.com/comment/38320024

http://stackoverflow.com/comment/38197933
has text: Well, for one thing, if you read the [TOS](https://developers.google.com/maps/terms), you can only cache that data "temporarily". The other question would be, what do you need this data for? Why do you need everything? If all you need is the coordinates and/or the viewport/bounds, store those in your own format that can be translated back into the current version of the google.maps object (give the properties useful names like {lat: xxx, lng: xxx}, and get them using the documented methods .lat(), .lng(), etc; then write code to reconstruct the object when you retrieve it from your server)
type: AnswerComment
comment on: http://stackoverflow.com/a/24642932
score: 0
type: Comment

http://stackoverflow.com/a/25608581
answers question: http://stackoverflow.com/q/24672519
downvote count: 0
type: Answer
has body: I had a similar issue. Got it to work using a timeout. $(window).on('unload', function(){ window.location.hash = ''; setTimeout(function () { window.location.reload(true); }, 0); });
score: 1
upvote count: 1

http://stackoverflow.com/comment/110731444
comment on: http://stackoverflow.com/a/26169149
type: Comment
has text: Tried all possible settings inside the IE settings but nothing changed anything to the situation.
score: 0
type: AnswerComment

http://stackoverflow.com/a/24689439
has body: You have a function expression in a statement context. Specifically: function() { // ... } You have to consider what you want to do with that function. Even if it were valid syntax, why would you ever want to construct a function and then discard it without doing anything with it? Presumably, you either meant to name it so you could reference it later: function foo() { // ... } Or maybe you wanted to pass it as an argument to some other function: bar(function() { // ... }); But the way you’ve got it now, it’s a useless function expression appearing in a statement context, which just happens to be invalid syntax as well as useless.
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24689407
score: 1

http://stackoverflow.com/a/24718363
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24718294
has body: You could use the jquery command .html to both get and set the html contents of a div. However, I imagine that copying the iframe to a new div will mean the video will play from the beginning. If that is a problem, then you should try and achieve this by changing the currentplayer css instead. Perhaps have a div on the outside of currentplayer with a set height and use this to detect the position the user is on the page instead. If that is not possible, then look into using the YouTube api, as you will then be able to access data like how much of the video has played and tell the second video area to start playing from this point.
type: Answer

http://stackoverflow.com/q/24733527
has answer: http://stackoverflow.com/a/24735132
has body: UPDATE 2 I finally got the code to work but it only works within the same page. What should i do to make it work from a different page? I have the same links in every page and when a visitor on page 5 clicks X link, it should direct to the X anchor which is on page 2. I've used Marius P.'s script which can be found down below. Here's my test page No matter how much i've tried, the smooth scroll scripts are just not working for me. After many tries, i've tried to make a jsfiddle to see if the problem is from my script not loading. But nope. Even on jsfiddle my code is not working. It just jumps Here it is http://jsfiddle.net/8H2sn/2/ and here is where i got the code from http://jsfiddle.net/YtJcL/ and here is my html just to satisfy stackoverflow go1 go2 go3 So what gives? Should i modify the script code? I am and will remain a js noob so i'm in the cold here. Any hint would be appreciated. and if you say it's because of the css, then i'm screwed royally because that css must stay.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: smooth scroll only working on the same page
has answer: http://stackoverflow.com/a/24733578
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38367859
type: Question
has comment: http://stackoverflow.com/comment/38367894

http://stackoverflow.com/comment/38232302
score: 1
has text: https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation
comment on: http://stackoverflow.com/q/24661867
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38160616
score: 0
has text: show your code which you tried sofar?
type: Comment
comment on: http://stackoverflow.com/q/24623643
type: QuestionComment

http://stackoverflow.com/q/24735807
type: Question
tagged with: javascript
tagged with: jquery
has body: I wan't to remove message item on 'Delete' button. jsfiddle $('.message-delete').on('click', function () { $(this).parent().remove(); });
answer count: 1
tagged with: listener
has answer: http://stackoverflow.com/a/24735840
type: AnsweredQuestion
score: 0
has title: Why listeners don't work?
accepted answer: http://stackoverflow.com/a/24735840

http://stackoverflow.com/comment/38310840
score: 0
has text: It isn't working on all browsers.
comment on: http://stackoverflow.com/q/24703893
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38159236
has text: Thanks, my friend. But your demo pushes the visible menu 50px down when it is open. Initially, I thought it was a simple tweak of X or Y coordinate.... I guess it was not :(
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24610787
type: AnswerComment

http://stackoverflow.com/comment/38315818
has text: you can't set editor value with innerHTML, maybe you are looking for editor.setValue?
comment on: http://stackoverflow.com/a/24697010
type: AnswerComment
score: 0
type: Comment

file
type: Tag
tags question: http://stackoverflow.com/q/24696147
tags question: http://stackoverflow.com/q/24734736
tag name: file
tags question: http://stackoverflow.com/q/24723631
tags question: http://stackoverflow.com/q/24656028
tags question: http://stackoverflow.com/q/24662959
tags question: http://stackoverflow.com/q/24735849
tags question: http://stackoverflow.com/q/24664588

http://stackoverflow.com/comment/38384471
type: QuestionComment
type: Comment
has text: Folks, concatenation is the wrong solution here... unless you plan on escaping whatever `id` is yourself, which you shouldn't bother doing. jQuery has a perfectly good `.attr()` method.
score: 0
comment on: http://stackoverflow.com/q/24742472

http://stackoverflow.com/q/24602203
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24644918
tagged with: post
has answer: http://stackoverflow.com/a/24602697
type: Question
has answer: http://stackoverflow.com/a/24604957
has answer: http://stackoverflow.com/a/32477178
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24602697
accepted answer: http://stackoverflow.com/a/24644918
score: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 2
has title: Why is my Angular POST request to a PHP page not setting up the POST array?
tagged with: http://stackoverflow.com/tag/html
tagged with: php
answer count: 4
has body: I have a angular post that sends to my php file, but in the PHP file, I cannot access anything from the post variable. It returns my SUCCESS string, but nothing after that, so my return on the post is "SUCCESS - - - - - " where the data should be between the dashes. JSON/JS object: DESCRIPTION: "123321" LOCATION: "ab_calgary_eighth_ave_pl" NAME: "123321" QUANTITY: 123321 TYPE: "cycle" Angular POST Code: $scope.insertNewInventoryItem = function() { if(typeof ($scope.newItem.LOCATION) == 'undefined') alert("LocationCannot Be Empty. Please Select An Option From The Drop Down."); else if(typeof ($scope.newItem.TYPE) == 'undefined') alert("Type Cannot Be Empty. Please Select An Option From The Drop Down."); else { $http.post("dataaccess/addnewinventory.php", $scope.newItem).then(onAddNewComplete, onAddNewError); } } PHP Page attempting to find the posted values: &lt;?php $con = mysqli_connect("localhost", "dbadminuser", "password", "database_demo_inventory"); // Check connection if (mysqli_connect_errno()) { echo "FAIL - Failed to connect to MySQL: " . mysqli_connect_error(); } else { echo "SUCCESS - " . $HTTP_POST_VARS['newItem.NAME'] . " - " . $HTTP_POST_VARS['TYPE'] . " - " . $HTTP_POST_VARS["QUANTITY"] . " - " . $HTTP_POST_VARS . " - " . $_POST[0]; } mysqli_close($con); ?&gt; Picture of the Request from GOOGLE developer tools: Picture of return data from the request (see PHP code for where SUCCESS is coming from): Why can I not access the post variables? Am I missing something here?

http://stackoverflow.com/q/24648158
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/24648223
answer count: 1
has body: I have a table where each row represents a user (populated from a database). I'd like it so when a user clicks one of these rows, some elements are appended below the row relating to the clicked row. I've achieved this effect with the following script: $('.data-table tr').click(function () { $(this).after(' ' + ' ' + ' ' ); $.get("file.php", function (data) { $( ".trowdiv" ).html( data ); }); } }); file.php is simply some HTML elements: Name: Email Address: What I would like now is to change the value attributes of each input by adding something (after the $.get) like : $('#name').attr('value', "hello"); But it doesn't work. I suspect it's because the element hasn't loaded yet? I also get undefined when doing this: alert($('#name').attr('value')); Is there any way I can achieve the desired result? Or even an easy way to send information to file.php? Thanks.
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: Change attribute after $.get
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24648223
type: Question

http://stackoverflow.com/q/24696179
accepted answer: http://stackoverflow.com/a/25077584
has comment: http://stackoverflow.com/comment/38295889
favorite count: 0
has comment: http://stackoverflow.com/comment/38295565
has comment: http://stackoverflow.com/comment/39016618
type: Question
has comment: http://stackoverflow.com/comment/38296121
linked to: http://stackoverflow.com/q/4015613
answer count: 2
has title: HTML5 history pushState is not working
has comment: http://stackoverflow.com/comment/38295584
has comment: http://stackoverflow.com/comment/38295778
upvote count: 3
has body: Not sure what I'm doing wrong, but this small bit of code does not work: window.history.pushState("foo", "foo", "foo"); It will generate the following error in firefox 29: TypeError: window.history.pushState is not a function
has comment: http://stackoverflow.com/comment/38295967
has comment: http://stackoverflow.com/comment/38296497
has answer: http://stackoverflow.com/a/25077978
has comment: http://stackoverflow.com/comment/39012645
has comment: http://stackoverflow.com/comment/38295557
has answer: http://stackoverflow.com/a/25077584
possible better answer: http://stackoverflow.com/a/25077978
has comment: http://stackoverflow.com/comment/38295482
tagged with: javascript
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/38295491
downvote count: 0

http://stackoverflow.com/q/24726084
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/24726149
has comment: http://stackoverflow.com/comment/38353757
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/38358293
tagged with: javascript
has title: Do onClick attribute and click function work on touch screens (smartphones)?
tagged with: touch
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24788731
tagged with: jquery
has comment: http://stackoverflow.com/comment/38356143
has body: I made a music player plugin using jQuery, HTML5 and SoundCloud. On computers it works perfectly, but on smartphones such as iphone, its does not work the way it must be. For example some buttons work fine, but play button needs to be tapped t 3 times to work. for button in my player I used either on of these example: function play(){ //play song } &lt;div onClick="play()"&gt;&lt;/div&gt; or $(".playButton").click(function(){ //playsong }); &lt;div class="playButton"&gt;&lt;/div&gt; As some of the buttons and functions need more than one tap to work, I was thinking maybe I must use .on('tap', function(){}); instead. Or any other feature that works on touchscreens. So my question is that, for a function to work on smartphones, are the above example fine? Do I need anything else to make sure they work exactly the same as computer version of the plugin?

http://stackoverflow.com/a/24617475
type: Answer
has comment: http://stackoverflow.com/comment/38148961
has comment: http://stackoverflow.com/comment/38149042
has comment: http://stackoverflow.com/comment/38149444
has comment: http://stackoverflow.com/comment/38149631
score: 4
has body: Not as separate strings. jQuery() doesn't use multiple arguments in that manner. But, a single string can use the Multiple Selector: $("#ctlPerson, #ctlPerson2, #ctlPerson3").change(function() { ... }); Example: http://jsfiddle.net/XNY7E/ Though, you might consider assigning common class names to each element and using a class selector: $('.ctlPeople').change(function () { ... });
has comment: http://stackoverflow.com/comment/38148787
upvote count: 4
accepted answer of: http://stackoverflow.com/q/24617422
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38149114
downvote count: 0
answers question: http://stackoverflow.com/q/24617422

http://stackoverflow.com/comment/38157911
comment on: http://stackoverflow.com/q/24622115
has text: it seems like you're misusing (or not using) callbacks to your advantage. check out the [documentation](http://api.jquery.com) for where and how to put in callback functions.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24916231
has comment: http://stackoverflow.com/comment/39425440
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
has body: There is a great website that can do that for you, please check out http://bowercdn.net/ If that isn't what you are looking for please let me know.
answers question: http://stackoverflow.com/q/24708455
accepted answer of: http://stackoverflow.com/q/24708455

http://stackoverflow.com/a/24743064
has comment: http://stackoverflow.com/comment/38385595
has comment: http://stackoverflow.com/comment/38385630
has body: I suspect that data is not the variable assigned to the response. Or perhaps you haven't parsed response to js array from JSON using JSON.parse() Your code works fine here: DEMO
type: Answer
has comment: http://stackoverflow.com/comment/38385637
has comment: http://stackoverflow.com/comment/38385662
answers question: http://stackoverflow.com/q/24742867
has comment: http://stackoverflow.com/comment/38386122
has comment: http://stackoverflow.com/comment/38385933
has comment: http://stackoverflow.com/comment/38385914
score: 0

http://stackoverflow.com/comment/38109254
has text: this question is more logic oriented than to use readeymade solutions. Theme is how using the above method we can achieve what is required . @cookie
score: 0
comment on: http://stackoverflow.com/q/24597353
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/69232432
type: Comment
comment on: http://stackoverflow.com/a/24701823
score: 0
type: AnswerComment
has text: @Jyothu In fact I did, as mentioned in the edit of the question. Here's a working example. http://jsfiddle.net/9W8h4/3/

http://stackoverflow.com/a/24680631
downvote count: 0
has comment: http://stackoverflow.com/comment/38299496
has comment: http://stackoverflow.com/comment/72438645
type: Answer
has body: The script is assuming you are running on a webserver, so while you are running it locally change e.setAttribute("src", "//browser-update.org/update.js"); to e.setAttribute("src", "http://browser-update.org/update.js"); But remember to change it back when you run it on your live site! So just to explain fully: replace &lt;script type="text/javascript"&gt; var $buoop = {vs:{i:8,f:15,o:12.1,s:5.1}}; $buoop.ol = window.onload; window.onload=function(){ try {if ($buoop.ol) $buoop.ol();}catch (e) {} var e = document.createElement("script"); e.setAttribute("type", "text/javascript"); e.setAttribute("src", "//browser-update.org/update.js"); document.body.appendChild(e); } &lt;/script&gt; with &lt;script type="text/javascript"&gt; var $buoop = {vs:{i:8,f:15,o:12.1,s:5.1}}; $buoop.ol = window.onload; window.onload=function(){ try {if ($buoop.ol) $buoop.ol();}catch (e) {} var e = document.createElement("script"); e.setAttribute("type", "text/javascript"); e.setAttribute("src", "http://browser-update.org/update.js"); // this line changes! document.body.appendChild(e); } &lt;/script&gt;
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/24680345
accepted answer of: http://stackoverflow.com/q/24680345
has comment: http://stackoverflow.com/comment/40947993
has comment: http://stackoverflow.com/comment/38267255
has comment: http://stackoverflow.com/comment/38279454
type: AcceptedAnswer

http://stackoverflow.com/comment/38385587
score: 0
type: AnswerComment
type: Comment
has text: I am using IE 10 I used meta tag , do you think it is the issue
comment on: http://stackoverflow.com/a/24743026

http://stackoverflow.com/comment/38161451
type: AnswerComment
type: Comment
score: 0
has text: Here I could find that the variable processed_json is not in a valid JSON format which you are expecting. When I tried with the variable json, its working. I don't have your full code, even then I tried with a sample. Demo: http://jsfiddle.net/sanjaykumarns/VtVFB/612/
comment on: http://stackoverflow.com/a/24606570

http://stackoverflow.com/q/24685581
tagged with: css
has answer: http://stackoverflow.com/a/24685886
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38277542
has body: I am using both colResizable(for adjusting column) and Resizable function(for adjusting row) it is working good in mozilla firefox but not working in chrome For column we are using the following link - http://quocity.com/colresizable/ For row we are using following jquery function - $("#tblResize2 tr").resizable(); note : on the above code we tried using td (instead of tr) to resize columns it is not working after the final impact. $("#MatrixTable").colResizable({ onResize: onSampleResized }); $("#MatrixTable tr").resizable(); $("#MatrixTable td").resizable(); Whole function var onSampleResized = function (e) { var columns = $(e.currentTarget).find("td"); var rows = $(e.currentTarget).find("tr"); var full_msg; var row_msg; `columns.each(function () { full_msg += $(this).attr('id') + "_" +` $(this).width() + "_" + $(this).height() + ";"; }) rows.each(function () { row_msg += $(this).attr('id') + "_" + $(this).width() + "_" + $(this).height() + ";"; }) document.getElementById("hf_data").value = full_msg document.getElementById("hf_rowdata").value = row_msg; }; Thanks in advance
has answer: http://stackoverflow.com/a/24686060
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38276807
score: 0
has title: How to re-size rows and columns of a html table using jquery?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/24612563
has comment: http://stackoverflow.com/comment/38139348
answers question: http://stackoverflow.com/q/24612453
type: Answer
has body: This should create table with as many elements as there will be in array and do 2 columns per row. http://jsfiddle.net/XfKME/3/ var names = ["name1", "name2", "name3", "name4"]; var tbody = "&lt;table&gt;"; $.each(names, function (i, item) { if (i % 2 == 0) tbody += "&lt;tr&gt;"; tbody += "&lt;td&gt;"; tbody += item; tbody += "&lt;/td&gt;" if (i % 2 == 1) tbody += "&lt;/tr&gt;&lt;br /&gt;"; }); tbody += "&lt;/table&gt;";
has comment: http://stackoverflow.com/comment/38138905
score: 0
has comment: http://stackoverflow.com/comment/38139223

http://stackoverflow.com/comment/107913639
has text: Did you ever fix this issue? Canvas has to be clicked once before it can be interacted with.
score: 0
comment on: http://stackoverflow.com/q/24622235
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38279496
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24687204
has text: I'm playing with this.

http://stackoverflow.com/a/24692508
accepted answer of: http://stackoverflow.com/q/24692002
answers question: http://stackoverflow.com/q/24692002
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6
has body: You need to specify the 'stroke' attribute first, because: The default value for the stroke attribute is none which means that the outline is never drawn. See the documentation for stroke. Below is an example of how it might be done: selection .attr('stroke', 'red') .attr('stroke-width', 5); Here's a jsfiddle demonstrating how it works.
score: 6

http://stackoverflow.com/q/24596570
tagged with: javascript
has comment: http://stackoverflow.com/comment/38206652
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: facebook-graph-api
upvote count: 2
type: UnansweredQuestion
has body: Hi I wish to avoid my sites logo images from showing up as a thumbnail on being shared on social networks. One thing that I know that to avoid an image from occurring as a thumbnail one can use css sprites or data uri's but I also want the logo image to show up in search results. Is there a way to get this done? Scripts or any special markups are welcome. Thanks in advance.
score: 2
has title: How to avoid an image from occurring as thumbnail on sharing
tagged with: image
type: Question
has answer: http://stackoverflow.com/a/24757517
linked to: http://stackoverflow.com/q/5749028
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/38125621
has text: Thank you for the quick reply. I gathered as much. One method I thought was to continually extend the original image along width - that tends to increase the image size and makes loading the page slow. Nonetheless, thanks for the sugesstion. I'll looks out for plugins too..
type: AnswerComment
comment on: http://stackoverflow.com/a/24605607
type: Comment
score: 0

http://stackoverflow.com/comment/38328786
has text: This is different because of the introduction of the array. I have tried filter:{claim:[{value:srcBoxFilter}]} but that does not seem to work (Although the error disappears)
comment on: http://stackoverflow.com/q/24713254
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24639394
downvote count: 0
type: Answer
score: 3
has body: Your clamp function, when you pass it -MAX_LENGTH and MAX_LENGTH as the min and max boundaries, doesn't take into account anything related to the angle the line is at. For example, in your picture, the y value would be clamped to -MAX_LENGTH, which obviously, from the middle, will extend to the bottom-most point of the circle, and the x value will be clamped to MAX_LENGTH, extending as far as the right-most point of the circle. What you should do is calculate the angle made from the mouse position, and use the sine and cosine of that angle to determine the coordinates. You'll want something like this: var x = (mouseCurrent.x - midX), y = (mouseCurrent.y - midY); var angleInRadians = Math.atan2(x - midX, y - midY); var realX = Math.cos(angleInRadians); var realY = Math.sin(angleInRadians); Then, from the realX and realY values, you should be able to create your line. You might have to tweak this a little bit. I tried to adjust based on the fact that the origin isn't at (0, 0).
upvote count: 3
has comment: http://stackoverflow.com/comment/38190070
answers question: http://stackoverflow.com/q/24639090

http://stackoverflow.com/q/24600164
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24600361
score: 1
has answer: http://stackoverflow.com/a/24600361
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38115829
tagged with: javascript
has answer: http://stackoverflow.com/a/24609881
has body: In the code below I am starting/stopping a flame of particles when clicking on a block. It works ok, however, I need to have about 10-20 flames able to start/stop individually and keep track of them. A friend suggested that I put each flame in a small canvas, then draw each canvas individually, which i think would be a rendering overkill, having 10-20 draw() running at the same time. How should i go about this? One thing to note is that the position of the flame is given in particle(), then an array of particles is created, which basically represents the flame. // init canvas var canvas = $('canvas'), ctx = canvas[0].getContext('2d') // world , ctx2 = canvas[1].getContext('2d') // fog , context = canvas[2].getContext('2d') // flame , mDown = false, r1 = 100, r2 = 300, density = .4, hideOnMove = true, hideFill = 'rgba( 0, 0, 0, 1 )' , overlay = 'rgba( 0, 0, 0, 1 )', particles = [], particle_count = 100; // init flame for (var i = 0; i &lt; particle_count; i++) { particles.push(new particle()); } if (!hideOnMove) { // shouldn't be done like this, but this is a demo canvas.get(1).remove(); } // black out the canvas ctx.fillStyle = overlay; ctx.fillRect(0, 0, 1280, 800); // set up our "eraser" ctx.globalCompositeOperation = 'destination-out'; canvas.last() .on('mousemove', function (ev, ev2) { ev2 &amp;&amp; (ev = ev2); var pX = ev.pageX, pY = ev.pageY; // reveal wherever we drag var radGrd = ctx.createRadialGradient(pX, pY, r1, pX, pY, r2); radGrd.addColorStop(0, 'rgba( 0, 0, 0, 1 )'); radGrd.addColorStop(density, 'rgba( 0, 0, 0, .1 )'); radGrd.addColorStop(1, 'rgba( 0, 0, 0, 0 )'); ctx.fillStyle = radGrd; ctx.fillRect(pX - r2, pY - r2, r2 * 2, r2 * 2); // partially hide the entire map and re-reval where we are now ctx2.globalCompositeOperation = 'source-over'; ctx2.clearRect(0, 0, 1280, 800); ctx2.fillStyle = hideFill; ctx2.fillRect(0, 0, 1280, 800); var radGrd = ctx.createRadialGradient(pX, pY, r1, pX, pY, r2); radGrd.addColorStop(0, 'rgba( 0, 0, 0, 1 )'); radGrd.add…
answer count: 2
tagged with: canvas
has title: Drawing multiple particle elements on an html5 canvas without render kill
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/24609881
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38115717

http://stackoverflow.com/a/24644815
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/38203810
answers question: http://stackoverflow.com/q/24644595
has body: Try this alternative which will allow only numbers to be input on the field: http://jsfiddle.net/6faHh/ function compruebacampo(e, campotexto) { if (e.which != 8 &amp;&amp; e.which != 0 &amp;&amp; (e.which &lt; 48 || e.which &gt; 57)) { return false; } }

http://stackoverflow.com/comment/38258134
has text: Not a problem! If this solved your problem don't forget to mark this answer as correct. Thanks!
comment on: http://stackoverflow.com/a/24675623
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/104312915
has text: somethink like this https://gist.github.com/mcxiaoke/c2dd7d24c31c5bd2d724 its work for me
comment on: http://stackoverflow.com/q/24721508
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24634024
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38179834
type: Answer
has body: Try to hide the opened ul elements first and then toggle the current element, $("ul.opt").addClass("hidden"); $('#filter &gt; li &gt; a').on("click", function (e) { var cache = $(this).next('ul'); $('#filter ul:visible').not(cache).hide(); cache.toggle(); }); DEMO
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24633973
score: 1
answers question: http://stackoverflow.com/q/24633973

http://stackoverflow.com/comment/38361549
score: 0
type: QuestionComment
has text: Also I always do that with body just as a precaution. It's an old habit that won't die
type: Comment
comment on: http://stackoverflow.com/q/24729960

http://stackoverflow.com/q/24731898
has body: I have a radials gradient and I want animate the opacity to make transparent and then restore the real opacity... I searched the posibles solutions such as context.globalAlpha but all radials gradient remain invisible and I want one... other possible solutions?
has comment: http://stackoverflow.com/comment/38364994
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24743009
tagged with: radial-gradients
type: UnansweredQuestion
has title: animate opacity of radial gradient without css3
type: Question
has comment: http://stackoverflow.com/comment/38365820
tagged with: canvas
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/24595077
answers question: http://stackoverflow.com/q/24594689
upvote count: 1
has body: The debugger can't know if an object has been altered, this is why the posts attribute's rendering (in your example) has not been updated. Even if the debugger would be able to know when a attribute has been changed updating it every time (and all "loggings") would be too expensive. So the debugger will check the attribute only when accessing it explicitly. Chrome in this case will do this even only once: p = []; window.x = {x: p}; Object {x: Array[0]} x: Array[0] __proto__: Object x.x.push(1); 1 x.x.push(2); 2 Klicking x, the Array updates p = []; window.x = {x: p}; Object {x: Array[2]} x: Array[2] 0: 1 1: 2 length: 2 __proto__: Array[0] __proto__: Object Adding one item more to the array and toggleing x again, the size and entries remain x.x.push(3) 3 x: Array[2] 0: 1 1: 2 length: 2 __proto__: Array[0] In my opinion it's not necessary for the logger to update the object value since the variable watch has this function already. There you can always update the current value of a variable. This works in Firebug and Chrome. Here's an example for Chrome:
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24594689

http://stackoverflow.com/comment/38109897
comment on: http://stackoverflow.com/q/24597764
type: QuestionComment
has text: id must be unique, instead of that add class thumb and apply on class
score: 3
type: Comment

http://stackoverflow.com/comment/38283103
has text: you are dealing with an async issue, you are trying to use `series[0].data` before it has been set
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24689140

http://stackoverflow.com/comment/38294851
has text: Which button did you mean? There are more than "buttons" in your code.
type: QuestionComment
comment on: http://stackoverflow.com/q/24695852
score: 0
type: Comment

http://stackoverflow.com/a/24743424
has comment: http://stackoverflow.com/comment/38566209
accepted answer of: http://stackoverflow.com/q/24743373
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24743373
has comment: http://stackoverflow.com/comment/38585451
type: Answer
has comment: http://stackoverflow.com/comment/38694097
has comment: http://stackoverflow.com/comment/38386319
downvote count: 0
has body: One way is to wrap it in an anonymous function to force i to bind to the iterating value: for (var i = types.length - 1; i &gt;= 0; i--) { (function (actual_i) { api.get("test").then(function(res){ // do something with i here $scope.var[actual_i] = res; }); }(i)); }; Since you're looping over an array using the map function with a callback will give you the binding for free: types.map(function (value, i) { api.get("test").then(function(res){ // do something with i here $scope.var[i] = res; }); });
has comment: http://stackoverflow.com/comment/38591783
score: 1

http://stackoverflow.com/comment/38095423
comment on: http://stackoverflow.com/q/24590077
has text: I'm not sure why you think you'd need Python and a database. I can't even imagine what a database would be doing here, and pretty much anything you can do with Python you can do with Javascript.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38171814
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24629553
has text: @maurycy, the project in which i work doesn't use angular. but i'm very much interested in angular but can't use it in it.

http://stackoverflow.com/comment/106235446
type: Comment
has text: If you are paranoid, then it should be `if (result && result.isArray() && result.length > 0) ...` There are times when the result is `null` but there was no `error` either.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24676032

code-duplication
tag name: code-duplication
tags question: http://stackoverflow.com/q/24647721
type: Tag

http://stackoverflow.com/a/24588726
has comment: http://stackoverflow.com/comment/38092837
has comment: http://stackoverflow.com/comment/38093019
answers question: http://stackoverflow.com/q/24588701
type: Answer
has comment: http://stackoverflow.com/comment/38092588
has body: You're including, and running, the JS before that element ever exists. original will be undefined. Move the script include below the HTML: text text text And eliminate the getElementById('button') call, since (a) it won't work since IDs must be unique, and (b) it's unnecessary given your click handlers on the elements. Example: http://codepen.io/paulroub/pen/bxgIe
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24588701
score: 3
has comment: http://stackoverflow.com/comment/38093798
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/24651587
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24642843
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38222528
answers question: http://stackoverflow.com/q/24642843
type: Answer
has body: First of all you must define rootProperty on writer when you use encode: true. Then after adding fields to MyRecordDef requests are sended. Working sample: http://jsfiddle.net/jjVwR/3/ (saving don't work, but you can see on console that request is send)

http://stackoverflow.com/q/24728162
favorite count: 0
has comment: http://stackoverflow.com/comment/38358090
tagged with: google-chrome-extension
tagged with: content-script
has answer: http://stackoverflow.com/a/24732869
upvote count: 2
type: UnansweredQuestion
downvote count: 3
type: Question
has body: I'm currently writing a very simply Google Chrome Extension that utilizes Content Scripts, to simply add additional text onto a webpage by grabbing the element and appending to its innerHTML when the page is finished loading. The issue is that the webpage I'm modifying is rich in media and takes several seconds to load, thus causing the additional text to not display until a few seconds after the rest of the text has loaded. The element I'm grabbing is a span. Is there any way of listening for this element to be loaded so that I can modify it as soon as possible?
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38358257
has comment: http://stackoverflow.com/comment/38363901
has comment: http://stackoverflow.com/comment/38365414
linked to: http://stackoverflow.com/q/2844565
answer count: 1
has title: Modify page element as soon as it's loaded

http://stackoverflow.com/a/24637425
has body: Maybe here is need to save value of var i for each iteration, for example, in closure: put function which you pass as argument in click(..) in wrapper function by this way: $(document).ready(function() { for (i in foo.foo) { $("#content").append(" " + foo.foo[i].title + " "); $("#btn" + i).click((function(i){ function() { $("#result").append(" Title:" + foo.foo[i].title + ", ID:" + foo.foo[i].id + " "); } })(i)); } });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24637070

http://stackoverflow.com/a/24589736
has body: You need to call hello with its object alias ('this.hello'). That is the only way to access that function. Without trying to be rude, I think you need to do a lot more reading from some beginner JavaScript resources.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24589698

performance
tags question: http://stackoverflow.com/q/24662674
tags question: http://stackoverflow.com/q/24605317
tags question: http://stackoverflow.com/q/24685895
tags question: http://stackoverflow.com/q/24708649
tags question: http://stackoverflow.com/q/24714557
tags question: http://stackoverflow.com/q/24652017
tags question: http://stackoverflow.com/q/24725950
tags question: http://stackoverflow.com/q/24714572
tag name: performance
type: Tag
tags question: http://stackoverflow.com/q/24649632

http://stackoverflow.com/q/24656344
favorite count: 0
type: UnansweredQuestion
tagged with: spring
answer count: 0
downvote count: 0
has body: I have the following code from a very popular spring websocket demo: stompClient.connect({}, function(frame) { setConnected(true); console.log('Connected: ' + frame); stompClient.subscribe('/user/queue/greeting', function(greeting) { displayQueueMessage(greeting); }); function sendName() { var name = document.getElementById('name').value; stompClient.send("/app/wsdemo", {}, JSON.stringify({ 'name' : name })); } On connect, we actually subscribe to to a queue and provide a callback method. Now, imagine i have a server service for the websocket that is called getAllUsers and lets assume i have 2 different components in my front end, usersOnGeographicMap, usersOnDataTable. lets assume this 2 view components want to make use of the server service (getAllUsers). these 2 component each has a callback function, (one that displays the users on a geographic map, the other callback function draws them on a data table) the problem now is that i only subscribe to a queue once, and provide him with one callback function. so how do i solve this issue? ofcourse in ajax it will be very easy because each call is provided with a call back: -usersOnGeographicMap.getUsersAjax(callback1) -usersOnDataTable.getUsersAjax(callback2)
has title: Spring websocket - stompJS, Is it possible to send messages with callback function without subscribing?
type: Question
score: 3
tagged with: spring-websocket
tagged with: java
tagged with: javascript
upvote count: 3
tagged with: websocket

http://stackoverflow.com/comment/38374110
comment on: http://stackoverflow.com/q/24736852
score: 0
type: Comment
type: QuestionComment
has text: `arr.sort(function (a, b) { return a.order - b.order; })` - that was hard.

http://stackoverflow.com/comment/38199621
comment on: http://stackoverflow.com/q/24644345
has text: I use thie like `var curElement = document.activeElement;` but when I check the `curElement`, it returns undefined.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38204306
type: AnswerComment
type: Comment
has text: .one() should run the function once
comment on: http://stackoverflow.com/a/24646942
score: 0

http://stackoverflow.com/comment/38140900
type: Comment
comment on: http://stackoverflow.com/a/24613445
has text: Using the expression would keep your template DRY as you won't need to repeat the second line for `!$first`.
type: AnswerComment
score: 1

http://stackoverflow.com/q/24660807
has title: Highcharts : Tooltip pointFormat decimal to percent
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/38232533
answer count: 2
has answer: http://stackoverflow.com/a/24703134
accepted answer: http://stackoverflow.com/a/24703134
tagged with: highcharts
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24675763
has comment: http://stackoverflow.com/comment/38369055
favorite count: 0
has answer: http://stackoverflow.com/a/24675763
downvote count: 0
has comment: http://stackoverflow.com/comment/38238292
has comment: http://stackoverflow.com/comment/38256798
linked to: http://stackoverflow.com/q/171251
score: 2
type: AnsweredQuestion
has body: I have to use pointFormat property to format the tooltips. The problem with this is that I can not figure out a way to use {point.y} (0.0324123) and make it format to a precent (3.24). As i said above, I have to do this in tooltip.pointFormat. My current code looks like this $highcharts[$key]['tooltip'] = [ 'pointFormat' =&gt; '&lt;p style="margin:0;"&gt;&lt;span style="color:{series.color};"&gt;{series.name}&lt;/span&gt;: &lt;b&gt;{point.y:,.2f}%&lt;/b&gt;&lt;/p&gt;' ]; Is there a way to do {point.y:,.2f} * 100 within the html/HighCharts syntax? Any help is appreciated.

http://stackoverflow.com/a/24714057
has body: I would look into using jQuery. Once you have the jQuery library referenced in your project your solution should be as simple as: $(".emoticon_text").removeAttr("aria-hidden").removeClass("emoticon_text");
score: 0
answers question: http://stackoverflow.com/q/24713684
type: Answer

http://stackoverflow.com/comment/38379549
comment on: http://stackoverflow.com/a/24739357
score: 0
type: Comment
has text: Sorry..I don't understand your answer
type: AnswerComment

http://stackoverflow.com/a/24637784
type: Answer
has body: you are correct. The reason it is not working is because all your img will have same "id". The simple fix is to generate a dynamic id. You can just append that to your image id. &lt;asp:TemplateField HeaderText="Image"&gt; &lt;ItemTemplate&gt; &lt;a href="#" onclick="showImages('img&lt;%# Eval("id")%&gt;');"&gt;Show Image&lt;/a&gt; &lt;img id='img&lt;%# Eval("id")%&gt;' /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt;
score: 0
answers question: http://stackoverflow.com/q/24637401
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24637401

http://stackoverflow.com/comment/38190723
score: 0
type: Comment
type: QuestionComment
has text: Failed to load resource: the server responded with a status of 403 (Forbidden):http://localhost/animerange/upload/%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20…ange/img/template.html%3C/b%3E%20on%20line%20%3Cb%3E72%3C/b%3E%3Cbr%20/%3E & Notice: Undefined variable: fileName in C:\xampp\htdocs\animerange\img\template.html - and usually i don't even get errors but what i am trying to accomplish doesn't work
comment on: http://stackoverflow.com/q/24639571

http://stackoverflow.com/comment/38335365
has text: i was thinking about learning java, since that's my company's IT department uses. would that serve the same purpose?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24716502
score: 0

http://stackoverflow.com/a/24611357
type: Answer
answers question: http://stackoverflow.com/q/24611263
has body: You can use .wrapInner(function) Use jQuery("td[id^='imageList']").wrapInner(function() { return " "; }); DEMO
score: 0

http://stackoverflow.com/comment/38191110
type: QuestionComment
has text: but i was wondering, can you obtain a variable from the upload_file.php $fileName - so that in the image src i could write down the variable $fileName on it?
comment on: http://stackoverflow.com/q/24639571
score: 0
type: Comment

http://stackoverflow.com/q/24597739
tagged with: javascript
has answer: http://stackoverflow.com/a/24604582
downvote count: 2
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
has title: :CSS keyframe elements animate only when visible in viewport?
tagged with: css
has body: http://www.samnorris.co.nz In the About section under 'Proficiencies' I have a "Skills Progression Bar" list made with CSS, which is supposed to animate using keyframes - but the animation cannot be seen on my page presumably because it is running as soon as the page loads. Is there any way to delay or trigger the keyframe animations only when the 'Proficiencies' heading/slide is clicked, or alternatively only when the container with the skills bar is visible in the viewport? I am aware of the various techniques to only run an animation when the page is scrolled to a certain point, but in this instance obviously that's not quite what I want... Relevant code (for Krish): CSS .about-skills { width:398px; margin:0; position:relative; float:left; font-size:12px; line-height:2em; padding:30px 0 30px; margin-left: 15px; } .skills-col { width:400px; } .skills-list { display: none; list-style:none; padding-top:20px; } .skills-list li { margin-bottom:50px; background:#ececec; height:5px; border-radius:3px; border-left:1px solid #cecece; border-top:1px solid #cecece; border-right:1px solid #cecece; border-bottom:1px solid #b5b5b5; } .skills-list li em { position:relative; top:-30px; } .skills-expand { height:1px; margin:2px 0; background:#0dc9ff; position:absolute; box-shadow:0px 0px 10px 1px rgba(0,198,255,0.4); } .html5 { display: block; width:85%; -moz-animation:html5 2s ease-out; -webkit-animation:html5 2s ease-out; } .css3 { display: block; width:70%; -moz-animation:css3 2s ease-out; -webkit-animation:css3 2s ease-out; } .jquery { display: block; width:50%; -moz-animation:jquery 2s ease-out; -webkit-animation:jquery 2s ease-out; } .php { display: block; width:20%; -moz-animation:php 2s ease-out; -webkit-animation:php 2s ease-out; } .dreamweaver { display: block; width:100%; -moz-animation:dreamweaver 2s ease-out; -webkit-animation:dreamweaver 2s ease-out; } .photoshop { display: block; width:100%; -moz-animation:photoshop 2s ease-out; -webkit-animation:photoshop 2s ease-…
has comment: http://stackoverflow.com/comment/38110494
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38116818
has comment: http://stackoverflow.com/comment/38110738
type: Question
score: -2

http://stackoverflow.com/a/24684186
has body: If your includes are nested in the BODY tag not a lot you can do with just pure HTML. If you can move them up into the HEAD section section this should fix itself. A great breakdown of how the page loads and what fires when is on an answer to another StackOverflow question see this link : Which is the load, rendering and execution order of elements in a HTML page? Hope you find this helpful.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24684003

http://stackoverflow.com/q/24689051
has title: function call to set innerHTML is not working - gives Undefined
has body: I am trying to set the innerHTML for a div element dynamically through a called Javascript function. While the function is being called and printing the debug messages correctly, the innerHTML is "Undefined". I can't figure out why -any help will be much appreciated. Here's what I wrote: &lt;script type="text/javascript"&gt; var clientsHealthStat = function (color) { // color is the RED / YELLOW / GREEN status of the client var ClientPerfsREST = 'http:/localhost:8081/c3rests/c3/ClientPerfs'; var ClientCntr = 0; // provide the count of clients for the specific status $.getJSON(ClientPerfsREST, function(ClientPerfsJson){ $.each(ClientPerfsJson.payload.array,function(i,performance){ if (performance.attributes.Status === color) { ClientCntr++; } }); // End of loop through result set return ClientCntr; // return the client count with Health Color }); // End of getJSON(SummaryPerfsREST, function()) } &lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ var parentElement = document.getElementById('customerHealthSummary'); var healthStatusIndicators = ['red','yellow','green']; for (var i = 0; i &lt; healthStatusIndicators.length; i++) { var childElement = document.createElement('div'); childElement.style.width = '100%'; childElement.style.backgroundColor = healthStatusIndicators[i]; childElement.title = healthStatusIndicators[i].toUpperCase(); console.log(clientsHealthStat(healthStatusIndicators[i].toUpperCase())); childElement.innerHTML = clientsHealthStat(healthStatusIndicators[i].toUpperCase()); parentElement.appendChild(childElement); }; }); // End of document ready function &lt;/script&gt; Thanks a bunch for your help.
type: Question
has answer: http://stackoverflow.com/a/24689091
accepted answer: http://stackoverflow.com/a/24689091
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38282851
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/38289329
type: Comment
comment on: http://stackoverflow.com/a/24692815
has text: @FelixKling Explanation added. Thanks
type: AnswerComment
score: 0

http://stackoverflow.com/a/24611265
has body: Just use below code snippet to achieve as you mentioned in post. $(function() { $('a').bind('click',function(event){ var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top }, 1000); event.preventDefault(); }); }); check DEMO
has comment: http://stackoverflow.com/comment/38139738
has comment: http://stackoverflow.com/comment/38139485
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24610878

http://stackoverflow.com/q/24626061
type: Question
has answer: http://stackoverflow.com/a/28492772
tagged with: javascript
has title: Managing file system objects using JavaScript console (JSC) on Mac OS
tagged with: command-line-interface
answer count: 1
downvote count: 0
tagged with: macos
favorite count: 0
tagged with: filesystemobject
type: UnansweredQuestion
has body: What is alternative for ActiveXObject("Scripting.FileSystemObject") in javascript CLI (jsc) for Mac OS? I need to enumerate files and folder, created/delete, read and write content of files
score: 1
upvote count: 1

http://stackoverflow.com/comment/38143086
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24614666
type: QuestionComment
has text: You're defining `top` and `left` from `$('#1')` ; but where is the element which have the `id=1` ?

http://stackoverflow.com/comment/38252553
comment on: http://stackoverflow.com/a/24672720
type: Comment
has text: @JohnSkoumbourdis Sorry john I don't see the websites linked look like a reference. Are they something like MDN as a reference for JavaScript?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/125334174
score: 2
comment on: http://stackoverflow.com/a/29089970
type: AnswerComment
type: Comment
has text: One can also use `document.getElementById(id).style.cssText = 'left: 343px'` to have a very similar to `setAttribute` API

http://stackoverflow.com/q/24594232
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24594261
accepted answer: http://stackoverflow.com/a/24594261
type: Question
tagged with: javascript
has title: create own sort() function in javascript
score: 0
has comment: http://stackoverflow.com/comment/38103453
answer count: 1
has comment: http://stackoverflow.com/comment/38103455
has body: I want to create my own sort() function on an array in javascript. The function should expect the following string elements in the list [0-9]*[A-Z][0-9]*[A-Z][0-9]* That means first there are arbitrary number of numbers 0-9, then there is One letter, followed by arbitrary numbers 0-9, then One Letter and then finally arbitrary numbers 0-9. Now I want to sort this list, but I want to sort it backwards on the Letters Only. That means that for example [xExCx,xQxEx,xSxEx,xSxFx] will become after its sorted [xSxFx,xSxEx,xQxEx,xExCx] where again x is an arbitrary number of numbers 0-9. It will sort on the first letter (backwards) first and then the second letter. So that letter E comes before an A. Perhaps anyone of you brilliant guys could give me a push in the right direction, I have only gotten this far. function sortList(listOfNames) { var sortedListOfNames=new Array(); for (i = 0; i &lt; listOfNames.length; i++) { //Sort listOfNames } }

http://stackoverflow.com/comment/38230951
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24657166
has text: When you click on divorce it doesn't scroll to where #divorce is set and show the contents.
score: 0

http://stackoverflow.com/comment/38585451
score: 0
type: AnswerComment
has text: Here you go: http://kangax.github.io/compat-table/es5/
type: Comment
comment on: http://stackoverflow.com/a/24743424

meteor
tags question: http://stackoverflow.com/q/24702449
tags question: http://stackoverflow.com/q/24743402
tags question: http://stackoverflow.com/q/24731312
tags question: http://stackoverflow.com/q/24631221
tags question: http://stackoverflow.com/q/24729649
tags question: http://stackoverflow.com/q/24627093
tags question: http://stackoverflow.com/q/24600526
tags question: http://stackoverflow.com/q/24701944
tags question: http://stackoverflow.com/q/24719248
tags question: http://stackoverflow.com/q/24622542
type: Tag
tags question: http://stackoverflow.com/q/24712907
tags question: http://stackoverflow.com/q/24661317
tags question: http://stackoverflow.com/q/24598867
tags question: http://stackoverflow.com/q/24639584
tags question: http://stackoverflow.com/q/24594149
tags question: http://stackoverflow.com/q/24735980
tags question: http://stackoverflow.com/q/24710156
tags question: http://stackoverflow.com/q/24702110
tags question: http://stackoverflow.com/q/24600998
tags question: http://stackoverflow.com/q/24698968
tags question: http://stackoverflow.com/q/24600653
tags question: http://stackoverflow.com/q/24707328
tags question: http://stackoverflow.com/q/24635108
tag name: meteor
tags question: http://stackoverflow.com/q/24668252

http://stackoverflow.com/a/24726846
type: Answer
has comment: http://stackoverflow.com/comment/38357507
answers question: http://stackoverflow.com/q/24726786
has comment: http://stackoverflow.com/comment/38355235
has comment: http://stackoverflow.com/comment/38355914
has body: This is likely a charset issue. The information is not being presented in the way that it was encoded. You can var_dump $data to see its Content-Type. Here is just a hypothesis: the actual encoding is ISO-8859-1, but it is being interpreted as UTF-8 (or UTF-16). To make the browser use the correct encoding, you can add an HTTP header: header("Content-Type: text/plain; charset=ISO-8859-1"); or use a meta tag.
has comment: http://stackoverflow.com/comment/38355212
has comment: http://stackoverflow.com/comment/38355201
score: 0
has comment: http://stackoverflow.com/comment/38357540

http://stackoverflow.com/comment/38240554
score: 0
has text: Hi @islanddave, it seems to be when it is trying to read this line: `gapi.auth.authorize({'client_id': CLIENT_ID, 'scope': SCOPES, 'immediate': true},handleAuthResult);` I'm really not sure how to solve this.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24600532

yammer
type: Tag
tags question: http://stackoverflow.com/q/24663929
tags question: http://stackoverflow.com/q/24657648
tag name: yammer

http://stackoverflow.com/comment/38739988
comment on: http://stackoverflow.com/a/24739028
has text: Solved using table tr td:first-child + td + td
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38309674
comment on: http://stackoverflow.com/a/24703104
type: AnswerComment
score: 0
type: Comment
has text: that's exactly why, just add text-decoration: underline right after color:#fff and it should work

http://stackoverflow.com/comment/38363070
has text: They should be, but not because it wouldn't work otherwise. They should because of naming conventions & readability.
comment on: http://stackoverflow.com/a/24730854
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38190496
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24639189
has text: Those are really good questions, I have updated the question to illustrate the means and intent a bit better. Please let me know if I need to add more details.
score: 0

http://stackoverflow.com/a/24660250
has body: The validate takes title by default. So, you must add ignoreTitle arguement to it. JS $(document).tooltip(); $("#commentForm").validate({ ignoreTitle: true }); The documentation mentions it, look here : http://jqueryvalidation.org/validate/ JSfiddle Demo
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38229423
type: Answer
accepted answer of: http://stackoverflow.com/q/24659515
answers question: http://stackoverflow.com/q/24659515

http://stackoverflow.com/q/24712360
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24712822
tagged with: ajax
has comment: http://stackoverflow.com/comment/38327537
has comment: http://stackoverflow.com/comment/38327321
has comment: http://stackoverflow.com/comment/38327401
score: 0
has comment: http://stackoverflow.com/comment/38327335
has comment: http://stackoverflow.com/comment/38327212
possible better answer: http://stackoverflow.com/a/24712822
has comment: http://stackoverflow.com/comment/38327207
has answer: http://stackoverflow.com/a/24712547
accepted answer: http://stackoverflow.com/a/24712547
has body: I have built a form which is submitted via Ajax and then processed with the mail() function in PHP. The form validation and form submission works perfectly (I can console log the data and receive a success message), yet I'm not receiving any emails from my form. I'm assuming it's the process.php. This is my first time doing this, so also any pointers/code improvements would be much appreciated. Javascript: var name = $('#name').val(); var email = $('#email').val(); var message = $('#message').val(); var dataString = 'name=' + name + '&amp;email=' + email + '&amp;message=' + message; $.ajax({ type: "POST", url: "process.php", data: dataString, success: function () { alert('success'); } }); PHP: &lt;?php $myemail = "name@example.com"; $subject = "Subject"; $message = " Name: $name E-mail: $email Message: $message "; mail($myemail, $subject, $message); ?&gt;
tagged with: php
type: AnsweredQuestion
tagged with: forms
type: Question
answer count: 2
has title: What's wrong with my process.php that's not causing my form to send?

http://stackoverflow.com/q/24737204
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38376574
favorite count: 0
tagged with: backbone.js
answer count: 0
has body: I built a huge backbone.js app which works this way : As you can see, there is a Data backbone.js model, which values are accessed by getters in Getters.js and the values are used in Underscore templates to define some inline styling. The contents in the page are present in another Backbone model, called Contents. The page is basically built by three elements : a menu, a content, and a bottom bar. each one of these elements have their own templates but they are all included in the same template. This means that View.js, in it's render() function, fills the page body by running the main template, which displays the menu, and which includes the content and bottom bar templates. This worked very well until I deployed that in production; the Data backbone model is built from a JSON file which comes from another app, and what I didn't know is that this JSON can sometimes be different than what I expected with my getters. This means that some values may be missing, some which are expected as a string could be an object containing that string and so on. This is a huge problem because the getters often produce "cannot read value color of undefined". If all they did was returning values from the backbone model, it would be OK because they would simply return undefined values or other values than the ones expected. But because they also do some logic (as shown by getBottomBarColor in my example), they get undefined or unexpected typed values and try to work with it, which makes them crash. The templates are nested, and pre-compiled by browserify.js into JS functions. This means that if a getter crashes at some point, the whole function (which means the whole template) crashes, resulting in a blank page. Code is already in production and it is too late to change the way this whole app is built. I have been thinking of some way to handle malformed Data problems. My getters.Js file is 3000 lines big so it would be too long to make some manual edit to put try catches everywhere i…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38376138
upvote count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/38376449
has comment: http://stackoverflow.com/comment/38376629
has comment: http://stackoverflow.com/comment/38376177
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: Prevent crashes in a Backbone.js app with unexpected data in model
type: Question
has comment: http://stackoverflow.com/comment/38405914
downvote count: 0

http://stackoverflow.com/q/24691593
score: 2
has body: How can I print a created canvas element that has some content drawn on it using javascript? My print preview shows a blank box instead of the contents in the canvas element? First i create my canvas image by using html2canvas, then i see that image is created. But i couldn't print the div which includes related image. In IE i can see it when triggered button twice. In first click it opens blank print preview, in second click it opens it with related content. However in chrome it opens blank content at once, it cannot load second trigger; page freezes. Here is my code; function printDiv(index) { var canvasImg = ""; var divToPrint = document.getElementById('hr'+index); html2canvas(divToPrint, { onrendered: function(canvas) { var canvasImg = canvas.toDataURL("image/jpg"); $('#seckinCanvas').html('&lt;img src="'+canvasImg+'" alt=""&gt;'); } }); var printContent = document.getElementById("seckinCanvas"); var windowUrl = ''; var uniqueName = new Date(); var windowName = 'Print' + uniqueName.getTime(); var printWindow = window.open(windowUrl, windowName,'left=500,top=500,width=0,height=0'); printWindow.document.write(printContent.innerHTML); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close(); }
has comment: http://stackoverflow.com/comment/38287458
upvote count: 2
linked to: http://stackoverflow.com/q/21595413
type: UnansweredQuestion
type: Question
has title: How to print canvas element by using javascript print method?
has comment: http://stackoverflow.com/comment/38288716
tagged with: canvas
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/42042130
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/24649303
has title: Do something if AngularJS $location.path() changes
tagged with: angularjs
has answer: http://stackoverflow.com/a/24653323
type: AnsweredQuestion
has body: I have a navigation menu with links to different sections. This navigation bar is a list which is only displayed by clicking on the button 'menu'. I would like that on load of the new section this list is not displayed. Therefore I thought I could use $location.path() to detect any change on the url and if so remove the class. The idea is: if($location.path() CHANGES){ document.querySelector('[data-navigation]').classList.remove('open-status'); } How do you make a conditional statement using $location to trigger an action when the url changes. P.D. The url at this moment works with an hashtag. So it would be: www.whatever.com/#about
accepted answer: http://stackoverflow.com/a/24653323
type: Question
possible better answer: http://stackoverflow.com/a/24649372
tagged with: javascript
has answer: http://stackoverflow.com/a/24649372
score: 0
answer count: 2
tagged with: url

http://stackoverflow.com/q/24736707
answer count: 0
type: UnansweredQuestion
has body: I have a small application in express.js and i want to run a Grunt task, named "build", at the client request for now but i don't know how to pass sub-task configuration to Grunt module. executeTask : function (components) { // Other stuff this.grunt = require("grunt"); components = components.join(); var file = require(this.parentDir + "/myProjectFolder/Gruntfile.js")(this.grunt); this.grunt.option('target', components); var result = this.grunt.task.run(["build"]); console.log(result); // Other stuff }, This code not spawn any error but not working, the output file is no generated. This sub-task are executed correctly from CLI, and refer to the same Gruntfile.js
type: Question
has comment: http://stackoverflow.com/comment/38374334
tagged with: gruntjs
score: 0
has comment: http://stackoverflow.com/comment/38375029
tagged with: javascript
has title: NodeJS - Grunt - Is it possible to run a Grunt task in NodeJs runtime?
tagged with: express
has comment: http://stackoverflow.com/comment/38375505
tagged with: node.js

http://stackoverflow.com/a/24711446
upvote count: 3
has comment: http://stackoverflow.com/comment/38333872
score: 3
has comment: http://stackoverflow.com/comment/85671638
has comment: http://stackoverflow.com/comment/38335948
accepted answer of: http://stackoverflow.com/q/24710672
answers question: http://stackoverflow.com/q/24710672
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38334630
downvote count: 0
type: Answer
has body: It is fairly hard to give you an advice or solution without knowing your data and code organization, so I will try to use someone else's similar and good example. Eventually, the solution to your question may look entirely different, but I post this answer as a guideline to you, and I hope it may help you. Take a look at this fine example of usage of parallel coordinates: (it has the feature of selecting and deselecting groups of items - the exact feature you need) JavaScript code for this example is here. Data is in a csv file, and the first few lines are as follows: "name","group","protein (g)","calcium (g)","sodium (g)","fiber (g)","vitaminc (g)","potassium (g)","carbohydrate (g)","sugars (g)","fat (g)","water (g)","calories","saturated (g)","monounsat (g)","polyunsat (g)","id" "Beverage, instant breakfast powder, chocolate, not reconstituted","Dairy and Egg Products",19.9,0.285,0.385,0.4,0.07690000000000001,0.947,66.2,65.8,1.4,7.4,357,0.56,0.314,0.278,27481 "Beverage, instant breakfast powder, chocolate, sugar-free, not reconstituted","Dairy and Egg Products",35.8,0.5,0.717,2,0.138,1.705,41,39,5.1,7.4,358,2.162,1.189,1.027,27482 "Beverage, milkshake mix, dry, not chocolate","Dairy and Egg Products",23.5,0.88,0.78,1.6,0.0012,2.2,52.9,51.3,2.6,12.8,329,2.059,0.332,0.06,27483 "Butter oil, anhydrous","Dairy and Egg Products",0.28,0.004,0.002,,0,0.005,,,99.48,0.24,876,61.924,28.732,3.694,27484 "Butter, salted","Dairy and Egg Products",0.85,0.024,0.714,,0,0.024,0.06,0.06,81.11,15.87,717,51.368,21.021,3.043,27485 "Butter, whipped, with salt","Dairy and Egg Products",0.85,0.024,0.827,,0,0.026,0.06,0.06,81.11,15.87,717,50.489,23.426,3.012,27486 "Butter, without salt","Dairy and Egg Products",0.85,0.024,0.011,,0,0.024,0.06,0.06,81.11,17.94,717,51.368,21.021,3.043,27487 "Cheese fondue","Dairy and Egg Products",14.23,0.476,0.132,,0,0.105,3.77,,13.47,61.61,229,8.721,3.563,0.484,27488 "Cheese food, cold pack, american","Dairy and Egg Products",19.66,0.497,0.966,,0,0.363,8.32,…

http://stackoverflow.com/comment/39262796
type: Comment
comment on: http://stackoverflow.com/a/25207120
type: AnswerComment
has text: i read this somewhere "I have seen this behavior in the past when making AJAX calls. I believe this is related to the fact that browsers are only single threaded, so when the AJAX call is returned the thread is working on the call, so consequentially the animated GIF needs to stop momentarily."
score: 0

http://stackoverflow.com/comment/38212711
type: Comment
type: QuestionComment
score: 0
has text: Try with `change` event.
comment on: http://stackoverflow.com/q/24651368

http://stackoverflow.com/q/24747756
type: Question
has comment: http://stackoverflow.com/comment/38395928
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24747801
has title: JavaScript SetDate Error
type: UnansweredQuestion
score: 0
has body: From my understand that adding days to a current Date object in Javascript works like this : var today = new Date("4/28/14"); var twoDays = new Date(); twoDays.setDate(today.getDate() + 2); And it is working for me half the time. Though this set of code: var today = new Date("4/28/14"); var twoDays = new Date(); twoDays.setDate(today.getDate() + 2); var oneWeek = new Date(); oneWeek.setDate(today.getDate() + 7); var twoWeeks = new Date(); twoWeeks.setDate(today.getDate() + 14); is returning this for me: Mon Apr 28 2014 00:00:00 GMT-0700 (US Mountain Standard Time) Wed Jul 30 2014 16:37:38 GMT-0700 (US Mountain Standard Time) Mon Aug 04 2014 16:37:38 GMT-0700 (US Mountain Standard Time) Mon Aug 11 2014 16:37:38 GMT-0700 (US Mountain Standard Time) For some reason it is skipping into July and August when it should be going into June only. Can someone help me figure out why this is acting this way? Clearly 14 days after April 28th isn't in August. Thanks!

http://stackoverflow.com/q/24628504
tagged with: http://stackoverflow.com/tag/html
tagged with: durandal
has comment: http://stackoverflow.com/comment/38201887
answer count: 0
score: 1
upvote count: 1
tagged with: excel
type: Question
has comment: http://stackoverflow.com/comment/38176676
has title: export to excel sheet using knockout, javascript and durandal
has comment: http://stackoverflow.com/comment/38221124
tagged with: ios
tagged with: javascript
downvote count: 0
has body: I am using knockout, javascript and durandal to build an application which i will convert to IOS application using phone gap. I am fairly new to the stuff. I am able to code the other modules but I am stuck at the export to excel facility. As any device like ipad,iphone etc which have IOS, does not support excel. So, how can i go about it. What should I refer. Please help as i am new and dont know what to look for which will help me in solving the problem. I found the code online. It exports the table to excel. If i use this and convert the html application to native IOS, will the excel functionality work.? 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(encodeURIComponent(s))) } , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name) { if (!table.nodeType) table = document.getElementById(table) var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML} window.location.href = uri + base64(format(template, ctx)) } })() Thanks
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/24678440
type: Question
downvote count: 4
has comment: http://stackoverflow.com/comment/38262676
accepted answer: http://stackoverflow.com/a/24679168
has title: How to get THIS of each jQuery method
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24678557
tagged with: this
has comment: http://stackoverflow.com/comment/38262811
has body: I have got following function but $('input[id^="ProductId_"]').each(function () { gives me different THIS that I need. It gives THIS that comes from $('input[id^="ProductId_"]').click(function () { My question is how to get THIS of .each(function ? Thank you! function EnableButton() { $('input[id^="ProductId_"]').click(function () { if ($(this).prop('checked')) { $("#sendBtn").prop('disabled', false); } else { $("#sendBtn").prop('disabled', true); } $('input[id^="ProductId_"]').each(function () { if ($(this).prop('checked')) { // I need THIS of --- .each(function $("#sendBtn").prop('disabled', false); } else { $("#sendBtn").prop('disabled', true); } }); }); }
favorite count: 0
has comment: http://stackoverflow.com/comment/38262663
score: -3
has answer: http://stackoverflow.com/a/24678716
upvote count: 1
has answer: http://stackoverflow.com/a/24679138
has answer: http://stackoverflow.com/a/24679168
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38262969
possible better answer: http://stackoverflow.com/a/24679138

http://stackoverflow.com/comment/38364700
has text: @esqew actually i wanted to find out all links in given page a save them in a file
score: 0
comment on: http://stackoverflow.com/q/24679224
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24742589
type: UnansweredQuestion
has title: Set timeout to iosSlider autoslide
upvote count: 1
score: 1
type: Question
downvote count: 0
tagged with: ios
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
has body: I need to make some pause between finish all home animation and first turning of slide. FIDDLE - as you can see, the appearance of the menu and scroll of the first slide is occurs simultaneously. How can I finish all animation and then after 1 , 2 seconds activate the autoslide. Tried this: // HOME IOSSLIDER SETTINGS $('.iosSlider').iosSlider({ snapToChildren: true, scrollbarDrag: true, scrollbarContainer: '.iosSlider', scrollbarMargin: 0, scrollbarHeight: '10px', scrollbarBorderRadius: 1, scrollbarOpacity: 1 }); // set initial position of slider scrollbar var x = $('#home-wrap').height() + 10 + 'px'; $('.scrollbarBlock1').css('top', x ); // $('#logo-hello-big').fadeIn(1500, function(){ $('#logo-hello-small').fadeIn(1500); function logoHide(){ $('#logo-hello-big, #logo-hello-small').fadeOut(1500); }; setTimeout(logoHide, 2500); function menuShow(){ $('#menu-wrap').animate({bottom:'0'},500); $('#logo-holder').animate({top:'0'},500); var z = $('#home-wrap').height() - 70 + 'px'; $('.scrollbarBlock1').animate({top: z },500); }; setTimeout(menuShow, 4000); // here i tried to add autoSlide: true to slider settings after finishing of all animation function autoplayActivate(){ $('.iosSlider').iosSlider({ autoSlide: true }); }; setTimeout(autoplayActivate, 4000); });
tagged with: slider
favorite count: 0
answer count: 0

http://stackoverflow.com/comment/38260996
type: QuestionComment
comment on: http://stackoverflow.com/q/24666696
score: 0
has text: Sounds like you're just looking for [exec-sync](http://davidwalsh.name/sync-exec).
type: Comment

http://stackoverflow.com/comment/38206992
type: Comment
type: AnswerComment
has text: @GoodSp33d Good question. Made me understand the explanation even better.
comment on: http://stackoverflow.com/a/24647148
score: 0

http://stackoverflow.com/q/24657511
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: tabs
has answer: http://stackoverflow.com/a/24660300
type: Question
has body: So I am required to use a radio button in a jquery tab, next to the tab label. Everything works fine when a user clicks anywhere on the tab, except when the user clicks directly on the radio button itself. The tab changes, but the radio button doesn't. Here is a fiddle. If you click on text, the tab changes fine, and the radio changes as well, but you click directly on the radio button, the tab changes, but the radio doesn't. I cannot seem to get it to work. This is my latest attempt to get it to work $("#tabs &gt; ul &gt; li &gt; a &gt; label &gt; input").on('click',function(){ var actualRadio = $("[name=biosafetyLevel]:checked").attr('id'); $('input:radio[name=biosafetyLevel]').each(function () { $(this).prop('checked', false) }); $("#" + actualRadio).prop('checked', true); }); This doesn't seem to do anything.
answer count: 2
has title: Radio button not changing when clicked inside a jQuery tab
upvote count: 3
has answer: http://stackoverflow.com/a/24657607
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
score: 3

http://stackoverflow.com/q/24729019
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24729215
tagged with: javascript
has answer: http://stackoverflow.com/a/24729215
has answer: http://stackoverflow.com/a/24729270
answer count: 2
downvote count: 0
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
has body: Demo: http://plnkr.co/edit/TiH96FCgOGnXV0suFyJA?p=preview I have a ng-directive called myDirective and within the directive template I have a list of li tags printed using ng-repeat. I want to declare the content of li tag as part of the declaration of myDirective and use transclude to print the desired text / html content. This way I can have a nice separation of concerns so that my directive doesn't need to know the structure of the source item, and it'll be the caller's responsibility to layout the content of li. Something like below: {{label}} and {{id}} or even {{label}} The template of ngRepeat (inside myDirective) looks like template: ' ', But I can't get the transclusion to work inside hg-repeat. I am using the latest version of angular 1.2.19. To be precise, the trasnclusion works but not the expression I am passing in at directive level. Please help and thanks heaps! I couldn't come up with a better question title. You are welcome to make it better. Update: I chose the answer by @pixelbits because that's what I was asking for. But I actually used approach by @Norguard because it is more angular way.
has title: How to pass ngRepeat "template" to a ngDirective using transclude?
accepted answer: http://stackoverflow.com/a/24729270
score: 2
upvote count: 2
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/comment/38238467
score: 0
type: AnswerComment
type: Comment
has text: Thank you for the reference link. That was very helpful.
comment on: http://stackoverflow.com/a/24664595

http://stackoverflow.com/comment/71444326
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24690917
has text: @g00glen00b I am using a form without any button and I can submit the form via javascript, even in Firefox. However I have an issue with cloning textareas, see http://stackoverflow.com/a/7391988/356815 , the reason why i don't have a submit button in the form is because I have two buttons, "Save" and "Save & Exit"...

http://stackoverflow.com/a/24629520
accepted answer of: http://stackoverflow.com/q/24629434
type: Answer
has body: You are assigning the variable daysInMonth with the value of the function daysInMonth, effectively replacing the function with an integer. Give your variable a different name and it will work e.g. var currMonth = currDate.getMonth(), currYear = currDate.getFullYear(), numberOfDaysInMonth = daysInMonth(currYear,currMonth+1); var test = daysInMonth(currYear,currMonth+2);
upvote count: 3
has comment: http://stackoverflow.com/comment/38171186
score: 3
answers question: http://stackoverflow.com/q/24629434
has comment: http://stackoverflow.com/comment/38171164
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/46300019
has comment: http://stackoverflow.com/comment/90338147
score: 21
has comment: http://stackoverflow.com/comment/91979415
has body: For me, this worked: _.map(_.toPairs(data), d =&gt; _.fromPairs([d])); It turns {"a":"b", "c":"d", "e":"f"} into [{"a":"b"}, {"c":"d"}, {"e":"f"}]
has comment: http://stackoverflow.com/comment/93403259
downvote count: 0
has comment: http://stackoverflow.com/comment/79723643
answers question: http://stackoverflow.com/q/24674630
type: Answer
upvote count: 21

http://stackoverflow.com/comment/38174756
score: 0
type: Comment
has text: That's not what the OP is looking for, though. That's a use case beyond what the OP needs.
comment on: http://stackoverflow.com/a/24630020
type: AnswerComment

http://stackoverflow.com/comment/38390534
comment on: http://stackoverflow.com/q/24745664
score: 1
has text: Why would you want to not use CSS? it is easier and works when scripts are not allowed.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24622548
has comment: http://stackoverflow.com/comment/38158690
has answer: http://stackoverflow.com/a/24622740
type: Question
score: 0
has body: Following other documentation, I have succesfully printed out a text file separated by line. "FILE.txt" FILE I am trying to better understand how this works if someone could explain. I understand how they define xmlhttp depending on the browser, but what does document.getElementById("myDiv").innerHTML=xmlhttp.responseText.split("\n"); actually do? Does it change the content of myDiv from the text to the file content? What does onreadystatechange have to do with the button?
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/24622717
tagged with: file-io
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/632774
type: UnansweredQuestion
has title: Explaining how document.getelementbyid.innerhtml prints text

http://stackoverflow.com/comment/38432040
score: 0
type: AnswerComment
has text: using the options web api controller with read write options, look in the controller you'll see a bunch of methods you'll see api/Test, that's your URL , to call post use the example above just pass a single arg , you may need to decorate your controller with [HttpPost]... add something in the method like var x=value , put a breakpoint on this call it from JS and the rest is pretty much standard c# from there on, be aware of CORS (cross origin resource sharing)...ran out of space..
type: Comment
comment on: http://stackoverflow.com/a/24686825

http://stackoverflow.com/a/24640424
type: Answer
answers question: http://stackoverflow.com/q/24640321
score: 0
has body: Consider creating a service that fetches and contains your app wide constants. Then inject this service into the controllers. You can then reference these values from within the controller, and use them for whatever you want. One usage of these values would be to create controller ($scope) level variables for use in your template or other code. In our example this could be used to concatenate the url.

http://stackoverflow.com/comment/38141329
type: Comment
comment on: http://stackoverflow.com/q/24612922
type: QuestionComment
has text: Please post your (minimal, [MCVE](http://stackoverflow.com/help/mcve/)/[SSCCE](http://sscce.org/)) code that reproduces your problem into your question. Don't just link to an external resource (even though it's always a good idea to provide a demo, but only *as well as* the (relevant) code in your question).
score: 0

http://stackoverflow.com/comment/38121404
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24603292
has text: Yup, that was I missing, thanks a lot for info :)
score: 0

http://stackoverflow.com/comment/38496536
type: QuestionComment
comment on: http://stackoverflow.com/q/24724775
score: 0
has text: it means that you don't have any chrome plugin able to interpret .wrl files. As a result, the browser downloads the file..
type: Comment

http://stackoverflow.com/a/24668878
has body: try using ng-href https://docs.angularjs.org/api/ng/directive/ngHref Hope this helps.
score: 0
answers question: http://stackoverflow.com/q/24668837
type: Answer

http://stackoverflow.com/comment/38259128
type: QuestionComment
has text: @AlexandruSeverin did it! Glad it helps you!
type: Comment
comment on: http://stackoverflow.com/q/24676389
score: 0

http://stackoverflow.com/a/24668388
has body: try: $('#city').empty().append(' Select a city '); $.each(data.entities, function(i,d){ $('#city').append(' '+d.name+' '); }); Demo
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38243785
type: Answer
accepted answer of: http://stackoverflow.com/q/24668296
downvote count: 0
answers question: http://stackoverflow.com/q/24668296
score: 1

http://stackoverflow.com/q/24626353
has body: I'm having a trouble with toggling "active" class, my problem is a little bit different from the others, cause I already looked up similar questions. It'll be better if I explain in code. Here is index.php: <?php include("module/navbar.html"); ?> Personal Profile Settings Achievements Results Here is the index.php content As you see there are two menu, first one is top menu which is included by navbar.html and the second is which is in container class. When I click for example "Profile" it just loads the contents of the profile.php it's done by this script function profile(object){ $(".span9").html(ajax_load) .load("module/profile.php") .hide() .fadeIn("slow"); } It just changes the content of span9 to the contents of profile.php. Similar to others (settings, etc). The main point is that when I click them it works perfect, the "active" class changes automatically, by the way I'm using this kind of script to toggle "active" class: And here is the problem. This is navbar.html: Main page Grades Attendance Exams Olympiads When I click "Exams", the content of row-fluid must be changed to the contents of exams.php like I changed the content of span9. Here is the script: function exams(object){ $(".row-fluid").html(ajax_load) .load("module/exams.php") .hide() .fadeIn("slow"); } Everything worked great, the contents have been changed, then, when I click the menus in exams.php, my script doesn't work, it just doesn't swap or toggle "active" class, between li. Here is the exams.php: PBT Exams 1 2 3 4 5 6 Here is the exam.php content Don't know what could be the problem, "active" class just stays at #1, and doesn't change. Who can answer please, I'll be really grateful.
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/24626481
tagged with: twitter-bootstrap
tagged with: php
type: AnsweredQuestion
has title: Toggle "active" class between li by bootstrap
upvote count: 5
has answer: http://stackoverflow.com/a/24626481
type: Question
score: 5
answer count: 1
downvote count: 0

http://stackoverflow.com/q/24709728
has title: Is preloading data into session variables with AJAX upon login a good idea?
has body: I've created a subscription-based system that deals with a large data-set. In its first iteration, it had semi-complicated joins that would execute, based on user-set filters, on every 'data view' page. Each query would fetch anywhere from a few kilobytes to several megabytes depending on the filter range. I decided this was unacceptable and so learned about APC (I had heard about its data-store features). I moved all of the strings out of the queries into an APC preload routine that fires upon first login. In the same routine, I am running the "full set" join query to get all of the possible IDs for the data set into a $_SESSION variable. The entire set is anywhere from 100-800Kb, depending on what data the customer is subscribed to. I convert this set into a JSON array and shuffle the data around dynamically when the user changes the filters. In creating the system I wanted it to seem as if the user was moving around lots of data very quickly, with minimal page loading (AJAX + APC when string representations are needed), as they played with the filters. My multipart question is, is it possible for the user to effectively "cancel" the initial cache/query routine by surfing to another page after the first login? If so, can I move this process to an AJAX page for preloading, or does this carry the same problem? Or, am I just going about all of this in the wrong way? I came up with the idea on my own and I'm worried that I've created an unusable monster. Also, I've been warned that my questions suck and I'm in danger of being banned. Every question I've asked has come from a position of intelligent wonder, written as well as I knew how at the time, and so it's really aggravating when an outsider votes me down without intelligent criticism. Just tell me what I did wrong and I will quickly fix the problem. Bichis.
has comment: http://stackoverflow.com/comment/38328211
answer count: 0
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/38322293
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38322324
tagged with: ajax
type: UnansweredQuestion
tagged with: php
tagged with: database-performance

http://stackoverflow.com/comment/38093609
type: QuestionComment
comment on: http://stackoverflow.com/q/24589169
score: 0
has text: instead of `id="splitUserDDL"` use `class="splitUserDDL"`
type: Comment

http://stackoverflow.com/comment/39425440
comment on: http://stackoverflow.com/a/24916231
type: AnswerComment
has text: Was more looking for package automation that checks popular CDNs, because the only solid reason to use a CDN IMO is caching.
type: Comment
score: 1

http://stackoverflow.com/comment/38366549
type: QuestionComment
comment on: http://stackoverflow.com/q/24732381
score: 0
has text: Something similar to main menu on this site: http://www.ue.katowice.pl
type: Comment

http://stackoverflow.com/comment/44404937
score: 1
comment on: http://stackoverflow.com/q/24612067
has text: You have to add the attribute manually (but you should add the namespace to `d3.ns.prefix` too): https://github.com/gopeter/semantic-diagrams/blob/ad630ba1566bbaba622e317732d9d90a2f281fab/static/js/app.js#L132
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38377551
has text: If you use transitions there's also support for transitionEnd event http://stackoverflow.com/questions/2794148/css3-transition-events and there are several events for several browsers
comment on: http://stackoverflow.com/q/24738681
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24711805
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38326697
tagged with: asynchronous
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38327828
tagged with: node.js
has title: What is too CPU intensive in node.js?
answer count: 0
has body: How do you know whether a piece of code will be too CPU intensive on a node js server? Perhaps I'm not understanding node.js enough, but wouldn't even minor calculations build up too much after many connections are open? Why dont the number of clients always eventually become a bottleneck? What prompts me to ask this question was this blog post: http://blog.artillery.com/2012/05/realtime-multiplayer-3d-gaming-html5.html Artillery uses a node.js server, and chooses to run the computations and game simulator on said server. These are CPU intensive operations. After a certain amount of clients, doesn't this become a problem? Why would intense game development in node be possible in the first place if this is true? Am I missing something? Is Artillery just doing something very special and unique to enable this? In short, the one thing that worries me about moving to node.js is that I'm confused at what amount of computation qualifies as an operation that is TOO blocking. It seems that even simple tasks would eventually become worrisome.
has comment: http://stackoverflow.com/comment/38327794
type: Question

http://stackoverflow.com/q/24655080
score: 0
has answer: http://stackoverflow.com/a/24655856
has comment: http://stackoverflow.com/comment/38219509
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24655856
possible better answer: http://stackoverflow.com/a/24655189
has body: I have an async function that retrieves data from the server, and I have a directive that is supposed to display the data of whatever that async function retrieves. What I am trying to do is to place an ng-show in false in my directive, supposing that the directive will not load unless I place the ng-show in true. The ng-show would remain false until my async function retrieves the data. The thing is this is not working, the directive would load regardless of if I place an ng-show or not on it - any other ideas? This is what I have tried in code : Js : getFile.then(function (result) { $scope.show = true; Utilities.safeApply($scope); }) Html : section class="list file-list group" ng-show="show" view-mode="assets"&gt; &lt;file file="model.file"&gt;&lt;/file&gt; &lt;/section&gt; Directive : .directive('file', ['$rootScope', '$compile', function($rootScope, $compile) { return { restrict: 'E', replace: true, templateUrl: 'file.html', scope: { show: '=' }, controller: function($scope) { //do stuff here once async function finished }
has answer: http://stackoverflow.com/a/24655189
has comment: http://stackoverflow.com/comment/38219780
type: Question
answer count: 2
has title: How do I stop a directive from executing until a given time?
tagged with: javascript

http://stackoverflow.com/a/24610624
has comment: http://stackoverflow.com/comment/38138561
answers question: http://stackoverflow.com/q/24610547
score: -1
has comment: http://stackoverflow.com/comment/38140617
has comment: http://stackoverflow.com/comment/38141270
has comment: http://stackoverflow.com/comment/38137861
has comment: http://stackoverflow.com/comment/38138293
upvote count: 0
has comment: http://stackoverflow.com/comment/38134983
has comment: http://stackoverflow.com/comment/38138360
type: Answer
has comment: http://stackoverflow.com/comment/38139940
has comment: http://stackoverflow.com/comment/38139564
has comment: http://stackoverflow.com/comment/38141655
has body: Can't comment yet, but did you try putting 100px instead of 50px in here: -webkit-transform:translateY(50px); -moz-transform:translateY(50px); transform:translateY(50px) Let me know how it goes, I will investigate to remember how to do it! Long time since I don't use that! UPDATE: Try this: .menu ul { position:absolute; top:50px; left:0; width:100%; -webkit-transform:translateY(-100%); -moz-transform:translateY(-100%); transform:translateY(-50%); -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; } Setting top to 50px, should move the menu 50px from the top, so it would start scrolling down from the bottom of the header. If not, try it with jQuery. Set the menu where you want it to be when it fully scrolls down, and then hide it with hide(). Then in a easy click() function u set the efect that you want it to have (fadeIn, scroll, whatever) and you show it with a show(). If you need more detailed jQuery code tell me and I write it for you. Good Luck! ;) UPDATE2: I did a Fiddle example with jQuery (very basic): http://jsfiddle.net/3DvVL/1/ The speed of the jQuery effect is set to 800, you can modify it. Same with the effect itself. Also the button I took was for quick demonstration, you can take whatever you want, as long as you point it through name, ID or class in the jQuery.
has comment: http://stackoverflow.com/comment/38136984
downvote count: 1

http://stackoverflow.com/a/24724388
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: Your isNaN check is fine for non-numeric values but doesn't work for empty strings: &gt; isNaN("") false &gt; parseInt("") NaN You could use Number like this: var s = Number(tds[i].innerHTML); if (!isNaN(s)) sum += s; Number will perform a type conversion on the input and return a NaN if it cannot be parsed as a number.
answers question: http://stackoverflow.com/q/24724257

http://stackoverflow.com/comment/38598726
type: Comment
has text: Thanks! That page says to add two function calls to `functions.php` to turn `wpautop` completely off, but it doesn't say where. Where do you add them in that file?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24718336

http://stackoverflow.com/q/24662735
has comment: http://stackoverflow.com/comment/38234309
has comment: http://stackoverflow.com/comment/38235625
score: 0
has answer: http://stackoverflow.com/a/24663674
answer count: 1
has comment: http://stackoverflow.com/comment/38234477
has comment: http://stackoverflow.com/comment/38234567
has comment: http://stackoverflow.com/comment/38234274
has body: Sorry for the length of this question, but there is some background you need to know to fully understand: I am building an event scheduler in Drupal 7 which allows users to check a checkbox to add an event to their schedule... and it's a mess. The checkboxes contain a value looking similar to 1404915600 - 1404917400 which represents 10:30am - 10:50am which is the result of using PHPs strtotime(); function like so strtotime("10:30am"); I need to check on the fly if the user checks another box with an overlapping time as a previously selected event and trigger an error if there is an overlap. Currently, I am using the php function mentioned above to create the values in the checkboxes, and then passing those values to a javascript array on click of checkbox. The id of the checkbox is the url friendly name of the selected event, which acts as the array key, and the values are the selected times, so the array ends up looking like: timeArr = { event-name-one: 0: 1404915600, 1: 1404917400 } Each event has it's own key to simplify deleting (or unscheduling) events using Javascripts delete function. Here is the complete code which grabs the checkbox ID and the times associated and stores them in the array: var timeBox = jQuery('input[type="checkbox"].time, input[type="checkbox"].time2'); var timeArr = []; // Listen for checkbox change timeBox.bind('click', function() { var eventID = jQuery(this).attr('id'); // If Checkbox IS checked if(jQuery(this).prop('checked')) { var timeStamp = jQuery(this).val(); var newTime = timeStamp.split(" - "); // If timeArr has been set if(timeArr.length &gt; 1) { for(key in timeArr) { if(newTime[0] &gt; timeArr[key][0] &amp;&amp; newTime[0] &lt; timeArr[key][1] || timeArr[key][0] &gt; newTime[0] &amp;&amp; timeArr[key][0] &lt; newTime[1]) { alert("Overlap!"); return false; } else { timeArr[eventID].push(newTime); console.log(timeArr); } } } else { // else timeArr hasn't been set -- so set it! timeArr[eventID] = newTime; console.log(timeArr); }…
tagged with: php
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/24663674
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38234730
has comment: http://stackoverflow.com/comment/38234378
has comment: http://stackoverflow.com/comment/38234380
type: Question
tagged with: arrays
has title: Check if time ranges overlap and trigger error if true
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/24600548
has comment: http://stackoverflow.com/comment/38151816
type: Question
has answer: http://stackoverflow.com/a/25069524
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25069524
score: 1
tagged with: mandrill
has title: Parse main.js Mandrill HTML mail sending issue
upvote count: 1
tagged with: ios
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: email
has body: I have a cloud function on Parse in main.js where I send mail as HTML encoded with Mandrill API. I call this function through my iOS app posting some parameters and its perfectly ok, sends the email. However I want to localize the HTML body depending on the language of user. Since I checked the iOS in-line HTML options which are very tricky, I'm trying to do it in my sendMail function on main.js: Parse.Cloud.define("sendMail", function(request, response) { var Mandrill = require('mandrill'); Mandrill.initialize('APP_ID'); var locale = request.params.locale; var userName = request.params.user; var password = request.params.pass; var HTMLBodyEn = ' text '; var HTMLBody = HTMLBodyEn; if (locale == 'tr') { HTMLBody = ' yazı '; } Mandrill.sendEmail({ message: { html: HTMLBody, subject: request.params.subject, from_email: request.params.fromEmail, from_name: request.params.fromName, to: [ { email: request.params.toEmail, name: request.params.toName } ] }, async: true },{ success: function(httpResponse) { console.log(httpResponse); response.success("Email sent!"); }, error: function(httpResponse) { console.error(httpResponse); response.error("Uh oh, something went wrong"); } }); }); Well it's simple as that. If condition you see there causes all the problem... As you can see there I'm receiving a locale key to change the body but it doesn't and Parse returns 141 error code which means after some digging is a time-out exception. I can't seem to understand that a simple if statement as that causes a timeout. Can anyone help me on this? Encountered anything similar?
tagged with: parse-platform
downvote count: 0

http://stackoverflow.com/a/24683504
score: 0
has body: This should do: &lt;script&gt; function autoSubmit (id){ var formObject = document.forms['pool_n'+id]; formObject.submit();} &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/24683450

http://stackoverflow.com/a/24623615
has comment: http://stackoverflow.com/comment/38160730
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Try this: a:hover, a:active, a:visited { cursor: url(../img/cursor.png), auto; } Demo P.S: Used a random image in the demo.
answers question: http://stackoverflow.com/q/24623562
has comment: http://stackoverflow.com/comment/38160656
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24623562
score: 1

http://stackoverflow.com/a/24723278
answers question: http://stackoverflow.com/q/24722287
has body: There are several issues with the code and fiddle you provided. The first major one being that jsqr isn't defined as the others have mentioned. You need to set the external reference to the jsqr library (http://code.jsqr.de/jsqr-0.2-min.js) otherwise it doesn't know what that library is. Fiddle: http://jsfiddle.net/mcfarljw/n9PbR/ The second issue is you've called a self invoking function that fires when the script is loaded and thus won't be fired when the click event happens. (function myqr() { //your code here })(); You should just make it a function like this: function myqr() { //your code here } Lastly, you've wrapped your click event listener in a DomContentLoaded listener. This isn't needed when using jsfiddle they way you have it configured, because the script is already set to run onLoad. So you can remove it for the fiddle example, but you'll need to put something like it in in your other local code.
score: 0
type: Answer

http://stackoverflow.com/comment/38326783
comment on: http://stackoverflow.com/a/24697010
has text: If it takes a bigger mail to explain, you'd better create another question, and maybe add a link to your site or to jsbin example. Comments provide too small room, for that. Anyway code snippet you show `document.innerHTML(null_tabelle_dues1_text) = ...` wasn't present in original question, and is invalid javascript! One can't doo `f() = 1` in js.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38163944
has text: post your code in fiddle will be better?
score: 0
comment on: http://stackoverflow.com/q/24625477
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38305625
score: 0
type: AnswerComment
type: Comment
has text: jrouillard, please see the above update for a detailed reply.
comment on: http://stackoverflow.com/a/24684710

http://stackoverflow.com/a/24705012
type: Answer
has body: You should remove method="post" From the form as this will make the full page submit. Also you can find more information on how to do this in the Jquery documentation. See the bottom of this link for an example: http://api.jquery.com/jquery.post/
score: 0
answers question: http://stackoverflow.com/q/24704357

http://stackoverflow.com/a/24635628
has comment: http://stackoverflow.com/comment/38183516
answers question: http://stackoverflow.com/q/24635528
score: 1
has comment: http://stackoverflow.com/comment/38183215
downvote count: 0
type: Answer
upvote count: 1
has body: I'd recommend using http://momentjs.com/. It has the functionality you're looking for. See http://momentjs.com/docs/#/displaying/from/ Example: &lt;script&gt; var my_date = moment('2014-07-07'); $("#date").val(start.from(my_date) + " from now"); // "in 5 days from now" &lt;/script&gt;

http://stackoverflow.com/q/24618140
has title: How to make content inside a div movable with overflow hidden
has answer: http://stackoverflow.com/a/24618320
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/24618320
type: AnsweredQuestion
has body: I want something like Google maps where you can move the map around in any direction while the parent div is fixed. Current HTML: This is the child div What sort of method is used for this kind of technique?
type: Question
has answer: http://stackoverflow.com/a/24618205
accepted answer: http://stackoverflow.com/a/24618205

http://stackoverflow.com/comment/38323979
comment on: http://stackoverflow.com/q/24710306
type: Comment
type: QuestionComment
has text: I tried doing typeof t and it returns `object` Chrome: 35.0.1916.153
score: 0

http://stackoverflow.com/comment/38222560
comment on: http://stackoverflow.com/a/24656741
type: AnswerComment
score: 0
type: Comment
has text: @timtour97 — You have four checkboxes. Two with one name and two with another name. That isn't a mistake though.

http://stackoverflow.com/q/24649771
tagged with: asp.net
has comment: http://stackoverflow.com/comment/38209526
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38210079
has answer: http://stackoverflow.com/a/24649929
type: Question
has body: I am working on asp.net project. I need know how to logout automatically after 5 mins using session concept or other methods. Thanks
tagged with: c#
answer count: 2
linked to: http://stackoverflow.com/q/4413886
tagged with: session
tagged with: javascript
duplicate of: http://stackoverflow.com/q/4413886
score: 0
has answer: http://stackoverflow.com/a/24649916
has title: How to set logout automatically using session in asp.net

http://stackoverflow.com/comment/38330205
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24714084
has text: Of course! You add one more enumerable property to all array instances. Why are you surprised?

http://stackoverflow.com/comment/38226202
type: Comment
has text: sending in small junks is an idea... but at this moment i do not have an idea how to rebuild the data on the server side with php. maybe with start/stop commands also with javascript to determine the end of the data. how would you identify the requests to know which junks should be together? just a unique id or something similar?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24658290

http://stackoverflow.com/a/24692500
type: Answer
answers question: http://stackoverflow.com/q/24691585
score: 0
has body: don't use setattribute use anonymous function for events inpEle1.onclick = function() { Show(); }; Also it works in IE tester in IE8, but not IE7, do you have it using IE7 compatibility
accepted answer of: http://stackoverflow.com/q/24691585
type: AcceptedAnswer

http://stackoverflow.com/comment/38367756
score: 0
comment on: http://stackoverflow.com/q/24733256
type: Comment
type: QuestionComment
has text: if you found my comments useful, I have posted it as an answer. So that others would benefit from it as well. Good Day.

http://stackoverflow.com/a/24673966
has body: OMG this question is easily solved by css no need for lines of codes in js $(".drag-circle.zoneID-37")
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24673329

http://stackoverflow.com/comment/38300001
has text: @JakubWisniewski exactly, your trigger the normal behavior of the anchor.
comment on: http://stackoverflow.com/a/24697123
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38294437
has text: @NoobPenguinDeveloper i can't understand what you exactly want..can you explain? you mean submenues?
comment on: http://stackoverflow.com/a/24674548
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24674129
has body: You'll need a condition for each star in your updateStars function, either as a property for each, or a separate array. Then, you can do something like this: scope.hoveringOver = function(index){ for (var i = 0; i &lt;= index; i++) { scope.stars[i].Condition = "Good.png"; } }; Or the separate array way (assuming the array is scope.conditions): scope.hoveringOver = function(index){ for (var i = 0; i &lt;= index; i++) { scope.conditions[i] = "Good.png"; } }; You also need a function opposite of hoveringOver to remove the states to default/previous versions.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38255382
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24671487
answers question: http://stackoverflow.com/q/24671487
has comment: http://stackoverflow.com/comment/38255043
has comment: http://stackoverflow.com/comment/38274006
type: Answer

http://stackoverflow.com/comment/38138058
has text: paste your code on fiddle
score: 2
type: Comment
comment on: http://stackoverflow.com/q/24612175
type: QuestionComment

http://stackoverflow.com/comment/129457242
comment on: http://stackoverflow.com/a/56391657
type: Comment
score: 1
has text: @GeorgesA you are right. I have updated my answer and noted that scroll-margin and scroll-padding would be a better solution
type: AnswerComment

http://stackoverflow.com/comment/38277400
type: Comment
has text: Ah that could work. Thank you, I'll give it a try.
type: QuestionComment
comment on: http://stackoverflow.com/q/24645476
score: 0

http://stackoverflow.com/comment/38415413
score: 0
type: AnswerComment
has text: Ok, and does it work now? If not, do you have a test /dev version online that shows the behaviour? I could try to find the source of the problem
comment on: http://stackoverflow.com/a/24701803
type: Comment

http://stackoverflow.com/comment/38195986
comment on: http://stackoverflow.com/a/24642243
score: 0
type: AnswerComment
type: Comment
has text: The only problem is I wanted this to be dynamic. If I define a for loop, I would have to loop over a fixed length. Is this still possible maybe using async?

http://stackoverflow.com/comment/38270411
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24682110
type: Comment
has text: @Aidiakapi Yes, because I'm redisplaying them later. This is the best way I've found to maintain the order of the options and all their properties without doing some major insert/remove hackery.

http://stackoverflow.com/q/24747965
answer count: 2
tagged with: file-io
has answer: http://stackoverflow.com/a/24748267
downvote count: 0
has answer: http://stackoverflow.com/a/24748140
favorite count: 0
possible better answer: http://stackoverflow.com/a/24748267
has title: Getting latitude and longitude from an address and writing to a file
has comment: http://stackoverflow.com/comment/38394984
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38394973
score: 1
accepted answer: http://stackoverflow.com/a/24748140
has body: I have having some trouble with this one. I'm getting the impression this isn't possible using javascript. I have a text file formatted like: Street # STREET CITY ST ZIP all separated by /t, and I would like to convert this address to latitude and longitude coordinates. So the idea is to read a line from a text file, and write to either than same local file or to a whole new file if that is easier. I only have to do this once, Just one single pass of converting addresses to latitude and longitude. Will not be in the application just need for my own use a list of latitude and longitude (around 200 addresses to be converted) I am not sure if there is anyway to do this without using Google Maps API, but I know I can retrieve the latitude and longitude by: geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var latlong = results[0].geometry.location; } else { alert('Geocode was not successful for the following reason: ' + status); } }); So not only do I not know if its even possible to write to a file using js in the browser, but I also know that the function above is run asynchronous and may mess it up that way. Any idea? If this is doable in another language that will be easier? Thanks
upvote count: 1
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/38394901
tagged with: javascript
has comment: http://stackoverflow.com/comment/38395029

http://stackoverflow.com/comment/38130671
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24608138
has text: Another problem : it breaks if you type some html in the textarea (in my solution I solved that by using `text` and some css settings).
type: AnswerComment

http://stackoverflow.com/q/24690651
score: 0
has comment: http://stackoverflow.com/comment/38362196
answer count: 1
tagged with: jquery
has title: How to save all the datas
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24690952
linked to: http://stackoverflow.com/q/19656036
tagged with: http://stackoverflow.com/tag/html
has body: I want to do is save the current contents of the datatable using localstorage before the browser is closed or refreshed by the user. I looked in the datatable examples http://datatables.net/beta/1.9/examples/advanced_init/localstorage.html and i tried the code but it doesn't work. My problem is in my current code it doesn't work if i refresh the page or closed it and open again the current content before i closed or refreshed the page the content is gone. current code: http://jsfiddle.net/4GP2h/18/ $(document).ready(function() { $('#myTable').dataTable( { "bStateSave": true } ); } );
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38256660
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24675162
has text: You need to add a header to response in aboutus.aspx not a request in other page that you make an ajax. Is it not clear?

http://stackoverflow.com/comment/38283563
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24689435
has text: you need to learn bit of javascript on to know object vs arrays and iterating over object properties vs arrays. When you do length on a non array object, you have clearly misunderstood the concept.
type: Comment

http://stackoverflow.com/q/24696421
type: AnsweredQuestion
has body: I am using JQuery FancyBox and when I click on the small image to get bigger it keeps on saying error 404.. The code that I am doing is this: For some reason when I see the source of the page it display as follows: images/Skeleton/images/gallery/1_b.png 404 (Not Found) images/Skeleton/images/gallery/2_b.png 404 (Not Found) The version I am using is jquery.fancybox.js?v=2.1.5. Javascript code as follows:
type: Question
has title: Jquery Fancy Box Error 404
accepted answer: http://stackoverflow.com/a/24696510
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: fancybox
tagged with: css
has answer: http://stackoverflow.com/a/24696510

http://stackoverflow.com/comment/38361056
score: 1
comment on: http://stackoverflow.com/q/24726266
type: Comment
type: QuestionComment
has text: I have an example of 4 different ways of launching AutoIt here: https://sourceforge.net/p/sebase/code/HEAD/tree/sebase-groovy/src/test/groovy/net/sourceforge/sebase/demos/AutoItTest.groovy

http://stackoverflow.com/comment/38277830
type: Comment
score: 0
has text: I see that - it seems to set a minimum height in chrome.
type: AnswerComment
comment on: http://stackoverflow.com/a/24685886

http://stackoverflow.com/q/24660391
type: Question
tagged with: google-maps
tagged with: javascript
has title: Google Maps Javascript API v3: google.maps is not whitelisted for your application
has comment: http://stackoverflow.com/comment/38236761
tagged with: google-maps-api-3
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/38276817
has body: I am trying to add the Google Maps JavaScript API v3 to my application but am receiving the error that my app is not whitelisted. I have tried loading the API in two ways: &lt;script type="text/javascript" src="//www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script&gt; google.load('visualization', '1', {packages: ['corechart', 'table']}); google.load("maps", "3", {other_params:'sensor=false', callback: function(){ }}); &lt;/script&gt; Loading it this way causes the error that my app is not whitelisted. I have tried to include the key within the other_parameters but receive the same error. The API is enabled in the Developer Console. The appropriate referrers are enabled in the Console as well. &lt;script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=..."&gt; &lt;/script&gt; Loading it this way causes the error that the object google is not extensible. Thank you in advance for help. The documentation for the Google Loader is not current and does not show how a key should be included in the loader Thank you

http://stackoverflow.com/q/24745505
tagged with: javascript
tagged with: css
has title: Drop down links not working in iOS
answer count: 0
type: UnansweredQuestion
tagged with: wordpress
has comment: http://stackoverflow.com/comment/38390854
type: Question
score: 0
has body: I have a Wordpress website that has a horizontal menu bar with a drop down sub-menu that appears when hovering over the parent menu item. The links to the sub menu works in a regular browser, however, when using my iPhone, the links to the sub menu do not work. It previously worked only in a long press mode, but I didn't want the long press mode so I added the following code in my CSS to remove the long press mode: .navWrap .top-bar2 li.menu-item { -webkit-user-select:none; -webkit-touch-callout: none!important; } and I also added the following javascript (because the CSS didn't work and some people suggested the javascript solution): You can test this by going to the following link: http://sa4iserver1.com/~hoffer/ -- at this time, the only menu item that has a drop down sub-menu is the RENT menu item. Any suggestions on how to make the sub-menu links clickable via iPhone/iPad would be greatly appreciated!
tagged with: iphone
has comment: http://stackoverflow.com/comment/38390782
tagged with: ios

http://stackoverflow.com/a/24617173
score: 0
answers question: http://stackoverflow.com/q/24617044
type: Answer
has body: You need to give each "client" their own class So both li's would have class="client-one", class="client-two" etc... Then in jQuery fyou can select them by classname and change their style var whichever = "one"; $(".client-" + whichever).css({"background": "red", "color": "white"});

http://stackoverflow.com/q/24669312
type: UnansweredQuestion
tagged with: preventdefault
type: Question
has comment: http://stackoverflow.com/comment/38245804
score: 1
has title: mouse event still fired on touch event even with preventDefault set
has comment: http://stackoverflow.com/comment/38245852
tagged with: mouseevent
tagged with: touch
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/24669388
has answer: http://stackoverflow.com/a/24669419
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: is there anything I misunderstood here? I often use code like the following in my site that I want to work either for desktop and iPad device: $("#someElement") .on( "mousemove", function(e) { alert ( "I am still here" ); // undesired code for ipad here } ) .on( "touchmove", function(e) { e.preventDefault(); // only desired code for ipad use here } ); I read in many places that the e.preventDefault should kill the mouse events attached. And that the touch events are elaborated in the first place. Yet, I now recognized that the alert is still triggered on my ipad. Why? Any hints on that? Thanks in advance! EDIT: I realized that when I put 'touchstart' instead of 'touchmove' the e.preventDefault() works in the predicted way. Come on, guys, some ideas!
downvote count: 0

angularjs-controller
tags question: http://stackoverflow.com/q/24595192
type: Tag
tags question: http://stackoverflow.com/q/24621307
tag name: angularjs-controller
tags question: http://stackoverflow.com/q/24617708

http://stackoverflow.com/q/24732961
tagged with: canvas
possible better answer: http://stackoverflow.com/a/24734656
accepted answer: http://stackoverflow.com/a/24734375
downvote count: 0
favorite count: 0
has body: I use canvas to set the luminosity of an image. This work fine, if i set the luminosity only one time. But if i reset the luminosity back to 0, i don't get the default image. I don't know why. The code that call the effect : var mainEffect = new CanvasEffect(canvas[0]); var thumbsEffect = new CanvasEffect(thumbs[0]); luminositySlider.change(function() { var intensity = luminositySlider.val(); mainEffect.apply("luminosity", intensity); thumbsEffect.apply("luminosity", intensity); }); This is the code i use, int is gotten from a html slider. The previous luminosity is stored in an array : function CanvasEffect(canvas) { var ctx = canvas.getContext("2d"); var WIDTH = canvas.width; var HEIGHT = canvas.height; var stack = []; var imageData; var data; this.apply = function(effect, intensity) { imageData = ctx.getImageData(0,0, WIDTH, HEIGHT); data = imageData.data; var int = Number(intensity); var refresh = true; switch (effect) { case "blur": refresh = false; stackBlurCanvasRGB('canvas', 0, 0, WIDTH, HEIGHT, int); break; case "sharpen": break; case "luminosity": console.log("stack['luminosity'] : " + stack["luminosity"]); lastInt = (stack["luminosity"] == undefined) ? 0 : stack["luminosity"]; newInt = int - lastInt; console.log("int : " + int, "lastInt : " + lastInt, "newInt : " + newInt); for(var i=0;i &lt; data.length;i+=4) { data[i] += newInt; //Red data[i+1] += newInt; //Green data[i+2] += newInt; //Blue } break; case "contrast": lastInt = (stack["contrast"] == undefined) ? 0 : stack["contrast"]; newInt = int - lastInt; var factor = (259 * (newInt + 255)) / (255 * (259 - newInt)); for(var i = 0; i &lt; data.length ; i+=4) { data[i] = factor * (data[i] - 128) + 128; //Red data[i+1] = factor * (data[i+1] - 128) + 128; //Green data[i+2] = factor * (data[i+2] - 128) + 128; //Blue } break; case "negatif": console.log("negatif"); for(var i=0;i &lt; data.length;i+=4) { data[i] = 256-data[i]; //Red data[i+1] = 256-data[i+1]; //Green data[i+2] = 256 - data[i+2]; //Blue } brea…
score: 2
type: AnsweredQuestion
has title: Why can't I revert the luminosity on my canvas?
upvote count: 2
has answer: http://stackoverflow.com/a/24734375
type: Question
has answer: http://stackoverflow.com/a/24734656
tagged with: javascript
answer count: 2

variables
tag name: variables
tags question: http://stackoverflow.com/q/24703764
tags question: http://stackoverflow.com/q/24638680
tags question: http://stackoverflow.com/q/24660342
tags question: http://stackoverflow.com/q/24701929
tags question: http://stackoverflow.com/q/24632099
tags question: http://stackoverflow.com/q/24657731
type: Tag
tags question: http://stackoverflow.com/q/24715750
tags question: http://stackoverflow.com/q/24686849
tags question: http://stackoverflow.com/q/24731082
tags question: http://stackoverflow.com/q/24673560
tags question: http://stackoverflow.com/q/24588147
tags question: http://stackoverflow.com/q/24619566
tags question: http://stackoverflow.com/q/24739047

http://stackoverflow.com/comment/38259547
score: 0
has text: Putting an `/` first should start from the host.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24676859

http://stackoverflow.com/comment/38221188
comment on: http://stackoverflow.com/a/24655991
type: AnswerComment
score: 0
type: Comment
has text: @SergeyBasharov 1. You edited your question after I answered. 2. I see no reason why tabindexing wouldn't work. Post a code example. Thanks.

http://stackoverflow.com/q/24594413
tagged with: javascript
score: 0
has body: I have the inheritance chain Vehicle -&gt; Motorized -&gt; Car implemented: function Vehicle() { var m_name; this.setName = function(pName) { m_name = pName; }; this.getName = function() { return m_name; }; } function Motorized() { var m_started = false; this.start = function() { m_started = true; console.log(getName() + " started"); }; } function Car() { } //set up the inheritance chain Motorized.prototype = new Vehicle(); Car.prototype = new Motorized(); // use var lCar = new Car; lCar.setName("Focus"); console.log(lCar.getName()); // Focus lCar.start(); // ReferenceError: getName is not defined When I invoke lCar.start() (defined in function Motorized), I get an ReferenceError: getName is not defined. How can I use the inherted method getName() in my subclass Motorized?
has answer: http://stackoverflow.com/a/24594512
tagged with: javascript-objects
linked to: http://stackoverflow.com/q/4371333
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24594512
has title: How can I use a method from inherited class
type: Question
linked to: http://stackoverflow.com/q/3127429
answer count: 1

http://stackoverflow.com/comment/38201325
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24624099
has text: In fact, property on prototype is not readonly. You can check the result in [Demo](http://jsfiddle.net/tddAm/).
type: AnswerComment

http://stackoverflow.com/a/24726371
has body: If you look at the console log in Chrome (press F12 to enter Developer Tools where you can see the log), you will see an error message “Unexpected token ILLEGAL”. The reason is that you have line breaks inside a JavaScript string, which is not permitted, so the function definitions fail in parsing. Moreover, you are using quotes inside a quoted string, which isn’t permitted either. Use single quotes (') as inner quotes or (in this case) just omit them, e.g. function incorrect() { document.getElementById("feedback").innerHTML = "incorrect! Next Question"; }
has comment: http://stackoverflow.com/comment/38354939
type: Answer
answers question: http://stackoverflow.com/q/24726269
has comment: http://stackoverflow.com/comment/38354127
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24726269

http://stackoverflow.com/a/24717280
downvote count: 0
has comment: http://stackoverflow.com/comment/38337100
has comment: http://stackoverflow.com/comment/38336898
type: Answer
has comment: http://stackoverflow.com/comment/38336795
has comment: http://stackoverflow.com/comment/38336649
upvote count: 2
has body: You can create a bezel effect with an inset-shadow. The process is straightforward: Define a non-rectangular path, Create a clipping path from the non-rectangular path, Apply a shadow-stroke (which is the bevel effect); Here's example code and a Demo: http://jsfiddle.net/m1erickson/4kvLn/
score: 2
accepted answer of: http://stackoverflow.com/q/24716931
answers question: http://stackoverflow.com/q/24716931
has comment: http://stackoverflow.com/comment/38341397
has comment: http://stackoverflow.com/comment/38336609
type: AcceptedAnswer

http://stackoverflow.com/q/24590112
tagged with: jquery
favorite count: 0
has body: I have a script for google maps that has zoom set at a certain distance for desktop browsers. I was wondering if there's away to have a different zoom when being viewed on mobile device. I think it can be done with a if statement but I'm not sure how I would integrate it into the script. I'm not that comfortable with jquery and would appreciate any help. script is: &lt;script&gt; window.onload = function () { var latlng = new google.maps.LatLng(51.523612, -0.125816); var styles = [{ "stylers": [{ "saturation": -100 }, { "hue": "#ff0000" }, { "gamma": 0.92 }] }, { "featureType": "poi", "stylers": [{ "visibility": "off" }] }, { "elementType": "geometry.fill", "stylers": [{ "gamma": 0.85 }] }, {}] var myOptions = { zoom: 17, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true, scrollwheel: false, draggable: false, styles: styles }; map = new google.maps.Map(document.getElementById('map'), myOptions); var marker = new google.maps.Marker({ position: latlng, map: map, }); marker.setMap(map); } &lt;/script&gt;
type: AnsweredQuestion
downvote count: 1
has title: changing zoom for mobile on google maps
type: Question
score: 3
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/24590219
tagged with: google-maps-api-3
upvote count: 4
answer count: 1
accepted answer: http://stackoverflow.com/a/24590219

http://stackoverflow.com/comment/38234890
score: 0
has text: What is happening instead of showing my Link it shows absolutely nothing.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24662594

http://stackoverflow.com/comment/38353532
type: Comment
type: QuestionComment
has text: as @David said you are returning before appending html of partial view
score: 0
comment on: http://stackoverflow.com/q/24725186

http://stackoverflow.com/a/24626257
score: 1
answers question: http://stackoverflow.com/q/24625808
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24625808
has comment: http://stackoverflow.com/comment/38167192
has body: If you want to check for pros &amp; consof Angular only, here is the list: PROS Angular follows MV-Whatever architecture. Hence you can either MVP, MVC or MVVM. It gives the flexibility to do two way binding. Data binding tries to get rid of writing codes manually by relieving the backend server from creating templates. MVC pipeline is also maintained by the framework itself. DOM Manipulations at one place: You can make use of angular directives to play with the dom giving a neater code.There are some reusable tags defined by angular folks themselves in directives like ng-class, or ng-show. See Angular Directive Documentation Test Ready: The fact that AngularJS comes linked with Dependency Injection (DI) makes it ready for unit testing by injecting mock data into controller and measuring the output and behavior. Ionic Framework: Ionic Framework is written on top of Angular and is mainly used to build hybrid apps. So Angular is useful if you are going to extend your website into a mobile hybrid app. Cons: Difficult to adapt the existing code: AngularJS requires the developer to re-implement the entire transformation code which makes it extremely hard to play around while adapting existing code. Heavy: Their are lighter frameworks like backbone and knockout, however seeing the power of Angular it can be easily negated Now moving to your question whether Nodejs be used in conjunction to Angularjs my answer to it is: AWESOME COMBINATION You can have your server code residing in nodejs and use angularjs at client side keeping the architectures completely different. Since Nodejs also uses javascript there would be less of uptime for developers to learn it and start developing. Infact MEAN (Mongo-Express-Angular-Node) methodology. Their are various boilerplates available in order to kick start your development. One can be found at MEAN
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/38167076

http://stackoverflow.com/q/24651449
tagged with: css
has answer: http://stackoverflow.com/a/48253920
upvote count: 3
tagged with: background-image
possible better answer: http://stackoverflow.com/a/48253920
has comment: http://stackoverflow.com/comment/38212800
has answer: http://stackoverflow.com/a/24651756
answer count: 4
accepted answer: http://stackoverflow.com/a/24694025
has body: I searched for a while but couldn't find anything useful.I have the following css input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 10px; background-image: url('http://www.w3schools.com/html/smiley.png'), -webkit-gradient( linear, left top, left bottom, color-stop(0, #fefefe), color-stop(0.49, #dddddd), color-stop(0.51, #d1d1d1), color-stop(1, #a1a1a1) ); background-size:20px; background-repeat: no-repeat; } Now I want to change the background image to some other image src by the help of jquery or plain javascript which I can test from chrome console.So that I have something like: `background-image: url('http://someotherimage/test.png'),` Could anyone please mention the correct syntax. Thanking you in anticipation of favorable response.
has comment: http://stackoverflow.com/comment/38212687
tagged with: javascript
has comment: http://stackoverflow.com/comment/38212537
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/38212598
downvote count: 0
has title: change background image of webkit-slider-thumb by jquery
tagged with: jquery
has answer: http://stackoverflow.com/a/49902064
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24694025

http://stackoverflow.com/q/24662720
accepted answer: http://stackoverflow.com/a/24707252
has title: Retrieving Texture Map coordinates from Object face Three.js
has comment: http://stackoverflow.com/comment/38234423
type: Question
tagged with: javascript
score: 4
has body: I'm trying to take a 3D Object in Three.js, look at a point on the surface of that object and find the corresponding point on a texture file (preferably with x,y coordinates). Right now I'm casting a ray to find the point on the face of the object. Each point has a corresponding face that I think should somehow correspond to the texture map. Is there a known way of retrieving this information? (perhaps by somehow inverting the UV Mapping function?) If not I will continue to work on the problem and post a solution if I can figure it out.
upvote count: 4
tagged with: 3d
has answer: http://stackoverflow.com/a/24707252
answer count: 1
downvote count: 0
favorite count: 0
tagged with: three.js
has comment: http://stackoverflow.com/comment/38235026
type: AnsweredQuestion

http://stackoverflow.com/q/24672959
favorite count: 0
has body: I am working on a slideshow implementation. We have to prefetch images for better user experience. Currently I am using hidden img tags to trigger the image load. But when a user moves say from 1st image to 80th image, the prefetch image request started for the first image doesn't get cancelled. Using iframes we can call stop() on iframe object to stop loading the previous set of images. The norm for creating iframes using javascript appears to be ifrm = document.createElement("IFRAME"); I dont want to do that as I dont want my iframes to be appended to DOM. There is a HTMLFrameElement. But I am not sure how to use it. So my question is, how to create iframes in javascript without accessing document object.
has comment: http://stackoverflow.com/comment/38254370
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24675081
has comment: http://stackoverflow.com/comment/38252410
tagged with: iframe
has title: Create iframe only using javascript
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38252203
linked to: http://stackoverflow.com/q/6936071
tagged with: javascript
has comment: http://stackoverflow.com/comment/38252120
has answer: http://stackoverflow.com/a/24673038
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24675081
has comment: http://stackoverflow.com/comment/38254805
possible better answer: http://stackoverflow.com/a/24673038

http://stackoverflow.com/comment/38255868
has text: was checking out the same thing. hope it may help. Anyways thanx for the reply. It means a lot :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24672900

http://stackoverflow.com/comment/129523446
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/73301812
has text: Your answer could be improved by adding more information on what the code does and how it helps the OP.

http://stackoverflow.com/comment/38364224
type: Comment
score: 0
has text: How does one get information about the click this way? Is that a hole in the API or an error in the docs?
type: AnswerComment
comment on: http://stackoverflow.com/a/24724215

http://stackoverflow.com/comment/38209883
has text: I think the issue is in the markup but it would take a long time to debug.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24649744
type: Comment

http://stackoverflow.com/q/24707258
tagged with: javascript
tagged with: jquery
answer count: 2
has answer: http://stackoverflow.com/a/24707444
upvote count: 0
tagged with: validation
has comment: http://stackoverflow.com/comment/38317374
favorite count: 0
score: -3
has comment: http://stackoverflow.com/comment/38317484
has title: jquery validator hide div on submit
accepted answer: http://stackoverflow.com/a/24707444
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24707622
downvote count: 3
has answer: http://stackoverflow.com/a/24707622
has body: I've got a validator that hides the submit buttons (and shows a please wait message) after user hits submit. However it's also doing it when a date field validates. Is it possible to only hide and show the divs when the command comes from one of the submit buttons, but not when the dates validate on change?
type: Question

http://stackoverflow.com/comment/38291965
has text: "html I'm working with have no **tags**" - wait, what..?
comment on: http://stackoverflow.com/q/24694314
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38326223
score: 0
has text: I don't know anything about asp.net, so I don't know how that would affect this.
type: Comment
comment on: http://stackoverflow.com/a/24711782
type: AnswerComment

http://stackoverflow.com/a/65279747
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24621940
has body: You can use the Singleton Design Pattern to achive cross file usage of your MongoDB connection. Init.mjs /* ################ Controller ################ */ import ctrlLib from '../../controller/lib.mjs'; /* ################ MongoDB ################ */ import mongodb from 'mongodb'; /* ################ Logs ################ */ import log from 'fancy-log'; import chalk from 'chalk'; /** Init MongoDB connection */ export class Init { /** * Check if its first time usage of this class. If true set class instance to this that we always get same instance. * Then get MongoDB details from config.yml and set as global. * In the last step we return the class instance. */ constructor() { if (Init.instance == null) Init.instance = this; const config = ctrlLib.getConfig(); this.MongoURL = config.MongoDB.url; this.MongoName = config.MongoDB.dbname; ({MongoClient: this.MongoClient} = mongodb); return Init.instance; }; // constructor(){ /** Connect to Database and return connection */ async connect() { try { const client = await this.MongoClient.connect( this.MongoURL, {useNewUrlParser: true, useUnifiedTopology: true}, ); this.connection = {'db': client.db(this.MongoName), 'client': client}; return this.connection; } // try { catch (e) { log( `${chalk.red.bold('❌ ERROR')} while try to connect to MongoDB DB ${chalk.white.bold('Error:\n')} ${e}` ); } // catch (e) { }; // async connect() { /** * Return connection for cross file usage * @return {object} */ getConnection() {return this.connection;}; }; // export class Init { app.mjs Make sure to 1x time create your MongoDB connection anywhere inside of your project that you can use it later in other files. /* ################ Services ################ */ import {Init} from './Init.mjs'; (async ()=&gt;{ await new Init().connect(); })().catch(e=&gt;{log('app.mjs - Catch error: ' + e);}); anyOtherFile.mjs /* ################ Services ################ */ import {Init} from './Init.mjs'; /** Subclass of Search which contains lib functions */ …

http://stackoverflow.com/comment/38134969
score: 0
type: Comment
has text: looks like your $scope is broken somewhere, check if you have correctly open/closed your controllers in html views.
comment on: http://stackoverflow.com/a/24607207
type: AnswerComment

http://stackoverflow.com/comment/38092011
comment on: http://stackoverflow.com/a/24588159
type: Comment
score: 0
has text: but in the demo there is no spaces present before and after the value.
type: AnswerComment

http://stackoverflow.com/q/24618260
has comment: http://stackoverflow.com/comment/38191417
score: -1
type: Question
tagged with: flash
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38150196
has body: So what I want do is create a jquery that will automatically remove/comment out information located in a xml document based on a expiration date. I am trying to create a slideshow for a movie theater that drops movies off after the last showing. Is this even possible?
has title: modify xml document using JQuery
downvote count: 1
tagged with: http://stackoverflow.com/tag/xml
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24661796

http://stackoverflow.com/q/24737492
type: Question
accepted answer: http://stackoverflow.com/a/25255017
tagged with: javascript
favorite count: 0
score: -5
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/24737615
has answer: http://stackoverflow.com/a/24748108
has answer: http://stackoverflow.com/a/24737615
has body: Is Famo.us(A new mobile application development framework) support native application,as I doesn't want my app browser based.I have read many doc's related to the same but i did'nt get anything regarding native app. Thanks
has answer: http://stackoverflow.com/a/25215130
upvote count: 1
tagged with: css
answer count: 4
downvote count: 6
type: AnsweredQuestion
tagged with: famo.us
has title: famo.us support native app or not
has answer: http://stackoverflow.com/a/25255017

sencha-touch-2.1
tag name: sencha-touch-2.1
tags question: http://stackoverflow.com/q/24663411
type: Tag

http://stackoverflow.com/comment/38274985
comment on: http://stackoverflow.com/a/24684667
type: Comment
has text: Yes, this is what I was looking for. The reason I counted the elements before creating my array was because I didn't know you could create arrays with an unspecified size. Still learning.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/38239004
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24642992
has text: Thanks plaix .. :D .. I like both the answers posted to my question and both of them work. Unfortunately I can only pick one as correct.. I am really thankful for your inputs :D ..
score: 0

http://stackoverflow.com/q/24708374
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has body: Suppose I have an arbitrary SVG path and the user selects two points on that path. How can I calculate the exact length of the subpath between those two points? I'm somewhat familiar with the SVGPathElement API, but cannot figure out how to use any of the calls to calculate a path's partial length. I'm using D3 so a D3 API call would be perfectly fine.
has title: How to measure the length of a subpath of an SVG path?
has comment: http://stackoverflow.com/comment/38326585
has comment: http://stackoverflow.com/comment/38323269
has comment: http://stackoverflow.com/comment/38339637
type: Question
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38327747
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/24716749
favorite count: 0

http://stackoverflow.com/a/24719663
has comment: http://stackoverflow.com/comment/38393730
has body: JavaScript getter functions are in the following format: function() { // this is the object instance owning the property } Please note getter function doesn't take any argument and the receiver is the object instance owning the property. For example: myModelInstance.myProperty will call the getter function with this set to myModelInstance.See more at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects.
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24713445

http://stackoverflow.com/q/24636902
has comment: http://stackoverflow.com/comment/38185190
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24637028
answer count: 2
downvote count: 0
has title: Javascript: Extract MAC codes from freeform text using Regex
favorite count: 0
has comment: http://stackoverflow.com/comment/38185265
has answer: http://stackoverflow.com/a/24637155
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24637028
possible better answer: http://stackoverflow.com/a/24637155
has body: I'm attempting to write a Chrome Extension that will scan a web page for valid MAC codes and push each in to an array. I have a regex that validates the MAC but I can't get it to match multiple codes. Here is a quick snippet of my code : var regex = /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/; var body = document.body.innerText.replace(/\n/g,' '); console.log(body.match(regex)); var occur = regex.exec(body); console.log(occur); Many thanks.
score: 1
has comment: http://stackoverflow.com/comment/38185441
upvote count: 1
type: Question

http://stackoverflow.com/q/24610051
possible better answer: http://stackoverflow.com/a/24610111
has comment: http://stackoverflow.com/comment/38134019
has answer: http://stackoverflow.com/a/24610211
has comment: http://stackoverflow.com/comment/38134371
has title: How to convert a JS hash table into an array with a specific order?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24610168
tagged with: underscore.js
type: Question
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38133890
has body: I've got: var productsSelected = { mouse: "Logitech 232", display: "27-inch LCD", memory: "8GB", videoCard: "nVidia 6500-GTS", extendedWarranty: "", extraBattery: "", antivirus: "", cpu: "Core i7 2.4GHz" } I would like to convert this into an array with a certain order: var productsSelectedArray = [ {cpu: "Core i7 2.4GHz"}, {memory: "8GB"}, {videoCard: "nVidia 6500-GTS"}, {display: "27-inch LCD"}, {extraBattery: ""}, {antivirus: ""}, {mouse: "Logitech 232"}, {extendedWarranty: ""} ] I can give this function an array that defines the order I want: var desiredOrder = [ "cpu", "memory", "videoCard", "display", "extraBattery", "antivirus", "mouse", "extendedWarranty" ] But I'm having a hard time figuring out how to write this function. I have UnderscoreJS installed as well. I'm thinking that I would start with a function that takes the desiredOrder array and productsSelected hash as arguments and it would declare productsSelectedArray as an empty array. var convertHashToArray = function(hashTable, desiredOrderArray){ ... } It would loop through desiredOrder and for each value it would do a lookup of that value in the productsSelected hash. It would then push a hash with key desiredOrder[i] and value result of lookup in productsSelected to the array, right? EDIT Thanks guys for all the answers! I'm glad I asked... I don't believe I would have come up with such short solutions.
has answer: http://stackoverflow.com/a/24610111
has answer: http://stackoverflow.com/a/24610168
has answer: http://stackoverflow.com/a/24610376
answer count: 4

http://stackoverflow.com/comment/38211686
score: 0
type: Comment
type: QuestionComment
has text: @NiettheDarkAbsol Did OP say he's working with HTML5?
comment on: http://stackoverflow.com/q/24650886

http://stackoverflow.com/comment/38323219
has text: `+` sign used to concatenation of string in javascript
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24710216
score: 1

http://stackoverflow.com/a/24731341
has comment: http://stackoverflow.com/comment/38364193
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/38364546
answers question: http://stackoverflow.com/q/24731307
downvote count: 0
has body: To change the Modal position in the viewport you can target the Modal div id, in this example this id is myModal3 × Modal title One fine body… Close Save changes #myModal3 { top:5%; right:50%; outline: none; overflow:hidden; }
score: 6

http://stackoverflow.com/q/24729559
score: 0
has answer: http://stackoverflow.com/a/24729628
answer count: 1
tagged with: javascript
has body: I am using the CTA API (http://www.transitchicago.com/developers/bustracker.aspx) and the responses are xml. I'd like to convert to json after my fetch in a backbone collection. The response looks like this: <?xml version="1.0"?> 1 Bronzeville/Union Station #336633 2 Hyde Park Express #993366 I'd like it to look like this: [ { "rt": "1", "rtnm": "Bronzeville/Union Station", "rtclr": "#336633" }, { "rt": "2", "rtnm": "Hyde Park Express", "rtclr": "#993366" } ] What's the best way to do this?
linked to: http://stackoverflow.com/q/246577
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
has title: Convert xml to json and format
duplicate of: http://stackoverflow.com/q/1773550
has comment: http://stackoverflow.com/comment/38360778
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/1773550
type: Question

http://stackoverflow.com/comment/38377733
comment on: http://stackoverflow.com/a/24738825
has text: The Show / Hide works fine. What I need is the copy function to work on each div as i want it if the div is click it is copied. The copy function uses a var which is the div's id. So using the function as is I would need to create 19 vars and then right the script out for each var. trying to find a simple way of doing this... I cant use getElementByClass as I am using iE8 which does support the class.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24685379
tagged with: jasmine
favorite count: 0
accepted answer: http://stackoverflow.com/a/24686152
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24686152
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: gruntjs
has title: Unable to get Jasmine working with basic library
has body: I'm new to using Jasmine and Grunt (and StackOverflow). I'm trying to setup the most basic of projects. However, when I run my grunt task, I get an error that says: Running "jasmine:testShared" (jasmine) task Testing jasmine specs via PhantomJS &gt;&gt; Error: notloaded: Module name "../" has not been loaded yet for context: _. Use require([]) &gt;&gt; http://requirejs.org/docs/errors.html#notloaded at &gt;&gt; ..\..\C:\Tests\jasmine\_SpecRunner.html:21 &gt;&gt; ..\..\C:\Tests\jasmine\.grunt\grunt-contrib-jasmine\require.js:12 v &gt;&gt; ..\..\C:\Tests\jasmine\.grunt\grunt-contrib-jasmine\require.js:26 h &gt;&gt; ..\..\C:\Tests\jasmine\.grunt\grunt-contrib-jasmine\require.js:31 &gt;&gt; ..\..\C:\Tests\jasmine\node_modules\glob\examples\g.js:1 &gt;&gt; Error: notloaded: Module name "../" has not been loaded yet for context: _. Use require([]) &gt;&gt; http://requirejs.org/docs/errors.html#notloaded at &gt;&gt; ..\..\C:\Tests\jasmine\_SpecRunner.html:21 &gt;&gt; ..\..\C:\Tests\jasmine\.grunt\grunt-contrib-jasmine\require.js:12 v &gt;&gt; ..\..\C:\Tests\jasmine\.grunt\grunt-contrib-jasmine\require.js:26 h &gt;&gt; ..\..\C:\Tests\jasmine\.grunt\grunt-contrib-jasmine\require.js:31 &gt;&gt; ..\..\C:\Tests\jasmine\node_modules\glob\examples\usr-local.js:1 &gt;&gt; ReferenceError: Can't find variable: module at &gt;&gt; ..\..\C:\Tests\jasmine\node_modules\glob\glob.js:37 &gt;&gt; Error caught from PhantomJS. More info can be found by opening the Spec Runner in a browser. Warning: SyntaxError: Parse error Use --force to continue. Aborted due to warnings. I can't figure out what I'm doing wrong. The code for this project can be found here. My file structure looks like this: /jasmine /node_modules /shared /modules myModule.js /tests /unit myModule.tests.js /tasks /options jasmine.js protractor.js test_task.js _SpecRunner.html gruntfile.js package.json My package.json file looks like this: { "name": "MyApp", "version": "1.0.0", "dependencies": { "async": "~0.9.0", "glob":"~4.0.…
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/38121300
type: QuestionComment
score: 0
has text: Actually, I am not using a specific height and width for the SVG element. I set the SVG width and height attributes to equal `document.getElementById('pie-chart').offsetWidth`. If you resize the window below about 600 pixels and refresh, you'll see that the SVG changes size. (In the future, I plan to have the SVG automatically resize on window resizes, but I haven't gotten to it yet.)
comment on: http://stackoverflow.com/q/24602998
type: Comment

http://stackoverflow.com/comment/38317340
comment on: http://stackoverflow.com/q/24707253
has text: possible duplicate of [Simple javascript date math... not really](http://stackoverflow.com/questions/6356164/simple-javascript-date-math-not-really)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24744893
has comment: http://stackoverflow.com/comment/38402686
has comment: http://stackoverflow.com/comment/38401159
has body: Maybe usage of element.find('#id') will help: link: function(scope, element, attrs) { var item = element.find('#somechartid'); scope.chart = c3.generate({ bindto: item, data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250], ['data2', 50, 20, 10, 40, 15, 25] ] } }); }
has comment: http://stackoverflow.com/comment/38417822
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24744311

http://stackoverflow.com/comment/38179788
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24632914
score: 0
has text: @Mritunjay - which section of code? The trouble code is the first bit of code with 127.0.0.2

http://stackoverflow.com/q/24602021
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: The Bootstrap input form isn't centring even though I have it setup to be. Here's what it looks like: Form Not Centering: Proper Form The red is the problem and the green is what I want. Here is the code. CSS: .form-control { height: 50px; width: 330px; padding-left: 5px; font-size: 20px; font-family: 'Lato', sans-serif; } HTML: Enter email address Early Access All help would be amazing, thank you.
accepted answer: http://stackoverflow.com/a/24602053
possible better answer: http://stackoverflow.com/a/24602246
score: 0
has answer: http://stackoverflow.com/a/24602246
tagged with: http://stackoverflow.com/tag/html
has title: Bootstrap / CSS Input Form not centring
tagged with: twitter-bootstrap
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24602053

http://stackoverflow.com/q/24594606
tagged with: event-handling
tagged with: jquery
tagged with: ajax
type: Question
has answer: http://stackoverflow.com/a/24594647
has comment: http://stackoverflow.com/comment/38104273
score: 0
answer count: 1
has title: disable all click events till ajax request is completed
has comment: http://stackoverflow.com/comment/38104220
has comment: http://stackoverflow.com/comment/38104204
tagged with: javascript
type: UnansweredQuestion
has body: So I have a listing page something like this: //start loop <div id ='row-prd-<number>'> product Name <a href='#' id='edit-prd-<number>'>Edit <a href='#' id='delete-prd-<number>'>Delete //end loop In my javascript, I do something like: $('#delete-prd-<number>').click() { //change style of the row to show its being deleted.. $('row-prd-<number>').addClass('deleting'); //make ajax call to delete ajaxDeleteRecord(prd-<number>); } Now, this works fine. My concern is that in a lower connection speed scenario, the delete ajax call takes a few seconds to complete. I am concerned about what happens if the user clicks on an edit or delete button of another record. So I have three questions: 1. Should I disable all click events on the page until the ajax call returns? To me this does not seem like a good option - suppose the ajax call errored out...in that case the user now is in a state where s/he cannot click on anything in the page anymore! 2. How then should I handle this? ...I am kinda just lost as to what to do. I guess this is the most important of the three questions I have. 1. If I had to disable and re-enable clicks on the elements on the page (edit/delete/new) is there an easy way to do it? ...just curious...

http://stackoverflow.com/q/24648072
has answer: http://stackoverflow.com/a/24648258
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/24648232
score: -2
has comment: http://stackoverflow.com/comment/38206532
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38206345
has comment: http://stackoverflow.com/comment/38206364
has body: I am having the a string Posted here. I would like to convert this string to json string. But i got the error message 'undefine' Please help me to do this. data = JSON.parse('{ name: "CHE-TELUGU", value: 123, y: 10.8 },{ name: "CHE-CORPORATE", value: 45, y: 40.8 },{name: "CHE-MALAYALAM",value: 155,y: 12.8,sliced: true,selected: true},{ name: "CHE-OPERATION", value: 20, y: 60.8 },{ name: "TRY-OPERATION", value: 20, y: 60.8 } '); alert(data);
type: UnansweredQuestion
has title: Convert string to json got undefined error
upvote count: 0
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/q/24668986
has comment: http://stackoverflow.com/comment/38244921
has comment: http://stackoverflow.com/comment/38244956
has comment: http://stackoverflow.com/comment/38246386
has body: So I have 2 columns filled with images. I want to drag an image from the left column and drop it on the right column's image. The original image on the left must then have it's display set to none so that it disappears. Here is an example of the html: Name: Jane Doe Profession: Carpenter Name: Unspecified Profession: Unspecified </div Here is some of the Javascript I've tried - it's probably best not to look as it as it simply doesn't work. I can use jquery if it's necessary. document.getElementsByClassName('info2')[0].drop = function() { document.getElementsByClassName('myimg2')[0].src = storeOnClick; document.getElementsByClassName('myname2')[0].innerHTML=name; document.getElementsByClassName('myprof2')[0].innerHTML=prof; updateRecord(); return; } function updateRecord(div){ div.parentNode.parentNode.parentNode.style.display='none'; } function returnDrop(el){ if(el=="file:///C:/Users/nmonk/Desktop/Tree/Pictures/QuestionMark.png"){ } else if(el=="file:///C:/Users/nmonk/Desktop/Tree/Pictures/Smiley.png"){ updateRecord1(el); } else if(el=="file:///C:/Users/nmonk/Desktop/Tree/Pictures/Smiley2.png"){ updateRecord2(el); } else if(el=="file:///C:/Users/nmonk/Desktop/Tree/Pictures/Smiley3.png"){ updateRecord3(el); } else if(el=="file:///C:/Users/nmonk/Desktop/Tree/Pictures/Smiley4.png"){ updateRecord4(el); } else if(el=="file:///C:/Users/nmonk/Desktop/Tree/Pictures/Smiley5.png"){ updateRecord5(el); } } function allowDrop(ev) { ev.preventDefault(); } Necessary but unrelated to the issue: function start(){ first(); } function first () { var _divs = document.querySelectorAll('.info1'); for (var i = 0; i < _divs.length; i++) { _divs[i].addEventListener("mousedown", function () { changeInfo1(this) }, false); } } function changeInfo1(el) { myimg = el.querySelector('.myimg'), myname = el.querySelector('.myname'), myprof = el.querySelector('.myprof') // img storeOnClick = myimg.src; // name name = myname.innerHTML; // profession prof = myprof.innerHTML; }
upvote count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/24669881
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has title: Display image as none on drop event
tagged with: drag-and-drop
type: Question
has answer: http://stackoverflow.com/a/24669881
answer count: 1

http://stackoverflow.com/comment/38272003
score: 3
comment on: http://stackoverflow.com/q/24683257
has text: Its because you aren't invoking `get_strings()`. There are a lot of things in your code that are outright against best practices. What are you trying to achieve exactly?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24610046
type: Answer
has body: Im using like this and it works response.setHeader('Content-Type', 'application/json'); response.setHeader('Access-Control-Allow-Origin', '*'); response.setHeader('Access-Control-Allow-Headers', '*'); response.setHeader('Access-Control-Allow-Credentials', 'true'); response.setHeader('X-SERVED-BY', 'Site Name'); try put *
has comment: http://stackoverflow.com/comment/38140852
score: 0
answers question: http://stackoverflow.com/q/24609526

http://stackoverflow.com/q/24687506
has body: I need your help! I have fiddle and what I want is multiplicate two td's values and the result go to the next td. $(document).ready(function(){ $( "input[id^='unitval']" ).keyup(function() { var input_value = parseFloat($(this).val()); var Cant = $("#item_Cant").text(); var totval = (input_value * Cant); if (!isNaN(input_value)) { // the input is a number //$("#totval1").val(totval); // update second field $(this).closest('td').next().find('input').val(totval); } else { // the input wasn't a number $("#totval1").val("not a number?"); // show an error mesage } }); }); But just works with the first row because the second one still multiplicating with the td of first row not the actual td I tried to change the: var Cant = $("#item_Cant").text(); with var Cant = $("input[id^='item_Cant']").text(); But don't works, I have not idea why, even first row. But in this line I need the correct Jquery for get the last td input value in the same tr. I tried many lines but without success, hope you can understand me. Thanks for your help.
has answer: http://stackoverflow.com/a/24687567
possible better answer: http://stackoverflow.com/a/24687606
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38280002
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24687567
has comment: http://stackoverflow.com/comment/38280416
type: Question
answer count: 2
has title: Can't get the value of closest prev td input
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24687606
score: 0

http://stackoverflow.com/comment/38200201
comment on: http://stackoverflow.com/q/24629603
type: Comment
type: QuestionComment
has text: @duncan: Marker array is a array of of all 5 locations, loop is iterating five time, alert() for status not displaying popup. Yes, I get all locations in marker array
score: 0

http://stackoverflow.com/comment/38272825
has text: @YanBrunet Tried this it is giving me undefined function ConfirmStatus(ddl) { var x = confirm("Are you sure you want to update the status?"); var control = 'MainContent_BelowMenuContent_TransactionGrid_inpHide'; if (x == true) { document.getElementById(control).value = true; return 1; } else { alert($('#hiddenOriginalStatus').val()); (ddl).val("PENDING"); document.getElementById(control).value = false; return 0; } }
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24683173

http://stackoverflow.com/a/24628125
type: Answer
has body: Save index of question in a variable and increment it whenever #next is clicked. Write this: $(function () { var count = 0, len = allQuestions.length; $('#next').click(function () { if (count &lt; len - 1) { count++; $('#question').text(allQuestions[count].question); } else { $(this).remove(); }); }); fiddle
score: 1
accepted answer of: http://stackoverflow.com/q/24627946
answers question: http://stackoverflow.com/q/24627946
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24665860
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24666002
has comment: http://stackoverflow.com/comment/38240512
has comment: http://stackoverflow.com/comment/38240527
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/38240205
has title: Wordpress pagination links click and change to "active" but don't redirect
has comment: http://stackoverflow.com/comment/38240120
has comment: http://stackoverflow.com/comment/38240063
has answer: http://stackoverflow.com/a/24666002
type: AnsweredQuestion
has body: I've searched through many similar pagination issues and have not found a solution to this exact problem. Pagination seems to be working perfectly, links are generated properly and pages are physically generated appropriately, though the nav links do not click through properly. I've checked the generated html for the links (Which display correctly like this: ) 1 2 3 4 5 URL: http://bscserver.com/bsg/blog/ Though when clicked, a nav element will successfully change to the "current" state / class, though the href redirect does not action. 1 2 3 4 5 URL: STILL http://bscserver.com/bsg/blog/ even though the clicked element has href="http://bscserver.com/bsg?paged=2/ Any idea what may be causing my links not to click through? Thanks. Javascript that seems to be associated: jQuery('.ast_pagenav a').each(function(){ <?php if(is_category() || is_search() || is_author()) { ?> this.href = this.href.replace('/page/', '&paged='); <?php }else{ ?> this.href = this.href.replace('/page/', '?paged='); <?php } ?> }); jQuery('.ast_pagenav a').on('click', function(e) { jQuery('.ast_pagenav a, span.page-numbers').removeClass('current'); // remove if already existant jQuery(this).addClass('current'); e.preventDefault(); <?php wp_reset_query(); $template = get_post_meta( get_the_ID(), '_wp_page_template', true ); The entire extract seems to be quite bulky though I think this is the relevant part.
has comment: http://stackoverflow.com/comment/38240248
score: 0
tagged with: pagination
tagged with: wordpress
has comment: http://stackoverflow.com/comment/38240611
type: Question
has comment: http://stackoverflow.com/comment/38240040
has comment: http://stackoverflow.com/comment/38240082

http://stackoverflow.com/a/24683265
type: AcceptedAnswer
has body: As long as you are on the same domain as your parent, you can use parent. Add to the documents having iframes: $(function() { // Check if you are in an iframe, otherwise parent == self, // and the next check will always return true. function inIframe () { try { return window.self !== window.top; } catch (e) { return true; } } // Check if parent.url == self.url. function sameAsParent() { try { return parent.window.document.location.toString() === window.document.location.toString()); } catch (e) { return false; } } if (inIframe() &amp;&amp; sameAsParent()) { // You are being loaded by yourself! Redirect! window.location.href = 'http://some-redirect-url.com' } });
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24683264
answers question: http://stackoverflow.com/q/24683264

http://stackoverflow.com/comment/38263848
type: AnswerComment
has text: @Chun Use the Facebook API as shown in [this answer](http://stackoverflow.com/a/8889289/1234256).
type: Comment
comment on: http://stackoverflow.com/a/24638300
score: 0

http://stackoverflow.com/a/27640894
has comment: http://stackoverflow.com/comment/128945929
has comment: http://stackoverflow.com/comment/128946423
type: Answer
answers question: http://stackoverflow.com/q/24636602
has body: set the pointer-events attribute on the element to all (or some other suitable value for you) pointer-events="all" This will make mouseover work regardless of the fill.
upvote count: 15
downvote count: 0
score: 15

http://stackoverflow.com/q/24660517
downvote count: 1
possible better answer: http://stackoverflow.com/a/24660682
type: Question
accepted answer: http://stackoverflow.com/a/24660667
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/24660667
score: 0
has answer: http://stackoverflow.com/a/24660682
favorite count: 0
tagged with: d3.js
has title: How to create a 3D bar chart
tagged with: css
type: AnsweredQuestion
has body: I'm trying to recreate the image below. It's supposed to be a 3D bar chart, I will have to feed it dynamic data and make sure the bars rise to the correct percentages. Forget about the shadings I can use solid colors but my hope is to be able to show animated transitions as the chart values change. As you can see the bars are lined up vertically and have an angle to them, there will be a div with content on its left side. I don't know where to start! What would be a good approach to this project? I heard some good things about D3.js but I'm wondering if there's a simpler CSS3 approach I can take. Any ideas?
upvote count: 1

http://stackoverflow.com/q/24678729
possible better answer: http://stackoverflow.com/a/24678887
has answer: http://stackoverflow.com/a/24678887
accepted answer: http://stackoverflow.com/a/24678992
answer count: 2
tagged with: jquery
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 2
score: 1
downvote count: 1
type: Question
has body: Attempting to show a textarea in Angular based on whether or not a preview variable is true. After preview is set to true I'd like to set focus to the textarea as well. Controller Logic .controller('MyCtrl', ['$scope', function ($scope) { $scope.preview = false; $scope.showPreview = function() { $scope.preview = true; } }]) Directive Logic .directive('previewFocus', function() { return function(scope, element, attrs) { scope.$watch('preview', function (newValue) { newValue && element[0].focus(); },true); }; }); Then I have a div that when clicked, it will fire off the showPreview() method: Add Post And a textarea with the preview-focus directive: I've debugged the code and everything executes as expected, including the callback on the scope.$watch function. However, the textarea does not take focus. If I don't use the ngShow directive, the focus works fine. Below are two JSFiddle examples to show both cases. Focus does not work: JSFiddle with ngShow Focus works fine: JSFiddle without ngShow Does anyone know of a good way to use ngShow and focus the element being showed at the same time?
has answer: http://stackoverflow.com/a/24678992
tagged with: javascript
has title: AngularJS ngShow and focus

http://stackoverflow.com/q/24710761
has comment: http://stackoverflow.com/comment/38324350
type: Question
has comment: http://stackoverflow.com/comment/38324272
tagged with: conditional-statements
has title: Conditions in javascript with button
has answer: http://stackoverflow.com/a/24710922
tagged with: if-statement
score: -1
has answer: http://stackoverflow.com/a/24711054
has comment: http://stackoverflow.com/comment/38324219
has answer: http://stackoverflow.com/a/24711029
tagged with: button
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38324240
tagged with: click
favorite count: 0
has answer: http://stackoverflow.com/a/24711048
answer count: 5
has comment: http://stackoverflow.com/comment/38324345
upvote count: 0
has body: I have two buttons in javascript and I need a condition that checks which button was pressed. I have seen some examples online but it does not work. Does anyone know kindly help me and correct me? if(sx.clicked == true){ // dx.style.backgroundColor = colori[random]; alert("sx"); } if(dx.clicked == true){ alert("dx"); }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24711013

http://stackoverflow.com/q/24726192
answer count: 1
has answer: http://stackoverflow.com/a/24727065
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/38355038
type: AnsweredQuestion
tagged with: underscore.js
has title: Underscore template does not load the Model.id, on printing the <% console.log(Model.id) %> it comes as undefined
accepted answer: http://stackoverflow.com/a/24727065
has body: the expense.id prints as undefined in the log My Underscore template <% _.each(expenses, function(expense) { %> <%= expense.get('name') %> <%= expense.get('amount') %> <%= expense.get('category') %> <% console.log(expense.id) %> <% }); %> My Backbone View var ExpenseList = Backbone.View.extend({ el: '.page', render : function(){ var expenses = new Expenses(); var that = this; expenses.fetch({ success : function(expenses){ var template = _.template($('#expense-list-template').html(), {expenses: expenses.models}); that.$el.html(template); } }); } }); Server Response [ { "_id": "53c25827555953000091ab71", "name": "Shell", "amount": "$1000", "category": "Internet" }, { "_id": "53c2bfee4bf93700006fb714", "name": "FC", "amount": "$432", "category": "Game" } ]
type: Question
has comment: http://stackoverflow.com/comment/38355276
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38355199

http://stackoverflow.com/comment/115939504
type: QuestionComment
has text: Does this answer your question: [Prevent HTML5 video from being downloaded (right-click saved)?](https://stackoverflow.com/questions/9756837/prevent-html5-video-from-being-downloaded-right-click-saved)
comment on: http://stackoverflow.com/q/24635652
score: 0
type: Comment

http://stackoverflow.com/q/24606998
has answer: http://stackoverflow.com/a/24607160
has body: I'm building a HTML5 software that records a voice and when playing that voice a visualizer should be in action. Here is my code: // variables var leftchannel = []; var rightchannel = []; var recorder = null; var recording = false; var recordingLength = 0; var volume = null; var audioInput = null; var sampleRate = 44100; var audioContext = null; var context = null; var outputString; if (!navigator.getUserMedia) navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; if (navigator.getUserMedia) { navigator.getUserMedia({ audio: true }, success, function (e) { alert('Error capturing audio.'); }); } else alert('getUserMedia not supported in this browser.'); // when pressing record function getVal(value) { // if R is pressed, we start recording if (value == "record") { recording = true; // reset the buffers for the new recording leftchannel.length = rightchannel.length = 0; recordingLength = 0; document.getElementById('output').innerHTML = "Recording now..."; // if S is pressed, we stop the recording and package the WAV file } else if (value == "stop") { // we stop recording recording = false; document.getElementById('output').innerHTML = "Building wav file..."; // we flat the left and right channels down var leftBuffer = mergeBuffers(leftchannel, recordingLength); var rightBuffer = mergeBuffers(rightchannel, recordingLength); // we interleave both channels together var interleaved = interleave(leftBuffer, rightBuffer); var buffer = new ArrayBuffer(44 + interleaved.length * 2); var view = new DataView(buffer); // RIFF chunk descriptor writeUTFBytes(view, 0, 'RIFF'); view.setUint32(4, 44 + interleaved.length * 2, true); writeUTFBytes(view, 8, 'WAVE'); // FMT sub-chunk writeUTFBytes(view, 12, 'fmt '); view.setUint32(16, 16, true); view.setUint16(20, 1, true); // stereo (2 channels) view.setUint16(22, 2, true); view.setUint32(24, sampleRate, true); view.setUint32(28, sampleRate * 4, true); vi…
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38127902
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24607160
tagged with: web-audio-api
has title: htl5 voice recording with isualization
tagged with: html5-audio
type: AnsweredQuestion

http://stackoverflow.com/comment/38325636
type: Comment
comment on: http://stackoverflow.com/a/24709852
score: 0
type: AnswerComment
has text: on data, fill what you wanto to send on run.php file. Else remove that part.

http://stackoverflow.com/a/24632366
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38278565
has comment: http://stackoverflow.com/comment/38244261
downvote count: 0
has body: You can use this: $('ul#nav li a').click(function() { var page = $(this).attr('href'); // outputs = about.html $('#content').load(page + ' #content'); // &lt;- targets the html page's div return false; }); But my suggestion is to use a different id for parent page div something like #pageContent so that in the markup there would be just one #content div: $('ul#nav li a').click(function() { var page = $(this).attr('href'); // outputs = about.html $('#pageContent').load(page + ' #content'); // &lt;- targets the html page's div return false; });
answers question: http://stackoverflow.com/q/24631955
type: Answer
has comment: http://stackoverflow.com/comment/38237403

http://stackoverflow.com/q/24662110
favorite count: 0
has answer: http://stackoverflow.com/a/24663381
has comment: http://stackoverflow.com/comment/38234278
has comment: http://stackoverflow.com/comment/38233186
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38233493
has comment: http://stackoverflow.com/comment/38233615
has answer: http://stackoverflow.com/a/24662246
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38233549
upvote count: 2
linked to: http://stackoverflow.com/q/4079280
has comment: http://stackoverflow.com/comment/38232804
has comment: http://stackoverflow.com/comment/38233772
has comment: http://stackoverflow.com/comment/38233028
accepted answer: http://stackoverflow.com/a/24663381
possible better answer: http://stackoverflow.com/a/24662246
type: Question
has title: How to get handle of current browser tab
answer count: 2
has comment: http://stackoverflow.com/comment/38232744
downvote count: 0
has body: In my Home page, I have one anchor link pointing to a page that I open in new tab. Now this page has a link pointing back to my Home page. So my question is how to target the Home page in its existing tab? So lets say I have Home page as Home.html with link as PageA.html set as follows - Page-A This allows me to always open PageA in existing tab if already opened. Now I want to open Home page from this page, so how to set the anchor tag so that it opens the Home page in the already opened tab of Home.html? So basically user can click a link to open its page in a new tab if it doesn't already exists, but should open the existing tab if it exists. So in the above scenario, max of 2 tabs should be open. This is a requirement for our web portal. Thanks a lot. [Edited post to simplify problem with just 2 pages]
has comment: http://stackoverflow.com/comment/38233329
tagged with: javascript
has comment: http://stackoverflow.com/comment/38234402

selenium-webdriver
tags question: http://stackoverflow.com/q/24668199
tags question: http://stackoverflow.com/q/24620975
tags question: http://stackoverflow.com/q/24651274
tags question: http://stackoverflow.com/q/24615079
tags question: http://stackoverflow.com/q/24742539
tags question: http://stackoverflow.com/q/24651231
tags question: http://stackoverflow.com/q/24614980
tags question: http://stackoverflow.com/q/24619156
tag name: selenium-webdriver
tags question: http://stackoverflow.com/q/24609327
type: Tag
tags question: http://stackoverflow.com/q/24619918

http://stackoverflow.com/comment/38225743
score: 1
has text: @Justcode you should add that as an answer.
comment on: http://stackoverflow.com/q/24658317
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24689188
has body: You install browserify $ npm install -g browserify you take your my_public_file.js whatever node code etc. var lib_public_code = require('some_file.js') var MyModule = function () { this.attribute = 666 } module.exports = MyModule you run the magic $ browserify my_public_file.js -o bundled_public.js then it works in the browser and the required files are all there. &lt;script src="bundled_public.js"&gt;
has comment: http://stackoverflow.com/comment/38290432
has comment: http://stackoverflow.com/comment/84822079
answers question: http://stackoverflow.com/q/24685154
upvote count: 2
has comment: http://stackoverflow.com/comment/38312354
type: Answer
score: 1
downvote count: 1

http://stackoverflow.com/a/24699429
score: 3
upvote count: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24699245
has body: you need to capture the $compileProvider and then use the directive method instead of using the moduleObj.directive method var dirs = angular.module('dirs', []); dirs.config(function($compileProvider){ dirs.compileProvider = $compileProvider; }); then when you need to dynamically include the new directive creator.addDirective = function(config) { dirs.compileProvider.directive(config.name, function() { return { restrict: config.restrict, template: config.template, replace: config.replace, } }); //insert element with the directive above into DOM on this event and compile $rootScope.$broadcast('directive.added'); } This is lazy loading, Here is an article that I found helpful in doing such things
answers question: http://stackoverflow.com/q/24699245
type: Answer

http://stackoverflow.com/a/78121680
answers question: http://stackoverflow.com/q/24664494
type: Answer
has body: Here´s the Answer for BS5: You initialize the Modal like it is descripted here let myModal = new bootsrap.Modal('#myModalId', {}) Now you can just hide it over a simple function. myModal.hide()
score: 0

http://stackoverflow.com/q/24670968
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38248734
has title: adding search option to the select list
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38248618
has answer: http://stackoverflow.com/a/24671114
accepted answer: http://stackoverflow.com/a/24671114
type: Question
tagged with: javascript
has body: I have two multiselect lists that can interchange the list values with each other by clicking them. I tried to add search functionality to the filled list (select-list) which works fine until the move I click a list element. even though the value is removed from the list still the search option adds that moved element in it. Check the demo(http://jsfiddle.net/cs6Xb/99/). //code is: //html- Frederiksberg Vanløse Glostrup Brøndby Roskilde Køge Gentofte Hillerød Tårnby Vallensbæk //jquery: $(function() { var opts = $('#optlist option').map(function(){ return this.value, $(this).text(); }); $('#someinput').keyup(function(){ var rxp = new RegExp($('#someinput').val(), 'i'); var optlist = $('#optlist').empty(); opts.each(function(){ if (rxp.test(this[1])) { optlist.append($(' ').attr('value', this[0]).text(this[1])); } }); }); $('.select-cities').click(function () { $('.select-cities option:selected').remove().appendTo('.chosen-cities');}); $('.chosen-cities').click(function () { $('.chosen-cities option:selected').remove().appendTo('.select-cities'); }); }); I

http://stackoverflow.com/comment/38230020
comment on: http://stackoverflow.com/q/24659531
score: 0
type: Comment
type: QuestionComment
has text: And please do not misunderstand me, I am not disagreeing with you. I just don't understand.

http://stackoverflow.com/comment/38224961
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24657768
score: 0
has text: Would you mind showing the entire code wrapped (again it is literally my first day with Jquery)

http://stackoverflow.com/a/24598440
has comment: http://stackoverflow.com/comment/38111489
downvote count: 0
has comment: http://stackoverflow.com/comment/38111528
has comment: http://stackoverflow.com/comment/38111307
has body: You need complete tags when you wrap any html in a method argument. You can't treat the DOM like a text editor and append a start tag, append some more tags and then append the end tag. Anything insterted into the DOM has to be complete and valid html. You are also not understanding the context of what is returned from append(). It is not the element(s) within the arguments it is the element collection you are appending to. You are calling button() on the whole &lt;UL&gt;. I suggest you get a better understanding of jQuery before trying to chain so many methods together
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38111394
has comment: http://stackoverflow.com/comment/38111485
answers question: http://stackoverflow.com/q/24598347

http://stackoverflow.com/a/24666999
answers question: http://stackoverflow.com/q/24666974
has body: use this : var x = document.getElementById("fruits").value; EDIT: document.getElementById returns a javascript DOM element object. If you desire to access any attribute like id,class,value etc. you have to access using "." operator like for class it is document.getElementById("fruits").class Similarly to get the value of an element(in this case the element is input so it has value attribute), you must use document.getElementById("fruits").value
downvote count: 0
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38243495

http://stackoverflow.com/q/24736181
has comment: http://stackoverflow.com/comment/38373060
has comment: http://stackoverflow.com/comment/38373837
has answer: http://stackoverflow.com/a/24736403
has answer: http://stackoverflow.com/a/24736294
has comment: http://stackoverflow.com/comment/38372908
has answer: http://stackoverflow.com/a/24736272
has comment: http://stackoverflow.com/comment/38373228
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24736256
has comment: http://stackoverflow.com/comment/38372928
score: 0
has body: I have a problem when i try to grab the value from a div in my html string. Maybe someone here could find the problem for me. I have tried a lot of different ways to take the data out. Solutions that works for others don't work for me at all. So i think i am doing something seriously wrong $(document).ready(function () { var id = 1; function updateMsg() { $.ajax({ url: "/opt/history/update?current=" + 1, cache: false, success: function (html) { id = $(html).find('#last').html(); console.log('ID: ' + id); $("#result").html(html); } }); setTimeout(updateMsg, 5000); } updateMsg(); }); This is how the div looks like 2 There is a bunch of html code before this div. This div will always be at the bottom of the html string. Update: The thing is. I need to transport the value of a id in this html string but not show it visually. If you have a better way that i should look at. The HTML output on success 2014-07-08 14:35:47.456 123 321 Has data Info 28
possible better answer: http://stackoverflow.com/a/24736272
type: Question
has comment: http://stackoverflow.com/comment/38373337
has comment: http://stackoverflow.com/comment/38373250
has comment: http://stackoverflow.com/comment/38372794
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38372882
accepted answer: http://stackoverflow.com/a/24736256
tagged with: ajax
has title: Get value from div in a html string with jquery and ajax
has comment: http://stackoverflow.com/comment/38373897
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38372749
answer count: 4

http://stackoverflow.com/a/24618487
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38151681
has comment: http://stackoverflow.com/comment/38151241
has comment: http://stackoverflow.com/comment/38152395
has comment: http://stackoverflow.com/comment/38152569
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/24618038
upvote count: 1
has comment: http://stackoverflow.com/comment/38151134
answers question: http://stackoverflow.com/q/24618038
has body: I'd first check whether your mail() command works at all. I'm going to wager it doesn't. If it doesn't, the form itself is not a factor - you'll need to see whether postfix/something else is installed on your new server.
has comment: http://stackoverflow.com/comment/38153686

http://stackoverflow.com/comment/38175734
has text: Review your About.html code. You cant repeat tags. Clean HTML code from your About.html (you are appeding a partial HTML code not a whole HTML page).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24631955
score: 0

http://stackoverflow.com/a/24622426
has body: Try changing datatype from json to JSON.
type: Answer
answers question: http://stackoverflow.com/q/24622420
score: 0

http://stackoverflow.com/q/24632406
has answer: http://stackoverflow.com/a/24633089
favorite count: 0
tagged with: ajax
has title: Typeahead.js Basic With MySQL DB
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/24633089
tagged with: php
has body: I am following a tutorial online (http://mycodde.blogspot.co.uk/2013/12/typeaheadjs-autocomplete-tutorial-ajax.html#comment-form) which invloves typeahead.js and a simple MySQL DB and I cannot get it to work. Using typeahead.js v10.2 jQuery v1.9.1 and Bootstrap v3.2.0 I have included the necessary css and js files, I have also created a connection.php file, which successfully connects to my localhost db. The problem is that the auto-suggest box doesn't auto-suggest anything. I am possibly doing something silly as I am new to js and programming. I have included my files below if anybody would be kind enough to point me in the right direction I would appreciate it. index.php Typeahead.js Tutorial with Mysql Database connection.php <?php $con=mysqli_connect("localhost","myuser","mypassword","mydb"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT first_name,last_name FROM actor"); while($row = $result->fetch_object()){ $user_arr[] = $row->first_name; $user_arr2[] = $row->last_name; } mysqli_close($con); ?> When I check the firebug console I get an Uncaught TypeError: undefined is not a function appears at line 22 which is; $("#search").typeahead({ Can anybody lend some assistance? Thanks
answer count: 2
tagged with: mysql
possible better answer: http://stackoverflow.com/a/29179255
tagged with: javascript
has answer: http://stackoverflow.com/a/29179255
tagged with: typeahead.js
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/38348408
type: QuestionComment
comment on: http://stackoverflow.com/q/24723463
score: 1
type: Comment
has text: frame and frameset are not supported in html5. there are other ways of doing what you want to achieve.

http://stackoverflow.com/a/24625644
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24625254
has body: Here is a fiddle with a possible solution. http://jsfiddle.net/YF49U/ This is using the kendo button demo as a template and then just hooking your code onto the first primary button. You will notice that I changed the lines: kButton.element[0].innerText = to kButton.element[0].innerHTML =
answers question: http://stackoverflow.com/q/24625254
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/24672190
has answer: http://stackoverflow.com/a/24673271
accepted answer: http://stackoverflow.com/a/24673271
tagged with: google-chrome-extension
type: AnsweredQuestion
downvote count: 0
score: 7
tagged with: google-chrome
has answer: http://stackoverflow.com/a/24672525
type: Question
tagged with: javascript
has title: Can we download a webpage completely with chrome.downloads.download? (Google Chrome Extension)
answer count: 2
upvote count: 7
has body: I want to save a wabpage completely from my Google Chrome extension. I added "downloads", "&lt;all_urls&gt;" permissions and confirmed that the following code save the Google page to google.html. chrome.downloads.download( { url: "http://www.google.com", filename: "google.html" }, function (x) { console.log(x); }) However, this code only saves the html file. Stylesheets, scripts and images are not be saved. I want to save the webpage completely, as if I save the page with the dialog, selecting Format: Webpage, Complete. I looked into the document but I couldn't find a way. So my question is: how can I download a webpage completely from an extension using the api(s) of Google Chrome?
possible better answer: http://stackoverflow.com/a/24672525
favorite count: 0

http://stackoverflow.com/q/24699683
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/24699983
type: UnansweredQuestion
has body: I use the jquery plugin Tokeninput that allow autocomplete in textBox. I would prevent user from selecting duplicate words inn the dropdown of autocomplete. Does anybody have any suggestion to resolve this problem? Thanks a lot in advance.
has title: Problems with the jquery plugin Tokeninput
type: Question
tagged with: autocomplete
tagged with: jquery-tokeninput

http://stackoverflow.com/a/24590103
has comment: http://stackoverflow.com/comment/38095624
accepted answer of: http://stackoverflow.com/q/24589969
answers question: http://stackoverflow.com/q/24589969
type: Answer
has comment: http://stackoverflow.com/comment/38095980
upvote count: 2
has body: Commenting on your approaches in order: JavaScript — Attempting to Target a Single Entry (Working) This one is working (as you say). You can use similar techniques to get at ALL elements in the array of id-s: $(targets[0]).addClass('hide').removeClass('show'); $(targets.join(",")).addClass('hide').removeClass('show'); However the common way is to add a class attribute rather than an id. After all - remember - that's what classes are for. Any DOM element can (and usually does) have a multitude of classes. 1 2 The above two lines become equivalent to: // These two lines are each equivalent to $(target[0]) $(".number").eq(0).addClass('hide').removeClass('show'); // or even... $(".number")[0].addClass('hide').removeClass('show'); // This is equivalent to $(target.join(",")) $(".number").addClass('hide').removeClass('show'); JavaScript - Attempting to Target All Entries I The .each function can only be called on jQuery objects. You can't use it on an array, but you can use $.each instead: $.each(targets, function(idx, obj) { $(obj).addClass('hide').removeClass('show'); }); JavaScript - Attempting to Target All Entries II When using forEach, you need to (ok, not need to, but at least should) make use of the parameters passed to your callback: targets.forEach(function(elt, idx, arr) { $(elt).addClass('hide').removeClass('show'); // ... OR ... $(arr[idx]).addClass('hide').removeClass('show'); // ... OR ... $(targets[idx]).addClass('hide').removeClass('show'); }); JavaScript - Attempting to Target All Entries III $(targets) selects nothing. It doesn't throw an error (though it probably ought to). You access array elements with the [index] notation: for (var i = 0; i < targets.length; ++i ) { $(targets[i]).addClass('hide').removeClass('show'); }
downvote count: 1
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/24677854
favorite count: 0
type: Question
tagged with: azure
has answer: http://stackoverflow.com/a/25727730
tagged with: node.js
has title: createBlockBlob and commitBlobBlocks create empty files in BlobStorage
has body: I'm developing a web app that can upload large file into the Azure Blob Storage. As a backend, I am using Windows Azure Mobile Services (the web app will generate contents for mobile devices) in nodeJS. My client can successfully send chunks of data to the backend, everything looks fine but, at the end, the uploaded file is empty. The data upload has been prepared by following this tutorial: it works perfectly when the file is small enough to be uploaded in a single requests. The process fails when the file needs to be broken in chunks. It uses the ReadableStreamBuffer from the tutorial. Can somebody help me? Here the code: Back-end : createBlobBlockFromStream [...] //Get references var azure = require('azure'); var qs = require('querystring'); var appSettings = require('mobileservice-config').appSettings; var accountName = appSettings.STORAGE_NAME; var accountKey = appSettings.STORAGE_KEY; var host = accountName + '.blob.core.windows.net'; var container = "zips"; //console.log(request.body); var blobName = request.body.file; var blobExt = request.body.ext; var blockId = request.body.blockId; var data = new Buffer(request.body.data, "base64"); var stream = new ReadableStreamBuffer(data); var streamLen = stream.size(); var blobFull = blobName+"."+blobExt; console.log("BlobFull: "+blobFull+"; id: "+blockId+"; len: "+streamLen+"; "+stream); var blobService = azure.createBlobService(accountName, accountKey, host); //console.log("blockId: "+blockId+"; container: "+container+";\nblobFull: "+blobFull+"streamLen: "+streamLen); blobService.createBlobBlockFromStream(blockId, container, blobFull, stream, streamLen, function(error, response){ if(error){ request.respond(statusCodes.INTERNAL_SERVER_ERROR, error); } else { request.respond(statusCodes.OK, {message : "block created"}); } }); [...] Back-end: commitBlobBlock [...] var azure = require('azure'); var qs = require('querystring'); var appSettings = require('mobileservice-config').appSettings; var accountName = appSettings.…
answer count: 2
upvote count: 1
tagged with: azure-blob-storage
tagged with: azure-mobile-services
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24707743
downvote count: 0
tagged with: javascript
score: 1

http://stackoverflow.com/q/24678248
tagged with: javascript
tagged with: replace
score: 0
has answer: http://stackoverflow.com/a/24678777
answer count: 1
tagged with: url
has title: Change part of url after button click
type: AnsweredQuestion
tagged with: tabs
accepted answer: http://stackoverflow.com/a/24678777
has comment: http://stackoverflow.com/comment/38366038
has body: i have following Situation: Two Categories and one list of links. Now i Need to Change a part of the URL, according to the category. Used therefore 2 Buttons, to Switch between the categories. Category A is Default. CategoryA CategoryB Type1 Type2 Type3 Inside the URL structure only the Category Part should differ, according to which button was clicked. The URL change hast to happen immediately, so I thought to do it with javascript. Tried Stuff like $('#Tab1').on ('click', function (e) { link.href.replace.... but had no luck with it. Would be nice if some could help
type: Question
has comment: http://stackoverflow.com/comment/38266696

http://stackoverflow.com/a/24684568
has body: Since this is new functionality, and I have the luxury to do so, I decided to change the back-slashes to slashes in the database. Seems to work fine. Not sure why I used back-slashes in the first place. Thanks for the feedback!
answers question: http://stackoverflow.com/q/24682680
score: 0
type: Answer

web
tags question: http://stackoverflow.com/q/24725899
tags question: http://stackoverflow.com/q/24686212
tags question: http://stackoverflow.com/q/24717739
tags question: http://stackoverflow.com/q/24727177
tags question: http://stackoverflow.com/q/24593573
tags question: http://stackoverflow.com/q/24654077
tags question: http://stackoverflow.com/q/24746930
tags question: http://stackoverflow.com/q/24628224
type: Tag
tags question: http://stackoverflow.com/q/24681994
tags question: http://stackoverflow.com/q/24744786
tags question: http://stackoverflow.com/q/24607994
tags question: http://stackoverflow.com/q/24676240
tags question: http://stackoverflow.com/q/24674433
tags question: http://stackoverflow.com/q/24681659
tags question: http://stackoverflow.com/q/24732698
tags question: http://stackoverflow.com/q/24743308
tags question: http://stackoverflow.com/q/24663417
tags question: http://stackoverflow.com/q/24658685
tags question: http://stackoverflow.com/q/24732236
tags question: http://stackoverflow.com/q/24707214
tag name: web
tags question: http://stackoverflow.com/q/24657748
tags question: http://stackoverflow.com/q/24719721
tags question: http://stackoverflow.com/q/24736820
tags question: http://stackoverflow.com/q/24678934
tags question: http://stackoverflow.com/q/24659540
tags question: http://stackoverflow.com/q/24611669
tags question: http://stackoverflow.com/q/24653273

http://stackoverflow.com/a/24607623
has comment: http://stackoverflow.com/comment/38128929
has body: Im not jstree expert, but I guess there might be a problem with calling jstree() on element, that already was jstree. So I delete and create div again with each call and it works now: http://jsfiddle.net/hy5LF/4/ Also I did few minor updates, but just very simple things: function PrintTree(nr) { var wrapper = $("&lt;div&gt;"); wrapper.insertAfter('#html1'); $('#html1').remove(); wrapper.attr('id', 'html1'); wrapper.show(); // for some reason my new element were not visible?!? // So I had to display it... var list = $("&lt;ul&gt;"); wrapper.append(list); var elements = []; switch (nr) { case '1': elements.push("Saab"); elements.push("Volvo"); elements.push("BMW"); break; case '2': elements.push("1"); elements.push("2"); elements.push("3"); break; case '3': elements.push("a"); elements.push("b"); elements.push("c"); break; } for (var i = 0; i &lt; elements.length; i++) { list.append('&lt;li&gt;' + elements[i] + '&lt;/li&gt;'); } wrapper.jstree(); } $(document).ready(function () { $("#sel").change(function () { var val = $(this).val(); PrintTree(val); }); });
type: Answer
has comment: http://stackoverflow.com/comment/38129126
has comment: http://stackoverflow.com/comment/38129084
answers question: http://stackoverflow.com/q/24607203
score: 0

http://stackoverflow.com/q/24626008
has body: I am using video.js, I am rendering video in two different browsers. Chromium : Version 31.0.1650.63 Ubuntu 13.04 and Mozilla Firefox : 26.0 I have given option of autoplay of video HTML markup and Jq code is as below. &lt;script type="text/javascript"&gt; $("video").on("ended", function(){ var vid = videojs($(this).attr("name")); vid.controlBar.hide(); vid.bigPlayButton.show(); }); $("video").on("pause", function() { var vid = videojs($(this).attr("name")); vid.bigPlayButton.show(); }); $("video").on("play", function(){ var vid = videojs($(this).attr("name")); vid.controlBar.show(); vid.bigPlayButton.hide(); }); &lt;/script&gt; While video playing ends - firefox browser shows some spinner while chromium shows rectangular box to click to re play video. Please tell why there is difference between behavior ? How we can overcome this ?
has comment: http://stackoverflow.com/comment/38168671
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38181163
downvote count: 0
has title: HTML5 Video Player - video.js - Different behaviour at the end of video play on Chromium and Mozilla Firefox
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/38166035
tagged with: javascript
has comment: http://stackoverflow.com/comment/38178674
tagged with: html5-video
has answer: http://stackoverflow.com/a/24644353
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: video.js

http://stackoverflow.com/q/24666331
tagged with: passport.js
favorite count: 0
has comment: http://stackoverflow.com/comment/38272765
upvote count: 8
has title: Is verifying whether a user is an admin based on req.user secure?
has body: I am using a simple middleware function in my express.js app to verify whether a user has admin privileges: function isAdmin (req, res, next) { if (req.user.admin) return next(); res.redirect("/"); } passport is being used for account authentication. Is this secure or can req.user.admin be injected into the request for users who are not supposed to have admin privileges? Should I first find a user and then check whether said user has admin privileges? For example: function isAdmin (req, res, next) { if (req.user) { User.findOne({ "_id" : req.user._id }, function (err, user) { if (err) { throw err; } else if (user.admin) { return next(); } else { res.redirect("/"); } }) } else { res.redirect("/"); } } To me, this seems needlessly complicated. It would also cause more database accesses. Is this necessary to verify whether a user is truly an admin or is my first function sufficient? In essence, who can view or alter req and, thereby, req.user?
has answer: http://stackoverflow.com/a/26878909
tagged with: node.js
score: 8
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26878909
tagged with: javascript
tagged with: express
linked to: http://stackoverflow.com/q/24649274
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/38336519
has text: Never use anchor as button, use span instead, on anchor you must prevent default action and that's just unessecery code. Also I don't encourage you to use inline JS because it's bad practice instead of that you could use e.g. `$('a').click(function() { Your code ... });` of course use span and give it a class to prevent function from firing on every span click ;)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24707824

http://stackoverflow.com/a/24734382
has comment: http://stackoverflow.com/comment/38462256
has comment: http://stackoverflow.com/comment/38460567
has comment: http://stackoverflow.com/comment/38415657
has comment: http://stackoverflow.com/comment/38408467
upvote count: 1
has comment: http://stackoverflow.com/comment/38419391
has comment: http://stackoverflow.com/comment/38417272
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38419885
has comment: http://stackoverflow.com/comment/38407711
has comment: http://stackoverflow.com/comment/38422432
type: Answer
has body: This is a sufficiently small problem that bruteforce works in less than a second: Python code: for pi in open('pi.txt'): pi = pi.upper() words = [word.rstrip() for word in open('wordlist.txt') if word.rstrip().upper() in pi] (pi.txt is a file containing your converted letters) To print the words in length order you can use: words.sort(key=len) for word in words: print word The longest words are: high jive life shah facie hutch
has comment: http://stackoverflow.com/comment/38400140
accepted answer of: http://stackoverflow.com/q/24730388
downvote count: 0
has comment: http://stackoverflow.com/comment/38460179
has comment: http://stackoverflow.com/comment/38460901
answers question: http://stackoverflow.com/q/24730388
has comment: http://stackoverflow.com/comment/38415817
has comment: http://stackoverflow.com/comment/38425906
has comment: http://stackoverflow.com/comment/38409002
score: 1

http://stackoverflow.com/comment/38159165
score: 0
type: Comment
has text: If you can run a JavaScript snippet from Java, you can get the contents of the page with `document.body.innerHTML` (and `document.head.innerHTML`). But I too have the same question @LeeTaylor has.
type: QuestionComment
comment on: http://stackoverflow.com/q/24622625

datatables
tags question: http://stackoverflow.com/q/24629005
tags question: http://stackoverflow.com/q/24612238
tags question: http://stackoverflow.com/q/24642456
tags question: http://stackoverflow.com/q/24731204
tags question: http://stackoverflow.com/q/24624907
type: Tag
tags question: http://stackoverflow.com/q/24673187
tags question: http://stackoverflow.com/q/24615180
tags question: http://stackoverflow.com/q/24681641
tag name: datatables
tags question: http://stackoverflow.com/q/24606130
tags question: http://stackoverflow.com/q/24731139
tags question: http://stackoverflow.com/q/24633042
tags question: http://stackoverflow.com/q/24605829
tags question: http://stackoverflow.com/q/24602787

http://stackoverflow.com/q/24657807
has title: Refactor javascript to avoid apostrophes causing issues?
has answer: http://stackoverflow.com/a/24657857
has answer: http://stackoverflow.com/a/24658183
type: Question
tagged with: javascript
tagged with: apostrophe
possible better answer: http://stackoverflow.com/a/24658183
has comment: http://stackoverflow.com/comment/38224727
accepted answer: http://stackoverflow.com/a/24657857
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38224846
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/38225843
tagged with: ajax
has body: I have taken over a website and there is a lot of javascript that looks like this; function BuildHTMLString(item) { return "&lt;input name='Text' Type='text' value='" + item+ "' /&gt;"; } these strings are then being used in posting forms. I realized that if the variable item has an apostrophe in it, this whole thing breaks down. What is a recommended way to programatically populate textboxes that will be part of a form post that doesn't create an issue with names with apostrophe in it.
has comment: http://stackoverflow.com/comment/38224897
has comment: http://stackoverflow.com/comment/38224597
type: AnsweredQuestion

http://stackoverflow.com/comment/38112698
has text: This seams confusing. Can you change the page loading time? SET !TIMEOUT_PAGE 5
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24598027

http://stackoverflow.com/a/24725749
accepted answer of: http://stackoverflow.com/q/24725678
answers question: http://stackoverflow.com/q/24725678
has comment: http://stackoverflow.com/comment/38353048
has comment: http://stackoverflow.com/comment/38353177
upvote count: 2
type: AcceptedAnswer
has body: You can add a class to your &lt;div&gt; element from the selected &lt;li&gt; element using the addClass method from jQuery: $(document).ready(function(){ $('#zen-content').html($('#choice li:first').html()); $('#choice li').click(function(event) { $('#zen-content').html( $(this).html()); $('#zen-content').find('div').addClass('easyzoom easyzoom--overlay'); }); });
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/38402939
has text: I updated my answer with a demo to a working Plunker. You can download that as a zip and try it from there too.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24749277

http://stackoverflow.com/comment/38262035
has text: Guava has a `MultiSet` that might do the trick. But as @Ian points out, this is probably about Javascript anyway.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24678072
type: Comment

http://stackoverflow.com/q/24598052
tagged with: node.js
tagged with: synchronous
has title: Sequential comunication between parent/child processes in node.js
has body: I need to establish a dialog between parent and child processes in node. I started with following: var child = cp.fork(__dirname + '/Child',[],{silent: true}); Then set up an event handler on parent: child.stdout.on('data', processChildResponses); Child listens to stdin and answers writing to stdout. Parent writes to child stdin to send commands: child.stdin.write("a command...\n"); Then I need to send a variable number of commands to child, some require response, others don't. For those that require response, I must wait for it (let's assume forever to make it simple), process the answer and send another command. Child was simple because it only waits for a command, answers it and awaits another. So no problem there. But I'm having many problems with parent. Any ideas? It's an incredibly simple task in java or c# but I would like to make it all in node. Thanks in advance.
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24598090
type: UnansweredQuestion

http://stackoverflow.com/comment/38115592
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24600562
has text: You are calling `#user_id` but there is no `id="user_id"`
type: Comment

http://stackoverflow.com/comment/38301733
comment on: http://stackoverflow.com/q/24699313
type: Comment
score: 0
type: QuestionComment
has text: http://jsfiddle.net/udeeH/8/

http://stackoverflow.com/a/24733500
type: Answer
upvote count: 1
has body: From the bootstrap documentation found here http://getbootstrap.com/javascript/ Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-backdrop="" backdrop {boolean or the string 'static'} default:true Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click. So just setting the option to false should do the trick as in $('#myModal').modal({ backdrop: false });
answers question: http://stackoverflow.com/q/24733434
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38370795

http://stackoverflow.com/q/24632527
tagged with: objective-c
favorite count: 0
has comment: http://stackoverflow.com/comment/38188744
linked to: http://stackoverflow.com/q/24661775
tagged with: parse-platform
upvote count: 2
has comment: http://stackoverflow.com/comment/38189646
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25500802
has comment: http://stackoverflow.com/comment/38189665
has comment: http://stackoverflow.com/comment/38333054
has body: UPDATE: In a nutshell, I would like to use the Master key, because I need to write an other user object with my current user, but I don't want to override all security, I just wanna use it in one function. The accepted answer in this question gave a very nice starting point, however I couldn't make it to work. It's the last code block in this question. I have two separated functions. The first is pure objective-c, it deletes users from the currentUser's firstRelation. It worked well without any problems until i added a different CloudCode function into a different view controller. The CloudCode function uses the master key and adds currentUser to otherUser's sampleRelation &amp; adds otherUser to currentUser's sampleRelation (firstRelation and sampleRelation is two different column inside the User class). So the problem is when I delete a user from currentUser's firstRelation (with current user) my app crashes, because the user must be authenticated via logIn or signUp. Actually i don't understand this, because in this case I'm writing the currentUser with the currentUser instead of another user, so it must work without any problems (and worked before the CloudCode). I'm almost sure that it's because I'm using the master key with the CloudCode, but have no idea how can I avoid it. Everything else is still working, for example I can upload images with currentUser. Here is the code that I'm using for the CloudCode, JavaScript is totally unknown for me, maybe somebody will see what causes the problem. Parse.Cloud.define('editUser', function(request, response) { Parse.Cloud.useMasterKey(); var userQuery = new Parse.Query(Parse.User); userQuery.get(request.params.userId) .then(function (user) { var relation = user.relation("sampleRelation"); relation.add(request.user); // chain the promise return user.save(); }).then(function (user) { var currentUser = request.user; var relation = currentUser.relation("sampleRelation"); relation.add(user); // chain the new promise return…
has comment: http://stackoverflow.com/comment/38188673
score: 2
has comment: http://stackoverflow.com/comment/38332024
type: Question
has title: Parse.com master key doesn't let to write PFUser currentUser
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38187956
answer count: 1

http://stackoverflow.com/comment/38313729
comment on: http://stackoverflow.com/q/24704695
score: 0
type: Comment
has text: Sounds difficult. I´m not a pro in programming and only know the basics from school. And cookies and localStorage certainly didn’t belong to that. I guess I should let my hands from this before I mess things up. But thanks for your replay. ;)
type: QuestionComment

http://stackoverflow.com/comment/38228425
score: 0
type: Comment
type: QuestionComment
has text: Hmm... it's *null*...
comment on: http://stackoverflow.com/q/24659823

http://stackoverflow.com/a/24646932
type: Answer
has body: You can use the counter to determine clicked count: var count = 0; $('#Submitbutton').click(function(e) { count++; if(count==1) return;//return if clicked first time $('#lp').lightbox_me({centered: true,overlayCSS:{background: '#481d33', opacity: .45},overlaySpeed:0,lightboxSpeed:0}); });
score: 0
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/24646891

intel-xdk
tags question: http://stackoverflow.com/q/24739193
type: Tag
tag name: intel-xdk

http://stackoverflow.com/comment/38297949
has text: Why not just use a `` to wrap the text within the ` `?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24697518

http://stackoverflow.com/comment/44311108
type: AnswerComment
comment on: http://stackoverflow.com/a/27958377
has text: Please don't dump code, perhaps [edit] your answer and add some details how this bit of code can help
score: 0
type: Comment

http://stackoverflow.com/comment/38167481
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24626850
has text: Please put the code you have in jsFiddle as a full working example (or at lest the full html page). Copying part of the code from the working OpenLayers example will not help us debug your issue.
score: 0

http://stackoverflow.com/q/24716664
upvote count: 0
answer count: 1
tagged with: javascript
has body: You will be logged out in I have this script that works on fiddle.js but when i implement it into my website ^ like that it doesnt work why?
favorite count: 0
linked to: http://stackoverflow.com/q/14028959
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38335287
has comment: http://stackoverflow.com/comment/38335216
has comment: http://stackoverflow.com/comment/38335278
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38335229
downvote count: 3
score: -3
has answer: http://stackoverflow.com/a/24716679
duplicate of: http://stackoverflow.com/q/4637873
has title: javascript not working, working on fiddle but not on my webserver
has comment: http://stackoverflow.com/comment/38335269
type: Question
linked to: http://stackoverflow.com/q/4637873

http://stackoverflow.com/q/24700774
tagged with: match
has answer: http://stackoverflow.com/a/24701116
has answer: http://stackoverflow.com/a/24701598
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24701598
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/24701116
favorite count: 0
tagged with: parsing
has body: So I have a certain log file: Jul 07, 2014 12:56:06 AM org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Catalina Jul 07, 2014 12:56:07 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/admin] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@75443fb0]) and a value of type [java.util.WeakHashMap] (value [{class com.hp.sw.bto.security.internal.jaxb.MultiValueMapAdapter=java.lang.ref.WeakReference@53b177f5, class com.hp.sw.bto.security.internal.PrincipleImpl=java.lang.ref.WeakReference@283aa0c0, class java.util.ArrayList=java.lang.ref.WeakReference@210fb1e2, class com.hp.sw.bto.security.internal.jaxb.MultivalueMapEntry=java.lang.ref.WeakReference@d677d63, class com.hp.sw.bto.security.context.builders.SecurityContextSectionBuilder$SecurityContextSectionImpl=java.lang.ref.WeakReference@558f575, class com.hp.sw.bto.security.authz.internal.AuthzPermissionImpl=java.lang.ref.WeakReference@135ad711, class com.hp.sw.bto.security.context.builders.GroupBuilder$GroupImpl=java.lang.ref.WeakReference@30dda704, class com.hp.sw.bto.security.context.builders.RoleBuilder$RoleImpl=java.lang.ref.WeakReference@280010ac, class com.hp.sw.bto.security.internal.jaxb.MultivalueMap=java.lang.ref.WeakReference@1c46a0b8, class com.hp.sw.bto.security.internal.SecurityContextImpl=java.lang.ref.WeakReference@60e19e88}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Jul 07, 2014 12:56:08 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/admin] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@7c6f2468]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@64bf67aa]) but failed to remove it when the we…
type: Question
has comment: http://stackoverflow.com/comment/38304658
tagged with: regex
tagged with: logging
has title: Regex match skipping first match
answer count: 2
upvote count: 1

http://stackoverflow.com/q/24607497
tagged with: jquery
has comment: http://stackoverflow.com/comment/38128874
has body: I'm trying to extend the dropdown in Bootstrap 3 to drop downwards or upwards depending on whether if the content would be visible or not. As an example, if the dropdown would expand below what's visible on the screen it should drop up instead. I have been trying to add this behaviour by extending the prototype by changing the toogle function of the dropdowns prototype var toggleDropdown = $.fn.dropdown.Constructor.prototype.toggle; $.fn.dropdown.Constructor.prototype.toggle = function (e) { toggleDropdown.apply(this, arguments) alert('toggle fired') } I took inspiration from this SO thread: How to Extend Twitter Bootstrap Plugin. However this doesn't seem to be working. When I print the toggle function in the console it seems to be replaced but when I click on a dropdown, the old code is still executed and not my new one. Does anyone know why the old prototype function is being executed even though I have replaced it with a new one? It would also be much appriciated if anyone could guide me in how to extend bootstrap in the best way.
has title: Extend bootstrap dropdown
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9137311
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38129814

http://stackoverflow.com/comment/38355498
comment on: http://stackoverflow.com/a/24724326
has text: If you allow Infinity, you aught to allow 421e+0
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24679558
type: Answer
has comment: http://stackoverflow.com/comment/38265158
has comment: http://stackoverflow.com/comment/38265018
has body: check.onclick = "order(check)"; assigns a String as an on-click handler. That doesn't work; the browser expects a function there: check.onclick = function() { order(check); }
has comment: http://stackoverflow.com/comment/38264983
answers question: http://stackoverflow.com/q/24679495
has comment: http://stackoverflow.com/comment/38264851
score: 0

http://stackoverflow.com/comment/38399415
has text: Not working :( the window open at full width but 20% of the height.
comment on: http://stackoverflow.com/a/24725270
score: 0
type: AnswerComment
type: Comment

ffmpeg
tags question: http://stackoverflow.com/q/24671308
tags question: http://stackoverflow.com/q/24626015
tags question: http://stackoverflow.com/q/24627205
tag name: ffmpeg
type: Tag

http://stackoverflow.com/comment/38129263
comment on: http://stackoverflow.com/q/24606130
has text: I have no error in my console (firebug and chrome)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24621395
has title: when should i initialize javascript properties?
has answer: http://stackoverflow.com/a/24621463
accepted answer: http://stackoverflow.com/a/24621408
tagged with: convention
tagged with: properties
has answer: http://stackoverflow.com/a/24621408
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24621463
type: Question
answer count: 2
has body: I am new to javascript and I've been wondering about something. Is there an accepted way I should be listing my object properties? To be specific, I have been writing code where an object is created without any initial properties and adding them on as the code runs. Example: Game = {}; Game.x = 0; ...Code code code Game.thing = function () { Game.variable = 30; } As you can see, my Game object is just slowly gathering properties as my code runs on. Is this acceptable? Or should I be listing out all the properties I will be using at the beginning in my Game object initialization? Thanks.
tagged with: javascript
score: 0

http://stackoverflow.com/q/24720567
type: UnansweredQuestion
has body: I've the following (Using MVC5 Project) code which I need to use in two different JS files. What is the best way to do that ? $("#act").prop("disabled", "disabled"); $("form").change(function () { $("#act").removeAttr("disabled"); $("#btn").prop("disabled", "disabled"); }); $("input").keyup(function () { $("#act").removeAttr("disabled"); $("#btn").prop("disabled", "disabled"); });
type: Question
has comment: http://stackoverflow.com/comment/38343430
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/38343078
has answer: http://stackoverflow.com/a/24722040
has comment: http://stackoverflow.com/comment/38343552
upvote count: 4
has title: share Code between two JS files
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/38343172
score: 4

http://stackoverflow.com/comment/38196651
score: 0
type: Comment
has text: Actually yes, this was the issue, with the rightColumn being empty to start with it wont kick off properly, I put a blank div with an id of 0 and then it all works wonderfully. Is there a slight modification we can make so that this code will account for the empty start?
comment on: http://stackoverflow.com/a/24636611
type: AnswerComment

http://stackoverflow.com/comment/38432392
comment on: http://stackoverflow.com/a/24713898
has text: childWindow is just an example name for the window. You would need to use the reference you establish in your code. Since you didn't provide any actual code, I don't have access to your variable names. The same goes for parentWindow. PS Downvoting seems a little aggressive to me.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/24695523
score: 0
type: Answer
has body: You can simply disable scrolling for the html or body element. Not entirely sure that's what you wish to do, but either that or the #parent element. html,body{ overflow:hidden; } or #parent{ overflow:hidden; } Additionally right now your #div2 is wider than most screens, so you won't get a scroll bar for it likely, so you might be intending to scroll the #parent element? Additionally it is enough to set the overflow to auto instead of scroll as scroll just forces a scrollbar to be visible even if there is no content to scroll.
answers question: http://stackoverflow.com/q/24695463

http://stackoverflow.com/q/24733025
upvote count: 2
has title: JSP - How to submit form when clicking a link?
tagged with: spring
answer count: 1
has comment: http://stackoverflow.com/comment/38367204
has body: I want to submit a form when I click on a link but when I click the element it doesn't prevent the default action. And I also get this message error: HTTP Status 405 - Request method 'POST' not supported. This is what I tried so far: users.jsp <%@ include file="/WEB-INF/template/taglibs.jsp"%> <%@ include file="menu.jsp" %> Add Id First name Last name User name <c:forEach items="${list}" var="item"> ${item.getUserid()} ${item.getFname()} ${item.getLname()} ${item.getUsername()} Edit <form:form method="post" action="#" commandName="delete"> Delete </form:form> </c:forEach> UsersController.java package catering.web.controller; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import catering.web.data_access.UserDataAccess; import catering.web.data_access.UserSummaryDataAccess; import catering.web.mapper.UserMapper; import catering.web.model.UserModel; import catering.web.model.UserModelSummary; import catering.web.view_model.UserViewModel; @Controller public class UsersController { protected static Logger logger = Logger.getLogger("controller"); static final String guid = "1390e9e7-7792-4e24-b66f-6da90b8ebefb"; @RequestMapping(value = "users", method = RequestMethod.GET) public String indexUsers(Model model, Authentication authentication){ logger.debug("Received request to users page(GET)"); List<UserModelSummary> users = UserSummaryDataAccess.getUsersSummary(); model.addAttribute("username", "You are logged in as " + authentication.getPrincipal()); model.addAttribute("list", users); return "users"; } @RequestMapping(value = "/addUser", method = Requ…
tagged with: java
accepted answer: http://stackoverflow.com/a/24733535
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38367163
type: Question
has answer: http://stackoverflow.com/a/24733535
has comment: http://stackoverflow.com/comment/38366998
has comment: http://stackoverflow.com/comment/38367453

http://stackoverflow.com/q/24697069
has comment: http://stackoverflow.com/comment/38297252
tagged with: javascript
has title: If statement(text exist in iframe) in Javascript for Iframe not working
tagged with: jquery
has answer: http://stackoverflow.com/a/24710042
accepted answer: http://stackoverflow.com/a/24697287
score: 0
possible better answer: http://stackoverflow.com/a/24710042
has body: Hi I am new to this site and trying to get some help on this small problem. I am trying to see if a set of text (Listing Added) Exists in the iframe then do something with it, if it exists etc. I have read that there are 2 ways of doing it 1st $('#my_iframe:contains("I am a simple string")') 2nd $('#my_iframe').contents().find().text('my text').length&gt;0 I tried both and the problem that i have is my if statement does not work. If the text exists or not, it is going to the first condition. Thanks for your time! Here is my code &lt;script&gt; $(function(){ $('#myiframe').load(function(){ if ($('#myiframe:contains("Listing Added")')){ document.getElementById('result').innerHTML = "Listing Added!" } else{ document.getElementById('result').innerHTML= "Listing not Added"} }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/38297298
tagged with: iframe
type: Question
has answer: http://stackoverflow.com/a/24697287
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38297390
answer count: 2

http://stackoverflow.com/q/24681568
has answer: http://stackoverflow.com/a/26142293
score: 0
has answer: http://stackoverflow.com/a/24681678
has answer: http://stackoverflow.com/a/25464073
type: Question
tagged with: x-editable
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/38276987
has body: I am using X-Editable with AngularJS for Form First Name {{curuser.firstName}} E-Mail {{curuser.email}} Role {{ showRoles() }} {{ showRoles() }} Submit There are two criteria, one wherein user should be allowed to update all fields and other where in user will be allowed only to edit role i.e. Select Role. My actual problem is that how can form elements be made editable/non-editable based on a specific condition. If I remove editable-text manually from all fields it satisfies second criteria. Is there any way I can add editable-text based on condition. Anyone have any helpful ideas? Thanks in Advance
has title: Hide editable-text attribute conditionally using AngularJS
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/tag/csv
type: Tag
tags question: http://stackoverflow.com/q/24596099
tags question: http://stackoverflow.com/q/24659823
tags question: http://stackoverflow.com/q/24602661
tag name: csv
tags question: http://stackoverflow.com/q/24641844
tags question: http://stackoverflow.com/q/24731729
tags question: http://stackoverflow.com/q/24720208
tags question: http://stackoverflow.com/q/24627652
tags question: http://stackoverflow.com/q/24657824
tags question: http://stackoverflow.com/q/24610694
tags question: http://stackoverflow.com/q/24619829
tags question: http://stackoverflow.com/q/24675962
tags question: http://stackoverflow.com/q/24679048
tags question: http://stackoverflow.com/q/24588883
tags question: http://stackoverflow.com/q/24598763
tags question: http://stackoverflow.com/q/24730898

http://stackoverflow.com/a/24597366
type: Answer
has body: When you create the new paragraph, you set up the event listener again using: viewableText.click(editDiv); That will call editDiv() with no parameters (i.e. element_to_be_edited and update_description will be undefined). You can do as Tommi suggested, or another option is to simply update the existing element you already had, i.e. on your blur handler, something like: element_to_be_edited.text(html); $(this).replaceWith(element_to_be_edited); element_to_be_edited will still have the original event handler bound to it, so subsequent clicks will work exactly like the first. Also means you don't have to create another new DOM element.
score: 0
answers question: http://stackoverflow.com/q/24597263

http://stackoverflow.com/a/24705561
has body: you are most likely getting the post error because your $.post is trying to go to sql.php which is not defined in your laravel routes. update your script from sql.php to {{url().'/sql'}} and add a sql route to laravel routes. That's the simple solution or you can create a more restful approach to handle your ajax routes and controllers. More info on that is located at laravel.com btw you should always wrap your jquery to make sure it loads like i posted earlier.
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24675555
answers question: http://stackoverflow.com/q/24675555
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/38500877
comment on: http://stackoverflow.com/a/24741735
score: 0
type: AnswerComment
has text: @GuyT I updated my answer to clarify my thoughts. Sorry if I didn't explain myself!
type: Comment

http://stackoverflow.com/comment/38275728
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24685113
has text: kidsage = 'kidsage4'+i

http://stackoverflow.com/comment/38886516
comment on: http://stackoverflow.com/a/24752446
score: 0
type: Comment
has text: I have found a solution for the same are you still getting the problem @Veer?
type: AnswerComment

http://stackoverflow.com/q/24680303
type: Question
tagged with: javascript
has body: I have a series of Object3Ds in a scene that I have created myself from vertices and faces. It should be said that the vertices of these objects can be very far away from the world origin (X and Y values up to 600'000ish). Upon trying to rotate or scale them, they appear to be rotating around the another axis instead of their local center. Weirdly object3D.translateX (or Y Z) work fine and as expected, as does simply moving the position (i.e: object.position.x = 10 increments the x position by 10 (away from 0,0,0 local origin). I am not even entirely sure which axis this object is rotating around. When I moved the geometry to 0,0,0 with object.position that didn't appear to make the object rotate around itself either. If it is of any use, I have code to get the center of the object ( using: THREE.Box3().setFromObject(object).center (although there might be more appropriate ways?)) Indeed I have found this post which has allowed me to rotate (XYZ) around the center point, however I can't find a way to rotate around X Y Z axes individually, only all together. Are there any solutions? This must be a common thing to attempt to achieve (scaling and rotating objects around their central axes?) edit: Interestinly I am finding various sources of information implying that rotation is around a local axis, however this doesn't appear to be the case with my geometries! Saying that rotation is around object axis Similarly saying the same sort of thing, however implying this can change depending on how it is 'built' (not sure what that means)
has title: Three.js rotating, scaling not occuring around object central axes
score: 0
tagged with: scale
answer count: 1
tagged with: geometry
linked to: http://stackoverflow.com/q/11060734
type: UnansweredQuestion
tagged with: three.js
has answer: http://stackoverflow.com/a/24694706

http://stackoverflow.com/comment/38256696
type: AnswerComment
comment on: http://stackoverflow.com/a/24674745
type: Comment
has text: .not will skip the current element and remove active class from other, so that toggleClass should work fine. If I donot use .not then toggleClass will get false value for current element.
score: 0

http://stackoverflow.com/q/24704517
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38311793
type: Question
has comment: http://stackoverflow.com/comment/38312104
has comment: http://stackoverflow.com/comment/38311822
has comment: http://stackoverflow.com/comment/38314516
tagged with: javascript
has title: CSS3 transition doesn't work
tagged with: transition
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/24704736
linked to: http://stackoverflow.com/q/3508605
favorite count: 0
has comment: http://stackoverflow.com/comment/38318360
has comment: http://stackoverflow.com/comment/38312094
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38312677
has answer: http://stackoverflow.com/a/24704736
tagged with: css
has body: my transitions doesn't work and I have no idea why. HTML code &lt;!-- The user can select here the language --&gt; &lt;select name="language" id="language" onChange="ChangeLanguage()"&gt; &lt;option value=" " selected/&gt; &lt;option value="Basic"/&gt;Basic &lt;option value="C/C++" /&gt;C/C++ &lt;/select&gt; &lt;div id="PartieCPP"&gt; &lt;!-- This &lt;div&gt; disappear when the user choose "Basic" --&gt; ... &lt;/div&gt; &lt;div id="PartieBAS"&gt; &lt;!-- This &lt;div&gt; disappear when the user choose "C/C++" --&gt; ... &lt;/div&gt; JAVASCRIPT code function ChangeLanguage() //this function is called when the user change the selected language { var choise = document.getElementById("language").options[document.getElementById("language").selectedIndex].value; if ( choise == "C/C++") { document.getElementById("PartieCPP").style.height = "auto"; //"PartieCPP" appear document.getElementById("PartieBAS").style.height = "0px"; //"PartieBAS" disappear } else if (choise == "Basic") { document.getElementById("PartieCPP").style.height = "0px"; //"PartieCPP" disappear document.getElementById("PartieBAS").style.height = "auto"; //"PartieBAS" appear } else { document.getElementById("PartieBAS").style.height = "0px"; //"PartieBAS" disappear document.getElementById("PartieCPP").style.height = "0px"; //"PartieCPP" disappear } } CSS code #PartieCPP, #PartieBAS { height : 0px; overflow : hidden; -webkit-transition: height 2s; -moz-transition: height 2s; transition: height 2s; } This code works fine, but there's no transition, can someone explain to me what I am doing wrong? (I tried on Chrome and Firefox)
type: AnsweredQuestion

http://stackoverflow.com/a/24700610
has body: you're watching title but that isn't in your scope, the scope your trying to watch is modules.title or simply modules $scope.$watch('modules', function() { console.log('Controller changed'); }, true);
answers question: http://stackoverflow.com/q/24700435
score: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24700435
upvote count: 3

http://stackoverflow.com/comment/38320647
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24703481
has text: Ah well. Thanks for solving my NaN problem! Marking your answer as best.
score: 0

http://stackoverflow.com/q/24588883
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24589035
tagged with: javascript
has body: I want to populate simple drop down list in html , with values that exist in csv file. I try something like that , but it doesn't work. What should I change? thank you
answer count: 2
score: 3
downvote count: 0
favorite count: 0
tagged with: d3.js
tagged with: http://stackoverflow.com/tag/csv
has answer: http://stackoverflow.com/a/24589035
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/45327208
has answer: http://stackoverflow.com/a/45327208
has title: Populate Dropdown list with CSV file - d3
upvote count: 3
type: Question

http://stackoverflow.com/q/24631643
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24634319
tagged with: url
has answer: http://stackoverflow.com/a/24634146
tagged with: backbone.js
tagged with: model
has body: I'm in a situation where i want to populate Model url from Model attributes dynamically here is my code var MailboxModel = Backbone.Model.extend({ defaults: { key: 'inbox', filter: 'date', orderby: 'desc', mailPageSize: 10, pageOffSet: 0 }, url: window.sessionStorage.getItem('mail_link') + "/" + this.key + "?order_by=" + this.filter + "&amp;order=" + this.orderby + "&amp;offset=" + parseInt(this.pageOffSet) + "&amp;count=" + this.mailPageSize // the output will be http://website.com/rest/users/123456/mail/inbox?order_by=date&amp;order=desc&amp;offset=0&amp;count=10 // instead output is "http://website.com/rest/users/1926856/mail/inbox?order_by=undefined&amp;order=undefined&amp;offset=NaN&amp;count=undefined" }); or this way? both not working var mailboxmodel =new MailboxModel({}); mailboxmodel.set('key', sessionStorage.getItem('message_key')); mailboxmodel.set('filter', 'subject'); mailboxmodel.set('orderby', 'desc'); mailboxmodel.set('mailPageSize', 10); mailboxmodel.set('pageOffSet', 0); var mailboxlist = new MailboxList({ model: new MailboxModel, render: function(){ // render function is working fine } }); mailboxlist.render(); Backbone.history.start(); });
has title: backbone Model url with dynamic parameter
possible better answer: http://stackoverflow.com/a/24634146
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24634319
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38223829
comment on: http://stackoverflow.com/a/24652217
type: Comment
has text: What happens now? What does the JS debugger tell you is wrong, if anything? I just tried the code and it worked fine. I **1.** Changed the dummy addresses thusly: `var link = ["http://stackoverflow.com/questions/24650947/creating-multiple-links-on-html5-canvas/24652217", "http://stackoverflow.com/"]` and **2.** changed the click handler for the canvas from `on_click2` to your original function (with fixed inLink refs), `on_click`. I'll update the solution to reflect the exact, functioning code I have - tested with Chrome 35.0.1916.153 m (on win7)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38258291
comment on: http://stackoverflow.com/q/24675789
score: 0
type: Comment
has text: [Is this what you're trying to achieve](http://jsfiddle.net/cs6Xb/113/)?
type: QuestionComment

http://stackoverflow.com/a/24608664
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/38131163
type: Answer
has comment: http://stackoverflow.com/comment/38130923
has body: Try this, function go(value){ $("#image").rotate({ // don't bind events here animateTo: value }); return false;// to prevent submition of form } Demo without click event. Pastebin Code updated, function go(){ var val=0; var refreshId = setInterval( function(){ val+=20; $("#image").rotate({ // don't bind events here animateTo: val }); },2000); return false;// to prevent submition of form }; Working Demo
score: 1
has comment: http://stackoverflow.com/comment/38135112
answers question: http://stackoverflow.com/q/24608565

http://stackoverflow.com/q/24737898
type: UnansweredQuestion
has title: Creating custom alert box using javascript
type: Question
has body: I am creating a custom alert box using Jquery's dialog. But I am facing two issues. I am not able to change the default close label for the close of pop up. I want a x symbol instead of close. Second thing is I am not sure how to give css to the pop up div. Please help. Also One more thing. I want the main page to be disabled when pop up is opened. What I have done till here. function yesnodialog(content, button1, button2, element) { var btns = {}; btns[button1] = function () { element.parents('li').hide(); $(this).dialog("close"); }; btns[button2] = function () { // Do nothing $(this).dialog("close"); }; $(" " + content + " ").dialog({ autoOpen: true, title: 'Condition', modal: true, buttons: btns }); } And in html i am calling the above js function as
has answer: http://stackoverflow.com/a/24738042
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/38376014
has comment: http://stackoverflow.com/comment/38376186
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24738058
has comment: http://stackoverflow.com/comment/38376050

http://stackoverflow.com/comment/38105250
comment on: http://stackoverflow.com/q/24594870
score: 0
type: Comment
has text: I think it would be much easier for people to grasp if you posted an excerpt of your html. Anyway, here's an example using show and hide: http://jsfiddle.net/jme11/Z5xks/
type: QuestionComment

http://stackoverflow.com/comment/38326165
score: 0
has text: yes, because in JS it prints the url of video : http://prntscr.com/41w43e
comment on: http://stackoverflow.com/q/24711826
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24682632
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24682500
answers question: http://stackoverflow.com/q/24682500
has body: See Are (non-void) self-closing tags valid in HTML5? This should be
upvote count: 2
type: AcceptedAnswer

typescript
tags question: http://stackoverflow.com/q/24662971
tags question: http://stackoverflow.com/q/24652832
tag name: typescript
tags question: http://stackoverflow.com/q/24633777
tags question: http://stackoverflow.com/q/24624372
tags question: http://stackoverflow.com/q/24616131
tags question: http://stackoverflow.com/q/24678534
tags question: http://stackoverflow.com/q/24635341
tags question: http://stackoverflow.com/q/24701040
type: Tag
tags question: http://stackoverflow.com/q/24630748
tags question: http://stackoverflow.com/q/24693589

http://stackoverflow.com/comment/38282439
comment on: http://stackoverflow.com/q/24688539
score: 0
type: Comment
type: QuestionComment
has text: Sorry, I meant [this answer](http://stackoverflow.com/questions/12457234/encrypt-in-javascript-decrypt-in-php-using-public-key-cryptography/12575951#12575951).

http://stackoverflow.com/comment/38280755
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24682624
has text: if you want to specify a popup, you will need to check page ID. The second solution is easier because it opens a popup with the active page. If you have many popups, you can target a specific popup with a specific class, e.g. `$(".ui-popup.foo", ui.toPage).popup("open");` This will open a popup with class `foo` in active page regardless which page is currently shown @SubjectiveEffect
type: AnswerComment

http://stackoverflow.com/q/24644470
upvote count: 1
type: Question
has title: VB 2013: Auto login from my.settings issue
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28226442
answer count: 1
downvote count: 0
tagged with: .net
favorite count: 0
tagged with: awesomium
tagged with: vb.net
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28226442
score: 1
has body: I am using the latest version of Awesomium for the WebControl for my application. When my application arrives at "accounts.google.com/ServiceLogin" it is supposed to execute some Javascript to have it automatically log in. In my.settings.java I have: "document.getElementById('Email').value=""1"";document.getElementById('Passwd').value=""2"";document.getElementById('signIn').click()" Value "1" being the email, and "2" being the password. So when the document is ready I have this: Private Sub WebBrowser1_DocumentReady(sender As Object, e As Awesomium.Core.UrlEventArgs) Handles WebBrowser1.DocumentReady If WebBrowser1.Source.ToString.Contains("accounts.google.com/ServiceLogin") = True Then WebBrowser1.ExecuteJavascript(My.Settings.java.ToString) Else End If I don't know why this is not working. When I paste the code directly in like this: WebBrowser1.ExecuteJavascript("document.getElementById('Email').value=""1"";document.getElementById('Passwd').value=""2"";document.getElementById('signIn').click()") The code works perfectly and it logs in. The reason I have it in my.settings is because I originally have it in a textbox, then I ask the user for their email and password, and then replace "1" with the email, and "2" with the password, then save the edited textbox text in my.settings.java. Then I have it look for the Javascript there instead of hard coding it into the application, and not being able to customize it for each user. Is any of my code wrong, or is there another way of doing this with Awesomium. Also, I am using the Awesomium WebControl1, I just changed it to WebBrowser1 because that is what I am used to typing. Sorry if this question is simple, as I am a student developer, with very limited knowledge in Javascript.

http://stackoverflow.com/comment/38264781
type: QuestionComment
has text: @KaarelNummert Yes I did, but looping through array let me a piece a code not very readable at the end. That's why I ask that on SO.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24679256

http://stackoverflow.com/comment/45911861
score: 0
comment on: http://stackoverflow.com/a/24612294
type: AnswerComment
type: Comment
has text: @RobertLongson: In practice, what do you means by "switch to xhtml" , how to do it ?

http://stackoverflow.com/a/24634734
has comment: http://stackoverflow.com/comment/38181302
has comment: http://stackoverflow.com/comment/38181463
has comment: http://stackoverflow.com/comment/38181414
has comment: http://stackoverflow.com/comment/38181705
has comment: http://stackoverflow.com/comment/38182702
has comment: http://stackoverflow.com/comment/38181895
answers question: http://stackoverflow.com/q/24634438
has comment: http://stackoverflow.com/comment/38181832
score: 0
has comment: http://stackoverflow.com/comment/38181784
has comment: http://stackoverflow.com/comment/38181343
has comment: http://stackoverflow.com/comment/38182095
has comment: http://stackoverflow.com/comment/38182920
has comment: http://stackoverflow.com/comment/38183346
type: Answer
has body: Try changing the following onclick line to: anchor_element.onclick = "return window.confirm('The link you selected will take you to a third party website...\r\rClick <CANCEL> if you would like to stay.');"; And fix up the bracketing of course. I haven't tested it, but thought you could faster than I could setting up a test scenario. If it doesn't work let me know. EDIT: Just tested your original change and my change and both work fine so my answer is not a solution... can you post what your error is? I don't get one except when it redirects to www.google.com I get a error on the google page but my other 3 test redirect pages work fine. Here is my test code... Google Microsoft Apple Stackoverflow $(document).ready(function () { var anchors = $("a").get(); for (var i = 0; i < anchors.length; i++) { var anchor_element = anchors[i]; var url = anchor_element.attributes[0].nodeValue; if ((url.indexOf('.com') != -1) || (url.indexOf('ForwardProcessing') != -1)) { anchor_element.onclick = "return window.confirm('The link you selected will take you to a third party website...\r\rClick <CANCEL> if you would like to stay.');"; } } }); Nothing else in the page and it works. EDIT 2: I tested using IE11 with pop up blocker on and do not experience any issue. Sites open in a new tab with no issue. Pop up blocker was set to 'medium'.

http://stackoverflow.com/comment/38190546
has text: What does your route config look like?
comment on: http://stackoverflow.com/q/24639656
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24663786
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38236411
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/38236086
has answer: http://stackoverflow.com/a/24663938
type: Question
upvote count: 2
downvote count: 2
answer count: 1
has body: Here is the source - Todo Javascript Source addOne expects one argument this.listenTo(Todos, 'add', this.addOne); as you can see here: addOne: function(todo) { var view = new TodoView({model: todo}); this.$("#todo-list").append(view.render().el); }, where does it get this, the callback appears to call the function with no arguments?
score: 0
has comment: http://stackoverflow.com/comment/38236799
accepted answer: http://stackoverflow.com/a/24663938
has comment: http://stackoverflow.com/comment/38236128
has comment: http://stackoverflow.com/comment/38236306
tagged with: javascript
has title: Missing argument in callback function for localTodos app

http://stackoverflow.com/comment/38312776
type: Comment
has text: @Jasen something is still not right.. I just tried it out using the old jQuery 1.9.1 and UI 1.9.2, and it still have the same issue.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24704020

http://stackoverflow.com/comment/38478686
has text: Figured it out - so simple. I wasn't passing in the response to the updates() function, so HTTP request lag could cause it to process the wrong response. Thanks for the tip about moving the function out of the loop!
comment on: http://stackoverflow.com/a/24605409
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24622228
type: Question
has title: What's the difference between someChildScope.$apply() and $rootScope.$apply()?
has comment: http://stackoverflow.com/comment/38183686
has comment: http://stackoverflow.com/comment/38157966
downvote count: 0
has comment: http://stackoverflow.com/comment/38158284
tagged with: javascript
has comment: http://stackoverflow.com/comment/48452834
has comment: http://stackoverflow.com/comment/38158132
has comment: http://stackoverflow.com/comment/38182580
favorite count: 0
has comment: http://stackoverflow.com/comment/38183889
has comment: http://stackoverflow.com/comment/38158092
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38160827
score: 2
linked to: http://stackoverflow.com/q/17868889
answer count: 0
linked to: http://stackoverflow.com/q/21658490
has body: A little more elaboration: Say I have a service: app.service('MyService', function(SomeWebSocketService) { function MyService() { this.object = {}; } MyService.prototype.subscribe = function() { var self = this; SomeWebSocketService.subscribe('someTopic', function(data) { angular.extend(self.object, data); } } return MyService; } // usage app.controller('MyController', function($scope, MyService) { var model = new MyService(); $scope.object = model.object; }); When I get messages from the WebSocket service, I'd like the $digest loop to trigger. My first inclination was to do something like this: app.service('MyService', function(SomeWebSocketService) { function MyService(scope) { // scope from wherever this service was called this.scope = scope; this.object = {}; } MyService.prototype.subscribe = function() { var self = this; SomeWebSocketService.subscribe('someTopic', function(data) { angular.extend(self.object, data); self.scope.$apply(); } } return MyService; } // usage app.controller('MyController', function($scope, MyService) { var model = new MyService($scope); $scope.object = model.object; }); But I don't like having to pass in some arbitrary scope. So I thought of doing this: app.service('MyService', function($rootScope, SomeWebSocketService) { function MyService() { this.object = {}; } MyService.prototype.subscribe = function() { var self = this; SomeWebSocketService.subscribe('someTopic', function(data) { angular.extend(self.object, data); $rootScope.$apply(); } } return MyService; } // usage app.controller('MyController', function($scope, MyService) { var model = new MyService(); $scope.object = model.object; }); Will I take a performance hit for doing this? Or is calling $apply on one $scope the same as calling $apply on any?

http://stackoverflow.com/a/24699906
downvote count: 2
has comment: http://stackoverflow.com/comment/38302801
has body: You can use regular expression:- var val = jQuery('#passwordfield').val(); if(val.length &lt;=7 || val.length &gt;= 33 || !/[0-9]/.test(val) || !/[a-zA-Z]/.test(val)) { // show error }
type: Answer
has comment: http://stackoverflow.com/comment/38302689
answers question: http://stackoverflow.com/q/24699694
upvote count: 2
score: 0

http://stackoverflow.com/comment/38150896
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24617839
has text: If the user is not logged in why not add the authorize attribute to the action that invokes this view. Surely then at this point you don't need to worry about the additional content passed by your javascript method. Maybe I am misreading your question so apologies if that is the case.
score: 0

http://stackoverflow.com/q/24679357
score: 2
type: AnsweredQuestion
tagged with: pyramid
has comment: http://stackoverflow.com/comment/38264458
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/38264810
possible better answer: http://stackoverflow.com/a/24705662
has title: Iterate javascript Object with arrays in Python
has comment: http://stackoverflow.com/comment/38265646
answer count: 2
has body: I have a bunch of text boxes to get input from the user. When the user clicks one the "done" button(just a regular button), I get all the input and store it in an associative array and pass it to my python method. This is what the data looks like: then I convert it to json and send it to my python function: $.ajax({ url: "http://127.0.0.1:6543/create_device", type: "POST", data: JSON.stringify(data), contentType: 'application/json; charset=utf-8', success: function (response, textStatus, jqXHR) { alert("done"); }, error: function (jqXHR, textStatus, errorThrown) { //change this back to error throwing after wards alert("error"); } }); Then in my python function I have this: def create_device(request): #get the json data from the ajax call data = request.json_body for key in data: print "key: " + key This problem is I'm not sure how I'd iterate over the arrays stored under genericData and staticData. When I try to iterate them it seems only to be iterating the characters in the words instead of the arrays. This is what my javascript looks like(refer to picture to see what the data looks like): data = { 'staticData': staticData, 'genericData': genericData } EDIT This is the code that seems to work except my array is empty and I have no idea how for key in data: for val in data[key]: print "-----------------" + val
has answer: http://stackoverflow.com/a/24682199
downvote count: 0
accepted answer: http://stackoverflow.com/a/24682199
has comment: http://stackoverflow.com/comment/38264600
tagged with: javascript
has answer: http://stackoverflow.com/a/24705662
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38264926
tagged with: python

http://stackoverflow.com/comment/45575326
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24591252
type: Comment
has text: I did not the same that you put here, but is was an inspiration to get the thing that I wanted, I forget tell you :D

http://stackoverflow.com/comment/38372551
has text: How are you serving the static javascript files?
score: 0
comment on: http://stackoverflow.com/q/24736089
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24722370
downvote count: 0
has body: I have a page with 3 switch toggle buttons, the first two buttons activate a action (lamp 1 on and off, lamp 2 on and off), the third button is to switch both lamps on or out. So if I turn on button 1 and 2, the third button should be refreshed and also show the value on. Now I only switched the first button and turn lamp 1 off, the third button should be refreshed and show the value off cause not all Lamps are on. The refresh works fine, but when its refreshed the third button, it also starts the function for turning off both lamps, lamp 1 and two are off (only lamp 1 should be off). I searching for a way to refresh the button without starting the event which I start when I click the button. Heres my Javascript code for the logic of the switch toggle buttons: $( "#flip1").change(function(){ var value1 = $("#flip1").val(); var value2 = $("#flip2").val(); if (value1 == 1) { switchlight(1, "on"); // function for switching the lamp if (value2 == 1){ $("#flip3").val("1").flipswitch("refresh"); // should be refreshed without action } }else{ switchlight(1, "off"); $("#flip3").val("0").flipswitch("refresh"); // should be refreshed without action }; }); $( "#flip2").change(function(){ var value1 = $("#flip1").val(); var value2 = $("#flip2").val(); if (value2 == 1) { switchlight(2, "on"); // function for switching the lamp if (value1 == 1){ $("#flip3").val("1").flipswitch("refresh"); // should be refreshed without action } }else{ switchlight(2, "off"); $("#flip3").val("0").flipswitch("refresh"); // should be refreshed without action }; }); $( "#flip3").change(function(){ var value3 = $("#flip3").val(); if (value3 == 1) { switchlight(1, "on"); switchlight(2, "on"); $("#flip1").val("1").flipswitch("refresh"); // should be refreshed without action $("#flip2").val("1").flipswitch("refresh"); // should be refreshed without action }else{ switchlight(1, "off"); switchlight(2, "off"); $("#flip1").val("0").flipswitch("refresh"); // should be refreshed without action $("#flip2").val("…
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24722755
linked to: http://stackoverflow.com/q/22785646
possible better answer: http://stackoverflow.com/a/24722755
has title: JQuery Flip toggle refresh without action
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24722643
upvote count: 2
has comment: http://stackoverflow.com/comment/38346574
type: Question
tagged with: togglebutton
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24722643
answer count: 2
has comment: http://stackoverflow.com/comment/38346384

http://stackoverflow.com/a/24712465
type: Answer
accepted answer of: http://stackoverflow.com/q/24712358
has body: If you do things outside of angular and want to update the scope you need to wrap them in $scope.$apply: $.ajax({ ... }) .success(function() { $scope.$apply(function() { // do stuff }) }); See here for more details
has comment: http://stackoverflow.com/comment/38328458
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24712358

http://stackoverflow.com/a/27629765
score: 1
answers question: http://stackoverflow.com/q/24653117
has body: Regular expressions cannot match infinitely recursing things. Look at the Chomsky hierarchy of languages. You can write a regular expression matching finitely recursing things by expanding them. For example, this POSIX ERE (tested with egrep) will match brainfuck loops up to nesting depth 3: (\[[^][]*\]|\[([^][]|\[[^][]*\])*|\[([^][]|\[([^][]|\[[^][]*\])*\])*\])
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/38111490
comment on: http://stackoverflow.com/a/24597872
has text: Ah, that _possibly_ fixed it since now I'm being told that I have an Invalid argument supplied for foreach() and Undefined index: Quantity both in line 5 instead of the page updating without changing values. Now I guess I can move on to troubleshoot why I'm getting that, seems like the argument is okay, but guess I messed up somewhere.
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/38159424
type: AnswerComment
comment on: http://stackoverflow.com/a/24622978
score: 0
type: Comment
has text: I see, you can use jQuery validation plugin, in that way, there is a validation handle, I think you use that handle to do you what you want do, good luck!

http://stackoverflow.com/comment/38278192
has text: This is wrong. It should be 500,500,500 instead of 500,1000,1500.
comment on: http://stackoverflow.com/a/24685960
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/24695501
answers question: http://stackoverflow.com/q/24693689
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24693689
type: Answer
has body: I have decided to test with JISON (Similar to BISON) /* description: Parses end executes mathematical expressions. */ /* lexical grammar */ %lex %% \s+ /* skip whitespace */ [0-9]+("."[0-9]+)?\b return 'NUMBER' "&gt;" return '&gt;' "price:" return 'PRICE' &lt;&lt;EOF&gt;&gt; return 'EOF' "name:" return 'NAME' [a-z]+ return 'STRING' "," return 'COMMA' /lex /* operator associations and precedence */ %left 'COMMA' %left 'PRICE' 'NAME' %start expressions %% /* language grammar */ expressions : e EOF { typeof console !== 'undefined' ? console.log($1) : print($1); return $1; } ; e : 'PRICE' '&gt;' e {$$ = {price:{gt:$3}};} | 'NAME' e {$$ = {name:{contains:$2}};} | NUMBER {$$ = Number(yytext);} | STRING {$$ = String(yytext);} | e 'COMMA' e { for (var attrname in $1) { $3[attrname]=$1[attrname]; $$ = $3; }} ; The result of the parser is the following: price:&gt;30 => { price: { gt: 30 } } name:blabla,price:&gt;10 => { price: { gt: 10 }, name: { contains: 'blabla' } } name:test => { name: { contains: 'test' } } This solution seems a bit more portable to me, because it doesn't directly deal with the parsing.

http://stackoverflow.com/q/24698459
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38303515
tagged with: extjs
score: 0
tagged with: sencha-architect
has comment: http://stackoverflow.com/comment/38300965
has title: Sencha Architect for EXT JS displays error pop up on grid column' Renderer
tagged with: extjs4.2
tagged with: sencha-touch
has body: I am working with EXT JS grid. I am using Sencha Architect version 2.2.2 I am calling a function from inside the renderer function of the grid column but it is throwing function undefined error while I am clicking on the Tab Panel which is parent to the grid in discussion. The grid columns have renderer function, which inturn calls another function as below. xtype: 'gridcolumn', renderer: function(value, metaData, record, rowIndex, colIndex, store, view) { myCalledMethod(); }, I am getting this error on Sencha Architect. However, it works correctly and there is not error on firebug console. An error occurred while executing this function 'renderer' 'myCalledMethod' is not defined. I have declared this method before the grid is painted. I was referring to the sencha forums and found that it is a known issue. Reference : http://www.sencha.com/forum/showthread.php?186674-Adding-renderer-to-a-grid-column-designer-shows-an-error&amp;langid=14 Please note, I am getting this error while I am clicking on that form in Sencha Architect. I verified couple of times that there is no issue with the scope where the function is defined. I am declaring the function well ahead before the grid is rendered. Any help would be great. Thanks,
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/38300196

http://stackoverflow.com/q/24734797
has comment: http://stackoverflow.com/comment/38397810
type: Question
has body: I have a problem after refactoring code of Test Application backend. Test has questions and answers, each question has multiple answers and only one of them is correct. After some debugging everything seems to work fine, but all questions and answers managing logic was located in one controller. I moved answers logic to separate nested controller and after that stuck with this problem. Tried different methods but none of them helped. The goal is to combine Angular UI Tree (Example #4 - Groups &amp; Categories) with Angular UI Bootstrap Modal. By design adding and editing questions and answers are happening in modal window. The template is located separately so it's not repeated with each question and answer. When provided data is not valid, validation errors are shown, otherwise the success alert is shown and all fields clear and back to default state (all that happens inside the modal window, it's stay opened and can be closed only by hitting "Cancel", X button or keyboard Esc button). I need to update QuestionsCtrl $scope.questions from modal window (trigger button is located inside template of modal window). After hitting "Add" button $scope.questions will become updated in scope and the ui.tree is also updated in background. The success alert or validation errors doesn't shown, form fields doesn't clear. Repeated clicks is not calling the actual function again (so it runs only once). Without modal window but with nested controllers adding works fine. I created plunk and removed all redundant code so focusing on the problem will be easier. I can provide more code if it's needed. For example in the plunk results of console.log shown only once.
tagged with: javascript
has comment: http://stackoverflow.com/comment/38370251
has title: The function runs only once when updating parent controller scope in opened Angular UI Bootstrap Modal
has comment: http://stackoverflow.com/comment/38371056
score: 0
has answer: http://stackoverflow.com/a/24736987
tagged with: angular-bootstrap
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/38422919
type: AnswerComment
type: Comment
has text: Try to pass the widgetVar without PF shortcut
comment on: http://stackoverflow.com/a/24753702
score: 0

openlayers-3
type: Tag
tag name: openlayers-3
tags question: http://stackoverflow.com/q/24638526

http://stackoverflow.com/comment/38192346
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24640240
has text: I updated my post to add the form's HTML. the form's id is "new_post" not the surrounding DIV

http://stackoverflow.com/comment/38211614
score: 0
has text: unfortunately that returns 0/0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24650919

http://stackoverflow.com/comment/38423561
type: Comment
comment on: http://stackoverflow.com/a/24727903
has text: This is perfect! It is faster and cleaner than my string building approach.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38178326
comment on: http://stackoverflow.com/q/24633289
score: 1
has text: @Archer if only SO had a "flag as answer" button.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24777375
type: Answer
answers question: http://stackoverflow.com/q/24729175
upvote count: 1
has comment: http://stackoverflow.com/comment/38458716
score: 1
has body: This is not a cross-domain issue. You are mixing the dynamic proxy and proxyless approaches. $.hubConnection and createHubProxy are from the proxyless API, but .client is available only with dynamic proxies. Check the documentation about both and you will be able to fix it (I don't go further with code because I do not know which approach you really want to use).
accepted answer of: http://stackoverflow.com/q/24729175
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/24725995
answers question: http://stackoverflow.com/q/24725927
has comment: http://stackoverflow.com/comment/38368126
score: 0
has comment: http://stackoverflow.com/comment/38366249
has body: Get all the inputs from the page using jquery then run a loop, and for each element trim the value &lt;body&gt; &lt;input type="text" value=" abc " &gt; &lt;input type="text" value=" def " &gt; &lt;input type="button" id="remove" value="Remove"&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#remove').click(function(){ var inputs = $('input[type=text]'); $.each(inputs, function(index,input){ $(input).val($(input).val().trim()) }); }); }); &lt;/script&gt; &lt;/body&gt;
has comment: http://stackoverflow.com/comment/38353735
type: Answer

http://stackoverflow.com/comment/38116223
type: QuestionComment
has text: You don't need to notify it, just pass data to it like `ng-repeat="product in products | myFilter:filterCriteria"` and it should work automatically even without passing data due to two-way binding. Notice, that you need to modufy data in a way that angular would know the data has been modified
score: 0
comment on: http://stackoverflow.com/q/24600861
type: Comment

http://stackoverflow.com/q/24727796
has title: jQuery/PHP ajax contact form
has comment: http://stackoverflow.com/comment/38357073
type: Question
tagged with: javascript
has body: I have been fighting with this for quite awhile, searching questions, tutorials, and forums to not find a working solution. I'm extremely green in the realm of PHP and just now starting to learn. Page in progress can be found here: http://williamsfuller.com/limedropdesign/ Goal: Use front end validation using jQuery Validate (http://jqueryvalidation.org/), if validation is successful then in the submitHandler run an ajax call to a php file that takes the form values and posts them to the server. On the ajax.done function clear the form and show that the submission has been successful. Reason I'm using ajax is because I don't want the page to refresh and send the user back to the top of the page. This is a single page portfolio and if I was to do a post method on the form it will ruin the experience by reloading the page. What I have achieved thus far: -I have the jQuery validation working -If the validation is successful the ajax call runs correctly activating the contact form submission file -On the ajax.done function the contact form clears and a success message slides down telling the user the message has been sent -On the php side of things I was able to hardcode a mail function that runs which tells me that the ajax call is working and the php file is working. <?php mail('email@gmail.com', 'Mail from Lime Drop Design', 'some body content for the email '); ?> Where I'm stuck is taking the jQuery values and putting them into a working if($_POST){} and having that send off an email. I also have a honey pot in the form to catch some bots, if all the information is validated and the subject field is still filled out I'm looking to just allow the POST to die. HTML: Send Thank you, your message has been sent to Liz! JavaScript: $(document).ready(function(){ $('#result').hide(); $.validator.setDefaults({ submitHandler: function() { var nameValue = $('#name').val(); var emailValue = $('#email').val(); var messageValue = $('#message').val(); console.log(nameValue, emailV…
tagged with: forms
has comment: http://stackoverflow.com/comment/38357084
has answer: http://stackoverflow.com/a/24727838
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/38357160
accepted answer: http://stackoverflow.com/a/24727838
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/comment/38135335
has text: ok, so in my jade template pre #{tcResponseJson} and what the webpage shows is [object Object]. So my guess is that is my json object
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24600629
type: AnswerComment

http://stackoverflow.com/a/24595361
answers question: http://stackoverflow.com/q/24592607
score: 3
has comment: http://stackoverflow.com/comment/38313032
has comment: http://stackoverflow.com/comment/38270516
has comment: http://stackoverflow.com/comment/38375259
has comment: http://stackoverflow.com/comment/38118672
has body: Byte handling You can use NodeJS buffers. The byte arrays in Java may just consist of signed bytes, but those bytes are not handled any differently from unsigned bytes. Only the value of the actual bits matter. If you need to treat bytes directly, it is often best to use hexadecimals instead. You can convert to an positive integer value by performing b &amp; 0xFF and you can do the opposite by performing (byte) b. You could of course also do something similar in NodeJS to make NodeJS handle signed numbers, but it is common to treat keys, IV's etc. as unsigned. Cipher selection Now for the Java AES encryption, you are using the unsafe "AES/ECB/PKCS5Padding" mode, as the Oracle Java JCE provider defaults to ECB mode of encryption and PKCS#7 padding (incorrectly named "PKCS5Padding" by Java). ECB does not use an IV, so you can ignore the value of the IV. Strangely enough, you do have to use crypto.createCipheriv(algorithm, key, iv) as the crypto.createCipher(algorithm, password) uses a password instead of a key. Of course you should also use algorithm "AES-256-ECB" for NodeJS/OpenSSL - if your key is indeed 256 bits in size.
has comment: http://stackoverflow.com/comment/38179750
has comment: http://stackoverflow.com/comment/38105577
has comment: http://stackoverflow.com/comment/38243328
upvote count: 3
has comment: http://stackoverflow.com/comment/38332787
type: Answer
has comment: http://stackoverflow.com/comment/38179538
downvote count: 0

http://stackoverflow.com/a/24758293
has comment: http://stackoverflow.com/comment/38428509
has comment: http://stackoverflow.com/comment/38428383
has comment: http://stackoverflow.com/comment/38862268
has comment: http://stackoverflow.com/comment/38428260
score: 0
type: AcceptedAnswer
has body: Perhaps you will be able to figure out something with ranges, but I am not sure exactly how as I have not used them. Here are the basics on getting an already selected range http://www.telerik.com/help/aspnet-ajax/editor-getselection-1.html and here is how to get the document object so you can use ranges in it: http://www.telerik.com/help/aspnet-ajax/editor-getting-reference-to-radeditor-documentobject.html. Perhaps this can help you get started but I think it will be a lot of work: How to set caret(cursor) position in contenteditable element (div)? because I am not sure how you can calculate the position at which you want the cursor from the mouse coordinates.
accepted answer of: http://stackoverflow.com/q/24698425
type: Answer
answers question: http://stackoverflow.com/q/24698425

http://stackoverflow.com/comment/38122392
score: 0
has text: I can call and retrieve data just fine. For example, you can use the `set` methods callback to access the stored data. However, when I try using the example I gave in my description and then refresh my page no data is shown as updated.
type: Comment
comment on: http://stackoverflow.com/a/24603885
type: AnswerComment

http://stackoverflow.com/a/24592929
answers question: http://stackoverflow.com/q/24592737
type: Answer
has body: Adeneo helped me answer this. Because I am using Wordpress (which is in no-conflict mode), I simply replaced the '$' with 'jQuery' in the script and resolved this issue. THANKS
score: 0

http://stackoverflow.com/comment/38137130
has text: if you sure that "themes/index.html" is static, just replace it with empty string `"http:// myipaddress/folder1/folder2/themes/index.html".replace("/themes/index.html", "")`
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24611669

http://stackoverflow.com/q/24728598
upvote count: 5
has answer: http://stackoverflow.com/a/24728615
accepted answer: http://stackoverflow.com/a/24728615
has comment: http://stackoverflow.com/comment/38358792
tagged with: javascript
tagged with: string
score: 4
answer count: 1
favorite count: 0
downvote count: 1
has title: JavaScript new Date(string) returns different results on exactly identical date strings
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38358727
tagged with: date
has comment: http://stackoverflow.com/comment/38358741
type: Question
has body: I would like to share something I found with JavaScript today. Simple example here d1 = "￼￼￼￼￼￼￼2014-07-15T14:00:00.000Z" d2 = "2014-07-15T14:00:00.000Z" The input strings are ISO formatted using new Date().toISOString();. I received the first date from a server where it was stored in mongoDB as ISOString, and the second one was created manually. If I do new Date(d1);, it returns 'Invalid Date' but if I do the same for d2 it returns the correct date.

http://stackoverflow.com/q/24719184
tagged with: three.js
accepted answer: http://stackoverflow.com/a/24730530
has body: I am simply trying to add a sprite to my scene normally. I am using this image: i.imgur.com/kMT4mOH.png var map = THREE.ImageUtils.loadTexture('i.imgur.com/kMT4mOH.png'); var mat = new THREE.SpriteMaterial({map:map, color: 0xff5200, fog: true, blending: THREE.AdditiveBlending}); var glow = new THREE.Sprite(mat); scene.add(glow); However when I add color to the sprite, the entire image turns the color instead of just the white space. Here is a jsfiddle: http://jsfiddle.net/VsWb9/2331/ Im not entirely sure what Im doing wrong and any help would be appreciated.
tagged with: sprite
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17710414
tagged with: javascript
has answer: http://stackoverflow.com/a/24730530
has comment: http://stackoverflow.com/comment/38341006
has title: Unable to get Sprite maps to work correctly in THREE js
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38341281

http://stackoverflow.com/comment/38279319
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24686839
has text: This was closest to what I was trying to do my question got out of hand and I'm thinking about deleting it because I confused everyone. Very sorry. ANy possibility you could take a look at the rephrased question.

http://stackoverflow.com/comment/41700556
has text: @konsumer A lot of event finding sites have "in next 7 days" and "in next 30 days" How does one put buttons like those in the view so that it can communicate with your awesome filter? ie. I'd like to allow a user to change the days variable.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24642842

http://stackoverflow.com/q/24747488
tagged with: google-maps-api-3
has body: I am trying to implement the google maps api as a backbone.js view. This is the code I have so far for the autocomplete function: address_search_listen: function(){ //create a new auto complete object var map= this.map; var autocomplete = new google.maps.places.Autocomplete((document.getElementById('address_search')),{types: ['geocode'] }); google.maps.event.addListener(autocomplete, 'place_changed',function(){ var place = autocomplete.getPlace(); var marker = new google.maps.Marker({ position: new google.maps.LatLng(0, 0), map: map, title: "test" }); }); } The variable map is not defined within the event handler. I have tried several things with no success. Can someone help me out?
score: 0
answer count: 2
tagged with: backbone.js
has title: 'this' is not defined within a backbone.js view
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38411901
has answer: http://stackoverflow.com/a/24759156
has answer: http://stackoverflow.com/a/24759043
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43350920
type: QuestionComment
comment on: http://stackoverflow.com/q/24712398
has text: http://stackoverflow.com/questions/2863547/javascript-scroll-event-for-iphone-ipad/17195346#17195346
score: 0
type: Comment

http://stackoverflow.com/a/24612623
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/38207779
type: AcceptedAnswer
has body: Your problem is that you're adding the same date over and over again, and it's causing the chart to have a hard time interpolating the result. Try http://jsfiddle.net/KaU3y/, or: data.insertRows(data.getNumberOfRows(), [ ['' + new Date(), Math.floor((Math.random() * (1400 - 600)) + 600), 900] ]);
answers question: http://stackoverflow.com/q/24612313
accepted answer of: http://stackoverflow.com/q/24612313
type: Answer
score: 2

http://stackoverflow.com/comment/38197077
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24639571
has text: right now i chose to add a start_session(); $_SESSION['image'] = $fileName on the main PHP. on the html, i wrote <?php start_session(); $finalImage = $_SESSION['image']; ?> .. then wrote <img src="../upload/<?php echo $finalImage ?>" width="150" height="150"> but it comes with this on console: Resource interpreted as Image but transferred with MIME type text/html: "http://localhost/animerange/upload/". note, that i wrote the session_start for both of them at the very top of the php code.image won't still wont appear. i even tried require and include for php.

http://stackoverflow.com/a/24609270
answers question: http://stackoverflow.com/q/24608948
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: As the others have mentioned, use onchange instead of onselect. However, it's generally considered bad practice to use inline events in HTML. I suggest you to add the event handler in JavaScript instead. HTML Please select a color White Red Orange Yellow Green Blue Indigo Violet JavaScript document.getElementById('selectColor').onchange = function () { document.body.style.background = this.value; }; Fiddle: http://jsfiddle.net/kL3Jz/18/ You should either wrap the JavaScript code in window.onload = function () { ... } or put the tag at the end of , just before the closing tag.

http://stackoverflow.com/comment/38131678
has text: so it will be double +6721 , +6721 what do u think?
type: Comment
comment on: http://stackoverflow.com/q/24608152
score: 0
type: QuestionComment

http://stackoverflow.com/q/24684813
tagged with: javascript
score: 0
answer count: 2
has title: Select option with minimum value
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38278536
has body: I have JSON: [{name:'Mary', phone:'555-9876', age:19, date:'2011-06-12T00:00:00.000Z'}, {name:'John', phone:'555-1212', age:10, date:'2011-06-11T00:00:00.000Z'}, {name:'Mike', phone:'555-4321', age:21, date:'2011-07-13T00:00:00.000Z'}, {name:'Adam', phone:'555-5678', age:35, date:'2011-05-14T00:00:00.000Z'}, {name:'Julie', phone:'555-8765', age:29, date:'2011-06-15T00:00:00.000Z'}] I should create the &lt;select&gt; and select the name with minimum age. In my case - John. My controller: function Projects ($scope, $http) { $scope.rootEntry = []; $http.get('/api/...').success(function(root) { $scope.rootEntry = root; $scope.selectedRoot = $scope.rootEntry[0].name; }); } And HTML: &lt;select ng-options="root.age as root.name for root in rootEntry ng-model="selectedRoot"&gt; &lt;/select&gt; I can select first item - $scope.selectedRoot = $scope.rootEntry[0].name; How can I select minimum age?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24685597
possible better answer: http://stackoverflow.com/a/24685282
has comment: http://stackoverflow.com/comment/38275986
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38275811
has answer: http://stackoverflow.com/a/24685282
type: Question
accepted answer: http://stackoverflow.com/a/24685597

http://stackoverflow.com/comment/38223276
type: Comment
type: QuestionComment
has text: I want to keep the first item found with a given ID, and remove the next ones with the same ID
score: 0
comment on: http://stackoverflow.com/q/24656845

http://stackoverflow.com/q/24671005
has answer: http://stackoverflow.com/a/24671366
tagged with: extjs
type: UnansweredQuestion
has title: ExtJS 3.4 Ext.ux.form.fileuploadfield buttonOnly does not work correctly
type: Question
score: 0
has body: I'm struggling to get the Ext.ux.form.fileupoadfield extension working correctly in ExtJS 3.4. Functionally, everything works just the way it should. I want the inputfield to be a button without any text, just an icon. I have added the iconCfg with my icon class to the component, which adds the icon, but not to the browse button. Instead, it adds another button with the icon on it next to the browse button. When you mouse over the browse button, both the icon button and the browse button are highlighted. When you mouse over the icon button, the browse button does not get highlighted. When you click the icon button, the file window does not appear, only the actual browse button works. I have put the "buttonOnly" property of the component to true, which only hides the readonly text field (while still taking up space, messing up the layout). The default browse button is still displayed along with my icon button, the "No file chosen" dialog is still visible. No warnings or errors are thrown by the way. The example along with the source file: http://cpansearch.perl.org/src/VANSTYN/JavaScript-ExtJS-V3-3.4.1/share/ext-3.4.1/examples/form/file-upload.html I basically want to accomplish the layout in the second example, but with an icon instead of the text button. My code: { xtype: 'fileuploadfield', id: 'filedata', buttonOnly: true, hideLabel: true, buttonCfg: { iconCls: 'icon-excel-import' } } What it actually looks like: The same, but with buttonOnly set to false: The entire layout of the component looks messed up. I have simply used the source script from this example, and the code I am using for the component looks correct to me. Why is this component this buggy for me while it works just fine in the example over at Sencha?
answer count: 1
tagged with: javascript
tagged with: file-upload

http://stackoverflow.com/comment/129623975
comment on: http://stackoverflow.com/a/73160202
score: 0
has text: For those of you who don't know what recursion is ... to understand recursion you must first of all understand recursion
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/38177212
comment on: http://stackoverflow.com/a/24632661
has text: Fus: A Big Thanks for u Friend... Thanks a lot. :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24623116
has comment: http://stackoverflow.com/comment/38160116
has comment: http://stackoverflow.com/comment/38159813
has answer: http://stackoverflow.com/a/24623242
upvote count: 1
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/24623275
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38160839
has comment: http://stackoverflow.com/comment/38160425
tagged with: cookies
has answer: http://stackoverflow.com/a/24623377
score: -1
has comment: http://stackoverflow.com/comment/38160499
has comment: http://stackoverflow.com/comment/38160534
answer count: 3
has title: How to make countdown timer using database in PHP?
has comment: http://stackoverflow.com/comment/38160646
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24623242
tagged with: countdown
favorite count: 0
has body: I'm new in JavaScript. I'm currently making an exam application with countdown timer. I've used JavaScript timer with cookie but the problem is when the computer is shutting down the cookie is lost because the computer is frozen by deepfreeze. My question is how to make countdown timer using database? And how to make it pause the timer when browser is closed and then resume the timer when the browser is re-opened?
has comment: http://stackoverflow.com/comment/38159635
accepted answer: http://stackoverflow.com/a/24623275
tagged with: timer
downvote count: 2

http://stackoverflow.com/q/24663048
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/24663074
type: AnsweredQuestion
has body: I have a javascript file that validates a form before posting, here's the form... &lt;form action="#" name="login" method="post" onsubmit="return validate(this);"&gt; &lt;input type="text" name="user"&gt;&lt;input type="submit" class="submit"&gt; &lt;/form&gt; Here's the javascript... function validate(f) { if (f.user.length &lt; 27 || f.user.length &gt; 34) { document.getElementById("notice").innerHTML = "Invalid input"; return false; } return true; } It doesn't seemed to be firing the "notice" message, why can I not detect the length?
has title: Javascript check length of (this) in function
score: 0
type: Question
has comment: http://stackoverflow.com/comment/38234658
tagged with: object
has comment: http://stackoverflow.com/comment/38234820
tagged with: function
accepted answer: http://stackoverflow.com/a/24663074

http://stackoverflow.com/comment/38268019
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24679047
type: QuestionComment
has text: using 1.4.9....so when you add a select clause to an entityquery, it will return POJOs?

http://stackoverflow.com/comment/38184493
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24629005
type: Comment
has text: I didn't see this reply before you said you were going home. The version of makeEditable is 2.3.3 (jquery.dataTables.editable.js) and jeditable version 1.7.3. Datatable version 1.10.0 and jQuery version 1.10.1. When Add button is clicked it triggers the sADDURL and adds the data into a database. I am able to add the data to the database, but it doesn't show on the datatable until its refreshed.

http://stackoverflow.com/comment/38186260
score: 0
comment on: http://stackoverflow.com/q/24637463
type: Comment
has text: where do you try these alert statements?
type: QuestionComment

http://stackoverflow.com/q/24748104
has answer: http://stackoverflow.com/a/24767622
has comment: http://stackoverflow.com/comment/38397653
has title: Need to run code on save and log from Parse Cloud Code when updating PFObject's key in iOS app
tagged with: ios
tagged with: javascript
has comment: http://stackoverflow.com/comment/38395393
has body: I have a PFObject that has an array key. I can successfully call addObject: on this PFObject, and can confirm that the object has been added to the array key properly using an NSLog. However, when I try to save the PFObject to Parse, even though it says everything went successful, the changes are not shown in the Data Browser. I have tried everything, and can even get this to work in an older version of my app, but for some reason it will not work anymore. I posted another StackOverflow question about this here The only response I got were some comments saying that I should trigger a "before save" function and log everything via Cloud Code. The problem is I don't know javascript, and I've been messing around with Cloud Code and nothing's happening. Here is the code I am executing in my app: [self.message addObject:currentUsersObjectId forKey:@"myArrayKey"]; And then I am using saveInBackgroundWithBlock: I need to alter Cloud Code so that it will check the self.message object's "myArrayKey" before saving and log the results. Edit 2: Here is how I create currentUsersObjectId: NSString *currentUsersObjectId = [[NSString alloc]init]; PFUser *user = [PFUser currentUser]; currentUsersObjectId = user.objectId; Edit 3: Here is the save block [self.message saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (error) { NSLog(@"An error has occurred."); } }]; Edit 4: After adding Timothy's cloud code, the saveInBackgroundWithBlock: now does not successfully complete. Instead an error occurs, and the error object NSLogs as `"Error: Uncaught Tried to save an object with a pointer to a new, unsaved object. (Code: 141, Version: 1.2.17)" and also as: Error Domain=Parse Code=141 "The operation couldn’t be completed. (Parse error 141.)" UserInfo=0x15dc4550 {code=141, error=Uncaught Tried to save an object with a pointer to a new, unsaved object.} { code = 141; error = "Uncaught Tried to save an object with a pointer to a new, unsaved object."; } Here is my complete Cloud …
score: 0
has comment: http://stackoverflow.com/comment/38395760
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/38396102
possible better answer: http://stackoverflow.com/a/24767622
accepted answer: http://stackoverflow.com/a/24752928
has comment: http://stackoverflow.com/comment/38395900
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/24718404
has comment: http://stackoverflow.com/comment/38396052
has answer: http://stackoverflow.com/a/24752928
type: Question
answer count: 2

http://stackoverflow.com/comment/38298022
type: QuestionComment
has text: I have to run to following code function checkCustomInputType(element, type) { $(element).attr("type", type); var invalidValue = ''; if (type == 'date') { invalidValue = 'invalid-date-value'; } $(element).val(invalidValue); return !(input.value === invalidValue); } each time a new template is lodaded, to see if the browser supports the date-type on an input, otherwise add a different class to show a javascript date picker.
comment on: http://stackoverflow.com/q/24697343
score: 0
type: Comment

http://stackoverflow.com/a/24608968
type: Answer
answers question: http://stackoverflow.com/q/24589376
has body: Or another solution, using different series for each part of bar: http://jsfiddle.net/s9qHH/48/ var ranges = [12, 18, 23, 28, 35, 42, 50, 1000], rangesLen = ranges.length, series = []; $.each(ranges, function(i, e){ series.push({ //create series' containers for legend id: e+'index', name: e }); }); $.each(ageData, function(i, e){ var x = e[0], y = e[1], index = 0; while(ranges[index] &lt; x){ // get category index index ++; } series.push({ showInLegend: false, linkedTo: ranges[index] +'index', // link to container series data: [ [index, y] ] //add point at specific category }) }); Still, I think that's Sebastian's solution is faster.
score: 0

http://stackoverflow.com/q/24715509
tagged with: javascript
has answer: http://stackoverflow.com/a/24765411
has title: Avoiding redundancy in parallel async tasks
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38332792
possible better answer: http://stackoverflow.com/a/24718387
has answer: http://stackoverflow.com/a/24718387
has comment: http://stackoverflow.com/comment/38332890
tagged with: asynchronous
tagged with: node.js
tagged with: parallel-processing
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38333059
accepted answer: http://stackoverflow.com/a/24765411
has comment: http://stackoverflow.com/comment/38332928
has body: I am currently writing a small application with Node.js to help me with the edition and compilation of some custom file format. My problem is that I have lots async calls to read a directory, perform XHR requests or exec some child process, but must of these tasks should avoid being processed in parallel. In example, I have a button to ask the content of a directory to the server : if I click quickly on this button it sends multiple times the same request and receives the same response as well. It would be better if once one request is fired, all the other identical requests "wait" for the common result. I am using the Async lib and was trying to find a function to do it but I wasn't able to spot it. I also searched on Google &amp; Stack Overflow but there was no satisfying answer - I do not really know how to "name" this problem. In the past I used a solution of this form, but I feel there's certainly a better way : var requesting = false ; var callbacks = [] ; var request = function ( target , cb ){ callbacks.push(cb) ; if ( ! requesting ) { requesting = true ; asyncTask( target , function(err,resp){ requesting = false ; for (var i=0,c=callbacks.length;i&lt;c;i++) { callbacks[i](err,resp) ; } }) ; } } request( "/dirA" , function(err,resp){ ... } ) ; request( "/dirA" , function(err,resp){ ... } ) ; //Ok, avoinding redundant code request( "/dirB" , function(err,resp){ ... } ) ; //Problem -&gt; You can use only one target I'm searching for a general implementation, possibly allowing a lightweight use. Maybe something like : var request = function ( target , cb ){ avoidRedundancy( target , cb , function(){ asyncTask( target , function(err,resp){ //And now, how do I return the response ? }) ; }) ; } //avoidRedundancy( requestIdentifier , callback , taskToExecute ) Thanks
type: Question
has comment: http://stackoverflow.com/comment/38333113

http://stackoverflow.com/a/24719203
downvote count: 0
has comment: http://stackoverflow.com/comment/125674790
upvote count: 11
has body: The . operator associates left-to-right. so you would do the substring first, then the lower case.
type: Answer
answers question: http://stackoverflow.com/q/24719189
score: 11
has comment: http://stackoverflow.com/comment/125680334

http://stackoverflow.com/comment/38169035
type: Comment
type: QuestionComment
has text: Did you really tried to search this? [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/Window.setTimeout) at MDN. Two seconds from what?
comment on: http://stackoverflow.com/q/24628296
score: 1

http://stackoverflow.com/q/24702932
score: 0
has comment: http://stackoverflow.com/comment/38309003
answer count: 1
has comment: http://stackoverflow.com/comment/38308769
tagged with: jquery
has comment: http://stackoverflow.com/comment/38316699
has comment: http://stackoverflow.com/comment/38308797
has comment: http://stackoverflow.com/comment/38308922
linked to: http://stackoverflow.com/q/359494
type: UnansweredQuestion
has body: I'm trying to build a landing page with php &amp; js validation - i create the html/php &amp; etc, but the .JS script always hangs on the last "else"... and gives the "123" alert... i debugged it for syntax problem for hundred of time with any online debugging site i know - but it's seems to be something else.... $(document).ready(function(){ $('form.landing-form').submit(function(){ var name = $.trim($('input[type="text"].field-name').val()); var email = $.trim($('input[type="text"].field-email').val()); var phone = $.trim($('input[type="text"].field-phone').val()); var nameReg = /^[a-zA-Z ]+$/; var emailReg = /^([\w-\.]+@([[\w-]+\.)+[\w-]{2,4})?$/; var phoneReg = /^[0-9-+]+$/; $('input[type="text"]').removeClass('error'); if(name.length &lt; 2 || !nameReg.test(name)) { $('input[type="text"].field-name').addClass('error'); $('input[type="text"].field-name').val(''); $('input[type="text"].field-name').attr('placeholder','*valid name is requierd!'); } else if (email.length &lt; 5 || !emailReg.test(email)) { $('input[type="text"].field-email').addClass('error'); $('input[type="text"].field-email').val(''); $('input[type="text"].field-email').attr('placeholder','*email is requierd!'); } else if (phone.length &lt; 9 || !phoneReg.test(phone)) { $('input[type="text"].field-phone').addClass('error'); $('input[type="text"].field-phone').val(''); $('input[type="text"].field-phone').attr('placeholder','*phone is requierd!'); } else { $.ajax({ url: "handler/form_handler.php", type : "POST", dataType: "html", async: "false", data : { name:name, email:email, phone:phone }, beforeSend : function () { var messege = '&lt;img src="images/ajax-loader.gif" border="0"&gt;'; messege += '&amp;nbsp;&amp;nbsp;Sending...'; $('form.landing-form label').html(messege); }, success: function(response) { if(response == true){ alert('321'); } else { alert('123'); } } }); } return false; }); }); Any ideas?
tagged with: php
has answer: http://stackoverflow.com/a/24708562
has comment: http://stackoverflow.com/comment/38308870
has title: having problems with landing page
has comment: http://stackoverflow.com/comment/38316818
type: Question
has comment: http://stackoverflow.com/comment/38315257
has comment: http://stackoverflow.com/comment/38308660
tagged with: javascript
has comment: http://stackoverflow.com/comment/38309522
has comment: http://stackoverflow.com/comment/38309535

http://stackoverflow.com/comment/38410318
has text: fyi: you can review bindings and other usefull information with the sapui diagnostics tool. Just press ctrl+shift+alt+s inside your sapui application to open it and use the "Control Tree" to navigate through your controls.
comment on: http://stackoverflow.com/q/24740529
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/24606187
answers question: http://stackoverflow.com/q/24605695
accepted answer of: http://stackoverflow.com/q/24605695
score: 0
type: AcceptedAnswer
has body: Hi try to add this config to your combo. Here your are increasing the drop down's height there by you can see more options. listConfig:{ maxHeight: //Give a value that suits your req. } Refer the docs for further information Hope it helps you
type: Answer

http://stackoverflow.com/comment/38267889
type: QuestionComment
has text: @WebUser User They are doing both?
score: 0
comment on: http://stackoverflow.com/q/24681000
type: Comment

http://stackoverflow.com/q/24601087
tagged with: crosswalk-runtime
accepted answer: http://stackoverflow.com/a/24604567
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29233278
has answer: http://stackoverflow.com/a/29233278
tagged with: android
has title: Crosswalk call js function from java on android
favorite count: 0
has answer: http://stackoverflow.com/a/24604567
has answer: http://stackoverflow.com/a/54215051
answer count: 4
type: AnsweredQuestion
score: 4
has answer: http://stackoverflow.com/a/37584816
has body: I m trying to use crosswalk runtime in my android app. I tried this on android 4+. I got some js &amp; html codes and it worked perfect for me. But it is not working like android webview. In the webview i can call javascript functions from java code. But i couldnt find any option in crosswalk. Any idea? Thanks
tagged with: java
type: Question
upvote count: 4

http://stackoverflow.com/q/24637491
has comment: http://stackoverflow.com/comment/38186332
type: Question
type: AnsweredQuestion
has title: jQuery. How do I combine a JS variable with a tag literal?
accepted answer: http://stackoverflow.com/a/24637568
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Here I have a modal dialog that hosts two tabs: http://www.bootply.com/f24gE2KvF3 In the JS code: $('#trackFilterTabSet_GUID a').click(function (e) { // present tab alert('present tab'); e.preventDefault(); $(this).tab('show'); }) $('#trackFilterTabSet_GUID a[data-toggle="tab"]').on('shown.bs.tab', function (e) { // do something awesome // alert('shown.bs.tab event fired'); e.target // activated tab e.relatedTarget // previous tab }) I want to replace #trackFilterTabSet_GUID with a JS variable: var mySelector = "#trackFilterTabSet_" + myStringGeneratingFunction(); How do I combine this JS variable with a in the first function and a[data-toggle="tab"] in the second function?
score: 0
has answer: http://stackoverflow.com/a/24637568
has comment: http://stackoverflow.com/comment/38186377
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/38382541
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24741441
has text: You should end your lines with semi-colons. It's best practice. Example: `var new_data = JSON.parse(data);`
score: 2

http://stackoverflow.com/q/24619053
downvote count: 0
has answer: http://stackoverflow.com/a/24646493
favorite count: 0
has comment: http://stackoverflow.com/comment/38153773
tagged with: angularjs
type: UnansweredQuestion
tagged with: ng-tags-input
has answer: http://stackoverflow.com/a/30417293
score: 1
upvote count: 1
type: Question
has title: How can I add or remove a tag with ng-tags-input within a function
has body: I am using ng-tags-input, and trying to modify the input so that only tags which are permitted can be added. For example, an array contains 'Tag1' but not 'T1', and so when 'T1' is entered in the input bar it is not accepted, but 'Tag1' is because it is 'permitted'. Thanks.
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/38193058

http://stackoverflow.com/a/24632632
upvote count: 1
answers question: http://stackoverflow.com/q/24632326
has body: It is showing undefined because comment-4 and comment-5 are childrens of different parent elements. Means comment-4 is children of first_div and second_div parent of comment-5. You can get the comment-5 using below code. $('#comment-4').parent().next().children().attr('id');
type: Answer
downvote count: 1
score: 0

http://stackoverflow.com/q/24687395
accepted answer: http://stackoverflow.com/a/24687493
has body: I have a form which has multiple select boxes inside it. I wanted to disable the submit button until one of the checbox is checked. The following solution kinda works for me: $(document).on('click', '#my_ids', function() { if($(this).prop('checked') == false){ $('.btn').prop('disabled', true); } else { $('.btn').prop('disabled', false); } }); But instead of that I want to give the form an 'id' and until one of the checkbox is checked inside the form I want to disable the submit button. Not very sure how to get there in an efficient way. Here is a kind of a gist of my form: William </td Assign
type: AnsweredQuestion
tagged with: forms
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24687493
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/24687596
has answer: http://stackoverflow.com/a/24687596
has title: form disable submit button until its child checkboxes are checked

http://stackoverflow.com/comment/38092002
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24588368
score: 0
has text: *"...so that each key has a new key for order"* Could you explain what you mean by that? I'm not understanding what you mean.

http://stackoverflow.com/q/24734278
type: Question
has title: PHP / Javascript - Get a unique fingerprint of a user device
has comment: http://stackoverflow.com/comment/38369187
tagged with: device
score: 3
has comment: http://stackoverflow.com/comment/38369299
tagged with: unique
favorite count: 0
has comment: http://stackoverflow.com/comment/38369520
has comment: http://stackoverflow.com/comment/38369150
has comment: http://stackoverflow.com/comment/38369271
has comment: http://stackoverflow.com/comment/38369465
tagged with: php
has comment: http://stackoverflow.com/comment/38369408
has comment: http://stackoverflow.com/comment/38369238
linked to: http://stackoverflow.com/q/15966812
has body: I've been searching through Internet for a suitable solution for this, but I've not been able to find a good answer. Of course, I know that there is a possibility that what I'm asking here is impossible because of the Sandbox of browsers, but maybe the experts here can light up something good! What I'd like to I've got a web application in which users are registered and need to log in in order to access it. However, I'd like each user to be able to use only a few devices (3, for example) so, if a new device (a 4th one) is detected, it should show a message to the user telling him to upgrade to a Pro version or unlink one of his devices, etc. So, what I would like is to have a unique fingerprint of a user's device which would be hard to change (it has not to be impossible, but not as easy as changing the browser). What I've found In the Internet I've come across some solutions which take information from user's screen, browser version, SO, and browser's plugins, mixing this information and making a unique md5 hash. The problem comes when the user changes the browser. The browser's plugins and the browser itself will change, so one of the most unique fingerprints (the plugins) will be obsolete, and it will be identified as a new device. And the same if the user installs a new plugin to the browser, for example. So: they are not a possibility. The IP cannot be taken into account neither, as I cannot assure the client will always access the application from the same location. Talking about letting or not a user access my application, I cannot base my identification in something that can be changed so easily. What I've thought to I've thought of using localStorage. If the user has not an ID in a localStorage, it's a new device. However, whenever the browser starts to go slow, everyone recommends to "clean" website data, so localStorage would be gone again. So, not the solution. With the cookies is about the same problem as with localStorage, so not the solution neither. …
upvote count: 3
has comment: http://stackoverflow.com/comment/38369339
duplicate of: http://stackoverflow.com/q/15966812
tagged with: fingerprint
downvote count: 0
answer count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/24681014
answers question: http://stackoverflow.com/q/24681013
score: 0
type: AcceptedAnswer
type: Answer
has body: The answer is pretty simple. Use $.event.trigger to create a new event queue, bind all event handlers past the current handler to the new event, stop propagation on the current event, on success of the jsonp call trigger the new event. // Bind our function to the event name $('.selector').bindFirst(evnt_nm, {}, function(e){ var that = this // Stop all propagation from this event queue e.preventDefault() if (e.stopImmediatePropagation) e.stopImmediatePropagation() if (e.cancelBubble!=null) e.cancelBubble = true e.stopPropagation() // Create the new my-queue event $.event.trigger({ type: "my-queue", message: e, time: new Date() }); // Copy this events queue // Using slice(0) creates a copy instead of a reference var events = $._data( $(this)[0] ).events[evnt_nm].slice(0) // Remove this event from the queue events.shift() // Bind the event handlers to the new queue $.each(events, function(index, event){ $(that).bind('my-queue',event.handler) }) // Make your jsonp call $.ajax({ // ... success : function(data, textStatus, jqXHR){ // ... // Trigger the rest of the events stored in the new queue once your finished. $(that).trigger('my-queue') } }) return false; }) Now when ever your event is triggered the rest of the events in the queue will not be processed until the jsonp call successfully returns.
accepted answer of: http://stackoverflow.com/q/24681013

http://stackoverflow.com/comment/38318623
comment on: http://stackoverflow.com/q/24707771
score: 0
type: Comment
type: QuestionComment
has text: What do you mean "use in second nested controller for each ng-change?"

http://stackoverflow.com/comment/38500013
has text: Thanks, but what is the difference? My ApplicationController is a parent of all other controllers.
comment on: http://stackoverflow.com/a/24737548
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24636116
accepted answer of: http://stackoverflow.com/q/24635884
answers question: http://stackoverflow.com/q/24635884
score: 36
has comment: http://stackoverflow.com/comment/124117632
upvote count: 36
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38184071
has body: This could probably be optimised a fair bit, but here is a basic example of how you could do it using setInterval and clearInterval Fiddle Update Here is another example of it wrapped into a function instead, bit easier to tweak the speed etc. Fiddle

http://stackoverflow.com/comment/112040613
type: AnswerComment
score: 0
type: Comment
has text: This post is old. Now you may have to use `.dataset.attrname` . Use your dev console to see the object returned by `.dataset` .
comment on: http://stackoverflow.com/a/24673640

http://stackoverflow.com/comment/38294653
comment on: http://stackoverflow.com/q/24682034
score: 0
type: Comment
type: QuestionComment
has text: Understand it's not using knockout.validation.js but this handles all the display of error messages when validation fails automatically, so might be a good candidate for you.

http://stackoverflow.com/a/24647770
has body: As far as i understood your question you can encode the values like this in C# string encodedValue= HttpUtility.HtmlEncode(txtInput.Text); Note: here txtInput is the id of TextBox on your page.
downvote count: 0
has comment: http://stackoverflow.com/comment/38212693
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24647478
has comment: http://stackoverflow.com/comment/38212744
score: 1

http://stackoverflow.com/q/24596163
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I have this structure and want to disable certain Links without having an effect on other Links in a certain div. <a href"#">DISABLE THIS LINK KEEP THIS LINK ENABLED KEEP THIS LINK ENABLED KEEP THIS LINK ENABLED <a href"#">DISABLE THIS LINK KEEP THIS LINK ENABLED KEEP THIS LINK ENABLED KEEP THIS LINK ENABLED <a href"#">DISABLE THIS LINK KEEP THIS LINK ENABLED KEEP THIS LINK ENABLED KEEP THIS LINK ENABLED I tried it with something like this: $(".navigation a").click(function(e){ e.preventDefault(); }); $(".subitem a").click(function(){ return true; }); But this didn't work. Any ideas how i can disable the "DISABLE THIS LINK" and keep the others enabled without changing the HTML?
has answer: http://stackoverflow.com/a/24596222
possible better answer: http://stackoverflow.com/a/24596201
tagged with: navigation
type: Question
has answer: http://stackoverflow.com/a/24596201
tagged with: mobile
downvote count: 0
has answer: http://stackoverflow.com/a/24596384
tagged with: javascript
tagged with: jquery
answer count: 3
accepted answer: http://stackoverflow.com/a/24596384
has title: Disable a specific Link with javascript, keep others active
favorite count: 0

http://stackoverflow.com/q/24601642
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
type: UnansweredQuestion
has title: Laravel Routes/jQuery $.post() returning 404 Not Found
tagged with: php
has body: Javascript file including jQuery that sends the POST request. $.post('sign_in', { email: email, password: password }, function(result) { $('#sign_in_result').html(result); console.log(result); }); Laravel routes.php file that includes the POST route. &lt;?php Route::get('/', 'HomeController@showWelcome'); Route::post('sign_in', function() { return 'Test'; }); Rather than returning test, nothing is returned. In the console it's showing 404 Not Found. POST http://localhost/project/public/sign_in 404 (Not Found)
has answer: http://stackoverflow.com/a/24615930
type: Question
tagged with: laravel-4

http://stackoverflow.com/a/24689497
score: 1
answers question: http://stackoverflow.com/q/24689347
has comment: http://stackoverflow.com/comment/38284428
has comment: http://stackoverflow.com/comment/38283828
has body: As we all know - javascript is single threaded by its nature. What it means is that when js code is being executed - a browser freezes. It means that whatever you "do" in the browser at that very moment - isn't handled by it, since the browser application is not responsive to the interactions. What it means is that it's not events dropped, but it's less events emitted, since now browser spends more time executing JS instead of handling your inputs.
upvote count: 1
has comment: http://stackoverflow.com/comment/38284258
type: Answer
has comment: http://stackoverflow.com/comment/38284274
downvote count: 0

http://stackoverflow.com/comment/38343862
comment on: http://stackoverflow.com/a/24720866
score: 1
type: AnswerComment
has text: @Lix That's probably a much better choice. I almost never use that idiom myself, preferring to bind `this` in other ways, so I just used the first thing that came to mind. I'll go ahead and change to `self` in case anyone stumbles on this from google though, thanks!
type: Comment

http://stackoverflow.com/q/24737098
answer count: 3
tagged with: validation
favorite count: 0
accepted answer: http://stackoverflow.com/a/24737238
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24737312
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/24737244
has answer: http://stackoverflow.com/a/24737244
has title: Validate that a file is present
downvote count: 0
has answer: http://stackoverflow.com/a/24737238
tagged with: javascript
tagged with: jquery
has body: I have a JavaScript function that is looking to verify that one of two file inputs are populated, though at the moment I have an issue where validation will only work (i.e. the error message will hide) when only both input fields are populated. Why would I be getting this? function validateFileInput() { var ownImage = $('#fileField').val(); console.log(ownImage); var defaultImage = $('#defImage').val(); console.log(defaultImage); if (ownImage == "" || defaultImage == "") { $('#image_error').addClass('error-message'); $(".error-message").css('display', 'inline-block'); return false; } else { $('#image_error').removeClass('error-message'); $("#image_error").css('display', 'none'); return true; } } When logging to the console before the function is run I get ownImage = "" defaultImage = "" When I then upload files to both fields I get the output below and validation passes ownImage = "filename.jpg" defaultImage = "4" // I'm passing a data-attribute-id here Whereas if I only upload one image, validation fails. I want validation to pass if either of the input fields have an upload.

http://stackoverflow.com/comment/38270755
type: Comment
comment on: http://stackoverflow.com/a/24682505
type: AnswerComment
has text: @KesaVan you chose mootools framework instead of jquery, thats why it appears to you like its working, but in fact the whole code does not execute thats why the drop down height remains intact...
score: 0

http://stackoverflow.com/a/24672937
has comment: http://stackoverflow.com/comment/38256466
answers question: http://stackoverflow.com/q/24671343
has body: You can filter but that would be separate from dimple, just reduce the dataset that you pass to the chart. You can set extra order rules using the addOrderRule method of the axis. NB. Version 2.0.0 has a bug in it's ordering logic which might make it difficult, I suggest you either get version 1.1.5 or if you want some features from version 2 you can pick up the current pre-release build from Git Hub which has a fix in place.
has comment: http://stackoverflow.com/comment/38254606
has comment: http://stackoverflow.com/comment/38254433
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24671343

http://stackoverflow.com/q/24684413
tagged with: jqgrid
has answer: http://stackoverflow.com/a/24694986
tagged with: javascript
has body: I had built a custom component with the jqGrid package in a Joomla 1.6 site a few years ago. I am migrating to a new Joomla 3.3 site. What is happening is that the pager of the grid has lost some of the styling. The old site looks like this: and the new site looks like this: You can see the pager on the second one is messed up. The scripts are a little dated, but I have them saved on the server and they the files are identical on the 2 sites: So I am thinking it must be some problem with the new Joomla site's CSS. Just hoping someone might have some ideas how to trouble-shoot the problem. I had tried this fix: http://aleemkhan.wordpress.com/2014/05/05/fix-jqgrid-pager-input-too-wide/, and it seems like the right direction but doesn't quite clean everything up. Since the styling works correctly on the old site I would love just to identify what is over-writing or canceling the styling that I want, but I am not sure how to find it. Thanks!
tagged with: jquery
has title: jqgrid pager losing good style when inserting into a new website
type: Question
accepted answer: http://stackoverflow.com/a/24694986
type: AnsweredQuestion
tagged with: css
linked to: http://stackoverflow.com/q/21605082
tagged with: joomla
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/24684972
has answer: http://stackoverflow.com/a/24684972

http://stackoverflow.com/q/24640246
tagged with: firefox
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38192045
has title: HTML5 geolocation error handling not working on Firefox
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6932758
favorite count: 0
answer count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/6932758
tagged with: geolocation
upvote count: 1
score: 1
has body: There is an HTML5 geolocation sample code on w3schools: http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation_map You can find very similar codes on Google's website and other: https://developers.google.com/maps/documentation/javascript/examples/map-geolocation When I run these codes in Chrome it does what it's supposed to do. However when I run them in my Firefox (version 25.0.1), it works well when I allow 'sharing location', but doesn't do anything when I don't allow 'sharing location'. It just doesn't run the tasks in handleNoGeolocation(...). For example for the w3schools demo (link above), in Firefox when I click on "Not Now" in the 'share location' box that appears, it doesn't do what it's supposed to do which is displaying User denied the request for Geolocation. (it works fine in Chrome). What's wrong with the code and how can I fix it? Thanks a lot.
has comment: http://stackoverflow.com/comment/38191956
type: Question
tagged with: google-maps

http://stackoverflow.com/q/24710072
has body: I am facing problem when i am sorting observable array, array gets updated but not changing UI code: Model code: function OrderByOptionModel(field, displayText, isSelected, dispIndex) { var self = this; self.field = field; self.dispText = displayText; self.isSelected = ko.observable(isSelected); self.dispIndex = dispIndex; self.click = function (data) { if (data == null) return; data.isSelected(!data.isSelected()); }; self.getOrderByOptions = function () { return [ new OrderByOptionModel(OrderByTypes.INDUSTRY, 'Industry', false, 1), new OrderByOptionModel(OrderByTypes.SUPERSECTOR, 'Super Sector', false, 2), new OrderByOptionModel(OrderByTypes.SECTOR, 'Sector', false, 3), new OrderByOptionModel(OrderByTypes.SUBSECTOR, 'Sub Sector', false, 4), new OrderByOptionModel(OrderByTypes.COUNTRY, 'Country', false, 5), new OrderByOptionModel(OrderByTypes.MARKETCAP, 'Market Cap', false, 6), new OrderByOptionModel(OrderByTypes.ATOZ, 'A - Z', false, 7), new OrderByOptionModel(OrderByTypes.DATETIME, 'Date Time', false, 8) ]; }; return self; } Observable Array: self.orderByOptions = ko.observableArray(OrderByOptionModel().getOrderByOptions()); Sorting Code: self.orderByOptions().sort(function (l, r) { return l.dispIndex &gt; r.dispIndex ? 1 : -1; }); But UI not gets updated i dont know where is the problem?
tagged with: knockout.js
type: Question
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: sorting
score: 0
upvote count: 1
has title: UI not updating when sorting observable array in KnockoutJs
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24710262
type: UnansweredQuestion

http://stackoverflow.com/a/24691780
has comment: http://stackoverflow.com/comment/38288098
answers question: http://stackoverflow.com/q/24691675
type: Answer
has body: Please use the widthproperty instead of maxWidth. Also your for loop is missing < . Please check this JSFiddle link Here is the updated working code Click me
score: 0

http://stackoverflow.com/a/24606623
has comment: http://stackoverflow.com/comment/38142536
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38128193
upvote count: 1
has comment: http://stackoverflow.com/comment/38128556
type: Answer
has body: Regarding not seeing the latest file, please check if the browser is not caching the files. Try again by deleting the browser cache. I also wonder, how can I explore the files that I uploaded to azure website? In other web hosters, they usually have, file manager, or using ftp. Btw, can we also access azure website root folders using ftp? If you deployed your application by using a publish profile file, open that file in a text editor. You will see FTP credentials in that file (see sample file contents below) &lt;publishData&gt; &lt;publishProfile profileName="mytestwebsite - Web Deploy" publishMethod="MSDeploy" publishUrl="mytestwebsite.scm.azurewebsites.net:443" msdeploySite="mytestwebsite" userName="$mytestwebsite" userPWD="&lt;cryptic password&gt;" destinationAppUrl="http://mytestwebsite.azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com"&gt; &lt;databases/&gt; &lt;/publishProfile&gt; &lt;publishProfile profileName="mytestwebsite - FTP" publishMethod="FTP" publishUrl="ftp://waws-prod-blu-015.ftp.azurewebsites.windows.net/site/wwwroot" ftpPassiveMode="True" userName="mytestwebsite\$mytestwebsite" userPWD="&lt;cryptic password&gt;" destinationAppUrl="http://mytestwebsite.azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com"&gt; &lt;databases/&gt; &lt;/publishProfile&gt; &lt;/publishData&gt; You can download this file by visiting "Dashboard" section of your Azure Website in Azure Portal.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24605865
has comment: http://stackoverflow.com/comment/38142693
answers question: http://stackoverflow.com/q/24605865
score: 1

http://stackoverflow.com/comment/40553491
type: QuestionComment
score: 1
has text: How did you fix this? How do you get access to an object with `refreshView()`?
comment on: http://stackoverflow.com/q/24595847
type: Comment

http://stackoverflow.com/a/24724290
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/24724177
downvote count: 0
answers question: http://stackoverflow.com/q/24724177
score: 1
has body: Here is a JsFiddle to get you started. &lt;div id="test"&gt;&lt;/div&gt; &lt;script&gt; var dynamicBtn=document.createElement("BUTTON"); var buttonText=document.createTextNode("Hello..."); dynamicBtn.appendChild(buttonText); document.body.appendChild(dynamicBtn); dynamicBtn.onclick = function(){alert("Hi")}; &lt;/script&gt;

http://stackoverflow.com/comment/38190992
comment on: http://stackoverflow.com/q/24639555
has text: The wording in your question is confusing. Are you trying to send a POST request from the client (a browser or whatever) to the Node server? Or...if not...what?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24708271
has comment: http://stackoverflow.com/comment/38321424
has comment: http://stackoverflow.com/comment/38325306
has title: How to remove optgroup while leaving options
accepted answer: http://stackoverflow.com/a/24708382
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38320254
score: -1
type: Question
upvote count: 0
has body: Can anyone please explain why jQuery works on the original code but deletes all the option for my code. var i=0; var cursel = "#mySelect".concat(i); $(cursel).children().remove("optgroup"); Original Code: http://jsfiddle.net/frJEq/ My Code: http://jsfiddle.net/frJEq/43/ I have multiple of the exact same select menu so that's why I have it setup for the concat to put in the counter. But why does it work for the original and not mine? I have been pouring over code and examples and can't see why.
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: optgroup
favorite count: 0
has comment: http://stackoverflow.com/comment/38319492
has answer: http://stackoverflow.com/a/24708382

http://stackoverflow.com/comment/38143121
comment on: http://stackoverflow.com/q/24614666
score: 0
type: Comment
type: QuestionComment
has text: You click on the image and its adds a div where you clicked and first click will have id of 1

http://stackoverflow.com/a/26476477
has body: Alternative solution using a directive. Accepted answer didn't work for me in Firefox (v 33.0). The idea was to set the required attribute to false on all radios with a specific class name, on change. jQuery was added because I was having trouble with the jqlite remove attribute function. I copied as much as possible from the original plunker. http://plnkr.co/edit/nbzjQqCAvwNmkbLW5bxN?p=preview Example - example-radio-input-directive-production color = Submit
has comment: http://stackoverflow.com/comment/41590961
has comment: http://stackoverflow.com/comment/41590477
answers question: http://stackoverflow.com/q/24685664
score: 0
has comment: http://stackoverflow.com/comment/41590823
type: Answer

http://stackoverflow.com/comment/81998580
type: AnswerComment
has text: @Tomer I can't inject $httpParamSerializerJQLike nor $httpParamSerializer, the way it was described here https://stackoverflow.com/a/30970229/340142 . I am using AngularJS 1.6.6. Every time I inject it into controller I get `undefined` or `$http function` :( So I choose this resolution because it just works!
comment on: http://stackoverflow.com/a/24964658
type: Comment
score: 0

http://stackoverflow.com/q/24628409
has comment: http://stackoverflow.com/comment/38169497
has body: I am building a chrome extension in which to close the popup window I am using window.close() and self.close() and both of them are working in Google Chrome for Kali Linux but not in Google Chrome for Mac where both of the google chrome versions are same being 35.0. Same is the case with chrome.runtime.reload(). It works on chrome linux but not on chrome for mac. Suggest some reliable methods to close the popup window and reload the same extension. I dont want to use management permission to do the same. Thanks in advance!
downvote count: 0
favorite count: 0
tagged with: google-chrome-extension
answer count: 0
type: UnansweredQuestion
score: 1
has title: some methods working on linux not on mac on same version of chrome
upvote count: 1
tagged with: google-chrome
type: Question
tagged with: javascript

http://stackoverflow.com/q/24604911
type: AnsweredQuestion
has title: Force row height in HTML for ng-animation
type: Question
has answer: http://stackoverflow.com/a/24605354
has answer: http://stackoverflow.com/a/24605073
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/24605073
answer count: 2
accepted answer: http://stackoverflow.com/a/24605354
tagged with: angularjs
has body: I have an AngularJS module with a page that shows a table of topics and subtopics. Each topic is a tbody element with 2 rows: one representing the topic name, and one containing a nested table where the rows are the subtopics. Each topic has an expand / collapse button that controls the subtopics, i.e. ng-shows / hides the row where the subtopics table is: {{topic.name}} Expand / collapse {{subtopic.name}} I'd like the subtopics row to appear / disappear with ng-animation, but the main problem is that no matter what I do, I can't seem to control the height of this row. Fiddle
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/24614352
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24614992
has title: phonegap jquery cross domain html
has comment: http://stackoverflow.com/comment/38142552
tagged with: cross-domain
tagged with: javascript
tagged with: jquery
has body: at first: sorry for my bad english... also im new in js, css, html, jquery, phonegap etc. Cross domain should not be a problem because PhoneGap is a file base (file:///) where such restriction doesn't apply, right? i know, that i need to whitelist the server in my config.xml like here http://docs.build.phonegap.com/en_US/configuring_access_elements.md.html#Access%20Elements but what is the best way to do it? A simple httprequest? A Plugin? ajax ?(I've haerd that ajax isnt good at file:/// requests).... i shall not use a proxy JSONP CORS (Cross-origin ressource sharing) here you can see how the html code from the server will look like: Memorycards Memorycards here are all Memorycards memory1 memory2 new Memorycard i want to put the names (memory1, memory2) in a list and the links (link1, link2) into another list. Hope you guys can help me!
type: Question
has comment: http://stackoverflow.com/comment/38143152
tagged with: cordova
score: 0

http://stackoverflow.com/q/24654478
tagged with: ajax
score: 0
has body: I have a code that is supposed to check if a page is loaded and then alert me with a status. The code for some reason will not work. I would appreciate it if you can take a look at it and tell me what I did wrong. Looking foward to a answer! var xmlHttp = createXmlHttpRequestObject(); function createXmlHttpRequestObject(){ var xmlHttp; if(window.ActiveXObject){ try{ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ xmlHttp = false; } }else{ try{ xmlHttp = new XMLHttpRequest(); }catch(e){ xmlHttp = false; } } if(!xmlHttp){ alert("Error"); } else{ return xmlHttp; } } function process(){ if(xmlHttp.readyState==0 || xmlHttp.readyState==4){ xmlHttp.open("GET", "djhgkjshgkjsd.com", true); xmlHttp.onreadystatechange = handleServerResponse; } else{ setTimeout('process()', 1000); } } function handleServerResponse(){ if(xmlHttp.readyState==4){ if(xmlHttp.status==200){ xmlResponse = xmlHttp.responseXML; alert("Hi..."); // This is just to test where my code fails }else{ alert('Something is wrong!'); } } }
has answer: http://stackoverflow.com/a/24654592
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38218299
has title: Opening webpage in Ajax and checking statues code
tagged with: http
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/24732445
has body: You should be able to just do: moment().tz("America/Toronto").format(); EDIT As Matt Johnson pointed out in the comments, you're perhaps not including the moment-timezone data file. Here is a fiddle to demonstrate (check out the external resources).
has comment: http://stackoverflow.com/comment/38382064
accepted answer of: http://stackoverflow.com/q/24732256
has comment: http://stackoverflow.com/comment/38381621
answers question: http://stackoverflow.com/q/24732256
has comment: http://stackoverflow.com/comment/38388704
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38379367
has comment: http://stackoverflow.com/comment/38381596
has comment: http://stackoverflow.com/comment/38381676
has comment: http://stackoverflow.com/comment/38381492
upvote count: 2
has comment: http://stackoverflow.com/comment/38367879
type: Answer

http://stackoverflow.com/comment/38329886
type: Comment
has text: This does not add a space but a no-break space. They are two different characters. Although they might in some context both be used, and no-break space might even be better, the question asks for a space.
comment on: http://stackoverflow.com/a/24708563
type: AnswerComment
score: 0

http://stackoverflow.com/q/24741161
tagged with: jquery
has title: Toggle an event on scroll
has answer: http://stackoverflow.com/a/24741270
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
has body: So I want to trigger an event when a user scroll down between 30 and 20pixels, then trigger the opposite action when they scroll back up: var flagscroll=true; $(window).scroll(function(){ var y = $(window).scrollTop(); if( y &lt; 30 &amp;&amp; y &gt; 20 &amp;&amp; flagscroll==true ) { flagscroll=false; $('[data-label="SearchPanel"]').animate({ top: "-=34px", }, 200 ); } }); // how do I do the opposite action? Thanks for any ideas!
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/38273305
comment on: http://stackoverflow.com/q/24683874
has text: you are mixing things up, an 'aspx' page is a pre-compiled code, when client requests this page, the asp.net application compiles your page and renders the relevant html/javascript/css and sends it to the user. only there, on clientside(frontend) the file `Reports.js` is being executed and the table is rendered. you need to elaborate on the 'i am parsing the html table' in order for us to help you. where and how are you parsing the table, and where exactly its not shown?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24702513
tagged with: angularjs-directive
linked to: http://stackoverflow.com/q/20949336
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24703746
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/38308736
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: Isolated scope cannot access variables higher in the scope chain
linked to: http://stackoverflow.com/q/13895124
has answer: http://stackoverflow.com/a/24703746
tagged with: angularjs
has body: Before anyone marks this as a duplicate, I had found similar questions on SO: Isolate scope variable is undefined unable to access rootscope var in directive scope But mine in particular is a different question by itself. I have a directive with isolated scope. In its post link function I'm trying to access a variable that happens to be in the root (top most) scope. In my isolated scope I have tried myVar: '@' and myVar: '=' but none of them worked, the myVar is undefined in the directive scope. Below is the return statement of my directive: { restrict: 'E', replace: true, transclude: true, template: tmpl, scope: { myVar: '@' }, link: { post: function ($scope) { // $scope.myVar is undefined // $scope.$root.myVar is defined } } } In my console I logged the current scope object and I can trace the $parent all the way up to the root and see the var is in there, so the var is also accessible through the $root of the current scope. My question is then why doesn't the '@' and '=' work in this case? Is it because the var is defined higher up in the chain other than the immediate parent, or because possibly some parent scope in the middle is itself an isolated scope and breaks the chain of reference to that var?

http://stackoverflow.com/a/24708441
has body: There is also no GET endpoint for folders without an ID https://api.box.com/folders Try https://api.box.com/folders/0
has comment: http://stackoverflow.com/comment/38434238
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24706602
answers question: http://stackoverflow.com/q/24706602
has comment: http://stackoverflow.com/comment/38335010
downvote count: 0
type: AcceptedAnswer
score: 1

http://stackoverflow.com/comment/38392329
comment on: http://stackoverflow.com/a/24746500
score: 0
type: Comment
has text: Yes, it works in firefox... that's pretty much the only browser it works in by default. (In chrome, I think you have to turn on a special flag/setting). But it won't work in, even somewhat modern browsers, if you just put it in a ` ` tag (except for firefox).
type: AnswerComment

http://stackoverflow.com/comment/38309323
type: AnswerComment
score: 0
has text: Thanks, that helped me get on the right track. Apparently $_GET variables are frowned upon on that same xml output php page. I moved the $_GET's to another page and required it and that seemed to make it work.
type: Comment
comment on: http://stackoverflow.com/a/24702551

http://stackoverflow.com/q/24724427
linked to: http://stackoverflow.com/q/2705583
has comment: http://stackoverflow.com/comment/38353468
has comment: http://stackoverflow.com/comment/38350153
has comment: http://stackoverflow.com/comment/38351510
answer count: 3
has title: Clicking a button in JavaScript
has comment: http://stackoverflow.com/comment/38353443
has answer: http://stackoverflow.com/a/24726017
accepted answer: http://stackoverflow.com/a/24725488
has comment: http://stackoverflow.com/comment/38353087
score: 2
upvote count: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24724477
has comment: http://stackoverflow.com/comment/38352962
has answer: http://stackoverflow.com/a/24724477
has comment: http://stackoverflow.com/comment/38351282
has comment: http://stackoverflow.com/comment/38352203
type: Question
has answer: http://stackoverflow.com/a/24725488
has body: As far as I can tell from my very limited knowledge about JavaScript, it can get all kinds of info about some elements on the page, for example, about a button. JavaScript can get the name of a button, its type, name, and the text in it. It can even disable a button. But can it simulate a click on a button? Or it can and must only be done by a user? EDIT 1 (my response to the answer below written by Narxx): This way doesn't seem to work: The time is? EDIT 2 (my response to the comment below written by prash) This way doesn't work either (the simulate function is written by kangas, modified by TweeZz, and is taken by me from here): The time is? EDIT 3: (my response to the answer below written by Jonco98): (This code is also the answer to my question) The time is? EDIT 4: Please note that the answer below given by naomik also solves my problem perfectly well.
linked to: http://stackoverflow.com/q/6157929
downvote count: 0
tagged with: button
tagged with: javascript
has comment: http://stackoverflow.com/comment/38353591
has comment: http://stackoverflow.com/comment/38350141
favorite count: 0

http://stackoverflow.com/a/24736936
has comment: http://stackoverflow.com/comment/38375333
answers question: http://stackoverflow.com/q/24736632
has body: Try something like below, if your date string preserve the same format always, var date = "15-07-2014 09:00"; var dateParts = (date.split(" ")[0]).split("-"); var timeParts = (date.split(" ")[1]).split(":"); var dateObj = new Date(dateParts[2],dateParts[1]-1,dateParts[0],timeParts[0],timeParts[1]); dateObj.setDate(dateObj.getDate()+3); console.log(dateObj) //If you don't use any library like Jquery datepicker, you have to use basic js operation to format the date (but not recommend) console.log(formateDate(dateObj)) function formateDate(DateObj) { return addLeadingZeros(dateObj.getDate())+"-"+addLeadingZeros(dateObj.getMonth()+1)+"-"+dateObj.getFullYear()+" "+addLeadingZeros(dateObj.getHours())+":"+addLeadingZeros(dateObj.getMinutes()); } function addLeadingZeros(intArg) { return ('0' + intArg).slice(-2) }
upvote count: 1
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38398017
type: Answer

http://stackoverflow.com/comment/38290574
has text: The url isn't static. It changes because I am using OAuth to access salesforce and the code changes with every request. A sample URL is: "https://login.salesforce.com/services/oauth2/token?code=aPrxaSyVmC8fBbcQDkZFOE6XoAAogOZr7JeAy_IVBWk_qxy1dukTFLuGLlkHCws.bkgxFOJHxQ%3D%3D&grant_type=authorization_code&client_id=3MVG9Y6d_Btp4xp6tk21SIcWXJSVDXWORXYkz0_WcT_Xnjl9_A1W5DtxgeROCMzgyqUdl0TUUoOBYGw3Ulucb&client_secret=2348587645368181754&redirect_uri=https://localhost:49711/App/Home/Home.html?isAuthenticated=true"
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24691866

http://stackoverflow.com/q/24628642
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38169717
has answer: http://stackoverflow.com/a/24628751
score: 0
has answer: http://stackoverflow.com/a/24628826
has comment: http://stackoverflow.com/comment/38169660
has answer: http://stackoverflow.com/a/24629276
accepted answer: http://stackoverflow.com/a/24629276
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38169827
has comment: http://stackoverflow.com/comment/38169928
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24628789
has comment: http://stackoverflow.com/comment/38169741
has comment: http://stackoverflow.com/comment/38169649
has comment: http://stackoverflow.com/comment/38169803
has title: remove() not removing element from all parent elements of same class
has comment: http://stackoverflow.com/comment/38169671
type: Question
has answer: http://stackoverflow.com/a/24628789
has body: I have a load of Wordpress posts, and when the browser is below a certain size, I need to move one of the elements within each post into another element (this is a design requirement). I am using the below to loop through each post, and move the element post-comments into the post-meta div. jQuery('.post-entry').each(function(){ // Loop through each post... if( jQuery(this).find('.post-meta .post-comments').length == 0 ) { jQuery(this).find('.post-extra span.post-comments').appendTo('.post-meta'); // Move categories into the ".post-meta" div jQuery(this).find('.post-extra span.post-comments').remove(); } }); JSFiddle to follow, but the current behavior is that the first post-entry works as fine, and the post-comments element is moved into post-meta and removed from its original place, however on the other post-entry divs, the post-comments element is not being removed from its original position - can anyone see why? Basically, I need to move post-comments from its original location into an element called post-meta on multiple posts on the page I am working on.

http://stackoverflow.com/q/24746652
tagged with: javascript
has title: Checkbox losing value after sorting
has comment: http://stackoverflow.com/comment/38395218
score: 0
has comment: http://stackoverflow.com/comment/38397645
has body: I have a sortable table that uses tablesorter and a parser which allows me to sort checkboxes in checked/unchecked order. I have also added a show values button that displays the values of the selected checkboxes. In this fiddle everything works as expected. The show values button displays the values correctly before and after sorting. However, in my website the show values button displays the values only prior to sorting any of the columns. If I sort the table and then try to use the show values button, it doesn't display any of the checkbox values. I initialize the checkboxes as such: Student with value 25 The show values button is used to display the values of the checkboxes. This is how it is initialized: And this is the show val function definition in jquery, which displays the alert with the checkbox values: function showVal(table) { var arr = []; for (var i in table.cb) { if (table.cb[i].checked) { arr.push(table.cb[i].value); arr.push("\n"); } } alert(arr); return arr } Please let me know what am I missing and/or doing wrong. Thanks!
tagged with: jquery
has comment: http://stackoverflow.com/comment/38397880
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38392554
linked to: http://stackoverflow.com/q/12743935
tagged with: checkbox
answer count: 0
has comment: http://stackoverflow.com/comment/38396586
tagged with: tablesorter
has comment: http://stackoverflow.com/comment/38395622
has comment: http://stackoverflow.com/comment/38397397
has comment: http://stackoverflow.com/comment/38397438
type: Question
has comment: http://stackoverflow.com/comment/38392585
has comment: http://stackoverflow.com/comment/38411074

http://stackoverflow.com/a/24693161
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/24693089
has body: You can use hidden inputs for this purpose. Add &lt;INPUT TYPE='hidden' NAME='param1' VALUE='data1' ID='param1'&gt; and this will be submitted to php. You can change value of this fields from jQuery by $('#param1').value = 'data12';
type: Answer
score: 2

http://stackoverflow.com/comment/38238435
comment on: http://stackoverflow.com/a/24665134
type: Comment
has text: Thanks.. I will update my answer.. i totally forgot :P
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38162199
type: QuestionComment
comment on: http://stackoverflow.com/q/24624476
has text: Check out the [Documentation for position on the jQuery UI site](http://api.jqueryui.com/dialog/#option-position)
score: 0
type: Comment

http://stackoverflow.com/comment/38264655
has text: Thanks alot, added onPrefChange and it works like a charm. Still sarching about how to remove contentscript though
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24620408
type: Comment

http://stackoverflow.com/comment/38382330
type: AnswerComment
has text: This solution worked but I just tried matching the different right arrow represented by &rarr; (there are multiple different directional arrows) and this matched too. I guess an arrow is an arrow is an arrow as far as matching innerHTML is concerned :)
comment on: http://stackoverflow.com/a/24741113
type: Comment
score: 0

http://stackoverflow.com/comment/38297070
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24696911
has text: Both your title and your description are very vague. Please edit your question so the title and description explicitly pertain to your problem.
score: 0

http://stackoverflow.com/comment/38109598
comment on: http://stackoverflow.com/a/24597418
has text: is there nothing i can do in the JS code to do it to save me going through all of my forms and adding this to the submit buttons ?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/24640493
type: Question
has comment: http://stackoverflow.com/comment/38192546
has comment: http://stackoverflow.com/comment/38244036
tagged with: javascript
has comment: http://stackoverflow.com/comment/38192242
has comment: http://stackoverflow.com/comment/38192473
has body: I'm not sure what this error is coming from, nor what it is or what it means. Here is the error I get: [ERROR] : V8Exception: Exception occurred at undefined:1: Uncaught SyntaxError: Unexpected token u Now, I am creating an HTML 5 Cross platform (Android/iOS) application using Titanium Studio IDE. I'm not sure if this is an Android specific error or a Titanium Studio specific error. I know it can't be iOS because I only get this error when I am trying to test the app on Android tablet. (The app installs and runs on the device though). NOTE: The code I am working on is proprietary so I can't show it. But what I'm mostly interested in an explanation of this error. Generally, What is this error and when does some one come across it?
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/38192493
tagged with: titanium-mobile
tagged with: titanium-alloy
answer count: 0
has title: What is a V8Exception error?
has comment: http://stackoverflow.com/comment/38192194
score: 0
has comment: http://stackoverflow.com/comment/38192419
tagged with: titanium

http://stackoverflow.com/comment/38095382
type: QuestionComment
score: 2
has text: How is your code ending up in that form in the first place?
comment on: http://stackoverflow.com/q/24590077
type: Comment

meta-tags
tags question: http://stackoverflow.com/q/24734516
tag name: meta-tags
type: Tag

http://stackoverflow.com/comment/38336927
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24717560
has text: `split` seems to be fine. Do you have any problems with the code, does it not work?

http://stackoverflow.com/q/24719189
upvote count: 6
has title: Chaining javascript functions. What's the order of execution?
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 6
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/24719203
has comment: http://stackoverflow.com/comment/38340457
has body: aka if I have a function var nameNorm= name.substring(1).toLowerCase(); what would the order be? would it turn everything lowercase then extract a substring or would it extract a substring and then turn the substring lowercase?
has answer: http://stackoverflow.com/a/24719202

http://stackoverflow.com/q/24661762
upvote count: 5
tagged with: d3.js
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/36520913
downvote count: 0
has title: Clearing D3.js canvas
type: Question
score: 5
has answer: http://stackoverflow.com/a/24661853
has answer: http://stackoverflow.com/a/24662313
tagged with: javascript
has answer: http://stackoverflow.com/a/47827929
has answer: http://stackoverflow.com/a/53480111
has body: I am using D3 to produce a family tree graph, (based on the code presented here: http://www.d3noob.org/2014/01/tree-diagrams-in-d3js_11.html) and the graph data comes from a server and the user can select which family he wants to view, then clicks the submit button which returns the data and then D3 draws the graph. However, if the user chooses another family (or the same one for that matter) and presses submit without refreshing the page, the new graph is drawn below the old one. How can I clear the D3.js canvas so that the new graph is the only thing seen?
favorite count: 0

http://stackoverflow.com/comment/38273223
score: 0
type: Comment
type: QuestionComment
has text: And to add Raghav; you could try `ng-value` instead of `value`!
comment on: http://stackoverflow.com/q/24683373

http://stackoverflow.com/comment/38194336
type: Comment
has text: So you want to scale both the background image and the foreground red polygon with the red dot being the origin of scaling?
comment on: http://stackoverflow.com/a/24640866
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38284108
type: QuestionComment
score: 3
has text: Could you give us some more detail about how it "works wrong"? What output are you getting?
comment on: http://stackoverflow.com/q/24689745
type: Comment

http://stackoverflow.com/q/24654479
tagged with: javascript
tagged with: express
score: 0
has body: I am following the lessons on egghead.io trying to learn Angular. This lesson is about $http, and for some reason I can’t get a basic Expressjs/Angular app running. Lesson link: https://egghead.io/lessons/angularjs-http Here is my directory stucture: app.js public/ index.html main.js package.json node_modules/ bower_components/ Here are my files: public/index.html Egghead Videos {{person.firstName}} {{person.lastName}} app.js var express = require('express'); var http = require('http'); var cors = require('cors'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyParser.urlencoded({ extended: true })); app.use(cors()); app.set('port', 3000); app.use(express.static(__dirname + '/public')); app.use(express.static(__dirname + '/bower_components')); var data = [ {"firstName": "Jeff", "lastname": "Winger"}, {"firstName": "Troy", "lastname": "Barnes"}, {"firstName": "Britta", "lastname": "Perry"}, {"firstName": "Abed", "lastname": "Nadir"} ]; app.get('/users', function(req, res) { res.send(data); }); app.post('/users', function(req, res) { res.send(req.body); }); public/main.js var app = angular.module("app", []); app.controller("AppCtrl", function($http) { var app = this; $http.get("http://localhost:3000/users") .success(function(data) { app.people = data; }) app.addPerson = function(person) { $http.post("http://localhost:3000/users", person) .success(function(data) { app.people = data; }) } }) package.json { "name": "users-app", "description": "users test app", "version": "0.0.1", "private": true, "dependencies": { "express": "latest", "body-parser": "*", "cors": "*" } } So I made some changes from last time based on the comments, but it is still not working. To run it I am typing "node app.js" in the command line. Is that correct, or should I be typing node “public/main.js” to run the app? I am a little confused about that part. When I type "node app.js" nothing happens and the browser says it can’t connect at localhost. When I type "node public…
possible better answer: http://stackoverflow.com/a/24654743
has title: Express/AngularJs "angular is not defined"
answer count: 4
tagged with: angularjs
has answer: http://stackoverflow.com/a/24655266
has answer: http://stackoverflow.com/a/24714734
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24654594
has comment: http://stackoverflow.com/comment/38267194
has comment: http://stackoverflow.com/comment/38218345
type: Question
accepted answer: http://stackoverflow.com/a/24714734
has answer: http://stackoverflow.com/a/24654743

http://stackoverflow.com/q/24647607
tagged with: javascript
type: UnansweredQuestion
has body: I have created Neo4j virtual machine in windows azure.How to increase the performance of it?Now it takes time in 30-50 seconds range for simple query also.How to improve this?Any one can please help? My sample data model is given below public class Users { public string email { get; set; } public string password { get; set; } public string firstname { get; set; } public string lastname { get; set; } public string dob { get; set; } public string gender { get; set; } public string id { get; set; } public string facebookId { get; set; } public string googleId { get; set; } public string profile_pic { get; set; } public Guid Recoverid { get; set; } public Guid Emailverification { get; set; } public string HighSchool { get; set; } public string College { get; set; } public string Employer { get; set; } public string Currentcity { get; set; } public string HomeTown { get; set; } public bool registerationstatus { get; set; } public string Language { get; set; } public string Username { get; set; } public string FullName { get; set; } public string joinDate { get; set; } public string primeryrecoverymail { get; set; } public string secondaryrecoverymail { get; set; } public string loginnotification { get; set; } public string Mobileno1 { get; set; } public string Mobileno2 { get; set; } public string FuturePostSettings { get; set; } public string FriendrequestSettings { get; set; } public string Contactmesettings { get; set; } public string Lookmebymail { get; set; } public string LookmebyPhone { get; set; } public string isvisible { get; set; } public string userstatus { get; set; } #endregion } and query is var datas = client.Cypher.Match("(user:User)").Where((Users user) =&gt; user.email == email &amp;&amp; user.password == password).Return(user =&gt; user.As&lt;Users&gt;()).Results;
tagged with: azure
has comment: http://stackoverflow.com/comment/38205977
has comment: http://stackoverflow.com/comment/38207270
tagged with: neo4j
has comment: http://stackoverflow.com/comment/38211888
favorite count: 0
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/32138946
score: 4
has comment: http://stackoverflow.com/comment/38228466
has title: Poor performance of Neo4j virtual machine in windows azure
upvote count: 4
has comment: http://stackoverflow.com/comment/38211977
downvote count: 0

http://stackoverflow.com/q/24655035
favorite count: 0
tagged with: ajax
has body: Please bear with me here because I am a total beginner when it comes to JSON and AJAX and abstracting jQuery. So far I have gotten to a point where I can loop through an array that contains the IDs of all of my first level links, and fetch the data from my JSON file that corresponds with that same index. OK! So: JSON file can be seen here: http://bmgz.rtcgraphics.com/wp-content/themes/bmgz/data/whatwedo.json Demo website can be viewed here: http://bmgz.rtcgraphics.com/#3 jQuery: var slugArray = [ '#project-management', '#economic-incentives', '#site-selection', '#stakeholder-engagement-and-events', '#lobbying-and-advocacy', '#public-policy-and-issues-management', '#digital-communications', '#event-and-trade-show-materials', '#presentation-and-print-design' ] function getWWD(){ $.getJSON('wp-content/themes/bmgz/data/whatwedo.json', function(result){ $.each(slugArray, function(i, selection){ $(selection).click(function(){ $("#w-dropdown header img").attr('src', result[i].icon); $("#w-dropdown h4").html(result[i].name); $("#w-copy header").html(result[i].name); $(result[i].cousins).each(function(index, item){ $(".wwd-ul").append($(document.createElement('li')).addClass('wwd-li').text(item)); }); console.log($(".wwd-li").text()); $("#w-copy p").html(result[i].copy); $('#chalkboard').css({"background-image":"url("+result[i].cover+")"}); $("#wwd-sub-icons img:first-child").attr('src', result[i].subicon1); $("#wwd-sub-icons img:last-child").attr('src', result[i].subicon2); }); }); }); }; getWWD(); What I'd like to do is the following: In the subpages that get generated by the getWDD(); function: To check the img src of the $("#wwd-sub-icons img:first-child") and $("#wwd-sub-icons img:last-child") and, depending on the src, force the index to be 1, 4, or 7 and have all subpage content jump to the JSON values for the object at that index. To have the generated list items with class "wwd-li" exhibit the following behavior when clicked: Grab the text that's inside the list ite…
type: UnansweredQuestion
answer count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: wordpress
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has title: Linking to another index in JSON file
downvote count: 0

http://stackoverflow.com/comment/38152801
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24619353
has text: Try [**this JS Fiddle**](http://jsfiddle.net/FgMWQ/).
score: 0

http://stackoverflow.com/q/24707940
accepted answer: http://stackoverflow.com/a/24708074
score: 0
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24708074
has title: How to append data in ng-repeat scope from outside in angularjs?
possible better answer: http://stackoverflow.com/a/24708051
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/24708051
has body: I have an issue with AngularJS ng-view and ng-repeat, and I believe it has to do with the way I handle the scope. I use ng-repeat to show a list of items present in an array. And a button that is outside the ng-repeat scope on ng-click updates the array. But some how I am not able to get this feature working. Here is a sample of my code: Home view {{p.title}} More Here is the controller that is bound to this partial file: var app = angular.module('plunker', ['ngRoute']); app.config(function($routeProvider){ $routeProvider .when('/', { controller: 'testController', templateUrl: 'home.html' }) .otherwise({ redirectTo: '/' }); }); app.controller('testController', [ '$scope', function ($scope) { $scope.posts = { data : [] }; $scope.getPosts = function(count) { for(i =0; i<count; ++i) { $scope.posts.data.push({title : "Title-"+i}) } } $scope.updatePosts = function(count) { var offset = $scope.posts.data.length; var data = []; for(i =offset; i<offset+count; ++i) { data.push({title : "Title-"+i}); } $scope.posts.data = $scope.posts.data.concat(data) } $scope.getPosts(5); } ] ); The feature that I want is when one clicks "More" link on the main page, the controller should get little snippets of code and update the view with more data. For instance, I would expect the view to go from (1) to (2) on clicking "More". But I always end up with just (1) no matter what. (1) Home View Title-0 Title-1 Title-2 Title-3 Title-4 More (2) Home View Title-0 Title-1 Title-2 Title-3 Title-4 Title-5 Title-6 Title-7 Title-8 Title-9 More I also have the above example setup in Plnkr here ** update** I tried the same code without using ng-view and the code works exactly as expected. So I am sure that the problem that I am encountering has to do with my usage of ng-view. An example in Pnkr setup without using ng-view is shown here
tagged with: javascript

http://stackoverflow.com/q/24658584
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38259937
tagged with: amplifyjs
has comment: http://stackoverflow.com/comment/38228310
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38260598
has comment: http://stackoverflow.com/comment/38267375
favorite count: 0
has comment: http://stackoverflow.com/comment/38252147
type: Question
has answer: http://stackoverflow.com/a/24681222
has comment: http://stackoverflow.com/comment/38294999
has comment: http://stackoverflow.com/comment/38300110
accepted answer: http://stackoverflow.com/a/24681222
has comment: http://stackoverflow.com/comment/38257414
upvote count: 1
answer count: 1
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/38289657
has comment: http://stackoverflow.com/comment/38262295
has comment: http://stackoverflow.com/comment/38256678
has body: I'm trying to figure out a way to cache my knockoutJS SPA data and I've been experimenting with amplifyJS. Here's one of my GET functions: UserController.prototype.getUsers = function() { var self = this; return $.ajax({ type: 'GET', url: self.Config.api + 'users' }).done(function(data) { self.usersArr(ko.utils.arrayMap(data.users, function(item) { // run each item through model return new self.Model.User(item); })); }).fail(function(data) { // failed }); }; Here's the same function, "amplified": UserController.prototype.getUsers = function() { var self = this; if (amplify.store('users')) { self.usersArr(ko.utils.arrayMap(amplify.store('users'), function(item) { // run each item through model return new self.Model.User(item); })); } else { return $.ajax({ type: 'GET', url: self.Config.api + 'users' }).done(function(data) { self.usersArr(ko.utils.arrayMap(data.users, function(item) { // run each item through model return new self.Model.User(item); })); }).fail(function(data) { // failed }); }; This works as expected, but I'm not sure about the approach I used, because it will also require extra work on the addUser, removeUser and editUser functions. And seeing as I have many more similar functions throughout my app, I'd like to avoid the extra code if possible. I've found a way of handling things with the help of ko.extenders, like so: this.usersArr = ko.observableArray().extend({ localStore: 'users' }); Then use the ko.extenders.localStore function to update the local storage data whenever it detects a change inside the observableArray. So on init it will write to the observableArray in case local storage data exists for users key and on changes it will update the local storage data. My problem with this approach is that I need to run my data through the model and I couldn't find a way to do that from the localStore function, which is kept on a separate page. Has any of you worked with KO and Amplify? What approach did you use? Should I use the first one or try a co…
has title: Storing KnockoutJS modeled data with AmplifyJS
tagged with: javascript
has comment: http://stackoverflow.com/comment/38226477

http://stackoverflow.com/q/24688146
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24688187
has title: Is there a way to wrap a jquery function to an object?
upvote count: 1
type: AnsweredQuestion
tagged with: oop
accepted answer: http://stackoverflow.com/a/24688187
type: Question
has body: Is there anyway to limit the scope of a jquery function to an object other than using a main function: (function( $ ) { $.fn.myLib = function( funcName ) { if ( action === "func1") { // Open popup code. } if ( action === "func2" ) { // Close popup code. } }; }( jQuery )); I'd like to do it so that I could call functions like this: $(el).myLib.func1(); $(el).myLib.func2();
tagged with: function
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/24688192
has answer: http://stackoverflow.com/a/24688192
tagged with: scope
answer count: 2
downvote count: 0

http://stackoverflow.com/a/24640488
type: Answer
answers question: http://stackoverflow.com/q/24640321
has body: This is where Angular's services come in to play! angular.module("myApp") .constant("config", { // Configure all the things }); Here's the docs on constant as well. Then you can use it anywhere else in the app... angular.module("myApp") .factory("SomeService", function(config) { // config.urlBase or whatever return { doStuff: function() {} }; }); There's also a really cool grunt task that can help you with this stuff too... http://mindthecode.com/how-to-use-environment-variables-in-your-angular-application/
score: 0

http://stackoverflow.com/comment/38886253
type: Comment
comment on: http://stackoverflow.com/a/24774018
type: AnswerComment
has text: see http://stackoverflow.com/questions/24993189/how-to-replace-text-inside-an-svg-using-js/25008525#25008525
score: 0

http://stackoverflow.com/comment/38253235
has text: Your data needs to be submitted to the Java application. This can be done by using Ajax.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24673541

http://stackoverflow.com/q/24674630
has comment: http://stackoverflow.com/comment/107243663
type: Question
type: AnsweredQuestion
tagged with: lodash
has answer: http://stackoverflow.com/a/45897196
score: 210
favorite count: 0
has answer: http://stackoverflow.com/a/51670692
has answer: http://stackoverflow.com/a/24674700
has answer: http://stackoverflow.com/a/58684114
accepted answer: http://stackoverflow.com/a/24674700
has title: transform object to array with lodash
tagged with: object
has answer: http://stackoverflow.com/a/76856580
has answer: http://stackoverflow.com/a/48609729
has answer: http://stackoverflow.com/a/24674736
has body: How can I transform a big object to array with lodash? var obj = { 22: {name:"John", id:22, friends:[5,31,55], works:{books:[], films:[],} 12: {name:"Ivan", id:12, friends:[2,44,12], works:{books:[], films:[],} } // transform to var arr = [{name:"John", id:22...},{name:"Ivan", id:12...}]
has answer: http://stackoverflow.com/a/45394461
has answer: http://stackoverflow.com/a/46196517
upvote count: 210
has answer: http://stackoverflow.com/a/46300019
has answer: http://stackoverflow.com/a/44706366
answer count: 12
tagged with: arrays
downvote count: 0
possible better answer: http://stackoverflow.com/a/45394461
tagged with: javascript
has answer: http://stackoverflow.com/a/53328292

http://stackoverflow.com/a/26387141
type: Answer
score: 0
has body: Use require.js both on client and on node.js. Already done several apps which shares the code between client and server side.
answers question: http://stackoverflow.com/q/24685154

http://stackoverflow.com/q/24635139
has comment: http://stackoverflow.com/comment/38182831
tagged with: javascript
has comment: http://stackoverflow.com/comment/38182519
score: 4
upvote count: 4
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/24635515
has body: I'm getting SCRIPT5045: Assignment to read-only properties is not allowed in strict mode in IE 11 (latest Chrome works fine) in reference to the line A.doc.head = A.doc.getElementsByTagName('HEAD')[0];. I'm confused on how to fix it. I've included what should be the relevant code below. (function (win, doc, arg) { 'use strict'; var A = win[arg.prefix] = { 'win': win, 'doc': doc, 'arg': arg, 'stu': {}, 'fun': (function () { return { init: function () { var scripts = A.doc.getElementsByTagName('SCRIPT'), n = scripts.length, i; for (i = 0; i &lt; n; i = i + 1) { if (scripts[i].src.match(A.arg.src)) { A.arg.script = scripts[i]; A.arg.options = A.fun.options(); break; } } A.doc.head = A.doc.getElementsByTagName('HEAD')[0]; A.fun.structure(); }, // more functions }()) }; A.fun.init(); }(window, document, { 'prefix': 'accescape_' + new Date().getTime(), 'src': '/widget.js', 'defaults': { 'language': 'en' } }));
favorite count: 0
has comment: http://stackoverflow.com/comment/38182925
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24635515
type: Question
has title: SCRIPT5045: Assignment to read-only properties is not allowed in strict mode

http://stackoverflow.com/comment/38108984
score: 2
comment on: http://stackoverflow.com/q/24597301
has text: @Lix: I think maybe he's saying that a click won't trigger the blur event, so he can't trigger the Js by leaving the list like he could with an `input`.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24646132
has body: Im using highstock chart API to create bar chart which has a horizontal bar chart. The problem I'm having is that, when I scroll and click on a bar, drilldown doesn't come. Here is a example. In there when I scrolled to the end and click on "Opera" this issue arise. Here is the link : Fiddle Please help me. Thanks In Advance.
type: AnsweredQuestion
has title: In Highstock charts, Drill down not correctly showing when scrolled
type: Question
has comment: http://stackoverflow.com/comment/38202796
tagged with: highcharts
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/24650152
accepted answer: http://stackoverflow.com/a/24650152
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/24589169
tagged with: select
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38093526
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38093609
has answer: http://stackoverflow.com/a/24589226
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am dynamically creating elements with javascript that end up looking something like this: &lt;select id="splitUserDDL" name="splitUserDDL[]"&gt;&lt;/select&gt; When I attempt to add options, it seems that the first select box is being populated but not the rest. Is there a way that I can add the same options to all of the select boxes? $('#splitUserDDL').empty(); var userDDL = document.getElementById('splitUserDDL'); var defaultoption = document.createElement('option'); defaultoption.text = '-Select-'; defaultoption.value = 0; userDDL.add(defaultoption);
favorite count: 0
accepted answer: http://stackoverflow.com/a/24589226
has comment: http://stackoverflow.com/comment/38093542
type: AnsweredQuestion
has title: Jquery populate multiple select boxes with the same name
has comment: http://stackoverflow.com/comment/38093539
score: 1

http://stackoverflow.com/comment/38312678
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24702123
type: Comment
has text: Thank you for the valuable insight! When I do that I can see that I'm creating particular options / buttons. But how do I add classes to the html created by the javascript? For example, when I create the option that contains "N/A", how do I incorporate a class into that?

http://stackoverflow.com/q/24623075
upvote count: 1
has comment: http://stackoverflow.com/comment/38159827
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/24623844
has answer: http://stackoverflow.com/a/24623844
type: Question
has title: Simple backbone app keeps through error
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24623660
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/38159840
tagged with: node.js
favorite count: 0
accepted answer: http://stackoverflow.com/a/24623660
has body: I don't get it. When using JSFiddle, this simple example works fine: Fiddle SearchView = Backbone.View.extend({ initialize: function(){ alert('hello'); } }); var search_view = new SearchView; However when I implement the same thing into a Node application I get the following error on load of the page. "Uncaught TypeError: undefined is not a function" - localhost:3000/bower_components/backbone/backbone.js:1105 I have no doubt I'm missing something really simple, but it's driving me nuts. In both cases I'm linking to JQuery, Underscore and Backbone .. yet someone my project does not work. I check my project in here ... https://warrickf@bitbucket.org/warrickf/searchview.git Thanks Warrick

http://stackoverflow.com/comment/38282649
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24675838
has text: `Uncaught TypeError: Cannot read property 'length' of undefined` is a JavaScript error. It has nothing to do with WebGL or GLSL. It means something is wrong in JavaScript.
score: 0

http://stackoverflow.com/q/24688384
answer count: 3
tagged with: highcharts
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 11
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/53275875
has answer: http://stackoverflow.com/a/24692515
upvote count: 11
favorite count: 0
has title: Highcharts - How to set custom colors for the series
type: Question
has body: I'm using Highcharts to render some charts for a project. My problem is that when I try to set colors array in plotOptions.column, it doesn't work. Although, it works fine for plotOptions.pie. What I need to do is to set different color presets for different series types. So when I add series of same type, they have colors picked up from their colors array. But now, for some weird reason, the default colors are showing although I have defined my own colors array for each series type. Here is the fiddle to better understand what I mean: http://jsfiddle.net/c5nhd/1/ And here is the link to official documentation: http://api.highcharts.com/highcharts#plotOptions.column.colors
accepted answer: http://stackoverflow.com/a/24692515
possible better answer: http://stackoverflow.com/a/42238360
has answer: http://stackoverflow.com/a/42238360
tagged with: charts

http://stackoverflow.com/comment/38312525
comment on: http://stackoverflow.com/q/24704843
score: 0
type: Comment
type: QuestionComment
has text: The example uses jQuery to do DOM operations. You don't need it.

http://stackoverflow.com/q/24718694
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24719076
type: Question
linked to: http://stackoverflow.com/q/9269991
tagged with: javascript
score: 0
answer count: 2
has body: In Javascript, I'd like to have an object with three properties, "zone1", "zone2", "zone3", each of which store an array of place names. I would like to search for a match by iterating through the arrays to find a place name. The following questions almost gets me there, but don't work for me because I am not using jQuery, and I want the value, not the key: Performing a foreach over an associative array of associative arrays Getting a list of associative array keys My code looks like this: var zoneArray = {}; zoneArray["zone1"] = ["placeA", "placeB"]; zoneArray["zone2"] = ["placeC", "placeD"]; function getZone(place, zoneArray) { var zone; for (var key in zoneArray) { for(i = 0; i&lt;key.length; i++) { if(key[i] == place) { zone = key; return zone; } } } } getZone("placeC", climateZoneArray); Apparently however, "key[i]" is referring to letters of the zone names, like, "z" "o" "n" "e" Could anybody please help me understand or best handle this situation in Javascript?
possible better answer: http://stackoverflow.com/a/24719076
linked to: http://stackoverflow.com/q/558981
duplicate of: http://stackoverflow.com/q/85992
has title: how to get array values of keys stored in an object with "for in" loop in javascript
has answer: http://stackoverflow.com/a/24718702
accepted answer: http://stackoverflow.com/a/24718702
linked to: http://stackoverflow.com/q/85992

http://stackoverflow.com/a/24611425
score: 0
type: Answer
has body: Adding onclientclick="return false;" to the button should stop posting(always, you need to add your logic in here to make optional) with the usesubmitbehaviour="false" option. Also enablevalidation="false" should break it.
answers question: http://stackoverflow.com/q/24611292

http://stackoverflow.com/a/27415153
downvote count: 0
answers question: http://stackoverflow.com/q/24720971
type: Answer
has body: To summarize because I've just encountered the same problem, summernote just need to load his .js file BEFORE his own .css!
has comment: http://stackoverflow.com/comment/66900433
score: 1
upvote count: 1

http://stackoverflow.com/q/24669560
has comment: http://stackoverflow.com/comment/38264534
score: -1
type: Question
has title: Generate upload url before form submission
upvote count: 0
has answer: http://stackoverflow.com/a/24679368
tagged with: javascript
tagged with: jquery
tagged with: blobstore
favorite count: 0
has answer: http://stackoverflow.com/a/24679202
has comment: http://stackoverflow.com/comment/38263915
answer count: 3
has answer: http://stackoverflow.com/a/24679697
tagged with: google-app-engine
tagged with: python
possible better answer: http://stackoverflow.com/a/24679697
has body: I am trying to resolve expired upload urls by delaying their generation before a file uploads and not when the form is rendered. A solution I found is to do this on form submission or on button click events like so: $('#btn-upload').click(function(event){ event.preventDefault(); var uploadUrl = ''; $.get( "/generate_upload_url", function(data) { uploadUrl = data; }); $('#my-form').attr('action', uploadUrl); }); And on the serverside I have a Handler that generates upload urls like so: class GenerateUploadUrlHandler(BaseHandler): def get(self): upload_url = blobstore.create_upload_url('/upload') self.response.headers['Content-Type'] = 'text/plain' self.response.out.write(upload_url) I would expect when I click the button to generate new upload url and make a POST request there, but what happens is the form's action is filled with a delay and the POST request is done to a wrong URL. I suspect this might be because I'm doing async GET request and my form is submitted at the same time, but I'm not exactly sure as I see similar examples here: http://blog.notdot.net/2010/04/Implementing-a-dropbox-service-with-the-Blobstore-API-part-3-Multiple-upload-support
accepted answer: http://stackoverflow.com/a/24679202
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/38181731
has text: Also, this method messes up the view in landscape view.
type: Comment
comment on: http://stackoverflow.com/a/24634904
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38192972
type: Comment
has text: Try this: http://stackoverflow.com/questions/16629487/how-to-parse-nested-json-string-using-net
type: QuestionComment
comment on: http://stackoverflow.com/q/24640939
score: 0

http://stackoverflow.com/comment/38293574
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24695212
has text: In a function called with [`new` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new), `this` will refer to the newly created object. Also constructor functions should not return anything, or if they do, return value should be an object.

http://stackoverflow.com/comment/38840731
type: Comment
type: QuestionComment
has text: Because I needed to do some actions before changing the state (registering an user for example before changing the state).
comment on: http://stackoverflow.com/q/24644366
score: 0

http://stackoverflow.com/q/24699241
upvote count: 1
has answer: http://stackoverflow.com/a/24699532
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/11591854
linked to: http://stackoverflow.com/q/13459866
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/24373759
answer count: 3
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/47768871
has answer: http://stackoverflow.com/a/47769290
has comment: http://stackoverflow.com/comment/38301375
has comment: http://stackoverflow.com/comment/38301288
has title: timestamp format in javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38301466
has comment: http://stackoverflow.com/comment/38301374
has comment: http://stackoverflow.com/comment/38301408
has comment: http://stackoverflow.com/comment/38301335
has comment: http://stackoverflow.com/comment/38302106
has body: I want date format of 2014-07-24 17:35:00 to 24-07-2014 17:35:00 using JavaScript. I tried this way, datestring = '2014-07-24 17:35:00'; function formatDate(datestring) { var m_names = new Array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"); var d = new Date(datestring); //var d = new Date(datestring * 1000); var curr_date = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); var hours = d.getHours(); var minutes = d.getMinutes(); var result = curr_date + "-" +m_names[curr_month] + "-" + curr_year+' '+hours+':'+minutes; alert(result); return result; } But I am getting an error, NaN-undefined-NaN NaN:NaN. Thanks for help.

http://stackoverflow.com/q/24741547
tagged with: express
tagged with: get
has comment: http://stackoverflow.com/comment/38382922
has title: Node JS HTTP GET request body
answer count: 1
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38382785
favorite count: 0
has comment: http://stackoverflow.com/comment/38384279
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/24741623
linked to: http://stackoverflow.com/q/978061
has body: I am using the express module in node.js and I am trying to read the body of an HTTP GET request and send an answer back to the user based on the content of the body. I am new to node.js and this is not working for me. I know I should be using HTTP POST for this (and it works when I am using post), but the server I am trying to mimic in node.js uses GET, so I have to stick to it. Is there a way to do this in node.js? Thanks! Here is a sample code I did. When I use app.post, I see the logs for the body, but when I use app.get, I see no logs at all! app.get('/someURL/', function(req, res){ var postData = ''; req.on('data', function(chunk) { console.log("chunk request:"); console.log(chunk); postData += chunk; }); req.on('end', function() { console.log("body request:"); console.log(postData); }); //Manipulate response based on postData information var bodyResponse = "some data based on request body" res.setHeader('Content-Type', 'application/json;charset=utf-8'); res.setHeader('Content-Length', bodyResponse.length); res.send(bodyResponse); };
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/24718539
has comment: http://stackoverflow.com/comment/38341325
type: Answer
upvote count: 1
score: 1
has body: I don't think the datepicker fields/controls can be tabbed thru. http://api.jqueryui.com/datepicker/ shows that the datepicker has specific keyboard interactions built in, perhaps because they realized tab was not a viable option. This post, jQuery UI datepicker: Configure keyboard shortcuts, talks about changing them which might help you out.
answers question: http://stackoverflow.com/q/24714217
downvote count: 0

http://stackoverflow.com/a/24652845
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24652821
type: Answer
answers question: http://stackoverflow.com/q/24652821
upvote count: 3
score: 3
has body: Use .toFixed(n) to format the decimal values. $("#payment_amount").val(sum.toFixed(2));

http://stackoverflow.com/a/24600389
answers question: http://stackoverflow.com/q/24596499
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24596499
type: Answer
has body: The property on the object whose name starts with "on" followed by the event type name is called the "Event Handler IDL Attribute". Note that an Event Handler is not the same thing as an Event Listener. Section 7.1.5.2.1 of HTML5.1 lists the Event Handler IDL Attributes and the objects to which they apply. Note that this doesn't include the Touch interface. There's two points to take from that. There's no requirement for there to be ontouchstart, ontouchend, etc event handlers, either in HTML5 or in the Touch Events spec, and indeed they are not necessary to use touch events, since listeners can be matched with the event types using addEventListener. There's nothing that precludes a new or updated spec from adding a requirement for event handlers for such events, nor from browsers implementing such handlers in advance of them being documented in a spec. As a consequence, if ("ontouchstart" in document) is not a good test. Maybe a better way of testing for touch support would be creating a TouchEvent and checking its type. Incidentally, contrast the Touch events spec, which doesn't mention event handlers, with the more hardware agnostic Pointer events spec which does provide a list of event handlers for pointer events
upvote count: 3
score: 3

http://stackoverflow.com/q/24602596
tagged with: javascript
has title: Is there a max img size able to render to html canvas?
score: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I am trying to read in a jpg and render the image to an HTML5 canvas and then grab and store the data as a DataURL. I am wondering is there a maximum size image that can be rendered into a canvas. It works with with files 5mb and smaller but when I try for instance a 10mb jpg when I open the resulting dataURI in a new tab it is just black. I posted the basic logic for what I am doing below. reader = new FileReader(); reader.onloadend = function() { var finalCanvas = document.createElement('canvas'), ctx = finalCanvas.getContext('2d'), img = new Image(); img.onload = function() { finalCanvas.width = img.width; finalCanvas.height = img.height; ctx.drawImage(img, 0, 0); // Get data URL and compress image 75% finalImagedocument = finalCanvas.toDataURL('image/jpeg', 0.75); console.log(finalImagedocument); } img.src = reader.result; } filedata = reader.readAsDataURL(f);
tagged with: image-processing
has answer: http://stackoverflow.com/a/24602692
accepted answer: http://stackoverflow.com/a/24602692
type: Question
tagged with: canvas
answer count: 1

http://stackoverflow.com/comment/38329018
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24713272
has text: @qwertmax, i'm new to jquery so i don't know how to go about it. can you put it in a code form for me
score: 0

http://stackoverflow.com/comment/38294815
type: Comment
comment on: http://stackoverflow.com/a/24695754
has text: what an answer,, this is exactly what i was searching for,, strange that i have been using Ajax.BeginForm on many projects, but never know about its reset capabilities ...
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38253228
score: 1
comment on: http://stackoverflow.com/q/24673418
type: Comment
type: QuestionComment
has text: Should be `item.getAttribute('data-id')`

http://stackoverflow.com/q/24673447
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/24674829
tagged with: transition
type: Question
has body: JSSOR is just wonderful! So the folks who developed this magic tool deserve to be thanked for this very, very much! My issue: I have a slider where the pictures slide from left to right as default. Taking this as a basis, I want to create that slider with a different transition. So I used that great JSSOR Transition Builder and created some custom transition. I copied the code and now I have the question: Exactly where do I paste that code into? My guess is, that it must be added to the lines right after the line var options = { and before the beginning of the next nested bracket, which for me would be $CaptionSliderOptions: { Is that correct or has the new transition code to be pasted to another place? Any help is greatly apprechiated! Cheers, Johannes
tagged with: javascript
tagged with: jquery
has title: jssor transition builder - How to add code to existing slider?
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/24674829
favorite count: 0
upvote count: 2
tagged with: jssor

http://stackoverflow.com/comment/96290519
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24693634
has text: no more working until app is checked by Facebook staff, since april 2018: https://developers.facebook.com/docs/graph-api/reference/user/groups/?locale=it_IT
score: 0

http://stackoverflow.com/q/24732381
tagged with: jquery
has answer: http://stackoverflow.com/a/24736490
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/24736031
tagged with: fadein
has title: Bootstrap horizontal menu with fade effect on hover
score: 2
has comment: http://stackoverflow.com/comment/38366163
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38366549
tagged with: fadeout
accepted answer: http://stackoverflow.com/a/24736490
has body: I have the bootstrap horizontal menu which is working on hover. Is it possible to add the fade effect? I wass trying with fadeIn() and fadeOut(), but it mees up the menu. Here is the example: Bootply
type: Question
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/24736031
downvote count: 0

http://stackoverflow.com/a/24679007
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24678660
score: 4
has body: Constructing {} or new Object yields an object which has a prototype, as you said. Constructing with Object.create(null) builds an object with empty prototype and thus no inherited members. A good use case I can think about is when you actually need an absolutely memberless object, e.g., to perform a safe iteration: for(var key in obj) { /* in normal conditions, you must ensure that object hasOwnProperty(key) so you know you're iterating on actual members. */ if (obj.hasOwnProperty(key)) { console.log("key: " + key + "; value: " + obj[key]); } } but with this approach you ensure you don't have ANY prototype and thus every property will be own by default. obj = Object.create(null); //to-do populate your object keys here, treating it like a hash instead of an object. for(var key in obj) { /* this operation is safe and also this object is safe to be populated in server-side javascript (e.g. nodejs) via a POST request. a common use case is to SERIALIZE this object quickly, while the previous IF could provide some overhead. */ console.log("key: " + key + "; value: " + obj[key]); } So you can safely treat the object as a hash and iterate it as I told, holding only true data. Another possible use case is when you want to build your own prototype from scratch (even a toString function OR NOT DEFINING CERTAIN FUNCTIONS in the Object prototype) and create a brand-new hierarchy. This could be useful only for frameworks, perhaps. It's a bit cumbersome but could be useful in the OOP approach.
type: AcceptedAnswer
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/24678660

http://stackoverflow.com/comment/38284504
comment on: http://stackoverflow.com/a/24688395
type: AnswerComment
type: Comment
has text: Unless I'm mistaken, this only works when you control the contents of the iframe. OP was linking to w3schools in his example, which I assume he does not own.
score: 1

http://stackoverflow.com/q/24605461
answer count: 1
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
has title: Dropdown menu not opening
has body: I'm stuck with my dropdown menu. I want it to open when I click the Nav-Button "clicker". Then it shall close when I click "clicker" again. I want it to show/hide only when clicking the Image. It shall stay open when I click inside the hidden div. But that doesnt work. I dont know why. Tried so many things. Any idea? (Total noob here). HTML: (Click on "#clicker" Image = Toggle Dropdown; "#dropdown-inside" = hidden div; &lt;div class="header_content"&gt; &lt;div class="navbar"&gt; &lt;div id="dropdown-menu"&gt; &lt;img id="clicker" src="http://porschedvd.de/bluptest/typo3/fileadmin/stromer/template/pix/menu_btn.jpg" alt=""&gt; &lt;ul id="dropdown-inside"&gt; JQuery: $j('#clicker').click(function() { $j('#clicker').not(this).children('ul').slideUp("slow"); $j(this).children('ul').slideToggle("slow"); }); $j('#clicker').blur(function() { $j('#dropdown-inside').hide('slow', function() { }); }); Fiddle here: http://jsfiddle.net/377G6/2/
has comment: http://stackoverflow.com/comment/38126521
favorite count: 0
has comment: http://stackoverflow.com/comment/38125940
has comment: http://stackoverflow.com/comment/38125299
has comment: http://stackoverflow.com/comment/38127975
downvote count: 0
has comment: http://stackoverflow.com/comment/38125349
has comment: http://stackoverflow.com/comment/38127880
type: Question
has comment: http://stackoverflow.com/comment/38126606
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38125384
has answer: http://stackoverflow.com/a/24606259
accepted answer: http://stackoverflow.com/a/24606259
score: 1
has comment: http://stackoverflow.com/comment/38126670
has comment: http://stackoverflow.com/comment/38125757
tagged with: mobile
upvote count: 1
has comment: http://stackoverflow.com/comment/38126608

http://stackoverflow.com/a/24635285
answers question: http://stackoverflow.com/q/24634564
has comment: http://stackoverflow.com/comment/38182853
type: Answer
has body: AccountSelectBox is the class of span you need to write this selector: $(".AccountSelectBox input:checkbox").change(function () { alert(this.checked); }); UPDATED CODE: //enable/disable textbox of row on checkbox checked and unchecked $(".AccountSelectBox input:checkbox").change(function () { if (this.checked) $(this).closest("tr").find('.AccountAmountBox').removeAttr("disabled"); else $(this).closest("tr").find('.AccountAmountBox').prop("disabled", true); }); //reads value when user leaves textbox $('.AccountAmountBox').blur(function () { alert($(this).val()) }) FIDDLE DEMO
downvote count: 0
has comment: http://stackoverflow.com/comment/38183138
score: 1
has comment: http://stackoverflow.com/comment/38182491
has comment: http://stackoverflow.com/comment/38182910
has comment: http://stackoverflow.com/comment/38183202
has comment: http://stackoverflow.com/comment/38182523
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38183174
has comment: http://stackoverflow.com/comment/38182883
accepted answer of: http://stackoverflow.com/q/24634564

http://stackoverflow.com/q/24641909
answer count: 0
has title: PHP in AJAX with WordPress
has comment: http://stackoverflow.com/comment/38228374
tagged with: wordpress
has comment: http://stackoverflow.com/comment/38195015
has body: I have a function the_rooms defined as: function the_rooms() { $latteParams['post'] = WpLatte::createPostEntity( $GLOBALS['wp_query']-&gt;post, array( 'meta' =&gt; $GLOBALS['pageOptions'], ) ); $rooms = wp_get_post_terms($latteParams['post']-&gt;id, 'ait-dir-item-rooms'); if ( !empty( $rooms ) &amp;&amp; !is_wp_error( $rooms ) ){ foreach ( $rooms as $room ) { echo $room-&gt;name; } } } This works in my single.php, but when I call it in another file, map-single-javascript.php: data: '&lt;div class="marker-holder"&gt; &lt;div class="marker-content with-image"&gt; &lt;a href="{!$item-&gt;link}"&gt; &lt;img src="{thumbnailResize $item-&gt;thumbnailDir, w =&gt; 120, h =&gt; 160}" alt=""&gt; &lt;div class="map-item-info"&gt; &lt;div class="title"&gt; &amp;#36;'+{ifset $item-&gt;optionsDir["price"]}{$item-&gt;optionsDir["price"]}+{/ifset}' &lt;small&gt;&lt;?php the_rooms(); ?&gt;bd/&lt;?php the_baths(); ?&gt;ba&lt;/small&gt; &lt;/div&gt; &lt;div class="address"&gt; '+{$item-&gt;optionsDir["address"]|nl2br}+'&lt;br&gt;'+{$item-&gt;optionsDir["address2"]|nl2br}+' &lt;/div&gt; &lt;div class="timestamp"&gt; &lt;?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/a&gt; &lt;div class="arrow"&gt;&lt;/div&gt; &lt;div class="close"&gt;x&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;' It returns nothing. However, &lt;?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?&gt; works and returns the correct time for each post. I can't wrap my mind around why human_time_diff works but my the_rooms won't. Is this because it isn't being called inside the loop? If so, neither is human_time_diff, but it works. How can I get it to work in map-single-javascript.php? Thank you!
has comment: http://stackoverflow.com/comment/38280186
type: Question
has comment: http://stackoverflow.com/comment/38199806
has comment: http://stackoverflow.com/comment/38196922
has comment: http://stackoverflow.com/comment/38238747
tagged with: javascript
has comment: http://stackoverflow.com/comment/38195081
has comment: http://stackoverflow.com/comment/38196101
score: 0
has comment: http://stackoverflow.com/comment/38195384
tagged with: jquery
has comment: http://stackoverflow.com/comment/38195793
tagged with: ajax
has comment: http://stackoverflow.com/comment/38238643
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/q/24621940
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/59601215
tagged with: javascript
has answer: http://stackoverflow.com/a/52790791
has answer: http://stackoverflow.com/a/60444675
score: 199
has answer: http://stackoverflow.com/a/65279747
has answer: http://stackoverflow.com/a/63371482
tagged with: express
answer count: 25
has answer: http://stackoverflow.com/a/71535041
linked to: http://stackoverflow.com/q/24547357
has comment: http://stackoverflow.com/comment/79986458
has answer: http://stackoverflow.com/a/44612321
has answer: http://stackoverflow.com/a/45900464
has answer: http://stackoverflow.com/a/55470296
has answer: http://stackoverflow.com/a/55424097
has answer: http://stackoverflow.com/a/24634454
favorite count: 0
has answer: http://stackoverflow.com/a/60944807
has answer: http://stackoverflow.com/a/50602766
has answer: http://stackoverflow.com/a/68958488
has body: I've been reading and reading and still am confused on what is the best way to share the same database (MongoDb) connection across whole NodeJs app. As I understand connection should be open when app starts and reused between modules. My current idea of the best way is that server.js (main file where everything starts) connects to database and creates object variable that is passed to modules. Once connected this variable will be used by modules code as necessary and this connection stays open. E.g.: var MongoClient = require('mongodb').MongoClient; var mongo = {}; // this is passed to modules and code MongoClient.connect("mongodb://localhost:27017/marankings", function(err, db) { if (!err) { console.log("We are connected"); // these tables will be passed to modules as part of mongo object mongo.dbUsers = db.collection("users"); mongo.dbDisciplines = db.collection("disciplines"); console.log("aaa " + users.getAll()); // displays object and this can be used from inside modules } else console.log(err); }); var users = new(require("./models/user"))(app, mongo); console.log("bbb " + users.getAll()); // not connected at the very first time so displays undefined then another module models/user looks like that: Users = function(app, mongo) { Users.prototype.addUser = function() { console.log("add user"); } Users.prototype.getAll = function() { return "all users " + mongo.dbUsers; } } module.exports = Users; Now I have horrible feeling that this is wrong so are there any obvious problems with this approach and if so how to make it better?
has answer: http://stackoverflow.com/a/62169321
has answer: http://stackoverflow.com/a/38346797
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/61421811
upvote count: 199
has title: How to properly reuse connection to Mongodb across NodeJs application and modules
has answer: http://stackoverflow.com/a/54478940
has answer: http://stackoverflow.com/a/73178244
tagged with: node.js
has answer: http://stackoverflow.com/a/55762320
linked to: http://stackoverflow.com/q/60353529
downvote count: 0
linked to: http://stackoverflow.com/q/47662220
has answer: http://stackoverflow.com/a/75281798
has comment: http://stackoverflow.com/comment/38158137
has answer: http://stackoverflow.com/a/74335160
has answer: http://stackoverflow.com/a/69589634
linked to: http://stackoverflow.com/q/65556978
has answer: http://stackoverflow.com/a/55467212
has answer: http://stackoverflow.com/a/75104123

http://stackoverflow.com/comment/38199444
comment on: http://stackoverflow.com/a/24644326
type: Comment
has text: Wrong; look at methods like `concat()` or `filter()`.
score: 3
type: AnswerComment

http://stackoverflow.com/comment/38272402
score: 0
comment on: http://stackoverflow.com/q/24680782
type: Comment
type: QuestionComment
has text: yes but its still not a solution to what i need it to do. More or less if the object or frame breaks because of page that isnt meant to be loaded in a iframe i need it to redirect to a default source, without added 1000 sites that dont load in iframes there would be no way to keep up. It needs to be able to look and see that the specific page cant load in a iframe and then do it automatically

http://stackoverflow.com/q/24590044
tagged with: http://stackoverflow.com/tag/html
tagged with: ng-show
has comment: http://stackoverflow.com/comment/38096428
tagged with: ionic-framework
has title: How to display a button when entering a page for the first time only?
has comment: http://stackoverflow.com/comment/38095524
has comment: http://stackoverflow.com/comment/38095662
type: Question
has answer: http://stackoverflow.com/a/38764634
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38096639
answer count: 1
has body: I am using AngularJS, HTML, Javascript and Ionic to figure out the correct means to display a message to a user when they enter a specific page in the app for the first time. This message should not be displayed thereafter. I am currently using a button to display the message and using ng-show to check for a 'first time' flag; this flag is to be stored locally as a boolean 'true' or 'false' value and I am using window.localStorage to do so. I would like to know if this approach is correct and if it is then, the code snippet for the first time flag which exists within my controller looks like this: $scope.getFT = function(){ return window.localStorage['firstTime'] || 0; }; $scope.setFT = function(value){ window.localStorage['firstTime'] = 1; }; $scope.checkFT = function(){ // Checks whether or not this is the first time (FT) the user entered this page if(($scope.getFT() === 0 || $scope.getFT() === 'undefined') {// This is the first time navigating in this page, show message &amp; set local flag to true console.log("checkFT: true, value of FT: " + window.localStorage['FT'] + ', now setting FT to true'); $scope.setFT(1); return true; } else {// Not first time navigating through here, do not show first time message console.log("checkFT: false, value of FT: " + window.localStorage['FT']); return false; } }; On my page I have the following button with more code below, like so: &lt;ion-header-bar&gt; &lt;!-- some code here --&gt; &lt;ion-header-bar&gt; &lt;ion-content&gt; &lt;!-- First Time Button --&gt; &lt;button ng-show='checkFT()' class="firstTime"&gt; &lt;img src=".../img/firstTimeImage.png"/&gt; &lt;/button&gt; &lt;/ion-scroll&gt; &lt;ion-list ng-repeat="i in array"&gt; &lt;!-- . . . . more code below . . . . --&gt; &lt;/ion-list&gt; &lt;/ion-scroll&gt; &lt;/ion-content&gt; On my debug window I see that my app identifies that this is the first time I enter the page, but for some reason the function is called about 9 times before the page finishes loading. It is not i…
has comment: http://stackoverflow.com/comment/38095697
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/60665499
score: 0
has body: Based on the latest modal example from Fancybox you can add the the close button to the DOM along with modal: true. $('#newsletterpopup').fancybox({ modal: true, helpers: { overlay: { css: { 'background': 'rgba(58, 42, 45, 0.3)' } } }, }); #trueModal{ display: none } Open modal Your content Close modal
type: Answer
answers question: http://stackoverflow.com/q/24722788

xmlhttprequest
tags question: http://stackoverflow.com/q/24702372
tags question: http://stackoverflow.com/q/24703247
tags question: http://stackoverflow.com/q/24745095
tags question: http://stackoverflow.com/q/24602838
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/24720363
tags question: http://stackoverflow.com/q/24705598
type: Tag
tags question: http://stackoverflow.com/q/24728633
tags question: http://stackoverflow.com/q/24637108
tags question: http://stackoverflow.com/q/24748345
tags question: http://stackoverflow.com/q/24736094
tags question: http://stackoverflow.com/q/24713275
tags question: http://stackoverflow.com/q/24703969
tags question: http://stackoverflow.com/q/24653972
tags question: http://stackoverflow.com/q/24642057

http://stackoverflow.com/comment/38293987
has text: does it goes back to the action carrying the string?
score: 0
comment on: http://stackoverflow.com/q/24695219
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24595917
upvote count: 2
has body: I am new to AngularJS and only aware of the basics of AngularJS. I want to return a value from $http. That is $http should return a value to the global variable of My Application. I have tried this: var sessionValues = null; var AdminController = angular.module('AdminController', []); AdminController.controller('LoginController', ['$scope', '$http','$location', function ($scope, $http, $location){ $http({ method: "post", url: "API/MyPage.php", headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data){ sessionValues = eval(data); console.log(sessionValues); /*Returns desired string*/ }).error(function(){ $scope.message="Some error has occured"; }); console.log(sessionValues); /*Returns null */ } ]); I tried using $rootScope, but was not successful. I understand that this is because it is an asynchronous call, but how can I fetch the value in JS's global variable.? Can anyone help me about this.?
has comment: http://stackoverflow.com/comment/38107524
has comment: http://stackoverflow.com/comment/38107811
has title: AngularJS $http return value
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38106621
has answer: http://stackoverflow.com/a/24596046
type: Question
answer count: 2
score: 2
linked to: http://stackoverflow.com/q/19821018
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/24596046
has comment: http://stackoverflow.com/comment/38106725
possible better answer: http://stackoverflow.com/a/24596233
has comment: http://stackoverflow.com/comment/38107207
has answer: http://stackoverflow.com/a/24596233
tagged with: angularjs

http://stackoverflow.com/comment/38216776
type: QuestionComment
score: 0
has text: What's the difference between `self.scenarioRecInfoDeferred`, `myModelDeferred` and `self.myModelDeferred`?
comment on: http://stackoverflow.com/q/24652935
type: Comment

http://stackoverflow.com/q/24744512
has answer: http://stackoverflow.com/a/24744981
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24744745
type: Question
tagged with: javascript
has body: I have a router that looks like this: App.Router.map(function() { this.resource("manage", function() { this.resource('services' , function() { this.route("new"); this.route("edit", { path: '/edit/:service_id' } ); }); }); }); The services.index route loads the model from the server: App.ServicesIndexRoute = Ember.Route.extend({ model: function() { return this.store.find('service'); } }); Which returns: { "services" : [ { "id" : 1, "serviceId" : "service1", "name" : "Service A" }, { "id" : 2, "serviceId" : "service2", "name" : "Service B" } ] } Then inside the services index template I'm listing the services returned by the server with a {{each}} loop, like so: {{#each service in model}} {{service.serviceId}} {{service.name}} {{#link-to 'services.edit' this}}Edit{{/link-to}} - Delete {{/each}} The issue is that when the template renders, it replaces the path segment with "undefined": Edit ...and the deleteService method gets passed an object which has a property with two services, instead of the service instance in question. Then I tried: {{#each}} {{serviceId}} {{name}} {{#link-to 'services.edit' this}}Edit{{/link-to}} - Delete {{/each}} and it worked! I'm trying to understand what happened in the previous attempt. I'm trying to use the {{@each x in model}} syntax and would like to understand why the this didn't work with that setup... What did I do wrong? Thanks!
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/24744745
has title: Ember's link-to helper not linking to correct URL when using {{#each x in model}} syntax?
tagged with: ember.js
possible better answer: http://stackoverflow.com/a/24744981

http://stackoverflow.com/q/24612248
score: 1
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/24614694
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/24614694
tagged with: javascript
has body: I have developed a simple UI slider directive that has an isolated scope. It also supports registering a change property that is fired when the value of the slider changed. The change property would usually call a function of a parent scope with the slider value from the isolated scope, like this: change="onValueChanged(theValue)" where change is an attribute, onValueChanged is a function declared in a parent controller and theValue is the current value of the element that is only declared in the isolated scope. How can I $eval this correctly? In the slider's link function I can call $scope.$eval(attrs.change) but $scope.onValueChanged is not defined. The isolated scope did not inherit from its parent. At the same time, $scope.$parent.$eval(attrs.change) correctly calls the onValueChanged function, but theValue will not be set because it is isolated in the child scope. Since the change property can reference any number of parent scope properties, I cannot explicitly declare them in the isolated scope. How can I eval the change property so that all variables from the different scopes will be present? Is there a way to force the isolated scope to inherit from its parent?
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24732258
accepted answer: http://stackoverflow.com/a/24732258
tagged with: angularjs
downvote count: 0
type: AnsweredQuestion
has title: Data-binding for a simple slider with Angular

http://stackoverflow.com/comment/38271981
comment on: http://stackoverflow.com/a/24664990
score: 0
type: AnswerComment
has text: Scott's solution helped me solved it (updated code).
type: Comment

http://stackoverflow.com/comment/38350357
comment on: http://stackoverflow.com/q/24724532
type: Comment
type: QuestionComment
score: 3
has text: It sounds like you need to fix the problem on the server. Can you make the server return the response in UTF-8 or not escape the \ characer?

http://stackoverflow.com/comment/38166106
has text: Does this work as well if the user uses keyboard navigation?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24626591

http://stackoverflow.com/comment/38372732
type: Comment
comment on: http://stackoverflow.com/a/24736129
has text: Hi thanks for your answer but even if i remove the padding i still get this spacing at the end when i resize. I have updated my fiddle plus take a look at the issue here http://postimg.org/image/wnfeha4lp/
score: 0
type: AnswerComment

http://stackoverflow.com/a/24596611
has comment: http://stackoverflow.com/comment/55289119
type: Answer
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/24595192
has body: This answer isn't specific to AngularJS but in general you should prefer composition to inheritance and the reason for this is that if you add new functionality to a base class then it's inherited by all the derived types. At first this sounds like just the behaviour you require until one of your derived types needs slightly different behaviour and then in your derived type you need to override the base behaviour to get your specialist behaviour. Doing this once is ok (maybe) but with a large number of polymorphic types management and keeping track of what uses the base behaviour and what has a specialist override and then ensuring that when a base behaviour changes the specialists change in synch just becomes a pain. Therefore if we prefer composition, that is if we design each class so that it accepts predefined components with bite sized pieces of specific functionality then we can change the specific behaviour in one of our instances by changing the component it gets built with. Overall this fits better with best practice principles (SOLID) etc. And bringing it back to AngularJS, Angular encourages this with its dependency injection scheme of doing things- creating services and then injecting them into controllers and other services. So the angular way of doing this would be to build a service which encapsulates the functionality to be shared by each controller and then inject that service into each controller that needs it. You might think along the lines of rather than having one monolithic service that does everything a controller could possibly need, instead build smaller services that just provide a specific set of related functions this is just adhering to the separation of concerns principle. This finer grained service pattern means that each controller only ends up with the services it needs and the decision to reuse a service is much easier.

http://stackoverflow.com/a/66148048
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/24665602
has body: Solution if you are using Ionic Capacitor, Angular Material, and need to support iOS 11. document.activeElement.parentElement.parentElement.scrollIntoView({block: 'center', behavior: 'smooth'}); The key is to scroll to the parent of the parent which is the wrapper around the input. This wrapper includes the label for the input which is now no longer cut off. If you only need to support iOS 14 the "block" center param actually works, so this is sufficient: document.activeElement.scrollIntoView({block: 'center', behavior: 'smooth'});

http://stackoverflow.com/q/24717869
has title: ES6 String.prototype.normalize versus W3C normalization
type: Question
score: 3
has body: I understand that ES6 will have a new function that will do a utf-8 normalization of a string (using the 'NFC' form for example). Reading http://www.unicode.org/faq/normalization.html, I saw this FAQ : Q: What is the difference is between W3C normalization and Unicode normalization? A: Unicode normalization comes in 4 flavors: C, D, KC, KD. It is C that is relevant for W3C normalization. W3C normalization also treats character references (&amp;#nnnn;) as equivalent to characters. For example, the text string "a&amp;#xnnnn;" (where nnnn = "0301") is Unicode-normalized since it consists only of ASCII characters, but it is not W3C-normalized, since it contains a representation of a combining acute accent with "a", and in normalization form C, that should have been normalized to U+00E1. does that mean that we will need to replace all occurrences of &amp;#xnnnn; by their utf8 equivalents before calling normalize('nfc') ? or will there be some sort of normalize('w3c') that will help consider a letter combined with an accent via the ascii "&amp;#xnnnn;" equivalent to its normalized form ?
tagged with: javascript
tagged with: normalization
has answer: http://stackoverflow.com/a/24771706
downvote count: 0
answer count: 1
tagged with: unicode
favorite count: 0
tagged with: utf-8
accepted answer: http://stackoverflow.com/a/24771706
type: AnsweredQuestion
upvote count: 3
tagged with: unicode-normalization

http://stackoverflow.com/a/24710825
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/24710804
answers question: http://stackoverflow.com/q/24710804
score: 2
downvote count: 0
type: AcceptedAnswer
has body: Problem is that .* is too greedy in your regex. You can use negation: var r = str.replace(/%[^%]*%/g, "something"); //=&gt; Hi something is the something I was talking about Or else just match a word between %: var r = str.replace(/%\w*%/g, "something");

http://stackoverflow.com/a/24739378
has body: You can try this:- (function(){ var me = this; $("#myform").ajaxForm({ beforeSend: function() { me.abcd = "hahah" }, success: function(data){ alert(me.abcd); delete me.abcd; } }); })();
has comment: http://stackoverflow.com/comment/38400452
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/24739047
score: 0

cordova
tags question: http://stackoverflow.com/q/24712715
tags question: http://stackoverflow.com/q/24632074
tags question: http://stackoverflow.com/q/24655785
tags question: http://stackoverflow.com/q/24712387
tags question: http://stackoverflow.com/q/24618227
tags question: http://stackoverflow.com/q/24693149
tags question: http://stackoverflow.com/q/24614352
tags question: http://stackoverflow.com/q/24604975
tags question: http://stackoverflow.com/q/24592140
tags question: http://stackoverflow.com/q/24628296
tags question: http://stackoverflow.com/q/24664454
tags question: http://stackoverflow.com/q/24653019
tags question: http://stackoverflow.com/q/24670002
tags question: http://stackoverflow.com/q/24629092
tags question: http://stackoverflow.com/q/24662762
tags question: http://stackoverflow.com/q/24616627
tags question: http://stackoverflow.com/q/24658782
tags question: http://stackoverflow.com/q/24672573
tags question: http://stackoverflow.com/q/24652941
tags question: http://stackoverflow.com/q/24739193
tags question: http://stackoverflow.com/q/24617450
tags question: http://stackoverflow.com/q/24622788
tags question: http://stackoverflow.com/q/24600532
tag name: cordova
tags question: http://stackoverflow.com/q/24711361
tags question: http://stackoverflow.com/q/24728769
tags question: http://stackoverflow.com/q/24695340
tags question: http://stackoverflow.com/q/24736640
tags question: http://stackoverflow.com/q/24681907
tags question: http://stackoverflow.com/q/24682903
tags question: http://stackoverflow.com/q/24734981
tags question: http://stackoverflow.com/q/24718097
tags question: http://stackoverflow.com/q/24704871
tags question: http://stackoverflow.com/q/24644848
tags question: http://stackoverflow.com/q/24593859
tags question: http://stackoverflow.com/q/24671100
tags question: http://stackoverflow.com/q/24606200
tags question: http://stackoverflow.com/q/24722741
tags question: http://stackoverflow.com/q/24623914
tags question: http://stackoverflow.com/q/24674709
tags question: http://stackoverflow.com/q/24595889
tags question: http://stackoverflow.com/q/24693710
tags question: http://stackoverflow.com/q/24697961
tags question: http://stackoverflow.com/q/24627422
tags question: http://stackoverflow.com/q/24635335
tags question: http://stackoverflow.com/q/24673458
tags question: http://stackoverflow.com/q/24715333
tags question: http://stackoverflow.com/q/24687070
tags question: http://stackoverflow.com/q/24714614
tags question: http://stackoverflow.com/q/24620002
type: Tag
tags question: http://stackoverflow.com/q/24676181
tags question: http://stackoverflow.com/q/24603371

http://stackoverflow.com/comment/38107531
has text: But it makes the html invalid.
score: 2
comment on: http://stackoverflow.com/a/24596492
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38255724
comment on: http://stackoverflow.com/a/24671608
type: Comment
has text: I wrote you a new answer with the review. Good luck!
score: 0
type: AnswerComment

http://stackoverflow.com/q/24704231
has title: identify presence of an Input tag
has answer: http://stackoverflow.com/a/24704265
accepted answer: http://stackoverflow.com/a/24704265
has comment: http://stackoverflow.com/comment/38311628
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/38311216
score: -1
type: Question
answer count: 1
has body: I have this scenario.... in a webpage, i will have few input/ textboxes... sometimes 2 or sometimes 3. this will be displayed/ created based on my need.. but once the page is displayed on clicking of a button, i wish to know how many input tags are available.. with the id i might populate with... is it possible for me to identify if a Input box is available or not with id. i do not wish to abruptly stop the pgm, if it isn't present. i use html, css3 and javascript in my code (php being server coding). hope am clear. let me know if not. thanks in advance!
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0

web-services
type: Tag
tags question: http://stackoverflow.com/q/24700339
tags question: http://stackoverflow.com/q/24744381
tags question: http://stackoverflow.com/q/24737762
tags question: http://stackoverflow.com/q/24722829
tags question: http://stackoverflow.com/q/24598835
tags question: http://stackoverflow.com/q/24626839
tag name: web-services

http://stackoverflow.com/comment/38166410
type: AnswerComment
has text: Because there is only ever one, its simply just an object with some functions in it that you are using. "`static`" almost.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24626757

http://stackoverflow.com/comment/65980389
has text: Why the downvotes? My question was about 7.0, not 7.1, and this solution worked for it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24708194
type: AnswerComment

http://stackoverflow.com/q/24629531
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24629835
tagged with: css
type: AnsweredQuestion
has body: I have the following code which works only that not as I desire: HTML: 1 2 3 CSS: .horizontal-ribbon { padding: 8px 8px 8px 8px; background: #d6dbdf; } .list { position:relative; } .list ul { display:inline-block; background:#d6dbdf; margin:0; padding:0; border-radius:0px; color:#ffffff; } .list ul li { cursor: pointer; cursor: hand; display:inline-block; vertical-align:middle; border-radius: 50%; width:14px; height:14px; padding:0px; background:#fff; border: 5px solid #d6dbdf; color: #ffffff; text-align:center; font: 700 13px"Lato", Helvetica, Arial sans-serif; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing: grayscale; -webkit-transition: background 0.2s ease-out, border-color 0.2s ease-out; transition: background 0.2s ease-out, border-color 0.2s ease-out; } .list ul li:first-child { margin-left: 20px; } .list ul li:last-child { margin-right: 20px; } .list ul li:hover { background:#1abc9c; border-color:#1abc9c; } JAVASCRIPT: function check() { element = document.getElementById("pseudoCheckBoxes"); items = element.getElementsByTagName("LI"); items[0].style.backgroundColor = "#1abc9c"; items[0].style.borderColor = "#1abc9c"; setTimeout(function () { uncheck() }, 2000); } function uncheck() { element = document.getElementById("pseudoCheckBoxes"); items = element.getElementsByTagName("LI"); items[0].style.backgroundColor = "white"; items[0].style.borderColor = "#d6dbdf"; } I wish to control that effect both from button press and by hovering the mouse of elements. The hover effect works well but after I click the button next the hover effect disappears and I don't know why. Please be kind and help me (http://jsfiddle.net/xfpyM/).
possible better answer: http://stackoverflow.com/a/24629929
type: Question
has answer: http://stackoverflow.com/a/24629929
has title: Hover effect disappear after calling function through button
has answer: http://stackoverflow.com/a/24629835
tagged with: javascript

http://stackoverflow.com/comment/38372465
type: AnswerComment
comment on: http://stackoverflow.com/a/24736048
score: 0
type: Comment
has text: I edited my question in a way more explaining how my project works and what is requested please if you can read what is required again.thank you for your help in advance

jsp
tags question: http://stackoverflow.com/q/24650886
tags question: http://stackoverflow.com/q/24710880
tags question: http://stackoverflow.com/q/24646313
tags question: http://stackoverflow.com/q/24627152
tags question: http://stackoverflow.com/q/24731375
tags question: http://stackoverflow.com/q/24739662
tags question: http://stackoverflow.com/q/24652694
tags question: http://stackoverflow.com/q/24607978
tags question: http://stackoverflow.com/q/24673024
tags question: http://stackoverflow.com/q/24710044
tags question: http://stackoverflow.com/q/24733033
tags question: http://stackoverflow.com/q/24672476
tags question: http://stackoverflow.com/q/24654734
tags question: http://stackoverflow.com/q/24634540
tags question: http://stackoverflow.com/q/24631117
type: Tag
tags question: http://stackoverflow.com/q/24616254
tags question: http://stackoverflow.com/q/24615758
tags question: http://stackoverflow.com/q/24748242
tags question: http://stackoverflow.com/q/24691419
tags question: http://stackoverflow.com/q/24627531
tags question: http://stackoverflow.com/q/24651485
tags question: http://stackoverflow.com/q/24656480
tags question: http://stackoverflow.com/q/24696651
tag name: jsp
tags question: http://stackoverflow.com/q/24616189
tags question: http://stackoverflow.com/q/24733025
tags question: http://stackoverflow.com/q/24642559
tags question: http://stackoverflow.com/q/24611721
tags question: http://stackoverflow.com/q/24642162
tags question: http://stackoverflow.com/q/24647475
tags question: http://stackoverflow.com/q/24669924
tags question: http://stackoverflow.com/q/24607933
tags question: http://stackoverflow.com/q/24686110
tags question: http://stackoverflow.com/q/24604207
tags question: http://stackoverflow.com/q/24670527

http://stackoverflow.com/comment/38440561
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24663251
has text: @ManishMulimani, Can you clarify what you mean by the "initiates the routing" code? I'm not really sure which code you're referring to. I tried hardcoding the model id, but the url still keeps going to /stores/, so I think the error must be with the model somehow?

http://stackoverflow.com/comment/38290729
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24693280
has text: @user3567527: Great - please feel free to click the tick and accept this as the answer if it solved your problem (and possibly upvote the answer). Voting is what drives the community :)
type: AnswerComment

http://stackoverflow.com/a/24898010
has comment: http://stackoverflow.com/comment/38892867
has comment: http://stackoverflow.com/comment/38940008
has comment: http://stackoverflow.com/comment/38957502
score: 0
has comment: http://stackoverflow.com/comment/38835922
has comment: http://stackoverflow.com/comment/38940040
type: Answer
answers question: http://stackoverflow.com/q/24614104
has comment: http://stackoverflow.com/comment/38950738
has comment: http://stackoverflow.com/comment/38800951
has body: You just update it to latest version of JXcore, and it will work fine. I just tested a similar case without an issue. Update It seems that pkginfo module (one of the node modules winston uses), tries to access directory list inside the package which is limited due to protection.

http://stackoverflow.com/comment/38279262
score: 0
comment on: http://stackoverflow.com/a/24676304
type: AnswerComment
type: Comment
has text: That's right. Do you know how to calculate a non linear path?

http://stackoverflow.com/a/24689453
has comment: http://stackoverflow.com/comment/38283608
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38283564
upvote count: 2
has comment: http://stackoverflow.com/comment/38284007
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38283589
has comment: http://stackoverflow.com/comment/38284340
has comment: http://stackoverflow.com/comment/38283871
type: Answer
answers question: http://stackoverflow.com/q/24689323
has body: Give the textbox an ID. For example: Change: To: You need to use the $$ function which returns an array. Event.observe('txtbox', 'keyup', function () { if ($$('input[name="test"]')[0].value < 10){ $$('#yeah')[0].show(); } else{ $$('#yeah')[0].hide(); } }); Note: You could also use .first() instead of [0] JSFiddle
accepted answer of: http://stackoverflow.com/q/24689323

http://stackoverflow.com/a/24688599
type: Answer
has comment: http://stackoverflow.com/comment/38468503
has comment: http://stackoverflow.com/comment/38282512
upvote count: 2
answers question: http://stackoverflow.com/q/24688524
downvote count: 2
has comment: http://stackoverflow.com/comment/38282158
has comment: http://stackoverflow.com/comment/38283786
has comment: http://stackoverflow.com/comment/38282645
has body: working version $http.get('https://api.github.com/users/angular').then(openInNewTab()); EDIT---------------- Do not know why but a click() method called from a callback function acts differently than calling it straight. You can see it here with a set interval example. That is why I had call the function directly rather than going through a callback. see it with timer callback
has comment: http://stackoverflow.com/comment/38282048
score: 0

http://stackoverflow.com/comment/38135177
has text: If someone asks me to make some orange juice I **could** use my hands to squeeze the oranges (they do the job and my hands won't loose that functionality) but if I've got an orange squeezer it's much more practical and **efficient** to use that. Also, you don't know that Jquery will always support reading data attributes in this manner. If they decide to remove this functionality (which they would be well within their right to do) your code would fail.
type: Comment
comment on: http://stackoverflow.com/a/24608671
score: 0
type: AnswerComment

http://stackoverflow.com/a/24801540
has body: Well the simple answer is - [name= is not supported in chunkName. The awesome guys at Webpack have actually heard my cries and implemented it Here is the commit https://github.com/webpack/webpack/commit/03c87c11a4219ae6ec6bfe87e570a0dacceac859 As a result of the following issue I made https://github.com/webpack/webpack/issues/358 It is already available as of Beta ^1.3.2
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/24743114
downvote count: 0

http://stackoverflow.com/q/24646285
has answer: http://stackoverflow.com/a/24646434
has comment: http://stackoverflow.com/comment/38203105
upvote count: 1
has answer: http://stackoverflow.com/a/24646480
answer count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/24646457
accepted answer: http://stackoverflow.com/a/24646351
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/24646344
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/24646344
favorite count: 0
type: Question
has body: How do I change the HTML itself when I press a button? When I press a button in this case, the value is stored as "displayCount". Is there a way in which I can directly see the count on the HTML code? If it was press one time, I could see the number 1 on the HTML itself, not as a variable? Thank you! The button was pressed 0 times. For example, if button was pressed once, one of the line would change from The button was pressed 1 times.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24646351
has title: How to change field on HTML file when button is pressed

indexing
tags question: http://stackoverflow.com/q/24658666
type: Tag
tags question: http://stackoverflow.com/q/24736157
tag name: indexing
tags question: http://stackoverflow.com/q/24672607
tags question: http://stackoverflow.com/q/24632449

http://stackoverflow.com/comment/38310957
comment on: http://stackoverflow.com/q/24704071
has text: ...anyway, to do what you want, `.clone()` the parent, traverse to the one you don't want and remove it, then save the `.html()` of the parent.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24633835
has body: I took the QRcode library from here http://davidshimjs.github.io/qrcodejs/ and I wanted to display it on a face of an mesh object as a texture using this code: var qrcode = new QRCode( "test", { text: "http://jindo.dev.naver.com/collie", width: 128, height: 128, colorDark : "#000000", colorLight : "#ffffff", correctLevel : QRCode.CorrectLevel.H }); ... var cuboidTexture = THREE.ImageUtils.loadTexture( qrcode ); cuboidTexture.needsUpdate = true; but it gives me this error: Uncaught TypeError: Cannot call method 'appendChild' of null qrcode.min.js:1 Is something I'm doing wrongly? Or I just can't have an QRcode as texture? EDIT: Using the qrcode.js library the error is the same: Uncaught TypeError: Cannot call method 'appendChild' of null qrcode.js:359
has comment: http://stackoverflow.com/comment/38179974
upvote count: 1
has comment: http://stackoverflow.com/comment/38179448
score: 1
has comment: http://stackoverflow.com/comment/38223635
has comment: http://stackoverflow.com/comment/38185438
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38180495
has comment: http://stackoverflow.com/comment/38191023
downvote count: 0
tagged with: qr-code
tagged with: javascript
has comment: http://stackoverflow.com/comment/38180351
has answer: http://stackoverflow.com/a/24657669
has title: How can I display a QRcode on a mesh in three.js?
has comment: http://stackoverflow.com/comment/38186339
has comment: http://stackoverflow.com/comment/38190926
has answer: http://stackoverflow.com/a/26896471
favorite count: 0
type: UnansweredQuestion
tagged with: three.js

http://stackoverflow.com/comment/38391401
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24727588
has text: I'm not sure if the element supports that. It's pretty basic right now...startAddress and stopAddress.
score: 1

http://stackoverflow.com/comment/38370897
comment on: http://stackoverflow.com/q/24735210
type: Comment
type: QuestionComment
score: 0
has text: first why are you calling `.focus()` from an focus handler?

http://stackoverflow.com/q/24607749
upvote count: 2
type: UnansweredQuestion
has title: Play private vimeo videos in javascript
has answer: http://stackoverflow.com/a/24631796
tagged with: vimeo-api
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I need to play private vimeo videos, as per document I have integrated oauth API and getting oauth secret &amp; verifier. I also know the vimeo private url which I need to play. The problem is I don't know how to request to play private video in javascript. Couldn't find any supporting doc at vimeo website also. Can anyone help me in playing private vimeo videos in javascript. Thanks in advance.
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 2

http://stackoverflow.com/comment/38132792
has text: Welcome to Stack Overflow. Please read [Stack Overflow: How to ask](http://stackoverflow.com/questions/how-to-ask) and [Jon Skeet's Question Checklist](http://msmvps.com/blogs/jon_skeet/archive/2012/11/24/stack-overflow-question-checklist.aspx) to find out how to ask a good question that will generate good useful, answers.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24609127

http://stackoverflow.com/comment/38199706
score: 0
type: Comment
has text: @TiesonT. It didn't work. It created a lot of empty whitespace and also disqus comments were disappeared. I just solved this problem. See my answer. Thanks for your help.
comment on: http://stackoverflow.com/q/24643526
type: QuestionComment

http://stackoverflow.com/comment/38278152
type: Comment
comment on: http://stackoverflow.com/a/24686383
has text: what are the older browsers that are not supported? thank you for your answer.
score: 0
type: AnswerComment

header
type: Tag
tag name: header
tags question: http://stackoverflow.com/q/24726449

http://stackoverflow.com/comment/38351583
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/24725120
has text: Re: your last paragraph: In C#, yes. In Javascript, not necessarily.

http://stackoverflow.com/q/24653289
type: AnsweredQuestion
tagged with: video
has body: I am creating a video watching system with the HTML5 video tag. I have one problem and I don't know if the problem is because of my code or of Google Chrome. Everything works fine until I try to drag the timeline bar or volume bar. Can anybody please help me? The problem is that the moment I click and unclick it does not stop dragging the bar around. So when I drag and leave it, it doesn't stop dragging. I have tried everything like clicking around but the only thing that worked was when I reload the page. My code: To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
has comment: http://stackoverflow.com/comment/128246445
has title: Google Chrome video timeline and volume bar dragging
tagged with: html5-video
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38279093
has answer: http://stackoverflow.com/a/24653643
accepted answer: http://stackoverflow.com/a/24653643
tagged with: google-chrome

http://stackoverflow.com/a/24662661
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24657824
has body: Ok sorry for all this mess, here's the code that actualy works : d3.csv("file.csv", function (error, data) { csvAsArray = data; localStorage.setItem('anobjectwithnoname', JSON.stringify(csvAsArray)); }); then in some function : var csv = localStorage.getItem('anobjectwithnoname'); var csvAsArray = JSON.parse(csv); this way i got the object out of the asynchronous "trap" ;) sorry again for the messy code. please don't be to harsh with try and fail type of learning

http://stackoverflow.com/a/24612810
answers question: http://stackoverflow.com/q/24612734
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/38140086
has body: If you need to be cross-browser compliant you will need a custom widget. None of the standard input components act in this way across all browsers. However, specifying the step attribute will work in Chrome: &lt;input type="time" step="00.01"&gt; http://jsfiddle.net/Ng67n/ You can't modify the standard controls to do this, unless you use some sort of masking plugin on a standard text input.
downvote count: 0
score: 1

http://stackoverflow.com/a/24714814
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/24649778
accepted answer of: http://stackoverflow.com/q/24649778
has body: I think part of the problem is that the XML you have is using attributes for everything. It might be somewhat easier if it used elements. Take a look at my https://github.com/imbroglioj/xml-to-es which allows you to specify in a property file how you want your resultant JSON object massaged by promoting child elements or attributes to top-level, etc. It would be easy to extend the property file and the collapsing function to erase fields or rename them.

http://stackoverflow.com/comment/38256746
comment on: http://stackoverflow.com/q/24675429
score: 0
type: Comment
type: QuestionComment
has text: The question is "Why does it only return one time"

http://stackoverflow.com/q/24665516
has title: Rendering images using NodeJS
tagged with: http://stackoverflow.com/tag/html
has body: I am developing a web application using Node JS and Socket.IO. Here when I click a button a text in displayed in the browser using sockets so if I open a new window with the browser I can see a text. What I am trying to do is to render some images on my site but I cant find a way of make it work. I tried using simple HTML5 tags but the image was not rendered. I would really appreciate the help. Thank you all! //HTML And here is my Java Script //Java Script 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.on('chat message', function(msg){ io.emit('chat message',"song1"); }); }); http.listen(3000, function(){ console.log('listening on *:3000'); });
type: UnansweredQuestion
tagged with: node.js
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24669101
score: 0

http://stackoverflow.com/q/24700563
downvote count: 0
answer count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/3830486
favorite count: 0
has body: I developed a simple jQuery plugin that works fine when I right click on a div, but when I click on a second div the context menu appears on the first div. Here's the jsfiddle. What's wrong with this plugin? The plugin code: (function ( $ ) { var menu = null; $.fn.ctxMenu = function( options ) { var settings = $.extend({ menuItems: null, onclick: null }, options ); show(this,settings.menuItems,settings.onclick); }; function show(obj,menuItems,onclick){ obj.bind( "contextmenu", function(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); render(obj,e.offsetX, e.offsetY,menuItems,onclick); }); obj.bind( "click", function(e) { if (menu != null) menu.remove(); }); } function render(obj,x,y,menuItems,onclick) { if (menu != null) menu.remove(); menu = $('&lt;div id="menu" class="ctxMenu" /&gt;'); obj.append(menu); menu.css('padding-top', '4px' ); menu.css('padding-bottom', '0px' ); menu.css('padding-left', '6px' ); menu.css('padding-right', '20px' ); menu.css('position', 'absolute' ); menu.css('top', y+'px' ); menu.css('left', x+'px' ); for (var i=0;i&lt;menuItems.length;i++) { var item = $('&lt;div id="item" style="height:20px;padding:2px;cursor:default;" /&gt;'); item.attr('opt',menuItems[i].opt); var p = $('&lt;p id="p' + i + '" style="margin:0" /&gt;' ); p.text(menuItems[i].optCaption); p.attr('opt',menuItems[i].opt); item.append(p); menu.append(item); item.bind( "click", function(e) { if (typeof onclick == 'function') onclick.call(this,obj.attr('id'),$(e.target).attr('opt')); }); } } }( jQuery )); And sample code of how to invoke it: $div.ctxMenu({ menuItems: [ { opt:1, optCaption: "Option 1" }, { opt:2, optCaption: "Option 2" }, { opt:3, optCaption: "Option 3" } ], change: function(id,opt) { alert(id+"-"+opt); } });
has comment: http://stackoverflow.com/comment/38304262
has comment: http://stackoverflow.com/comment/38304167
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/25354360
accepted answer: http://stackoverflow.com/a/25354360
has comment: http://stackoverflow.com/comment/38304211
has comment: http://stackoverflow.com/comment/38304299
type: Question
has comment: http://stackoverflow.com/comment/38304063
tagged with: javascript
has comment: http://stackoverflow.com/comment/38304521
tagged with: jquery-plugins
has title: jQuery plugin: context menu in second div not working

http://stackoverflow.com/q/24593553
has comment: http://stackoverflow.com/comment/38102231
has comment: http://stackoverflow.com/comment/38102193
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/24593653
has body: Why does $.ajax({url:"xxx"}).responseText return undefined? But if I use a=$.ajax({url:"xxx"}), a.responseText returns right result. Thanks!
downvote count: 1
type: Question
has title: Why does $.ajax({url:"xxx"}).responseText return undefined?
possible better answer: http://stackoverflow.com/a/24593648
tagged with: javascript
has answer: http://stackoverflow.com/a/24593648
tagged with: jquery
has comment: http://stackoverflow.com/comment/38102333
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/24593653
favorite count: 0

http://stackoverflow.com/a/24688205
has body: this is hard to read &lt;?php $query = mysql_query(SELECT * FROM tests); while($row = mysql_fetch_assoc($query)){ $post_id = $row['id']; $text = $row['paragraph']; ?&gt; &lt;div id='text' class='&lt;?php echo "$post_id";?&gt;'&gt; &lt;p&gt;&lt;?php echo "$text";?&gt;&lt;/p&gt; &lt;input type='button' value='Show id' id='show'&gt; &lt;/div&gt; &lt;?php } ?&gt; Try something like this &lt;?php $query = mysql_query('SELECT * FROM tests'); while(false !== ( $row = mysql_fetch_assoc($query))): ?&gt; &lt;div class='text' id='post-&lt;?php echo $row['id']; ?&gt;'&gt; &lt;p&gt;&lt;?php echo $row['paragraph']; ?&gt;&lt;/p&gt; &lt;input type='button' value='Show id' id='show'&gt; &lt;/div&gt; &lt;?php endwhile; ?&gt; I don't see how the query worked without quotes. Just to explain you can use the alternative syntax for the while, so instead of &lt;?php while(. .. ){ ?&gt; &lt;html&gt;&lt;/html&gt; &lt;?php } ?&gt; do &lt;?php while(... ): ?&gt; &lt;html&gt;&lt;/html&gt; &lt;?php endwhile; ?&gt; When you have a lot of html ( this is a small example ) you can easily find the diffrence between endif; endwhile; or endforeach; then } } or }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24688145

http://stackoverflow.com/a/24697655
has body: For refreshing the page, you can use in jquery location.reload(). For storing the radio button value which is clicked, you need to store the data in the local storage if you are not using server.
has comment: http://stackoverflow.com/comment/38298252
answers question: http://stackoverflow.com/q/24697272
type: Answer
has comment: http://stackoverflow.com/comment/38298383
score: 0
has comment: http://stackoverflow.com/comment/38298304
has comment: http://stackoverflow.com/comment/38299155
has comment: http://stackoverflow.com/comment/38298597

http://stackoverflow.com/a/24652904
has comment: http://stackoverflow.com/comment/38215319
has body: $routeChangeStart has preventDefault() but from what I remember it didn't work. However some time ago I managed to get it working with $locationChangeStart. $locationChangeStart fires before $routeChangeStart and if it is prevented, $routeChangeStart doesn't fire at all. Note that I haven't tested this code: $rootScope.$on("$locationChangeStart", function(event) { if(notAllowed){ event.preventDefault(); }; });
has comment: http://stackoverflow.com/comment/38215274
has comment: http://stackoverflow.com/comment/38215428
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24651341

http://stackoverflow.com/q/24616362
has body: Here's my code: Choose 1 to 3 1. Choose fund 2. Prepare data 3. Perform valuation My intention: Upon selecting the first item from the list, the Fund (L###) input box appears. I also have some minor code onblur and onfocus to make this a bit cooler. However, nothing happens. What am I doing wrong? There's a lot of quotation marks there. Perhaps that's what's messing this up.
has answer: http://stackoverflow.com/a/24616390
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24616390
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38146941
has title: document.write Javascript function
has comment: http://stackoverflow.com/comment/38146468
type: Question
has comment: http://stackoverflow.com/comment/38146461
has comment: http://stackoverflow.com/comment/38146438
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/38381920
has text: Signed request will only return a user ID if that user has logged into your app and granted it some permissions
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24738429

http://stackoverflow.com/q/24665408
score: 1
has answer: http://stackoverflow.com/a/24760183
has comment: http://stackoverflow.com/comment/38239645
tagged with: asp.net-mvc-3
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24726620
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38244758
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has title: How to show View after Ajax call to a Controller
has body: I cant figured out how to show whole page after Ajax call to Controler. After 'Order' buton click I call javascript function where I make Ajax call to controler action to get XML in string and with that string I call another controller action where I return model. In last step I want to call third controller action with return View(model) but I get null object parameter. function order(model) { $('#details-container').html(" Loading Complete Frame Module. Please wait... "); $.p({ url: '@Url.Action("CompleteFrameBrandDetails", "PacCompleteFrame")', data: { item: model }, success: function (xml) { if (xml.Success) { $.p({ url: '@Url.Action("GlassCompleteFrame", "PacModule")', data: JSON.stringify({ b2bXml: xml.Data }), success: function (model) { var pacModuleModel = { CustomerNumber: model.Data.CustomerNumber, Language: model.Data.Language, Comission: model.Data.Comission, GlassXml: model.Data.GlassXml, Price: model.Data.Price, ReadOnly: model.Data.ReadOnly, Mode: model.Data.Mode, IframeUrl: model.Data.Mode }; var url = '@Url.Action("GlassCompleteFrameView", "PacModule", "__view__")'; window.location.href = url.replace("__view__", JSON.stringify(pacModuleModel)); } }); } else { $.alert({ message: 'error while trying to load xml details' }); } } }); } public ActionResult GlassCompleteFrame(string b2bXml) { string mode = "5"; //If the Store isn't selected, redirect to HomePage if (string.IsNullOrEmpty(_workContext.SelectedCustomerNumber)) { return RedirectToRoute("HomePage"); } else { PacModuleModel model = new PacModuleModel(); model.CustomerNumber = _workContext.SelectedCustomerNumber; model.Language = _workContext.WorkingLanguage.UniqueSeoCode; model.Comission = ""; if (b2bXml == null || b2bXml == String.Empty) { return RedirectToRoute("HomePage"); } else { model.GlassXml = b2bXml.Replace("\"", "\\\""); } int index = b2bXml.IndexOf(" ") + " ".Length; string p = b2bXml.Substring(index, b2bXml.IndexOf(" ") - index); model.Price = Convert.ToDouble(p, System.Globalizati…

http://stackoverflow.com/q/24712462
favorite count: 0
score: 2
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38360203
has answer: http://stackoverflow.com/a/24729557
tagged with: knockout.js
type: Question
upvote count: 2
has body: I use select2 and knockoutJs with this simple binding: ko.bindingHandlers.select2 = { init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { var options = ko.toJS(valueAccessor()) || {}; setTimeout(function () { $(element).select2(options); }, 0); } }; Markup: it works! Now I enabled the allowClear option in Select2 to clear dropdown to a placeholder value like Select an item.... If I click the x icon dropdown properly sets the placeholder but knockout don't update observable binded value! I think I've to change custombinding adding something like this: setTimeout(function () { $(element).select2(options).on("select2-removed", function (e) { ko.bindingHandlers.value.update(element, function () { return ''; }); }); ... but it won't work!
has comment: http://stackoverflow.com/comment/38339280
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Select2 allowclear and knockout.js

http://stackoverflow.com/comment/38125699
has text: If you think this should work, can you try to adapt your solution to [the fiddle I gave](http://jsbin.com/qifezupu/4/edit) ? Note that I don't care for pixel position, just *exact* line position of the caret.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24605721
type: AnswerComment

http://stackoverflow.com/comment/114356462
has text: Absolutely appropriate. Best answer!
type: Comment
comment on: http://stackoverflow.com/a/60444675
score: 4
type: AnswerComment

http://stackoverflow.com/comment/38219776
score: 0
type: AnswerComment
type: Comment
has text: How could I save the array to a hidden field? I thought that is not possible?
comment on: http://stackoverflow.com/a/24653655

http://stackoverflow.com/a/24697029
score: 0
accepted answer of: http://stackoverflow.com/q/24696977
type: AcceptedAnswer
has body: Wrap the function in an if statement comparing the default value ("") to the selected value $( ".target" ).change(function() { if($(this).val() != "") { var docHeight = $(document).height(); var scrollTop = $(window).scrollTop(); $('.overlay-bg').show().css({'height' : docHeight}); $('.overlay-content').css({'top': scrollTop+20+'px'}); } }); Here is a JSFiddle if needed to help clarify (I simplified the .change() but you get the idea).
type: Answer
answers question: http://stackoverflow.com/q/24696977

http://stackoverflow.com/comment/38208627
has text: You should use closest parent that remains static.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24649158

http://stackoverflow.com/comment/58210447
type: AnswerComment
comment on: http://stackoverflow.com/a/24716749
has text: Would nice to see a simple demo using this. By the way, as long as `distance1` is `null`, it could result in `NaN`. ;)
type: Comment
score: 0

custom-fields
tag name: custom-fields
tags question: http://stackoverflow.com/q/24651676
type: Tag

http://stackoverflow.com/q/24712182
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38327656
type: Question
has title: How to remove a route in Express 4?
has comment: http://stackoverflow.com/comment/48400004
downvote count: 0
tagged with: javascript
tagged with: express
favorite count: 0
has body: I have a route like this : app.route('/internal/api/services').get(function(req, res, next) { var query = servicesModel.find(null); query.exec(function (err, services) { if (err) { throw err; } console.log("getting all services"); res.json(services); }); }); How can I programmatically remove this route by path ?
tagged with: node.js

http://stackoverflow.com/comment/38322579
comment on: http://stackoverflow.com/q/24709919
has text: You probably get a reference error since neither `hash` or `input1` are defined. Read these articles to [learn how to](http://www.creativebloq.com/javascript/javascript-debugging-beginners-3122820) [**debug** JavaScript](https://developers.google.com/chrome-developer-tools/docs/javascript-debugging), so you can provider more useful context information (and help yourself).
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/24622764
answer count: 1
type: UnansweredQuestion
tagged with: ruby-on-rails-4
downvote count: 0
tagged with: javascript
score: 1
tagged with: carrierwave
has answer: http://stackoverflow.com/a/24630919
favorite count: 0
type: Question
has title: Cloudinary cl_image_upload vs cl_image_upload_tag
has body: I am trying to enable direct image upload from browser to cloudinary. The problem that I have is that the image is not being uploaded given the below syntax. &lt;%= form_for(@product_image) do |f| %&gt; &lt;div class="field"&gt; &lt;%= f.cl_image_upload(:image) %&gt; &lt;/div&gt; &lt;%= f.submit %&gt; &lt;% end %&gt; If I replace this block &lt;%= f.cl_image_upload(:image) %&gt; with &lt;%= cl_image_upload_tag("product_image[image]") %&gt; the upload still does not happen. However, if I put both of them next to each other, then both will upload. I compare the html generated by the 2 cloudinary helper methods and they generate exactly the same html code. Looking at the code for these 2 helper methods, it seems that one is calling another. def cl_image_upload(object_name, method, options={}) cl_image_upload_tag("#{object_name}[#{method}]", options) end and def cl_image_upload_tag(field, options={}) html_options = options.delete(:html) || {} if options.delete(:multiple) html_options[:multiple] = true field = "#{ field }[]" unless field.to_s[-2..-1] == "[]" end tag_options = html_options.merge(:type=&gt;"file", :name=&gt;"file", :"data-url"=&gt;cl_upload_url(options), :"data-form-data"=&gt;cl_upload_tag_params(options), :"data-cloudinary-field"=&gt;field, :"class" =&gt; [html_options[:class], "cloudinary-fileupload"].flatten.compact ).reject{|k,v| v.blank?} content_tag("input", nil, tag_options) end If I really want to use just one block &lt;%= f.cl_image_upload(:image) %>, then I also have to add extra javascript $('.cloudinary-fileupload).cloudinary_fileupload(); In your opinion, what is the best way for direct from browser upload to cloudinary with Carrierwave?
tagged with: cloudinary
upvote count: 1

http://stackoverflow.com/comment/38247936
comment on: http://stackoverflow.com/q/24670599
type: Comment
type: QuestionComment
has text: Cant you add a specific class when you are setting the innerHTML. and for that specific class, set the innerHTML()
score: 0

http://stackoverflow.com/q/24667020
has comment: http://stackoverflow.com/comment/38242184
has answer: http://stackoverflow.com/a/24667118
has comment: http://stackoverflow.com/comment/38242209
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24667056
score: 0
has title: Checking whether key and value exist in Javascript object
has answer: http://stackoverflow.com/a/24667080
possible better answer: http://stackoverflow.com/a/24667056
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24667075
accepted answer: http://stackoverflow.com/a/24667080
has comment: http://stackoverflow.com/comment/38243547
upvote count: 1
has body: Suppose I have: var original = { 0: { id : 158 }, 1: { id : 159 } } var newSeries = { 0: { id : 158, name: "Jason", lastname: "Smith", status : "active" }, 1: { id : 159 , name: "Rebecca", lastname: "Smith", status : "terminated" } } and I want to know for example id # 158 from newSeries exists in original, how would I go about doing so? I found a partial solution to use the in operator but that only compares their keys and not the keys and values.
downvote count: 1
linked to: http://stackoverflow.com/q/16339635
type: Question
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/24724911
score: 0
answer count: 3
has title: ajax increases number of responses with each click
linked to: http://stackoverflow.com/q/14969960
tagged with: javascript
has comment: http://stackoverflow.com/comment/38351153
tagged with: jquery
has answer: http://stackoverflow.com/a/24725299
tagged with: ajax
has comment: http://stackoverflow.com/comment/38351150
possible better answer: http://stackoverflow.com/a/24725138
has answer: http://stackoverflow.com/a/24725138
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/66539337
has body: I've got simple ajax request (it just sends form) and it is called when I click the button. The problem is when I click login and it's failed, php does echo "FAIL" and when I click it again then php "echoes" it two times, then three times etc. It happens until I refresh the pages then "the counter" resets. It is inside $(document).ready() and it uses POST. My code: EDIT#1 "CODE EDIT" $('#register').click(function (event) { if (true) { var frm = $('#registerForm'); alert('debug1'); //DOESN'T REPEAT frm.submit(function (ev) // THIS FUNCTION REPEATS, DONT KNOW WHY. { alert('debug2'); //DOES REPEAT $.ajax( { type: frm.attr('method'), url: frm.attr('action'), data: frm.serialize(), success: function (text) { $("#reg_dialog").dialog({ hide:{effect:"drop",duration: 1000}}).dialog('close'); $("#info").html(text).fadeIn(400).delay(2500).fadeOut(500,function(){ if(text!=="User Created"){ location.reload(); // THIS ONE RESETS "THE COUNTER" AS I SAID BEFORE, BUT I DONT WANT TO RELOAD WHOLE PAGE }}) } }); ev.preventDefault(); return false; }); } EDIT #2 (code explanation) How I want this to work. User fills the form (this works) User clicks "Register" button, php does the database code (if everything is filled right the user is created) If there is an error like username taken php does echo "Username already taken" Now here is the problem. If user wants to use other username and he clicks "Register" and user-filled data is ok, the php does echo "User Created" and then "Username already taken". This is because ajax sends the form two times. If user have filled it wrong again and then right he gets "User Created" and 2x "Username already taken" and it goes like that over and over again until he refreshes the page.
accepted answer: http://stackoverflow.com/a/24725299
tagged with: php
has comment: http://stackoverflow.com/comment/72208203
type: Question
has comment: http://stackoverflow.com/comment/38351276

http://stackoverflow.com/a/24594384
answers question: http://stackoverflow.com/q/24594330
type: Answer
score: 3
upvote count: 3
downvote count: 0
has body: You gave this a great shot. Here is how I would achieve your goal: function steps (pos) { /* -- Dif-1 -- */ var $this = $(this); $this.animate({ left:(pos==='next'?-1:1) * 1200, /* -- Dif-2 -- */ opacity:0 },500, function(){ var elt = $this.addClass('hide'); var elt2 = (pos==='next' ? elt.next() : elt.prev()); /* -- Dif-3 -- */ elt2.removeClass('hide').animate({ left:'0', opacity:1 },500); }); } There are other ways, ofc.

http://stackoverflow.com/q/24728444
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: text
type: AnsweredQuestion
has body: How do I use javascript to set the glyph-orientation-horizontal property on an svg text element? I have tried svg.setAttribute("style","glyph-orientation-horizontal:90"); and also tried svg.style.glyph-orientation-horizontal=90; the first clears all style values so that style='' the second throws a javascript error svg is defined as var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); Do I need to individually set the value on all child text elements of the container svg? Or can I set the value on the container svg and the text elements will inherit that value? Any suggestions would be appreciated. Thanks, christopher
has answer: http://stackoverflow.com/a/24728450
accepted answer: http://stackoverflow.com/a/24728450
has title: How do I use javascript to set the glyph-orientation-horizontal property on an svg text element?

http://stackoverflow.com/comment/38302980
type: Comment
comment on: http://stackoverflow.com/q/24699694
score: 0
has text: I agree @LarsEbert but it's really not up to me to decide that!
type: QuestionComment

http://stackoverflow.com/comment/38231440
score: 0
has text: Wow that was pretty simple haha. Thanks for the help. Worked like a charm in my function.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24660400

http://stackoverflow.com/a/24637404
score: 1
upvote count: 1
type: Answer
has body: $('#append').append( $("&lt;div /&gt;", { 'class': 'appact' }).append( $('&lt;form /&gt;', { id: 'update' }).append( $('&lt;input /&gt;', { type: 'hidden', name: 'id', id: 'id', value: calEvent.id // Notice here }), $('&lt;input /&gt;', { type: 'submit', name: 'submit' }) ) ) );
answers question: http://stackoverflow.com/q/24637255
downvote count: 0

http://stackoverflow.com/comment/38283338
has text: Thanks for the input. The example I wanted to emulate was actually written in a different programming language. I was just checking to see if it could be replicated easily with d3.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24684839
type: AnswerComment

http://stackoverflow.com/comment/38324069
has text: use `===` instead of `==`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24710665
type: Comment

http://stackoverflow.com/comment/38337726
comment on: http://stackoverflow.com/q/24717739
type: Comment
type: QuestionComment
has text: There's a typo (missing `on`) in `body.resize`. Maybe your actual code has something like this as well?
score: 0

http://stackoverflow.com/comment/38327633
type: AnswerComment
has text: But when var d = "2014-07-12 11:28:13"; it doesn't work. I have to change "2014-07-12 11:45:31" to "12 Jul, 2014 at 11:45 am"
type: Comment
comment on: http://stackoverflow.com/a/24712331
score: 0

http://stackoverflow.com/comment/38371980
score: 0
type: QuestionComment
has text: @CamarelliniViberg If you need params, then you need first method.
type: Comment
comment on: http://stackoverflow.com/q/24735726

http://stackoverflow.com/comment/38388499
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24743477
has text: jfriend00, the data does not need to be loaded one after another. Teach me how to do this magic you speak of.
score: 0

mysqli
tags question: http://stackoverflow.com/q/24626440
type: Tag
tags question: http://stackoverflow.com/q/24722995
tags question: http://stackoverflow.com/q/24688339
tag name: mysqli
tags question: http://stackoverflow.com/q/24602615

http://stackoverflow.com/comment/38182755
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24635546
has text: Works fine on chrome for me too
score: 1

http://stackoverflow.com/comment/38560065
has text: any articles how bem is better than other instruments?
type: Comment
comment on: http://stackoverflow.com/a/24829721
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38311150
has text: Does $.when kick the requests off and wait for their completion before allowing the return? It seems like that is the bit I was missing, although I agree on the parallel bit.
type: AnswerComment
comment on: http://stackoverflow.com/a/24704183
type: Comment
score: 0

http://stackoverflow.com/comment/38100897
has text: Maybe this Demo might help you: http://plnkr.co/edit/eGG9Kj?p=preview
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24592725

http://stackoverflow.com/comment/38136568
has text: also the animation function is not longer there
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24609918
type: Comment

http://stackoverflow.com/comment/38151695
has text: Related http://stackoverflow.com/questions/3387427/javascript-remove-element-by-id
type: QuestionComment
comment on: http://stackoverflow.com/q/24619002
score: 0
type: Comment

http://stackoverflow.com/comment/38214699
type: Comment
has text: Thanks. The trigger wasn't calling onFormSubmit() at all. Copy/Pasting the code into a new spreadsheet fixed the problem. Strange, but it works, at least for now.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24647044

http://stackoverflow.com/q/24655544
type: Question
has answer: http://stackoverflow.com/a/24655712
has title: Find if current windows.pathname contains location to li a href
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24655712
has comment: http://stackoverflow.com/comment/38220226
has body: I have this code to add an active class on the link to the current page: jQuery(function() { jQuery('.topmenu li').each(function() { var href = jQuery(this).find('a').attr('href'); if (href === window.location.pathname) { jQuery(this).find('a').addClass('active'); } }); }); This works great for matching exactly the pathname, but how can I see if the page I'm on, is a subpage for a link? When I have a link like this: Sub page 1 the code works. When Im on /top-page-1/sub-page-1/, but when I'm on /top-page-1/sub-page-1/sub-sub-page-1/, I don't get an active class on the link. Is there any way to this?

http://stackoverflow.com/comment/38322022
comment on: http://stackoverflow.com/q/24709675
has text: What happens when you try to debug your script (like put breakpoints/look at console)?
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/24709872
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/24710428
type: AnsweredQuestion
tagged with: foreach
has title: Dynamic checkboxes inside of a table being built by foreach knockout.js - Set dependencies as enabled
linked to: http://stackoverflow.com/q/13335762
tagged with: knockout.js
type: Question
has body: I've got a markup with a table, which has three columns ( 1st: Checkbox , 2nd: Product description - being retrieved through restful & webservices, 3rd: Quantity input), as you can see in the code below. Select Product Description Quantity I was wondering how a subscription can be linked to each of those dynamic checkboxex in order to set as enabled its linked quantity-input. Essentially, each row inside the table represents a "whole package" (meaning that if a product is selected its quantity cannot be empty) of client-side data which is meant to be sent through code, restful and web services for doing some stuff afterwards. I've been able to set a subscription with $parent.myproduct but it doesn't work as expected. Any time I check any of them, all of them get checked. Any guesses on what can possibly be wrong? My subscription goes as follows: myViewModel.myproduct.subscribe(function(newValue) { if(newValue){ console.log(newValue); } }); I've made a bit of research, but seemingly these are the ones which seem more likely to be helpful: http://jsfiddle.net/rniemeyer/Jm2Mh/ Knockout checkbox enable dependencies (Jsfiddle isn't working)
accepted answer: http://stackoverflow.com/a/24710428
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/38131659
has text: [Don't abuse arrays!](http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/) Especially jQuery will choke on that.
comment on: http://stackoverflow.com/q/24608836
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/a/24729323
type: Answer
has comment: http://stackoverflow.com/comment/38360129
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/24729263
downvote count: 0
has comment: http://stackoverflow.com/comment/38360168
has body: Well, you could run an ordinary filename through a cryptographic hash function like MD5 (which should still be OK for something like this, but which has known weaknesses for use in digital signatures.) If you run "standard" as in "standard.css" through MD5 using the tool at http://www.fileformat.info/tool/hash.htm you get c00f0c4675b91fb8b918e4079a0b1bac. I'm not sure what this buys one, other than to obscure a name. Edited to echo Jack's comment that you haven't really protected anything, just obscured a name, which is likely to make things harder on you, rather than on others!

http://stackoverflow.com/a/24676733
answers question: http://stackoverflow.com/q/24674709
accepted answer of: http://stackoverflow.com/q/24674709
has body: Here is a link to a media example on phonegap: It is from a phonegap employee: https://github.com/ismael-jimoh/Media-FilePath You are probably not including cordova.js with your package... which is why it doesn't work.
type: Answer
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/38379963
type: AnswerComment
type: Comment
has text: But this is dynamically generated tables. There can be any number of tables . Is there a way to check every table with a given class name and delete or hide it ?
comment on: http://stackoverflow.com/a/24739871
score: 0

http://stackoverflow.com/comment/38372468
comment on: http://stackoverflow.com/q/24735088
score: 0
type: QuestionComment
has text: `var myGroupName = records[0].get('LISTING');` So what ever it is at that time first "renting" then "sales" but then it's down as "renting" again. I want the very last row to be custom.
type: Comment

http://stackoverflow.com/a/24735222
has body: I suggest you to not put the click events in the function like that, just do this in doc ready block: $('li').on('click', function (e) { e.preventDefault(); var idx = $(this).index() + 1; $('div[id^="div"]').hide(); $('#div' + idx).show(); }); Demo with shortest way possible.
type: Answer
answers question: http://stackoverflow.com/q/24735120
score: 0

http://stackoverflow.com/a/24596369
type: Answer
has body: My guess would be that what's inside the .then(function) is asynchronous, so your console.log is executed before $scope.advSearch is defined. Try doing this instead (I don't really know how promises work yet so $scope.$apply might not be relevant in that case at all): DiplomaProgramService.loadDropDowns('abcd').then(function (DiplomaProgram) { $scope.$apply(function() { $scope.advSearch.depts = DiplomaProgram.depts; $scope.advSearch.degreesList = DiplomaProgram.degreesList; // Here it shows the list perfectly console.log($scope.advSearch.degreesList); } }); It still won't work with the console.log, but it should tell Angular that your scope has been updated and make your view work.
score: 0
answers question: http://stackoverflow.com/q/24596296

http://stackoverflow.com/q/24748422
tagged with: javascript
has answer: http://stackoverflow.com/a/24748654
favorite count: 0
has comment: http://stackoverflow.com/comment/38395837
has comment: http://stackoverflow.com/comment/38395958
type: AnsweredQuestion
tagged with: garbage-collection
accepted answer: http://stackoverflow.com/a/24748654
upvote count: 1
type: Question
has body: I've been reading many SO questions about javascript garbage collection but this is just slightly confusing me. Take a look at my example var valueObject= (function(){ function valueObject(){ this.Text = 'hello'; } return valueObject; })(); var referenceObject = (function(){ function referenceObject (refObject){ this.Reference = refObject; } return referenceObject ; })(); var globalClass = (function(){ function globalClass(){ } globalClass.prototype.load() { this.A = new valueObject(); this.B = new referenceObject(this.A); } globalClass.prototype.destroy() { this.A = null; this.B = null; } return globalClass; })(); var Test = new globalClass(); Test.load(); Test.destroy(); Now once the Test object destroy has been called, will the valueObject and referenceObject be marked for collection? Because this.A = null will remove the reference to the valueObject, but it still has a reference inside this.B. But if this.B = null is called, the reference to this.B is removed, but the B object will still be there with a reference to A? Not sure if that makes any sense, it's a little confusing to me. Thanks.
score: 1
has comment: http://stackoverflow.com/comment/38396204
has comment: http://stackoverflow.com/comment/38396054
has title: Javascript garbage collector on internally referenced object
has comment: http://stackoverflow.com/comment/38396073
has comment: http://stackoverflow.com/comment/38395684
answer count: 1
downvote count: 0

http://stackoverflow.com/q/24644537
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/30774566
type: AnsweredQuestion
type: Question
answer count: 1
has title: Using Scrollorama with Cycle Plugin and jQuery.noConflict()
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: When I incorporate the Scrollorama plugin into my webpage, the Cycle plugin stops functioning. I tried incorporating jQuery.noConflict but it still doesn't work. Am I implementing the jQuery.noConflict() wrong or is it something else?: Links: Scrollorama Plugin: Cycle Plugin: I've tried doing different options from different questions in the past but none of them work. Could this be an issue with the plugins and not how I implement them into my site?
has answer: http://stackoverflow.com/a/30774566
score: 1

http://stackoverflow.com/q/24671709
favorite count: 0
possible better answer: http://stackoverflow.com/a/40027725
tagged with: angularjs
has answer: http://stackoverflow.com/a/40027725
has answer: http://stackoverflow.com/a/52877157
score: 19
has answer: http://stackoverflow.com/a/25505305
answer count: 4
type: AnsweredQuestion
upvote count: 19
linked to: http://stackoverflow.com/q/16194442
tagged with: http://stackoverflow.com/tag/json
has title: how to get correct JSON object from flickr API
has body: I used flickr photo search method to retrieve public photos. when I run it with jquery, it works fine, I get the json object in correct form. { "photos": { "photo": [ { ......... } ] }, "stat": "ok" } But when I use it with AngularJs, I got the same object with a prefix jsonFlickrApi jsonFlickrApi({ "photos": { "photo": [ { ...... } ] }, "stat": "ok" }) what I used in AngularJs is: myApp.service('dataService', function($http) { delete $http.defaults.headers.common['X-Requested-With']; this.flickrPhotoSearch = function() { return $http({ method: 'GET', url: 'https://api.flickr.com/services/rest/?method=flickr.photos.search&amp;api_key=3f807259749363aaa29c2fa93945&amp;tags=india&amp;format=json&amp;callback=?', dataType: 'json' }); } }); Please tell me how can I convert the second JSON to the first one. Is there anything I can do in $http call or have to alter JSON object.
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/25505305
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24674602
tagged with: flickr

http://stackoverflow.com/q/24591419
answer count: 4
possible better answer: http://stackoverflow.com/a/24591611
type: AnsweredQuestion
tagged with: settimeout
has answer: http://stackoverflow.com/a/24591611
score: 1
has title: JS: trying to use setTimeout with incremental values
has answer: http://stackoverflow.com/a/24591708
upvote count: 1
accepted answer: http://stackoverflow.com/a/24592747
has answer: http://stackoverflow.com/a/65236996
type: Question
tagged with: javascript
has body: I am trying to set up some delays on a loop using incremental IDs in my function call, as well as incrementally larger delay times. What I have set up is like this: var delay = 0; var delayMilliseconds = 250; timeOutArray = []; for(var i=0; i&lt;100; i++){ delay = i*delayMilliseconds; timeOutArray[i] = setTimeout(function(){ loadRoute(modelsArray[i], (i+1)); },delay); } The problem I am running into is that by the time any of the loadRoute() functions get called, the "i" being referenced has already been incremented to 99. I am looking for a way to make it recognize the number of "i" at the moment I set the Timeout, rather than the moment the Timeout occurs. I found this article about using "promises", but is a bit confusing. Javascript - Wait the true ending of a function that uses setTimeout Could someone please show me know to implement promises into these calls, or anything that can do it without wrapping the setTimeout code all in an eval()?
tagged with: intervals
downvote count: 0
tagged with: delay
favorite count: 0
has answer: http://stackoverflow.com/a/24592747

http://stackoverflow.com/comment/38316403
type: AnswerComment
comment on: http://stackoverflow.com/a/24703481
score: 0
type: Comment
has text: Strange; not for me, even when using your Fiddle. I tried in Chrome and Firefox. It's the second and fourth fields I'm talking about.

http://stackoverflow.com/q/24731038
score: 0
has comment: http://stackoverflow.com/comment/38363438
has body: I am trying to print out the properties of Object.prototype but keep getting undefined as a result. Can anyone tell me what I am doing wrong ? for (var property in Object.prototype) { if (Object.prototype.hasOwnProperty(property)) { console.log(property); } } undefined
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24731234
possible better answer: http://stackoverflow.com/a/24731199
has answer: http://stackoverflow.com/a/24731199
type: Question
answer count: 2
tagged with: javascript
has title: Listing the properties of Object.prototype
accepted answer: http://stackoverflow.com/a/24731234

http://stackoverflow.com/comment/38127329
has text: Very nice. Thanks so much, Alex.
type: Comment
comment on: http://stackoverflow.com/a/24606286
score: 0
type: AnswerComment

http://stackoverflow.com/q/24606011
has title: Certificate (pfx file) works in code but not working after Hosting from ASP Net web application
type: Question
has answer: http://stackoverflow.com/a/24606850
has body: I have to verify the pfx file and get certificate details from the web base application but its not working after hosting the page in IIS, It only work on single machine. -First I create an exe for the fetching the details but still its not working, (exe saves the response in one table. And we want to fetch the response in the web Application. It is working through Code But After Hosting this is not working.) I am fetching the data through creating the batch files. like : Please give me any suggestion or Idea for how to get the data from exe to web application. can any one have idea please tell me. Thanks.
score: -2
tagged with: javascript
downvote count: 2
answer count: 1
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
tagged with: vb.net
upvote count: 0

http://stackoverflow.com/q/24670527
possible better answer: http://stackoverflow.com/a/24670624
has comment: http://stackoverflow.com/comment/38248770
tagged with: spring-mvc
has comment: http://stackoverflow.com/comment/38247679
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38247983
tagged with: java
has body: &emsp;I have a web application and one of our problem is multi-tab of users causes a lot of issues. Can we handle it in server side or by javascript? Thanks,
has comment: http://stackoverflow.com/comment/38247648
type: Question
has answer: http://stackoverflow.com/a/24670632
answer count: 2
has title: How can I avoid our users not having multi tab?
accepted answer: http://stackoverflow.com/a/24670632
has comment: http://stackoverflow.com/comment/38247914
tagged with: jsp
tagged with: javascript
has answer: http://stackoverflow.com/a/24670624
tagged with: jquery
has comment: http://stackoverflow.com/comment/38248294
score: 0

http://stackoverflow.com/a/24598526
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24594947
answers question: http://stackoverflow.com/q/24594947
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38112165
type: Answer
has body: {{valHeader}} creates a property inside your note-list elelemt which is bound to the input value of the paper-input. You can access it with var header = this.valHeader document.querySelector('#dialog-add-note-header') doesn't work, because the paper-input element is inside the shadow DOM of the paper-dialog. But you can use Polymer's node finding utility this.$.dialogAddNoteHeader (rename your id attribute to contain no dashes) to access the input element directly.

http://stackoverflow.com/comment/38167938
type: Comment
has text: I tried it without the comma and got the same result as with the comma.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24627407

http://stackoverflow.com/a/24705142
has comment: http://stackoverflow.com/comment/38313673
score: 0
type: AcceptedAnswer
has body: It's quite simple just use three buttons to pass the color you want into the function that changes the background. I hope this is what you were looking for. Header
type: Answer
answers question: http://stackoverflow.com/q/24704799
has comment: http://stackoverflow.com/comment/38317832
accepted answer of: http://stackoverflow.com/q/24704799

http://stackoverflow.com/q/24695332
tagged with: http://stackoverflow.com/tag/html
has body: I'm working on making my site responsive and so I needed to have a decent menu for the mobile view. So i got myself a button which only pops up when im in 480px or lower which is good. But the problem is: Making the menu drop down won't work. All I need is an simple dropdown menu but i cant manage to make it work. jQuery Link: HTML: menu comes here CSS: #mobimenu{ display: none; } #mobidrop{ display:none; } @media screen and (max-width: 480px) { #mobimenu { display: block; float: right; } #mobidrop{ width: 100px; height:50px; background-color: red; } } jQuery: $(function(){$("#mobimenu").on('click', function() { $("#mobidrop").show(); });
tagged with: css
accepted answer: http://stackoverflow.com/a/24695458
type: AnsweredQuestion
has title: onClick Dropdown menu Responsive Website
has answer: http://stackoverflow.com/a/24695458
type: Question
has comment: http://stackoverflow.com/comment/38294166
tagged with: jquery-mobile
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/24736022
score: 0
has body: Then you have to use .change() event in this context. $('.dimensions').change(DoSomething);
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24736005
downvote count: 1
has comment: http://stackoverflow.com/comment/38372557

http://stackoverflow.com/comment/38308870
has text: Are you sure your your jquery selector is getting the right data? if you have ids use them. Instead of $('input[type="text"].field-name').val() use $('#field-name').val()
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24702932
type: Comment

http://stackoverflow.com/comment/38181495
type: Comment
score: 2
has text: Thank you. Your answer helped me a lot. Unfortunately, I can't vote up your post because of the lack of reputation.
comment on: http://stackoverflow.com/a/24624435
type: AnswerComment

http://stackoverflow.com/comment/38313634
score: 0
comment on: http://stackoverflow.com/q/24705408
type: Comment
type: QuestionComment
has text: What are you trying to do here?

http://stackoverflow.com/comment/38204989
type: Comment
has text: oh yes there's an error when I placed the `var e = window.event;` the button doesn't appear anymore once clicked, I am using google chrome as it is my default browser in my wamp server, is there anything I can do to fix the error?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24647016

http://stackoverflow.com/comment/38314394
comment on: http://stackoverflow.com/q/24705387
has text: First of all, you should use the CSS transform property, it's more efficient. Then you use the JS function `requestAnimationFrame` this enables the browser to make the animation even more efficient.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/24630487
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24630659
tagged with: javascript
type: Question
has title: Opening a jsp page onClick opens the page within the frame
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38173233
has body: The above navbar is npt.jsp & and below is the frame. Onclick on the button viewProfile i tried to open home page ie root.jsp, instead opening hte page its opening the page within the frame. I have attached the screenshots below. Kindly help me out My TestData My Profile \ Onclicking myprofile its opening within the frame its an anchor tag , but in MyProfile page when i click the button(on click home page shld be opened NOT within the frame) Myprofile code : Followers Follow Following View Profile Snippets Options
has comment: http://stackoverflow.com/comment/38173059
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24630659
tagged with: css
tagged with: twitter-bootstrap

http://stackoverflow.com/q/24635652
has answer: http://stackoverflow.com/a/65613874
has answer: http://stackoverflow.com/a/65579284
score: 11
tagged with: youtube
has comment: http://stackoverflow.com/comment/38182976
tagged with: video
has comment: http://stackoverflow.com/comment/116000536
has body: I'm writing a video player in HTML5. I tried to see what Youtube was doing to prevent somebody from just grabbing the source (ie: the .src URL) and then downloading the video file, but it does not seem to be visible. So how do they do it? Have people found a way around it? Is it some complicated DRM implementation?
linked to: http://stackoverflow.com/q/9756837
type: Question
has comment: http://stackoverflow.com/comment/38183219
has title: How does youtube prevent video from being downloaded from their HTML5 player?
has comment: http://stackoverflow.com/comment/38186623
tagged with: javascript
tagged with: html5-video
answer count: 2
has comment: http://stackoverflow.com/comment/38184668
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
upvote count: 11
favorite count: 0
has comment: http://stackoverflow.com/comment/38183084
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/115939504

http://stackoverflow.com/comment/38140844
comment on: http://stackoverflow.com/q/24613489
has text: Ah my apologies! Included that tag by accident.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38286784
has text: Thank you so much, that was a very simple solution haha .. Thanks again!
comment on: http://stackoverflow.com/a/24691275
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/38176340
comment on: http://stackoverflow.com/q/24632326
type: Comment
has text: which div do you want to target??
score: 0
type: QuestionComment

http://stackoverflow.com/a/24601712
type: Answer
answers question: http://stackoverflow.com/q/24601439
has body: as @David said, but no one has covered the progress bar, the implantation of this depends on what you know ( you being the application creating the pdf ). Do you know the size of the pdf when complete. Do you know how long it will take to generate. Do you have code where you can hook into to update the progress. The application needs a way to know when to update the completed percentage, and by how much. If you can do that then you can either store the progress in the database with the script that crates the PDF and read it on a user facing page, or store it in a file, etc.. jQuery UI progress bar is easy to use, but you will have to know what percentage is done to be able to tell the end user. After that it is a pretty simple matter of using ajax (jquery $.post ) and a file, that's how i do it. I just wright a simple text file with a number representing the completion percent. Load it via ajax and feed it to the jquery ui progress widget.
score: 0

http://stackoverflow.com/comment/38355990
has text: LOL Oh man, I can imagine have been doing that all afternoon. That was the exact command I was missing, was the window.onbeforeonload....Thank you SO much!
comment on: http://stackoverflow.com/a/24727281
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24660720
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24660721
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: When doing JSON.parse(JSON.stringify(obj)) dates are transformed to strings. What's the best way, performance wise, to revive them?
has title: What's the best way to revive JSON dates in Javascript?
answer count: 1
tagged with: javascript
downvote count: 0
has answer: http://stackoverflow.com/a/24660721
favorite count: 0

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/24732397
type: Tag
tags question: http://stackoverflow.com/q/24681964
tags question: http://stackoverflow.com/q/24589471
tags question: http://stackoverflow.com/q/24692652

http://stackoverflow.com/a/24631060
score: 1
type: Answer
upvote count: 1
has body: Try this, change id of Yes / No button to class and put input hidden with value= 'person id'. #{list celibs} #{encart.moreInfoProfileSwitch index:_, owner:_, index:_.id, lang:'fr', mainPhoto:_.getProfileImage(), dateVision:_.getDateVision(), age:_.getAge(), taggedById:userSession, fadeToggleId:'more_info_user_' + _.id /} ${_.nickName} ${_.getAge()} &{'rdv.rdvProposition.profile.age_' + _.mySex.keyName} &{'rdv.rdvProposition.profile.discover_' + sex} Intéressé ? NON OUI // put hidden input here #{/list} jQuery : use below query to call ajax on click of Yes / No button $(".Yes, .No").click(function(){ $.ajax({ url: 'addLike', data: { id : $(this).next('.personId').val(); } }); });
accepted answer of: http://stackoverflow.com/q/24630819
answers question: http://stackoverflow.com/q/24630819
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/24707315
answers question: http://stackoverflow.com/q/24707150
type: Answer
has body: You should try passing accordion with active: false and collapsible: true. I haven't really tested the code below, but try: $("#QBForm").accordion({ active: false, collapsible: true }); if you do not set collapsible to true, jQuery UI will set at least one section open.
score: 0

http://stackoverflow.com/comment/38121700
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24603036
has text: I reloaded the page and you seemed to have fixed it.

http://stackoverflow.com/a/24603399
score: 1
answers question: http://stackoverflow.com/q/24602341
upvote count: 1
has comment: http://stackoverflow.com/comment/57150240
has comment: http://stackoverflow.com/comment/57150275
has body: The url at original post did not include a parameter required by the api : error: "'query' or 'q' is a required parameter" See ISBNdb API -- Version 2 Request URL: http://isbndb.com/api/v2/xml/mykey/books?q=science Try $.getJSON("https://query.yahooapis.com/v1/public/yql?q=select" +"* from json where url='http://isbndb.com/api/v2/json/J6FR9HT6/books?q=science'" +"&amp;format=json&amp;diagnostics=true&amp;callback=?" , function(data, textStatus, jqxhr) { console.log(data.query.results.json.data); $.each(data.query.results.json.data, function(index, value) { $("&lt;li&gt;", {"text" : value.title +", " + (value.author_data ? (value.author_data.name ? value.author_data.name : value.author_data.id) : void(0)) }).appendTo("ul"); }); }) .fail(function(jqxhr, textStatus, errorThrown) { console.log(textStatus, errorThrown); }); jsfiddle http://jsfiddle.net/guest271314/bZBLf/
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38114308
comment on: http://stackoverflow.com/a/24599398
score: 0
type: AnswerComment
type: Comment
has text: Thank you very much for your answer! Unfortunately `d3.min.js` is something about ~147KB, and it would be great not to load another JavaScript library, but I will keep it in mind!

http://stackoverflow.com/comment/38318025
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24707665
has text: `onload` is not an attribute of the `span` element. Try doing `onload="displayDate()"` on the `body` tag instead.
score: 0

http://stackoverflow.com/q/24638849
has comment: http://stackoverflow.com/comment/38189084
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24638955
tagged with: css
has title: Fade a div when I begin to scroll
score: -1
downvote count: 2
upvote count: 1
answer count: 1
has body: I have a fixed header when I begin to scroll the header changes its height and removes the logo. What I would like to do is have the logo fadeout instead of just disappearing. How can I achieve this effect? For testing purposes I am unable to display my logo in jsfiddle because it is a custom font so I will be using #mainlogo as my example. Here is my code http://jsfiddle.net/Bx4rq/9/ JS $(window).scroll(function() { if ($(this).scrollTop() > 30){ $('#headerWrapper, .icon-lkbl, #mainLogo, .nav-collapse').addClass("sticky"); } else{ $('#headerWrapper, .icon-lkbl, #mainLogo, .nav-collapse').removeClass("sticky"); } }); CSS #headerWrapper.sticky { height: 48px; } .icon-lkbl.sticky, #mainLogo.sticky { display:none;} .nav-collapse.sticky{ margin-top:-10px;} HTML Logo Test About Recipes Garden Contact Search Find your next meal
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38189033
type: AnsweredQuestion
favorite count: 0
has answer: http://stackoverflow.com/a/24638955
type: Question

http://stackoverflow.com/q/24597156
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/38108746
has body: Please take a look at this fiddle. I use localstorage in stop: function (event, ui) to store each slider's value, but the console shows that it only stores the last single value. Is there a way to store the last maximum and minimum values of each slider ,or in other words, the last value of every ui-slider-handle? HTML: Width Diameter Thickness Jquery: $( ".slider" ).each(function(){ var datamax = $(this).data('max'), datamin = $(this).data('min'), amount = $(this).next('.amount'), $key = $(this).prev('h4').text(); $(this).slider({ range: true, min: 0, max: datamax, values: [ datamin, datamax ], slide: function( event, ui ) { amount.val( ui.values[ 0 ] + " - " + ui.values[ 1 ] +" mm"); }, stop: function (event, ui) { localStorage[$key] = ui.value; } }); amount.val($( this ).slider( "values", 0 ) +" - " + $( this ).slider( "values", 1 ) +" mm"); });
type: AnsweredQuestion
tagged with: cookies
has title: Using localStorage to store the maximum and minimum values of jQuery range slider
tagged with: local-storage
type: Question
accepted answer: http://stackoverflow.com/a/24597224
tagged with: jquery-ui
tagged with: javascript
has answer: http://stackoverflow.com/a/24597224

http://stackoverflow.com/q/24650143
downvote count: 0
tagged with: jasmine
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: durandal
answer count: 0
score: 1
tagged with: unit-testing
type: Question
has body: I am using durandal framework for my Single Page Application. Where i need to test a function using jasmine. The following router.js function code throwing error. router.navigateTo("#/Home/About"); Error: TypeError: 'undefined' is not an object (evaluating 'sammy.lookupRoute') I tried to fix this issue by registering routes in my specs router.mapNav("reports/create"); router.mapNav("reports/display"); Still am getting same error. How to fix this issue? Is there any example for testing router.js modules.
tagged with: javascript
has title: Unit test using jasmine for durandal router
tagged with: single-page-application

http://stackoverflow.com/comment/38396502
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24732305
score: 0
has text: What I'm asking is if I can get away with *not* using css scale transform! I don't want to have to duplicate the div and scale it up, rather I want to change the screen pixel ratio within the bounds of the outer div to create the same effect.

http://stackoverflow.com/q/24664021
has comment: http://stackoverflow.com/comment/38236604
has comment: http://stackoverflow.com/comment/38236489
has comment: http://stackoverflow.com/comment/38236492
type: Question
has answer: http://stackoverflow.com/a/24664297
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24664262
accepted answer: http://stackoverflow.com/a/24664262
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Can an HTML tag's value attribute be used to store JavaScript code?
possible better answer: http://stackoverflow.com/a/24664297
type: AnsweredQuestion
has body: I'm building a simple random word generator and am trying to have a drop-down determine the number of words to be displayed. My idea was to have the 's value contain the variables I want to be parsed into my function. However, it doesn't read the variables as I'd hoped, like it does in the first div, and instead writes the literal values. I'm sure there's a more elegant way to write this, but now I'm curious if I can even do it this way. JSFiddle HTML: 1 Words 2 Words 3 Words 4 Words JavasSript: $('#gen').click(function generateWords(){ var wordCount = document.getElementById('wordCount').value; var wordbank = ['rock', 'paper', 'scissor', 'apple', 'beer', 'potato']; var word1 = wordbank[Math.floor(Math.random()*wordbank.length)]; var word2 = wordbank[Math.floor(Math.random()*wordbank.length)]; var word3 = wordbank[Math.floor(Math.random()*wordbank.length)]; var word4 = wordbank[Math.floor(Math.random()*wordbank.length)]; var wordBin = document.getElementById('wordBin'); var wordBin2 = document.getElementById('wordBin2'); wordBin.innerHTML = word1+' '+word2+' '+word3+' '+word4; wordBin2.innerHTML = wordCount; });

http://stackoverflow.com/comment/38435608
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24709297
type: Comment
has text: no problem, we're here to help. for your sanity and others, clean code is important. hopefully my answer doesn't come off as rude, just trying to point you in the right direction. clean code is easier to fix.

http://stackoverflow.com/q/24594108
tagged with: email
tagged with: regex
has title: Regex to not allow
score: 0
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/38103633
has comment: http://stackoverflow.com/comment/38103578
has body: I need a customized condition to test users input. I'm using Regex to check if the user's input is either a string of only numbers or a valid email address. The current Regex is as below and has effectively weeded out most wrong addresses: /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ However, there are still a few that misses the shoot out: Arabic characters wwww. (user put wwww.someone@hotmail.com rather than the correct someone@hotmail.com) wrong spellings of .com such as .cpm, cum, xom, ccom, cim I'm planning to add a test to check if the input has 1-3, but am a bit clueless as to how that can be achieved. Any advice?
has comment: http://stackoverflow.com/comment/38103257
has answer: http://stackoverflow.com/a/24594361
type: UnansweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/38103392
type: Question

reactjs-testutils
tags question: http://stackoverflow.com/q/24730019
type: Tag
tag name: reactjs-testutils

http://stackoverflow.com/q/24592382
possible better answer: http://stackoverflow.com/a/24592413
answer count: 2
has answer: http://stackoverflow.com/a/24592413
has body: I'm using the sortable jquery lib. It works really good. I'm trying right now to have the first element of the li list static, I want this first element not to be move from the first place. Not quite sure how to do this. This is the code for sorting. A small demo of how it works: http://jsfiddle.net/DiegoTc/vK588/ First Second Third $(function() { $( "#sortable" ).sortable(); $( "#sortable" ).disableSelection(); });
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24592414
score: 0
has title: First element static on a drag & drop li list
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24592414
tagged with: jquery-ui

http://stackoverflow.com/comment/38283802
type: QuestionComment
has text: i created an example for you using `createRadialGradient` there is no need to use masks in this scenario. Me, and @icktoofay were overcomplicating the solution.
comment on: http://stackoverflow.com/q/24689278
score: 0
type: Comment

http://stackoverflow.com/comment/38330487
type: Comment
type: QuestionComment
score: 2
has text: What have you done to debug the problem? It shouldn't be too hard to find the problem by setting some breakpoints and inspect the variables. And something you can easily do yourself.
comment on: http://stackoverflow.com/q/24714221

http://stackoverflow.com/a/24747801
score: 2
has body: You are doing var twoDays = new Date(); which sets it to today. Not your variable today, but to today, 7/14/2014. Then you do twoDays.setDate(today.getDate() + 2); which sets the date to 30, because the day portion of today the variable is 28. Everything else is this same mistake but with other variables, so hopefully you can figure it out from there.
answers question: http://stackoverflow.com/q/24747756
upvote count: 2
has comment: http://stackoverflow.com/comment/38394789
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38392659
has text: You didn't wrap your click event handler with the jQuery document ready event handler: `$(function () { YOUR CODE GOES HERE. });`
comment on: http://stackoverflow.com/q/24743537
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24629466
tagged with: fiddler
has comment: http://stackoverflow.com/comment/38171124
tagged with: javascript
score: -1
tagged with: cors
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24629645
has comment: http://stackoverflow.com/comment/38190505
has title: Javascript reporting CORS error when loading google.com
downvote count: 1
type: Question
has body: Here is the snippet of Javascript code: var requ = "http://google.com"; var xmlhttp; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { // BREAKPOINT A if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { // never gets into this block } }; xmlhttp.open("GET", requ, true); xmlhttp.send(); Code execution passes through BREAKPOINT A exactly 2 times. First time: xmlhttp.readyState == 1; xmlhttp.status == 0; Second time: xmlhttp.readyState == 4; xmlhttp.status == 0; Chrome console reports: XMLHttpRequest cannot load http://google.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:50261' is therefore not allowed access. What is the problem? Why can't I get successful response? EDIT #1 So, the problem is that google.com does not support CORS. But maybe I can extend this question in a different direction. I was using Fiddler to send GET on http://google.com. No Origin header was present in the request. Actually, no headers were specified at all. Request completed successfully. How can I test if a site supports CORS without writing JS code and executing it? How can I use Fiddler to test the same thing? EDIT #2 I found a site that quickly answers my question. I would still prefer to know why it doesn't work through Fiddler.

http://stackoverflow.com/q/24589434
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: regex
has title: javascript validation telephone
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/24589444
has body: I have this function which objective is to validate a phone number introduced by a user with base in 2 regex variables. if the user has the country Sweden selected and introduces 212341512 the warning shouldnt appear since the phone is valid however that doesnt happen. i still get the warning message to appear even if the phone number matches the conditions in the variable indicators. function validateTelephone() { var telephone = document.getElementById('txtTel'); var country=document.getElementById('ddCountry'); var indicators= /^(21|22)\d{7}$/; if (country.value == "Sweden") { if (!indicators.test(telephone.value)) { document.getElementById('lblWarning').style.color = "red"; document.getElementById('lblWarning').innerHTML = 'Invalid Telephone Number'; } else { document.getElementById('lblWarning').innerHTML = ''; } } else{ document.getElementById('lblWarning').innerHTML = ' '; } } if you guys have any suggestions about my code or a way to solve this problem i'd appreciate that since im new to this language
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/a/24676304
has comment: http://stackoverflow.com/comment/38274902
answers question: http://stackoverflow.com/q/24674830
score: 0
has comment: http://stackoverflow.com/comment/38279280
has comment: http://stackoverflow.com/comment/38278545
type: Answer
has comment: http://stackoverflow.com/comment/38279262
has body: you need to add the transition to the line points in the transition function, like so: http://jsfiddle.net/tz5KT/177/ here it's a bit delayed tho

http://stackoverflow.com/comment/38278773
score: 0
has text: In that JS example, wouldn't "outside" be local variable, though?
comment on: http://stackoverflow.com/q/24686806
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38371336
score: 0
type: AnswerComment
type: Comment
has text: @tareq: Well, which book are you using? It should teach you that sort of thing.
comment on: http://stackoverflow.com/a/24735277

http://stackoverflow.com/comment/38117368
has text: @Oliboy50 ... yes you are right... I was speeding... Thank you!
comment on: http://stackoverflow.com/q/24601389
score: 0
type: QuestionComment
type: Comment

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/24700210

http://stackoverflow.com/comment/38157391
type: Comment
has text: Now it doesn't even change the index, increment or set to 10, is it because the script is in the body of the HTML?
comment on: http://stackoverflow.com/a/24621681
score: 0
type: AnswerComment

http://stackoverflow.com/q/24686849
tagged with: variables
favorite count: 0
has body: I was wondering if there is a better way to write this for loop without the switch statement. Please ignore the append inside the for loops, that's just there for demo. What I would like to know is if there is a way to concatenate variable names? For example instead of using var name and using a switch statement to assign value to the variable name, is there a way to do something like: file + i // this will be the var file0, file1, file2. var name = null, content = null; var file0 = { name: null; }, // file2, file3, file4. file5 = { name: null; }; // Something's length is &lt; 10. for(var i = 0, len = something.length; i &lt; len; i++){ switch(i){ case 0: name = file0.name; break; case 1: name = file1.name; break; case 2: name = file2.name; break; case 3: name = file3.name; break; case 4: name = file4.name; break; case 5: name = file5.name; break; default: break; } // Better way to write name below? $("#someContainer").append('&lt;li class="file" id="file' + i + '"&gt;' + name + '&lt;/li'); }
has comment: http://stackoverflow.com/comment/38278829
possible better answer: http://stackoverflow.com/a/24686956
accepted answer: http://stackoverflow.com/a/24686912
has answer: http://stackoverflow.com/a/24686956
has comment: http://stackoverflow.com/comment/38278856
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24686912
tagged with: switch-statement
type: Question
has title: For loop without the switch
tagged with: javascript
score: -1
downvote count: 2
answer count: 2
tagged with: for-loop
upvote count: 1

http://stackoverflow.com/q/24692012
type: AnsweredQuestion
score: 2
downvote count: 0
has body: as a sample program, I downloaded this plunker from a tutorial to test tab routing in different pages. I downloaded the complete zip and ran as it is (e.g. files in same directory, and links are CDN) but it didn't work. I think the angular file is not included as it was showing this output: Click one of the following choices. tab 1 tab 2 {{ path }} //supposed to model the variable But it works fine in the plunker. Is the problem with base href path or version? I tried including my own files for angular.min.js instead of the link but it still doesn't work. Here's the html: AngularJS Plunker Click one of the following choices. tab 1 tab 2 {{ path }}
type: Question
accepted answer: http://stackoverflow.com/a/24692081
has comment: http://stackoverflow.com/comment/38289844
tagged with: javascript
has comment: http://stackoverflow.com/comment/38287992
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/24692081
possible better answer: http://stackoverflow.com/a/24693372
has answer: http://stackoverflow.com/a/24693372
favorite count: 0
has comment: http://stackoverflow.com/comment/39471789
tagged with: angularjs
has title: Angularjs routing not working with base href

http://stackoverflow.com/comment/38216773
type: AnswerComment
has text: I have placed same code under this link. http://jsfiddle.net/VA3tC/ On my machine it is working on all browser.
score: 1
type: Comment
comment on: http://stackoverflow.com/a/24653643

http://stackoverflow.com/a/24630020
has comment: http://stackoverflow.com/comment/38172260
has comment: http://stackoverflow.com/comment/38172100
has comment: http://stackoverflow.com/comment/38172020
answers question: http://stackoverflow.com/q/24629993
has comment: http://stackoverflow.com/comment/38172061
has body: Either replace the tag syntax with HTML entities str = '&lt;foo&gt;'; str = str.replace(/&lt;/g, '&amp;lt;').replace(/&gt;/g, '&amp;gt;'); str; // "&amp;lt;foo&amp;gt;" Or insert it into the page explicitly as text, e.g. parent.appendChild(document.createTextNode(str)); You may also wish to escape single and double quotes to be on the safe side if you plan to use random strings in attributes, too. str = str.replace(/"/g, '&amp;quot;').replace(/'/g, '&amp;#39;');
has comment: http://stackoverflow.com/comment/38172312
has comment: http://stackoverflow.com/comment/38174756
type: Answer
has comment: http://stackoverflow.com/comment/38172031
score: 0
has comment: http://stackoverflow.com/comment/38174545

http://stackoverflow.com/q/24695280
type: AnsweredQuestion
type: Question
upvote count: 4
has body: I have this code google visualisation API: var slider; var ajdi = ''; function drawVisualization() { var cssClassNames = { 'headerRow': 'zaglavlje', 'tableRow': 'red', 'oddTableRow': 'red1', 'selectedTableRow': 'orange-background large-font', 'hoverTableRow': 'prekoreda', 'headerCell': 'gold-border', 'tableCell': 'cell', 'rowNumberCell': 'underline-blue-font' }; var json = $.ajax({ url: 'getzadaci.php', // make this url point to the data file dataType: 'json', async: false }).responseText; // Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(json); //dodajemo kolonu sa kontrolama // Define a category picker control for the Gender column var categoryPicker = new google.visualization.ControlWrapper({ 'controlType': 'CategoryFilter', 'containerId': 'control1', 'options': { 'filterColumnLabel': 'Status', 'ui': { 'labelStacking': 'vertical', 'allowTyping': false, 'allowMultiple': true, 'caption': 'Status' } } }); var categoryPicker1 = new google.visualization.ControlWrapper({ 'controlType': 'CategoryFilter', 'containerId': 'control2', 'options': { 'filterColumnIndex': 8, 'ui': { 'labelStacking': 'horizontal', 'allowTyping': false, 'allowMultiple': true, 'caption': 'Parcela' } } }); var categoryPicker2 = new google.visualization.ControlWrapper({ 'controlType': 'CategoryFilter', 'containerId': 'control4', 'options': { 'filterColumnIndex': 2, 'ui': { 'labelStacking': 'horizontal', 'allowTyping': false, 'allowMultiple': true, 'caption': 'Vrsta zadatka' } } }); var stringFilter1 = new google.visualization.ControlWrapper({ 'controlType': 'StringFilter', 'containerId': 'control3', 'options': { 'matchType': 'any', 'filterColumnIndex': 1, 'ui': {'labelStacking': 'vertical'} } }); var slider = new google.visualization.ControlWrapper({ 'controlType': 'DateRangeFilter', 'containerId': 'control5', 'options': { 'filterColumnLabel': 'Pocetak', 'ui': {'labelStacking': 'vertical'} } }); // Define a Pie chart // Define a table var tab…
tagged with: google-visualization
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38293960
score: 4
has title: Uncaught TypeError: Cannot read property 'row' of undefined - google visualisation api
has answer: http://stackoverflow.com/a/24696245
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38294527
accepted answer: http://stackoverflow.com/a/24696245

http://stackoverflow.com/q/24687155
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/24687217
has body: I am trying to create a function "sum" that adds multiple numbers using an inner function. e.g. sum(1)(2) will print 3 sum(1)(2)(3) will print 6 sum(1)(2)(3)(4) will print 10 and so on I wrote the following code which works for sum(1)(2). function sum(num){ function add (b){ console.log(num+=b); } return add; } How can I extend this to work with multiple calls to inner function?
has comment: http://stackoverflow.com/comment/38279386
has answer: http://stackoverflow.com/a/24687233
duplicate of: http://stackoverflow.com/q/18066322
has comment: http://stackoverflow.com/comment/38279910
has comment: http://stackoverflow.com/comment/38279704
tagged with: closures
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38279444
tagged with: javascript
has title: Add numbers using inner function - JavaScript
has comment: http://stackoverflow.com/comment/38279389
linked to: http://stackoverflow.com/q/18066322

http://stackoverflow.com/comment/38232104
comment on: http://stackoverflow.com/q/24661797
type: QuestionComment
has text: First problem - `window.onpaint = preloadFunc();` should be `window.onpaint = preloadFunc;`. The `onpaint` property expects a reference to a function...you're executing the function immediately and assigning its result (undefined)
type: Comment
score: 1

http://stackoverflow.com/q/24727175
tagged with: javascript
has body: The question seeems pretty simple.The usual method is simply using this code Alternatively, in Jsfiddle, we use the "External resources tab" (source: ctrlv.in) I have issues in implementing a particular code in my website. After much troubleshooting, I found out that, if I use this code to put a .js file: the code doesn't work. If I use the external resources option in jsfiddle, it works. If I manually put it, it doesn't Working fiddle: http://jsfiddle.net/U7Bz9/1972/ Unworking fiddle : http://jsfiddle.net/U7Bz9/1973/ I am shocked as to how this is possible.
accepted answer: http://stackoverflow.com/a/24727180
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: How to put a .js file in html
type: Question
tagged with: jsfiddle
has answer: http://stackoverflow.com/a/24727180
score: 0
has comment: http://stackoverflow.com/comment/38355642
answer count: 1

http://stackoverflow.com/a/24726702
type: Answer
has comment: http://stackoverflow.com/comment/38354733
answers question: http://stackoverflow.com/q/24726329
score: 0
has body: You need to apply ng-class. Created a fiddle to help you to start with coding Code snippet: TEST UPDATED FIDDLE To have the class set according to a variable string

http://stackoverflow.com/comment/38190512
score: 0
comment on: http://stackoverflow.com/q/24639311
type: QuestionComment
type: Comment
has text: What exactly do you mean by "reduce the page size". The whole concept of Bootstrap is to have a responsive page by using proper class attributes. Perhaps provide a screenshot of what is happening. What happens when you change to col-md-8 or other variations? Please provide more info.

http://stackoverflow.com/comment/38159940
has text: Sourced from this chromium-extensions thread: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-extensions/C9RQuRWddj4 with a similar but different idea (doing an async AJAX request). Glad to help!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24622638
type: Comment

http://stackoverflow.com/a/24733535
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/24733025
answers question: http://stackoverflow.com/q/24733025
has body: In the code below , <form:form method="post" action="#" commandName="delete"> Delete </form:form> action="#" is not a valid url to map the request . as it load the same so try to map it with a new name in the controller Hope this helps !!
type: AcceptedAnswer

http://stackoverflow.com/a/24664262
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I don't recommend this at all, but what you're looking for is eval. I've updated the fiddle with a simple change: wordBin.innerHTML = word1+' '+word2+' '+word3+' '+word4; to wordBin.innerHTML = eval(wordCount); and it works just like you want. However, that's a TERRIBLE way to do things (just as you alluded to). It would be much better if you stored a count in your values and looped through the count by appending the random word. The real HTML/javascript would work like this: HTML: 1 Words 2 Words 3 Words 4 Words JS: $('#gen').click(function generateWords() { var wordCount = document.getElementById('wordCount').value; var wordbank = ['rock', 'paper', 'scissor', 'apple', 'beer', 'potato']; var finalMessage = ""; for (i = 0; i < parseInt(wordCount, 10); i++) { if (i > 0) finalMessage += " "; finalMessage += wordbank[Math.floor(Math.random() * wordbank.length)]; } var wordBin = document.getElementById('wordBin'); var wordBin2 = document.getElementById('wordBin2'); wordBin.innerHTML = finalMessage; wordBin2.innerHTML = wordCount; }); Updated Fiddle: http://jsfiddle.net/N988s/2/
has comment: http://stackoverflow.com/comment/38237701
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24664021
has comment: http://stackoverflow.com/comment/38237841
answers question: http://stackoverflow.com/q/24664021
has comment: http://stackoverflow.com/comment/38236954
score: 2
has comment: http://stackoverflow.com/comment/38237736

http://stackoverflow.com/comment/38291887
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24693447
has text: I'd be tempted to put a testing example on a jsfiddle.

http://stackoverflow.com/comment/38348260
has text: i av just updated my question by adding the creat contact button code becuase am still not redirected to the right parent document
type: AnswerComment
comment on: http://stackoverflow.com/a/24721426
score: 0
type: Comment

http://stackoverflow.com/comment/38262136
comment on: http://stackoverflow.com/q/24678124
has text: I'm using a plugin that won't allow me to give a value to the dropdowns, so I have to use document.getElementById("courses").text
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38206998
comment on: http://stackoverflow.com/q/24648377
has text: Coz you are using `username` in ajax request
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/24738633
has comment: http://stackoverflow.com/comment/38377512
type: Answer
has comment: http://stackoverflow.com/comment/38377715
has comment: http://stackoverflow.com/comment/38377640
answers question: http://stackoverflow.com/q/24738526
has body: CHANGE AJAX METHOD BECAUSE YOU ARE SENDING PARAMETERS FROM URL (this is get method to send parameters) $.ajaxSetup({ type: 'GET', url: path + '/relay.php'+ '?curr=' + currency + "&amp;ver=" + Math.random(), success: function(response) { // Refresh the cart display after a successful Ajax request container.html(response); $('#jcart-buttons').remove(); }, $.ajax({ type: 'POST', data: { "jcartRemove": removeId, "jcartIsCheckout": isCheckout } }); HERE ARE THE LINKS: LINK AJAX LINK POST LINK GET
score: 0

http://stackoverflow.com/comment/38102028
type: Comment
has text: Not sure how I can provide a fiddle as I'm using bootstrap and my files are quite big at the minute. I can show you the code, but I can tell you the images are 188x188. `list-inline` is a bootstrap feature and `acc-list` only has `float: left` inside
comment on: http://stackoverflow.com/a/24593239
score: 0
type: AnswerComment

http://stackoverflow.com/q/24679096
has body: I have 2 divs side by side and by default one is hidden and one is visible. I have a jQuery function which, when mouseenter the visible div, the hidden one shows. And when mouseenter again, it becomes hidden again. (This is for a login box) However - I want the always visible div (the mouseenter target) to change color depending on what state the toggled div is in. So far, I can get it to change color upon first mouseenter but it won't change again after that. Here is the code I have so far: &lt;script&gt; $(document).ready(function () { $("#loginBox").hide(); $("#sideBar").show(); $('#sideBar').mouseenter(function () { $("#loginBox").toggle("slide"); if ($('#loginBox').is(":visible")) { $("#sideBar").css("background-color","blue"); } else if ($('#loginBox').is(":hidden")) { $("#sideBar").css("background-color","yellow"); } }); }); &lt;/script&gt; So it starts off in its default color (grey by the style sheet) and when mouseenters it loginBox becomes visible and the sideBar turns blue. But when mouseenters again, even though loginBox becomes hidden, the sideBar remains blue. JSFiddle
has comment: http://stackoverflow.com/comment/38263925
possible better answer: http://stackoverflow.com/a/24679241
upvote count: 7
has answer: http://stackoverflow.com/a/24679241
has answer: http://stackoverflow.com/a/24679314
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/38263921
has comment: http://stackoverflow.com/comment/38263850
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/38264030
has title: Change background color of div using conditional statement
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24679314
favorite count: 0
has comment: http://stackoverflow.com/comment/38264062
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/24688405
has comment: http://stackoverflow.com/comment/45548071
has answer: http://stackoverflow.com/a/28623125
answer count: 2
possible better answer: http://stackoverflow.com/a/33055670
downvote count: 0
has answer: http://stackoverflow.com/a/33055670
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38281513
has title: Function statement requires a Name in Services in AngularJS
accepted answer: http://stackoverflow.com/a/28623125
score: 2
type: AnsweredQuestion
upvote count: 2
has body: I am building a demo app. I want this AngularJS app to have factory as well. I keep getting error: "SyntaxError: function statement requires a name" Below is my code: var bookApp = angular.module('bookAppModule',[]); bookApp.controller('boookbAppCtrl', ['$scope','$http',Book , function($scope,$http,Book) { $scope.way=["Normal","$http","RestFul"]; $scope.books = [ {"title":"abc","author":"zxc"}, {"title":"def","author":"cvb"}, {"title":"ghi","author":"nml"}, {"title":"jkl","author":"kjh"}, {"title":"mno","author":"fds"} ]; var names=["Anuj","Donvir"]; $scope.newbooks = Book.getBooks; }]); bookApp.factory('Book', function(){ getBooks : function(){ return [ {"title":"newbook1","author":"zxc"}, {"title":"newbook2","author":"cvb"}, {"title":"newbook3","author":"nml"}, {"title":"newbook4","author":"kjh"}, {"title":"newbook5","author":"fds"} ]; } });
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38274006
comment on: http://stackoverflow.com/a/24674129
score: 0
type: AnswerComment
has text: Both examples I gave you will change all the images left of the hovered image (including the hovered image).
type: Comment

http://stackoverflow.com/comment/38259232
type: Comment
type: QuestionComment
has text: @NidhishKrishnan it was original answer I've mark and it first one that was correct. Still not sure which one should I mark as the answer.
score: 0
comment on: http://stackoverflow.com/q/24657386

http://stackoverflow.com/a/25089326
has body: Try removing validations from your models.
type: Answer
answers question: http://stackoverflow.com/q/24591925
score: 0

http://stackoverflow.com/q/24665487
has comment: http://stackoverflow.com/comment/38239123
has answer: http://stackoverflow.com/a/24665534
accepted answer: http://stackoverflow.com/a/24665532
answer count: 5
has answer: http://stackoverflow.com/a/24665537
has answer: http://stackoverflow.com/a/24665541
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38239157
type: Question
has answer: http://stackoverflow.com/a/24665532
tagged with: javascript
has answer: http://stackoverflow.com/a/24665719
has title: jQuery setting attributes with functions
score: 0
possible better answer: http://stackoverflow.com/a/24665534
tagged with: jquery
has body: I wrote a simple function: function addColoredBorder(color) { $(".coloredBorder").css({ border-left: color, padding-left: "15px", border-radius: "10px" }); }; Then in HTML i would call the function, but for some reason, it doesn't accept it. I know, you could do: function f_border () { return "border:" } function f_attribute(x) { return x } function addColoredBorder() { $(".coloredBorder").css(f_border(), f_attribute()); }); But i need it to be as compact and simple for it to be as possible. toggleClass is out of question. So experts, how can i set color without writing massive amounts of code? (PS. The second block of code might not be correct at all, but i believe it goes somewhat like that.)

http://stackoverflow.com/a/24610822
upvote count: 2
has comment: http://stackoverflow.com/comment/38168404
has comment: http://stackoverflow.com/comment/38163535
has comment: http://stackoverflow.com/comment/38168230
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You can use .scrollTop() jquery function to visible whatever the area that you want inside the div. Try like this.. $('#yourdiv').scrollTop($("p[name='p2']").height()); Check the sample fiddle
answers question: http://stackoverflow.com/q/24609624
has comment: http://stackoverflow.com/comment/38164116
type: Answer
accepted answer of: http://stackoverflow.com/q/24609624

http://stackoverflow.com/comment/38155596
type: AnswerComment
has text: Ignore my last comments, that was just a simple mistake by myself. Thank you so much this has worked for me! thank you for having patience with me and explaining to me.
score: 0
comment on: http://stackoverflow.com/a/24620937
type: Comment

http://stackoverflow.com/q/24617452
upvote count: 2
has comment: http://stackoverflow.com/comment/38149291
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24618139
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/38149018
has comment: http://stackoverflow.com/comment/38149179
has body: I am currently facing the problem of securing up an API my clients use on their websites. However because this API is called by JavaScript I'm finding it hard to figure out a way to only allow these access the API/URL's. So how would I go about this? How would I only allow access to these links. Obviously the links could be compromised but I would like to have a way to deny the script from operating if it hasn't come from an verified site. ATM all I can think of using is the Referrer header which as we all know, can be faked. Is there a way I can trace the source of the request? If so, how? Because then I could just check the source of the request and if it isn't an allowed source then just issue a 403 Forbidden. Thanks. If you need any more information please feel free to ask!
answer count: 2
has answer: http://stackoverflow.com/a/24617640
tagged with: api
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: security
tagged with: rest
has title: Only allowing certain websites access PHP API
score: 2

http://stackoverflow.com/comment/38157834
score: 0
type: Comment
type: QuestionComment
has text: @Barmar I assumed OP meant after clicking one of the *Module* links
comment on: http://stackoverflow.com/q/24622021

http://stackoverflow.com/comment/38207507
type: Comment
comment on: http://stackoverflow.com/a/24648597
has text: This is really close to what I want, but how can I hide the button, if all info can be shown in one line?
type: AnswerComment
score: 0

http://stackoverflow.com/a/24687353
accepted answer of: http://stackoverflow.com/q/24686004
has comment: http://stackoverflow.com/comment/38295744
has body: According to the docs, namespace is a prefix. You probably want this instead: App.ApplicationAdapter = DS.RESTAdapter.extend({ namespace: 'myApp' }); As you're using PHP, rename your notes.json to notes.php, and just make sure the correct headers are set when responding: <?php header("Content-Type: application/json"); ?> // Add your json data here: { "notes": [ {id: 1, ...}, ] } If you're not using any PHP framework, you need to rewrite the url yourself (if you use a framework, it will most likely take care of the url rewriting for you). Since you're using Apache, just add an .htaccess file to the same directory as the one containing your notes.php file, and add the following rewrite rule: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^notes$ notes.php This rewrite rule will enable you to access http://localhost/myApp/notes (without the .php file extension). You also need to make sure you use valid JSON, i.e. everything should be quoted: { "notes": [ { "id": "1", "title": "helloworld", "body": "ciaociao" }, { "id": "2", "title": "javascriptframeworks", "body": "Backbone.js, Ember.js" }, { "id": "3", "title": "FindajobinBerlin", "body": "Monster" } ] } You should rather set up your routes like this: this.resource("notes", function() { this.route("view", { path: "/:note_id" }); }); Then you need to rename your "note" template to "notes/view", like this:
upvote count: 1
has comment: http://stackoverflow.com/comment/38297292
has comment: http://stackoverflow.com/comment/38299172
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38300320
has comment: http://stackoverflow.com/comment/38298735
has comment: http://stackoverflow.com/comment/38346282
type: Answer
has comment: http://stackoverflow.com/comment/38301397
answers question: http://stackoverflow.com/q/24686004
has comment: http://stackoverflow.com/comment/38299296

http://stackoverflow.com/q/24747094
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/24747294
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24747294
tagged with: mouseleave
upvote count: 2
possible better answer: http://stackoverflow.com/a/24747242
tagged with: jquery-events
answer count: 2
has title: Prevent flickering/code running too often with on() and mouseenter/mouseleave
has answer: http://stackoverflow.com/a/24747242
tagged with: jquery
favorite count: 0
tagged with: mouseenter
has body: I need to show some hidden content above an image when mousing over the image. The issue I'm running into is the content flashes (due to the opacity) and because the show/hide events fire way to much. How can this be updated so it will only run one time when hovering over the image? What is the best way to attach/detach the click event for the anchor? JSFiddle HTML: Title Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla. + Title Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla. + Title Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla. + Title Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla. + CSS: body { margin: 0; padding:0; } ul { overflow: hidden; margin: 0; padding:0; list-style-type: none; } li { float: left; padding: 0; cursor: pointer; margin: 0; width: 50%; position: relative; } img { display: block; } div { display: none; background: black; opacity: .4; position: absolute; left: 0; top: 0; right: 0; bottom: 0; padding: 1em; color: white; } h3 { margin-top: 0; } jQuery: var $img = $('ul').find('img'); $img.on({ mouseenter: function () { var $div = $(this).siblings('div'), $a = $div.find('a'); $div.show(); $a.on('click', function (e) { var $container = $(this).closest('.content'); e.preventDefault(); console.log('clicked'); }); }, mouseleave: function () { var $div = $(this).siblings('div'), $a = $div.find('a'); $div.hide(); $a.off('click'); } });
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/24602053
has comment: http://stackoverflow.com/comment/38118746
has comment: http://stackoverflow.com/comment/38118721
type: AcceptedAnswer
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/24602021
has body: Does this fix your problem? Just added a wrapper around it: #wrapper { text-align:center; } .form-control { margin: 0 auto; }
score: 1
accepted answer of: http://stackoverflow.com/q/24602021
has comment: http://stackoverflow.com/comment/38119051
has comment: http://stackoverflow.com/comment/38119017
downvote count: 0

http://stackoverflow.com/q/24591034
has title: How do I play a random sound on button click? JavaScript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38097563
has comment: http://stackoverflow.com/comment/38097442
has comment: http://stackoverflow.com/comment/38097653
has answer: http://stackoverflow.com/a/24591128
tagged with: audio
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38097889
has body: When I press a button I want to play a random sound. but when I click it throws the error: "Cannot read property 'play' of null". Do I have to declare the audio variable somewhere else? or did I just misspell something? Anyways, here's my code so far: var audio1 = document.getElementById("potato"); function burn1() { audio1.play(); } function burn2() { audio1.play(); } function burn3() { audio1.play(); } function burn4() { audio1.play(); } function burn5() { audio1.play(); } function random() { var rand = Math.floor(Math.random() * (5 - 1)) + 1; switch(rand) { case 1: burn1(); break; case 2: burn2(); break; case 3: burn3(); break; case 4: burn4(); break; case 5: burn5(); break; } } also, here's my HTML: Burn Generator! OOOHH BURN!
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38099540
score: 0
answer count: 1
tagged with: button
accepted answer: http://stackoverflow.com/a/24591128

http://stackoverflow.com/a/24656557
score: 2
has body: It really depends on the number of users and connections allowed by the server and the maximum number of connections of the client. Generally, a browser can do multiple HTTP requests at the same time, so in theory there shouldn't be much difference in having one javascript file or a few. You don't only have to consider the javascript files, but the images too of course, so a high number of files can indeed slow things down (if you hit the maximum number of simultaneous connection from server or client). So regarding that it would be wise to merge those files.
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24656408
answers question: http://stackoverflow.com/q/24656408
type: Answer

http://stackoverflow.com/comment/83782081
type: AnswerComment
comment on: http://stackoverflow.com/a/45394461
type: Comment
score: 2
has text: why not just `Object.keys(obj).map(key=>({key,value: obj[key]}))`

http://stackoverflow.com/a/24687493
accepted answer of: http://stackoverflow.com/q/24687395
type: Answer
has comment: http://stackoverflow.com/comment/38280107
has comment: http://stackoverflow.com/comment/38279960
answers question: http://stackoverflow.com/q/24687395
downvote count: 0
has comment: http://stackoverflow.com/comment/38280500
has comment: http://stackoverflow.com/comment/38280150
has body: Give your form an ID. For example: id="myform" and use input[type=checkbox], if you want to get all the checkboxes from that form. Otherwise, assign that checkbox an ID as well. Try this: $('.btn').prop('disabled', true); $('#myform input:checkbox').change(function () { var a = $('#myform input:checked').filter(":checked").length; if (a == 0) { $('.btn').prop('disabled', true); } else { $('.btn').prop('disabled', false); } }); JSFiddle Demo #1 Instead of using JQuery to set the button to disabled on page load, you can also use HTML: disabled="disabled" JSFiddle Demo #2
has comment: http://stackoverflow.com/comment/38280069
score: 1
upvote count: 1
type: AcceptedAnswer

google-chrome-extension
tags question: http://stackoverflow.com/q/24711990
tags question: http://stackoverflow.com/q/24603432
tags question: http://stackoverflow.com/q/24621277
tags question: http://stackoverflow.com/q/24624232
tags question: http://stackoverflow.com/q/24687834
tags question: http://stackoverflow.com/q/24738946
tags question: http://stackoverflow.com/q/24622430
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/24663869
tags question: http://stackoverflow.com/q/24632427
tags question: http://stackoverflow.com/q/24622354
tags question: http://stackoverflow.com/q/24701464
tags question: http://stackoverflow.com/q/24590970
tags question: http://stackoverflow.com/q/24607021
tags question: http://stackoverflow.com/q/24688063
tags question: http://stackoverflow.com/q/24643391
tags question: http://stackoverflow.com/q/24633562
tags question: http://stackoverflow.com/q/24728162
tags question: http://stackoverflow.com/q/24686189
tags question: http://stackoverflow.com/q/24672190
type: Tag
tags question: http://stackoverflow.com/q/24650610
tags question: http://stackoverflow.com/q/24711247
tags question: http://stackoverflow.com/q/24651842
tags question: http://stackoverflow.com/q/24713144
tags question: http://stackoverflow.com/q/24628409
tags question: http://stackoverflow.com/q/24647227
tags question: http://stackoverflow.com/q/24641112
tags question: http://stackoverflow.com/q/24640787
tags question: http://stackoverflow.com/q/24689144
tags question: http://stackoverflow.com/q/24673181
tags question: http://stackoverflow.com/q/24623248
tags question: http://stackoverflow.com/q/24600495
tags question: http://stackoverflow.com/q/24716871
tags question: http://stackoverflow.com/q/24632120
tags question: http://stackoverflow.com/q/24656942
tags question: http://stackoverflow.com/q/24658017
tags question: http://stackoverflow.com/q/24626809

http://stackoverflow.com/comment/38388746
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24742849
type: AnswerComment
has text: Yeah either include the page or error page. Ideally you could navigate to special_php_file_that_includes_JUST_content.php?page=beta and it should return just the portion of the html that goes in your content div. And that is what loads into the div

http://stackoverflow.com/comment/38131969
comment on: http://stackoverflow.com/a/24608589
has text: @PratikJoshi yes i did, May be have to use data-text attribute to show original value when select box is open and when closed show value.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24673762
type: Answer
downvote count: 0
has body: Try as below, DateField 1 change
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24673178
answers question: http://stackoverflow.com/q/24673178

http://stackoverflow.com/comment/38206330
comment on: http://stackoverflow.com/q/24647899
type: Comment
type: QuestionComment
has text: Someone already asked that [http://stackoverflow.com/questions/16148136/how-can-we-open-a-link-in-private-browsing-mode]
score: 1

http://stackoverflow.com/comment/43364393
type: AnswerComment
score: 0
type: Comment
has text: I had the same issue as @Rahul Desai. I tried this approach of adding both, legendWrap and lineChart, however for me, though the whole chart was able to push down, when i click on any of the legend circles, to uncheck the circle, the chart comes back to its original position?? is ther any way to resolve that issue?? Thanks!!
comment on: http://stackoverflow.com/a/24625353

http://stackoverflow.com/a/25737251
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/24731053
answers question: http://stackoverflow.com/q/24731053
has body: everybody! It's not possible to edit the page in way it will working correctly after it. So I was forced to delete this function from my app. Also I have written an email to Path team - they just answered that they don't going to change their authentication page in near future.

http://stackoverflow.com/a/24663119
answers question: http://stackoverflow.com/q/24654589
has body: TinyMce does a pretty good job ant content scrubbing and input cleanup (on the client side). Being a very popular web rich text editor, the creators have spent a lot of work on making it fairly secure in terms of preventing simple copy and paste of malicious content in to the editor. You can do things like enable/disable cleanup, specify what tags/attributes/characters are allowed, etc. See the TinyMce Configurations Page. Options of note include: valid_elements, invalid_elements, verify_html, valid_styles, invalid_styles, and extended_valid_elements Also: instead of grabbing the innerHtml of the textarea, you should probably use tinyMce's getContent() function. see: getContent() BUT this is all client-side javascript! Although these featuers are nice, all of this cleanup still happens on the client. So conceivably, the client JS could be modified to stop escaping/removing malicious content. Or someone could POST bad data to your request handlers without ever going thru the browser (using curl, or any other number of tools). So tinyMce provides a nice baseline of client scrubbing, however to be secure, the server should assume that anything it is being sent is dirty and should thus treat all content with caution. Things that can be done by the server: Even if you implement the most sophisticated client-side validation/scrubbing/prevention, that is worthless as far as your backend's security is concerned. An excellent reference for preventing malicious data injections can be found on the OWASP Cross Site Scripting Prevention Cheat Sheet and the OWASP SQL Injection Prevention Cheat Sheet. Not only do you have to protect against SQL injection type attacks, but also XSS attacks if any user submitted data will be displayed on the website for other unsuspecting users to view. In addition to sanitizing user input data on the server, you can also try things such as mod_security to squash requests that contain certain patterns that are indicative of malicious requests. You c…
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38240677
upvote count: 2

http://stackoverflow.com/comment/38211593
has text: If you can get the values of `queryString` and `url` you can simply POST the request (`queryString`) to the URL (`url`) and have yourself logged in to your ISP account. There is no need of anything else, and it will probably work as long as your ISP doesn't require more sophistication like a valid user agent or fetching the log-in page first (which can also be done in Java). [Check this question.](http://stackoverflow.com/questions/1359689) In any case, post your code. Also check [this tutorial](http://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24647766
score: 0

http://stackoverflow.com/q/24740668
has comment: http://stackoverflow.com/comment/38381103
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38381063
has answer: http://stackoverflow.com/a/24740766
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24740796
tagged with: http://stackoverflow.com/tag/html
has title: Associate an event listener on a radio button
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38381059
type: Question
has body: I have this code: 15 mn 30 mn 45 mn And when I have an event listener on the click on each button like this: $("#inline_content input[name='radSize']").on('change', function(){ alert('You clicked radio!'); var mytime = $('input:radio[name=radSize]:checked').val(); alert($('input:radio[name=radSize]:checked').val()); window.open("categorie.html?temps="+mytime); }); Everything works fine except for the first radio button, it's checked by default but when I clicked on it nothing happen. What should I do? Thanks.

http://stackoverflow.com/comment/38398846
type: Comment
type: QuestionComment
has text: I think that error because you have copy pasted code from jsfiddle to your editor (some problem on stackoverflow because it), try to write your script (js). Or can you post your script of js file on your question?
comment on: http://stackoverflow.com/q/24748854
score: 0

http://stackoverflow.com/q/24647047
has title: How to delete a textfield in javascript
favorite count: 0
has answer: http://stackoverflow.com/a/24647284
type: UnansweredQuestion
score: -3
upvote count: 0
has comment: http://stackoverflow.com/comment/38204541
has body: Here is my code. After I click "add" button it generate a new textfield, and I want to delete new textfield if I don't need it. But I don't know how to do it. &lt;body&gt; &lt;form&gt; Quiz name: &lt;input type="text" name="firstname"&gt;&lt;br&gt; Question name: &lt;input type="text" name="lastname"&gt; &lt;/form&gt; Choice&lt;input type="text" name="textBox0"&gt;&lt;input type="button" value="add" onclick="addInput()"/&gt; &lt;span id="responce"&gt;&lt;/span&gt; &lt;script&gt; var countBox =1; var boxName = 0; function addInput() { var boxName="textBox"+countBox; document.getElementById('responce').innerHTML+='&lt;br/&gt;Choice&lt;input type="text" id="'+boxName+'" /&gt;&lt;input type="button" value="add" onclick="addInput()"/&gt;&lt;input type="button" value="delete" onclick="deleteInput()"/&gt;'; countBox += 1; } function deleteInput() { document.getElementById('responce').innerHTML+='choice'; } &lt;/script&gt; Code example
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/3387427
has answer: http://stackoverflow.com/a/24647380
answer count: 3
downvote count: 3
has answer: http://stackoverflow.com/a/24647603

http://stackoverflow.com/comment/38198391
score: 3
comment on: http://stackoverflow.com/a/24643708
type: AnswerComment
type: Comment
has text: Please, please don't suggest live it's been deprecated and removed since 1.7. The on() method is the proper way to bind events.

http://stackoverflow.com/q/24705234
downvote count: 0
has body: I have a simple func that chains a few times return config.load() .then(function() { //first duplicate code block }) .then(function() { //the start of my unique block return foo.bar() .then(function(trace) { //unique code }) .then(function(tree) { //more unique code }); }) .then(function() { //second duplicate code }) .then(config.save) .then(function() { //more duplicate for part 2 }) .catch(function(e) { //more duplicate for part 2 }); The middle "then" you see above is the only part that is different in my 2 different cases. I'm looking to see how I can refactor this to keep it DRY
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24705272
type: Question
has comment: http://stackoverflow.com/comment/38313459
type: AnsweredQuestion
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38313357
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/24705272
has title: How to reuse a function that is in between a chain of thens (promise related)

http://stackoverflow.com/q/24704695
has title: change tumblr layout theme with script
tagged with: layout
tagged with: javascript
has comment: http://stackoverflow.com/comment/38313729
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/38326356
has answer: http://stackoverflow.com/a/24804036
type: AnsweredQuestion
has body: I would like to add different theme designs to my tumblr blog. The design should change if I click on a tag. For example if I click on the tag "food" the background, the sidebar image and the font should change into a theme related to food. Since I don´t get nowhere if I try to change the tag site itself (tumblr doesn´t let me overwrite this side with a new page) I started to look if I could work this out with the script functions. I found a code which was close to that what I searched for and it worked (I only got to change the background thought because I could not find a way to change the sidebar image with this). With this code I installed a button which should change the theme and send you to the fitting tag site. The problem now is that the change of the site applies BEFORE I reach the right site. For example: I´m on my home site and if I click now on the button for the tag “food” the design of the home site changes and AFTER THAT the tag site will load and the style is getting normal again. It should be switched. First load the right site and then the change of the design. It should keep the design aslong you are browsing through the tag related pages and should change back if you leave the pages. Does someone know how the fix this? Here´s the code I found: Click Blue Update 16.07.14 after feedback: Here is the end of my code from the blog (I didn’t touch the rest of the code): {block:IfSoundCloudLinkForPlayer} {/block:IfSoundCloudLinkForPlayer} {block:IfGoogleAnalyticsID} {/block:IfGoogleAnalyticsID} I had been messing around with different parameters earlier but this is what it looks at the moment. The masthead-background was just a random picture I found in the internet. I tried different links but no one worked so I guess my personal pictures would not work likewise. Like I already said the only thing working is the change of background-color.
tagged with: tumblr
upvote count: 1
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/24723661
accepted answer: http://stackoverflow.com/a/24804036
has answer: http://stackoverflow.com/a/24723661
tagged with: tags
has comment: http://stackoverflow.com/comment/38328541
answer count: 2
has comment: http://stackoverflow.com/comment/38312346

http://stackoverflow.com/q/24743637
tagged with: serialization
has body: I was looking for answer to this question some time ago and I must say that most of aswers were "use strict". However I didn't want to use strict. And while ago I found out that it is possible to break chain without strict and it's quite simple: function mySecretFunc(untrustedCallback, uberImportantArgument){ [null].map(function(){untrustedCallback()}); } //async way: function mySecretFunc(untrustedCallback, uberImportantArgument){ window.setTimeout(function(){function(){untrustedCallback()}},0); } note: Events fired by .dispatchEvent do NOT break caller chain note2: remember that property getters can also intrude caller chain, this method can be also used to remove getters from array (array.map(function(a){return a})) I just think it may be usefull.
type: UnansweredQuestion
has title: Javascript: how to interrupt caller chain? [answer]
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/38386796
has comment: http://stackoverflow.com/comment/38386991
tagged with: dom
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/38140962
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24613630
has text: iframe? Even so though, if there's a security policy that blocks http content, you might not be able to get around it or force it onto https

http://stackoverflow.com/a/24619844
downvote count: 0
has comment: http://stackoverflow.com/comment/38153522
score: 1
accepted answer of: http://stackoverflow.com/q/24619738
has comment: http://stackoverflow.com/comment/38153991
has comment: http://stackoverflow.com/comment/38154241
has comment: http://stackoverflow.com/comment/38154421
answers question: http://stackoverflow.com/q/24619738
has comment: http://stackoverflow.com/comment/38154805
has comment: http://stackoverflow.com/comment/38153729
upvote count: 1
has comment: http://stackoverflow.com/comment/38154068
type: AcceptedAnswer
has body: try this solution putting the content inside a variable. var content=' Test '; var infowindow = new google.maps.InfoWindow({ content:content, maxWidth: 100 }); in the past I had similar problem and this worked. update I have removed some options from Infowindow according to this documentation. The InfoWindowOptions object literal contains the following fields: 1)content 2)position 3)maxWidth update 2 set min-height, min-width css property to your .infoWindow class update 3 see this stack question for your new problem
has comment: http://stackoverflow.com/comment/38154057
has comment: http://stackoverflow.com/comment/38154343
type: Answer
has comment: http://stackoverflow.com/comment/38154189

http://stackoverflow.com/a/24731028
has comment: http://stackoverflow.com/comment/38364104
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/24729067
has body: You cannot prevent the Add-ons Manager from opening a modal dialog. You can however easily close it, just add window.close() to your command. That assumes that your code is running in the context of that modal dialog - if not then Services.wm.getMostRecentWindow(null).close() should do. However, I consider using a javascript: URL here awkward, this approach might also break in future. You should consider using a minimal XUL dialog (without any stylesheets, so it will be invisible as well) that includes a JavaScript file. Then you will have your code in a proper script file rather than squeezing it all into one line in install.rdf.
accepted answer of: http://stackoverflow.com/q/24729067

http://stackoverflow.com/a/24706707
type: Answer
score: 4
answers question: http://stackoverflow.com/q/24706059
accepted answer of: http://stackoverflow.com/q/24706059
has body: First of all you need to understand it's not merely just a button. Button is just a physical UI element that's used to switch between video source. The concept is that you provided 2 different resolution videos as source to player and the button is used for selecting one of them. e.g if user selects HD, then the source of video changes to the video of better resolution or if it's SD then source changes to low resolution video. Now coming to what you want to achieve, there's no default HD/SD video switching support in video.js (if my guess is right). You can use a plugin: There's this video-js-resolutions plugin by onyxrev - available on Github. Use this plugin: https://github.com/vidcaster/video-js-resolutions then you can change the css and JS to change the current style to a button that you want. demo: http://vidcaster.github.io/video-js-resolutions/ I hope it helps.
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38298774
has text: @RezaRahmati You STILL have `preventDefaults` please check your code carefully. Check the code on your computer and see if this is the issue if so then you should delete the question as it is caused by a typo
comment on: http://stackoverflow.com/a/24697646
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24640824
tagged with: ruby-on-rails
type: AnsweredQuestion
has body: Uncaught TypeError: Cannot read property 'PlayersRouter' of undefined I did everything the same like allways, but what's now happening? Here is my path: $rails new infinity $cd infinity gem "rails-backbone" $bundle install rails g backbone:install rails g scaffold Player stat:integer health:integer strength:integer rake db:migrate rails g backbone:scaffold Player stat:integer health:integer strength:integer Views/players/index.html.erb &lt;div id="players"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; $(function() { window.router = new Infinity.Routers.PlayersRouter({players: &lt;%= @players.to_json.html_safe -%&gt;}); Backbone.history.start(); }); &lt;/script&gt; What part of it is wrong? My rails app name? or scaffold name? Its simplest part and like allways im failing :) My console says: Uncaught TypeError: Cannot set property 'Player' of undefined player.js?body=1:5 Uncaught TypeError: Cannot read property 'Players' of undefined edit_view.js?body=1:6 Uncaught TypeError: Cannot read property 'Players' of undefined index_view.js?body=1:7 Uncaught TypeError: Cannot read property 'Players' of undefined new_view.js?body=1:6 Uncaught TypeError: Cannot read property 'Players' of undefined player_view.js?body=1:6 Uncaught TypeError: Cannot read property 'Players' of undefined show_view.js?body=1:6 Uncaught TypeError: Cannot set property 'PlayersRouter' of undefined players_router.js?body=1:5 Uncaught TypeError: Cannot read property 'PlayersRouter' of undefined
type: Question
accepted answer: http://stackoverflow.com/a/24641497
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24641497
tagged with: backbone.js
has title: Whats wrong with backbone this time?

http://stackoverflow.com/comment/38143381
type: Comment
has text: No apology called for! Sometimes the hardest part is just knowing what to search for. Everybody has got to start somewhere.
comment on: http://stackoverflow.com/a/24614227
score: 0
type: AnswerComment

http://stackoverflow.com/a/24589549
type: Answer
answers question: http://stackoverflow.com/q/24589510
accepted answer of: http://stackoverflow.com/q/24589510
has body: Take isNotComplete out of the actions hash in the Finances.FinancesController, it is a property, not an action.
has comment: http://stackoverflow.com/comment/38094316
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/38173884
type: QuestionComment
comment on: http://stackoverflow.com/q/24631011
has text: Have you checked that the request returns with state `4` and status `200`?
score: 0
type: Comment

http://stackoverflow.com/q/24724554
tagged with: sqlite
has body: If I put each (one at a time) in the same code the second one will update the title to var testTitle, the first does not delete the rows/items that match the WHERE. function deleteTableAItem(e) { var db3 = Ti.Database.open('thedatabase'); var getTheID = db3.execute('SELECT ID FROM tableA WHERE myIndexColumn=?', e.itemIndex); var theID = getTheID.fieldByName('ID'); Ti.API.info(tableLinkRef + " " + theID); //they match as intended var testTitle = "DID I CHANGE?"; db3.execute('DELETE FROM tableB WHERE tableLinkRef=? AND tableARef=?',theID,theTableAItemClicked); // fixed by adding another comparison. //db3.execute('UPDATE tableB SET titleColumn=? WHERE tableLinkRef=?',testTitle,theID); // this DOES update the titleColumn in matching rows/items when the code is active and the previous is commented out db3.execute('DELETE FROM tableA WHERE myIndexColumn=?', e.itemIndex); //this deletes the row from the first table. I want to delete the rows I have associated in tableB as well db3.close(); }
has comment: http://stackoverflow.com/comment/38350851
has comment: http://stackoverflow.com/comment/38379217
score: 0
has answer: http://stackoverflow.com/a/24724624
answer count: 3
tagged with: titanium
has answer: http://stackoverflow.com/a/24724601
has title: SQL delete not working as expected
has comment: http://stackoverflow.com/comment/38350544
has comment: http://stackoverflow.com/comment/38350650
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24739746
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/38350373

http://stackoverflow.com/a/24707211
score: 0
type: AcceptedAnswer
has body: It's possible Chrome isn't reporting the specific line, but using line 975 as a reference to the segment of the code where property E doesn't seem to be found, thus line 975 could be in the middle of whatever code is problematic (some debuggers do this instead of reporting the first line they find a problem on - maybe Chrome's interpreter works like this, I don't know though, since I use Firefox for development instead). In that case, it would mean that this is what's undefined and there's your problem. We'd have to see more to get a grip on why this would be happening since we can't determine what the context for this is from the screenshot. What is the expected value of this and if this is part of an object definition that you instantiate later, how do you instantiate it, as the context could matter for the value of this.
answers question: http://stackoverflow.com/q/24706945
type: Answer
accepted answer of: http://stackoverflow.com/q/24706945

http://stackoverflow.com/q/24604087
tagged with: google-maps
tagged with: infowindow
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I've got this Google Map (works on my website, can't get it to work in jsfiddle?) jsfiddle.net/9ZcwX/1/ I want to use an infobubble instead of the infowindow because I cant style the infowindow at all with css it seems. Everytime I try to add a new infobubble it just crashes the map. Not having much luck with existing questions.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24604605
tagged with: infobubble
has title: Google Maps API Infowindow
downvote count: 1
type: Question
score: -1
tagged with: google-maps-api-3
linked to: http://stackoverflow.com/q/7616666
accepted answer: http://stackoverflow.com/a/24604605

http://stackoverflow.com/q/24748887
tagged with: javascript
has comment: http://stackoverflow.com/comment/38980008
tagged with: http://stackoverflow.com/tag/q
has answer: http://stackoverflow.com/a/28619095
upvote count: 1
has comment: http://stackoverflow.com/comment/38397245
answer count: 1
favorite count: 0
has title: How refactor this code?
type: UnansweredQuestion
tagged with: restify
has comment: http://stackoverflow.com/comment/38396933
tagged with: node.js
has body: I'm little frustrated because I dont know how will I can refactor this script. I write the authenticate function but it's too complicated, maybe too large in one function, and seems a little spagetti :(, how I will be make this a little better? Some clues? Thanks. "use strict"; var errorResponse = require('../errorResponse'), paynopain = require('../../core/paynopain'), User = require('../../core/User'), cache = require('../../core/cache/cache'), validateValues = require('../validateValues'), API_PATH = 'v1/'; function authenticate(req, res, next) { if (req.url.indexOf(API_PATH) !== -1){ var pnpUserId; var validated = validateValues(req, ['pnp_access_token']); if(validated.error){ return next(validated.error); } var pnpAccessToken = req.params.pnp_access_token; cache.read('pnpToken:' + pnpAccessToken) .then(function(userId){ if(userId){ storeUserIdInRequest(req, next, userId); }else{ var user = new User(req.logger); return paynopain.getIdFromAccessToken(pnpAccessToken) .then(function(pnpUserIdResult){ pnpUserId = pnpUserIdResult; return user.findByPnpID(pnpUserIdResult); }) .then(function(userData){ if(userData._id){ return storeUserIdInRequest(req, next, userData._id.toString()); }else{ var newUser = { pnpId: pnpUserId, radius: 1000 }; return user.create(newUser) .then(function(userData){ return storeUserIdInRequest(req, next, userData._id); }); } }); } }) .fail(function(e){ if(e.message === 'invalid_grant'){ next(errorResponse.unauthorized()); }else{ req.logger.log('error', 'Error authenticating', { error: { message: e.message, stack: e.stack } }); next(errorResponse.internalError()); } }); }else{ next(); } } function storeUserIdInRequest(req, next, userId){ var oneHour = 1000 * 60 * 60; cache.write('pnpToken:' + req.params.pnp_access_token, userId, { expire: oneHour }) .then(function(){ req.userId = userId; req.logger.setExtra({ userId: userId }); next(); }); } function init(server){ server.use(authenticate); require('./configuration/routes')(API_PATH, server); r…
downvote count: 0
score: 1
tagged with: refactoring
has comment: http://stackoverflow.com/comment/38422874
type: Question

http://stackoverflow.com/comment/38351952
type: Comment
comment on: http://stackoverflow.com/q/24721962
score: 0
type: QuestionComment
has text: Looks like `el` is not being set anywhere. IE. something like: `new RectangeView({mode: myRectangle, el: $('#some_div')});`. Or, create the `el` in an initialize function in the view.

http://stackoverflow.com/comment/38255027
score: 0
type: Comment
has text: @user3814943 , really ? :) Check it again u have 18 rep. :)
type: AnswerComment
comment on: http://stackoverflow.com/a/24674453

http://stackoverflow.com/a/24765515
has comment: http://stackoverflow.com/comment/38674547
has comment: http://stackoverflow.com/comment/38717064
accepted answer of: http://stackoverflow.com/q/24724642
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38718141
answers question: http://stackoverflow.com/q/24724642
has comment: http://stackoverflow.com/comment/38476545
has body: What's the best way to specify additional styling ? Put a template inside the subclass (my-custom-element), as usual. Include a element where you want the superclass template to appear. Put a style tag into the new template. To style elements that come from the superclass template, use a selector like this: :host::shadow .someclass { ... } See example below. Can I wrap the base element in additional markup (like another container) ? Yes, you can put whatever markup you want around the . Can I select elements from the base element? Something like <content select=".stuff"> but for the base's shadow markup. No. You cannot project like that (it's the reverse direction from all other projections). If you really want to cherry-pick nodes out of the older shadow-root, this can be done in code by pulling nodes directly out of this.shadowRoot.olderShadowRoot. But this can be tricky because the superclass may have expectations about the structure. Example code: ProTips: olderShadowRoot will exist whether or not you include the tag, but it will not be part of the rendered DOM unless you do. to prevent olderShadowRoot(s) from being created you can override parseDeclarations (source). Any of parseDeclarations, parseDeclaration, fetchTemplate can be overidden for various effects.
type: Answer
has comment: http://stackoverflow.com/comment/38694802
has comment: http://stackoverflow.com/comment/38717023
has comment: http://stackoverflow.com/comment/38559153
has comment: http://stackoverflow.com/comment/38717998
upvote count: 12
has comment: http://stackoverflow.com/comment/38718530
score: 12
has comment: http://stackoverflow.com/comment/38717165

http://stackoverflow.com/q/24626747
type: Question
tagged with: ios
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24626858
type: UnansweredQuestion
has body: I need ios code for corresponding Javascript code var readers = { publicAccess: false, ids: [] }; readers.publicAccess = public_read || false; // a = b || c this is the format . readers.ids = reads || []; //where public_read and reads are two property of another object. Is it possible?
has comment: http://stackoverflow.com/comment/38166366
has title: how its possible to Assigning value of one property into another by using logical OR operator?
tagged with: nsdictionary
has comment: http://stackoverflow.com/comment/38166633

http://stackoverflow.com/a/24695072
type: Answer
has body: No, there is no sane way of avoiding the event listener that would perform better than another event listener and is compatible with unloading the add-on in session. Hooking nsContextMenu As you have been already told, the state is initialized via gContextMenu = new nsContextMenu(...). So you'd need to hook the stuff, which is actually quite easy. var newProto = Object.create(nsContextMenu.prototype); newProto.initMenuOriginal = nsContextMenu.prototype.initMenu; newProto.initMenu = function() { let rv = this.initMenuOriginal.apply(this, arguments); console.log("ctx", this.onImage, this); // Or whatever code you'd like to run. return rv; }; nsContextMenu.prototype = newProto; Now, the first question is: Does it actually perform better? After all this just introduced another link in the prototype-chain. Of course, one could avoid Object.create and just override nsContextMenu.prototype.initMenu directly. But the real question is: How would one remove the hook again? Answer: you really cannot, as other add-ons might have hooked the same thing after you and unhooking would also unhook the other add-ons. But you need to get rid of the reference, or else the add-on will leak memory when disabled/uninstalled. Well, you could fight with Components.utils.makeObjectPropsNormal, but that doesn't really help with closed-over variables. So lets avoid closures... Hmm... You'd need some kind of messaging, e.g. event listeners or observers... and we're back to square one. Also I wouldn't call this sane compared to document.getElementById("contentAreaContextMenu").addEventListener(...) I'd call it "overkill for no measurable benefit". Overriding onpopupshowing= One could override the &lt;menupopup onpopupshowing=. Yeah, that might fly... Except that other add-ons might have the same idea, so welcome to compatibility hell. Also this again involves pushing stuff into the window, which causes cross-compartment wrappers, which makes things error-prone again. Is this a solution? Maybe, bu…
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/38296213
answers question: http://stackoverflow.com/q/24692940
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24692940

http://stackoverflow.com/q/24721230
type: Question
has body: The following code logs 'true' 4 times: var menuItem = { name: "New menuItem", }; function food(name) { if(name) this.name = name; //this.resourceType = "food"; } food.prototype = menuItem; function drink(name) { if(name) this.name = name; //this.resourceType = "drink"; } drink.prototype = menuItem; var burger = new food(); var coke = new drink(); console.log(buger instanceof food); console.log(burger instanceof drink); console.log(coke instanceof food); console.log(coke instanceof drink); However if I comment out the following two lines: //food.prototype = menuItem; //drink.prototype = menuItem; Then the code does what I want and logs true for "buger instanceof food" and "coke instanceof drink". Is there a way of checking if the menuItem is an instance of either food or drink correctly while they both share the same prototype (menuItem)? I'd prefer not to have to store the type like so: this.resourceType = "food"; If there is a better way of doing it.
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/38344633
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/24721256
tagged with: instanceof
has answer: http://stackoverflow.com/a/24721256
has title: instanceof with shared prototype
type: AnsweredQuestion
tagged with: prototype

http://stackoverflow.com/q/24724773
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26272841
has answer: http://stackoverflow.com/a/53630406
has body: I've got some experience with BDD tools like Cucumber and Lettuce. I'm currently building a Phonegap app, and I'd like to start using Cucumber.js to create acceptance tests for it. Unfortunately I'm having a bit of an issue. Here is the basic feature file I've thrown together: Feature: Authentication As a user I want to be able to log in and out Scenario: Logging in Given I am not logged in And I am on the page "login" When I fill in the "username" field with "student" And I fill in the "password" field with "password" And I click the "LOG IN" button Then I should see the text "STUDENT" Here is my world.js: var zombie = require('zombie'); var World = function World(callback) { "use strict"; this.browser = new zombie(); // this.browser will be available in step definitions this.visit = function (url, callback) { this.browser.visit(url, callback); }; callback(); // tell Cucumber we're finished and to use 'this' as the world instance }; exports.World = World; Here are my step definitions: var wrapper = function () { "use strict"; this.World = require("../support/world.js").World; // overwrite default World constructor this.Given(/^I am not logged in$/, function (callback) { // Clear local storage this.browser.localStorage("localhost:9001").clear(); callback(); }); this.Given(/^I am on the page "([^"]*)"$/, function (page, callback) { // Visit page this.browser.visit('http://localhost:9001/app/index.html#' + page, callback); }); }; module.exports = wrapper; I've set up a Grunt task that first runs the connect server on port 9001, then runs the Cucumber scenarios. The documentation for Cucumber.js implies this should work, but it fails on the second step. Here is the error message I get: Running "connect:cucumber" (connect) task Started connect web server on http://localhost:9001 Running "cucumberjs:src" (cucumberjs) task .Cannot call method 'add' of undefined TypeError: Cannot call method 'add' of undefined at &lt;anonymous&gt;:10:711 at &lt;anonymous&gt;:10:874 at &lt;…
tagged with: cucumberjs
tagged with: zombie.js
type: UnansweredQuestion
has title: Issue with callbacks in Cucumber.js scenario with ZombieJS

http://stackoverflow.com/comment/38279652
comment on: http://stackoverflow.com/a/24666023
has text: First of all, I have no control over the html file to modify it. also, .click() function doesn't work for href with javascript code.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24701598
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24700774
has body: The reason your pattern no more works is that your split/reverse/join all the lines before applying the pattern. Consequence, all the dates that are on separate lines are now before each record, but your pattern is designed to work with the original order. See how localcat looks like after the split/reverse/join: Jul 07, 2014 12:56:06 AM org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler ["http-nio-8080"] Jul 07, 2014 12:56:06 AM org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler ["http-bio-8443"] Jul 07, 2014 12:56:06 AM org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler ["ajp-apr-8009"] Jul 07, 2014 12:56:06 AM org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Catalina Jul 07, 2014 12:56:07 AM org.apache.catalina.loader.WebappClassLoader check... SEVERE: The web application [/admin] created a ThreadLocal with key of type... Jul 07, 2014 12:56:08 AM org.apache.catalina.loader.WebappClassLoader check... SEVERE: The web application [/admin] created a ThreadLocal with key of type... Jul 07, 2014 12:56:09 AM org.apache.catalina.loader.WebappClassLoader check... SEVERE: The web application [/admin] created a ThreadLocal with key of type... Jul 07, 2014 12:56:10 AM org.apache.catalina.loader.WebappClassLoader check... SEVERE: The web application [/admin] created a ThreadLocal with key of type... This is why you obtain all the records except the last with the date/time of previous record. The good way is probably to extract all the data you want and only after to reverse the result array. An other possibility is to rewrite your pattern for this new order (see demo). You can choose to work line by line too.

http://stackoverflow.com/comment/38209228
score: 0
type: AnswerComment
has text: i need to change extension icon if page url matches some pattern and change accordingly if the page url changes or leads to some other url and alert user is he clicks when disabled icon is there. To achieve this i am using onUpdate and onActivated listners from chrome.tabs api
type: Comment
comment on: http://stackoverflow.com/a/24648270

http://stackoverflow.com/a/24611256
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24607021
answers question: http://stackoverflow.com/q/24607021
has body: $("#send").click(getURL()); gets executed before DOM is fully constructed and fails. Also, you need to pass the reference to getURL, not execute it. To fix: $(document).ready(function(){ $("#send").click(getURL); }); By the way, you may be looking in the wrong console for errors. See this debugging tutorial for popups.
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38139199
type: Answer
has comment: http://stackoverflow.com/comment/38139335
score: 2

http://stackoverflow.com/comment/38168156
type: Comment
has text: Thankyou so much for taking the trouble to respond. I appreciate it. img:hover did the trick
comment on: http://stackoverflow.com/a/24619893
score: 0
type: AnswerComment

http://stackoverflow.com/q/24724852
has comment: http://stackoverflow.com/comment/38351103
possible better answer: http://stackoverflow.com/a/42240115
accepted answer: http://stackoverflow.com/a/24725066
answer count: 4
has comment: http://stackoverflow.com/comment/38351582
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24725318
has title: Pause and resume setInterval
type: Question
linked to: http://stackoverflow.com/q/3969475
downvote count: 0
tagged with: javascript
score: 42
upvote count: 42
has answer: http://stackoverflow.com/a/24725066
has comment: http://stackoverflow.com/comment/38351043
has comment: http://stackoverflow.com/comment/38351121
favorite count: 0
has answer: http://stackoverflow.com/a/42240115
has comment: http://stackoverflow.com/comment/38351271
has body: window.setInterval(function(){ //do stuff }, milisec); Is there a way to stop this interval at will, and to resume it from where it lasted? Say, code runs every 5 sec. I stop it in the middle of the 2nd second, when resumed, I want it to run the remaining 3 seconds and continue to run afterwards every 5 sec. again.
has answer: http://stackoverflow.com/a/74621874

http://stackoverflow.com/comment/38103737
score: 0
has text: Are you trying to access anything in the iFrame from a parent page not on the same domain?
comment on: http://stackoverflow.com/q/24594280
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38263369
comment on: http://stackoverflow.com/q/24672647
has text: [columnResize](http://docs.telerik.com/kendo-ui/api/web/grid#events-columnResize)
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24623113
has body: I have implemented a timer in my web application (which is online test of 1 hour) using javascript. Timer starts from 1 hour and eventually reaches 0. The webpage automatically closes when timer reaches 0. My problem is that i can't rely on javascript for timer because as it is on client side, some malicious user may manipulate the timer. I have thought of following two solutions: I have thought of using ajax to check after every fixed interval that whether server timer (i would be running a parallel timer on server) and client timer are in sync or not. But every ajax call would mean a separate http hit on server which is not optimal. I have thought of using nodeJS to maintain a persistent connection but the issue is that that when next question loads, web sockets connection will have to be recreated. Is there any way to maintain persistent connection across the http hits.
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38159571
has comment: http://stackoverflow.com/comment/38159594
has title: Persistent connection across http requests
type: Question
tagged with: javascript
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/38160231

http://stackoverflow.com/a/24601556
has comment: http://stackoverflow.com/comment/38117707
has body: The problem here is that when the hovered is show the Detail text is set to none, so the hover out event will dispatch, removing the hovered class! You can fix this, by changing disclaimer hover part with this: $('#disclaimer').mouseenter( function (e) { $('#wrapper').addClass('hovered') .mouseleave(function () { $('#wrapper').removeClass('hovered'); }) }); So the detail will disappear when the mouse leaves the div, you can also change the mouseleave to mousemove if you want it to disappear just on move. Here is the result http://jsfiddle.net/r3BTU/2/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24601447
has comment: http://stackoverflow.com/comment/38117649

http://stackoverflow.com/a/24730222
answers question: http://stackoverflow.com/q/24729303
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24729303
has body: It just takes a little getting used to the router. Routes are only hit if they correspond to the current url. So you wouldn't want to depend on a controller (nor the model on that controller) if it weren't a direct ancestor in the router's tree structure. Neither listings nor contacts should depend on each other since their urls would be /listings or /contacts and they are only siblings. CRM.Router.map(function() { this.resource('listings'); this.resource('contacts'); }); Listings could depend on contacts (contacts is an ancestor), but not the other way around (/contacts or /contacts/listings). You'll notice you can't ever get to listings without going through contacts, so contacts will always be available for listings to depend on and use. CRM.Router.map(function() { this.resource('contacts', function(){ this.resource('listings'); }); }); If you need multiple models in a single route, you might want to check out EmberJS: How to load multiple models on the same route? (be sure to read the second answer since the first can lead to unwanted side-effects). Example: http://jsfiddle.net/NAFq5/5/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38365256
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/38377819
score: 1
has comment: http://stackoverflow.com/comment/38365241

http://stackoverflow.com/comment/38330221
type: QuestionComment
comment on: http://stackoverflow.com/q/24713986
has text: Your html shows `#dept_select` and your javascript refers to `#teacher_select`. Did you really show us the correct snippet of your code? And: try to replace `$('#t_credit').html(reply_data);` with `$('#t_credit').val(reply_data);`.
score: 0
type: Comment

http://stackoverflow.com/comment/38246205
type: Comment
comment on: http://stackoverflow.com/a/24655120
has text: yep, if attribute in aspx markup not match for server side events and attributes, then it simply render as html attribute
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38303466
type: Comment
has text: You could also diplay a timer with jquery
type: AnswerComment
comment on: http://stackoverflow.com/a/24700290
score: 0

http://stackoverflow.com/a/24686901
has comment: http://stackoverflow.com/comment/38279005
has comment: http://stackoverflow.com/comment/46989409
has comment: http://stackoverflow.com/comment/38279098
has comment: http://stackoverflow.com/comment/38283279
score: 0
has body: Swift closures capture local variables so fulfil your "crystal ball that can peer only where it was created" requirement. Because of the difference in scoping, Swift does not suffer from the same problem of using closures within loops JavaScript closure inside loops – simple practical example The Swift equivalent: var funcs: [()-&gt;()] = [] for i in 0...3 { funcs += { println(i) } } for i in 0...3 { println(funcs[i]()) } Yields the result 0, 1, 2, 3
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38278957
downvote count: 1
accepted answer of: http://stackoverflow.com/q/24686806
answers question: http://stackoverflow.com/q/24686806
type: Answer
has comment: http://stackoverflow.com/comment/38278919

morris.js
tags question: http://stackoverflow.com/q/24707324
tag name: morris.js
tags question: http://stackoverflow.com/q/24601985
type: Tag
tags question: http://stackoverflow.com/q/24747099

http://stackoverflow.com/comment/38101900
type: Comment
type: QuestionComment
has text: Are you using jQuery or looking for vanilla Javascript solution?
score: 0
comment on: http://stackoverflow.com/q/24593371

http://stackoverflow.com/a/24612281
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/24612175
score: 4
has comment: http://stackoverflow.com/comment/38138741
has body: The follow line should be changed: $('tbody[id$=' + wbId + ' _ErrorVisits] tr td input[type="checkbox"]').prop('checked', $(this).prop('checked')); To: $('tbody[id$=' + wbId + '_ErrorVisits] tr td input[type="checkbox"]').prop('checked', $(this).prop('checked')); THAT IS: replace ' _ErrorVisits] with '_ErrorVisits]. NOTE: I would not advise on the use of id's with spaces but the spaces can be escaped as follows as a quick fix: Replace wbId with wbId.replace(/ /g, '\\\\ ') The ideal solution is to fix the ids to remove spaces.

http://stackoverflow.com/q/24726296
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24726467
possible better answer: http://stackoverflow.com/a/24726373
has answer: http://stackoverflow.com/a/24726430
type: Question
has body: I've got a calendar in static html (example below) and I want to select whole week on hoover (just add '.active' class and on click it should return the first and last day of the week selected by clicking on it. I think I should use .on() event, since it's dynamically loaded by a plugin. I tried many jQuery selectors, but I can't find the proper one. Please, help me out, I'd like to learn how to do this in the best way :). 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 Regards.
accepted answer: http://stackoverflow.com/a/24726395
tagged with: javascript
score: 0
has title: How to select those td in a table?
has answer: http://stackoverflow.com/a/24726395
has answer: http://stackoverflow.com/a/24726373
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38207746
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24647813
has text: That is because the geocoder is asynchronous. Your `for` loop ends before the geocoder has responded, therefore the value of `data` will always be the last one.

http://stackoverflow.com/comment/38186902
type: AnswerComment
has text: Thanks bigt. I got hung on where to place my quotes. Cheers.
type: Comment
comment on: http://stackoverflow.com/a/24637568
score: 0

http://stackoverflow.com/comment/38223294
type: Comment
has text: @user3144435 yes, there is. i'll provide you one
type: AnswerComment
comment on: http://stackoverflow.com/a/24656918
score: 0

http://stackoverflow.com/a/24645394
answers question: http://stackoverflow.com/q/24645348
has comment: http://stackoverflow.com/comment/38201551
has body: Use web.reload(); method to do so. imgbtr2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { web.reload(); } });
downvote count: 0
has comment: http://stackoverflow.com/comment/38201428
has comment: http://stackoverflow.com/comment/38201848
has comment: http://stackoverflow.com/comment/38201473
type: AcceptedAnswer
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24645348
score: 1

http://stackoverflow.com/comment/38093439
type: Comment
comment on: http://stackoverflow.com/a/24589042
type: AnswerComment
has text: yap that's what am asking...thanks let me try the code ASAP ..will get back to you
score: 0

http://stackoverflow.com/a/24734389
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Try to use .contents() at this context, $('.x').each(function(index, value){ console.log($(this).contents(":not('.y')").text()); }); DEMO As per your desired result, console.log($('.x').contents(':not(.y)').text()); DEMO
accepted answer of: http://stackoverflow.com/q/24734360
score: 3
has comment: http://stackoverflow.com/comment/38369747
answers question: http://stackoverflow.com/q/24734360
upvote count: 3
has comment: http://stackoverflow.com/comment/38369852

http://stackoverflow.com/comment/38229823
has text: And yes, you can attach an attribute or property to an element, it will still be there, it just won't show a native placeholder if the placeholder attribute isn't supported.
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/24660385

http://stackoverflow.com/a/24630179
answers question: http://stackoverflow.com/q/24611609
accepted answer of: http://stackoverflow.com/q/24611609
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: You should use Marionette.ItemView's callback methods which will help you to destroy Image model. ItemView's onRender callback will be the right choice. var ImageView = Marionette.ItemView.extend({ // you initialization, ui bindings, etc onBeforeRender: function () { // Triggered before an ItemView is rendered. }, // Here you can destroy your model onRender: function () { // Triggered after the view has been rendered. this.model.destroy(); } }); onRender will be called after the view has been rendered and this.model.destroy() will destroy the model associated with the current ItemView.

http://stackoverflow.com/comment/38260112
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24677170
has text: Why wouldn't it be possible?
score: 0

http://stackoverflow.com/q/24658970
has title: Dynamically created textarea with no .val()
has body: I'm trying to allow users to edit the text of a paragraph in a website. I take a paragraph and replace the tags with tags using the .replaceWith() function. When I try to take the value of the textarea, it returns blank. Here's a JSfiddle. HTML: EditI'm going to change this into a textarea field and retrieve the value. JS: $(document).ready(function() { $('.edit').hide(); var object = $('p'); object.on("mouseenter", function() { $('.edit').show(); object.on('click','.edit',function(){ var oldText = object.text(); oldText = oldText.substr(4); // Exclude the word 'Edit' object.replaceWith($(" ").val(oldText).css("width",object.css('width')).css('height',object.css('height'))); var value = object.val(); alert("Value: "+value); }); }); }); I'm a programming beginner, so if you have style or implementation tips, feel free to share. This is just my gut reaction to solving the problem; there may be a simpler way to accomplish the same thing. EDIT: I should also mention that in my website, each paragraph comes from a database table that I'm displaying using an AJAX function. When the user is done editing, he can click a button, and the website will take the new value of the textarea field and UPDATE *table* SET *text*=newText WHERE *text* LIKE oldText;
tagged with: javascript
has answer: http://stackoverflow.com/a/24659181
answer count: 6
has answer: http://stackoverflow.com/a/24659159
possible better answer: http://stackoverflow.com/a/24659093
has answer: http://stackoverflow.com/a/24659038
has answer: http://stackoverflow.com/a/24659093
has comment: http://stackoverflow.com/comment/38226747
has answer: http://stackoverflow.com/a/24659243
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24659038
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38226794
has comment: http://stackoverflow.com/comment/38227007
has answer: http://stackoverflow.com/a/24659193
upvote count: 1
type: Question

firebase
tags question: http://stackoverflow.com/q/24663670
tags question: http://stackoverflow.com/q/24722916
tags question: http://stackoverflow.com/q/24709927
tags question: http://stackoverflow.com/q/24655892
tags question: http://stackoverflow.com/q/24691831
tags question: http://stackoverflow.com/q/24622788
tags question: http://stackoverflow.com/q/24703098
tags question: http://stackoverflow.com/q/24723152
type: Tag
tag name: firebase
tags question: http://stackoverflow.com/q/24748313
tags question: http://stackoverflow.com/q/24745355
tags question: http://stackoverflow.com/q/24727481

http://stackoverflow.com/comment/38376322
type: Comment
comment on: http://stackoverflow.com/a/24738042
has text: In bootbox, can we pass images inside alert messages?. I also need to pass image Mike
score: 0
type: AnswerComment

http://stackoverflow.com/q/24603268
has answer: http://stackoverflow.com/a/24603345
type: Question
has comment: http://stackoverflow.com/comment/38121263
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24603345
has title: Javascript onLoad File api event not firing
answer count: 1
tagged with: fileapi
tagged with: http://stackoverflow.com/tag/html
tagged with: html5-filesystem
has body: I have a small snippet of code &lt;input type="file" style="margin-left:10px" id="file"/&gt; and JavaScript snippet is &lt;script type="text/javascript"&gt; function compress(evt){ console.log('coming here'); var f = evt.target.files[0]; var r = new FileReader(); r.onload = function(e) { console.log('coming here also'); var contents = e.target.result; alert( "Got the file.n" +"name: " + f.name + "n" +"type: " + f.type + "n" +"size: " + f.size + " bytesn"); } } document.getElementById('file').addEventListener('change', compress, false); &lt;/script&gt; In console I can see coming here but r.onload function is not working. Can anyone please tell why its not working. I am using chrome latest version.
type: AnsweredQuestion
score: 0

http://stackoverflow.com/comment/38210790
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24650136
has text: http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript/21396837#21396837
score: 0

http://stackoverflow.com/q/24727518
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/24727532
has title: How can I access a variable in a javascript function from the rest of the script?
has answer: http://stackoverflow.com/a/24727538
has body: My function is the call that is made by the onchange event in an html select type input. I assign a variable that value, but it doesn't seem to get accessed by a variable of the same name outside that function, say, in $(document).ready() One Time Daily Weekly Monthly Yearly Requested And the script is this: (There is a lot more to the script, but I've only shown the part relevant to the question, to make it less clattered)
answer count: 4
downvote count: 0
has answer: http://stackoverflow.com/a/24727592
has comment: http://stackoverflow.com/comment/38356478
accepted answer: http://stackoverflow.com/a/24727551
possible better answer: http://stackoverflow.com/a/24727538
type: AnsweredQuestion
score: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24727551
type: Question
upvote count: 1

http://stackoverflow.com/q/24665907
type: UnansweredQuestion
tagged with: socket.io
type: Question
has body: I'm studying how to build a simple application of a real-time chat. I found many solutions using Socket.Io and it's working perfectly on localhost, but I have no idea how to make it work on my server. Any suggestions ? Here is my codes. INDEX.JS ar app = require('http').createServer(handler); var io = require('socket.io')(app); var fs = require('fs'); app.listen(); function handler (req, res) { fs.readFile(__dirname + '/index.html', function (err, data) { if (err) { res.writeHead(500); return res.end('error loading index.html'); } res.writeHead(200); res.end(data) }); } io.on('connection', function (socket){ socket.on('chat message', function(msg){ io.emit('chat message', msg); }); }); HTML &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){ $('#messages').append($('&lt;li&gt;').text(msg)); }); &lt;/script&gt; It's hosted here: http://stg.pixechat.com/chat/ Thanks
has comment: http://stackoverflow.com/comment/38240418
answer count: 1
has title: How to run Socket.IO application on my Server
tagged with: websocket
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/38240571
score: 0
has comment: http://stackoverflow.com/comment/38240138
has comment: http://stackoverflow.com/comment/38240265
has comment: http://stackoverflow.com/comment/38240385
has answer: http://stackoverflow.com/a/24666699
has comment: http://stackoverflow.com/comment/38240323
tagged with: node.js

http://stackoverflow.com/comment/38189226
type: AnswerComment
type: Comment
has text: I'm trying I have to wait a few minutes @svendjokumsen. The moment it allows me I will
comment on: http://stackoverflow.com/a/24638955
score: 0

http://stackoverflow.com/comment/38173442
type: Comment
has text: But what if i want to use path for further reasons?
comment on: http://stackoverflow.com/a/24630814
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38411527
has text: There is nothing wrong with alert where you're simply demonstrating a problem. The idea that alert is ALWAYS wrong and evil is silly.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24746978
type: AnswerComment

http://stackoverflow.com/comment/38163981
comment on: http://stackoverflow.com/a/24625172
has text: yeah its working but I guess you replaced the library..I am looking for this library because I am using the same at multiple places :)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24703542
has comment: http://stackoverflow.com/comment/38604251
score: 0
answers question: http://stackoverflow.com/q/24703457
type: Answer
has body: $scope.ltv = ($scope.total_financing ? $scope.total_financing : $scope.financing) / $scope.property_value; Is this what you want?
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38591720

http://stackoverflow.com/comment/38311697
score: 0
has text: please see http://plnkr.co/edit/ZKgKfTWtW4inZDq7lFC5?p=preview angular.forEach ... was outside controller. Huge array of locations by the way :)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24703769

http://stackoverflow.com/a/24704731
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24704601
has body: Use id and iterate in javascript with document.getElementById('yourId') or document.getElementsByTagName('HTMLTag'). You can take random colors and set the color with conditionals.
score: 1
upvote count: 1

http://stackoverflow.com/q/24689902
has answer: http://stackoverflow.com/a/24690339
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: Context: Highcharts, jQuery 1.9.1 I'm getting a Syntax error, unrecognized expression: out of the following HTML and JavaScript $.get-ed from our own site. What's jQuery complaining about? If we execute Demo2_SP_plunkerPartial.prx in a browser, it works fine. (.prx is the extension of an in-house SSL.) content from the partial Some other content This is the js code I'm using to get and parse the page: $(function(){ $.get('Demo2_SP_plunkerPartial.prx', function(result){ try { $result = $(result); } catch (e) { console.log(e); } $result.find('#content').appendTo('#new_content'); $result.find('script').appendTo('#new_content'); }, 'html'); });
has title: JQuery can't parse this HTML
has comment: http://stackoverflow.com/comment/38298220
score: 1
type: Question
has comment: http://stackoverflow.com/comment/38284527
has comment: http://stackoverflow.com/comment/38284603
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38284583
upvote count: 1

http://stackoverflow.com/comment/38364560
type: QuestionComment
comment on: http://stackoverflow.com/q/24727475
has text: @loganfsmyth I'm executing the script within the script directory. I can delete by hand.
score: 0
type: Comment

http://stackoverflow.com/a/24694300
has comment: http://stackoverflow.com/comment/38303404
type: Answer
accepted answer of: http://stackoverflow.com/q/24690337
has comment: http://stackoverflow.com/comment/38301362
has comment: http://stackoverflow.com/comment/38303689
answers question: http://stackoverflow.com/q/24690337
score: 1
upvote count: 1
has body: To perform such a rotation, you need to decide of the pivot point. Here i choose the eyebrow. Then you have to choose a point in the target canvas where this pivot point will be hooked. I decided to choose the point at middle x coordinates, and at fourth of the screen in y. To compute the rotation angle, you have to use atan2, which will nicely give you the angle for a given deltaY / deltaX in between two points ( angle = Math.atan2 ( delta y , delta x ) ) . Then to draw : - Translate to the target point. - rotate by right angle. - draw the image centering on its pivot. ET VOILA, it works :-) function rotate() { ctx.save(); // go to default center position ctx.translate(eyeBrowTargetPosition.x, eyeBrowTargetPosition.y); // compute angle var yDelta = noseMiddle.y - eyebrowMiddle.y; var xDelta = noseMiddle.x - eyebrowMiddle.x ; var angle = Math.atan2 (yDelta ,xDelta); // compensate for angle ctx.rotate(angle); //draw image centering input on eyebrow ctx.drawImage(face, -eyebrowMiddle.x, -eyebrowMiddle.y); ctx.restore(); }; jsbin is here : http://jsbin.com/wavokaku/2/edit?js,output result with an approximation of the existing green dots :
has comment: http://stackoverflow.com/comment/38297486
has comment: http://stackoverflow.com/comment/38305658
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38304539

http://stackoverflow.com/a/24684710
downvote count: 0
has comment: http://stackoverflow.com/comment/38401943
has comment: http://stackoverflow.com/comment/38375356
answers question: http://stackoverflow.com/q/24683953
type: Answer
has comment: http://stackoverflow.com/comment/38375025
score: 3
has comment: http://stackoverflow.com/comment/38381155
has body: Issue 1: If you want multiple returns, you should gather them in an array. return [time, theta, omega, e]; You could also return an object with defined property according your variables: {time: time, theta: theta, omega: omega, e: e} I didnt test your code, though, so there might be another problem. Issue 2: the data is not formatted correctly. You will need to extract your arrays to create a proper data array. this is your current array (with fake data) : [[0,1,2,3,4,5,6],[0,1,2,3,4,5,6]] What you want to do is something in this format : [[0,0], [1,1], [2,2], [3,3], [4,4], [5,5], [6,6]] (the first point being the x-axis and the second point the y-axis) Issue3: I didnt read much of the blog post which goes into details of the inside of the flot code. That souldn't help a beginner. It does state that you can access the color of the axes with the color option in the axis options. From the doc: Customizing the axes: xaxis, yaxis: { ... color: null or color spec ... } The "color" option determines the color of the line and ticks for the axis, and defaults to the grid color with transparency. For more fine-grained control you can also set the color of the ticks separately with "tickColor". You can customize the font and color used to draw the axis tick labels with CSS or directly via the "font" option. When "font" is null - the default - each tick label is given the 'flot-tick-label' class. For compatibility with Flot 0.7 and earlier the labels are also given the 'tickLabel' class, but this is deprecated and scheduled to be removed with the release of version 1.0.0. So the color option for the lines and css for the labels EDIT: The "right" documentation can be found on http://www.flotcharts.org/, along with multiple relevant examples and officials (and maintained) plugins. The jsfiddle you provided is quite old (the flot version is 0.7, we are at 0.8.3) but it seems the axislabel plugin still works with the newest flot. here is your example with mockup data: http://jsfid…
has comment: http://stackoverflow.com/comment/38305625
upvote count: 3

http://stackoverflow.com/a/24746996
type: Answer
has body: Assuming you have the address you can use the Google Geocoding web service to manually retrieve the location coordinates. (I added a city and state to better refine the data) https://developers.google.com/maps/documentation/geocoding/ JSON: http://maps.google.com/maps/api/geocode/json?address=5707%20dogwood%20ave.%20Rosamond,%20CA&amp;sensor=false XML: http://maps.google.com/maps/api/geocode/xml?address=5707%20dogwood%20ave.%20Rosamond,%20CA&amp;sensor=false Alternately there is a javascript wrapper on the API I would also review this post regarding how to deal with rate limiting if you will be exceeding 2,500 requests per day. http://www.benbybenjacobs.com/blog/2013/09/11/google-geocoding-service-for-angularjs
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/24746622
downvote count: 0

http://stackoverflow.com/comment/38315973
has text: The thing is the smooth scroll doesn't even appear to be scroll, and it's quickly replaced by the never-failing fadeIn. Try `animate()`, as suggested in my answer and in the comments above, or explain which is the result you are looking for that can't be achieved by use of this method.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24706483

http://stackoverflow.com/comment/38239896
comment on: http://stackoverflow.com/q/24664934
has text: the height is set to 100%
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24668264
upvote count: 1
has comment: http://stackoverflow.com/comment/38243681
accepted answer of: http://stackoverflow.com/q/24666898
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38243721
downvote count: 0
answers question: http://stackoverflow.com/q/24666898
type: Answer
has body: set id your span elements like Feed Videos And More Map and More Maps Alerts and then script like var spanWidth = $('#text span').width(); var itemNameWidth=0; for(i=1;i<=$('.item-name').length;i++) { if(itemNameWidth<$('#id'+i).width()) { itemNameWidth = $('#id'+i).width(); } } $('.item-name').animate({ width: itemNameWidth }, 3000); $('.item-name').animate({ width: "0" }, 3000); Fiddle

http://stackoverflow.com/a/24712709
type: Answer
answers question: http://stackoverflow.com/q/24712625
score: 2
downvote count: 0
upvote count: 2
has body: It isn't doing what you think: &gt; obj.toString() "[object Object]" &gt; arr["[object Object]"] "things" Anything you add this way will fix into the same hard-coded key name.

http://stackoverflow.com/q/24643029
score: 0
has answer: http://stackoverflow.com/a/24903663
answer count: 2
has comment: http://stackoverflow.com/comment/38199779
has title: How to acces controls from another page in asp.net using jquery
has comment: http://stackoverflow.com/comment/38199401
tagged with: jquery
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38199781
has answer: http://stackoverflow.com/a/24652925
type: Question
tagged with: c#
has body: I have used page1.aspx &amp; page2.aspx. In page1.aspx I have used following code, &lt;div id="resultdiv" &gt; &lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt; In page2.aspx, i have load the page1.aspx page on the div of page2.aspx page. the code is, &lt;script type="text/javascript" &gt; $(document).ready(function () { $('#result').load('page1.aspx #resultdiv'); }); &lt;div id="result"&gt; my question is, how to access page1.aspx controls(textbox) from page2.aspx. pls clarify my doubt. i'm new to jquery.
tagged with: javascript

http://stackoverflow.com/a/24679217
accepted answer of: http://stackoverflow.com/q/24678815
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38264638
has body: No, this is something set by the layout that you cannot override without changing the source code. You can however use copies of the same data with different layouts.
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24678815
type: Answer

http://stackoverflow.com/comment/38164308
comment on: http://stackoverflow.com/q/24625500
score: 0
type: Comment
has text: Do you people think that using jquery in JavaScript functions which is wrapped in an object is good idea?
type: QuestionComment

http://stackoverflow.com/comment/38197870
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24643428
has text: why would oyu downvote this if I have already chosen a best answer?
type: AnswerComment

http://stackoverflow.com/comment/38390500
type: AnswerComment
has text: @ShridharGowda Great, happy to help! I've added your slight modifications to my answer, so you don't need to post one yourself.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24679503

http://stackoverflow.com/a/24690917
has comment: http://stackoverflow.com/comment/66685345
score: 24
upvote count: 24
has comment: http://stackoverflow.com/comment/71444169
has comment: http://stackoverflow.com/comment/104550509
downvote count: 0
has comment: http://stackoverflow.com/comment/65612042
has comment: http://stackoverflow.com/comment/71476154
has comment: http://stackoverflow.com/comment/71444880
has comment: http://stackoverflow.com/comment/38509917
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38399971
has comment: http://stackoverflow.com/comment/71444326
answers question: http://stackoverflow.com/q/24685208
type: Answer
has body: Firefox expects that, when you submit a form, you have at least a submit button available, meaning there should be something like: Click me or: When you use the first one in your code, it will not work (because you strip out all buttons before submitting the form). When you use the second option, it will work, also in Firefox. As you can see in this fiddle: http://jsfiddle.net/q9Dzc/1/
has comment: http://stackoverflow.com/comment/71444383
has comment: http://stackoverflow.com/comment/61879303
accepted answer of: http://stackoverflow.com/q/24685208
has comment: http://stackoverflow.com/comment/38394554

http://stackoverflow.com/a/24601086
has body: I would instead create an object and put that in a single array. var my Obj = {no1:741, no2:15, text:'some text'} That would let you build the array without the need for a scanner since it's already stored in the "scanned" state
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/24601062
upvote count: 1

http://stackoverflow.com/q/24624092
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24625089
tagged with: http://stackoverflow.com/tag/pdf
tagged with: acrobat
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: checkbox
has body: There are a few check boxes in an Adobe PDF I have open in Acrobat. I want to count the checkboxes that have been checked and output the number in another textbox. How can I do that with JavaScript? Or other methods?
score: 1
has answer: http://stackoverflow.com/a/36042421
type: Question
has title: How can I count only checked checkboxes in a PDF form?

http://stackoverflow.com/a/24658913
type: Answer
has comment: http://stackoverflow.com/comment/38237379
accepted answer of: http://stackoverflow.com/q/24657743
has body: To achieve this, you would have to follow the following steps: Randomly sort the items from each store individually Number the items in each randomised list OPTIONAL - if you want the stores in order, pad the number with zeros and append an identifier for the store ([padded item number]|[store identifier] eg 00001|A) Combine all the lists into one Sort this new list by the ordered number (or string)
has comment: http://stackoverflow.com/comment/38264471
has comment: http://stackoverflow.com/comment/38237559
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24657743

http://stackoverflow.com/a/24731820
score: 2
downvote count: 0
has body: You can do it by using a temporarily value. Assign the temp value to typeahead &lt;input type="text" ng-model="tempValue" typeahead="list for list in getList($viewValue) | filter:$viewValue" typeahead-editable="false" &gt; Watch on tempValue and decide whether to update the target value or not. $scope.$watch('tempValue', function(tempValue){ if(shouldUpdateTheTargetValue(tempValue)) { $scope.targetValue = tempValue; } }); I created a plunker for that. - http://plnkr.co/edit/r63027iRobX4skV9YK60?p=preview
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24730893
accepted answer of: http://stackoverflow.com/q/24730893
type: Answer

http://stackoverflow.com/a/24686535
score: 5
type: Answer
has comment: http://stackoverflow.com/comment/38278228
accepted answer of: http://stackoverflow.com/q/24686443
has body: I faced the same problem. I saw the load function of iframe fires in firefox but not in chrome. So firefox reload the iframe again on load event. So with your existing code try this:- $(iframe).load(function(e){ $(iframe).contents().find('html').html(content); })
upvote count: 5
answers question: http://stackoverflow.com/q/24686443
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38278168

http://stackoverflow.com/comment/41705329
score: 1
type: AnswerComment
type: Comment
has text: @kyle-pennell: Use variables instead of strings for upComing & orderBy, then ng-click handler to set them. Something like this: http://codepen.io/konsumer/pen/clyaH
comment on: http://stackoverflow.com/a/24642842

http://stackoverflow.com/comment/38099345
score: 0
type: Comment
has text: What does your JSON look like?
type: QuestionComment
comment on: http://stackoverflow.com/q/24591912

http://stackoverflow.com/q/24704793
score: -2
has comment: http://stackoverflow.com/comment/38312695
has answer: http://stackoverflow.com/a/24706483
has title: Smooth scroll with slide() in jQuery, doesn't scroll smoothly
downvote count: 2
has comment: http://stackoverflow.com/comment/38312476
has comment: http://stackoverflow.com/comment/38312763
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/4034659
linked to: http://stackoverflow.com/q/6677035
has body: I made a simple html file, with anchor links that can be clicked to scroll smoothly to their respective part of the page ( tags). The problem is that the scroll is not smooth at all! I watched a tutorial on youtube and the code used in there was (here's the code I adapted to fit on my project, but the way is the same): function goto(numsection){ var section = $('#section'+numsection); var offset = section.offset().top; $(document).scrollTop(offset); $(section).slide('slow'); } When I click an anchor, the page scrolls down to the respective section, but the transition is immediate. In JavaScript console there's this error: Uncaught TypeError: undefined is not a function I don't understand, in the tutorial worked perfectly. PS: I want to use slide() function if possible, not slideToggle() or similar.
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38312738
has comment: http://stackoverflow.com/comment/38315883
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38259598
type: Comment
type: QuestionComment
has text: I'd suggest using `document.getElementsByClassName('galleryItem')` and looping over all of them instead of selecting by ID, unless you want to change them to different images.
comment on: http://stackoverflow.com/q/24676869
score: 0

http://stackoverflow.com/q/24694383
has comment: http://stackoverflow.com/comment/38292397
answer count: 2
has body: code as follow: function Building(b_height,b_address,b_cost){ this.b_address = b_address; this.b_cost = b_cost; } Building.prototype = { constructor:Building, } var house = new Building("No.211 Spring Street",5000); //add a new method to Building.prototype Building.prototype.raise= function(){this.b_cost = this.b_cost + 1000;} //why a object that already generated use 'new' operate can access a prototype's method which added later house.raise(); house.b_cost ; //6000 I don't understand why 'house' object can access 'raise' of method. according to MDN for the introduction of NEW operator: When the code new foo(...) is executed, the following things happen: (1)A new object is created, inheriting from foo.prototype. (2)The constructor function foo is called with the specified arguments and this bound to the newly created object. new foo is equivalent to new foo(), i.e. if no argument list is specified, foo is called without arguments. (3)The object returned by the constructor function becomes the result of the whole new expression. If the constructor function doesn't explicitly return an object, the object created in step 1 is used instead. (Normally constructors don't return a value, but they can choose to do so if they want to override the normal object creation process.) then, 'house' as A new object only inherit from Building.prototype ,why can access a "new" method of prototype?
tagged with: javascript
has comment: http://stackoverflow.com/comment/38292352
tagged with: prototype
score: 0
possible better answer: http://stackoverflow.com/a/24694568
has answer: http://stackoverflow.com/a/24694568
has answer: http://stackoverflow.com/a/24694582
accepted answer: http://stackoverflow.com/a/24694582
type: AnsweredQuestion
has title: why a object that already generated use 'new' operate can access a prototype's method which added later in javascript
type: Question

http://stackoverflow.com/q/24601553
tagged with: javascript
has comment: http://stackoverflow.com/comment/38118257
answer count: 6
has body: I made a JavaScript loop that skips every set of two numbers that are followed by a set of three. Consider the following set of integers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 This is what the array returns: 1, 2, 3, 6, 7, 8 See how it skipped 4-5 and 9-10? (every set of two numbers followed by a set of three) Visual: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (skips bolded numbers) Here is what I came up with: var y = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; for (var i = 0; i &lt; y.length; i++) { if (y[i] &gt;= 4 &amp;&amp; y[i] &lt;= 5) { continue; } if (y[i] &gt;= 9 &amp;&amp; y[i] &lt;= 10) { continue; } document.write(y[i]); } The above for-loop returns 123678 from 12345678910. The problem is that I had to manually say which ones to skip. Is there a way, possibly with % modulus, to automatically skip every set of two numbers followed by a set of three without limiting the length to ten?
has comment: http://stackoverflow.com/comment/38117796
has answer: http://stackoverflow.com/a/24601610
favorite count: 0
has comment: http://stackoverflow.com/comment/38117891
has comment: http://stackoverflow.com/comment/38118008
score: -3
possible better answer: http://stackoverflow.com/a/24601683
tagged with: modulus
has answer: http://stackoverflow.com/a/24601884
has comment: http://stackoverflow.com/comment/38117932
has answer: http://stackoverflow.com/a/24601683
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38117880
has title: JavaScript for-loop: Skip 2 Numbers Followed by a set of 3
accepted answer: http://stackoverflow.com/a/24601610
downvote count: 3
has answer: http://stackoverflow.com/a/24601692
type: Question
tagged with: for-loop
has answer: http://stackoverflow.com/a/62291078
has comment: http://stackoverflow.com/comment/38117779
has comment: http://stackoverflow.com/comment/38117802
upvote count: 0
has answer: http://stackoverflow.com/a/32319105

http://stackoverflow.com/a/24669643
type: Answer
score: 1
has body: $(".bt1").on('click',function () { var optionval= $("#ip1").val(); $('select').append(' ' + opt + ' ') });
upvote count: 1
answers question: http://stackoverflow.com/q/24669486
downvote count: 0

http://stackoverflow.com/comment/38214131
has text: Thank you for this - I thought 1 would have been covered by the ace.require(...) statements, but obviously not. 2 was actually something I tried as 'enableLiveAutocompletion' kept coming up as mispelled ( I am still getting 'misspelled option "enableLiveAutocompletion"' - any ideas?)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24652084
type: Comment

http://stackoverflow.com/comment/38378500
has text: You've forgotten a `;` in the line before `console.log("test4");` and also when checking for the value `blau` you can just use `if (blau)` instead of `if (blau == true)`.
comment on: http://stackoverflow.com/a/24738754
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/24588430
upvote count: 1
downvote count: 0
type: Answer
has body: give ids to your li tags Home Founder Principal Sub-Principal Departments Departments Courses in your otherlink1.aspx on load add these lines $("li").find(".active").removeClass("active"); $("#otherlink1").addClass("active"); respectively in other asp pages as well.
score: 1
answers question: http://stackoverflow.com/q/24588346

http://stackoverflow.com/a/24654678
type: Answer
score: 2
has body: Some browsers fail to correctly and completely recognize the programmatic change of a hidden input's value immediately after it is changed. If you submit the form directly after changing the hidden input's value via javascript, the value sent for that input will be the pre-change value, rather than the value you set in javascript. Unfortunately, I don't have a list of browsers that exhibit this behavior, nor do I know the exact mechanics behind it. What I do know is that I've run into the issue you're describing, and I have always been able to solve it by triggering a change event on the hidden input after changing its value via javascript. For those using plain javascript with no external libraries, your code would look something like this (see here): &lt;input id="myHidden" name="myHidden" type="hidden" value="old value"/&gt; &lt;script type="text/javascript"&gt; var hiddenInput = document.getElementById('myHidden'); hiddenInput.value = 'new value'; console.log(hiddenInput.value); // = 'new value' // Submit the form now, and myHidden='old value' will be sent to the server // Set up and trigger the change event on our input: var changeEvent = document.createEvent("UIEvents"); changeEvent.initUIEvent("change", true, true); hiddenInput.dispatchEvent(changeEvent); // Submit the form now, and myHidden='new value' will be sent to the server &lt;/script&gt; For those using jQuery or a similar library, the code is a little more concise: &lt;input id="myHidden" name="myHidden" value="old value"/&gt; &lt;script type="text/javascript"&gt; var $hiddenInput = $('#myHidden'); $hiddenInput.val('new value'); console.log($hiddenInput.val()); // = 'new value' // Submit the form now, and myHidden='old value' will be sent to the server // Trigger the change event on our input: $hiddenInput.change(); // Submit the form now, and myHidden='new value' will be sent to the server &lt;/script&gt; Really concise example (one-liner) using jQuery: &lt;input id="myHidden" name="myHidden" value=…
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24647180
answers question: http://stackoverflow.com/q/24647180
upvote count: 2

http://stackoverflow.com/comment/38185657
type: Comment
has text: With so many ways to do things, the easiest way is to crunch code in there and wait until you start seeing things work. In your case, I can spend all day and night showing you examples of code to get it to work for you, but in your scenario, its what you feel is the best and most achievable method of getting the job done.
comment on: http://stackoverflow.com/a/24636962
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38316436
has text: i can use javascript if needed
comment on: http://stackoverflow.com/q/24706702
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/38334016
type: QuestionComment
has text: it takes a really short audio file to play 25 times a second. even a sine-wave period will sound like a constant 25hz bass tone at that point; not what you want most likely. aside: don't use extra wraps for events: functions are functions, so you can setTimeout(textLoop, charDelay), and set window.onload=loadText; (not a problem, but good practice)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24715986

http://stackoverflow.com/a/24693129
downvote count: 0
has body: As discussed in the comments, angular has a really powerful feature/library for handling these scenarios - ui-router (with its powerful wiki). The ui-router is an answer to need to develop functional pieces - states, rather then think in view/url (cite from a home page): AngularUI Router is a routing framework for AngularJS, which allows you to organize the parts of your interface into a state machine. Unlike the $route service in the Angular ngRoute module, which is organized around URL routes, UI-Router is organized around states, which may optionally have routes, as well as other behavior, attached. There are some very interesting blog posts: AngularJS State Management with ui-router (by Ben Schwartz) ...The most interesting thing about AngularJS's new router, isn't the router itself, but the state manager that comes with it. Instead of targeting a controller/view to render for a given url, you target a state. States are managed in a heirarchy providing inheritance of parent states and complex composition of page components, all the while remaining declarative in nature... The basics of using ui-router with AngularJS (by Joel Hooks) ...ui-router fully embraces the state-machine nature of a routing system. It allows you to define states, and transition your application to those states. The real win is that it allows you to decouple nested states, and do some very complicated layouts in an elegant way. Exactly the point we need - decouple child states... dynamically change the controller in fact ... could be by url change or just a state change (one sibling child instead of other without url change) You need to think about your routing a bit differently, but once you get your head around the state-based approach, I think you will like it... Finally, there are few links, which I would mark as the saint grail of ui-router Sample application. In action we can see, how the ui-router state machine does work. We can load list as a parent state, then we can select row ite…
answers question: http://stackoverflow.com/q/24639491
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24639491
type: AcceptedAnswer
type: Answer
score: 3

http://stackoverflow.com/comment/38179349
comment on: http://stackoverflow.com/q/24633817
score: 0
type: Comment
type: QuestionComment
has text: you could use a flag. set it to true once the animation has been completed once & only do the animation if the flag is false.

http://stackoverflow.com/comment/38333405
type: QuestionComment
comment on: http://stackoverflow.com/q/24715666
has text: JsFiddle have all the code that you need (.-.)
score: 0
type: Comment

http://stackoverflow.com/comment/38201473
type: Comment
has text: it will reload/refresh the page where you are. That is if you load index.html first than go on contactus.html and press refresh it will reload contactus.html.
comment on: http://stackoverflow.com/a/24645394
type: AnswerComment
score: 0

http://stackoverflow.com/a/24725971
upvote count: 0
score: -1
has body: You don't need to define a params object. Just do it like this: var App = angular.module("myApp",["ui.router"]); App.config(function($stateProvider){ $stateProvider.state("main",{ url:"main/:name", template:" I want to kick your ass, {{name}} ", controller:function($scope,$state){ $scope.name = $state.params.name } }) });
type: Answer
has comment: http://stackoverflow.com/comment/38356262
answers question: http://stackoverflow.com/q/24725777
downvote count: 1

http://stackoverflow.com/a/24702459
type: Answer
has comment: http://stackoverflow.com/comment/38308676
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38309843
has body: I believe Wordpress uses the full jQuery ( no-conflict mode ) not the the shorthand $ . Try jQuery( '.element' ).realshadow(); or (function($) { // Do Stuff })(jQuery) and use $ as a local variable. EDIT It works, you just need to get rid of the demo.js file because it's unnecessary. If you run jQuery( '.entry-title').realshadow(); in the console it works.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38309269
has comment: http://stackoverflow.com/comment/38310512
has comment: http://stackoverflow.com/comment/38309304
has comment: http://stackoverflow.com/comment/38308984
accepted answer of: http://stackoverflow.com/q/24702013
upvote count: 1
answers question: http://stackoverflow.com/q/24702013
has comment: http://stackoverflow.com/comment/38308285
has comment: http://stackoverflow.com/comment/38308802
has comment: http://stackoverflow.com/comment/38310486

http://stackoverflow.com/q/24699133
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: In my page I'm loading different textareas based on the button pressed. Suppose a user clicks on button A, then this script is called: $("body").on("click", "a#pages-menu", function() { var page = $(this).attr("id"); $(".inject").load("Including/modules/"+page+"/index.php", function () { }); }); On this module, there is a &lt;textarea&gt;&lt;/textarea&gt; on which I want to initialize a TinyMCE. I tried using some of the code provided by TinyMCE documentation, but that didn't work: &lt;script type="text/javascript"&gt; function setup() { tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true }); } &lt;/script&gt; and then setup() after load(), but as I said before, that didn't work.
has title: Load TinyMCE on dynamic loaded content
tagged with: jquery
tagged with: tinymce
type: Question
has comment: http://stackoverflow.com/comment/38312545
tagged with: http://stackoverflow.com/tag/html
score: 0
has comment: http://stackoverflow.com/comment/38312516
tagged with: tinymce-4
has comment: http://stackoverflow.com/comment/38305564

http://stackoverflow.com/a/24707168
has body: Try below regex using grouping. (?: )(.*?<\/foo>) regex101 online demo Pictorial representation: Debuggex Demo Sample code: var re = /(?: )(.*?<\/foo>)/; var str = 'hello remove me '; var subst = ' '; var result = str.replace(re, subst); Output: hello
has comment: http://stackoverflow.com/comment/38317839
has comment: http://stackoverflow.com/comment/38318117
has comment: http://stackoverflow.com/comment/38318670
has comment: http://stackoverflow.com/comment/38317251
answers question: http://stackoverflow.com/q/24707110
has comment: http://stackoverflow.com/comment/38317605
has comment: http://stackoverflow.com/comment/38317554
has comment: http://stackoverflow.com/comment/38318041
has comment: http://stackoverflow.com/comment/38317936
has comment: http://stackoverflow.com/comment/38319081
has comment: http://stackoverflow.com/comment/38317510
has comment: http://stackoverflow.com/comment/38317148
downvote count: 0
has comment: http://stackoverflow.com/comment/38319166
has comment: http://stackoverflow.com/comment/38319065
has comment: http://stackoverflow.com/comment/38319055
has comment: http://stackoverflow.com/comment/38317191
has comment: http://stackoverflow.com/comment/38318975
upvote count: 2
has comment: http://stackoverflow.com/comment/38317273
type: Answer
has comment: http://stackoverflow.com/comment/38317909
has comment: http://stackoverflow.com/comment/38317278
has comment: http://stackoverflow.com/comment/38317335
has comment: http://stackoverflow.com/comment/38317984
has comment: http://stackoverflow.com/comment/38317711
has comment: http://stackoverflow.com/comment/38317891
score: 2
has comment: http://stackoverflow.com/comment/38319093
has comment: http://stackoverflow.com/comment/38317218
has comment: http://stackoverflow.com/comment/38317120

http://stackoverflow.com/q/24682680
tagged with: asp.net
has answer: http://stackoverflow.com/a/24682956
type: AnsweredQuestion
tagged with: gridview
has answer: http://stackoverflow.com/a/24684568
accepted answer: http://stackoverflow.com/a/24682956
type: Question
tagged with: href
possible better answer: http://stackoverflow.com/a/24684568
has comment: http://stackoverflow.com/comment/38270971
tagged with: javascript
has body: I have an aspx page with an asp:GridView control that lists documents that have been uploaded pertaining to a legal case. The first column in the GridView is a series of href tags that, if clicked on, will open the document in the default program associated with that document type. The relative path to the document is stored in SQL Server. I use the DataBinder.Eval method to populate the path, which is then sent to a Javascript function that opens the document. By example, I have one document record whose path is DATA\AR000001\AttachFiles\Case11\2.txt. The markup for the anchor in the grid is as follows: <a href="javascript:void(0);" onclick="ViewAttachFile('<%#Databinder.Eval(Container.DataItem, "FullAttchPath") %>');">Open The Javascript function is: function ViewAttachFile(sFile) { docs = window.open(sFile); } If I view the page source, the relative path looks exactly as I would expect: Open Setting a breakpoint at ViewAttachFile, however, I find that the following is being passed to the function, note all backslashes and the document name have been stripped: DATAAR000001AttachFilesCase11.txt (this is from the text visualizer) I have tried embedding the escape and replace functions around the DataBinder.Eval call, but with no success, as Javascript is not my strong suit, not that I'm sure either of these would be the right solution anyway. I have also tried bypassing the ViewAttachFile function altogether, and coding the link as: <a href="javascript:void(0);" onclick="javascript:window.open('<%#Databinder.Eval(Container.DataItem, "FullAttchPath") %>');">Open but that essentially yields the same result, as the backslashes are stripped out of the URL, the period is converted to %02 and the window opened returns a 400 error for Bad Request - Invalid URL. I supposed I could double-up on the slashes in the path column in the database, but that seems like a bad idea, and I'm hoping for a cleaner resolution. Any insight is greatly appreciated!
has title: Relative path to documents, passed from href to Javascript function, getting back slashes and period stripped out
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/38270982

http://stackoverflow.com/comment/38220259
comment on: http://stackoverflow.com/a/24655503
type: AnswerComment
score: 0
type: Comment
has text: The power of habit :)

http://stackoverflow.com/q/24698534
has comment: http://stackoverflow.com/comment/38299927
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/38301735
score: 2
downvote count: 0
answer count: 1
has title: When submitting a multipart/form-data with ajax, file is empty
favorite count: 0
has answer: http://stackoverflow.com/a/24699788
upvote count: 2
type: UnansweredQuestion
has body: I'm with a problem when submitting a multipart/form-data with ajax. HTML code: &lt;form id='form_foto' method='post' enctype='multipart/form-data'&gt; &lt;input type='hidden' id='id_noticia' name='id_noticia' value='"+id_noticia+"' /&gt; &lt;input name='foto[]' type='file' multiple /&gt; &lt;/form&gt; jQuery and Ajax: $("#form_foto").submit(function(e){ $("#form_foto").append("&lt;br /&gt;Aguarde..."); var formData = new FormData(this); $.ajax({ url: "/PortalGBD/services", type: "POST", data: formData, async: false, dataType: "multipart/form-data", processData: false, contentType: false, success: function(resposta){ alert(resposta); } }); e.preventDefault(); }); $("#form_foto").submit(); self.close(); } And the request with a file input empty: -----------------------------65942623427134 Content-Disposition: form-data; name="id_noticia" 336 -----------------------------65942623427134 Content-Disposition: form-data; name="foto[]"; filename="" Content-Type: application/octet-stream -----------------------------65942623427134-- Please help me with this problem. Thank you.
tagged with: forms
type: Question

http://stackoverflow.com/comment/38325431
has text: Actually, answers are supposed to, well, answer questions, not ask new ones?! :p Anyway: You shouldn't reuse streams (stream wrappers); that kinda violates the contract, even though it works in this instance. You should close the inputStream (or scriptable stream wrapper around it) from `zr.getInputStream()`. `zr.open()` should be outside of the try-finally block, but in another (outer) try-block. And so on. Might be a good idea to http://codereview.stackexchange.com/
comment on: http://stackoverflow.com/a/24710082
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24608948
has comment: http://stackoverflow.com/comment/38131513
downvote count: 0
favorite count: 0
has title: Simple JS, onclick change background color
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2
has comment: http://stackoverflow.com/comment/38131520
upvote count: 2
has comment: http://stackoverflow.com/comment/38131586
has comment: http://stackoverflow.com/comment/38131454
has answer: http://stackoverflow.com/a/24609015
type: Question
has body: I'm learning from my book, it said that I could use the onselect event instead of a button to change the background color of the page. I thought this would be extremely simple by using: &lt;select id="selColor" onselect="changeColor()"&gt; and function changeColor() { var selColor = document.getElementById("selColor"); var color = selColor.value; document.body.style.backgroundColor = color; } But it failed. I tried searching for it but I cannot find the error. Fiddle: http://jsfiddle.net/kL3Jz/2/
has comment: http://stackoverflow.com/comment/38131500
tagged with: javascript
has answer: http://stackoverflow.com/a/24609137
has comment: http://stackoverflow.com/comment/38131988
has answer: http://stackoverflow.com/a/24609270
answer count: 3

http://stackoverflow.com/comment/38176355
score: 0
comment on: http://stackoverflow.com/q/24629005
type: Comment
type: QuestionComment
has text: That's why I'm too lazy to collect all the js for datatables, jEditable and to guess how your implementation might look alike. Just provide a minimalistic example of what you expect your code to do, mock up some hardcoded data, because ajax won't work so easily from a fiddle. Don't worry if your example does not work as expected, as long as you show some effort and spare others the guesswork you'll be fine.

grails
tags question: http://stackoverflow.com/q/24695180
tags question: http://stackoverflow.com/q/24651277
type: Tag
tag name: grails
tags question: http://stackoverflow.com/q/24617113
tags question: http://stackoverflow.com/q/24676048

http://stackoverflow.com/q/24665820
has comment: http://stackoverflow.com/comment/38239885
type: Question
has body: I am trying to create a web page that, when a user searches for a topic, shows the tweets in a certain city that relate to that topic. The request is going to Twitter successfully - the response is 200 and I can see the response data in the chrome developer tool. However, I can't get the data to post on my page, or even log in the console. I'm wondering if I'm calling it incorrectly? I'm specifically looking at this function: // Function that appends search result to DOM var formatTweet = function(tweets) { //console.log(tweets); // clone template var result = $('.topic-template .topic-results').clone(); // console.log(result); // ?? not logging result var image = result.find('.profile-img'); image.attr('src', tweets.profile_image_url); var status = result.find('.status'); status.append(tweets.text); var screenName = result.find('.screen-name'); screenName.append(tweets.statuses.user.screen_name); var location = result.find('location'); location.append(tweets.user.location); var time = result.find('.time'); time.append(tweets.created_at); return result; }; // end showUser function Maybe I'm references the tweets objects incorrectly? I am getting an error that says: Uncaught TypeError: Cannot read property 'screen_name' of undefined. There is also an error that says: Error in event handler for (unknown): Cannot read property 'innerHTML' of null Stack trace: TypeError: Cannot read property 'innerHTML' of null at Object.AMZUWLXT.tests.popNodeData (chrome-extension://ciagpekplgpbepdgggflgmahnjgiaced/contentScripts/tests.js:79:33) at Object.&lt;anonymous&gt; (chrome-extension://ciagpekplgpbepdgggflgmahnjgiaced/contentScripts/tests.js:168:28) at Object.&lt;anonymous&gt; (chrome-extension://ciagpekplgpbepdgggflgmahnjgiaced/contentScripts/tests.js:12:28) at Object.&lt;anonymous&gt; (chrome-extension://ciagpekplgpbepdgggflgmahnjgiaced/contentScripts/tests.js:12:28) at chrome-extension://ciagpekplgpbepdgggflgmahnjgiaced/contentScripts/tests.js:12:28 at Object.runPage (chrome-…
has comment: http://stackoverflow.com/comment/38239962
has answer: http://stackoverflow.com/a/24666445
tagged with: javascript
has comment: http://stackoverflow.com/comment/38240202
score: 0
accepted answer: http://stackoverflow.com/a/24666445
answer count: 1
has comment: http://stackoverflow.com/comment/38240470
tagged with: jquery
has title: Cannot retrieve Data from Twitter (AJAX)
tagged with: ajax
has comment: http://stackoverflow.com/comment/38239970
has comment: http://stackoverflow.com/comment/38239974
type: AnsweredQuestion
tagged with: twitter

http://stackoverflow.com/q/24646997
has answer: http://stackoverflow.com/a/24647107
tagged with: youtube-javascript-api
favorite count: 0
upvote count: 12
type: UnansweredQuestion
tagged with: youtube-api
linked to: http://stackoverflow.com/q/6970013
has body: Here i have tried as follows: HTML Script var player; function onYouTubePlayerAPIReady() {player = new YT.Player('player');} Here i want to such action like when the player timing reaches 6 seconds,i want to change the src of the iframe.
downvote count: 0
has answer: http://stackoverflow.com/a/39160557
type: Question
score: 12
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/33384587
has title: Getting current time of embedded iframe youtube player?
answer count: 3

http://stackoverflow.com/q/24605591
tagged with: javascript
has comment: http://stackoverflow.com/comment/38126862
score: 0
has body: The following breeze query works perfectly fine var manager = emFactory.newManager(); return manager.executeQuery(query).then(querySucceeded); but when i add the failure callback and re-run the application var manager = emFactory.newManager(); return manager.executeQuery(query).then(querySucceeded).fail(function (err) {}); an 'undefined is not an object error' exception it thrown. I've been scratching my head on this one for a while so any help would be much appreciated.
answer count: 1
tagged with: breeze
tagged with: angularjs
has comment: http://stackoverflow.com/comment/38126930
has title: BreezeJS failure callback causing a 'undefined is not an object error' exception
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24606515
type: Question
has answer: http://stackoverflow.com/a/24606515

linechart
tag name: linechart
type: Tag
tags question: http://stackoverflow.com/q/24747099

iframe
tags question: http://stackoverflow.com/q/24740153
tags question: http://stackoverflow.com/q/24595345
tags question: http://stackoverflow.com/q/24635523
tags question: http://stackoverflow.com/q/24622021
tags question: http://stackoverflow.com/q/24608116
tags question: http://stackoverflow.com/q/24739663
tags question: http://stackoverflow.com/q/24697069
tags question: http://stackoverflow.com/q/24600655
tags question: http://stackoverflow.com/q/24748400
tag name: iframe
tags question: http://stackoverflow.com/q/24642057
tags question: http://stackoverflow.com/q/24604207
tags question: http://stackoverflow.com/q/24605434
tags question: http://stackoverflow.com/q/24680782
tags question: http://stackoverflow.com/q/24619114
tags question: http://stackoverflow.com/q/24731586
tags question: http://stackoverflow.com/q/24683264
tags question: http://stackoverflow.com/q/24718433
tags question: http://stackoverflow.com/q/24656292
tags question: http://stackoverflow.com/q/24673024
tags question: http://stackoverflow.com/q/24669353
tags question: http://stackoverflow.com/q/24720782
tags question: http://stackoverflow.com/q/24618265
tags question: http://stackoverflow.com/q/24672959
tags question: http://stackoverflow.com/q/24660955
tags question: http://stackoverflow.com/q/24636080
tags question: http://stackoverflow.com/q/24646573
tags question: http://stackoverflow.com/q/24669489
type: Tag
tags question: http://stackoverflow.com/q/24704843
tags question: http://stackoverflow.com/q/24637846
tags question: http://stackoverflow.com/q/24660988
tags question: http://stackoverflow.com/q/24723467
tags question: http://stackoverflow.com/q/24596505
tags question: http://stackoverflow.com/q/24617735
tags question: http://stackoverflow.com/q/24641820
tags question: http://stackoverflow.com/q/24590536
tags question: http://stackoverflow.com/q/24694823
tags question: http://stackoverflow.com/q/24745982
tags question: http://stackoverflow.com/q/24602402
tags question: http://stackoverflow.com/q/24618882
tags question: http://stackoverflow.com/q/24688268
tags question: http://stackoverflow.com/q/24613836
tags question: http://stackoverflow.com/q/24686443
tags question: http://stackoverflow.com/q/24603580
tags question: http://stackoverflow.com/q/24650421
tags question: http://stackoverflow.com/q/24660102

http://stackoverflow.com/q/24744698
type: Question
has answer: http://stackoverflow.com/a/24744779
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24744870
score: 0
answer count: 2
has body: I have a form with multiple divs with same names (full-width). They all are on the same level. One of them is hidden (with a class hide). What I want is that if I select Submit, it should not submit, first hide all the brother divs of the hidden div (in this case full-width) and unhide the one with the class hide. Now when I press again, it should just submit the Form. JSFiddle is here:- http://jsfiddle.net/xmqvx/2/
has title: Show a Div first and then Submit on second click of button in a form
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24744870
type: AnsweredQuestion
tagged with: forms
possible better answer: http://stackoverflow.com/a/24744779

http://stackoverflow.com/a/24608011
has comment: http://stackoverflow.com/comment/38134115
type: AcceptedAnswer
has body: You can use margin css directly to get top, right, bottom and left margin respectively. var margin = jQuery("#widget-container").css("margin"); alert(margin); Demo Edit : Above jQuery may or may not work in firefox because if css property (margin in this case) not set in the css of element explicitly, it does not support shorthand css for that property. To achieve the same in firefox, we can do following workaround : var marginArray = ['Top','Right','Bottom','Left']; for(var i=0;i&lt;marginArray.length;i++) { alert(jQuery("#widget-container").css("margin"+marginArray[i])); } JSFiddle for Firefox
type: Answer
answers question: http://stackoverflow.com/q/24607898
has comment: http://stackoverflow.com/comment/38129746
accepted answer of: http://stackoverflow.com/q/24607898
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/38129479
has comment: http://stackoverflow.com/comment/38129779
downvote count: 1
has comment: http://stackoverflow.com/comment/38129648
has comment: http://stackoverflow.com/comment/38134510
has comment: http://stackoverflow.com/comment/38129458
has comment: http://stackoverflow.com/comment/38129965
has comment: http://stackoverflow.com/comment/38129568

http://stackoverflow.com/q/24748659
favorite count: 0
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/49702176
score: 1
has body: I've searched nearly every thread for 15-some hours and haven't found an answer to my problem. I'm using strictly Javascript to upload a photo to Facebook using form data. I decoded the base64 data from my JPEG image (originally svg -> canvas element), using this decode method (https://github.com/danguer/blog-examples/blob/master/js/base64-binary.js) and then converting it to a string in the form data format like https://gist.github.com/andyburke/1498758 (not using XMLHttpRequest). I then put that string as the "source" parameter in the post. I keep getting a "(#324) Requires upload file". It works perfectly if I just put in a url for the image. Can anybody help? Thanks! // The function to post the image: FB.api("/me/photos", "POST", { "source": window.image_source, "message": "...", "fileName": "..." }, function(response) { console.log(response.error); } }); // How I got the image_source: var img = canvas.toDataURL("image/jpeg"); var encoded = img.substring(img.indexOf(',')+1,img.length); var decoded = decode(encoded); convertToFormData(decoded); function convertToFormData(imageData) { var boundary = 'myboundary'; var formData = "Content-Type: multipart/form-data; boundary=" + boundary + '\r\n\r\n'; formData += '--' + boundary + '\r\n'; formData += 'Content-Disposition: form-data; name="source"; filename="' + "myfile" + '"\r\n'; for ( var i = 0; i &lt; imageData.length; ++i ) formData += String.fromCharCode(imageData[i] &amp; 0xff); formData += '\r\n'; formData += '--' + boundary + '\r\n'+ 'Content-Disposition: form-data; name="message"\r\n\r\n'; formData += "Description" + '\r\n'; formData += '--' + boundary + '--\r\n'; window.image_source = formData; } function decode(input) { var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var lkey1 = keyStr.indexOf(input.charAt(input.length-1)); var lkey2 = keyStr.indexOf(input.charAt(input.length-2)); var bytes = (input.length/4) * 3; if (lkey1 == 64) bytes--; if (lkey2 == 64) bytes--; var chr…
upvote count: 1
has comment: http://stackoverflow.com/comment/39307048
tagged with: photo
type: Question
has title: Facebook Javascript Form Data Photo Upload: requires upload file error
tagged with: javascript
tagged with: multipartform-data
answer count: 1
downvote count: 0
tagged with: facebook-graph-api

http://stackoverflow.com/q/24733166
downvote count: 0
has answer: http://stackoverflow.com/a/24734876
favorite count: 0
tagged with: download
has title: Spawn Download with Client Side Script
has answer: http://stackoverflow.com/a/26637101
has body: In an application that runs client-side, in browser, written in Javascript, you can use local storage to persist state. If the user requires the ability to extract their data from the client-side application, one option is posting the content to the server and having the server echo it back with the correct content-type and other headers to spawn a download operation. Is there any way to spawn such a download operation using purely client-side script, without posting the content to a server and echoing it back?
tagged with: client
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/26637101
tagged with: javascript
score: 4
accepted answer: http://stackoverflow.com/a/24734876
upvote count: 4
answer count: 2

http://stackoverflow.com/comment/38217143
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24636956
type: Comment
has text: @alex.pulver I'm using ASP.NET Web Pages. But I'm only looking to do this in HTML and Javascript.

http://stackoverflow.com/a/24718721
has comment: http://stackoverflow.com/comment/38341748
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Your code corrected Javascript var scrabble = function (letter) { var letterSplit = letter.toLowerCase().split(''), total = 0, values = [ ['a', 1], ['b', 3], ['c', 3], ['d', 2], ['e', 1], ['f', 4], ['g', 2], ['h', 4], ['i', 1], ['j', 8], ['k', 5], ['l', 1], ['m', 3], ['n', 1], ['o', 1], ['p', 3], ['q', 10], ['r', 1], ['s', 1], ['t', 1], ['u', 1], ['v', 4], ['w', 4], ['x', 8], ['y', 4], ['z', 10] ], i, j; for (i = 0; i &lt; letterSplit.length; i++) { for (j = 0; j &lt; values.length; j++) { if (values[j][0] === letterSplit[i]) { total += values[j][1]; break; } } } return total; }; console.log(scrabble('cat')); On jsFiddle
accepted answer of: http://stackoverflow.com/q/24718054
answers question: http://stackoverflow.com/q/24718054
type: Answer
upvote count: 1

http://stackoverflow.com/comment/38392740
score: 0
type: Comment
has text: thanks Casey, so do I need to add anything to the line of code: $('body').append(Mustache.render(this.template, data)); or do I just update the mustache tags in my template? Im confused around how the mustache lib knows I'm using custom delimiters?
type: AnswerComment
comment on: http://stackoverflow.com/a/24741888

http://stackoverflow.com/q/24662897
has answer: http://stackoverflow.com/a/24663217
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38234926
has answer: http://stackoverflow.com/a/24663241
has title: Touch-screen users have to click link twice for it to work
accepted answer: http://stackoverflow.com/a/24663217
has answer: http://stackoverflow.com/a/24662922
has comment: http://stackoverflow.com/comment/38234823
has answer: http://stackoverflow.com/a/36143509
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/24663241
tagged with: drop-down-menu
favorite count: 0
score: 6
tagged with: css
upvote count: 6
answer count: 4
type: AnsweredQuestion
has body: I have this drop-down menu that drops down on hover normally, but on touch devices, I simply made it so that you can click to open it as well. The problem is that it seems like the that drops down isn't completely in focus or something because I have to click the links twice on my iPhone 4 to make them work. Here's the code I'm working with: $(document).ready(function() { $('.myMenu > li').bind('mouseover', openSubMenu); $('.myMenu > li').bind('mouseout', closeSubMenu); $('.myMenu > li').bind('click', toggleSubMenu); /* Also tried, currently using: $('.myMenu > li').bind('tap', toggleSubMenu); */ function openSubMenu() { $(this).find('ul').addClass("hovered"); }; function closeSubMenu() { $(this).find('ul').removeClass("hovered"); }; function toggleSubMenu() { $(this).find('ul').toggleClass("hovered").focus(); }; }); The .focus() was the fix I tried adding. It didn't break the code but didn't fix it either. I know there are several things I can do to make it better for touch-devices, but for now, the click method is what I'm sticking with. By the way: .hovered{ opacity:1 !important; visibility: visible !important; } The HTML setup is basically s inside s like you would expect from a drop-down menu. If you for some reason want the markup just say so and I'll add it. EDIT: Here's the link to the website I'm working on: http://bok-it.underbakke.net EDIT: Some additional information you might find useful that I noticed just now. The first time I click the link, the CSS on that link acts like it's hovered (as : hover) when I click on the sub-link the first time the main link (the one I first clicked to show the dropdown) loses the state of hover. This is why I think this is a focus issue. EDIT: The HTML markup as requested: Framside Butikk Sand Sauda Nettbutikk IT Tjenester Driftsavtale ASP & VPS Overvåking Nettverk Support Fjernsupport Utskrift ASP RDP: Rycloud TeamViewer Host Kontakt Oss --------------SOLUTION-------------- EDIT: For people that are seeking the solutio…
linked to: http://stackoverflow.com/q/34539866
type: Question

http://stackoverflow.com/q/24686498
score: 0
has comment: http://stackoverflow.com/comment/38278230
tagged with: min
tagged with: function
tagged with: max
tagged with: arrays
answer count: 7
has comment: http://stackoverflow.com/comment/38278680
has comment: http://stackoverflow.com/comment/38279003
has comment: http://stackoverflow.com/comment/38278363
has answer: http://stackoverflow.com/a/24686694
has comment: http://stackoverflow.com/comment/38278884
has comment: http://stackoverflow.com/comment/38278404
has comment: http://stackoverflow.com/comment/38278323
has comment: http://stackoverflow.com/comment/38278295
has comment: http://stackoverflow.com/comment/38278430
possible better answer: http://stackoverflow.com/a/24686630
has comment: http://stackoverflow.com/comment/38279128
has comment: http://stackoverflow.com/comment/38278872
has title: Determine which array is lengthier JavaScript
has comment: http://stackoverflow.com/comment/38278321
has answer: http://stackoverflow.com/a/24686630
has body: SORRY I HAD TO CHANGE THE QUESTION I SCREWED UP. The purpose is to use the Math.max function to determine the lengthiest array. I needed to add an additional parameter to make it practical because everyone was using > instead of Math.max. I was writing this example to fast and didn't think of that. Is there an easier way to do this? The purpose is to be able to take many arguments (more than two) and find out which has a larger length. I'd like it to be dynamic, so It seems I need to give a name property to each array before passing them in. This is the only way to find an arrays name right? var arrayLogA = [8, 7, 5, 4, 6, 8, 0, 9, 4]; arrayLogA.name = 'arrayLogA'; var arrayLogB = [1, 5, 4, 6, 5, 9, 3, 2, 7, 3, 2] arrayLogB.name = 'arrayLogB'; var arrayLogC = [1, 6, 9, 3, 3, 7, 3, 2] arrayLogC.name = 'arrayLogC'; function returnLargestArray(a, b, C) { ... } returnLargestArray(arrayLogA, arrayLogB); ok, this is more practical, if I'm going to explain the Math.max function and also return the largest, I'm going to have to rethink the function. Sorry for any confusion. I typically write good questions but I think I rushed this one. Very sorry. I may need to pass additional parameters in. SO maybe I should not have used a, b, c as the arguments.
has answer: http://stackoverflow.com/a/24686617
has answer: http://stackoverflow.com/a/24686578
has comment: http://stackoverflow.com/comment/38278272
has answer: http://stackoverflow.com/a/24687204
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24686839
has answer: http://stackoverflow.com/a/24686651
has comment: http://stackoverflow.com/comment/38278838
accepted answer: http://stackoverflow.com/a/24687204
tagged with: javascript
has comment: http://stackoverflow.com/comment/38278341
has comment: http://stackoverflow.com/comment/38278277
has comment: http://stackoverflow.com/comment/38278471
type: Question
has comment: http://stackoverflow.com/comment/38278610

http://stackoverflow.com/a/35362249
score: 1
upvote count: 1
downvote count: 0
has body: For mobile devices, I would simply add a close button to the div and then use js to change the class as mentioned above: Note that I changed the leaflet source code here but it should be feasible externally as well. Add the following code before the line container.appendChild(form); in your leaflet source - tested with 0.7.7) if (L.Browser.android || L.Browser.mobile || L.Browser.touch || L.Browser.retina) { var yourCloseButton = this.yourCloseButton = L.DomUtil.create('div', className + '-close'); this.yourCloseButton = L.DomUtil.create('div', className + '-close', form); this.yourCloseButton.innerHTML = ' X '; L.DomEvent.on(this.yourCloseButton, 'click', this._collapse, this); } `Then position the button with css.
type: Answer
answers question: http://stackoverflow.com/q/24611937

http://stackoverflow.com/a/24674894
downvote count: 0
has body: Quick answer + explanation Your code was not working because you were using jQuery before the document had finished loading, always wrap your code either with: $(document).ready(function(){ //your code goes here } or: $(function(){ //your code goes here } Simply use as Rajaprabhu suggested: $(function(){ $('.start').hover(function(){ $('html').css('background-color','#676767') } ); }); Getting the color to animate The RHCP website however does not only change the color, but also animates this change. jQuery can not animate colors. You can solve this in two ways. One is to use a jQuery plugin, the other is to use CSS transitions. Plugin If you import a plugin like jQuery Color you can use: $(function(){ $('.start').hover(function(){ $('html').animate({backgroundColor: '#676767') } ); }); CSS Transitions Instead of having a plugin take care of the animation, you can also use CSS animations, which will take care of transitioning between changing color values. Use the original code: $(function(){ $('.start').hover(function(){ $('html').css('background-color','#676767') } ); }); And use the following CSS .start { -webkit-transition: background-color 0.3s ease-out; /* Android 2.1+, Chrome 1-25, iOS 3.2-6.1, Safari 3.2-6 */ transition: background-color 0.3s ease-out; /* Chrome 26, Firefox 16+, iOS 7+, IE 10+, Opera, Safari 6.1+ */ } PS: if you do use CSS transitions, do note IE 9 and below does not support CSS Transitions.
has comment: http://stackoverflow.com/comment/38258067
type: Answer
has comment: http://stackoverflow.com/comment/38257574
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/38256920
answers question: http://stackoverflow.com/q/24674381
has comment: http://stackoverflow.com/comment/38257136

http://stackoverflow.com/comment/38240311
type: QuestionComment
has text: That's what you're doing on the server side. What are you doing in the browser in the non-download case? What request are you sending up?
comment on: http://stackoverflow.com/q/24665881
score: 0
type: Comment

http://stackoverflow.com/comment/38283508
has text: Are you sure `var usernameBox function (){` is syntactically correct?
comment on: http://stackoverflow.com/q/24689407
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38298423
comment on: http://stackoverflow.com/q/24697343
score: 0
type: Comment
type: QuestionComment
has text: Then I guess you can use a [`css` binding](http://knockoutjs.com/documentation/css-binding.html)

http://stackoverflow.com/comment/60153628
score: 0
has text: See the OP's comment on the question: "the problem with that approach is that there is not a way to guarantee that the assertion will pass. In general terms, if the assertion does not pass, the function will throw an AssertionError."
type: Comment
comment on: http://stackoverflow.com/a/36262433
type: AnswerComment

http://stackoverflow.com/a/32744881
downvote count: 0
upvote count: 30
type: Answer
has body: This amazingly took me multiple days to track down what was going on, and only because I saw the one side-comment at the end of a bug report at Chromium bugtracker Issue 514303. Here's what's going on and how to fix it: There exists a concept called "LCD text", which I believe means subpixel antialiasing, i.e. "crisper sharper text". Unfortunately, this feature is mutually incompatible with compositor-accelerated scrolling. LCD text is enabled by default (at least on Blink/Webkit?) on all platforms which are not high-DPI (most normal monitors; i.e. you can check console.log(devicePixelRatio)). On the other hand, LCD text is DISABLED by default on high-DPI devices (think Retina display, or most mobile devices and tablets) since you don't really need a "crisper sharper text" feature on high-DPI platforms. Therefore the opposite is true for compositor-accelerated scrolling: it is only possible on high-DPI platform where LCD text is disabled. However, you can force compositor-accelerated scrolling on most monitors by promoting the overflow:scroll element to its own layer, by either adding will-change:transform to that element, or any hackish equivalent which will force the overflow element to be the parent of its own layer (such as transform:translateZ(0)). (Do note that vendor prefixes are being removed.) tl;dr: Chrome doesn't suppose both subpixel antialiasing AND gpu-assisted scrolling; pick one or the other. Subpixel antialiasing is the default pick on Chrome (except on cellphones and retina displays, because their text is so small you don't need the feature, so you won't notice this issue on those platforms). Override this by forcing the element into its own compositor Layer with will-change:transform (but note that maybe your text won't look crystal perfect).
score: 30
answers question: http://stackoverflow.com/q/24741502

http://stackoverflow.com/q/24635322
has comment: http://stackoverflow.com/comment/38182497
answer count: 1
tagged with: javascript
tagged with: express
has title: Sending two objects as response to a single GET request using Express and Node.js
tagged with: node.js
has body: I have the following piece of code - sendServer.get('/download',function(request,response){ var status="SELECT * from poetserver.download where status='0'"; console.log(status) connection.query(status,function(error,rows){ var toSend=rows[0].id response.sendfile('./testimages/'+toSend+'.PNG') // var details={"pictureId":toSend} // response.writeHead(200, { 'Content-Type': 'application/json' }); // response.send(JSON.stringify(details)); Essentially I, first, want to send a file as identified by toSend. The file is successfully sent using response.sendFile. But I also want to provide some identification of the file for the client for future responses. How do I send that too?
has comment: http://stackoverflow.com/comment/38182398
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24688718
linked to: http://stackoverflow.com/q/14886161
type: Question
tagged with: response
tagged with: get
score: 0

http://stackoverflow.com/a/24671364
has body: The js is simply gathering data and then being submitted with the form, from what i understand the sending of the form details including the hidden fields are then done server side with ruby
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24658248

http://stackoverflow.com/a/24619094
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38152108
has comment: http://stackoverflow.com/comment/38152570
has body: jsBin demo You can simply target the inputs $('form input').keypress(function (e) { if (e.which == 13) e.preventDefault(); // Don't misuse return false }); the textarea will go on with the enter key as usual Depends on the use-case. If you want to be sure nothing brakes use: $('form *:not(textarea)').keypress(function (e) { if (e.which == 13) e.preventDefault(); }); where * targets every children, and :not selector excludes the desired one. here's another example: $('form *').keypress(function (e) { if (e.which == 13 &amp;&amp; this.tagName!=="TEXTAREA") e.preventDefault(); });
has comment: http://stackoverflow.com/comment/38152128
type: Answer
has comment: http://stackoverflow.com/comment/38152345
has comment: http://stackoverflow.com/comment/38152021
has comment: http://stackoverflow.com/comment/38152448
has comment: http://stackoverflow.com/comment/38153728
upvote count: 1
has comment: http://stackoverflow.com/comment/38153102
answers question: http://stackoverflow.com/q/24619021
score: 1
has comment: http://stackoverflow.com/comment/38152157
has comment: http://stackoverflow.com/comment/38155377
accepted answer of: http://stackoverflow.com/q/24619021
has comment: http://stackoverflow.com/comment/38152239

http://stackoverflow.com/q/24701165
has comment: http://stackoverflow.com/comment/38305581
has comment: http://stackoverflow.com/comment/38305155
has comment: http://stackoverflow.com/comment/38428617
tagged with: javascript
has comment: http://stackoverflow.com/comment/38305283
score: 0
tagged with: jquery
has title: Bootstrap 3 Carousel selecting certain divs, a custom setup
has body: I have a tricky situation. I have content that is dynamically populated that I want to lay out in the Bootstrap 3 carousel. The catch is, out of that dynamic string, only 3/4s of it should go in the carousel. Here is a brief example <?php if ($imagePosition == 'left'): ?> Conent I don't want to be shown on the carousel I want this to be shown in the carousel <?php elseif ($imagePosition == "background"): ?> I want this to be shown in the carousel <?php elseif ($imagePosition == "right"): ?> I want this to be shown in the carousel Conent I don't want to be shown on the carousel <?php endif; ?> So the output could be Content I don't want to be shown on the carousel I want this to be shown in the carousel I want this to be shown in the carousel Conent I don't want to be shown on the carousel How can I get the Bootstrap carousel to just show the items that I want to show, for example, the ones with the class 'show'?
has comment: http://stackoverflow.com/comment/38430288
has comment: http://stackoverflow.com/comment/38430458
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38428685
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/38305628
answer count: 0
has comment: http://stackoverflow.com/comment/38420229
type: Question
has comment: http://stackoverflow.com/comment/38307714

http://stackoverflow.com/comment/38092341
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24588558
has text: Do I have to use `bar.call(this, event)` to emulate it properly?
score: 0

http://stackoverflow.com/q/24605764
linked to: http://stackoverflow.com/q/23667086
has answer: http://stackoverflow.com/a/24605915
has answer: http://stackoverflow.com/a/24605903
duplicate of: http://stackoverflow.com/q/23667086
tagged with: global-variables
type: Question
has comment: http://stackoverflow.com/comment/38125897
answer count: 2
has body: I have a program where I use a global variable in an anonymous function. If I print my variable before the end of the function it is ok it has a value, but after the function it is empty. This is my code, the global variable is "Mytree", it is just a parsin program of a csv file. Look at the end I do the 2 print. My question is : why the value of my variable is not saved, and how to save it. // My program : var Mytree = {}; // My global variable. d3.csv("data.csv", function (data) { // The anonymous function to parse the csv file /* -- Parsing du csv -- */ var dataTab = []; var j = 0; var exigence = ""; var root = "Systeme"; for (var i = 0; i &lt; data.length; i++) { if (data[i].Contrat !== "") { if (data[i].ExigenceContractuelle.split(".").length !== 1) { exigence = data[i].ExigenceContractuelle.split(".")[0]; if (exigence.split("_").length !== 1) { exigence = exigence.split("_")[0]; } } else if (data[i].ExigenceContractuelle.split("-").length !== 1) { exigence = data[i].ExigenceContractuelle.split("-")[0]; } else if (data[i].ExigenceContractuelle.split("_").lenght !== 1) { exigence = data[i].ExigenceContractuelle.split("_")[0]; } else { exigence = data[i].ExigenceContractuelle.split(".")[0]; } dataTab[j] = { name: data[i].ExigenceSystème, textExig: data[i].TexteExigence, validation: data[i].Validation, discution: data[i].Discution, SSSExig: data[i].LibelleTexte, team: root + "/" + exigence + "/" + data[i].ExigenceContractuelle }; j++; } } /* -- -- */ /* -- Tableau -&gt; Json Tree -- */ function fillTree(name, textExigTmp, SSSExigTmp, validation, discution, steps) { var current = null, existing = null, i = 0; for (var y = 0; y &lt; steps.length; y++) { if (y === 0) { if (!Mytree.children || typeof Mytree.children === 'undefined') { Mytree = { text: steps[y], textExig: textExigTmp, SSSExig: SSSExigTmp, leaf: false, children: [], open: false, discution: discution == "" ? 0 : discution, validation: validation == 1 ? true : false }; } current = Mytree.children; } else …
tagged with: anonymous-function
tagged with: javascript
has comment: http://stackoverflow.com/comment/38126054
tagged with: scope
has title: Global Variable JavaScript
score: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/38134119
score: 0
type: QuestionComment
has text: I have reported this bug. But as it is not possible to browse apple bugs, donno whether it is duplicate. It seems to be pretty straightforward issue. How come developers overlooked it.
type: Comment
comment on: http://stackoverflow.com/q/24609989

http://stackoverflow.com/a/24596270
has comment: http://stackoverflow.com/comment/38107569
has comment: http://stackoverflow.com/comment/38107320
has body: try changing this $(window).resize(checkWidth); to $window.on('resize', function() { checkWidth(); });
answers question: http://stackoverflow.com/q/24596239
has comment: http://stackoverflow.com/comment/38107845
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/38107464
has comment: http://stackoverflow.com/comment/38107209

http://stackoverflow.com/a/24726162
type: AcceptedAnswer
downvote count: 0
has body: Underscore's _.extend function copies all properties from the second to nth argument into the first argument and returns the first argument. So, var foo = _.extend(bar); does in fact nothing and foo === bar. There is no reason to do this. I can only assume that the developer thought that the function would return a copy of the destination object.
accepted answer of: http://stackoverflow.com/q/24726006
answers question: http://stackoverflow.com/q/24726006
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/24735210
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38371173
tagged with: jquery
has comment: http://stackoverflow.com/comment/38370906
has comment: http://stackoverflow.com/comment/38370972
has body: Im using iScroll to automatically scroll every time an input comes into focus. However, on android, the blue pointer stays frozen as document scrolls. So I need to unfocus from element, scroll, then focus again without calling handler. I have a function to listen for when all inputs and future inputs come into focus. this.inputFocusListener = function () { var self = this; $(document).on("focus", "input", this.bindFocusHandler.bind(this)); }, I use .bind(this) above to change the context of this as there are other methods in the parent I will call in the handler. Once in the handler, I want to unbind from the handler, then call blur() to unfocus from input element, I then automatically scroll up for down, then focus again after scroll but without calling handler: this.bindFocusHandler = function (e) { $(e.currentTarget).off('focus...'); $(e.currentTarget).blur(); ....scroll up/down... //now focus again on the input without calling handler $(e.currentTarget).focus(); }, But when I call focus again, I enter an infinte loop because I cannot unbind from the focus event for that element...
favorite count: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38370974
has comment: http://stackoverflow.com/comment/38371007
has comment: http://stackoverflow.com/comment/38370919
has title: Unbind from an event in a handler
has comment: http://stackoverflow.com/comment/38370838
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38370897
type: Question
has comment: http://stackoverflow.com/comment/38371319

http://stackoverflow.com/q/24720583
linked to: http://stackoverflow.com/q/1207008
has body: I'm doing a mobile site, and i need it to show screen as it always was in portrait orientation. Like Instagram app. works. How could i do this with codes ? if (window.orientation === 90 || window.orientation === -90) { window.orientation=0; }
linked to: http://stackoverflow.com/q/4806938
upvote count: 1
has comment: http://stackoverflow.com/comment/38344090
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38389992
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/24721161
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/3501510
duplicate of: http://stackoverflow.com/q/1207008
accepted answer: http://stackoverflow.com/a/24721161
has comment: http://stackoverflow.com/comment/38343106
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to make site show always in Portrait orientation?

http://stackoverflow.com/comment/38158639
type: Comment
has text: Please remove the "make angry" thing from your answer, it probably will only confuse the OP who hasn't really grasped the prototype concept. At least you'd need to state *why* this is wrong.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24622580

apache
tag name: apache
tags question: http://stackoverflow.com/q/24730129
tags question: http://stackoverflow.com/q/24653094
tags question: http://stackoverflow.com/q/24677445
type: Tag
tags question: http://stackoverflow.com/q/24714316
tags question: http://stackoverflow.com/q/24716516
tags question: http://stackoverflow.com/q/24665184

http://stackoverflow.com/comment/38444718
comment on: http://stackoverflow.com/a/24713207
score: 0
type: Comment
has text: I'm using InDesign CS6 v. 8.0; I edited my question to explain why your answer is actually correct, but I'd appreciate one more suggestion.
type: AnswerComment

http://stackoverflow.com/q/24711826
has title: How Insert Video with JWPlayer
has comment: http://stackoverflow.com/comment/38326118
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24712913
score: 1
has comment: http://stackoverflow.com/comment/38326944
has body: I Have this code: i have the link of the url in PHP... So, i use this code with a file.mp4 , but it doesn't work and tells me: File Not Found I see in source of other website, this code: <video src="<?php echo $link_en; ?>"> And it doesn't work, i wrong how i use it probably... How i can to see my file .mp4? There are other player ? so, i use JW6.9
upvote count: 1
has comment: http://stackoverflow.com/comment/38326390
type: Question
possible better answer: http://stackoverflow.com/a/24737630
has answer: http://stackoverflow.com/a/24737630
tagged with: javascript
has comment: http://stackoverflow.com/comment/38326165
accepted answer: http://stackoverflow.com/a/24712913
tagged with: jwplayer
answer count: 2
has comment: http://stackoverflow.com/comment/38326605
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/38166014
type: QuestionComment
comment on: http://stackoverflow.com/q/24626343
score: 0
has text: I'm pretty sure that if you search using your native language, you will also find out.
type: Comment

http://stackoverflow.com/comment/104550509
comment on: http://stackoverflow.com/a/24690917
score: 0
has text: Also, make sure to _not_ give your submit button a name attribute with value "submit" or javascript's `.submit()` won't work on the form element.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24613209
type: Answer
score: 2
answers question: http://stackoverflow.com/q/24613132
accepted answer of: http://stackoverflow.com/q/24613132
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: The term you are looking for is "carousel". Bootstrap has a pretty good carousel component built in, and I'm sure there are plenty of others.

http://stackoverflow.com/q/24675534
type: Question
upvote count: 2
has body: I'm building a record voice project and I want to upload the audio in a folder (upload) through a blob. this is what I have achieved so far: var url = URL.createObjectURL(blob); var li = document.createElement('li'); var au = document.createElement('audio'); var hf = document.createElement('a'); au.controls = true; au.src = url; hf.href = url; hf.download = 'audio_recording_' + new Date().getTime() + '.wav'; hf.innerHTML = hf.download; li.appendChild(au); li.appendChild(hf); fileName=hf.download; console.log(fileName); var data = new FormData(); data.append(url, blob); $.ajax({ url : "upload.php", type: 'POST', data: data, contentType: false, processData: false, success: function(data) { console.log(data); } }); and this is the php code for the ajax function (upload.php): &lt;?php $temp = explode(".", $_FILES["fileName"]["name"]); $extension = end($temp); $fileName=$_POST['fileName']; if ($_FILES["fileName"]["error"] &gt; 0) { console.log( "Return Code: " . $_FILES["fileName"]["error"] . "&lt;br&gt;"); } else { if (file_exists("upload/" . $_FILES["fileName"]["name"])) { console.log( $_FILES["fileName"]["name"] . " already exists. "); } else { move_uploaded_file($_FILES["fileName"]["tmp_name"], "upload/" . $_FILES["fileName"]["name"]); } } ?&gt; when debbuging the audio is not saved in the folder upload and the following error is obtained : Undefined index: fileName in upload.php what is going wrong with my code???please help
tagged with: php
has title: uploading an audio blob into a folder using ajax
tagged with: blob
tagged with: javascript
type: UnansweredQuestion
score: 2
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/44028502
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/24681907
tagged with: javascript
has answer: http://stackoverflow.com/a/24695550
accepted answer: http://stackoverflow.com/a/24695550
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24684219
possible better answer: http://stackoverflow.com/a/24684219
has title: How to pass data from cordova plugin to index.html in Android
tagged with: android
has body: I am creating cordova application witch are showing call logs, so i make plugin and i get calls log in native java code and i don`t know how to pass it back to index.html. this is my plugin javascript navigator.callslog= {}; navigator.callslog.show = function () { cordova.exec (null, null, "callslog", "show", []);}; And this is java code for my plugin @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { if (action.equals("show")) { // get call logs String calls = getCallDetails(callbackContext); callbackContext.success(); Log.v("Calls", calls); this.webView.postMessage("callsLog", "show"); } else { return false; } callbackContext.success(); return true; } And in index.js i call plugin and data was printed in logcat it works but i don`t know how to get the data and represent in index.html onDeviceReady: function() { app.receivedEvent('deviceready'); console.log('Recevedod event '); var callsLog= navigator.splashscreen.show(); } Thank you guys
tagged with: cordova
type: AnsweredQuestion
tagged with: java

http://stackoverflow.com/a/24726464
has comment: http://stackoverflow.com/comment/38358253
score: 2
downvote count: 0
has body: You can use an attribute selector in your CSS: article[data-color="#123456"] header { background-color: "#123456"; } article[data-color="#123456"] a { color: "#123456"; } However, this assumes you can enumerate the data-color attributes in your CSS. If it's generated dynamically and can take any value, you can't do it in CSS -- it doesn't have variables or back-references.
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/24726434
has comment: http://stackoverflow.com/comment/38355243

http://stackoverflow.com/a/24607967
has comment: http://stackoverflow.com/comment/38129472
has comment: http://stackoverflow.com/comment/38129492
has comment: http://stackoverflow.com/comment/38129493
has comment: http://stackoverflow.com/comment/38129580
type: Answer
score: -1
has comment: http://stackoverflow.com/comment/38129867
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/38129895
answers question: http://stackoverflow.com/q/24607898
has comment: http://stackoverflow.com/comment/38129791
has body: You can do something like this, var =$("#widget-container").css("margin").split(" "); The return value will be in the following order: top, right, bottom, left in an array. Fiddle
has comment: http://stackoverflow.com/comment/38130740

http://stackoverflow.com/comment/38541580
comment on: http://stackoverflow.com/q/24746102
score: 0
type: Comment
type: QuestionComment
has text: #sidenav { margin: -9999px; z-index: 1000; top: 40px; max-height: 85%; left: 3px; height: auto !important; position: relative; -moz-box-shadow: 0px 2px 20px #111; -webkit-box-shadow: 0px 2px 20px #111; box-shadow: 0px 2px 20px #111; border-radius: 0px !important; } #sidenav .LeftContentNav-clientinfo { display: none; } #sidenav .no-sidenav { display: none; }

http://stackoverflow.com/comment/38228494
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24659625
has text: "current selected object from the table" - how do you select something from the table? Are you trying to set the `object.member_id` for all `members` based on the ` ` changing? What you describe you want is confusing

http://stackoverflow.com/a/24788302
has body: This error has nothing to do with string buffer. It's caused by not having the module installed correctly. Double check to make sure the module is installed.
answers question: http://stackoverflow.com/q/24644946
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24644946
type: Answer

http://stackoverflow.com/comment/38224391
has text: why not put the gif in an image tag ` ` in the loading_dialog instead of putting it in your css?
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24657618

fonts
tags question: http://stackoverflow.com/q/24712110
type: Tag
tag name: fonts

http://stackoverflow.com/comment/38308535
type: AnswerComment
comment on: http://stackoverflow.com/a/24693307
type: Comment
has text: I have created a small fiddle for you http://jsfiddle.net/ckQ2U/ One filter deliberately capitalises every word. Second filter matches only if the value in the textbox matches the capitalised word (i.e. output of filter) - Like your modified date... If you provide fiddles, we can play with that, but I think this example should help you out with your issue. Hope this helps
score: 0

http://stackoverflow.com/comment/38312718
score: 0
has text: @APAD1 Thank you for the valuable insight! When I do that I can see that I'm creating particular options / buttons. But how do I add classes to the html created by the javascript? For example, when I create the option that contains "N/A", how do I incorporate a class into that?
type: QuestionComment
comment on: http://stackoverflow.com/q/24701888
type: Comment

http://stackoverflow.com/comment/38249481
type: QuestionComment
has text: Why did I get so many down votes? I know this might seem trivial to some but I think its a valid question.
comment on: http://stackoverflow.com/q/24671288
score: 0
type: Comment

http://stackoverflow.com/comment/38386014
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24731435
has text: Thanks for taking the time to look at my problem. You're right, animToggle is false on my test page, as the animation is not working. You can toggle it by clicking on the icon on the upper right. I'm looking for more inside the setTimeout. I display one overlay, and clear it after the 500ms, then move to the next image. At least, it is what i want to do ! ;-)

http://stackoverflow.com/a/24691840
answers question: http://stackoverflow.com/q/24691676
score: 0
has comment: http://stackoverflow.com/comment/38288180
type: Answer
has comment: http://stackoverflow.com/comment/38289118
has body: You need to localize the script first before enqueuing it, also you are currently localizing script-name whilst enqueueing my-script. Try this: function my_shortcode($atts) { extract(shortcode_atts(array( 'id'=&gt;'' ), $atts)); ob_start(); // Register the script first. wp_register_script( 'script-name', plugins_url( 'myplugin/js/example.js' ), array('jquery'), NULL, true); // Now localize it. wp_localize_script( 'script-name', 'MyAjax', array( 'ajaxurl' =&gt; admin_url( 'admin-ajax.php' ), 'security' =&gt; wp_create_nonce( 'my-special-string' ) )); // Now enqueue the script wp_enqueue_script( 'script-name') }
has comment: http://stackoverflow.com/comment/38288357

http://stackoverflow.com/comment/46696619
has text: @AlexPavlov Since which version? I was already using it for quite a while now.
type: AnswerComment
comment on: http://stackoverflow.com/a/24964658
score: 0
type: Comment

http://stackoverflow.com/a/24660993
has body: Add d3.event.preventDefault(); to your function. // draw rectangle svg.selectAll(".rect").append("rect") .attr("y", 10) .attr("x", 10) .attr("height", 5) .attr("width", 5) .on("contextmenu", function (d, i) { d3.event.preventDefault(); // react on right-clicking });
upvote count: 47
has comment: http://stackoverflow.com/comment/95286207
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24653471
answers question: http://stackoverflow.com/q/24653471
has comment: http://stackoverflow.com/comment/139994312
type: AcceptedAnswer
score: 47
type: Answer

http://stackoverflow.com/a/24626584
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/38166146
accepted answer of: http://stackoverflow.com/q/24626509
upvote count: 3
answers question: http://stackoverflow.com/q/24626509
score: 3
has comment: http://stackoverflow.com/comment/38166104
has comment: http://stackoverflow.com/comment/38166028
has comment: http://stackoverflow.com/comment/38166147
has body: This should do it: $("#pagebody").find('input[type=text],input[type=password],select') .filter(':visible:first').focus();

http://stackoverflow.com/a/24636430
has body: You could redirect direct from php file where you process your data. YOUR FORM CALL &lt;form method="post" action="&lt;?php echo $_SERVER['PHP_SELF'];?&gt;"&gt; PHP CODE //YOUR PROCESSSING CODE HERE header('Location: viewPost.php?id=' . $lastId ); It is important to keep in mind that header must be used if you have not use html tags, print, echo or any other function that write to DOM before use it, if not you wil get an error
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38191363
has comment: http://stackoverflow.com/comment/38191293
answers question: http://stackoverflow.com/q/24636142
has comment: http://stackoverflow.com/comment/38192369
upvote count: 1
type: Answer

http://stackoverflow.com/comment/38505729
comment on: http://stackoverflow.com/a/24799779
type: Comment
has text: I see now what you were asking for. Glad this worked.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38234477
has text: @JonathanKuhn can you provide an example as to how I would convert these times using the JS Date object? Edit: No if one ends at 1000 and something else starts at 1000 that is not considered an overlap.
score: 0
comment on: http://stackoverflow.com/q/24662735
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24657281
has body: I see two places where you used val instead of val(), you want to call the function val not access a non-existent val field if ($('#date').val() === 'December 25 - January 9') { // &lt;-- val() var startDates = $('#date').val().split(" - "); var year = $('year').val(); // &lt;-- val()
score: 1
answers question: http://stackoverflow.com/q/24657174
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/38117796
has text: Yeah, no. This does EXACTLY what I said it does.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24601553

http://stackoverflow.com/comment/38160534
has text: (I'm assuming 'deepfreeze' is power-off hibernation).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24623116

http://stackoverflow.com/comment/42249350
type: Comment
has text: Sorry to disappoint you but the author of the question left a pretty big piece of information out of the question. The author left a comment on an answer that has now been deleted that Actions cannot be used to perform HTML5 drag and drop operations. The evidence is in that blog post linked to in the article. (The deleted answer was essentially the same answer as you are giving now.)
comment on: http://stackoverflow.com/a/26841422
score: 0
type: AnswerComment

http://stackoverflow.com/q/24589969
has answer: http://stackoverflow.com/a/24590103
tagged with: function
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24590039
favorite count: 0
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/24590103
has title: Using arrays to store multiple IDs or classes, and then manipulating them in functions
has body: I have a set of classes stored in a JavaScript array called 'targets' as follows: HTML 1 2 3 4 5 6 7 8 9 10 JavaScript — Array var targets = ["#one", "#two", "#three", "#four", "#five", "#six", "#seven", "#eight", "#nine", "#ten"]; I would then like to manipulate them to use in functions. Depending on my situation, I'd either want to target one specific ID from the array, or all entries in the array at once. I do understand that each entry into an array is given a unique index number, starting with 0. Therefore, #one is index 0, and #ten is index 9. I also understand that I can use for loops with arrays, that will cycle through each entry. My issue is that I can't seem to get my function working when it is called from a click event (on an input type="button" element). Here are two examples of my code. One targets one specific entry, the other targets them all. Or at least, that is what it should be doing. Chrome's console shows no errors with my code, and I have never really worked with arrays, so this is a first for me. JavaScript — Attempting to Target a Single Entry (Working) $(targets[0]).addClass('hide').removeClass('show'); JavaScript - Attempting to Target All Entries I $(targets).each(function() { $(this).addClass('hide').removeClass('show'); }); JavaScript - Attempting to Target All Entries II targets.forEach(function() { $(targets).addClass('hide').removeClass('show'); }); JavaScript - Attempting to Target All Entries III var i; for ( i = 0; i < targets.length; ++i ) { $(targets).addClass('hide').removeClass('show'); } Also, I know that jQuery allows you to manipulate multiple classes and/or IDs at once by passing multiple values through the $() part of the code, but I'm in a predicament where the entries of the array will be different, depending on user input, and I feel that I will be manipulating in excess of 250 different IDs and classes in total. I've simply omitted the HTML code to the first 10 elements. The majority of the 250 IDs/classes, are locat…
has comment: http://stackoverflow.com/comment/38095309
upvote count: 1
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24590001
has answer: http://stackoverflow.com/a/24590001
type: Question
has comment: http://stackoverflow.com/comment/38095206

http://stackoverflow.com/comment/38372658
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24736089
has text: @BenFortune They are in the same folder as the html files and the node app. No separate folder.

http://stackoverflow.com/q/24588235
favorite count: 0
has comment: http://stackoverflow.com/comment/38092228
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38092649
has comment: http://stackoverflow.com/comment/38092826
has title: insert image into html on demand via javaScript
has comment: http://stackoverflow.com/comment/38093412
has comment: http://stackoverflow.com/comment/38163671
score: 1
has body: I have a html5-document that contains this element: &lt;div id="imgContainer"&gt;&lt;/div&gt; The document loads, the user logs in, and some new text gets loaded and successfully displayed via Ajax (using jQuery). After a while (when the user makes a click) a new image should be inserted into the imgContainer-div. I do this with this jQuery-command: $("#imgContainer").html('&lt;img src="newImage.png" alt=""&gt;'); The file newImage.png is located in the same directory as the html-file and the javaScript-file. But it does not appear in the browser-window. But it is correctly inserted into the source-code. I checked this with the developer-tools of my browser (safari). This tools don't report any error. But still the image is invisible. When I look into the list of resources I can see no newImage.png. Obviously the browser didn't load it. But why? The image appears in the browser-window when I enter its URL. So the browser is able to load it. But it does not when I modify the html-document. Why? Must I add some additional code to ma javaScript to tell the browser to load the image? If so: Can you tell me this code? Edit: try here: http://jsfiddle.net/YCs66/1/
accepted answer: http://stackoverflow.com/a/24589455
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38093418
has comment: http://stackoverflow.com/comment/38093360
has comment: http://stackoverflow.com/comment/38092378
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24589224
has comment: http://stackoverflow.com/comment/38104907
has comment: http://stackoverflow.com/comment/38093649
has answer: http://stackoverflow.com/a/24589224
has comment: http://stackoverflow.com/comment/38167372
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/24589455

http://stackoverflow.com/q/24655983
accepted answer: http://stackoverflow.com/a/24656650
tagged with: javascript
has comment: http://stackoverflow.com/comment/38223561
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/24656222
has comment: http://stackoverflow.com/comment/38221092
tagged with: ajax
possible better answer: http://stackoverflow.com/a/24656119
has comment: http://stackoverflow.com/comment/38222496
favorite count: 0
has comment: http://stackoverflow.com/comment/38224965
tagged with: php
has comment: http://stackoverflow.com/comment/38221808
answer count: 4
has answer: http://stackoverflow.com/a/24656119
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38221082
upvote count: 0
has comment: http://stackoverflow.com/comment/38221094
has body: I just come arround the corner with AJAX calls and trying to learn it. I have a form i am trying to push through an AJAX call, but getting a constant error it can't send, and I cant wrap my head arround it why it doesn't work. Form: Verstuur Bericht The Ajax Call $('form').bind('submit',function(){ $.ajax({ type : 'POST', url : 'inc/actions/sendmail.php', data : $(this).serialize(), cache : false, dataType: 'text', success : function (serverResponse) { alert('mail sent successfully.'); }, error : function (jqXHR, textStatus, errorThrown) {alert('error sending mail');} }); }) And the sendmail.php $name = mysqli_real_escape_string($con,$_POST["naam"]); $from = mysqli_real_escape_string($con,$_POST["email"]); $message = mysqli_real_escape_string($con,$_POST["bericht"]); $message = wordwrap($message, 70); $to = "example@myemail.nl"; $subject = "Een gebruiker heeft een vraag of opmerking"; $body = "Some messages and colloring, to much to paste cause it's inline-markup"; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $headers .= "From: noreply@ajaxfailure.nl"; if ($name == ''){ echo ' U heeft geen naam ingevuld '; }else if($from == ''){ echo ' U heeft geen emailadres achter gelaten '; }else if($body == ''){ echo ' U heeft geen bericht ingevuld niet ingevuld'; }else { if (mail ($to, $subject, $body, $headers)) { echo ' Uw bericht is verzonden. '; } else { echo ' Er is iets mis gegaan bij het verzenden van de data, probeer het opnieuw. '; } } Everytime it returns me the error alert from the AJAX call and doesnt execute anything. My console doesn't spot an error either and remains competely blank. I checked the console as per suggestion on the network tab and it doesnt even get on the page itself. There is no 404 error on that part. It seems the request gets canceled.
downvote count: 1
has title: AJAX call not being executed
type: Question
has answer: http://stackoverflow.com/a/24656203
has answer: http://stackoverflow.com/a/24656650

http://stackoverflow.com/a/24602709
has comment: http://stackoverflow.com/comment/38120152
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24602615
has body: Do not do it. My counsel is to use ajax to load the php file that will make a query asking only for the user that was typed in the input and retunr only a boolean value(exists=true / notexists=false) Code example: HTML(yourFile.html): PHP(path/to/file.php): <?php $username = $_REQUEST['username']; // The value from the input $res = mysqli_query("SELECT id FROM users WHERE username='".$username."'"); // asking only for the username inserted $resArr = mysqli_fetch_array($res); //verify if the result array from mysql query is empty.(if yes, returns false, else, returns true) if(empty($resArr)){ echo false; } else{ echo true; } ?>

http://stackoverflow.com/q/24630612
tagged with: ajax
accepted answer: http://stackoverflow.com/a/24630665
has body: I am trying to create a messages widget that opens a message when the user clicks on its div and that gets refreshed every 30 seconds. The problem is that after the widget gets refreshed the click functionality stops working. I am guessing that it has to do with the fact that the new elements added were not present when the click was set. And I tested it with firebug, if I run the script after the reload it works until the next refresh. Does anyone know what is the proper way of resetting something like that after an ajax call? I include my coffeescript code below: refreshPartial = -&gt; $.ajax url: "refresh-messages-feed" $(document).ready -&gt; myElem = document.getElementById("messagesFeed") setInterval refreshPartial, 30000 if myElem? $(".conversation").click -&gt; url = "/conversations/small/" + $(this).attr("id") console.log url $.ajax url: url cache: false success: (html) -&gt; $("#conversation").html html
duplicate of: http://stackoverflow.com/q/16062899
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38176286
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24630665
score: 1
has title: click function not working after ajax call replaces contents of the page
tagged with: coffeescript
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/16062899

http://stackoverflow.com/q/24720971
downvote count: 0
score: 1
tagged with: jquery
has body: Hi I'm trying to use summernote but it won't fully load. i have link all scripts and styles what it need. then i use JS of summernote and there is my html and after that i get this http://screenshot.cz/WO3ZQ/ i have no icons here. But everything works but it looks horrible. I was trying to found solution and i found if I'm using bootstrap icons, i put them into and summernote use tag. Maybe it is the problem. I don't know.
has answer: http://stackoverflow.com/a/24721162
favorite count: 0
tagged with: summernote
possible better answer: http://stackoverflow.com/a/27415153
has answer: http://stackoverflow.com/a/27415153
type: AnsweredQuestion
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/24721162
upvote count: 1
has comment: http://stackoverflow.com/comment/38343834
has comment: http://stackoverflow.com/comment/38344046
type: Question
has title: Summernote won't fully load
tagged with: javascript
answer count: 2

http://stackoverflow.com/a/24714263
upvote count: 1
has body: The problem comes from the fact that when you delete a row inside a table (not the last one) you have a gap in ids. getElementById will return null and your total function will raise an exception. Add 3 products: idx is 3, ids in the DOM are 0, 1, 2; Remove product 1: idx is 2, ids in the DOM are 0, 2; => total will throw for i == 1 Actually you can avoid looping through ids by assigning a class to your inputs. Demo. function total() { var total = 0, prices = document.querySelectorAll('.price'), quantities = document.querySelectorAll('.quantity'), i = 0, len = prices.length; for(; i &lt; len; i++) { total += prices[i].value*quantities[i].value; } document.getElementById('total').value = total; }
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/24714164
accepted answer of: http://stackoverflow.com/q/24714164
type: Answer

http://stackoverflow.com/comment/38117766
has text: `filter()` should really return a function. See example filter in docs tutorrial here https://docs.angularjs.org/tutorial/step_09
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24601551

http://stackoverflow.com/q/24619002
favorite count: 0
has comment: http://stackoverflow.com/comment/38152756
type: Question
has comment: http://stackoverflow.com/comment/38152030
has body: I have made elements using this function: var counterUpload = 1; var limit = 20; function addUpload(divName){ if (counterUpload == limit) { alert("You have reached the limit of adding " + counterUpload + " inputs"); } else { var newdiv = document.createElement('p'); newdiv.innerHTML = " Offences: * " document.getElementById(divName).appendChild(newdiv); counterUpload++; } } here is my html Add New: Offences: * divName takes ro5 as argument this is what i have tried so far: function removeUpload(divName){ if (limit==counterUpload) { alert("You have reached the limit of removing " + counterUpload + " inputs"); } else { var newdiv = document.removeElement('p'); if( newdiv.innerHTML = " Offences: * "){ document.getElementById(divName).removeChild(newdiv);} counterUpload--; } } from the two answers so far, i have managed to come up with this but still it doesnot get the job done,i feel very close yet far: function removeUpload(divName) { // Find the parent element var parent = document.getElementById(divName); if (parent) { // Find all the child nodes in parent element var children = parent.getElementsByTagName("P"); var num=count(children); for(i = num; i >2 ; i--){ //i gave the P elements to remove an id="paraE" so that i do not remove other P elements //with out this id if( children[i].getAttribute('id') == 'paraE'){ parent.removeChild(children[i]); } } } how can I delete the elements?how can I reverse this function to do the opposite work???
has answer: http://stackoverflow.com/a/24619105
has comment: http://stackoverflow.com/comment/38152597
score: 0
has comment: http://stackoverflow.com/comment/38151695
answer count: 3
has comment: http://stackoverflow.com/comment/38153964
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38154121
has answer: http://stackoverflow.com/a/24619401
has title: removing dynamically created elements
has answer: http://stackoverflow.com/a/24621764
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38151983
has comment: http://stackoverflow.com/comment/38151874
linked to: http://stackoverflow.com/q/3387427
has comment: http://stackoverflow.com/comment/38152290
has comment: http://stackoverflow.com/comment/38154088
has comment: http://stackoverflow.com/comment/38152407

http://stackoverflow.com/a/24689471
answers question: http://stackoverflow.com/q/24689408
score: 0
type: AcceptedAnswer
type: Answer
has body: if Sat May 12 2012 00:00:00 GMT+1000 (EST) is a string, you can just use a string function: var myDateString = "Sat May 12 2012 00:00:00 GMT+1000 (EST)"; var shorterDateStrng = myDateString.slice(0,myDateString.indexOf(":")-2); //If this is in .gs code Logger.log('shorterDateStrng: ' + shorterDateStrng ); Apps Script uses JavaScript.
accepted answer of: http://stackoverflow.com/q/24689408

http://stackoverflow.com/a/24626456
score: 0
answers question: http://stackoverflow.com/q/24626070
type: Answer
has body: Your issue is that you're putting your array-of-arrays into a variable Array, but then looping over Array1: From your fiddle: var Array = [] var Array1=[] var Array2=[] Array1.push(1.1) // you're looping over this one Array1.push(2.1) Array2.push(1.2) Array2.push(1.2) Array.push(Array1) // but they're in here Array.push(Array1) // and this one should be pushing `Array2` Here is your fiddle, updated to work: http://jsfiddle.net/gkVyC/2/

http://stackoverflow.com/q/24684853
tagged with: asp.net
has answer: http://stackoverflow.com/a/24685127
has body: I am trying to show a warning message if the users select Yes from the radio button. My issue is that the warning message is only showing Yes but i would like to show Yes and No so the user can select either of them. When they select Yes then i am deleting some records but all that is being done in the code behind. What am i doing wrong here? &lt;div&gt; &lt;asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"&gt; &lt;asp:ListItem Value="0"&gt;Yes&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="1" Selected="True"&gt;No&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; &lt;/div&gt; here is the javascript &lt;script type="text/javascript"&gt; var selectlistId = document.getElementsByName('&lt;%= RadioButtonList1.ClientID %&gt;'); selectlist = document.getElementByid(selectlistId); selectlist.onchange = function () { if (selectlist.options[selectlist.selectedIndex].value == "YES") { if (confirm("Are you sure you want to delete?")) { __doPostBack(selectlistId, ''); } else { // User selected NO, so change DropDownList back to 0. selectlist.selectedIndex = 0; } } }; &lt;/script&gt;
accepted answer: http://stackoverflow.com/a/24685086
has comment: http://stackoverflow.com/comment/38276251
has comment: http://stackoverflow.com/comment/38275179
type: AnsweredQuestion
has title: Use JavaScript to show warning message
has answer: http://stackoverflow.com/a/24685018
score: 0
type: Question
possible better answer: http://stackoverflow.com/a/24685018
tagged with: javascript
tagged with: jquery
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24685086
has comment: http://stackoverflow.com/comment/38275358

http://stackoverflow.com/comment/38152869
type: Comment
score: 0
has text: I would need more information on what exactly your doing in the browser, but if you go over the following getting started sections you should be able to draw your own conclusions: http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr
type: AnswerComment
comment on: http://stackoverflow.com/a/24618854

http://stackoverflow.com/comment/38355234
comment on: http://stackoverflow.com/q/24726672
score: 0
type: Comment
type: QuestionComment
has text: Posted an answer on the question that this is marked a duplicate of. http://stackoverflow.com/a/24726977/592253

http://stackoverflow.com/comment/38140852
has text: I set the env file with the diferent envs, one of them its localhost:8000
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24610046

http://stackoverflow.com/comment/38117880
score: 1
comment on: http://stackoverflow.com/q/24601553
has text: I think what @KarolyHorvath is referring to is that you're describing a pattern of iteration, but implementing a pattern based on value exclusion. It's like saying I've invented a time machine that takes you forward in time exactly 5 minutes. Just step into the machine and then come out in 5 minutes, and you'll be in the future. Technically true, but doesn't really live up to the description.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/24595808
type: Answer
answers question: http://stackoverflow.com/q/24594870
has body: To expand a little on the demo I posted in the comments earlier: This uses a method very similar to @tilwin-joy, so I guess we were of like mindedness. There are a couple of small differences that I would point out: jQuery: $('button').on('click', function () { var button = $(this); var target = button.data('target'); button.prop('disabled', true).siblings().prop('disabled', false); $(target).show('slow').siblings().hide(); }); This uses siblings to hide the other content (one less pass at the DOM). I suggest just setting your data value with the id hash in the markup, I think it's a bit clearer to read and follow (IMHO) in both the script and markup. This script also sets the current button to be disabled when clicked. The benefit of this is that you can use the disabled property to style up your buttons, and even if you don't style them it gives a visual cue to the user as to which tab content is currently displayed. Check out the demo to see how this can be used for styling purposes. HTML: (I stripped some of the unneeded ids from what you described as your markup). Content 1 Content 2 Content 3 Content 4 Content 5 This is the content of tabs1. This is the content of tabs2. This is the content of tabs3. This is the content of tabs4. This is the content of tabs5. CSS: Not needed - just to give you an idea of how you can style the elements to look like tabs. /*This sets all but the first tab to hidden when the page is loaded*/ .maintab>div:not(:first-child) { display: none; } /*The rest is just to style the elements to look like tabs*/ body { background-color: #eaeaea; } .maintab, .tabhead { text-align: center; margin:0 20px; font-family: sans-serif; } .maintab { border: 1px solid #1e90ff; border-top: none; padding-top: 20px; background-color: #fff; } .tabhead { border-bottom: 1px solid #1e90ff; position: relative; margin-top: 20px; } button { background-color: #ccc; padding: 10px; border: 1px solid #999; border-bottom: none; -webkit-border-top-left-radius: 4px; -w…
score: 0

http://stackoverflow.com/q/24611981
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/24612087
favorite count: 0
downvote count: 6
has title: html div percentage - not accurate?
upvote count: 1
answer count: 1
tagged with: responsive-design
has body: If i have a div 100px x 100px. And i define 10x child divs that should fit next to each other with 10px x 10px. Why do they not? try it with your browser: http://dwaves.de/prozentuale-angaben-check.html Statisches Layout
has comment: http://stackoverflow.com/comment/38138632
has answer: http://stackoverflow.com/a/24612087
has comment: http://stackoverflow.com/comment/38137785
has comment: http://stackoverflow.com/comment/38137796
type: AnsweredQuestion
score: -5
tagged with: javascript
tagged with: jquery
type: Question

testing
tags question: http://stackoverflow.com/q/24702288
tags question: http://stackoverflow.com/q/24634832
tag name: testing
tags question: http://stackoverflow.com/q/24742712
tags question: http://stackoverflow.com/q/24614768
tags question: http://stackoverflow.com/q/24676048
type: Tag
tags question: http://stackoverflow.com/q/24679130

http://stackoverflow.com/comment/38209292
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24649404
type: AnswerComment
has text: @PaoloRossi glad to help you friend

http://stackoverflow.com/q/24687829
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: angularjs
tagged with: animation
has comment: http://stackoverflow.com/comment/38281149
tagged with: css
has comment: http://stackoverflow.com/comment/38280597
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38288079
has comment: http://stackoverflow.com/comment/38281025
has comment: http://stackoverflow.com/comment/38280677
has comment: http://stackoverflow.com/comment/38280692
upvote count: 1
downvote count: 1
type: Question
has body: I have created this pulnker. Both enter an leave animation are not working well... The enter- first appears and then animation kicks in. The leave- just wont animate. Here is the style: div.ng-enter { -webkit-animation: bounceIn 2s; animation: bounceIn 2s; } div.ng-leave { -webkit-animation: bounceOut 2s; animation: bounceOut 2s; } And here is the element node: asdasdas Any help would be appreciated!
has comment: http://stackoverflow.com/comment/38280777
linked to: http://stackoverflow.com/q/24686950
tagged with: javascript
has answer: http://stackoverflow.com/a/24687955
accepted answer: http://stackoverflow.com/a/24687955
has title: ng-show animation works not as expected
score: 0

http://stackoverflow.com/comment/38114841
type: QuestionComment
has text: Maybe you are confusing something here: Whenever `touchmove` is triggered, you get a new `event` object.
score: 0
comment on: http://stackoverflow.com/q/24600219
type: Comment

http://stackoverflow.com/comment/38232224
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24655404
type: Comment
has text: andrew, please check my last line in chat

http://stackoverflow.com/q/24709178
has answer: http://stackoverflow.com/a/24709204
accepted answer: http://stackoverflow.com/a/24709199
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38321151
possible better answer: http://stackoverflow.com/a/24709204
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/24709199
type: AnsweredQuestion
has title: Sliding text with div
has body: So I have a dropdown thingy. You click on the 'Click Me' text and it'll show. Here's a demo to it http://jsfiddle.net/QzLst/ Now here's the issue. The blue text on the right, shows even when I placed it in the div that slides up and down. I'm not really sure where to go from here. Here's my markup Some text Click me And the CSS .search{ width: 100%; background: #000; box-shadow: 0 1px 1px rgba(0,0,0,.1); z-index: 200; height:0; transition: 0.5s; } .toggle{ height:100px; } .text{ color: #009dff; float: right; } The demo will help you understand what I mean. All I want is the text to slide with the div named search. So when search closes, basically I guess text would also close
type: Question

http://stackoverflow.com/a/24737933
accepted answer of: http://stackoverflow.com/q/24737789
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24737789
downvote count: 1
type: Answer
upvote count: 0
score: -1
has body: http://jsbin.com/sirodego/1/edit $('#toggle').toggle(function(){ $(this).animate({ width: "150", height: "150", }, 1000); },function(){ $(this).animate({ width: "77", height: "77", }, 1000); }); This works fine, for the first condition which would be either to hide or show which would be the first animate, then do the opposite which would be the second animate. If you need it to do more please let me know. My fiddle shows what is going on for you.

http://stackoverflow.com/a/24601494
type: Answer
answers question: http://stackoverflow.com/q/24601439
score: 0
has body: For something as long as 15 minutes, I wouldn't even use web sockets for this. 15 minutes is a long time and there's really no telling what the user is going to be doing in the meantime. A disconnected notification process is probably going to be more reliable in this case. Consider something like: User initiates process, whereby a record is stored in the database "queueing" the process to take place. User is immediately presented with a page indicating that the process has been queued and that they can continue to use the application. A separate application which runs periodically (every minute? every few minutes?) checks for "queued" processes in the database, updates their status to "in-progress" (so subsequent runs don't also pick up the same records), and processes them. As each process completes, it's either removed from the database or updated to a "completed" status. The user is otherwise notified that the process is complete. This final notification can be done a number of ways. An email can be sent to the user, for example. Or consider a user experience similar to the Facebook notification bar. Each page in the website can check for "completed" processes when the page loads and present a "notification" in the UI which directs the user to the result of the process. If users spend a lot of time on any given page then this would be a good place to use web sockets or long polling via JavaScript to keep checking for completed processes. The main thing is to separate the user interface from the long-running process. Web applications by design aren't suited for processes which run for that long. By separating the concerns the web application can focus just on the user interface and the command-line application can focus on the processing. (As an added bonus, this would prevent users from over-loading the server with too many concurrent processes. The command-line application can just run one record at a time, so too many concurrent processes just slows down the r…

http://stackoverflow.com/a/24601968
has comment: http://stackoverflow.com/comment/38167133
answers question: http://stackoverflow.com/q/24597246
upvote count: 1
has comment: http://stackoverflow.com/comment/38195029
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38167557
has body: Where does the p5-content element land in your hierarchy? If the &lt;form&gt; is a child element of p5-content, then your original form (which you assigned a submit handler to) will be replaced with a new, identical &lt;form&gt;, which does not have any submit handler tied to it. That would explain why it is posting the entire page, since e.preventDefault(); is no longer getting called. To fix this, find a way to NOT replace the entire &lt;form&gt; with your ajax call. This is better anyways because it means you are sending less data with every ajax postback. Alternatively, if you really must replace the entire &lt;form&gt;, re-add the submit event handler at the end of the ajax callback. As for why your script doesn't work in the &lt;head&gt;, it may be because your script is running before jQuery is included (I'm not sure where you are including jQuery). Since the HTML parser will block while it is waiting for scripts to load, you probably want to load all your scripts at the end of the &lt;body&gt;, anyways, to make your content load faster. You can also use the async attribute as described in this post, but this won't guarantee that your scripts will load in the right order, so I wouldn't recommend it in your case. Or, if you really care about optimizing your load time and want to put in some work, have a look at this article.
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24597246
has comment: http://stackoverflow.com/comment/38169508

http://stackoverflow.com/comment/38255589
has text: Wow! *Label* seems to work as expected. Would you happen to know why the *top* attribute isn't quite proportionate? Even setting it to 1px pushes it all the way to the bottom. And again, thank you.
comment on: http://stackoverflow.com/a/24659921
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24671577
has comment: http://stackoverflow.com/comment/68949986
score: 6
has body: You could approach is slightly differently: templatize your index.html and use the gulp-template plugin to process the template in your build: var template = require('gulp-template'); //production task gulp.task('prod', function () { return gulp.src('src/index.html').pipe(template({ scripts : [] })).pipe(gulp.dest('dist')); }); //dev task gulp.task('prod', function () { return gulp.src('src/index.html').pipe(template({ scripts : ['angular-mocks/angular-mocks.js', 'server.js'] })).pipe(gulp.dest('dist')); }); and your index.html could be turned into a template like so: &lt;% _.forEach(scripts, function(name) { %&gt;&lt;script src="&lt;%- name %&gt;" type="text/javascript"&gt;&lt;/script&gt;&lt;% }); %&gt; Of course you could write your own plugin / pass-through stream that removes scripts from your index.html but it would require actual parsing / re-writing of the index.html. personally I find the template-based solution easier to put in place and more "elegant".
upvote count: 6
answers question: http://stackoverflow.com/q/24671202
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38188303
type: Comment
comment on: http://stackoverflow.com/q/24638374
has text: you'll need to figure out which item is undefined.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38126584
type: Comment
has text: @SverkerSbrg unfortunately not. Annoyingly it only accepts individual arguments. http://api.jquery.com/jQuery.when/ You could extend it if required.
type: AnswerComment
comment on: http://stackoverflow.com/a/24606061
score: 0

http://stackoverflow.com/comment/38193964
comment on: http://stackoverflow.com/q/24641427
score: 0
type: Comment
type: QuestionComment
has text: use `window["cache"] === undefined` instead of `typeof`

http://stackoverflow.com/a/24686540
has body: The size is smaller than the content because of compression, probably gzip. Gzip is regularly used with http to make text resources faster to load. Most web servers support gzip compression. Look at the documentation for your web server to find out how to turn it on.
accepted answer of: http://stackoverflow.com/q/24686212
has comment: http://stackoverflow.com/comment/38278324
answers question: http://stackoverflow.com/q/24686212
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38278378
type: Answer
has comment: http://stackoverflow.com/comment/38278286
downvote count: 0
score: 1

http://stackoverflow.com/q/24671343
score: 0
accepted answer: http://stackoverflow.com/a/24672937
has body: i have visualization with x as userId and y as dates. for each user i have bubbles that represent some thing with the radius and the color, because i have some dificullt to show 243 users i added range slider of the users to show maximum 30 users at the time. examples for lines: 1362499,"Orange Revolution",12.217.127.27,"2004-11-26 01:08:34",62,f;h;m,AR,33.7500,4 1362499,"Orange Revolution",12.217.127.27,"2004-11-26 02:46:55",3,f,AR,33.7500,4 1362499,"Orange Revolution",12.217.127.27,"2004-11-26 02:48:16",59,b;m,AR,33.7500,4 1362499,"Orange Revolution",12.217.127.27,"2004-11-26 02:49:00",11,h,AR,33.7500,4 1362499,"Orange Revolution",82.82.89.4,"2004-11-26 18:20:14",73,b,AR,73.0000,1 1362499,"Orange Revolution",4.5.76.105,"2004-11-26 19:25:02",6,k;m,AR,6.0000,1 1362499,"Orange Revolution",193.219.28.144,"2004-11-26 21:18:32",68,c;k;m,AR,68.0000,1 1362499,"Orange Revolution",Adamahill,"2004-11-26 22:33:54",4,f,AR,4.0000,1 1362499,"Orange Revolution",Andris,"2004-11-27 00:41:39",1,m,AR,1.0000,1 1362499,"Orange Revolution",159753,"2004-11-27 13:12:26",89,b;m,AR,89.0000,1 1362499,"Orange Revolution",82.160.33.130,"2004-11-27 13:20:15",27,b;c,AR,27.0000,1 1362499,"Orange Revolution",213.164.241.16,"2004-11-27 16:34:16",33,b;c,AR,33.0000,1 1362499,"Orange Revolution",12.39.93.63,"2004-11-27 18:35:49",43,m,AR,43.0000,1 1362499,"Orange Revolution",AlexanderWinston,"2004-11-27 19:42:22",4,f,AR,4.0000,1 1362499,"Orange Revolution",130.15.162.58,"2004-11-27 23:27:28",14,c;f,AR,14.0000,1 1362499,"Orange Revolution",68.20.24.73,"2004-11-28 05:33:51",1,m,AR,1.0000,1 1362499,"Orange Revolution",63.193.101.81,"2004-11-29 03:36:08",135,a;c,AR,207.0000,6 1362499,"Orange Revolution",167.202.196.72,"2004-11-29 09:40:54",24,b;c,AR,24.0000,1 1362499,"Orange Revolution",212.76.39.9,"2004-12-02 17:15:59",13,c;m,AR,13.0000,1 1362499,"Orange Revolution",63.193.101.81,"2004-12-02 19:03:06",256,a;c;g,AR,207.0000,6 1362499,"Orange Revolution",63.193.101.81,"2004-12-02 19:03:35",1,f,AR,207.0000,6…
tagged with: javascript
type: AnsweredQuestion
type: Question
tagged with: d3.js
tagged with: data-visualization
has title: Filtering and Ordering in dimplejs visualization
has answer: http://stackoverflow.com/a/24672937
answer count: 1
tagged with: dimple.js

http://stackoverflow.com/comment/38367902
score: 0
type: Comment
type: QuestionComment
has text: I meant the html code <inputt type="text" .... />
comment on: http://stackoverflow.com/q/24733518

function
tags question: http://stackoverflow.com/q/24623697
tags question: http://stackoverflow.com/q/24596511
tags question: http://stackoverflow.com/q/24686987
tag name: function
tags question: http://stackoverflow.com/q/24619636
tags question: http://stackoverflow.com/q/24616024
tags question: http://stackoverflow.com/q/24748109
tags question: http://stackoverflow.com/q/24746405
tags question: http://stackoverflow.com/q/24698106
tags question: http://stackoverflow.com/q/24641150
tags question: http://stackoverflow.com/q/24714221
tags question: http://stackoverflow.com/q/24686498
tags question: http://stackoverflow.com/q/24669370
tags question: http://stackoverflow.com/q/24621877
tags question: http://stackoverflow.com/q/24595971
tags question: http://stackoverflow.com/q/24658723
tags question: http://stackoverflow.com/q/24722530
tags question: http://stackoverflow.com/q/24698633
tags question: http://stackoverflow.com/q/24701929
tags question: http://stackoverflow.com/q/24656679
tags question: http://stackoverflow.com/q/24704373
tags question: http://stackoverflow.com/q/24596671
tags question: http://stackoverflow.com/q/24731314
tags question: http://stackoverflow.com/q/24697713
type: Tag
tags question: http://stackoverflow.com/q/24697006
tags question: http://stackoverflow.com/q/24746274
tags question: http://stackoverflow.com/q/24646322
tags question: http://stackoverflow.com/q/24688806
tags question: http://stackoverflow.com/q/24700144
tags question: http://stackoverflow.com/q/24594662
tags question: http://stackoverflow.com/q/24657120
tags question: http://stackoverflow.com/q/24708849
tags question: http://stackoverflow.com/q/24726269
tags question: http://stackoverflow.com/q/24715896
tags question: http://stackoverflow.com/q/24663048
tags question: http://stackoverflow.com/q/24728433
tags question: http://stackoverflow.com/q/24663719
tags question: http://stackoverflow.com/q/24657162
tags question: http://stackoverflow.com/q/24589698
tags question: http://stackoverflow.com/q/24688535
tags question: http://stackoverflow.com/q/24679130
tags question: http://stackoverflow.com/q/24719725
tags question: http://stackoverflow.com/q/24589969
tags question: http://stackoverflow.com/q/24688146
tags question: http://stackoverflow.com/q/24616463
tags question: http://stackoverflow.com/q/24591588
tags question: http://stackoverflow.com/q/24679495

http://stackoverflow.com/comment/38263023
comment on: http://stackoverflow.com/q/24677113
score: 0
type: Comment
type: QuestionComment
has text: Interesting, thanks for the links!

http://stackoverflow.com/q/24660973
accepted answer: http://stackoverflow.com/a/24743724
linked to: http://stackoverflow.com/q/15792498
has comment: http://stackoverflow.com/comment/38230716
has comment: http://stackoverflow.com/comment/38232049
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38230648
answer count: 1
favorite count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/5871640
has comment: http://stackoverflow.com/comment/38230861
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/38230902
has comment: http://stackoverflow.com/comment/38231932
has body: I am coding a cesium app and I would like to call an internal cesium function that clears all primitives: function clearAll() { primitives.removeAll(); } when i do a button press. I know about cesium's built in toolbar buttons but I would like to use an html button I already have in place to call this function on click. It's located in: &lt;script&gt; require(['Cesium'], function(Cesium) { function clearAll() { //code here} }); &lt;/script&gt; Any help would be appreciated!
type: Question
has comment: http://stackoverflow.com/comment/38230574
tagged with: cesiumjs
has answer: http://stackoverflow.com/a/24743724
downvote count: 0
has title: Calling an internal Cesium function from outside the script
tagged with: javascript

http://stackoverflow.com/comment/38199159
type: Comment
comment on: http://stackoverflow.com/a/24644119
has text: Wow, thanks to this answer, finally I'm a trusted user! @Joshuasm32 You can try `toggle` instead of `add`: [**Demo**](http://jsfiddle.net/zM7KU/2/).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38162585
comment on: http://stackoverflow.com/a/24615063
type: AnswerComment
type: Comment
has text: Come on man there's a pattern here with your issues, you are using $state instead of $location. Read the docs, it's probably supposed to be `$state.go()` or something.
score: 3

http://stackoverflow.com/a/24739703
accepted answer of: http://stackoverflow.com/q/24699722
score: 0
has body: As @Andrew Walters suggested the subscription will always be triggered, because the entire array is overwritten with the new content. I found a way to recognoze what really changed by reading the knockout release 3 : http://blog.stevensanderson.com/2013/10/08/knockout-3-0-release-candidate-available/ var myArray = ko.observableArray(["Alpha", "Beta", "Gamma"]); myArray.subscribe(function(changes) { // For this example, we'll just print out the change info console.log(changes); }, null, "arrayChange"); inside the subscription it's possible to get the added, deleted and retained elements in a very simple way !
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24699722
type: Answer

http://stackoverflow.com/comment/38150555
has text: @PseudoNym01 Unfortunately not because the node-referencing would probably send it loopy
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24618118

http://stackoverflow.com/a/24658906
score: 0
type: Answer
has body: You could change the class value after the fact using a script tag. stuff
has comment: http://stackoverflow.com/comment/38226725
answers question: http://stackoverflow.com/q/24658838

http://stackoverflow.com/comment/38376816
type: QuestionComment
has text: [***Alternative Resources To Learn JS***](http://stackoverflow.com/questions/11246/best-resources-to-learn-javascript) || [***Javascript Is Sexy***](http://javascriptissexy.com/how-to-learn-javascript-properly/)
comment on: http://stackoverflow.com/q/24738274
score: 0
type: Comment

http://stackoverflow.com/q/24747797
has comment: http://stackoverflow.com/comment/38394566
tagged with: node.js
favorite count: 0
has comment: http://stackoverflow.com/comment/38394643
upvote count: 3
score: 0
answer count: 2
has title: NodeJS - mkdir possible?
accepted answer: http://stackoverflow.com/a/24747854
downvote count: 3
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24747822
has body: I would like to know if its somehow possible to create folders on a local server with a node js application and than upload some stuff. Or if thats impossible. If its not possible directly with node, is there another method how I could solve this problem ?
tagged with: javascript
has answer: http://stackoverflow.com/a/24747822
linked to: http://stackoverflow.com/q/13696148
type: Question
has answer: http://stackoverflow.com/a/24747854

http://stackoverflow.com/comment/38118031
has text: That sounds a bit beyond my current skillset. Sounds like what you're saying ultimately is "learn Angular". It's on my list. The above is a small part of what you would probably tend to label a "web application" more so than a website.
comment on: http://stackoverflow.com/q/24599890
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38126338
comment on: http://stackoverflow.com/q/24606056
score: 0
has text: Out the top of my head, I'd say: Global variables | Risks of collisions | Shadowing | Quirks Mode | Explicit is better than implicit
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24684681
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24684619
score: 2
upvote count: 2
has body: Use jQuery's map function, then get if you need a pure array: var values = $('.className input[type=text]').map(function() { return $(this).val(); }).get();

http://stackoverflow.com/q/24712818
has answer: http://stackoverflow.com/a/24712863
type: AnsweredQuestion
score: 3
downvote count: 0
type: Question
accepted answer: http://stackoverflow.com/a/24712835
has answer: http://stackoverflow.com/a/24712834
tagged with: javascript
tagged with: jquery
upvote count: 3
has answer: http://stackoverflow.com/a/24712835
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: how to output a span into a li with jquery?
has body: I have a ul that contain 2 li each of them have a text and a span that contain text like this Erbiltext-1 Sulymanytext-2 i want to remove Erbil and Sulymany from the code with jquery.... I'm used this in jQuery $('li').each(function () { $('li').html($('span')); }); but the result like this.. text-1text-2text-1text-2 text-1text-2text-1text-2 how to output only a span without repeating?
possible better answer: http://stackoverflow.com/a/24712863
tagged with: css

http://stackoverflow.com/q/24619594
favorite count: 0
has answer: http://stackoverflow.com/a/24619893
has answer: http://stackoverflow.com/a/24619730
tagged with: css
type: AnsweredQuestion
upvote count: 3
has body: I have some CSS that scales images, which works fine. The problem is it gets applied to every image on the page. What I want is to apply it ONLY to an image if I mouseover or onclick. Because images are inserted by a CMS used by non-tech writers, they don't have the skills to get into the image tag itself to insert a class. This is why I want the scaling CSS triggered by mouseover or onclick. I've struggled to get a piece of javascript to do the job and would appreciate some help
type: Question
has comment: http://stackoverflow.com/comment/38154381
score: 3
possible better answer: http://stackoverflow.com/a/24619893
has title: CSS scale triggered by mouseover or onclick?
tagged with: javascript
has comment: http://stackoverflow.com/comment/38152976
answer count: 2
accepted answer: http://stackoverflow.com/a/24619730
downvote count: 0
has comment: http://stackoverflow.com/comment/38153017

http://stackoverflow.com/a/24694706
downvote count: 0
has comment: http://stackoverflow.com/comment/40287611
has comment: http://stackoverflow.com/comment/40287881
answers question: http://stackoverflow.com/q/24680303
has comment: http://stackoverflow.com/comment/38426161
type: Answer
upvote count: 1
score: 1
has body: The objects are rotating around the 0,0,0 point of the mesh/object coordinates. And not around the 0,0,0 coordinates of the world. And the object maybe not in the center of their own origin. Set your object to 0,0,0 and create a cube at 0,0,0 and look if they are in the same place. I needed to edit the mesh vertices so they realy centered around 0,0,0. After that i could rotate them without a problem. Or put your object to 0,0,0 and run your code to get the center of your object. And i think it will not be 0,0,0.

http://stackoverflow.com/q/24641494
score: 0
answer count: 1
has body: Currently, I am using the jQuery slider with range. What I want to do is, upon the user submitting the form, I want the two values (max and min) to also be sent over to the controller, so I can save them in the database. They are both currently saved in the variable values: $(function() { $( "#slider-range" ).slider({ range: true, min: 0, max: 1000000, step: 10000, values: [100000 , 300000 ], slide: function( event, ui ) { $( "#amount" ).val( "£" + ui.values[ 0 ] + " - £" + ui.values[ 1 ] ); }, stop: function(event, ui) { var values = $( "#slider-range" ).slider( "values" ); } }); $( "#amount" ).val( "£" + $( "#slider-range" ).slider( "values", 0 ) + " - £" + $( "#slider-range" ).slider( "values", 1 ) ); }); I have alerted the variable and it echos the correct two variables. I am at a complete loss as to how to get the two variables, possibly split, over to my Laravel controller, once the user submits the form. I usually get the form's variables through the Input::get method: $id = Input::get('id'); But trying to access this variable always returns NULL Any help would be hugely appreciated.
type: UnansweredQuestion
tagged with: laravel
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/24641846
has title: Pass jQuery slider variables through to Laravel controller
tagged with: laravel-4
tagged with: javascript
tagged with: eloquent

http://stackoverflow.com/a/24682440
type: Answer
has comment: http://stackoverflow.com/comment/38270615
has comment: http://stackoverflow.com/comment/38270463
has comment: http://stackoverflow.com/comment/38270811
upvote count: 3
has body: You should use an array for this. There is no such thing as "variable variables" in JavaScript. You can access a variable through a string containing the variables name by using this[variableName], but again, you shouldn't. You should use an array for this. In your case, you would use questionValue = this["question" + i], but one more time: Don't do it. Use an array instead. I'm not sure why you're using "question" + numberofquestions which will be 10 every time
score: 3
answers question: http://stackoverflow.com/q/24682404
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24682404

http://stackoverflow.com/comment/38272446
type: AnswerComment
type: Comment
has text: The addon can e.g. be installed system-wide and the user running the Firefox instance does not have write permissions to the install location. You cannot force a uninstall then (lacking write permissions). But you can disable such by setting `Addon.userDisabled = true`.
score: 2
comment on: http://stackoverflow.com/a/24680996

http://stackoverflow.com/a/24730306
has body: A value being "falsy" means that the result of converting it to a Boolean is false: Boolean(null) // false Boolean(undefined) // false // but Boolean("0") // true This is very different from comparing it against a Boolean: null == false // not equal, null == true is not equal either undefined == false // not equal, undefined == true is not equal either // but "0" == true // not equal, however, `"0" == false` is equal Since you are using strict comparison, the case is even simpler: the strict equality comparison operator returns false if operands are not of the same data type. null is of type Null and false is of type Boolean. But even if you used loose comparison, the abstract equality algorithm defines that only null and undefined are equal to each other. Depending on what exactly you want to test for, you have a couple of options: if (!value) // true for all falsy values if (value == null) // true for null and undefined if (value === null) // true for null In general you should always prefer strict comparison because JS' type conversion rules can be surprising. One of the exceptions is comparing a value against null, since loose comparison also catches undefined.
has comment: http://stackoverflow.com/comment/38362192
score: 3
answers question: http://stackoverflow.com/q/24730166
upvote count: 3
type: Answer
downvote count: 0

http://stackoverflow.com/comment/38183905
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24636171
has text: Are you missing the rest of your `.module("Dashboard")` func - else it's missing the closing brackets and what npt
score: 0

http://stackoverflow.com/comment/46927904
comment on: http://stackoverflow.com/a/24603642
has text: I want to vote up the face off this answer. Thank you so much for adding this.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/38103101
comment on: http://stackoverflow.com/a/24593239
score: 0
has text: Can I show you the code? The only way I can think of fixing it is to apply a class to all ` `'s with a fixed width and padding, but this would most likely cause issues when activating/deactivating the slider.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38322609
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24709919
has text: Oh I missed the `hash `one.

http://stackoverflow.com/comment/38260800
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24677408
has text: yes, just a button from my `#/home` that links to the `#/login`

http://stackoverflow.com/comment/38157516
comment on: http://stackoverflow.com/a/24621822
type: Comment
score: 0
type: AnswerComment
has text: SOrry it works like a charm, I forgot to add e to the method's constructor and "this" to the radio button's tag

http://stackoverflow.com/a/24697107
downvote count: 0
answers question: http://stackoverflow.com/q/24697009
score: 1
has body: var sentence = "This is a test" var words = sentence.split(" "); This will give you an array of strings ["This","is","a","test"] which you can iterate over and add each word to a new line.
upvote count: 1
type: Answer

http://stackoverflow.com/a/24642286
upvote count: 1
has comment: http://stackoverflow.com/comment/73164035
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38197313
has comment: http://stackoverflow.com/comment/38199285
answers question: http://stackoverflow.com/q/24640973
type: Answer
has comment: http://stackoverflow.com/comment/38198990
accepted answer of: http://stackoverflow.com/q/24640973
has body: Sure there is a way, but not a good one, unfortunately. The logic is kinda hard-coded Have a stub options dialog (.xul) that notifies observers and then closes itself immediately. There will be a short flashing of that dialog, of course. Overlay about:addons and chrome://mozapps/content/extensions/extensions.xul and hook the doCommand belonging to preferences. Re-bind addon-generic, but patching/rebinding this monster of a binding is not only not easy but also very fragile (may get out of sync if future Firefox changes something) and also not even enough because there is still a menu item in the context menu. So in conclusion: Either be OK with 1. or don't do this at all (because the gain does not nearly outweigh the fuss). You could also add just a new button. E.g. in Scriptish I added some new buttons by re-binding .control-container. See addonstab.*.
downvote count: 0
has comment: http://stackoverflow.com/comment/38197276
score: 1

http://stackoverflow.com/tag/xml
tags question: http://stackoverflow.com/q/24618260
tags question: http://stackoverflow.com/q/24668875
tags question: http://stackoverflow.com/q/24665466
tags question: http://stackoverflow.com/q/24704427
tags question: http://stackoverflow.com/q/24712954
type: Tag
tags question: http://stackoverflow.com/q/24715603
tags question: http://stackoverflow.com/q/24701710
tags question: http://stackoverflow.com/q/24711361
tags question: http://stackoverflow.com/q/24673242
tags question: http://stackoverflow.com/q/24619163
tags question: http://stackoverflow.com/q/24639956
tags question: http://stackoverflow.com/q/24641083
tags question: http://stackoverflow.com/q/24688040
tags question: http://stackoverflow.com/q/24685291
tag name: xml
tags question: http://stackoverflow.com/q/24702440
tags question: http://stackoverflow.com/q/24678534
tags question: http://stackoverflow.com/q/24693149
tags question: http://stackoverflow.com/q/24649778
tags question: http://stackoverflow.com/q/24669558
tags question: http://stackoverflow.com/q/24672554
tags question: http://stackoverflow.com/q/24596092
tags question: http://stackoverflow.com/q/24669210
tags question: http://stackoverflow.com/q/24729559
tags question: http://stackoverflow.com/q/24723267
tags question: http://stackoverflow.com/q/24691559
tags question: http://stackoverflow.com/q/24633079
tags question: http://stackoverflow.com/q/24743556

http://stackoverflow.com/a/24621021
accepted answer of: http://stackoverflow.com/q/24619764
type: Answer
answers question: http://stackoverflow.com/q/24619764
downvote count: 0
has comment: http://stackoverflow.com/comment/38189716
score: 1
has body: Anything attached to window as a property can be accessed without window. in front of it. Every JavaScript environment has a "global namespace". window is the global namespace in the browser. If you were writing JavaScript in node.js then an object called global is the global namespace. If you declare a variable without the var keyword then that variable becomes "global". Maybe you already knew this, but what you may not know is that your variable actually became a property of window. function doSomething() { var inScope = "I am only accessible within the doSomething function."; notInScope = "I am a global variable which means you can access me at window.notInScope."; } Also, even if you do use var but it's not wrapped in anything that would limit its scope then it also becomes a global variable. &lt;script type="text/javascript"&gt; var isGlobal = "This variable is global even though we used 'var' because it was declared in the root/global scope."; &lt;/script&gt; http://plnkr.co/edit/a5fanTIJRpxxjjqgrr4D?p=info
has comment: http://stackoverflow.com/comment/38185581
has comment: http://stackoverflow.com/comment/38183209
has comment: http://stackoverflow.com/comment/38180051
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38191395

http://stackoverflow.com/q/24647910
type: AnsweredQuestion
upvote count: 7
has answer: http://stackoverflow.com/a/24648692
has body: Is it possible to retrieve the initial state after the state has changed? F.ex: React.createClass({ getInitialState: function() { return { foo: 'bar' } }, componentWillMount: function() { this.setState({ foo: 'foo' }) }, componentDidMount: function() { // get the initial state "bar" ? } }) I couldn’t find anything in the docs. I could of course save the value in an external variable, but I was just curios if it was possible to treat the initialstate as a "config" object that could be re-used.
type: Question
score: 7
accepted answer: http://stackoverflow.com/a/24648692
tagged with: javascript
tagged with: reactjs
answer count: 2
possible better answer: http://stackoverflow.com/a/24664255
has answer: http://stackoverflow.com/a/24664255
downvote count: 0
has title: React: Get initialstate after state has changed
favorite count: 0

http://stackoverflow.com/a/24625504
downvote count: 0
has body: You may want to see the answers on this post or on this - uploading files with AJAX is not working with the generic method you are using.
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/38200195
answers question: http://stackoverflow.com/q/24624609
has comment: http://stackoverflow.com/comment/38164512
has comment: http://stackoverflow.com/comment/38200675

http://stackoverflow.com/q/24625383
has body: I have used multiple js file, but if i use that both are not working,so how to solve that issue. script.js $(document).ready(function() { $("table") .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $("#pager")}); });
accepted answer: http://stackoverflow.com/a/24625460
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/24625566
has answer: http://stackoverflow.com/a/24625566
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24625460
has comment: http://stackoverflow.com/comment/38164069
type: AnsweredQuestion
upvote count: 0
has title: how to solve multiple js file conflict issue
type: Question
score: -2
tagged with: javascript
answer count: 2
downvote count: 2

http://stackoverflow.com/comment/38376430
comment on: http://stackoverflow.com/q/24738179
score: 0
has text: Can you provide sample HTML too to allow a complete answer?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/43467140
has body: This is basically a rehash of the above answers (Nayas Subramanian) in a jsFiddle - but security doesn't allow it to work in stackoverflow 100%... $('#print').click(function () { var contentWindow = document.getElementById("frameContent").contentWindow; var result = contentWindow.document.execCommand('print', false, null); if(!result) contentWindow.print(); }); iframe { width:100%; height:100%; border: none; } #print { position:absolute; left:20px; top: 20px; font-size: 20px; } Print
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/24673024
type: Answer

http://stackoverflow.com/q/24745664
has comment: http://stackoverflow.com/comment/38390877
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38391531
has comment: http://stackoverflow.com/comment/38390987
tagged with: css
accepted answer: http://stackoverflow.com/a/24768777
has comment: http://stackoverflow.com/comment/38390534
has comment: http://stackoverflow.com/comment/38390611
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38390940
has comment: http://stackoverflow.com/comment/38391164
has answer: http://stackoverflow.com/a/24745884
has comment: http://stackoverflow.com/comment/38391287
has comment: http://stackoverflow.com/comment/38391479
has comment: http://stackoverflow.com/comment/38390604
has comment: http://stackoverflow.com/comment/38390641
has comment: http://stackoverflow.com/comment/38390816
type: Question
has comment: http://stackoverflow.com/comment/38390562
tagged with: javascript
has title: How to Display Content Extraction from Links on Hover
has answer: http://stackoverflow.com/a/24768777
score: 0
has comment: http://stackoverflow.com/comment/38390574
answer count: 3
has comment: http://stackoverflow.com/comment/38391980
has comment: http://stackoverflow.com/comment/38390745
has body: Improvised: In order to show a user a summary of an arbitrary web page like the title, image and meta description, how can I retrieve meta data and images from a document based on its URL and that to when someone hovers over the embedded URL as a link in a post. A hint of this type of effect : http://rap.genius.com/Casey-veggies-the-boy-lyrics
tagged with: jquery
has comment: http://stackoverflow.com/comment/38391016
has comment: http://stackoverflow.com/comment/38390561
possible better answer: http://stackoverflow.com/a/24746048
has comment: http://stackoverflow.com/comment/38390890
has comment: http://stackoverflow.com/comment/38390667
has comment: http://stackoverflow.com/comment/38390684
has comment: http://stackoverflow.com/comment/38391343
has answer: http://stackoverflow.com/a/24746048
has comment: http://stackoverflow.com/comment/38390657

http://stackoverflow.com/q/24658723
has body: i have this piece of code: (function f(){ function f(){ return 1; } return f(); function f(){ return 2; } })(); why does this code print '2'?
has answer: http://stackoverflow.com/a/24658754
type: Question
has title: Why does my code execute a function defined after the return statement?
score: 3
answer count: 3
tagged with: function
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24658754
favorite count: 0
has comment: http://stackoverflow.com/comment/38226475
has answer: http://stackoverflow.com/a/24658777
accepted answer: http://stackoverflow.com/a/24658777
has comment: http://stackoverflow.com/comment/38228259
has answer: http://stackoverflow.com/a/24658748
type: AnsweredQuestion
upvote count: 3

http://stackoverflow.com/comment/38212250
comment on: http://stackoverflow.com/a/24647413
score: 0
type: AnswerComment
type: Comment
has text: @JohnPriestakos: You're welcome! Just to be clear, you don't need `:eq` if you're using the classes and looking within the row. I couldn't tell from your comment above whether you might still be using them despite having classes (which makes `:eq` unnecessary).

http://stackoverflow.com/q/24645784
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38204718
accepted answer: http://stackoverflow.com/a/24646043
score: 0
has body: I am trying to insert some HTML after the user has selected some text on the page. I have it working but not optimally and there is one problem in particular: It relies on the element being on the page, but I don't want it to be. I want to do it all in the code, I am sure it's something relatively simple but need some help :) I also welcome any other tips/suggestions/feedback! The code canbe seen working here: http://jsfiddle.net/shE58/ (The selectionchange library is to make this work in FF). document.addEventListener('selectionchange', function (event) { var sel = this.getSelection(); // If text is being selected by drag, to wait for them to finish selecting. jQuery("body").mouseup(function() { // Ensure there is some text selected and that it is more than one character. if (sel.toString().length &gt; 1) { // We only want one #element on the page at a time. $("#element").remove(); // @TODO: Remove dependency on this: var el = document.getElementById('selection'); el.innerHTML = '&lt;div id="element"&gt;&lt;/div&gt;'; var frag = document.createDocumentFragment(), node; frag.appendChild(el.firstChild); var range = sel.getRangeAt(0) var startNode = range.startContainer, startOffset = range.startOffset; var boundaryRange = range.cloneRange(); boundaryRange.collapse(false); boundaryRange.insertNode(frag); boundaryRange.setStart(startNode, startOffset); boundaryRange.collapse(true); // Clean up sel = ''; } }); });
has title: Inserting an HTML element after text selection
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/1677880
has comment: http://stackoverflow.com/comment/38202458
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/24646043

http://stackoverflow.com/comment/38372170
comment on: http://stackoverflow.com/q/24735722
has text: your console.log is outside the $(document).ready so the table may not be loaded when the log line fires. - But you really could just use the ng-click from angular
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38155373
comment on: http://stackoverflow.com/a/24620680
has text: setTimeOut make a call every 100 miliseconds to the search function, too many read to the database is a short interval, you can call only to the search function
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/24699089
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/24693142
answers question: http://stackoverflow.com/q/24693142
has body: you can use, $(document).on("click",".subscribe",function(){ //your code here }); i created a jsfiddle. just check it out whether that is your aim http://jsfiddle.net/2dAf9/
score: 0

http://stackoverflow.com/comment/40045638
has text: Looks like someone is not familiar with `concat`… `return Array.prototype.concat.apply([], this)`
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24713860
type: Comment

http://stackoverflow.com/comment/38115776
type: Comment
comment on: http://stackoverflow.com/a/24600687
score: 0
has text: @user3622856 Are there any errors showing in Chrome's dev console?
type: AnswerComment

http://stackoverflow.com/a/24641792
downvote count: 0
answers question: http://stackoverflow.com/q/24641629
type: Answer
has body: public ..... Post([FromBody]objClass obj) var thing=obj.property; Also you cant post an object (it needs to be real data) , see Json stringify try this thread How to JSON.stringify and JSON.parse without getting an empty object?
score: 1
upvote count: 1

http://stackoverflow.com/q/24724532
has title: How to print unicode json using Javascript
answer count: 1
tagged with: unicode
has body: I try to print JSON response in my html document so I do: respdiv.innerHTML = '&lt;pre&gt;&lt;code&gt;' + xhr.responseText + '&lt;/code&gt;&lt;/pre&gt;'; The problem is my response is printed like this : { "error": "Sc\\u00e9nario invalide" } I want my response to be printed like this : { "error": "Scénario invalide" } How I get this?
has comment: http://stackoverflow.com/comment/38350409
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38350357
has answer: http://stackoverflow.com/a/24724671
type: Question
accepted answer: http://stackoverflow.com/a/24724671
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0

http://stackoverflow.com/comment/38150962
has text: I was wrong, that didn't work either. If you have anymore suggestions I'm listening, but pretty lost right now..
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24615966

http://stackoverflow.com/q/24677005
type: Question
possible better answer: http://stackoverflow.com/a/24710373
has answer: http://stackoverflow.com/a/35585529
tagged with: javascript
has answer: http://stackoverflow.com/a/24710373
score: 4
tagged with: html5-video
upvote count: 4
answer count: 2
has body: I'm trying to send a video stream obtained via WebRTC's getUserMedia() method to the server for additional processing. Latency is important, as I wish to detect changes in the video stream and update the client immediately. For this particular use, a Firefox-only solution is acceptable, and so I'm investigating the MediaRecorder interface. I've put together a simple test case, included below. There are no errors, and the ondataavailable callback is called every 500ms, as expected. However, for three out of four of these calls, the size of the data provided is zero. This suggests to me that the data is being grouped into chunks of about two seconds (possibly due to constraints of the video encoding being used). Is it possible to get MediaRecorder to provide data at a finer granularity? If not, what is the best way to get video data from the userMedia stream to the server with low latency? An interface specific to Chrome or Firefox would be fine, but one that worked in both would be even better. MediaRecorder Test
has title: Firefox's MediaRecorder interface only providing new video data every two seconds
tagged with: firefox
downvote count: 0
tagged with: webrtc
favorite count: 0
has comment: http://stackoverflow.com/comment/38368263
accepted answer: http://stackoverflow.com/a/35585529
type: AnsweredQuestion
tagged with: video

http://stackoverflow.com/a/24685597
type: AcceptedAnswer
has body: There are several ways to take this, you can start with $filter and orderBy https://docs.angularjs.org/api/ng/filter/orderBy which should give you a list sorted by age on your ngRepeat or $filterprovider, then just grab the first element. fiddled it out here - http://jsfiddle.net/devitate/LKeQz/ Without any testing The fancy way would look something like this - don't trust this code though. var min = Math.min.apply(null, Object.keys($scope.rootEntry).map(function(e) { return $scope.rootEntry[e]['age']; }) ); Or, an easier to understand way, for me at least, would just be a loop and it would go something like - var ages = []; angular.forEach( $scope.rootEntry , function(value, key) { ages.push(value.age); }); return Math.min(ages); But you should probably just skip ahead to using underscore js - _.min($scope.rootEntry, function(e){ return e.age; });
type: Answer
accepted answer of: http://stackoverflow.com/q/24684813
answers question: http://stackoverflow.com/q/24684813
score: 0

http://stackoverflow.com/comment/72284028
comment on: http://stackoverflow.com/a/24642038
type: AnswerComment
score: 0
type: Comment
has text: any workaround for this issue? I am also facing the same problem.

http://stackoverflow.com/q/24700210
has comment: http://stackoverflow.com/comment/38312511
favorite count: 0
has title: How to enable harmony syntax support in coffeescript?
has body: I used node.js(0.11.13) with --harmony flag and used function *() and yield keywords. I tried to simplify my development on node.js with help of coffeescript, so far it works great but I went into troubles with yield and declaring a generator - it complains about 'reserved keyword yield'. Any ideas?
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24715541
upvote count: 5
has answer: http://stackoverflow.com/a/28698569
tagged with: coffeescript
type: Question
tagged with: ecmascript-harmony
score: 5
has answer: http://stackoverflow.com/a/27940853
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38312065
tagged with: yield
has answer: http://stackoverflow.com/a/24705455
accepted answer: http://stackoverflow.com/a/24705455
possible better answer: http://stackoverflow.com/a/28698569

http://stackoverflow.com/comment/38183570
type: Comment
comment on: http://stackoverflow.com/a/24635315
has text: @xdumaine You are right, this does not work that way. "active" state has to be tracked with the individual items. Fiddle and answer fixed in this regard, thanks for the hint!
score: 0
type: AnswerComment

http://stackoverflow.com/a/61421811
type: Answer
score: 6
downvote count: 0
upvote count: 6
has body: I´m late to the party, but hopefully this answer will help someone, this is a functional code: db.js const MongoClient = require("mongodb").MongoClient const urlMongo = "mongodb://localhost:27017" var db; function connectToServer( callback ) { MongoClient.connect(urlMongo, { useUnifiedTopology: true , useNewUrlParser: true }, function( err, client ) { db = client.db('auth'); return callback( err ); }) } function getDb() { return db } module.exports = {connectToServer, getDb} We export one function to connect to the mongo and another to get de instanceof the connection. app.js const express = require('express') const app = express() const mongo = require('./db.js'); mongo.connectToServer( function( err) { if (err) console.log(err); const auth = require('./modulos') app.post('/login', (req, res) => { auth.login(req, res)}) app.listen(3000, function () { console.log('Corriendo en puerto 3000')}) }); We must do the require of the auth module after we initiallize the connection, otherwise the getDb function will return undefined. module.js const db = require('../db.js').getDb() const usuariosCollection = db.collection('usuarios') function login(req, res){ usuariosCollection.find({ 'username': 'Fran' }).toArray(function (err, doc) { ... }) }
answers question: http://stackoverflow.com/q/24621940

http://stackoverflow.com/q/24639571
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have been searching for this answer for days and cannot come across an answer. Maybe because i do not understand them and can not apply them to what i am trying to do. i am using php to save images on the server when the user presses submit and when that happens, i would like the image to appear on the next page in the image src. As you can see that the name of my next page is random but similar to my image name aside from the extensions. So i was wondering if that would play a part in helping me do something? as at the end of my php i go straight to the random stringed page that was created. function findexts ($filename) { $filename = $_FILES["file"]["name"]; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } if(isset($_POST['submit'])){ $allowedExts = array("gif", "jpeg", "jpg", "png"); $temp = explode(".", $_FILES["file"]["name"]); $extension = end($temp); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png") || ($_FILES["file"]["type"] == "image/png")) &amp;&amp; ($_FILES["file"]["size"] &lt; 3000000) &amp;&amp; in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] &gt; 0) { //echo "Return Code: " . $_FILES["file"]["error"] . "&lt;br&gt;"; } else { $ext = findexts ($_FILES['file']['name']) ; $newName = generateRandomString(); $fileName=$newName.".".$ext; while (is_file("upload/" . $fileName)){ $newName = generateRandomString(); $fileName=$newName.".".$ext; } $target = "upload/"; move_uploaded_file($_FILES["file"]["tmp_name"], $target . $fileName); $newfile = fopen("img/" . $newName.".html", "w") or die("Unable to open file!"); $newImgWeb = $newName.".html"; copy("img/template.html","img/" . $newImgWeb); fclose($newfile); header("Location: img/$newImgWeb"); } } else { //echo "Invalid File" } } else { } this is my php and i don't know how…
has comment: http://stackoverflow.com/comment/38192788
has comment: http://stackoverflow.com/comment/38243964
favorite count: 0
has answer: http://stackoverflow.com/a/24668705
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38190468
has comment: http://stackoverflow.com/comment/38218950
type: Question
has comment: http://stackoverflow.com/comment/38197077
has title: How to send image from main page to another?
has comment: http://stackoverflow.com/comment/38191110
has comment: http://stackoverflow.com/comment/38190723
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38197868
accepted answer: http://stackoverflow.com/a/24668705
upvote count: 1
has comment: http://stackoverflow.com/comment/38244097

http://stackoverflow.com/comment/38204448
type: QuestionComment
score: 0
has text: First make sure that you have data form your AJAX call in RIGHT format, also you have the with ID "curpayable" .
comment on: http://stackoverflow.com/q/24646198
type: Comment

http://stackoverflow.com/comment/38359122
has text: Can you loop over them and check for duplicates by comparing the identity property, and only push the element if that's not the case?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24728440

http://stackoverflow.com/q/24719248
downvote count: 0
tagged with: meteor
tagged with: meteor-blaze
favorite count: 0
type: Question
upvote count: 2
tagged with: node.js
has comment: http://stackoverflow.com/comment/38340906
has answer: http://stackoverflow.com/a/24720921
answer count: 1
has title: Helpers for UI.dynamic templates in Meteor.js
has body: In Meteor v0.8.2, it appears that helpers must be created for the individual templates (Template.story_en, Template.story_ne) called by the dynamic template. Is it possible to create helpers for just the dynamic template (Template.story) and avoid repeating it for all possible templates that the dynamic templates can use, such as in the example below? It appears that the method I'm using requires a lot of repeated code. story.html &lt;template name="story"&gt; {{&gt; UI.dynamic template=storyTemplate}} &lt;/template&gt; story.js Template.story.storyTemplate = function() { return "story_" + Session.get('lang') } // This does not work Template.story.color = function() { return '#f00' } // This works Template.story_en.color = function() { return '#f00' } // This works (but seems to be unnecessary code) Template.story_ne.color = function() { return '#f00' }
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38343435
score: 2

http://stackoverflow.com/comment/38137469
score: 0
has text: If that your whole code, because if it is you're not waiting for sss.min.js to load.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24611759

http://stackoverflow.com/comment/38346363
type: Comment
score: 0
has text: to get the next sibling, use `nextElementSibling`, to check if it is the last element or not, compare it against the `lastChild`, and then use `firstChild` to get the first element.
type: QuestionComment
comment on: http://stackoverflow.com/q/24722123

http://stackoverflow.com/a/24710230
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/24710210
has comment: http://stackoverflow.com/comment/38323314
accepted answer of: http://stackoverflow.com/q/24710210
has body: Add start and end pattern to your regex. So it will be like, /^\d{3}-\d{6}$/ For validation purposes, it would be better if you add start and end patterns. The above regex means, phone number must have three digits before - and 6 digits after -. For example: If the given phone number is 0222-989898, then this regex \d{3}-\d{6} matches 222-989898, so it returns true. But if we put start and end patterns, ^\d{3}-\d{6}$ it tells the regex engine that there must be 3 digits before - and 6 digits after -. In your case it's four digits before -, so it would fail.

http://stackoverflow.com/q/24675606
type: Question
score: 1
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38288800
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
favorite count: 0
has comment: http://stackoverflow.com/comment/38267601
has body: I'm having trouble with the execution order of Q's promises in Node.js. The code is supposed to do the following: a) Execute a query and use the resulting lat/lon pairs to b) Calculate shortest paths (using an async function) and c) Return them query() // Runs the query .then(function() { return computeRoutes(); // Calculates the routes }) .then(function() { return returnRoutes(); // Returns the routes as JSON }); The problem is that while the coordinates[] array gets populated in query() and is filled/available in computeRoutes(), the routes[] array remains empty in returnRoutes(). The strange thing is that when I do not loop over coordinates[] in computeRoutes() but just compute one route for coordinates[0], the chain of promises succeeds (but ofcourse I see only one route returned as JSON) Any ideas on what could be wrong here? Thanks!! Full code: app.get('/', function(req, res) { var id = parseInt(req.query.id); var radius = parseInt(req.query.radius) || 5000; var routes = []; var coordinates = []; function query() { var deferred = Q.defer(); console.log('Starting query function...'); var query = client.query('SELECT ST_X(ST_Transform(ST_SetSRID(a.geom, 3857),4326)) AS fromlat, ST_Y(ST_Transform(ST_SetSRID(a.geom, 3857),4326)) AS fromlon, ST_X(ST_Transform(ST_SetSRID(b.geom, 3857),4326)) AS tolat, ST_Y(ST_Transform(ST_SetSRID(b.geom, 3857),4326)) AS tolon FROM emme_veh AS c, emme_nodes3857 AS b, emme_nodes3857 AS a WHERE c.fid = a.id AND c.tid = b.id AND c.fid = $1 AND ST_Distance(a.geom, b.geom) &lt; $2', [id, radius], function(err, result) { console.log('Inside query. result.rows.length:',result.rows.length); for(var i in result.rows) { coordinates.push({'from':[result.rows[i].fromlon,result.rows[i].fromlat], 'to':[result.rows[i].tolon,result.rows[i].tolat]}); } deferred.resolve(); }); return deferred.promise; } function computeRoutes() { var the_promises = []; for(var i in coordinates) { var deferred = Q.defer(); var query = {coordinates: [coordinates[i].from…
type: UnansweredQuestion
has title: Q.all doesnt resolve in correct order
has comment: http://stackoverflow.com/comment/38267571
has answer: http://stackoverflow.com/a/24677845
tagged with: node.js
downvote count: 0

http://stackoverflow.com/a/24626757
has comment: http://stackoverflow.com/comment/38166410
has body: You are referencing this when calling SyncNavigationSetCssToState Replace your call with NavigationSetApi.SyncNavigationSetCssToState $(function () { var NavigationSetApi = { SyncNavigationSetCssToState: function (navigationSet) { var navigationSetContent = navigationSet.find(".navigation-set-content"); var navigationSetHeaderButton = navigationSet.find(".navigation-set-header-button"); if (navigationSetContent.is(":visible")) navigationSetHeaderButton.removeClass("closed").addClass("open"); else navigationSetHeaderButton.removeClass("open").addClass("closed"); }, GetAllNavigationSets: function () { return $(".navigation-set"); }, SyncAllNavigationSetCssToState: function () { this.GetAllNavigationSets().each(function () { NavigationSetApi.SyncNavigationSetCssToState($(this)); }); } } NavigationSetApi.SyncAllNavigationSetCssToState(); } Expanding on comment about instance... Above is just a simple Javascript object. this refers to the object NavigationSetApi to keep it simple. But when you call this.GetAllNavigationSets().each, each is now setting this by using Function.prototype.call If you were to use NavigationSetApi as an instance you would first need to make it a function (If you know any OO languages think of a class) This is how you would define it: function NavigationSetApi(){ } NavigationSetApi.prototype = { SyncNavigationSetCssToState: function (navigationSet) { var navigationSetContent = navigationSet.find(".navigation-set-content"); var navigationSetHeaderButton = navigationSet.find(".navigation-set-header-button"); if (navigationSetContent.is(":visible")) navigationSetHeaderButton.removeClass("closed").addClass("open"); else navigationSetHeaderButton.removeClass("open").addClass("closed"); }, GetAllNavigationSets: function () { return $(".navigation-set"); }, SyncAllNavigationSetCssToState: function () { //From Blake Simpson's answer var api = this; this.GetAllNavigationSets().each(function () { api.SyncNavigationSetCssToState($(this)); }); } }; And then…
type: Answer
has comment: http://stackoverflow.com/comment/38167158
answers question: http://stackoverflow.com/q/24626711
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/24626711
has comment: http://stackoverflow.com/comment/38166454
has comment: http://stackoverflow.com/comment/38166377
type: AcceptedAnswer
downvote count: 0

url
tags question: http://stackoverflow.com/q/24649303
tags question: http://stackoverflow.com/q/24718752
tag name: url
tags question: http://stackoverflow.com/q/24606974
tags question: http://stackoverflow.com/q/24678248
tags question: http://stackoverflow.com/q/24630313
tags question: http://stackoverflow.com/q/24722916
tags question: http://stackoverflow.com/q/24591190
tags question: http://stackoverflow.com/q/24739642
tags question: http://stackoverflow.com/q/24735313
tags question: http://stackoverflow.com/q/24664657
tags question: http://stackoverflow.com/q/24631643
type: Tag
tags question: http://stackoverflow.com/q/24631176

http://stackoverflow.com/comment/38284072
score: 1
has text: @strike_noir: It's in the jsfiddle.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24689629

xively
tag name: xively
type: Tag
tags question: http://stackoverflow.com/q/24627038

http://stackoverflow.com/comment/38112738
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24595698
score: 1
has text: I see, so i guess if you merge what i wrote with some `_.extend` or `$.extend`. You get what you want. Normally if i was working with data like that i try to be explicit though, because you will probably end up adding methods that read/write against the data. It just feels really brittle if you don't :/, and why not just keep it as a object if you want to do that.

http://stackoverflow.com/q/24666905
upvote count: 1
has body: For example, I have a person constructor as follows: function Person(name) { var username = name; return { getName: function() {return username;}, setName: function(name) {username=name;} } } Then I want to create another Employee constructor which would inherit from the Person constructor and has a getId method that returns an auto-incremented id value for every object created out of the Employee constructor. For example, var employee1 = new Employee('foo'); employee1.getName() // will output foo employee1.getId() // will output 1 var employee2 = new Employee('qoo'); employee2.getName() // will output qoo employee2.getId() // will output 2 The problem is I'm a little bit confused about how to create an id variable on Employee constructor that it only gets called once and then each object will get a fixed auto-incremented value. How should I set up the Employee constructor and the inheritance?
answer count: 1
has title: A JavaScript inheritance example
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24666948
downvote count: 0
accepted answer: http://stackoverflow.com/a/24666948
tagged with: prototypal-inheritance
score: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/38385905
score: 2
has text: You have to [append](https://developer.mozilla.org/en-US/docs/Web/API/Node.appendChild) the newly created element to a parent. I.e. instead of `cell5.innerHTML = changeDisease;` you need `cell5.appendChild(changeDisease);` Just as a side note, it's easy to insert rows at the end of a table by passing simply `-1` as argument to `insertRow()`, the same stands for cells and `insertCell()`.
comment on: http://stackoverflow.com/q/24743137
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38374588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24736916
has text: Dude , i know But how can i see ur problem ? I told : All coders will hav to 1) Download This plugin 2)Create HTML 3) Add this plugin JS into HTML 4)Run file and then 5)See what is issue. Eventually u wont get answer.Who will do all above steps for u??? u can give js fiddle for us to see where is problem
score: 0

http://stackoverflow.com/comment/38241499
has text: Sorry, I think my question was not that clear :) I was referring to a button that would link users to another page.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24632457

http://stackoverflow.com/a/24593964
answers question: http://stackoverflow.com/q/24593698
downvote count: 0
score: 1
has body: I would recommend you don't include inline event attributes at each element. But I would consider including an inline html5 data- attribute with the message associated with the elements: &lt;img src="images/img1.jpg" data-msg="Hi, How r u?" width="100" height="100"&gt; &lt;!-- etc --&gt; Then you can bind the same rollover functions to each element using a loop as follows: function doMouseOver(e) { document.getElementById("displayText1").innerHTML = e.target.getAttribute("data-msg"); document.getElementById("displayText").style.visibility='visible'; } function doMouseOut() { document.getElementById("displayText").style.visibility='hidden'; } var imgs = document.getElementsByTagName("img"), i; for (i = 0; i &lt; imgs.length; i++) { imgs[i].addEventListener("mouseover", doMouseOver); imgs[i].addEventListener("mouseout", doMouseOut); } Within the doMouseOver() function, the e argument is the event object, and thus e.target gives you a reference to the element the event happened to - so then you can retrieve the particular data-msg value for that element to display it. Demo: http://jsfiddle.net/3c7Rb/ Having said that, you don't need the loop either. You can bind the functions directly to the document, and then within the mouse over handler you simply test whether the target element has the msg-data attribute. If it does, display it, otherwise do nothing: function doMouseOver(e) { var msg = e.target.getAttribute("data-msg"); if (msg) { document.getElementById("displayText1").innerHTML= msg; document.getElementById("displayText").style.visibility='visible'; } } function doMouseOut() { document.getElementById("displayText").style.visibility='hidden'; } document.addEventListener("mouseover", doMouseOver); document.addEventListener("mouseout", doMouseOut); Demo: http://jsfiddle.net/3c7Rb/1/
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24593698
type: Answer

http://stackoverflow.com/comment/49680478
has text: This irritating issue is still occurring today, with the latest Chrome (43.0.2357.124 m).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24670598
score: 0

http://stackoverflow.com/comment/38343585
has text: see this http://jonsamwell.com/url-route-authorization-and-security-in-angular/
score: 0
comment on: http://stackoverflow.com/q/24720604
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38392213
comment on: http://stackoverflow.com/q/24746508
type: Comment
type: QuestionComment
score: 0
has text: The one missing line fwiw is: var request = require('request').defaults({ encoding: null })

http://stackoverflow.com/a/24591708
has body: Either that, or define your timeout function outside of the for loop and call that: var delay = 0; var delayMilliseconds = 250; function doTimeoutStuff(i, delay) { setTimeout(function () { loadRoute(modelsArray[i], (i+1)); }, delay); } for (var i=0; i&lt;5; i++) { delay = i*delayMilliseconds; doTimeoutStuff(i, delay); }
score: 0
answers question: http://stackoverflow.com/q/24591419
type: Answer

http://stackoverflow.com/comment/38178433
comment on: http://stackoverflow.com/q/24633164
has text: A quick search brought up this http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/24723267
has answer: http://stackoverflow.com/a/74867146
type: Question
has comment: http://stackoverflow.com/comment/38349343
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38352676
has comment: http://stackoverflow.com/comment/38348073
tagged with: dom
has comment: http://stackoverflow.com/comment/38352920
has title: Prevent Normalization of Text Nodes
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
tagged with: xmlnode
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
has body: On the current project that I'm working on, I'm splitting certain text nodes into multiple nodes so that I can keep track of them. I'm storing these nodes inside a global object somewhere, but for some reason they keep normalizing sometime in between when I need them and when they're parsed. It doesn't happen immediately, oddly enough, but I can't figure out how to prevent it... Example: &lt;p&gt; foo bar **HELLO** &lt;/p&gt; In the above example there is one text node: "foo\n bar\n **HELLO**". I want to split this node into three separate text nodes, while keeping track of the last one. However, after creating the new text node, populating it, and then appending it to its' parent (&lt;p&gt;) it becomes normalized a short while after I append it. I need to keep it from normalizing. EDIT A simple code example would be to use the following: var pElem = document.querySelector('p'), textNode = pElem.childNodes[0], newNodes = textNode.nodeValue.split(/\s+/g).reverse().map(function(i,v){ return document.createTextNode(v); }), curNode = textNode; textNode.nodeValue = newNodes[0].nodeValue; for(var x=1;x&lt;newNodes.length;x++) { curNode.parentNode.insertBefore(curNode, newNodes[x]); curNode = newNodes[x] } var lastNode = newNodes[0]; // THIS is what I need to keep track of I didn't test this code; just whipped it up. Basically, after a while they all merge into one text node (a.k.a., "normalize"). There is no other code that may be executing Node.normalize(). This is occurring in an isolated test page where no other code is introduced (as in none; no other libraries, polyfills, etc.). Hope this helps guys!

http://stackoverflow.com/comment/38269574
has text: Is this a complex object?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24681994

http://stackoverflow.com/q/24686717
favorite count: 0
possible better answer: http://stackoverflow.com/a/24686750
has answer: http://stackoverflow.com/a/24686787
has answer: http://stackoverflow.com/a/24686750
has comment: http://stackoverflow.com/comment/38278623
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38278658
upvote count: 1
type: Question
tagged with: automation
accepted answer: http://stackoverflow.com/a/24686787
score: 1
has body: I'm not using JQuery, so I don't think that's causing the trouble. I first ran into this using the iOS automation tool and then went to verify it using JSFiddle. If anyone can show me a way around this it would fantastic. var str = "&lt;'pass!23$'&gt;"; var str1 = str.replace("&lt;'pass!23$'&gt;", "'pass!23$'"); var str2 = str.replace("&lt;'pass!23$'&gt;", "'pass!23$a'"); Here's the fiddle: http://jsfiddle.net/adUtw/ This is really confusing me!
tagged with: replace
answer count: 2
downvote count: 0
tagged with: ios
tagged with: javascript
tagged with: string
has title: Why does String.prototype.replace remove "$'" from my string?

http://stackoverflow.com/comment/38123796
type: QuestionComment
score: 1
has text: first of all `float` property doesn't have `center` value. second can't you reproduce a simple DEMO.
comment on: http://stackoverflow.com/q/24604687
type: Comment

http://stackoverflow.com/a/24710082
has comment: http://stackoverflow.com/comment/38325153
type: Answer
has comment: http://stackoverflow.com/comment/38325194
has comment: http://stackoverflow.com/comment/38325086
has comment: http://stackoverflow.com/comment/38338111
has comment: http://stackoverflow.com/comment/38325431
has comment: http://stackoverflow.com/comment/38325492
upvote count: 1
answers question: http://stackoverflow.com/q/24709846
has comment: http://stackoverflow.com/comment/38337670
score: 1
has body: Absolutely possible. 1 + 2) Have to use nsIZipReader to read the xpi. This gives you all files within it. 3) To read contents you have to use zip readers getInputStream function and then wrap it in stream instance, then read it with argument of entry.realSize as read on stream takes characters to read. MDN :: nsIZipWriter MDN :: nsIZipReader edit: i was curious. i think i got it. heres example of how to make it dump contents of a zip (list all files within). see the console.log(entryPointer) that spits out the "zip path". it also reads the contents of the files. var zr = Cc["@mozilla.org/libjar/zip-reader;1"].createInstance(Ci.nsIZipReader); Cu.import('resource://gre/modules/osfile.jsm'); Cu.import('resource://gre/modules/FileUtils.jsm'); var reusableStreamInstance = Cc['@mozilla.org/scriptableinputstream;1'].createInstance(Ci.nsIScriptableInputStream); //var pathExtFolder = OS.Path.join(OS.Constants.Path.profileDir, 'extensions'); var pathToXpiToRead = OS.Path.join(OS.Constants.Path.profileDir, 'extensions', 'PortableTester@jetpack.xpi'); var nsiFileXpi = new FileUtils.File(pathToXpiToRead); //Services.ww.activeWindow.alert(pathToXpiToRead); try { zr.open(nsiFileXpi); //if file dne it throws here var entries = zr.findEntries('*'); while (entries.hasMore()) { var entryPointer = entries.getNext(); //just a string of "zip path" (this means path to file in zip, and it uses forward slashes remember) var entry = zr.getEntry(entryPointer); // should return true on `entry instanceof Ci.nsIZipEntry` console.log('entryPointer', entryPointer); /* CONSOLE OUTPUT * "entryPointer" "bootstrap.js" Scratchpad/1:18 */ console.info('entry', entry); /* CONSOLE OUTPUT * "entry" XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), compression: Getter, size: Getter, realSize: Getter, CRC32: Getter, isDirectory: Getter, lastModifiedTime: Getter, isSynthetic: Getter, permissions: Getter, compression: 8 } Scratchpad/1:19 */ if (!entry.isDirectory) { var inputStream = zr.getInputStr…
has comment: http://stackoverflow.com/comment/38333367
downvote count: 0

http://stackoverflow.com/comment/38388534
type: QuestionComment
has text: @EduardoFernandes The only thing it does is changing the title of the page, it does not affect the style at all. I'll try removing it now
comment on: http://stackoverflow.com/q/24744178
score: 0
type: Comment

http://stackoverflow.com/a/25586063
accepted answer of: http://stackoverflow.com/q/24708444
answers question: http://stackoverflow.com/q/24708444
type: AcceptedAnswer
downvote count: 0
has body: It looks like jPlayer doesn't correctly detect that Firefox for Android supports MP3 playback. Modifying all occurrences of the string 'audio/mpeg; codecs="mp3"' to 'audio/mpeg' in the jPlayer library makes playback work correctly in Firefox for Android. I'm not sure whether this creates problems for detection in any other browsers, however. Hopefully the jPlayer team can fix this detection in the next release.
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/38339422
has text: I know from twitter bootstrap there is a solution for it. Check the example templates e.g. the admin / backend example.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24717872

http://stackoverflow.com/q/24704288
has answer: http://stackoverflow.com/a/24704721
score: 0
tagged with: angularjs
has title: Accessing yet-to-be-compiled directive's DOM elements from controller
type: UnansweredQuestion
has body: I've got a controller that executes before Angular compiles a directive. The controller needs to manipulate a DOM element that only exists after the directive has been compiled. How can I select that DOM element, to manipulate it, if it's not in the DOM yet? A contrived example to illustrate this follows. Let's say I have the following markup: customerList is a directive that is transformed into: John Doe Jane Doe CustomerCtrl looks like: .controller('CustomerCtrl', function() { var customerList = angular.element('[customer-list]'), firstCustomer = customerList.children('option:first'); // firstCustomer is length === 0 at this point, so // this code does not work firstCustomer.prop('selected', 'selected'); }); My solution was to do this: .controller('CustomerCtrl', function($timeout) { var customerList = angular.element('[customer-list]'); // this works $timeout(function() { customerList.children('option:first').prop('selected', 'selected'); }); }); What I'm wondering is, is this the appropriate way to do this--using a $timeout()? Is there a best practice about this?
has comment: http://stackoverflow.com/comment/38311713
type: Question
has comment: http://stackoverflow.com/comment/38311375
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/38170894
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24629276
has text: Actually, this DOES work - my old JS was just cached. Thanks for a much better solution to what I was doing :)

http://stackoverflow.com/a/24674917
has comment: http://stackoverflow.com/comment/38267142
answers question: http://stackoverflow.com/q/24674616
has body: You can call a function defined in a java file (of GWT client module) by exporting that function. Let's assume there is a class A.java which is also your entry point class. This class contains someMethod() which you need to call from javascript passing some parameters. The content of your class A would be something like public class A implements EntryPoint { public static functionExported = false; public void onModuleLoad() { ExportToBeCalledFromJs(); // other code goes here } public static native void ExportToBeCalledFromJs() /*-{ $wnd.toBeCalledFromJs = $entry(function(s1, s2) { return @com.practice.gwt.client.A::someFunction(); }); @com.practice.gwt.client.A:functionExported = true; }-*/; } Above code exports the function and makes it available to javascript. You can simply call toBeCalledFromJs(param1, param2) fromyour js where param1 would substitute s1 and param2 would substitute s2. If you wish to add more parameters you can modify $entry(function(s1, s2) in the code above.
score: 0
has comment: http://stackoverflow.com/comment/38266792
type: Answer

http://stackoverflow.com/comment/38298566
has text: @RezaRahmati I have fixed it in the comment of Bala's answer
comment on: http://stackoverflow.com/q/24697545
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/57150275
comment on: http://stackoverflow.com/a/24603399
type: AnswerComment
score: 1
type: Comment
has text: @Shri `$.get("http://isbndb.com/api/v2/xml/mykey/books?q=science") // XMLHttpRequest cannot load http://isbndb.com/api/v2/xml/mykey/books?q=science&_=1452400793835. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://stackoverflow.com' is therefore not allowed access.`

http://stackoverflow.com/a/24590775
has body: Have you tried to use JSON.stringify to post your data? $.ajax({ type :'POST', url :'./checkregistration.php', data : JSON.stringify({ Voornaam : Voornaam, Achternaam : Achternaam, Straat : Straat, Huisnummer : Huisnummer, Postcode : Postcode, Woonplaats : Woonplaats, Telefoon: Telefoon, Naamrekeninghouder: Naamrekeninghouder, Rekeningnummer : Rekeningnummer, Email : Email, Username : Username, Password : Password }), error:function(data){ $(".errormsgbox").html("Er is een fout opgetreden in de uitvoering van JavaScript"); }, success:function(data){ $(".errormsgbox").empty().html(data); } });
type: Answer
has comment: http://stackoverflow.com/comment/38097200
score: 0
has comment: http://stackoverflow.com/comment/38097023
answers question: http://stackoverflow.com/q/24590456

http://stackoverflow.com/q/24662014
has comment: http://stackoverflow.com/comment/38304929
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38239945
tagged with: vim
has body: I'm trying to get the Better Rainbow Parentheses working on Javascript files. I use the vim-javascript and vim-javascript-syntax for syntax, but I can't seem to get the parentheses to highlight. I'm using the following: au VimEnter * RainbowParenthesesToggle au Syntax * RainbowParenthesesLoadRound au Syntax * RainbowParenthesesLoadSquare au Syntax * RainbowParenthesesLoadBraces
answer count: 0
downvote count: 0
score: 1
has title: Javascript parentheses Coloring.
has comment: http://stackoverflow.com/comment/38267057
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38283295
has comment: http://stackoverflow.com/comment/38319082
upvote count: 1
favorite count: 0

http://stackoverflow.com/q/24590737
has answer: http://stackoverflow.com/a/24599423
score: 1
upvote count: 1
type: Question
tagged with: gwt
tagged with: charts
type: AnsweredQuestion
has body: I'm trying to create a PieChart widget for use in GWT project using external javascript file. How I get class instance from external js library in native function GWT ? public class PieChart implements IsWidget{ Canvas c; public PieChart() { c = Canvas.createIfSupported(); init(c.getElement()); } private native void init(Element e) /*-{ var data = []; var ctx = e.getContext("2d"); var myNewChart = new Chart(ctx); myNewChart.Doughnut(data,{animateScale: true}); }-*/; private native void add(PieChartData p) /*-{ var data = [{ value: p.value, color: p.color, hightlight: p.hightlight, label: p.label }]; myNewChart.addData(data); // &lt;-- null }-*/; @Override public Widget asWidget() { return c; } } I have a problem with adding value to the chart. Please help me. Thank you. I want to create a class PieChart as a widget using the Canvas in GWT and to can use the chart. Using the class PieChart : AbsolutePanel panel = new AbsolutePanel(); PieChart p = new PieChart(); panel.add(p); Compiling a project - chart is displayed. I want to dynamically add data to the chart. I don't know what to do to initialize the object with native js and use it in other methods. A reference to the variable myNewChart displays error - NullPointer, because it myNewChart variable is not initialized. I would in this way add data : AbsolutePanel panel = new AbsolutePanel(); PieChart p = new PieChart(); panel.add(p); p.add(data); I don't know how to do it ;/ Exactly want in GWT to create a class that I could use the charts, using external js file from this page: http://www.chartjs.org/docs/
accepted answer: http://stackoverflow.com/a/24599423
tagged with: native
has comment: http://stackoverflow.com/comment/38097438
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38097071
has title: GWT - native js chart

http://stackoverflow.com/comment/128033927
comment on: http://stackoverflow.com/a/38928102
score: 0
type: Comment
has text: I tried this for some python/Dash development ... It is working like a charm !
type: AnswerComment

http://stackoverflow.com/q/24744935
has comment: http://stackoverflow.com/comment/38389207
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: for-in-loop
has comment: http://stackoverflow.com/comment/38391526
has title: How to stop a innerHtml table repeating itself over and over and over again?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/38389185
favorite count: 0
has comment: http://stackoverflow.com/comment/38389764
type: UnansweredQuestion
tagged with: innerhtml
has comment: http://stackoverflow.com/comment/38389179
has body: I have made an array with objects that get there info from three different user variables, however on one of these there are many sub variables that i don't want it to repeat itself every time the user presses the select button(which updates the table) instead i want it to just add onto (or take away) from the sections that it already has in the table. thanks(if you need the variable code let me know) please help!! i really need a solution!! //creating array var gProducts = new Array(); var gTotalCost = 0; // Adding Products to array gProducts function addProduct { var product = new Object(); product.name = name; product.cost = cost; gProducts.push(product); gTotalCost += parseInt(cost) } //Getting products from array, use of for in loop setting new table rows in blank var for each array item function renderProducts() { var HTMLadd = "" for (var i in gProducts) { if( gProducts[i].cost &gt; 0){ HTMLadd = HTMLadd + "&lt;tr&gt;"+ "&lt;td class='tableSettings00' id=tableRow2 &gt;" + gProducts[i].name + "&lt;/td&gt;"+ "&lt;td class='tableSettings'&gt;€&lt;span id=tableRow2part2&gt;" + gProducts[i].cost + "&lt;/span&gt;&lt;/td&gt;"+ "&lt;/tr&gt;"; } else { } } document.getElementById('tableRow').innerHTML = HTMLadd; }
has comment: http://stackoverflow.com/comment/38389155
has comment: http://stackoverflow.com/comment/38389410
score: 1
has comment: http://stackoverflow.com/comment/38389222
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/24762587

if-statement
tags question: http://stackoverflow.com/q/24617994
tags question: http://stackoverflow.com/q/24745590
tags question: http://stackoverflow.com/q/24697713
tag name: if-statement
type: Tag
tags question: http://stackoverflow.com/q/24710761
tags question: http://stackoverflow.com/q/24591406
tags question: http://stackoverflow.com/q/24619585
tags question: http://stackoverflow.com/q/24641150
tags question: http://stackoverflow.com/q/24622210
tags question: http://stackoverflow.com/q/24724257
tags question: http://stackoverflow.com/q/24653479
tags question: http://stackoverflow.com/q/24593539

http://stackoverflow.com/comment/38390136
type: Comment
comment on: http://stackoverflow.com/a/24745153
type: AnswerComment
has text: This uses the display:none and then removes it which he does not want
score: 0

http://stackoverflow.com/comment/38201543
has text: I really am a noob here. XD What do you mean "page with the source to be downloaded."? Thanks :))
type: Comment
comment on: http://stackoverflow.com/a/24632457
score: 0
type: AnswerComment

http://stackoverflow.com/q/24656542
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38222564
has title: Calculating the distance (in pixels) between the edge of one element and the edge of the body?
linked to: http://stackoverflow.com/q/288699
type: Question
has body: For instance, I have a div, with a margin of, say, 20%, and I want to find the distance between [the left side of] it and [the left side of] the body. Is there a way of doing this that supports all major browsers and is guaranteed to work for at least the latest versions (eg. ie 7+, safari 3+, firefox (whatever they're up to now)+, etc.), and is possibly contained inside of other elements? et cetera and the css #outer{ margin:10%; padding:5%; border:1px solid #000000; } #calculateDistance{ margin:20% border:3em solid #000000; }
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38223717
has comment: http://stackoverflow.com/comment/38240690
has comment: http://stackoverflow.com/comment/38223340
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/38222085

http://stackoverflow.com/q/24684696
has answer: http://stackoverflow.com/a/24684793
type: Question
tagged with: firefox
tagged with: javascript
has body: I get the utils of the window like this: var utils = Services.wm.getMostRecentWindow('navigator:browser'). QueryInterface(Components.interfaces.nsIInterfaceRequestor). getInterface(Components.interfaces.nsIDOMWindowUtils); then running this code says its not a function: Services.prompt.alert(null, 'is modal?', utils.isInModalState()) //Exception: utils.isInModalState is not a function even though it says in the documentation it is. I am not able to run this code either: utils.enterModalState() It runs without error but the window does not enter or leave modal state.
tagged with: firefox-addon
upvote count: 1
answer count: 1
favorite count: 0
has title: nsIDOMWindowUtils.isInModalState() not working
tagged with: xpcom
accepted answer: http://stackoverflow.com/a/24684793
has comment: http://stackoverflow.com/comment/38276627
has comment: http://stackoverflow.com/comment/38274855
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/a/24717734
downvote count: 0
answers question: http://stackoverflow.com/q/24703698
type: Answer
upvote count: 14
score: 14
has comment: http://stackoverflow.com/comment/38625092
has comment: http://stackoverflow.com/comment/38622067
accepted answer of: http://stackoverflow.com/q/24703698
has body: The HTML5 datetime-local input type will give you a string value back, which contains the date and time in ISO8601 format, with minute precision, and without any time zone offset. For example: 2014-07-12T01:00 The JavaScript date object is notoriously inconsistent when it comes to parsing dates from strings. In most implementations, when you provide a string like this, it erroneously assumes the value is in UTC. Therefore, the Date object you get back will be adjusted by the time zone offset from your local computer. There are two approaches to work around the problem: Option 1 Manipulate the string to a format that will likely be interpreted as local time by the Date object's parser. Specifically, replace the dashes (-) with forward slashes (/) and replace the T with a space. var s = $("#startDate").val(); var startDate = new Date(s.replace(/-/g,'/').replace('T',' ')); Option 2 Use a library with more capable date parsing abilities. There are several available. One of the most popular is moment.js. Moment.js has lots of options, but it just so happens that the default behavior is exactly what you need. So you can just pass the string to the moment constructor without any parameters. var s = $("#startDate").val(); var startDate = moment(s).toDate();
has comment: http://stackoverflow.com/comment/38626416
type: AcceptedAnswer

http://stackoverflow.com/comment/38151023
type: QuestionComment
comment on: http://stackoverflow.com/q/24618265
type: Comment
has text: navigate to a url with a doctype, or document.write() a valid html document.
score: 0

showmodaldialog
tags question: http://stackoverflow.com/q/24693756
type: Tag
tag name: showmodaldialog

http://stackoverflow.com/a/28540537
accepted answer of: http://stackoverflow.com/q/24662398
upvote count: 2
type: AcceptedAnswer
has body: After some try and error I found a solution: add a plane and than transform the single vertices. // need to setup 'step', 'xStart', 'xEnd', 'yStart', 'yEnd' // calc the variables var width = Math.abs(-xStart+xEnd), height = Math.abs(-yStart+yEnd); var stepsX = width*step, stepsY = height*step; var posX = (xStart+xEnd)/2; var posZ = (yStart+yEnd)/2; // add a plane and morph it to a function var geometry = new THREE.PlaneGeometry( width, height, stepsX - 1, stepsY - 1 ); geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) ); var size = stepsX * (stepsY), data = new Float32Array( size ); var count = 0, scope = {}; mesh = new THREE.Mesh( geometry, new THREE.MeshNormalMaterial( { side : THREE.DoubleSide, transparent: true, shading: THREE.SmoothShading, opacity : _opacity })); mesh.updateMatrixWorld(); // calc y value for every vertice for ( var i = 0; i &lt; size; i ++ ) { // calculate the current values // http://stackoverflow.com/questions/11495089/how-to-get-the-absolute-position-of-a-vertex-in-three-js var vector = mesh.geometry.vertices[i].clone(); vector.applyMatrix4( mesh.matrixWorld ); // set them into the scope scope.x = vector.x + posX; scope.y = vector.z + posZ; // calculate point and write it in a temp array data[i] = math.eval(term, scope); } // push the new vertice data for ( var i = 0, l = geometry.vertices.length; i &lt; l; i ++ ) { geometry.vertices[ i ].y = data[ i ]; } // update the new normals geometry.computeFaceNormals(); geometry.computeVertexNormals(); // add to scene scene.add( mesh ); Only issue is that it is not working for non static functions like tan(x). This snippet is using math.js to calc the term. Greetings Mat
has comment: http://stackoverflow.com/comment/67571923
type: Answer
has comment: http://stackoverflow.com/comment/67547834
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24662398

http://stackoverflow.com/comment/38234086
comment on: http://stackoverflow.com/a/24660808
has text: @Marko, my alternative is exactly what you posted above... so i gave you the up-vote
score: 0
type: AnswerComment
type: Comment

atomic
type: Tag
tags question: http://stackoverflow.com/q/24687011
tag name: atomic

http://stackoverflow.com/q/24699077
tagged with: ember-app-kit
answer count: 1
tagged with: javascript
score: 0
tagged with: ember.js
has answer: http://stackoverflow.com/a/25196950
has comment: http://stackoverflow.com/comment/38304933
has body: I'd like to know if there is a way to check if a controller exists using Ember, then associate it to a view? I'm going through a list of element coming from an array, and depending of those element, I generate a view, and sometimes I need to associate a controller to this view. I'm using Ember AppKit. export default Ember.CollectionView.extend({ init: function () { this._super(); var self = this; myList = [{name: 'element-1'}, {name: 'element-2'}]; myList.forEach(function (element) { self.push(Ember.View.create({ templateName: 'path/to/template/'+element.name, controller: 'path/to/controller/'+element.name //Associate the controller only if it exists, I don't know how to do that. })); }); } }); Thanks
type: UnansweredQuestion
has title: Associate controller to a view if the controller exists using emberjs
tagged with: model-view-controller
type: Question

http://stackoverflow.com/q/24634537
score: 1
has title: How do I highlight and save text in HTML using JavaScript?
downvote count: 1
type: Question
tagged with: javascript
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38182043
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24635235
has comment: http://stackoverflow.com/comment/38180974
has body: I want to highlight text and save the selection so that next time I view the page, it will display with the same text highlighted. I tried to get the index of selected text but the index is related only to the HTML tag, not related to all the page text. This is what I have: &lt;script&gt; function highlight() { range = window.getSelection(); var st = range.anchorOffset; var en = range.focusOffset - range.anchorOffset; alert(st); alert(en); } &lt;/script&gt; I don't know how to get selected text attributes which can help me to save my highlight in the next open to the HTML file.

http://stackoverflow.com/a/24738754
has body: In your HTML you have: &lt;input type="button" id="farbwechsel_button" value="Rot" /&gt; But in your JS you refer to $('#farbwechel_button').click(function() { Note the forgotten s in your JS. So the JS should be: $('#farbwechsel_button').click(function() { Edit: you've forgotten the s in al your referrals to the button. Don't forget to add it everywhere. You've also forgotten a ; just before the last console.log() function. Edit 2: Here's a Fiddle with a working example. It's pretty much self explanatory. In this case you preferably should make use of classes which you toggle on pressing the button.
has comment: http://stackoverflow.com/comment/38378227
upvote count: 2
has comment: http://stackoverflow.com/comment/38377944
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24738715
has comment: http://stackoverflow.com/comment/38401783
answers question: http://stackoverflow.com/q/24738715
type: Answer
has comment: http://stackoverflow.com/comment/38378500
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38379151

http://stackoverflow.com/comment/38124434
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24593334
has text: oh btw.. i noticed in the config.xml file has the WLActionSenderPlugin feature. I assume that sendActionToNative & sendActionToJS are actually using this plugin. Assuming that this is right, then most probably, using either plugin or sendActionToNative will have the same effect. The good thing that I can see in using sendActionToNative is that it will be simpler to implement. (I think.. :P)
type: AnswerComment

http://stackoverflow.com/q/24664657
score: 2
downvote count: 0
answer count: 0
type: UnansweredQuestion
has body: Hi everybody and thanks for reading, Basically, what I'm trying to do is activate a URL (which has a resulting jQuery plugin effect) from clicking a URL on a different page. As it stands, it does nothing other than link to the actual anchor tag without any effect. Weirdly though, if I refresh the page by pressing F5, this DOES activate the anchor tag with the proper effect. Some information: jQuery installation v1.5 jQuery plugin quicksand v1.2.1 jQuery: $( document ).ready(function() { if (window.location.hash.length > 0) { $(window.location.hash).click(); } }); HTML (initiating hyperlink with ID of 'ext'): Gallery Exterior Kitchen Lounge Bedroom Bathroom Hall Scenery HTML (targeted hyperlink with ID of 'ext'): All Exterior Kitchen Lounge Bedroom Bathroom Hall Scenery Misc Thank you.
type: Question
has title: Activating URL from Another Page URL Using jQuery
upvote count: 2
tagged with: url
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/38124401
score: 1
comment on: http://stackoverflow.com/q/24604847
type: Comment
type: QuestionComment
has text: I have no idea what is your question. Could you simplify the problem you are having? Also how is the file reading supposed to happen in javascript, what is the variable fse?

http://stackoverflow.com/comment/38171519
type: Comment
comment on: http://stackoverflow.com/q/24629092
has text: ah wait , is the cordova.js that inside the platforms/www ? or should that file be in the main www dir ?
score: 0
type: QuestionComment

http://stackoverflow.com/q/24701929
has title: Switch Statement and Functions
tagged with: function
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38306718
tagged with: variables
favorite count: 0
type: UnansweredQuestion
has body: This code is meant to create a revised BMI using a switch statement to factor in muscle mass. I can't understand why the switch statement is not working. I've console logged all of the values that are part of the switch statement, but for some reason it always returns the default response. If anyone could give me an insight into why this isn't working, I'd be grateful. var heightInputFeet = 5; var inches = 11; var footToMeter = parseFloat((heightInputFeet * 0.3048) + (0.3048 / 12) * inches).toFixed(2); var inputWeight = 82; var bench = 30; var squat = 60; var curl = 25; var pullUps = 24; var liftStats = new Object(); liftStats.bench = bench; liftStats.squat = squat; liftStats.curl = curl; liftStats.pullUps = pullUps; liftStats.pullUpPower = (pullUps * inputWeight) / 10; function baseStats() { this.height = footToMeter; this.weight = inputWeight; this.BMI = this.weight / Math.pow(footToMeter, 2); } var userStats = new baseStats(); var sum = bench + squat + curl + liftStats.pullUpPower; // sum equals 311.8 function revisedBMI(n){ //38 - 54 var diff = 450 - n; // switch(diff){ case (diff &lt; 180 &amp;&amp; diff &gt; 120): function lower() { return liftStats.muscleBMI = userStats.BMI - (diff / 50); } lower(); break; case (diff &gt; 60 &amp;&amp; diff &lt; 120): function mid(){ return liftStats.muscleBMI = userStats.BMI - (diff / 50); } mid(); break; case (diff &lt; 60 &amp;&amp; diff &gt; 0): function adv(){ return liftStats.muscleBMI = userStats.BMI - (diff / 50); } adv(); break; case (diff &lt; 0): function mega(){ return liftStats.muscleBMI = userStats.BMI - (diff / 50); } mega(); break; default: console.log("please enter a value..."); break; } } revisedBMI(sum);
upvote count: 0
has comment: http://stackoverflow.com/comment/38306854
has answer: http://stackoverflow.com/a/24701990
tagged with: switch-statement
type: Question
tagged with: object

http://stackoverflow.com/a/24623438
upvote count: 1
downvote count: 1
score: 0
has body: I prefer these kind of things like following. var select = $(".select").append(' TEXT '); select = select.replace("VALUE",optionValues[i]).replace("TEXT",revList[i].innerHTML); Using this way I don't really worry for quotes.
has comment: http://stackoverflow.com/comment/38161065
has comment: http://stackoverflow.com/comment/38160992
answers question: http://stackoverflow.com/q/24623361
type: Answer

http://stackoverflow.com/comment/38285857
comment on: http://stackoverflow.com/q/24690603
type: Comment
type: QuestionComment
score: 1
has text: I haven't touched Google Maps API for some time, so I can't give you a quick code solution, but hope this can help you: https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap

http://stackoverflow.com/comment/38189540
type: Comment
comment on: http://stackoverflow.com/a/24588458
type: AnswerComment
has text: can you please help me with this question - http://stackoverflow.com/questions/24632474/checking-if-busboy-finish-event-has-already-occured-or-not
score: 0

http://stackoverflow.com/comment/38141565
has text: Sorry; missed the special characters point on the first pass. It works now.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24613914

http://stackoverflow.com/a/45394461
has comment: http://stackoverflow.com/comment/83782081
has comment: http://stackoverflow.com/comment/85648266
has comment: http://stackoverflow.com/comment/93801696
has body: A modern native solution if anyone is interested: const arr = Object.keys(obj).map(key =&gt; ({ key, value: obj[key] })); or (not IE): const arr = Object.entries(obj).map(([key, value]) =&gt; ({ key, value }));
answers question: http://stackoverflow.com/q/24674630
score: 55
has comment: http://stackoverflow.com/comment/93303497
type: Answer
has comment: http://stackoverflow.com/comment/93897030
upvote count: 56
downvote count: 1
has comment: http://stackoverflow.com/comment/93362245

http://stackoverflow.com/a/24676719
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24675962
answers question: http://stackoverflow.com/q/24675962
upvote count: 1
type: Answer
downvote count: 0
has body: Ok just to follow up on my comments. (this is stricly not a complete answer but point in the right directions). You could for example have function like this: function display_chart_options(main_title,yaxis_title) { return { chart: { renderTo: 'container' /*type: ''*/ }, title: { text: main_title }, xAxis: { categories: [] }, yAxis: { title: { text: yaxis_title }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', y: 15, borderWidth: 0, itemStyle: { color: '#333', fontSize: '15px', }, navigation: { activeColor: '#3E576F', animation: true, arrowSize: 12, inactiveColor: '#CCC', style: { fontWeight: 'bold', color: '#333', fontSize: '15px', } } }, tooltip: { shared: true, crosshairs: true }, plotOptions: { series: { marker: { lineWidth: 1 } } }, series: [] }; } and then in your click handlers: $( "#klikk1" ).click(function() { var options = display_chart_options('Veiði','Fjöldi'); $.get('prof4.csv', function(data) { // Split the lines var lines = data.split('\n'); $.each(lines, function(lineNo, line) { var items = line.split(';'); // header line containes categories if (lineNo == 0) { $.each(items, function(itemNo, item) { if (itemNo &gt; 0) options.xAxis.categories.push(item); }); } // the rest of the lines contain data with their name in the first position else if(lineNo != 0 &amp;&amp; items != null ) { var series = { data: [], visible:false, /* type: 'line'*/ } $.each(items, function(itemNo, item) { if (itemNo == 0) { series.name = item; } else if(itemNo !=0) { series.data.push({ y: parseFloat(item), }); } }); options.series.push(series); } }); var chart = new Highcharts.Chart(options); }); });

http://stackoverflow.com/a/26004111
type: AcceptedAnswer
has body: Create a file with the script: &lt;script type="text/javascript"&gt; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/client:plusone.js?onload=render'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); &lt;/script&gt; Then add a Ext.Button with the ID 'myButton'. After that you need to call // Additional params var additionalParams = { 'theme' : 'dark' }; gapi.signin.render('myButton', additionalParams);
type: Answer
accepted answer of: http://stackoverflow.com/q/24663411
answers question: http://stackoverflow.com/q/24663411
score: 0

http://stackoverflow.com/q/24742438
downvote count: 0
has title: Loading content only
tagged with: jquery
favorite count: 0
has body: I am using a $_GET function to load content into the website, what I want to do is add a Loading image into all that mess. Right now it looks like it opens a whole new page. Code: <?php if (isset($_GET['page']) || isset($_POST['page'])) { $page = trim(isset($_POST['page']) ? $_POST['page'] : $_GET['page']); if (preg_match("/a-z/", $page)) { } } else { $page = "index"; } ?> Example Home Test Beta <? if ($page != '') include('pages/'.$page . '.php'); else { include('pages/error.php'); } ?> Now, it works perfectly but I'd want it to show a Loading... image while loading the content , and instead of reloading whole page would be great to load the content div ONLY. I did not try javascript solution since I didn't find anything that would work correctly and would keep the links working (for example http://example.com/index.php?page=test with already loaded the text.php file from pages folder). Plus I'm a real newbie in javascript so I have no idea what to start with.
possible better answer: http://stackoverflow.com/a/24742577
has answer: http://stackoverflow.com/a/24742849
tagged with: php
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/24742849
tagged with: javascript
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/24742577

http://stackoverflow.com/comment/38167748
has text: Nothing happen when I give class to radio button. I already checked this before posting. I think that class is used for just div only not for radio button.
type: Comment
comment on: http://stackoverflow.com/a/24627282
score: 0
type: AnswerComment

http://stackoverflow.com/q/24659287
has comment: http://stackoverflow.com/comment/38227901
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/38227613
type: Question
has comment: http://stackoverflow.com/comment/38227506
has comment: http://stackoverflow.com/comment/38228680
has comment: http://stackoverflow.com/comment/38229049
tagged with: javascript
tagged with: jquery
upvote count: 2
linked to: http://stackoverflow.com/q/5874652
downvote count: 1
tagged with: kendo-asp.net-mvc
has comment: http://stackoverflow.com/comment/38238929
has comment: http://stackoverflow.com/comment/38228377
has comment: http://stackoverflow.com/comment/38228119
favorite count: 0
has comment: http://stackoverflow.com/comment/38228788
has title: For-In and attribute issue in Javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38235578
has comment: http://stackoverflow.com/comment/38227701
has body: I'm currently creating a function that goes through an array and checks to see if values exist. If values do exist then it's suppose to allow the checkboxes to be clicked. The problem is for some reason it isn't enabling the checkboxes. It is going into the if statement as the alert is printing but it isn't changing the attributes. Changing from attr to prop makes no difference in this case either way it isn't doing what its suppose to. This is the updated code I have.. var values = this.value(); var total = ["1", "2", "3", "4", "5"]; var group = ""; for (number in values) { if ($.inArray(values[number], total) != -1) { group = "group" + values[number]; $("input." + group).prop("disabled", false); alert("Group: " + group + " Values: " + values[number] + " The values DO match"); } else { group = "group" + values[number]; $("input." + group).prop("disabled", true); $("input." + group).prop("checked", false); alert("Group: " + group + " Values: " + values[number] + " The values do not match"); } } Now the code I'm listing below completely works. The only difference is hardcoded class values versus variables above. if ($.inArray("1", values) != -1 || $.inArray("2", values) != -1) { $("input.group1").prop("disabled", false); } else { $("input.group1").prop("disabled", true); $("input.group1").prop("checked", false); } I am using Kendo UI MVC. I've copied the source information for the Multiselect. Here is the JFiddle with the code. http://jsfiddle.net/gS2C8/

http://stackoverflow.com/comment/38285061
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24690114
has text: @user3827886 Take a look bala answer please he is right

http://stackoverflow.com/comment/38393169
type: Comment
has text: `$filter('CommentDate')` is asking angular to find another `.filter` that is named `CommentDate` and use `new Date(input), 'dd MMM yyyy'` as its input. Is this what you are expecting?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24747039

http://stackoverflow.com/q/24598832
type: Question
has comment: http://stackoverflow.com/comment/38372513
tagged with: zend-framework
has comment: http://stackoverflow.com/comment/38112251
answer count: 1
tagged with: javascript
tagged with: ajax
score: 0
has body: I created a small function to test Zend-Ajax interaction. In my view I set following code Click Then, I created following function within file custom.js, already associated to the layout function ajaxtest() { $.post(urlform, null, function(data) { if (data.success) { alert('Ok'); } else { alert('Failed'); } }, 'json'); } And finally, this is the code of my addMessageAction public function addMessageAction() { $request = $this->getRequest(); $response = $this->getResponse(); $response->setContent(\Zend\Json\Json::encode(array('success'=>1))); return $response; } When I click on the div associated to the javascript function, nothing happens, no alert is displayed. Where am I wrong? Does it depend on particular zend settings?
has title: Zend 2: problems with Ajax
has comment: http://stackoverflow.com/comment/38152510
tagged with: zend-framework2
has comment: http://stackoverflow.com/comment/38130024
has answer: http://stackoverflow.com/a/24767437
has comment: http://stackoverflow.com/comment/38114133
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/a/24728955
upvote count: 2
has comment: http://stackoverflow.com/comment/38381631
has body: First, Your template name is wrong: data-template="display-associaitive-many" id="display-associaite-many" Second, JavaScript arrays don't work like that. Plain JS (no Kendo involved): var array = []; array["One"] = { Id: "id/one" }; array["Two"] = { Id: "id/two" }; array["Three"] = { Id: "id/three" }; array; // prints "[]" array.length; // prints 0 Associative arrays should be represented as objects http://www.laurencegellert.com/2012/01/associative-arrays-in-javascript/ which you can then wrap into a Kendo ObservableObject. However, that means it isn't really an array with a length, so you can't bind it to a Kendo ListView. Off the top on my head, the only way I can think of to represent that as a associative array (object) and still bind it to a ListView would be to bind your ListView to a function that then translates your object to an array. Tracking changes gets a little weird then though... In response to your comments and updates to the original post: I'm typing this off the top of my head, so my apologies if it doesn't work if you directly copy/paste it, but assuming you have a DataSource laoding the data, you could use the schema.parse method to turn your data into an actual array, like: var _parseTheData = function (data) { var array = []; var item; for(var name in data) { item = data[name]; item.Name = name; array.push(item); } return array; }; var ds = new kendo.data.DataSource({ transport: { read: { url: "http://wherever.com/theData" }, schema: { parse: _parseTheData } } }); The idea is that if your server returned the object: { "ONE" : { "Id" : "id/one" }, "TWO" : { "Id" : "id/two" }, "THREE" : { "Id" : "id/three" } } Then the parse function would convert it to the Array: [ { "Id" : "id/one", "Name" : "ONE" }, { "Id" : "id/two", "Name" : "TWO" }, { "Id" : "id/three", "Name" : "THREE" } ] Which you can then MVVM bind to a widget like normal. For example a ListLiew: &lt;div data-role="listview" data-bind="source: ds" data-template="item-template"&gt;&lt…
accepted answer of: http://stackoverflow.com/q/24727545
has comment: http://stackoverflow.com/comment/38543458
has comment: http://stackoverflow.com/comment/38497316
has comment: http://stackoverflow.com/comment/38381616
answers question: http://stackoverflow.com/q/24727545
has comment: http://stackoverflow.com/comment/38498619
has comment: http://stackoverflow.com/comment/38560862
has comment: http://stackoverflow.com/comment/38382095
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38524152
has comment: http://stackoverflow.com/comment/38573298
type: Answer
has comment: http://stackoverflow.com/comment/38387513
has comment: http://stackoverflow.com/comment/38543825
has comment: http://stackoverflow.com/comment/38543079
score: 2

http://stackoverflow.com/q/24675429
has comment: http://stackoverflow.com/comment/38256797
favorite count: 0
answer count: 5
has comment: http://stackoverflow.com/comment/38256893
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38257303
has comment: http://stackoverflow.com/comment/38257817
has comment: http://stackoverflow.com/comment/38256859
has comment: http://stackoverflow.com/comment/38257103
possible better answer: http://stackoverflow.com/a/24675592
has comment: http://stackoverflow.com/comment/38256946
has answer: http://stackoverflow.com/a/24675626
has answer: http://stackoverflow.com/a/24675592
downvote count: 2
accepted answer: http://stackoverflow.com/a/24675622
has comment: http://stackoverflow.com/comment/38257577
has answer: http://stackoverflow.com/a/24675615
has comment: http://stackoverflow.com/comment/38258880
type: Question
has title: document.getElementById is returning a null
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24675765
has body: When I run it and give any input number and hit the button it prompts just once. Why is this? Here is my code: &lt;html&gt; &lt;head&gt; &lt;title&gt; Assignment CS101 &lt;/title&gt; &lt;/head&gt; &lt;script&gt; var number; var ary; var x; function input() { prompt("Enter",""); var recieve=document.getElementById('demo'); number=recieve.value; ary = new Array(recieve); for(x=0; x&lt;ary.length; x++) { ary[x]=parseInt(prompt("Enter " + x + " name: ","")); } } &lt;/script&gt; &lt;input type="text" size="25" id="demo"&gt; &lt;button onclick="input();"&gt; Take input &lt;/button&gt;
has comment: http://stackoverflow.com/comment/38256768
has comment: http://stackoverflow.com/comment/38256826
has comment: http://stackoverflow.com/comment/38256746
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/38257052
tagged with: javascript
has comment: http://stackoverflow.com/comment/38256682
has answer: http://stackoverflow.com/a/24675622

http://stackoverflow.com/comment/38224727
has text: That code wouldn't work anyway.
type: Comment
comment on: http://stackoverflow.com/q/24657807
type: QuestionComment
score: 0

http://stackoverflow.com/a/24686484
has body: Issue was resolved by Assemble team.
score: 0
answers question: http://stackoverflow.com/q/24645233
type: Answer

http://stackoverflow.com/q/24665205
has body: I am a complete newbie and just did something like this: var fs = require('fs'); var file = __dirname + '/data.json'; var http = require ('http'); var server = http.createServer(function (req, res){ res.writeHead(200); fs.readFile(file, 'utf8', function (err, data) { if (err) { console.log('Error: ' + err); return; } data = JSON.parse(data); res.end(data); }); }); server.listen(8000); When I am doing: data = JSON.parse(data); console.dir(data); Instead of data = JSON.parse(data); res.end(data); It is able to display the data I have in .json on the console. However when I am trying to create a server and post the data using res.end, it doesn't really work. Could someone offer some insights? Is it because the "data" I have here is only an object? How should I process the data I get from .json in order to use for my html?
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24665263
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
possible better answer: http://stackoverflow.com/a/24665263
type: Question
has comment: http://stackoverflow.com/comment/38238569
accepted answer: http://stackoverflow.com/a/24665251
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
favorite count: 0
has title: How to use Node.js to read data from a json file and display the read data into html?
has answer: http://stackoverflow.com/a/24665251

http://stackoverflow.com/comment/38195495
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24642070
has text: Ps.: The project I am working on is a type checking system for debugging purposes. You could assing types for object variables like `MyClass.fileds = {speed: Number, color: String}`, that are then checked when assigned. And I came around using `Arguments` objects, and it would have been nice just to write `{args: Arguments}`

http://stackoverflow.com/a/26316170
score: 0
has body: You must define the expr:href="data:post.url" via Javascript variable in separated script tag. Simply like this: &lt;script type="text/javascript"&gt; var postlink="&lt;data:post.url/&gt;" &lt;/script&gt; You can place that script before or after your entry-container. Then, call the variable in your script: var summary1 = '&lt;div class="firstWrap"&gt;' + '&lt;h3 class="post-title entry-title"&gt;' + '&lt;/h3&gt;' + '&lt;div&gt;' + removeHtmlTag(div.innerHTML,summ) + '&lt;/div&gt;' + '&lt;span class="readmorebutton"&gt;' + '&lt;a href="'+postlink+'"&gt;' + 'Read More &amp;#187;' + '&lt;/a&gt;' + '&lt;/span&gt;' + '&lt;/div&gt;' + imgtag; div.innerHTML = summary1; } I use this method in my blogger template, and it's works good for me.
type: Answer
answers question: http://stackoverflow.com/q/24742476

http://stackoverflow.com/comment/38106843
comment on: http://stackoverflow.com/q/24595809
score: 0
has text: Ajax comes to mind - with a serialize
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24683678
type: Question
has comment: http://stackoverflow.com/comment/38272738
has comment: http://stackoverflow.com/comment/38272834
has comment: http://stackoverflow.com/comment/38274132
answer count: 1
has comment: http://stackoverflow.com/comment/38273501
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38273462
has title: accessing ng-grid using ng-repeat for delete?
has body: This is my current table, ignore the select all button for now. After doing research and googling, most solutions that involve a deletion from the grid have individual remove buttons on each row. For design/style purposes i'm are against it. The problem arises with the delete button calling delete function within the app-controller that is outside the scope of the ng-grid div class="btn-group"> Delete The button takes 2 parameters, one for id to be deleted from the database, and the other is the row to be deleted. Straight forward only if the data was displayed using ng-repeat. My question is if it is possible to access ng-grid data using ng-repeat? Checking the jdom reveals that the rows and columns are rendered using ng-repeat, and the table itself is under the class ng-Viewport ng-scope.
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24683937
has comment: http://stackoverflow.com/comment/38273349

http://stackoverflow.com/comment/38350070
type: Comment
comment on: http://stackoverflow.com/a/24724330
score: 0
type: AnswerComment
has text: No that breaks it all together. I just get a persistent return of zero.

http://stackoverflow.com/a/24635524
type: Answer
has body: You need to set the parameter traditional to true, and use a js array: $.ajax({ url: url, cache: false, type: 'GET', traditional: true, //&lt;- set this contentType: 'application/json; charset=utf-8', data: { skuID: sku, description: productDescription, qualifiers: [sweetSKUID, drinkSKUID] }, success: function (data) { }, error: function (result) { } });
score: 3
has comment: http://stackoverflow.com/comment/38183407
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24635189
upvote count: 3
answers question: http://stackoverflow.com/q/24635189
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38183566

http://stackoverflow.com/a/24692029
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You need to set animation's fill mode to forwards. Doing this will make the animated element hold the position of its final keyframe after the animation is complete. From this MDN Link Fill mode: forwards The target will retain the computed values set by the last keyframe encountered during execution. The last keyframe encountered depends on the value of animation-direction and animation-iteration-count .card { position: absolute; -webkit-animation: deal .2s 1 ; -webkit-animation-play-state: running; -webkit-animation-timing-function: cubic-bezier(.1,.35,.1,.85); -webkit-animation-fill-mode: forwards; /* Add this and also the corresponding browser specific versions */ } Demo
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/24691908
answers question: http://stackoverflow.com/q/24691908

http://stackoverflow.com/comment/38269064
score: 0
type: Comment
type: QuestionComment
has text: first of all your output is Dude <== chore, Guy <== chore.... is it right? or it should be Dude<==Blue, Guy<==Black??
comment on: http://stackoverflow.com/q/24681638

http://stackoverflow.com/q/24639883
has answer: http://stackoverflow.com/a/24640020
upvote count: 6
score: 5
downvote count: 1
answer count: 1
tagged with: jquery-ui
has body: In the jquery ui site, the draggable examples are fast. But with this markup, the plugin is terribly slow: $("ul.projects").sortable({ items: ".ui-state-default", containment:"parent", cursor:"move", cursorAt:{left: 90} }); Codepen
accepted answer: http://stackoverflow.com/a/24640020
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38191111
tagged with: javascript
tagged with: jquery
has title: Why jquery ui draggable is slow in this example
favorite count: 0
type: Question
tagged with: css

http://stackoverflow.com/q/24663719
has comment: http://stackoverflow.com/comment/38235942
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/24663843
linked to: http://stackoverflow.com/q/907634
tagged with: function
tagged with: javascript
tagged with: jquery
has title: making a jquery function to return elements
has answer: http://stackoverflow.com/a/24663767
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/24664126
has body: I m making a jquery function to return elements. Basically without the function i m writing code as the follows which introduces html line breaks in place text with line breaks. var $li = $('ol#update &gt; li'); $li.each(function(i, e) { var $txt = $(e).find('.com_msg_text'); var txt = $txt.html(); txt = line_break(txt); $txt.html( txt ); }); Now I m writing a function to do the same - function test() { $(this).each(function(i, e) { $(e).html( line_break($(e).html() ) ); }); return this; } and i m calling it through - $('ol#update li').find('.com_msg_text').test(); But this does not run and gives the error Uncaught TypeError: undefined is not a function

http://stackoverflow.com/comment/38161276
comment on: http://stackoverflow.com/a/24623890
type: Comment
score: 0
type: AnswerComment
has text: why can't I put this in a button click event?

http://stackoverflow.com/comment/38376674
type: Comment
has text: OK now i get it. Is it a bad practice to create Class instances without assigning them to variables?
comment on: http://stackoverflow.com/a/24738222
score: 1
type: AnswerComment

http://stackoverflow.com/comment/38160093
has text: Add quotation marks around the attribute value. You are currently producing ` `. If you want quotes, you have to add them. HTML 101.
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24623361

http://stackoverflow.com/a/24703395
has body: I'm not familiar with Angular (playing with plain JS, adjust accordingly) but shouldn't this work? SiteLocs.forEach(function(location){ location.Point.coordinates = location.Point.coordinates.slice(0,-2); });
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24703288
downvote count: 0
type: Answer

http://stackoverflow.com/comment/38353408
score: 1
comment on: http://stackoverflow.com/a/24720643
has text: @sara_123 you can add it directly from `.data(function (d) { return d; })`. Just replace the `return d;` with your own mapping to "features" or whatever you call it.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24608623
has comment: http://stackoverflow.com/comment/38130914
has comment: http://stackoverflow.com/comment/38130867
score: 0
has comment: http://stackoverflow.com/comment/38131091
has body: Working demo Code //For starting of page valNum=$("#phoneCallingCode").val(); $("#nmbr").val(valNum); $("#phoneCallingCode").change(function(){ valNum=$(this).val(); $("#nmbr").val(valNum); }); It means,Get value of selected Drop down option and Set the value of Textbox by the value in valNum variable. And when document is ready , u need contry Number in textbox so The code //For starting of page
has comment: http://stackoverflow.com/comment/38130954
has comment: http://stackoverflow.com/comment/38130968
type: Answer
has comment: http://stackoverflow.com/comment/38130889
answers question: http://stackoverflow.com/q/24608152

http://stackoverflow.com/comment/38321175
type: QuestionComment
has text: Forget about that but a dummy data in it , and please try putting alert("test"); instead of load in your code at your machine
type: Comment
score: 0
comment on: http://stackoverflow.com/q/24709003

http://stackoverflow.com/comment/38305443
comment on: http://stackoverflow.com/a/24699728
score: 0
type: AnswerComment
has text: less code when design a site with an list item and more viewable. ex. old system so far we can approach. 1. Content . 2. Content . 3. Content . can u look how a mess the code? now if we can just like this Content u can see the bytes size and which the more viewable?
type: Comment

http://stackoverflow.com/q/24736756
has body: function order(){ var i = 1; while(i != 0){ if(sessionStorage.getItem("taska"+i)!=null){ var p1 = sessionStorage.getItem("taska"+i); var p2 = sessionStorage.getItem("price"+i); var a = document.createElement('td'); a.innerHTML = sessionStorage.getItem("id"+i); var b = document.createElement('td'); var b1 = document.createElement('img'); b1.src = '/obrazky/taska_'+p1+'.png'; b.appendChild(b1); var c = document.createElement('td'); c.innerHTML = p1; var d = document.createElement('td'); d.innerHTML = ''+p2+' Kč'; var e = document.createElement('td'); var e1 = document.createElement('input'); e1.type = 'number'; e1.setAttribute("id", i); e1.onclick = totalPrice(this); e.appendChild(e1); var f = document.createElement('td'); f.setAttribute("id", "total"+i); f.innerHTML = ''+p2+' Kč'; document.getElementById('tr'+i).appendChild(a); document.getElementById('tr'+i).appendChild(b); document.getElementById('tr'+i).appendChild(c); document.getElementById('tr'+i).appendChild(d); document.getElementById('tr'+i).appendChild(e); document.getElementById('tr'+i).appendChild(f); i++; }else{ i=0; } } } function totalPrice(nofitems){ var x = nofitems.id; var y = nofitems.value*Number(sessionStorage.getItem("price"+x)); document.getElementById('total'+x).innerHTML = y+' Kč'; } I've created function order to insert some html elements. I want to change the element var f when qty of the item is increased. I'm using the totalPrice function to do this, but whenever it's calledm, the console pops up: Uncaught TypeError: Cannot set property 'innerHTML' of null I think, that it isn't able to find the created element by id. Thanks for your help.
possible better answer: http://stackoverflow.com/a/24737165
has answer: http://stackoverflow.com/a/24737165
accepted answer: http://stackoverflow.com/a/24737064
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38374583
has title: Can't change inner HTML
has comment: http://stackoverflow.com/comment/38373862
type: Question
has answer: http://stackoverflow.com/a/24737064
linked to: http://stackoverflow.com/q/4851699
tagged with: javascript
tagged with: dom
score: 0
answer count: 2

http://stackoverflow.com/comment/38384286
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24742407
type: Comment
has text: Use `console.log` to display debugging data, not `alert`

http://stackoverflow.com/comment/38354563
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24726639
has text: Can you just answer and or leave? what a noob user. i ask cause i don't know. so why stackoverflow is? for chat hobby? post a day activies? so funny you are.

http://stackoverflow.com/comment/38601301
comment on: http://stackoverflow.com/a/24718336
type: Comment
has text: I added them there, but I wasn't sure where in that file they needed to go. When I did that, it took down WordPress. The file itself is pretty long, and it's their 2014 theme.
score: 0
type: AnswerComment

http://stackoverflow.com/a/24626399
has body: This is usually called .spread and will be available natively in ES6 via destructuring. So the optimal solution that does not work at the moment is: foo(a).then([a,b,c] =&gt; console.log(a,b,c); /* applied array to args */); RSVP promises do not support spread out of the box at the moment, however with Bluebird or Q it would look something like: foo(a).spread(function(a,b,c){ // array ["a", "b", "c"] was applied into three parameters. }); If you're interested, you can add this yourself to RSVP: RSVP.Promise.prototype.spread = function(fn){ return this.then(function(val){ // just like then return fn.apply(null, val); // only apply the value }); }; This would let you do: RSVP.Promise.resolve([1, 2, 3, 4]).spread(function(one, two, three, four){ console.log(one + two + three + four); // 10 });
type: Answer
answers question: http://stackoverflow.com/q/24626333
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/38167520
accepted answer of: http://stackoverflow.com/q/24626333
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/24656878
has body: There are many different ways to do this, I attached event handlers. I recommend JQuery .on() or .click() events. Also try not to do inline JS, its very bad practice. var Key248Btn = document.getElementById('Key248Btn'); Key248Btn.addEventListener("click", Key248_Click, false); function Key198_Click() { textEntryField.value += "\u00e6"; return false; } http://jsfiddle.net/HGDZ3/3/
answers question: http://stackoverflow.com/q/24656424
has comment: http://stackoverflow.com/comment/38236391
has comment: http://stackoverflow.com/comment/38234073
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/38236747
has comment: http://stackoverflow.com/comment/38261850
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24656424

http://stackoverflow.com/comment/38344077
comment on: http://stackoverflow.com/a/24721103
has text: Liad, this is quite odd. The code that I posted will work as-is, with the controller being just a named function "PlansCtrl". The instant I use ng-app="App", there is an error.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38434418
type: Comment
has text: The PHP code displays the fast food items but there should be another javascript file which runs the functions when the + button is pressed
comment on: http://stackoverflow.com/q/24632835
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38155209
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24620682
has text: Are you sure about 95 degrees? Shouldn't it be 90 degrees? especially for `plane4`.
score: 0

http://stackoverflow.com/q/24720782
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/24721018
tagged with: dom
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 2
has body: I want to access page2.html element containing img tag and update it to the page1.html img tag or replace img of page1.html to page2.html img. Both the files are on same domain so no need to worry about cross domain origin policy. // Page1.html I get DOM Update as [object] [Object] // Page2.html
favorite count: 0
has title: Access iframe element and update it to the DOM
has answer: http://stackoverflow.com/a/24720966

http://stackoverflow.com/q/24722788
tagged with: http://stackoverflow.com/tag/html
tagged with: fancybox
answer count: 4
has answer: http://stackoverflow.com/a/24726964
type: AnsweredQuestion
has title: Fancybox popup close button not showing
has answer: http://stackoverflow.com/a/24722932
downvote count: 0
has answer: http://stackoverflow.com/a/36318638
score: 1
tagged with: fancybox-2
linked to: http://stackoverflow.com/q/9732252
type: Question
tagged with: javascript
tagged with: jquery
has body: any idea why the close button is not appearing in my newsletter popup box? Many thanks &lt;script type="text/javascript"&gt; function openFancybox() { setTimeout(function () { $.fancybox('#newsletterpopup', { modal: true, // this prevents fancybox to close unless close unless ".non-merci" is clicked showCloseButton: true, helpers: { overlay: { css: { 'background': 'rgba(58, 42, 45, 0.3)' } } }, afterShow: function () { // enables a way to close fancybox $(".non-merci").on("click", function () { $.fancybox.close() }); } }); }, 1000); }; $(document).ready(function () { var visited = $.cookie('visited'); if (visited == 'yes') { return false; } else { openFancybox(); } $.cookie('visited', 'yes', { expires: 0.0001 }); }); &lt;/script&gt;
has answer: http://stackoverflow.com/a/60665499
possible better answer: http://stackoverflow.com/a/24722932
upvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/24726964

http://stackoverflow.com/comment/38187664
type: Comment
type: QuestionComment
has text: add if(!document.hasFocus()){return;} to the top of your blur() handler
comment on: http://stackoverflow.com/q/24638129
score: 0

http://stackoverflow.com/a/24652037
has body: Its a groupBy you wanna do. Look at http://linqjs.codeplex.com/ Underscore can also do groupby, probably other libraries too, or create your own. Update: I rolled my own for you function groupBy(items, getKey) { var grouped = {}; for(var i = 0; i &lt; items.length; i++) { var key = getKey(items[i]); if(grouped[key] === undefined) { grouped[key] = []; } grouped[key].push(items[i]); } return grouped; }; http://jsfiddle.net/xgej2/
answers question: http://stackoverflow.com/q/24651893
score: 0
type: Answer

http://stackoverflow.com/a/24696754
type: Answer
has comment: http://stackoverflow.com/comment/38296545
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/24696508
has comment: http://stackoverflow.com/comment/38297122
has body: It much easier to do this &lt;textarea &lt;% for(var attr in fieldAttr) { %&gt; &lt;%= attr %&gt;="&lt;%= fieldAttr[attr] %&gt;" &lt;% } %&gt; &gt;&lt;/textarea&gt; I made a jsfiddle here
downvote count: 0

http://stackoverflow.com/q/24714217
has comment: http://stackoverflow.com/comment/38333446
tagged with: jquery-ui-datepicker
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/69314544
has comment: http://stackoverflow.com/comment/38335746
tagged with: accessibility
linked to: http://stackoverflow.com/q/12459562
favorite count: 0
has body: We are using the jQuery datepicker to show calender control and provide an option to user to select a date from the keyboard without using mouse. While testing the Tab key accessibility for given form, I've noticed that when the focus reaches the date field, the calendar popup appears onscreen, but when I press the Tab key again, the focus shifts to next input control but not to the calender popup. Is there any way to shift the focus to the calendar control as soon as the popup is focused on? HTML &lt;input type="text" value="first input field"&gt; &lt;input type="text" id="myDate"&gt; &lt;input type="text" value="second input field"&gt; JS $(document).ready(function() { $("#myDate").datepicker(); }); Demo Code Fix After giving a try to various code fixes, ended up writing below code to enable accessibility for date picker. $("#datepicker").attr('readonly', 'readonly') .datepicker({}) .keydown(function(event) { event.preventDefault(); event.stopPropagation(); // KEY MAP // [TAB: 9, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40] var code = event.keyCode || event.which; // If key is not TAB if (code != '9') { // And arrow keys used "for performance on other keys" if (code == '37' || code == '38' || code == '39' || code == '40') { // Get current date var parts = $(this).val().split("/"), currentDate = new Date(parts[2], parts[0] - 1, parts[1]); // Show next/previous day/week switch (code) { // LEFT, -1 day case 37: currentDate.setDate(currentDate.getDate() - 1); break; // UP, -1 week case 38: currentDate.setDate(currentDate.getDate() - 7); if (!_.isNull(currentDate)) { $(this).datepicker("setDate", currentDate); return false; } break; // RIGHT, +1 day case 39: currentDate.setDate(currentDate.getDate() + 1); break; // DOWN, +1 week case 40: currentDate.setDate(currentDate.getDate() + 7); break; } } else { return false; } // If other keys pressed.. return false } });
upvote count: 3
has title: Focus on jQuery UI Calender accessibility with TAB key
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24718539
score: 3
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/47344197
has comment: http://stackoverflow.com/comment/47342468

http://stackoverflow.com/a/24687685
answers question: http://stackoverflow.com/q/24687538
has body: You cannot retrieve DOM elements from the page context into casper context. Only primitive types like boolean, number, string, [] and {} are permitted. The quote from the PhantomJS documentation goes like this: Note: The arguments and the return value to the evaluate function must be a simple primitive object. The rule of thumb: if it can be serialized via JSON, then it is fine. Closures, functions, DOM nodes, etc. will not work! You need to do a part of your work in the page context. Like only reducing the elements to an id: casper.then(function(){ var inputFields = this.evaluate(function(){ return Array.prototype.map.call(document.getElementsByTagName('section'), function(sectionItem){ return sectionItem.id; }); }); require("utils").dump(inputFields[1]); }); Although, I don't think that the type section is an input field in your case. You probably mean input fields inside of a section.
score: 0
type: Answer

http://stackoverflow.com/q/24693722
tagged with: validation
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24693744
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24693757
has body: I am working on a form with multiple fields and of course, a submit button. How do I cancel the form submission if some fields are empty? I tried putting a validation of javascript, input type="submit" onclick="check()" on the submit button. But what I actually want is that, the page won't load so that, all other information in the text fields won't go away. Like, what if the form has 100 fields and the user forgot to input one field and click the submit, it will show him an error message and all other fields will be cleared so he has to type it again. I'm trying to prevent that. I have multiple options to create this effect but I am currently trying to find a way on doing this. Any other ways would be appreciated (like disabling the button when all mandatory fields are not filled, then enabling it at when everything is complete)
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38290883
tagged with: forms
has title: Cancel form submission when entries are invalid
score: 0
answer count: 2

http://stackoverflow.com/a/24657817
upvote count: 1
type: AcceptedAnswer
has body: You can use underscore or lodash or a custom array intersection function: var array = ['dies','jam', 'jug', 'march', 'one', 'men', 'all'], testText = "If one of them dies I will notice that one off my men is missing"; var diff = _.intersection(array, testText.split(' ')); console.log(diff); --> ["dies", "one", "men"] http://jsfiddle.net/S65Vd/1/
type: Answer
has comment: http://stackoverflow.com/comment/38224714
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38225353
accepted answer of: http://stackoverflow.com/q/24657731
answers question: http://stackoverflow.com/q/24657731

http://stackoverflow.com/q/24600219
has comment: http://stackoverflow.com/comment/38114690
has title: Perform default on event object in Javascript
has comment: http://stackoverflow.com/comment/38114775
score: 1
type: Question
has comment: http://stackoverflow.com/comment/38114889
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/38114841
has comment: http://stackoverflow.com/comment/38114627
has comment: http://stackoverflow.com/comment/38114877
has body: Suppose I have the following touchmove handler var lastY = -1; $('body').on({ 'touchmove' : function(event) { var currentY = event.originalEvent.touches[0].pageY; if(lastY === -1) { event.preventDefault(); } else if (lastY &gt; currentY) { //Perform default here } else if (lastY &lt; currentY) { event.preventDefault(); } lastY = currentY; } }); How can I perform the default or reenable this event if later in the touch I decide that I no longer want to prevent default? Very importantly, I want to perform the default on this exact event object so merely unbinding the touchmove handler will not work because event will still have it's default turned off.
has comment: http://stackoverflow.com/comment/38115136
has comment: http://stackoverflow.com/comment/38114860
answer count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/24636451
tagged with: javascript
has comment: http://stackoverflow.com/comment/38184490
type: UnansweredQuestion
has body: I am trying to understand CustomEvent in Javascript, but I don't think I am in the right mindset. Is CustomEvent an alternative to time-sensitive actions such as changes to dataset or other properties in the DOM? Take this non-sensical situation for example: Let's say every 5 seconds I have a div that will change color and I want to display a modal window with a notification each time that the div is a new color. Can CustomEvent be used as a listener for the modal window so that it knows when the div has changed color or is this only possible with setInveral/setTimeout?
has comment: http://stackoverflow.com/comment/38184704
has comment: http://stackoverflow.com/comment/38185259
answer count: 0
has title: Custom Timing Event Listener
has comment: http://stackoverflow.com/comment/38185444
type: Question
has comment: http://stackoverflow.com/comment/38184555
has comment: http://stackoverflow.com/comment/38184396
score: 0
has comment: http://stackoverflow.com/comment/38184550
has comment: http://stackoverflow.com/comment/38184862
has comment: http://stackoverflow.com/comment/38184622

http://stackoverflow.com/a/24725610
has body: The following regex (line 55) produces an error in Firebug (SyntaxError: invalid range in character class) : /[^a-zA-Z0-9_-.@]/ Try this one instead : /[^\w-]+/gi Works for me now in FF and IE 11.
score: 0
answers question: http://stackoverflow.com/q/24725447
type: Answer

http://stackoverflow.com/a/24698659
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/24698633
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the event binding call. As you are replacing elements using ajax. You need to use Event Delegation using .on() delegated-events approach. Use $("#myDiv").on('change', "#xxxx", function(){ //Your code }); The delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time. By picking an element that is guaranteed to be present at the time the delegated event handler is attached, we can use delegated events to bind the click event to dynamically created elements and also to avoid the need to frequently attach and remove event handlers.
accepted answer of: http://stackoverflow.com/q/24698633

http://stackoverflow.com/comment/39293085
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25130996
has text: Really appreciate the help, but the Regenerator sample is broken. So are you saying changing all 2400 calls to doDialog is unavoidable as they too need to be marked as generator functions? Is there no way to encapsulate it such that the calling code doesn't need to be modified in any way?
type: AnswerComment

http://stackoverflow.com/q/24592140
tagged with: cordova
score: 0
tagged with: http://stackoverflow.com/tag/json
has title: Jquery how to use to display listview?
answer count: 1
has body: I have a html page and I want to parse a JSON file to display. I want to display in a listview format by using Jquery mobile script. But I don't know why I can't make into a list view, am I using the correctly? here is my javascript in html $.getJSON('http://www.sfu.ca/~cniu/data.json', function(data) { var output="&lt;ul data-role="listview"&gt;"; for (var i in data.quiz){ output += "&lt;li id='link"+ i +"' onclick='loadReadyPage("+ i +")'&gt;"+ data.quiz[i].quizName +"&lt;/li&gt;"; } output +="&lt;/ul&gt;"; document.getElementById("quizList").innerHTML=output; });
tagged with: jquery-mobile
has comment: http://stackoverflow.com/comment/38101370
tagged with: javascript
type: UnansweredQuestion
tagged with: listview
has answer: http://stackoverflow.com/a/24595524
type: Question

http://stackoverflow.com/comment/38380116
score: 0
has text: Why the down vote? Completely legitimate question.. At least post your reasoning.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24740089

http://stackoverflow.com/a/24642655
score: 0
has comment: http://stackoverflow.com/comment/38197537
type: Answer
answers question: http://stackoverflow.com/q/24642425
has comment: http://stackoverflow.com/comment/38196447
has body: I'm guessing that instead of $scope.gridOptions = { data: 'myData' }; you'll want $scope.gridOptions = { data: 'provider_medical_services'};

http://stackoverflow.com/comment/38191473
type: Comment
type: QuestionComment
score: 0
has text: Current date is not a big deal, but you should carefully read the notes to the identity property in the Acrobat JavaScript documentation. In order to use it you will need an application-level script which has to be installed on every machine whee this dialog is to be used.
comment on: http://stackoverflow.com/q/24636690

http://stackoverflow.com/a/24705426
answers question: http://stackoverflow.com/q/24704839
has comment: http://stackoverflow.com/comment/38315985
downvote count: 0
score: 3
type: Answer
has body: you can convert to topojson using http://geojson.io, or http://mapshaper.org
upvote count: 3
has comment: http://stackoverflow.com/comment/38313930

http://stackoverflow.com/comment/124043769
comment on: http://stackoverflow.com/a/63195157
has text: Wow, why's this the first I've seen this? Thanks
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/24738314
has comment: http://stackoverflow.com/comment/38399609
has comment: http://stackoverflow.com/comment/38377080
score: 0
answers question: http://stackoverflow.com/q/24737762
type: Answer
has body: When you make that kind of request will give you an error Crost Browser, try this way with jsonp ```` $("a#SayHello").click(function (e) { e.preventDefault(); $.ajax({ url: 'http://localhost/Z_WS/HelloWorld.asmx/Hello', type: 'POST', data: {"name": $("input#name").val() }, //Is an Object, no String contentType: 'application/json; charset=utf-8', dataType: 'jsonp', //Is this success:function (data, textStatus, XMLHttpRequest) { alert("IN"); alert(data.d); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }); I guess you know when you'll try from another machine you have to change the localhost IP Enjoy!

http://stackoverflow.com/q/24617820
tagged with: grunt-requirejs
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/24732736
type: UnansweredQuestion
tagged with: requirejs
tagged with: requirejs-optimizer
tagged with: node.js
has body: I'm trying to use grunt-requirejs to optimize my requirejs project into a single production js file. However, I'm not sure if my Gruntfile.js is correct because I have to specify which model to include during the optimization again, which seems wrong to me as I specify mainConfigFile already. I thought it's going to read everything from my requirejs file. I asked this because I have a lot of modules and I don't want to DRY. Here's my Gruntfile.js requirejs : { compile : { options: { almond: true, baseUrl : 'src/Web/Scripts', mainConfigFile : 'src/Web/Scripts/main-new.js', out: 'src/Web/Scripts/out.js', optimize: 'uglify2', include: ['main-new', 'app/app.js', 'app/viewmodels/home/home.mobile.js', 'zepto', 'hammer', 'zepto-hammer', 'zepto-dragswipe', 'knockout', 'knockout-validation', 'knockout-postbox', 'knockout-mapping', 'knockout-notification', 'q', 'underscore' ] } } }, And this is my main-new.js file requirejs.config({ baseUrl: '/m/Scripts', paths: { 'jquery': 'vendors/jquery/jquery-1.10.2', 'jquery-cookie': 'vendors/jquery/jquery.cookie-1.4.1', 'zepto': 'vendors/zepto/zepto', 'hammer': 'vendors/hammer/hammer', 'zepto-hammer': 'vendors/zepto/zepto.hammer', 'zepto-dragswipe': 'vendors/zepto/zepto.dragswipe', 'knockout': 'vendors/knockout/knockout-3.1.0', 'knockout-validation': 'vendors/knockout/knockout.validation', 'knockout-postbox': 'vendors/knockout/knockout-postbox', 'knockout-mapping': 'vendors/knockout/knockout.mapping', 'knockout-notification': 'vendors/knockout/knockout-notification-1.1.0', 'viewmodels': 'app/viewmodels', 'service': 'app/services', 'config': 'app/config', 'helpers': 'app/helpers', 'q': 'vendors/q/q-0.9.6', 'underscore': 'vendors/underscore/underscore-min' }, shim: { 'knockout-validation': ['knockout'], 'knockout-mapping': ['knockout'], 'knockout-postbox': ['knockout'], 'knockout-notification': ['knockout'], 'jquery-cookie': ['jquery'], 'hammer': ['zepto'], 'zepto-hammer': ['zepto', 'hammer'], 'zepto-dragswipe': ['zepto', 'hammer'], 'zept…
has title: Why I have to use 'include' again in grunt-requirejs to optimize into a single js file?
type: Question

http://stackoverflow.com/a/24676372
answers question: http://stackoverflow.com/q/24676181
has comment: http://stackoverflow.com/comment/41683546
has comment: http://stackoverflow.com/comment/42367603
has comment: http://stackoverflow.com/comment/38692873
upvote count: 7
has comment: http://stackoverflow.com/comment/38270681
type: Answer
has comment: http://stackoverflow.com/comment/38414800
downvote count: 0
has comment: http://stackoverflow.com/comment/38584418
has body: I'll try to answer some of your questions: If your app is data-intensive (facebook example, a lot of multi threads to load a lot of data) you should use native language for your app because it will be a lot less slow. I develop both in iOS and Android, the learning curve really depends your own experience. If you are better at object-oriented languages and have experience with listeners Android will be easy as pie. But learning to develop in ObjectiveC requires to have some experience with pointers and structure/funcion-oriented languages (C,C#,C++). I find Android to be easier for beginners tho ;) Phonegap at the moment is a very good choice for small, light apps, and it's community is growing bigger and bigger (you got Cordova also, works just like Phonegap) and if you have experience with web development and design it will be a LOT easier to develop your first app. There is a big BUT in using Phonegap/Cordova: the UI is slow at the moment, by that I mean that when you click a button or icon it is somewhat slow to react compared with native...if your app is client-oriented I wouldn't use Phonegap. This "slow" effect worsens with data-heavy apps so take care what you decide. Hope that I've helped you out, feel free to ask anything ;)
score: 7
has comment: http://stackoverflow.com/comment/38430237

http://stackoverflow.com/a/24661483
upvote count: 5
has comment: http://stackoverflow.com/comment/38273627
has comment: http://stackoverflow.com/comment/38271505
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38276089
type: Answer
accepted answer of: http://stackoverflow.com/q/24659660
answers question: http://stackoverflow.com/q/24659660
has body: In V3 mouse-events will fire on a GroundOverlay, when you click on a GroundOverlay the click will not fire on the underlying map. All you have to do is to disable the mouse-events for the GroundOverlay by setting the clickable-option to false, e.g. : radarMap = new google.maps.GroundOverlay(url,boundaries,{clickable:false});
score: 5

http://stackoverflow.com/comment/38200523
has text: Yes. I edited the response, no need to use JSON.parse since the result.d already contains your object, and not a string representation of it. You can stick a breakpoint or a debugger statement in your success callback and inspect the response with firebug or visual studio if that's what you're using.
type: AnswerComment
comment on: http://stackoverflow.com/a/24644047
score: 0
type: Comment

http://stackoverflow.com/comment/38270353
comment on: http://stackoverflow.com/a/24680643
type: AnswerComment
score: 0
type: Comment
has text: Yeah. If this wasn't tagged restartless, I would have mentioned putting stuff into the overlay. -- You're writing restartless add-ons. There is no auto-anything ;) -- Also, how would I know what you *REALLY* wanted to see? I'm not a mind-reader. :p

http://stackoverflow.com/comment/38178800
type: QuestionComment
has text: Are the other views where the PanelBar breaks completely different pages with a new URL?
comment on: http://stackoverflow.com/q/24631441
score: 0
type: Comment

http://stackoverflow.com/q/24660992
accepted answer: http://stackoverflow.com/a/24661445
tagged with: javascript
tagged with: google-maps-api-3
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/24661370
type: Question
has answer: http://stackoverflow.com/a/24661370
has answer: http://stackoverflow.com/a/24661445
answer count: 3
has body: I have a page where I can toggle on/off categories of markers. One marker (the 'property') will always be visible. I would like to zoom in as close as possible showing all visible markers. So, if I have 3 markers close together I would like to zoom in all close as possible while still fitting the 3 markers. var fullBounds = new google.maps.LatLngBounds(); var map; var infowindow; var markers = {}; var nearbyPlaces = {{#property}}{{{stringify nearbyPlaces}}}{{/property}}; var property = new google.maps.LatLng({{#property}}{{address.geo.lat}},{{address.geo.lng}}{{/property}}); var name = {{#property}}{{{stringify name}}}{{/property}} var prop = {{#property}}{{{stringify address}}}{{/property}}; function initialize() { map = new google.maps.Map(document.getElementById('map-canvas'), { center: property, zoom: 15 }); var marker = new google.maps.Marker({ map: map, icon: '../../../../img/map/property.png', // Set Property to a green marker position: property }); infowindow = new google.maps.InfoWindow(); // Set infowindow for the property google.maps.event.addListener(marker, 'click', function () { infowindow.setContent(name + '&lt;br/&gt;' + prop.street + '&lt;br/&gt;' + prop.city + ', ' + prop.state.name); infowindow.open(map, this); }); var l = nearbyPlaces.length; while (l--) { markers[nearbyPlaces[l].category] = []; createCategory(nearbyPlaces[l]); } console.log(map.getZoom()); } function createCategory(item) { var l = item.places.length; while (l--) { var marker = createMarker(item.places[l]); markers[item.category].push(marker); console.log(item.category); switch(item.category){ case 'Public Schools': marker.icon = '../../../../img/map/public_school.png'; break; case 'Colleges': marker.icon = '../../../../img/map/college.png'; break; case 'Preferred Employers': marker.icon = '../../../../img/map/work.png'; break; default: marker.icon = '../../../../img/map/star.png' } } } function toggleCategory(name, el) { //map.fitBounds(fullBounds); var button = $(el); var visib…
upvote count: 1
has answer: http://stackoverflow.com/a/46272598
has title: Google Map API v3 - show all visible markers with maximum zoom
tagged with: google-maps

http://stackoverflow.com/a/24595952
upvote count: 3
type: Answer
score: 3
has body: Try removing them backwards: var ele = document.getElementsByName("javascriptaudio"); for(var i=ele.length-1;i&gt;=0;i--) { ele[i].parentNode.removeChild(ele[i]); } The problem is that removing elements from ele shifts indexes: if you have 5 items (0 to 4) and remove item 0 you then have 4 items ranging from 0 to 3 (4 becomes 3, 3 becomes 2, etc.); you should then remove item 0 but your i variable has already incremented to 1.
downvote count: 0
answers question: http://stackoverflow.com/q/24595878
has comment: http://stackoverflow.com/comment/38106628
has comment: http://stackoverflow.com/comment/38107636

http://stackoverflow.com/a/24666374
has comment: http://stackoverflow.com/comment/38241497
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38241677
downvote count: 0
has comment: http://stackoverflow.com/comment/38241367
has comment: http://stackoverflow.com/comment/38241001
has comment: http://stackoverflow.com/comment/38241597
type: Answer
answers question: http://stackoverflow.com/q/24666334
has comment: http://stackoverflow.com/comment/38241388
score: 1
has comment: http://stackoverflow.com/comment/38241273
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24666334
has body: My approach would be to use some stable piece of math to convert the current date into an index into your set of descriptions. It won't truly be random - in fact, it will be entirely deterministic - but it will be APPARENTLY random to anyone but you. For instance: var today = new Date(); var weatherIndex = (today.getDate() * today.getMonth() * today.getYear()) % weatherListSize; Example in javascript, but you actually want to do this on the server - otherwise, you're potentially going to get different results at any given moment for users in different timezones (plus, you really don't want to send all of your weather text down every time - just today's). You mentioned you're using MySQL already. A SQL example would be along the lines of: select text from WeatherTexts where ID = 1 + MOD( (EXTRACT(DAY FROM CURDATE()) * EXTRACT(MONTH FROM CURDATE()) * EXTRACT(YEAR FROM CURDATE())), (select MAX(ID) from WeatherTexts)); assuming sequential IDs. Because CURDATE() remains the same all day, this query will return exactly the same result on every execution (by every user) during a given day. When it is run on the next day, the result will (almost always) be different. Include the query in your PHP so it's run each time the page is loaded. Then add some javascript to the page similar to what's described in How to update your homepage at a certain time?, to ensure that the page reloads just after midnight to get the new content. Remember to use the server timezone in the timer! And if you expect people may have the page open for more than 24 hours, remember to start a new (24-hour) timer when the previous one expires.
has comment: http://stackoverflow.com/comment/38243992
has comment: http://stackoverflow.com/comment/38241053
has comment: http://stackoverflow.com/comment/38241224
has comment: http://stackoverflow.com/comment/38241035
has comment: http://stackoverflow.com/comment/38262834

http://stackoverflow.com/comment/38184725
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24628176
has text: this.firstNode._uihooks points to the correct container div (there is no tbody). But what do I insert into the moveElement function? Do I remove and insert into the correct place? I don't think CSS can animate that..
type: AnswerComment

http://stackoverflow.com/comment/38198913
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24643308
has text: I'm not quite sure how to help entirely, but I do notice that you declared the variable "btnPlay" as a new button, even though that constructor had not yet been defined.
type: Comment

http://stackoverflow.com/comment/38180693
type: Comment
type: QuestionComment
has text: Yes but what I would like to do is add the close button on the panel to have something that looks like this http://sandbox.scriptiny.com/tinybox2/ (click on the third or fourth button)
comment on: http://stackoverflow.com/q/24632069
score: 0

http://stackoverflow.com/comment/38092802
type: Comment
has text: Thanks, Create a clipping region is just combine with one path? Ok, I thought I can use multi-path combined. Thanks again.
comment on: http://stackoverflow.com/a/24588767
score: 0
type: AnswerComment

http://stackoverflow.com/a/24698490
score: 0
type: Answer
has body: Instead of using "window.addEventListener( 'DOMContentLoaded', init, false); ", you can use a callback with jquery load()'s function. $('#content_area').hide().load(href, init).fadeIn('normal');
has comment: http://stackoverflow.com/comment/38301151
answers question: http://stackoverflow.com/q/24698310

http://stackoverflow.com/a/24687748
answers question: http://stackoverflow.com/q/24681921
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Walls in Cesium have no thickness; if you would like to draw a thick wall you should be using either Corridor or Polygon geometry. There are several other types of geometry that may provide what you are looking for as well; those links have more.
accepted answer of: http://stackoverflow.com/q/24681921

http://stackoverflow.com/comment/38232078
score: 0
comment on: http://stackoverflow.com/q/24661464
type: Comment
has text: @Kyle it gets all the way to the *if($val == "radio_send")*, changes the $content so it will load the send_content.html page and echoes it on page.
type: QuestionComment

http://stackoverflow.com/a/69164341
has body: I tried using some of the answers from above, but the scrolling would not work. After some digging around I noticed that the scroll positions were in fact very odd (even negative values) and it was caused by how Angular was rendering the pages in the router-outlet. My solution was to compute the scroll position of the element starting from the top of the page. I placed an element with id start-of-page at the beginning of the template and I obtained the scroll amount by subtracting the target fragment position. ngAfterViewInit(): void { this.route.fragment.subscribe(fragment => { try { // @ts-ignore // document.querySelector('#hero').scrollIntoView({behavior:smooth, block: "start", inline: "start"}); // @ts-ignore // document.querySelector('#' + fragment).scrollIntoView({behavior:smooth, block: "start", inline: "start"}); this._scrollTo('#' + fragment,0); } catch (e) { }; }); } private _scrollTo(selector: any, yOffset = 0){ const base = document.querySelector('#start-of-page'); const el = document.querySelector(selector); // @ts-ignore const y = el.getBoundingClientRect().top - base.getBoundingClientRect().top; window.scrollTo({top: y, behavior: 'smooth'}); }
answers question: http://stackoverflow.com/q/24665602
score: 0
type: Answer

http://stackoverflow.com/a/24697749
type: AcceptedAnswer
downvote count: 0
has body: If this is an HTML file, then use localStorage to store the &lt;input&gt; clicked by the value attribute and then when the page is loaded, run the onclick event of the right &lt;input&gt; element. $(function() { $("input[type=\"radio\"]").click(function(){ [...] //localStorage: localStorage.setItem("option", value); }); //localStorage: var itemValue = localStorage.getItem("option"); if (itemValue !== null) { $("input[value=\""+itemValue+"\"]").click(); } }); If this is run on a server, then use document.cookie to store the &lt;input&gt; clicked by the value attribute and when sending data to the client server-side, make the correct &lt;input&gt; checked and the correct box showing. $(function() { $("input[type=\"radio\"]").click(function(){ [...] //Cookies: document.cookie="option="+value; }); //Cookies: /*Load the page with the correct input checked based off cookies*/ }); Here's the fiddle (unfortunately, cookies don't work here): http://jsfiddle.net/NobleMushtak/vTT7J/
answers question: http://stackoverflow.com/q/24697272
type: Answer
accepted answer of: http://stackoverflow.com/q/24697272
has comment: http://stackoverflow.com/comment/38298642
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/38298786

http://stackoverflow.com/comment/38192242
score: 0
has text: Correct. Titanium applications are written in javascript
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24640493

http://stackoverflow.com/comment/38213486
type: Comment
has text: did you add applicable classes to markup? Are events firing? Are errors thrown? Too many unknowns without you updating demo
comment on: http://stackoverflow.com/a/24623033
type: AnswerComment
score: 0

angularjs-scope
tags question: http://stackoverflow.com/q/24645419
tags question: http://stackoverflow.com/q/24725364
tags question: http://stackoverflow.com/q/24673418
tags question: http://stackoverflow.com/q/24718036
tags question: http://stackoverflow.com/q/24603362
tags question: http://stackoverflow.com/q/24671137
tags question: http://stackoverflow.com/q/24621307
tags question: http://stackoverflow.com/q/24720604
tags question: http://stackoverflow.com/q/24676716
tags question: http://stackoverflow.com/q/24637855
tags question: http://stackoverflow.com/q/24674869
tags question: http://stackoverflow.com/q/24697959
tags question: http://stackoverflow.com/q/24635727
tags question: http://stackoverflow.com/q/24741092
tags question: http://stackoverflow.com/q/24612583
tags question: http://stackoverflow.com/q/24673918
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/24679851
tags question: http://stackoverflow.com/q/24700435
tags question: http://stackoverflow.com/q/24708284
tags question: http://stackoverflow.com/q/24702513
tags question: http://stackoverflow.com/q/24726329
tags question: http://stackoverflow.com/q/24636905
tags question: http://stackoverflow.com/q/24672336
tags question: http://stackoverflow.com/q/24694231
tags question: http://stackoverflow.com/q/24651341
tags question: http://stackoverflow.com/q/24623521
tags question: http://stackoverflow.com/q/24612248
tags question: http://stackoverflow.com/q/24666573
tags question: http://stackoverflow.com/q/24697045
tags question: http://stackoverflow.com/q/24671874
type: Tag

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/24709585
tags question: http://stackoverflow.com/q/24626333

http://stackoverflow.com/q/24632914
has comment: http://stackoverflow.com/comment/38177827
has comment: http://stackoverflow.com/comment/38178831
tagged with: javascript
has answer: http://stackoverflow.com/a/40573535
has comment: http://stackoverflow.com/comment/38178971
has comment: http://stackoverflow.com/comment/135234282
has comment: http://stackoverflow.com/comment/38180416
has comment: http://stackoverflow.com/comment/38200017
has comment: http://stackoverflow.com/comment/38179954
has comment: http://stackoverflow.com/comment/60466459
downvote count: 0
answer count: 1
tagged with: child-process
has comment: http://stackoverflow.com/comment/38179896
has comment: http://stackoverflow.com/comment/38179788
favorite count: 0
has comment: http://stackoverflow.com/comment/38180048
type: UnansweredQuestion
tagged with: stderr
has title: Node.js: child_process.spawn no output standard output unless 'inherit'
has comment: http://stackoverflow.com/comment/38182185
tagged with: node.js
has body: I'm trying to capture standard output from a spawned child_process in Node.js (0.10.29). Right now I'm just trying with ping. The following code doesn't print (but does ping) var exec = require('child_process').exec; var spawn = require('child_process').spawn; var util = require('util') var ping = spawn('ping', ['127.0.0.1'], {stdio: 'pipe'}); ping.stdout.on('data', function(data){ util.print(data); }) ping.stderr.on('data', function(data){ util.print(data); }) If I change stdio: 'pipe' to stdio: 'inherit' and get rid of the stdout/stderr hooks like so: var ping = spawn('ping', ['127.0.0.2'], {stdio: 'inherit'}); // ping.stdout.on('data', function(data){ // util.print(data); // }) // ping.stderr.on('data', function(data){ // util.print(data); // }) I get PING 127.0.0.2 (127.0.0.2): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 If I change the address from 127.0.0.2 to 127.0.0.1, which I know will respond to the pings and use the original code I get PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.060 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.063 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.152 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.124 ms Why are stdout/stderr not firing data events when the ping isn't pinging or inheriting?
score: 15
has comment: http://stackoverflow.com/comment/38223368
tagged with: stdout
has comment: http://stackoverflow.com/comment/59798724
type: Question
upvote count: 15

google-chrome
tags question: http://stackoverflow.com/q/24674925
tags question: http://stackoverflow.com/q/24632120
tags question: http://stackoverflow.com/q/24653289
tags question: http://stackoverflow.com/q/24644330
tags question: http://stackoverflow.com/q/24633289
tags question: http://stackoverflow.com/q/24682130
tags question: http://stackoverflow.com/q/24710306
tags question: http://stackoverflow.com/q/24681430
tags question: http://stackoverflow.com/q/24656942
tags question: http://stackoverflow.com/q/24701614
tags question: http://stackoverflow.com/q/24597559
tags question: http://stackoverflow.com/q/24704312
tags question: http://stackoverflow.com/q/24603986
tags question: http://stackoverflow.com/q/24659796
tags question: http://stackoverflow.com/q/24603432
tags question: http://stackoverflow.com/q/24706945
tags question: http://stackoverflow.com/q/24641119
tags question: http://stackoverflow.com/q/24622210
tags question: http://stackoverflow.com/q/24643251
tags question: http://stackoverflow.com/q/24621277
tags question: http://stackoverflow.com/q/24738946
tags question: http://stackoverflow.com/q/24693756
tags question: http://stackoverflow.com/q/24741502
tags question: http://stackoverflow.com/q/24687036
tags question: http://stackoverflow.com/q/24695079
tags question: http://stackoverflow.com/q/24632983
tags question: http://stackoverflow.com/q/24663869
tags question: http://stackoverflow.com/q/24683575
tags question: http://stackoverflow.com/q/24717376
tags question: http://stackoverflow.com/q/24714227
tags question: http://stackoverflow.com/q/24620112
tags question: http://stackoverflow.com/q/24745095
tags question: http://stackoverflow.com/q/24624564
tags question: http://stackoverflow.com/q/24671988
tags question: http://stackoverflow.com/q/24650817
tags question: http://stackoverflow.com/q/24632427
tags question: http://stackoverflow.com/q/24691636
tags question: http://stackoverflow.com/q/24590970
tags question: http://stackoverflow.com/q/24607021
tags question: http://stackoverflow.com/q/24594542
tags question: http://stackoverflow.com/q/24624232
tags question: http://stackoverflow.com/q/24623382
tags question: http://stackoverflow.com/q/24731906
tags question: http://stackoverflow.com/q/24652694
tags question: http://stackoverflow.com/q/24669655
tags question: http://stackoverflow.com/q/24709892
tags question: http://stackoverflow.com/q/24688294
tags question: http://stackoverflow.com/q/24617783
tags question: http://stackoverflow.com/q/24686189
tags question: http://stackoverflow.com/q/24659331
tags question: http://stackoverflow.com/q/24672190
type: Tag
tags question: http://stackoverflow.com/q/24744786
tags question: http://stackoverflow.com/q/24693052
tags question: http://stackoverflow.com/q/24627652
tags question: http://stackoverflow.com/q/24608043
tags question: http://stackoverflow.com/q/24727572
tags question: http://stackoverflow.com/q/24711247
tags question: http://stackoverflow.com/q/24661124
tags question: http://stackoverflow.com/q/24673612
tag name: google-chrome
tags question: http://stackoverflow.com/q/24713144
tags question: http://stackoverflow.com/q/24686585
tags question: http://stackoverflow.com/q/24610694
tags question: http://stackoverflow.com/q/24628409
tags question: http://stackoverflow.com/q/24709675
tags question: http://stackoverflow.com/q/24681422
tags question: http://stackoverflow.com/q/24663282
tags question: http://stackoverflow.com/q/24670598
tags question: http://stackoverflow.com/q/24663417
tags question: http://stackoverflow.com/q/24678314
tags question: http://stackoverflow.com/q/24633079
tags question: http://stackoverflow.com/q/24719839
tags question: http://stackoverflow.com/q/24617710
tags question: http://stackoverflow.com/q/24708649
tags question: http://stackoverflow.com/q/24673181
tags question: http://stackoverflow.com/q/24607020
tags question: http://stackoverflow.com/q/24615422
tags question: http://stackoverflow.com/q/24623248
tags question: http://stackoverflow.com/q/24600495

navbar
tags question: http://stackoverflow.com/q/24636278
tags question: http://stackoverflow.com/q/24612621
type: Tag
tag name: navbar

http://stackoverflow.com/a/24758824
accepted answer of: http://stackoverflow.com/q/24622420
answers question: http://stackoverflow.com/q/24622420
type: AcceptedAnswer
score: 0
type: Answer
has body: The mistake was one simple one dumb typo. I forgot to do the query realy: if (!empty($errors)) { $returnData['success'] = false; $returnData['errors'] = $errors; } else { $returnData['success'] = true; $insert = "INSERT INTO $tbl_name (username, senha, nome, email) VALUES ('$username', '$password','$nome','$email')"; As I inserted mysql_query($insert) after $insert it started working softly. The only problem I still have is how to handle the data sent back from the php.

http://stackoverflow.com/q/24686093
upvote count: 1
tagged with: turbolinks
downvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/24751539
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24751539
has body: I have a Rails 4 App that uses Turbolinks and Backbone.js. Basically, my router looks like: var BookRouter = Backbone.Router.extend({ routes: { '': 'index' }, index: function(){ var bookView = new BookView({ el: ".wrapper" }); } }); $(function() { if (Backbone.History.started == false) { var bookRouter = new BookRouter(); Backbone.history.start({ pushState: true, hashChange: false }); } }); $(document).on('page:load', function (){ Backbone.history.stop(); Backbone.history.start({ pushState: true, hashChange: false }); var bookRouter = new BookRouter(); }); Here's the scenario: A user lands on http://website.com/, which takes the user to the index route, which loads a template into the .wrapper, which is shown in my routing code above. This works fine. A user clicks on one of my Rails generated pages (for example I have a http://website.com/books route which shows all the books that users have created.) This also works fine. The user is still on the http://website/books route. If you click on my logo, it takes you to the index route (the one generated by the backbone code above). This works fine. NOW THE PROBLEM: If you go back to Step 3, and instead of clicking the logo, decide to hit the back button, and go back from the books route to the index route, the contents that get put inside the $el .wrapper are repeated TWICE. So for example, in my template, I have the words "Please choose a book to continue". If you went to Step 1, you'd just see the words once. But now, you see n set of words each time you go to /books and then hit the back button n times.
has title: BackboneJS Turbolinks History Issue
tagged with: ruby-on-rails
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/98544947
comment on: http://stackoverflow.com/a/24646516
type: Comment
score: 0
has text: Maybe this answer may benefit from a little update, `a1()` outputs `2`.
type: AnswerComment

http://stackoverflow.com/a/24588176
has body: you can make it invisible, e.g. content to append to maindiv
answers question: http://stackoverflow.com/q/24588141
score: 0
type: Answer

http://stackoverflow.com/comment/67957287
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24985483
has text: @EruPenkman, if this approach gives you run into memory problems, then the fall-back pattern is recursion.

http://stackoverflow.com/a/24690865
answers question: http://stackoverflow.com/q/24674830
type: Answer
has body: I think I got it http://jsfiddle.net/tz5KT/219/ Check out my use of attrTween, it might be helpful
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/24674830
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/24618124
has title: On HTML, CSS and maybe Javascript or Jquery Apple iOS single click on a textbox
tagged with: css
has body: I have a website (daccaa.com) and on my iPad or iPhone I have to click the Text Box twice rather than once to select it. This is the code: .box { width: 62%; font-size: 20px; padding: 9px; font-family: 'Lato', sans-serif; margin-top: 9px; resize: none; outline: none; font-weight: 300; -o-transition:.5s; -ms-transition:.5s; -moz-transition:.5s; -webkit-transition:.5s; transition:.5s; } .box:hover { width: 62%; font-size: 20px; padding: 9px; font-family: 'Lato', sans-serif; margin-top: 9px; border: solid 1px #FFFB00; outline: none; } .box:focus { width: 62%; font-size: 20px; padding: 9px; font-family: 'Lato', sans-serif; margin-top: 9px; border: solid 1px #FFD900; outline: none; } This is the CSS code for the textbox, I wondered if there is any javascript or jquery or even CSS that can be used to stop you from needing to click the textbox twice. I do not want to remove the hover and focus though.
score: 0
has comment: http://stackoverflow.com/comment/38150004
answer count: 1
accepted answer: http://stackoverflow.com/a/24618773
tagged with: ios
tagged with: javascript
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/24618773
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38278882
comment on: http://stackoverflow.com/q/24686806
has text: I read the Swift manual when it came out, but I don't recall. I think I'll review it to see.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38360798
comment on: http://stackoverflow.com/a/24727955
type: Comment
has text: hey @prash how to identification the ` ` in jquery?. i've try `(input[name="gender"]).val()` its not working
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38374181
type: AnswerComment
score: 0
has text: and make sure that you set the theme property for activities. @android:style/Theme.Light.NoTitleBar
type: Comment
comment on: http://stackoverflow.com/a/24736898

http://stackoverflow.com/comment/38318260
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24664502
has text: Ok will check when I get home in an hour.

http://stackoverflow.com/comment/38334045
has text: Chrome. I have bootstrap installed, and its not working for me
type: Comment
comment on: http://stackoverflow.com/a/24715998
score: 0
type: AnswerComment

python
tags question: http://stackoverflow.com/q/24606974
tags question: http://stackoverflow.com/q/24677706
tags question: http://stackoverflow.com/q/24669560
tags question: http://stackoverflow.com/q/24623590
tags question: http://stackoverflow.com/q/24697587
tags question: http://stackoverflow.com/q/24687665
tag name: python
tags question: http://stackoverflow.com/q/24719592
tags question: http://stackoverflow.com/q/24714736
tags question: http://stackoverflow.com/q/24622132
tags question: http://stackoverflow.com/q/24672869
tags question: http://stackoverflow.com/q/24738133
type: Tag
tags question: http://stackoverflow.com/q/24592512
tags question: http://stackoverflow.com/q/24647307
tags question: http://stackoverflow.com/q/24705930
tags question: http://stackoverflow.com/q/24590077
tags question: http://stackoverflow.com/q/24636209
tags question: http://stackoverflow.com/q/24709635
tags question: http://stackoverflow.com/q/24637108
tags question: http://stackoverflow.com/q/24602594
tags question: http://stackoverflow.com/q/24738989
tags question: http://stackoverflow.com/q/24740474
tags question: http://stackoverflow.com/q/24653863
tags question: http://stackoverflow.com/q/24679357
tags question: http://stackoverflow.com/q/24730388
tags question: http://stackoverflow.com/q/24744125
tags question: http://stackoverflow.com/q/24617391
tags question: http://stackoverflow.com/q/24721199

http://stackoverflow.com/comment/73422184
has text: @AlexVentura no, promises is the new standard for asynchronous programming in Node.js. And new things like ES6 generators and ES7 async/await automatically work with the promise standard. See [examples](https://github.com/vitaly-t/pg-promise/blob/master/examples/select-insert.md).
comment on: http://stackoverflow.com/a/29446588
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38341126
type: Comment
comment on: http://stackoverflow.com/q/24719558
type: QuestionComment
score: 3
has text: If you are capable enough to write JavaScript and hit a server via Ajax to get a response, you should realize that your jquery ajax call already parses the response and you have a plain old JavaScript object. There is no JSON there anymore. So pull your data from your **JavaScript** object. Again, it is not JSON anymore. Is your question how to navigate a JavaScript object?

http://stackoverflow.com/a/24733057
answers question: http://stackoverflow.com/q/24676645
has body: Guess, it was smth. with plugin version. I used latest and wrote fiddle. http://jsfiddle.net/t4f5j/ $('#timetrans').mask('99D99', {'translation': {D: {pattern: /[\.,:]/}}});
has comment: http://stackoverflow.com/comment/38373412
has comment: http://stackoverflow.com/comment/38371205
has comment: http://stackoverflow.com/comment/38367073
has comment: http://stackoverflow.com/comment/38370338
has comment: http://stackoverflow.com/comment/38372623
score: 0
type: Answer

http://stackoverflow.com/comment/38311798
type: AnswerComment
type: Comment
has text: It's coffeescript, not javascript... Editing question
comment on: http://stackoverflow.com/a/24704479
score: 0

http://stackoverflow.com/q/24656496
has comment: http://stackoverflow.com/comment/38251389
has comment: http://stackoverflow.com/comment/38222571
possible better answer: http://stackoverflow.com/a/24683491
tagged with: karma-runner
accepted answer: http://stackoverflow.com/a/24682293
tagged with: dynamic
has comment: http://stackoverflow.com/comment/38267285
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
answer count: 2
has answer: http://stackoverflow.com/a/24682293
downvote count: 0
tagged with: javascript
has body: How can I include a set of JS files in my Karma Config that are dynamically loaded in my code? I'm not sure how I can load those files dynamically. We are trying to avoid having to download them and maintain them separately. Google hasn't helped much so some help would be great.
has title: dynamic loading of JavaScript files in Karma
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/24683491

http://stackoverflow.com/a/24711082
type: AcceptedAnswer
has body: You can open the html page in a tab, and then use tab.attach to attach the actual script(s). That way your scripts will be actual content scripts with access to the content script APIs. widget.Widget({ id: 'my-addon', label: 'my addon', contentURL: data.url('icon.png'), onClick: function() { tabs.open({ url: data.url("control.html"), onOpen: function(tab) { tab.attach({ contentScriptFile: [data.url("control.js")], onMessage: function() {} }); } }); } }); It's ugly, but it should work (in general, I didn't actually try the example code).
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38325052
accepted answer of: http://stackoverflow.com/q/24710332
answers question: http://stackoverflow.com/q/24710332
has comment: http://stackoverflow.com/comment/38325115
upvote count: 1

http://stackoverflow.com/comment/38371319
type: QuestionComment
comment on: http://stackoverflow.com/q/24735210
has text: just edited the question to clear things up...
score: 0
type: Comment

http://stackoverflow.com/comment/38289158
type: Comment
comment on: http://stackoverflow.com/q/24692655
score: 0
type: QuestionComment
has text: Are you asking what to do to show the user the image is selected, your question sound of topic for SO as it seemes to be more related to UX than code. You should ask at http://ux.stackexchange.com/

http://stackoverflow.com/comment/38376854
type: QuestionComment
type: Comment
has text: @HugoSousa I stand corrected...
comment on: http://stackoverflow.com/q/24737154
score: 0

load-order
type: Tag
tags question: http://stackoverflow.com/q/24610961
tag name: load-order

http://stackoverflow.com/a/24935041
has body: Your LanguagesVM function is defined, but looks like it's never executed. Adding the following code after the function definition: vm = new LanguagesVM(); should be sufficient to trigger the binding here. The use of new may not be necessary, but the use of the this keyword inside LanguagesVM suggests that it should be used to prevent incorrect scoping.
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24651714
answers question: http://stackoverflow.com/q/24651714
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/38220975
type: Comment
has text: Thanks for your suggestion, but could you elaborate somewhat more on the hack you described? How is putting the modal into a directive going to do what I want?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24654255

http://stackoverflow.com/q/24626157
accepted answer: http://stackoverflow.com/a/24626221
type: Question
score: 0
has title: How to post data with angular js to sql server
answer count: 1
tagged with: javascript
has body: Thanks for all your input, but now I have more or less a similar problem, I have the data that needs to be stored in sql-server database, when I try to post it the data does not get written. Is my code structure correct? self.CurrentDowntimeEvent = { method: 'POST' , url: 'someurl/test' , data: { DepartmentId: cookie , CategoryId: -1 , Comment: "" , DowntimeStart: "2014-07-07T10:00:00" , DowntimeEnd: null } , headers: {'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'} }).success(function (data) { console.log(data); }).error(function (data) { });
tagged with: sql-server
tagged with: angularjs
has answer: http://stackoverflow.com/a/24626221
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11605917

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/24694512
tags question: http://stackoverflow.com/q/24633734

http://stackoverflow.com/q/24691699
has comment: http://stackoverflow.com/comment/38287738
has answer: http://stackoverflow.com/a/24693442
has comment: http://stackoverflow.com/comment/38287969
tagged with: http
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38288064
answer count: 1
has comment: http://stackoverflow.com/comment/38288005
tagged with: angularjs
tagged with: jsessionid
type: UnansweredQuestion
has body: so I have this code $http({ 'method': 'GET', 'url': 'http://www.example.com', 'withCredentials': true, headers: { 'Content-type': 'application/json' } }). success(function (data, response, headers, status) { }); This will return with the JSON array of records, well the http request is using credentials which is a JSESSIONID that use for every consecutive calls to the backend. The problem is, it works on firefox but doesn't on chrome. So firefox does send the cookies containing the JSESSIONID but not chrome while I already set the withCredentials to true Why does this happen?
has title: $http GET doesn't send JSESSIONID in chrome but works on firefox angularjs
has comment: http://stackoverflow.com/comment/38288096
linked to: http://stackoverflow.com/q/24598187

http://stackoverflow.com/comment/38462364
type: Comment
score: 0
type: AnswerComment
has text: Also in this case, it may be better to spawn a web worker rather than do this on the main thread
comment on: http://stackoverflow.com/a/24762949

http://stackoverflow.com/a/24859040
has comment: http://stackoverflow.com/comment/79483069
accepted answer of: http://stackoverflow.com/q/24713440
has body: JavaScript is executed on the client. Unless the filtering software is incredibly clever, you can still add dynamic inline styles as the server has no idea what's happening in the browser. What you can't do, however, is add inline styles as part of the HTML you send to the client.
score: -9
upvote count: 0
downvote count: 9
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/87297387
has comment: http://stackoverflow.com/comment/38980434
answers question: http://stackoverflow.com/q/24713440
type: Answer

http://stackoverflow.com/a/24679131
accepted answer of: http://stackoverflow.com/q/24634971
type: AcceptedAnswer
upvote count: 2
type: Answer
has body: After a bit of experimentation, I can confirm that the solution shared on the thread I linked and advocated by @vals does actually work, but there was one detail missing from the solution that was needed for a novice like me. So, to summarize, to apply a radial texture to a RingGeometry, you need to modify the uv mapping in three.js (r67, in this case) to be like this: //uvs.push( new THREE.Vector2( ( vertex.x / outerRadius+1)/2, ( vertex.y / outerRadius + 1 ) / 2 ) ); uvs.push( new THREE.Vector2( i/(thetaSegments-1), o/ (phiSegments-1) ) ); You then also need to ensure that, when you call RingGeometry, you set thetaSegments and phiSegments to the same number. Otherwise, only part of the texture will appear on the ring. I hope this helps someone. Thanks @vals and @WestLangley for your help.
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/24634971

http://stackoverflow.com/comment/38264111
type: Comment
comment on: http://stackoverflow.com/a/24659204
has text: Would work the same way. Just replace clientId with userId in the custom dimension.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38263672
type: QuestionComment
has text: I suppose it isn't CF issue just use [number.toFixed()](http://www.w3schools.com/jsref/jsref_tofixed.asp) js function to display decimals correctly.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24678102

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/24609730
tags question: http://stackoverflow.com/q/24712715
tags question: http://stackoverflow.com/q/24615758
tags question: http://stackoverflow.com/q/24633777
tags question: http://stackoverflow.com/q/24717236
type: Tag

http://stackoverflow.com/comment/120056935
score: 17
has text: @mystrdat There are new CSS properties that deal with this, `scroll-margin` and `scroll-padding`.
comment on: http://stackoverflow.com/q/24665602
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24701514
tagged with: jquery-mobile
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/38306695
has answer: http://stackoverflow.com/a/24747617
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38306031
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38306036
has answer: http://stackoverflow.com/a/25821042
has comment: http://stackoverflow.com/comment/38306046
has comment: http://stackoverflow.com/comment/38305815
has body: Good day! I am building a mobile app. I have index.html "screen A" which onSubmit calls javascript function: $.get(myRemoteURL, function(data) { document.open(); document.write(data); document.close(); }, "text"); which then overwrites page with new content "screen B" obtained from making webservice RQ. This content is jquery mobile content that I build programmatically in my Java tags with all the "divs" and "page" elements required for mobile view. I then make another webservice RQ and again repeat similar javascript function call to replace with new jquery mobile content "screen C" with new data obtained from that webservice RQ. The problem: I cannot find a way to make a "back" button work properly from "screen C" to "screen B". I am sort of able to go back from "screen B" to "screen A" by using window.history.go(-2) (window.history.length said 7 but why exactly -2 works to get back to index.html I have no idea). The big problem is I can't get back from "screen C" to "screen B". I am trying to get to HTML content that I replaced from content I replaced it with. I tried to use JSON localStorage to store content of "screen B" in a variable so I can replace content of "screen C" with stored content of "screen B", but that didn't work. I also got an error "Exception in thread "http-bio-8080-exec-402" java.lang.OutOfMemoryError: PermGen space" When trying to store content of "screen B" in JSON localStorage - the data obtained from webservice RQ and mobile content is in the 1-2MB range. Please, could somebody suggest a way to implement a "back" button mechanism so I can go back from "screen C" to "screen B"? Should I use cookies? Or is there a way to retain "screen B" content in history? ADDED: As requested. I add more information about "screen B" to C transition. In "screen B" I have mobile pages ant the program logic either switches between those pages within "screen B" or makes new webservice RQ to switch to "screen C". The way I switch to "screen C" is similar as f…
has title: How can I keep html content history to make back button work?
has comment: http://stackoverflow.com/comment/38305798
type: Question
upvote count: 4
answer count: 2

http://stackoverflow.com/comment/38319309
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24708257
has text: This is a simplification of another question about prepending & appending text at a location - http://stackoverflow.com/questions/24708110/find-and-alter-text-in-a-string-based-on-ln-and-character. This simplified question will be more searchable & consumable to the community. If it has the same answer, I will post it here and delete the other more specific question.
score: 0

http://stackoverflow.com/comment/58628902
type: Comment
type: QuestionComment
has text: @ithil were you able to fix it eventually, want me to test it on my end? What version of browser-sync are you using?
score: 0
comment on: http://stackoverflow.com/q/24686585

communication
tag name: communication
type: Tag
tags question: http://stackoverflow.com/q/24635523

http://stackoverflow.com/comment/38184378
type: Comment
comment on: http://stackoverflow.com/q/24621339
has text: If it's the desktop client, it's almost certainly port numbers, file descriptors, files, CPU, or IO. Can you list the ports open by process, see what Spotify is using? Then, either manually bind to them (`nc -l <port num>`) or use something like `ktrace` to log system calls and see which files and ports are getting opened.
score: 0
type: QuestionComment

http://stackoverflow.com/q/24735849
tagged with: file
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/25075257
tagged with: upload
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/35487108
score: 4
has body: Strange problem appeared with IE11 few days ago. The plugin, wich worked good (https://github.com/davgothic/AjaxFileUpload) now doesn't want to. After I choose a file and click "Load" IE deathly hangs. Only kill process helps. I looked into deep jQuery code for posting data and can't find where to put breakpoint before it hangs. The submitting data is ok, file recieved on server and handler correctly worked, it returns the XML with some info. But no more events (such as "ajaxComplete") called on client after the handler's "context.Response.End();". Where can I find the problem? It is only in IE11 and on many different machines. IE10 works OK... Appreciate for any help!
has title: IE11 hangs during file upload with AjaxFileUpload
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34660871
has answer: http://stackoverflow.com/a/25079013
linked to: http://stackoverflow.com/q/27688260
answer count: 4
tagged with: internet-explorer-11

http://stackoverflow.com/comment/42755342
has text: @Benco The only fix I found since that day was just that temporary fix. I switched over to Google's pie chart API cause I gave up on trying to figure out what was wrong with it.
score: 0
comment on: http://stackoverflow.com/q/24616985
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24588933
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24589360
has body: I have a question on how to improve this code. I'm a newbie with Socket.IO and I've been watching a video tutorial on YouTube about private messaging. I'm just wondering if there is a better way to improve the following lines of code? var io = require('socket.io'); exports.initialize = function(server){ io = io.listen(server); var usernames = {}; io.sockets.on('connection', function(socket){ socket.on('new user', function(data, callback){ if(data in usernames){ callback(false); }else{ callback(true); //save the username to the socket for retrieval socket.username = data; usernames[socket.username] = socket; io.sockets.emit('usernames', Object.keys(usernames)); } }); socket.on('sendMessage', function(data, callback){ var msg = data.trim(); if(msg.substr(0,3) === "/w "){ msg = msg.substr(3); var space = msg.indexOf(" "); if( space !== 1){ var name = msg.substr(0, space); msg = msg.substr(space+1); if(name in usernames){ usernames[name].emit('new message', {message: msg, username: socket.username}); } } else{ callback("error invalid user"); } } else{ //retrieve the username saved in the socket io.sockets.emit('new message', {message: data, username: socket.username}); } }); socket.on('disconnect', function(data){ if(!socket.username) return; //NEW delete usernames[socket.nickname]; // OLD //usernames.splice(usernames.indexOf(socket.username), 1); io.sockets.emit('usernames', usernames); }); }); }; I was trying to use: io.sockets.socket(id)emit('new message', {message: msg, username: socket.username}); But it doesn't seem to work.
linked to: http://stackoverflow.com/q/24041220
score: 1
has title: sending a private message to a specific socket id
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
upvote count: 1
tagged with: sockets
tagged with: node.js
favorite count: 0

http://stackoverflow.com/comment/38108977
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24597254
has text: Thank you very much. As a kid new to development , this is invaluable, reusable knowledge for which I sincerely thank you. It's there a term for calling a function inside of itself like this?
type: AnswerComment

http://stackoverflow.com/comment/38275023
type: Comment
has text: definitely should be +5, since he always wants 0 and 4. 0,4,10,14,20,24,30
comment on: http://stackoverflow.com/a/24684852
score: 0
type: AnswerComment

http://stackoverflow.com/q/24619120
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38152085
tagged with: php
has comment: http://stackoverflow.com/comment/38154572
has title: Call script from javascript
has comment: http://stackoverflow.com/comment/38151976
answer count: 0
has comment: http://stackoverflow.com/comment/38152022
type: Question
has comment: http://stackoverflow.com/comment/38151936
has comment: http://stackoverflow.com/comment/38152109
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38153525
tagged with: jquery
has body: Is there any other BEST way then what i'm doing.? What is best practice .? Why jQuery.post is not working.? Button &lt;input class="button subbutton" type="submit" value="Subscribe Me" name="Submit"&gt; Inputbox &lt;input id="user_email" class="inputbox" type="text" name="user[email]" &gt; JavaScript Not working &lt;script type="text/javascript"&gt; jQuery("input[name='Submit']").click(function(){ PostUniqueID = '123456789'; var PostEmail = document.getElementById('user_email').value; jQuery.post("http://www.myfile.com/programs/SignUpAutomate.php", { getUniqueID : PostUniqueID , GetEmailJVFunction : PostEmail}); }); &lt;/script&gt; JavaScript Working &lt;script type="text/javascript"&gt; jQuery("input[name='Submit']").click(function(){ alert('working good..!!'); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/38152106

http://stackoverflow.com/comment/38169896
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24628614
has text: @JadJoubran if (this == event.currentTarget) it is right it check the current element and the clicked one. if any doubt regarding this see my fiddle

http://stackoverflow.com/comment/38351043
has text: javascript is single threaded, `setInterval` statement just instructs the event loop to execute a function(first argument) after a fixed time in millis(second arg) and returns immediately.
comment on: http://stackoverflow.com/q/24724852
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/24618227
tagged with: cordova
has comment: http://stackoverflow.com/comment/38150750
has body: This code shows (i.e. alerts) "alert1" but not "alert2". I'm using a Samsung Galaxy Tab 3 7.0 as target device. The following code is in index.js. EDIT: "alert3" is neither shown - for those who get dazed about javascript contexts and closures. var app = { bootStrap: function() { //code here does not run window.alert("alert2"); //document.body.style.backgroundColor = "blue"; }, initialize: function() { var current = this; //code here runs window.alert("alert1"); document.addEventListener("deviceready", function(){ //code inside this anonymous function neither runs window.alert("alert3"); current.bootStrap(); }, false); } }; The initialize method is being called: 1001Carros pantalla principal Question: why? (also tried commenting and changing the background color to blue but neither line was executed at all).
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/346015
has title: Phonegap - deviceready not being fired
type: Question
has comment: http://stackoverflow.com/comment/38150176
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/24619526
accepted answer: http://stackoverflow.com/a/24619526
has comment: http://stackoverflow.com/comment/38150634
has comment: http://stackoverflow.com/comment/38150653
has comment: http://stackoverflow.com/comment/38150537

http://stackoverflow.com/comment/38220817
type: Comment
has text: I've updated my answer above. I assume by 'when it's gone' you meant once the original element we have animated is off the screen? If not please explain in a bit more detail. But hopefully the update above should be what you're after =)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24635286

http://stackoverflow.com/comment/38208861
comment on: http://stackoverflow.com/q/24645027
score: 0
type: Comment
type: QuestionComment
has text: Could be that you are facing this issue: https://github.com/mozilla/source-map/issues/123 I'm still working on getting around it myself.

http://stackoverflow.com/q/24596961
tagged with: uiwebview
favorite count: 0
type: UnansweredQuestion
has body: In the process of injecting a local .js file into an external page hosted from another server in UIWebView. While I am new, I feel the following code should render a remote HTML page and override it with the local js. file. In reality it just loads the page with no js. My ViewController.m: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //load url into webview NSString *strURL = @"http://localhost:9080/test/"; NSURL *url = [NSURL URLWithString:strURL]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; [self.viewWeb loadRequest:urlRequest]; NSString *js = [[NSBundle mainBundle] pathForResource:@"script" ofType:@"js" inDirectory:@"www" ]; [self.viewWeb stringByEvaluatingJavaScriptFromString:js]; } The .js file (script.js) is injecting a .css file (style.css) into the header of the external html page: var link = document.createElement("link"); link.href = "style.css"; link.type = "text/css"; link.rel = "stylesheet"; document.getElementsByTagName("head")[0].appendChild(link); The HTML of the external page (index.html) is: TEXT And the files are located in the www directory where the folder was imported into Xcode as "copy with create folder references". Outside of the Xcode project it all works if I place the .js, .html, .css in one folder. But once I launch the simulator its a no go. Does anyone know what I am doing wrong?
has comment: http://stackoverflow.com/comment/38108448
has comment: http://stackoverflow.com/comment/38108623
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38108640
type: Question
has answer: http://stackoverflow.com/a/24597288
has comment: http://stackoverflow.com/comment/38108846
tagged with: ios
tagged with: javascript
has comment: http://stackoverflow.com/comment/38108400
has comment: http://stackoverflow.com/comment/38108795
has comment: http://stackoverflow.com/comment/38108474
score: 0
has title: Injected Javascript not overriding URL in UiWebView
answer count: 1
tagged with: objective-c

http://stackoverflow.com/comment/48330270
comment on: http://stackoverflow.com/a/24931192
type: Comment
has text: I'm using the visibility editor, my value is there, under the dependent parent, but still it doesn't appear, I've run QRR several times, clearing filesystem and browser cache. The value appear in the languages files vardef and all. What else should I do? Thanks!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38373695
has text: Ah ha! Brilliant it appears its to do with the way safari/apple round percentages to the nearest pixel. As there doesn't appear to be support for sub pixel layouts, however i have just booted up Yosemite to check and this problem has been fixed in safari 8 and iOS 8 so hopefully this will just be a temporary measure or at least a graceful fallback.
type: Comment
comment on: http://stackoverflow.com/a/24736539
score: 0
type: AnswerComment

http://stackoverflow.com/q/24635108
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0
tagged with: redis
has title: Meteor._wrapAsync causes 100% CPU
type: UnansweredQuestion
tagged with: node-redis
has answer: http://stackoverflow.com/a/24636577
tagged with: node.js
score: 1
has body: An app is using meteor-redis package to run a redis query which can sometimes take 30 seconds to return 100k results. During this waiting time, Meteor freezes and takes up 100% CPU while waiting for the query results. var client = redis.createClient(port, url) client.zrangebyscoreSync = Meteor._wrapAsync(client.zrangebyscore) client.zrangebyscoreSync(['game:scores', '', '+inf'], function(err, scores) { _.each(scores, function(score, player) { var doc = { ... } Scores.insert(doc) }) }) Question: Is there anyway to let Meteor do something else while waiting for redis to return the huge dataset? If client.zrangebyscore is not wrapped with Meteor._wrapAsync, Meteor would throw the error Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment. and the trace points it to the line Scores.insert(doc).
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38197970

http://stackoverflow.com/comment/38369101
type: QuestionComment
type: Comment
has text: Your each item should be ['7/2014', 3000] , where 3000 is number, not string. Data should be array of numbers (only y value) or array of arrays (pair: category, value). The dataGrouping is available only in the highstock, when you use number/datetime type of xAxis not categories.
comment on: http://stackoverflow.com/q/24714508
score: 0

http://stackoverflow.com/comment/38346260
type: AnswerComment
score: 0
type: Comment
has text: You're right. I didn't think before I made the assignment
comment on: http://stackoverflow.com/a/24722330

http://stackoverflow.com/a/24633301
has body: I can see a couple things that might be throwing stripes off. Though nothing you're sending right now would cause issues, you should use JSON.stringify() on the data you're passing. AJAX calls typically send JSON objects, not arrays. Try sending and receiving your array like so: $.ajax({ url: "MyActionBean.action?saveChanges", type: "Post", dataType: "json", data: { 'items': JSON.stringify(itemsToEdit) }, success: function( data ) { alert("Oh, no"); } }); On the other side, retrieve the items property of the received object and parse that instead of the whole object.
type: Answer
answers question: http://stackoverflow.com/q/24632689
score: 0

http://stackoverflow.com/comment/38348845
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24723664
has text: use both, things which do not need to be in sync with db all the time, use it in localstorage or sessionstorage(preferable) and else use db.. do not load the entire page, make ajax requests for small changes.

http://stackoverflow.com/a/24632733
score: 4
has body: You're trying to manually parse your Json object. This is not needed with Jquery. Jquery has a built-in parseJson() method that can turn a well-formed json object into a javascript Object. Alternatively, as Liam recommends, you can also specify in your $.ajax() options that the dataType is json, which will automatically parse the resulting data response to an object. You can then also use an array["wrestling","racing"] instead of a |-delimited list for your choice. These 2 methods combined can help you a lot and simplify your code. so to summarize: add dataType:"json", to your ajax options and use an array to store choice instead of a delimited list. (update from comment as suggested by meta).
type: Answer
accepted answer of: http://stackoverflow.com/q/24632012
answers question: http://stackoverflow.com/q/24632012
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38342696
has text: @dhyabi you do realize that all your questions are incredibly basic, and already answered on this site, if not all over the internet? Utilize your tools!
comment on: http://stackoverflow.com/a/24720365
score: 3
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24662762
type: UnansweredQuestion
tagged with: phonegap-build
has comment: http://stackoverflow.com/comment/38238286
has comment: http://stackoverflow.com/comment/38234449
has comment: http://stackoverflow.com/comment/38276176
has answer: http://stackoverflow.com/a/24682139
type: Question
has title: Phonegap event listeners not working
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38238226
score: 0
has body: Phonegap 3.4.0, jQuery 1.9.1, jQuery Mobile 1.4.2. I've posted other questions about issues with my app, but the underlying problem seems to be that my event listeners are not working correctly. This could either be that I've done it wrong, or there is a conflict. I have this code in my javascript file: function onPause() { initialize(); navigator.app.exitApp(); } function onResume() { initialize(); } function onBack(e) { alert("running"); if($.mobile.pageContainer.pagecontainer( 'getActivePage' ).attr( 'id' ) == "login") { e.preventDefault(); alert("halted"); navigator.app.exitApp(); } } function onDeviceReady(){ document.addEventListener("pause", onPause, false); document.addEventListener("resume", onResume, false); document.addEventListener("backbutton", onBack, false); } $( "body" ).load(function() { document.addEventListener("deviceready", onDeviceReady, false); }); However, none of the functions, onPause, onResume, or onBack are ever called. Which leads me to believe my event listeners are not correct or something is wrong. Am I missing something? Is there something I can check that might be causing this problem?
has comment: http://stackoverflow.com/comment/38234254
tagged with: cordova

http://stackoverflow.com/comment/38092173
comment on: http://stackoverflow.com/q/24588120
score: 1
has text: [Regular Expressions: Now you have two problems](http://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/); maybe see the bit about "Regular expressions are not Parsers."
type: Comment
type: QuestionComment

tcp
type: Tag
tags question: http://stackoverflow.com/q/24662320
tag name: tcp

http://stackoverflow.com/comment/38371515
type: Comment
score: 0
type: AnswerComment
has text: Sir, If you please take a look at http://stackoverflow.com/questions/24735562/google-maps-multiple-infowindows
comment on: http://stackoverflow.com/a/24649009

http://stackoverflow.com/q/24701922
tagged with: http://stackoverflow.com/tag/html
tagged with: email
linked to: http://stackoverflow.com/q/13317429
favorite count: 0
has answer: http://stackoverflow.com/a/24702256
has body: I am writing a php application which (amongst other things) creates some reports for emailing. I want to enable my customer to click on a "create emails" button which will cause a number of email client windows to open pre filled with data, so that my customer can check the content before sending the emails. I could generate an html page with a number of mailto tags on, which the customer then clicks on to open the emails (for checking) before sending, but this is obviously labour intensive and part of the reason I'm writing this php application. Is the solution to have some javascript on the generated html page which fires all the mailto links on page load? Or is there a better way? ADDITIONAL EDIT: The key point is that the customer needs to manually check the content before the emails are sent - sorry I have not been clear. The customer has since specified that he wants the emails to appear as draft pre-composed emails in his email client rather than appearing on a web page. Thanks
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38306607
tagged with: php
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/38308451
type: Question
has answer: http://stackoverflow.com/a/24702103
linked to: http://stackoverflow.com/q/5620324
has answer: http://stackoverflow.com/a/24865747
downvote count: 0
tagged with: javascript
has title: Composing but not sending an email using PHP
answer count: 3

http://stackoverflow.com/q/24590077
has answer: http://stackoverflow.com/a/24590185
has title: Is it possible to use code to transform a list in format 'list': "translation"?
has answer: http://stackoverflow.com/a/24590223
answer count: 3
has body: I would like to be able to change a list of words in my coding, e.g. var words= { AFK Away from the keyboard 4U For you B4N By for now BBL Be back later BDAY Birthday CBA Can't be asked } changed to this format: var words= { 'AFK': "Away from the keyboard", '4U': "For you", 'B4N': "By for now", 'BBL': "Be back later", 'BDAY': "Birthday", 'CBA': "Can't be asked", } without having to change each word into the format manually using HTML/JavaScript. However I understand that this might not be possible, but I thought I'd see if anyone had an I idea on how to do it anyway. From what I read it looks as if I'll have to use Python and a Database, but I don't know anything about python what so ever really so I was hoping (probably vainly) that there is some HTML/JavaScript code that I haven't seen that solves this! I found a similar question here, but it wasn't really what I wanted as it uses python: [turning data into a list The thing I want to do is change all words in this format: e.g AFK Away from the Keyboard to a format with 'AFK': "Away from the keyboard", the aim of this code is to translate text abbreviations to real English words which it is already doing, but in order to get a decent amount of words to translate I need to get words in the above format which would take forever if I formated each one individually. here is the rest of the code if that helps: function replacer() { var text= document.getElementById("textbox1").value; for (var modifiers in translationwords){ text = text.replace(new RegExp('\\b' + modifiers + '\\b', 'gi'), translationwords[modifiers]); } document.getElementById("textbox2").value=text; document.getElementById("add").onclick= function storage() { if(!document.cookie) document.cookie = ""; document.cookie = document.cookie +"&lt;li&gt;"+document.getElementById("textbox1").value+ ":"+"&lt;/li&gt;"; document.cookie = document.cookie +"&lt;li&gt;" + document.getElementById("textbox2").value+ "&lt;/li&gt;"; document.getElementById("array").inner…
upvote count: 1
has answer: http://stackoverflow.com/a/24590207
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38095382
tagged with: http://stackoverflow.com/tag/html
tagged with: python
has comment: http://stackoverflow.com/comment/38095436
tagged with: list
linked to: http://stackoverflow.com/q/13458430
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38095533
type: Question
has comment: http://stackoverflow.com/comment/38095442
has comment: http://stackoverflow.com/comment/38095423
tagged with: database
tagged with: javascript

http://stackoverflow.com/a/24592001
score: 0
has body: When you have a code like this: var foo = bar; then your variable called foo will get the value bar. So it is bar assigned to foo, not foo assigned to bar, therefore you have some misconceptions in your question. As about the code posted. The first part creates an object and assigns it to person. The second part assigns a function to Object.create. The function creates a new empty function and assigns it to F. When this is done, the parameter called o is assigned to F's prototype. Since F has a prototype, it can be instantiated and a new instance of F is returned. The third part is a test code. It takes person and using Object.create instantiates a new person.
answers question: http://stackoverflow.com/q/24591841
type: Answer

http://stackoverflow.com/q/24745006
type: Question
score: 14
type: AnsweredQuestion
tagged with: base64
has answer: http://stackoverflow.com/a/24762973
has answer: http://stackoverflow.com/a/24745145
linked to: http://stackoverflow.com/q/28599753
has title: Gmail API - Parse message content (Base64 decoding?) with Javascript
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24745145
favorite count: 0
answer count: 4
tagged with: gmail-api
has answer: http://stackoverflow.com/a/33806316
possible better answer: http://stackoverflow.com/a/28622096
upvote count: 14
tagged with: angularjs
has body: I'm trying to use the Gmail API to get a user's email, grab the message subject and body, and then display it on a webpage. I'll be doing other stuff with it, but this is the part that I am having difficulty with. I am using Angular.js. Here is my API call: function makeApiCall() { gapi.client.load('gmail', 'v1', function() { var request = gapi.client.gmail.users.messages.list({ labelIds: ['INBOX'] }); request.execute(function(resp) { var content = document.getElementById("message-list"); angular.forEach(resp, function(message) { var email = gapi.client.gmail.users.messages.get({'id': message.id}); // var raw = email.payload.parts; // console.log(raw); content.innerHTML += JSON.stringify(email) + "&lt;br&gt;"; }) }); }); } So gapi.client.gmail.users.messages.list returns an array of my messages, with their ID numbers. That is working. The call to gapi.client.gmail.users.messages.get({&lt;specific message ID&gt;}) outputs this - {"B":{"method":"gmail.users.messages.get","rpcParams":{},"transport":{"name":"googleapis"}}}. Not sure what that is, but trying to get the message payload (email.payload.parts), results in undefined. So, how can I get the message content? Also, I would assume that if I can get the message contents, I would then have to Base64 decode the contents to get some English out of it. Any suggestions for that would be of great help also. I've found this: https://github.com/kvz/phpjs, but since I'm not sure how to go about getting the message contents so that I can try and decode them, so not sure if that php.js is of an help in that regard.
has answer: http://stackoverflow.com/a/28622096
has comment: http://stackoverflow.com/comment/120867252

http://stackoverflow.com/comment/38232802
type: Comment
has text: I tried it with the following syntax : $(this).prev(".actualImage"); but it didn't seem to work
comment on: http://stackoverflow.com/a/24662149
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38252970
has text: Background script (background.js)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24673181

http://stackoverflow.com/a/24698861
has body: Use the filter expression with an ng-repeat directive stuff goes here Angular Docs
answers question: http://stackoverflow.com/q/24698647
type: Answer
score: 0

http://stackoverflow.com/a/36625413
has body: Codenamezero is a nice example of extending an object in jQuery/js but you can do this out-of-the-box: $(document).tooltip("disable").tooltip("hide"); $(document).tooltip("enable").tooltip("show"); I have validation where this method can be useful to override defaults
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/60888246
answers question: http://stackoverflow.com/q/24704020
type: Answer

http://stackoverflow.com/q/24729737
score: 1
type: Question
tagged with: jquery-ui
possible better answer: http://stackoverflow.com/a/24730141
accepted answer: http://stackoverflow.com/a/24737489
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24730141
tagged with: ajax
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/24729827
favorite count: 0
has body: i have a element of images that i want to be able to be able to drag to a droppable zone, and fire a ajax post request but if it fails the draggable element should revert back to it's place. Also how do i find which was the droppable zone that the element was drop inside, i know how to find that item that was dropped but not the zone it was dropped in. However as i am new to jquery, i am having problems getting this to work. my code for now is as follows $(function() { $(".drag").draggable( { revert:"invalid"} ); $(".drop").droppable({ accept: ".drag", drop: function( event, ui ) { var imageId = ui.draggable.attr("id"); var targetLocation= 'something'; //no idea how to find zone dropped into var formdata={id:imageId}; $.post( "&lt;?php echo base_url('home/test'); ?&gt;", { image_id: imageId }) .done(function( data ) { var status = $.parseJSON(data); // console.log(status['status']); if (status['status']=='success') { failure= false; $(ui.draggable).hide("slow"); } },'json'); } }); });
upvote count: 1
has title: How to revert draggable element on failed ajax post request
has answer: http://stackoverflow.com/a/24737489
type: AnsweredQuestion

http://stackoverflow.com/a/24720764
accepted answer of: http://stackoverflow.com/q/24720742
type: Answer
answers question: http://stackoverflow.com/q/24720742
upvote count: 2
downvote count: 1
score: 1
type: AcceptedAnswer
has body: you can't have multiple elements of the same id (des in your case) in the document. try something like: i=1; $(document).on('click', 'a.add', function (e) { e.preventDefault(); $('.000').append(' '); CKEDITOR.replace( 'des-'+i ); i++; })

http://stackoverflow.com/comment/38220425
type: Comment
comment on: http://stackoverflow.com/a/24652820
score: 0
has text: The last JSON you provided is not valid, that's why it doesn't work
type: AnswerComment

http://stackoverflow.com/q/24712954
downvote count: 0
score: 1
has body: Any idea why is objProperties, an xpath with wildcard, in ... ... function getXMLServerObject (httpType, cmd, isAsync) { var object = new Array(); $.ajax({ type: httpType, url: cmd, async: isAsync, dataType: "xml", success: function (xml) { var error = $(xml).find("Error"); if (error == null) { object["__error"] = error.text(); return object; } var objProperties = $(xml).find("Data\\Record\\*"); ... of zero length for xml: ... <Data> 30 -1 Find on individual nodes returns proper results
type: Question
has answer: http://stackoverflow.com/a/24714699
tagged with: javascript
tagged with: wildcard
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/24713014
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/24714699
has title: XPath and wildcard in AJAX
has answer: http://stackoverflow.com/a/24713014
has comment: http://stackoverflow.com/comment/38749845
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
tagged with: xpath

http://stackoverflow.com/q/24728927
upvote count: 2
has comment: http://stackoverflow.com/comment/38359408
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24729041
has title: Grab Table Element in Javascript
possible better answer: http://stackoverflow.com/a/24729004
has answer: http://stackoverflow.com/a/24729004
type: Question
accepted answer: http://stackoverflow.com/a/24729041
answer count: 2
has comment: http://stackoverflow.com/comment/38359447
downvote count: 0
has comment: http://stackoverflow.com/comment/38359636
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have a table in HTML that holds names, addresses and phone numbers. In each row for that table, there is a link you can select that opens up a popover. When a popover is selected, I would like to store the name for that specific row. The class associated with a name is &lt;td class="du-orl-1"&gt; Daniel &lt;/td&gt; I am trying to store that name in a class via Javascript but this just seems to store the whole array of data rather than the specific element: var objectId = $(".du-orl-1").html($(this).html()); Any ideas on what I am doing wrong?
favorite count: 0

http://stackoverflow.com/q/24687425
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/38282586
has answer: http://stackoverflow.com/a/24689475
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/750486
type: Question
has comment: http://stackoverflow.com/comment/38283357
tagged with: javascript
has title: Irregular Button Shape Background Images With Pure CSS or Javascript ie6 compatible. (I know.. ancient) I cant use jquery
has body: I have spent the last 6 hours trying to get this thing to work. Im hoping for some help here. I cant use jquery. Basically you hover over and the background goes grey and on click it will show the tooltip underneath. Heres The sprite HTML NEGOTIATIONS IMPPLEMENT AND TRACK CHANGES LABOR RELATIONS NEGOTIATIONS PREPARATION A Comprehensive Process the leadership will undertake to prepare or the bargaining contract. This includes, but is not limited to the formal kick-off process, developing proposals and contingency plans, reviewing those plans to gain approval, etc. Prepatation will include a cross-fuctional team consisting of Compensation and Benefits, Communications and Government Relations, Legal, Gloabal Security and Procurement. More Info A Comprehensive Process the leadership will undertake to prepare or the bargaining contract. This includes, but is not limited to the formal kick-off process, developing proposals and contingency plans, reviewing those plans to gain approval, etc. Prepatation will include a cross-fuctional team consisting of Compensation and Benefits, Communications and Government Relations, Legal, Gloabal Security and Procurement. More Info A Comprehensive Process the leadership will undertake to prepare or the bargaining contract. This includes, but is not limited to the formal kick-off process, developing proposals and contingency plans, reviewing those plans to gain approval, etc. Prepatation will include a cross-fuctional team consisting of Compensation and Benefits, Communications and Government Relations, Legal, Gloabal Security and Procurement. More Info A Comprehensive Process the leadership will undertake to prepare or the bargaining contract. This includes, but is not limited to the formal kick-off process, developing proposals and contingency plans, reviewing those plans to gain approval, etc. Prepatation will include a cross-fuctional team consisting of Compensation and Benefits, Communications and Government Relations, Legal, Gloaba…
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/38245308
score: 0
type: QuestionComment
type: Comment
has text: Exactly. I had this working when I had all the window code inside app.js. (loadFeed.js was still a module that I included inside app.js.)
comment on: http://stackoverflow.com/q/24668428

http://stackoverflow.com/comment/38179801
comment on: http://stackoverflow.com/a/24616904
has text: @markthethomas It seems if the icon is clicked once (expanding the search bar), and clicked again, the blur() handler is triggered **before** the 2nd occurrence of the click handler. With boolean flags alone I wasn't able to produce the sequence you desired. (A sequence of 2 clicks fires click(), blur(), click(), with the last click being undesired in that specific instance, but the sequence of clicking the icon, clicking outside the bar, and clicking the icon again, also triggers the same click(), blur(), click() sequence. I'm not sure how to make the same events produce different outcomes
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24743201
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24743137
has comment: http://stackoverflow.com/comment/38386011
upvote count: 2
type: Answer
score: 2
has body: you need to use the appendChild function your code could than look like this: ... cell5.appendChild(changeDisease); ... You can find more details on this function here: http://www.w3schools.com/jsref/met_node_appendchild.asp Update - see comment: name is an attribute of an element and not the caption of the button, if you want to set the caption use the attribute value instead - here is an example: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_button
has comment: http://stackoverflow.com/comment/38385896
answers question: http://stackoverflow.com/q/24743137

http://stackoverflow.com/a/24594110
has body: Try this: onRegionClick: function(element, code, region) { var e = document.getElementById("query"); var scope = $(e).scope(); scope.$apply(function() { scope.query = code; }); }, Explanation In angular, you can retrieve the scope of any element by calling scope() on the jQuery element. Once you have the scope, code is assigned to the query variable on the scope. Since the click handler is executing outside of the angular context, the assignment is wrapped in an $apply block to trigger a $digest cycle and update the views. Demo Fiddle
downvote count: 0
answers question: http://stackoverflow.com/q/24593794
type: AcceptedAnswer
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/38103171
score: 2
accepted answer of: http://stackoverflow.com/q/24593794

http://stackoverflow.com/comment/38150089
type: Comment
score: 0
type: AnswerComment
has text: Just replace the the line involing your $.live declaration, no other changes needed
comment on: http://stackoverflow.com/a/24618237

http://stackoverflow.com/comment/38126433
type: Comment
type: QuestionComment
has text: Quite strange to use a regex to make numbers positive :S. First parsing them to an integer/double will in most cases be more efficient, at least when you want to perform operations on the input...
comment on: http://stackoverflow.com/q/24605275
score: 0

http://stackoverflow.com/comment/102849798
comment on: http://stackoverflow.com/a/24622723
has text: How is this the accepted answer when stroke width has nothing to do with the hover area?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/24608337
score: 1
has body: The way you handle it now presents way too much overhead for this kind of task. I recommend you to learn more about using the data attribute on your HTML tags. These attributes allow you to define tag specific settings which you can easily read with jQuery and make it respond to the data. Example: ... ... Here is the JSFiddle. And here is the jQuery Documentation on .data(). Also check out the data-attribute documentation here.
has comment: http://stackoverflow.com/comment/38139589
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38148691
accepted answer of: http://stackoverflow.com/q/24607312
type: Answer
answers question: http://stackoverflow.com/q/24607312
has comment: http://stackoverflow.com/comment/38136122
has comment: http://stackoverflow.com/comment/38137063

http://stackoverflow.com/q/24662342
answer count: 5
has answer: http://stackoverflow.com/a/24662625
has answer: http://stackoverflow.com/a/24662405
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24662435
accepted answer: http://stackoverflow.com/a/24662456
has answer: http://stackoverflow.com/a/24662435
has title: Appending an element based on choice from a dropdown
type: Question
has body: I am trying to create multiple fields based on a choice from a dropdown menu but when I choose from the options it only takes into account the first drop down menu, so if I create 3 fields with different values it will only take the first field 3 times Here is the current function I'm using to work it Add Another Field Text Note submit jQuery $('#submit').live('click', function() { $("select").each(function() { if($('#dropdown').val() == "text"){ $("#form").append(' '); } else if($('#dropdown').val() == "note"){ $("#form").append(' '); } }); }); And heres the fiddle I'm working on http://jsfiddle.net/me74Z/
has answer: http://stackoverflow.com/a/24662402
score: 0
has answer: http://stackoverflow.com/a/24662456
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38233267

http://stackoverflow.com/q/24592607
upvote count: 3
has body: I am migrating some server-side Java code to a new NodeJS server. I am looking for an equivalent method call in Javascript to Java's Cipher.doFinal(byte[]) Note that I can't use NodeJS Buffers because they don't support negative Byte values. So to do my encryption, I'll need a method that accepts an array of positive and negative numbers. Here's all of what I currently have that is related to this problem: Node JS / Javascript: var crypto = require('crypto'); var cipher = crypto.createCipher('aes256',key); Java (javax.crypto.Cipher): Cipher cipher; SecretKeySpec skeySpec = new SecretKeySpec(key, "AES"); try { cipher = Cipher.getInstance("AES"); } catch (NoSuchAlgorithmException e) { } catch (NoSuchPaddingException e) { }try { cipher.init(Cipher.ENCRYPT_MODE, skeySpec); } catch (InvalidKeyException e) { } later in the Java code, I call this method where Iv represents Initialization Vector: byte[] newIv = cipher.doFinal(myIv); How can I get the same result in JavaScript as I do in the doFinal Java method?
tagged with: cryptography
possible better answer: http://stackoverflow.com/a/24595361
tagged with: node.js
has title: Javascript/NodeJS equivalent code for the Java code Cipher.doFinal(byte[])?
has answer: http://stackoverflow.com/a/24668125
has answer: http://stackoverflow.com/a/24595361
accepted answer: http://stackoverflow.com/a/24668125
downvote count: 0
tagged with: java
tagged with: javax.crypto
type: Question
type: AnsweredQuestion
score: 3
tagged with: javascript
answer count: 2
favorite count: 0

http://stackoverflow.com/a/24731825
has comment: http://stackoverflow.com/comment/38366264
has comment: http://stackoverflow.com/comment/38372001
answers question: http://stackoverflow.com/q/24731363
score: 0
has comment: http://stackoverflow.com/comment/38451604
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38371417
type: Answer
has comment: http://stackoverflow.com/comment/38364984
has body: Edit: I found a solution here: jQuery in Greasemonkey 1.0 conflicts with websites using jQuery Change the @grant to: // @grant GM_log Then everything works well. Tried and tested as such: // ==UserScript== // @name test // @namespace test // @description Filter words and disable images if it founded // @include http://myanimelist.net/* // @version 3 // @require http://code.jquery.com/jquery-latest.min.js // @grant GM_log // ==/UserScript== //window.addEventListener('load', function () document.addEventListener('DOMContentLoaded', function () { var _$ = this.jQuery = jQuery.noConflict(true); var txt = _$("body").html(); _$("body").append('SEARCH FOR ME IN SITE!'); console.log('123123123123'); });
has comment: http://stackoverflow.com/comment/38453536
accepted answer of: http://stackoverflow.com/q/24731363

http://stackoverflow.com/comment/38304702
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24700123
type: QuestionComment
has text: @lan. similar question is http://stackoverflow.com/questions/3256547/regex-simple-phone-number.. any many are there

http://stackoverflow.com/q/24732159
tagged with: jquery
has comment: http://stackoverflow.com/comment/38367183
has body: I am new to jQuery, I have created a page below and have the jquery function for expand collapse. Every thing is working fine except following fact that, some of the child elements are already expanded/collapsed then if I am doing expand all/collapse all then it's doing reverse for the child element as I am doing toggle function so if child element is already expanded and I am doing expand all then it's expanding rest of the divs but collapsing the element already expanded,and so is vice-versa. Please suggest how to solve this issue. Thank you. javascript: $(function(){ $('[id^=hideAns],[id^=showAns]').click(function(){ $(this).hide(); $(this).siblings().show(); $(this).closest('.qbox').find('[id^=ans]').toggle(500); }); }); $(function(){ $('[id^=showall],[id^=hideall]').click(function(){ $(this).hide(); $(this).siblings().show(); $('.qbox').find('[id^=ans]').toggle(500); $('.qbox').find('.icons').toggle(); }); }); html: Show all Hide all Q. No.1) This is test question 109 This is test answer 109 Q. No.2) This is test question 108 This is test answer 108 Q. No.3) This is test question 105. 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. This is test answer 105
has comment: http://stackoverflow.com/comment/38365461
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38366196
has comment: http://stackoverflow.com/comment/38366192
accepted answer: http://stackoverflow.com/a/24733015
type: Question
has comment: http://stackoverflow.com/comment/38366217
has answer: http://stackoverflow.com/a/24733015
tagged with: javascript
has comment: http://stackoverflow.com/comment/38366320
score: 0
has title: Expand all and collapse all in jQuery not working as per requirement
answer count: 1

http://stackoverflow.com/a/24748281
type: Answer
answers question: http://stackoverflow.com/q/24746946
has comment: http://stackoverflow.com/comment/38421631
score: 1
has comment: http://stackoverflow.com/comment/38421369
upvote count: 1
has comment: http://stackoverflow.com/comment/38435165
has comment: http://stackoverflow.com/comment/38549297
has comment: http://stackoverflow.com/comment/38421660
downvote count: 0
has body: Why not to use HTML5 history API instead? All modern browsers support it To make things easier you can use history.js library to work with History/State APIs Using that library you can subscribe to URL updates History.Adapter.bind(window, 'statechange', function () { // event handler code here var state = History.getState(); } or push new URL into history History.pushState(null, "name", "http://newurl"); I'm not sure which JS framework you would like to use to get bidirectional binding, but with KnockoutJS you can create ko.computed object with read and write methods

http://stackoverflow.com/comment/38106203
type: QuestionComment
comment on: http://stackoverflow.com/q/24593519
type: Comment
has text: The following answer may be helpful in figuring out more about prototype, constructor functions and the value of this: http://stackoverflow.com/a/16063711/1641941
score: 1

http://stackoverflow.com/q/24593727
downvote count: 0
has answer: http://stackoverflow.com/a/24593984
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/24593984
type: Question
tagged with: word-wrap
tagged with: css
tagged with: scroll
upvote count: 1
answer count: 1
has title: Flow and Scroll Text around non rectangular shapes
tagged with: javascript
tagged with: jquery
has body: I have created a little code which lets text flow around some shapes. Using a simple Javsscript: See http://jsfiddle.net/lobin/YPBmJ/2/ What I try to achieve is that the shape is fixed and when scrolling, the text will scroll around the shape. I let the shape stay fixed via a JS bound to the scroll event, but it seams the rendering does not adopt itself to the new situation (See jsfiddle). Any Ideas how that could work? HTML: Some long Text CSS: .box { width:600px; height:400px; position: absolute; overflow-y: scroll; } .box .shapewrapper { position: relative; } .box .shapewrapper .left { background-color: #f00; height:1px; float:left; clear:left; } JS: var hbratio=10; var h=$(".box").height(); for (i=h;i>0;i--) { b=Math.round(i/10); $(".shapewrapper").prepend(' '); } $(".box").scroll(function() { var y=$(".box").scrollTop(); $(".shapewrapper").css("top",eval(y)+'px'); }); (Idea from http://www.csstextwrap.com)
has comment: http://stackoverflow.com/comment/38103307
type: AnsweredQuestion

http://stackoverflow.com/q/24619875
accepted answer: http://stackoverflow.com/a/24619915
type: Question
tagged with: object
possible better answer: http://stackoverflow.com/a/24619966
linked to: http://stackoverflow.com/q/8902687
tagged with: javascript
has answer: http://stackoverflow.com/a/24619915
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/38212196
has title: Javascript — objects containing functions with parameters
has answer: http://stackoverflow.com/a/24619955
has answer: http://stackoverflow.com/a/24619966
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38153440
has body: This is a fairly simple question, but I can't seem to find an example online. I've read up on objects and functions (i.e. here), but can't seem to find an example of a function within an object that accepts parameters. In JavaScript, we can create an object, a nested object, and a method defined by a function: var testObject = { nestedObject : { isNumber : function(number) { return !isNaN(number) }; } } How can I call my function with a specific parameter? Is the following correct? testObject["nestedObject"].isNumber(number) Thanks!

http://stackoverflow.com/comment/38290656
has text: Hi altrim, sadly its not the problem in the array. I can remove the object with the code above. But the query doesn't sent: company_ids: [].
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24683199
type: Comment

http://stackoverflow.com/comment/38223451
comment on: http://stackoverflow.com/a/24657041
type: Comment
has text: identifying the problem is what really matters... :-)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/38369669
score: 0
type: AnswerComment
has text: I applied the same thing with InfoWindow, but it giving unpected syntax "[" error
comment on: http://stackoverflow.com/a/24649009
type: Comment

http://stackoverflow.com/comment/38355613
comment on: http://stackoverflow.com/q/24726725
has text: It just holds the CSS object I want to edit, in this case its a @keyframe object.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24661506
has body: Where are the additional e's coming from? That is due to your capturing group "(e\\b)" Use this regex to avoid it: searchTerm = new RegExp("\\b" + aray[i] + "e\\b");
score: 0
type: Answer
answers question: http://stackoverflow.com/q/24661418

http://stackoverflow.com/a/24634965
has body: You appear to be confused about what the $.ajax call is actually doing. AJAX is a technology that allows browsers to make asynchronous HTTP calls to resources without requiring the entire browser page to be loaded. What you're doing in your $.ajax call is asking for the browser to submit the data from your form to the URL, RegisterProcess.jsp, and then to process the result in some way. By specifying the data type of json in your $.ajax call, you're asking jQuery to treat the response from the server as a JSON object, but the RegisterProcess.jsp page renders as HTML. Therefore, the $.ajax call interprets the response as an error and displays the message accordingly. The reason you're subsequently redirected to RegisterProcess.jsp in your browser is that you don't prevent the default submission of the registration form. One way of doing that is to issue a preventDefault() on the incoming event, or return false from your event handler. Restructure your code so that you submit an $.ajax request to a resource that returns JSON, or remove the json data type specifier from the $.ajax call.
score: 1
has comment: http://stackoverflow.com/comment/38183400
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24634540
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24634540
downvote count: 0
type: Answer

http://stackoverflow.com/q/24613630
has comment: http://stackoverflow.com/comment/38140962
type: UnansweredQuestion
has title: Embedding window within a window
has answer: http://stackoverflow.com/a/24614004
tagged with: embed
tagged with: https
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: My company uses HTTPS and I'm trying to embed videos that are HTTP, which doesn't work on our servers. My thoughts for a way around it is to create and embed a new window inside of the main one and then embed the video using something similar to this code. Is it possible to embed a window inside of another window? How? I'm using regular JS and html by the way, so if there's a library that will help me do this easily or another suggestion (because I usually find the hardest solutions for things), that would be appreciated!
linked to: http://stackoverflow.com/q/20235772

http://stackoverflow.com/a/24653093
type: Answer
has body: Just get body element: var $body = $(this.ie6 ? document.body : document); And use this properties: $body.width(), $body.height() Also to get the window dimensions var $window = $(window); var wWidth = $window.width(); var wHeight = $window.height(); UPDATED Try to use this: Element.getBoundingClientRect() var rect = element.getBoundingClientRect(); console.log(rect.top, rect.right, rect.bottom, rect.left);
answers question: http://stackoverflow.com/q/24650768
score: 0
has comment: http://stackoverflow.com/comment/38215633
has comment: http://stackoverflow.com/comment/38215970
has comment: http://stackoverflow.com/comment/38215895

http://stackoverflow.com/comment/38356881
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24727475
has text: @user310291: so test.txt and the node.js script files are in the same directory?

http://stackoverflow.com/comment/65850917
comment on: http://stackoverflow.com/a/24692057
has text: @Shiva - Hey Shiva, thanks for the great answer! When using this technique `intersects[0]` is an object with multiple attributes, i.e. `distance` of the intersection, which face was intersected, etc. However, this is only for the entry point of the ray inside the intersected object. Is there a way to get all the info for the location where the ray **exited** the object?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/24602594
has answer: http://stackoverflow.com/a/24602781
accepted answer: http://stackoverflow.com/a/24602781
tagged with: geolocation
tagged with: mysql
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/38120390
has body: I have a database of locations where the two fields are longitude and latitude. When a user reaches the index page, I'd like to retrieve their location and then get every point inside the database in a certain distance radius from the user. So far I have thought I could try to measure the distance with every point in the database but that could take a while if I have a lot of entries. I'm using Python to build my app but I use Javascript and the Google Maps API to retrieve the location. Does anyone know what I should use to do this? Thank you for your help!
has answer: http://stackoverflow.com/a/24603749
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38120221
tagged with: python
has title: Query a location database based on the user's current location
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24603749

http://stackoverflow.com/q/24615837
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: google-apps-script
has body: Long time reader, first time to post... I'm trying to create a script that will list every recently-added file within a certain folder in a spreadsheet. The script works fine until I start including subfolders, but I need to iterate through every file in all subfolders. When subfolders are included, I get "Service invoked too many times" errors. Any tips on getting the script to work, to work more efficiently, or even accomplishing the overall goal using a completely different method would be appreciated! Here is the script: function ClientFileMonitor() { var data = []; var ClientFolders = DocsList.getFolderById('XXXXX'); var files = ClientFolders.getFiles(); //Utilities.sleep(1000); var folders = ClientFolders.getFolders(); //Utilities.sleep(1000); for (var r in folders) { var cFiles = DocsList.getFolderById(folders[r].getId()).getFiles(); files.push.apply(files, cFiles); var sFolders = DocsList.getFolderById(folders[r].getId()).getFolders(); //Utilities.sleep(1000); for (var s in sFolders) { var sFiles = DocsList.getFolderById(sFolders[s].getId()).getFiles(); files.push.apply(files, sFiles); //var qFolders = DocsList.getFolderById(sFolders[s].getId()).getFolders(); //Utilities.sleep(1000); //for (var q in qFolders) { //var qFiles = DocsList.getFolderById(qFolders[q].getId()).getFiles(); //files.push.apply(files, qFiles); //var hFolders = DocsList.getFolderById(qFolders[q].getId()).getFolders(); //Utilities.sleep(1000); //for (var h in hFolders) { // var hFiles = DocsList.getFolderById(hFolders[h].getId()).getFiles(); // files.push.apply(files, hFiles); //}; //}; }; }; for (var i in files) { var todayDate = new Date(); var ageLimit = 8; /*** Created/Last Updated field ***/ var fileUpdatedDate = new Date(files[i].getLastUpdated()); var fileCreatedDate = new Date(files[i].getDateCreated()); if (fileUpdatedDate &gt; fileCreatedDate) { var days = daysDiff(todayDate, fileUpdatedDate); var lastUpdated = Utilities.formatDate(files[i].getLastUpdated(), 'America/Chicago', '…
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: List every recently-added file within a certain folder in a spreadsheet?
answer count: 0

http://stackoverflow.com/a/24650016
type: Answer
accepted answer of: http://stackoverflow.com/q/24649924
has body: You are registering your keypress inside the mouse event (every time, over and over)! Move it outside that function call: function captureInput() { mouseCapture = []; keyCapture = []; $(document).on('mousemove.capture', function (e) { var time = new Date().getTime(); mouseCapture.push({ x: e.pageX, y: e.pageY, t: time }); }); $(document).on('keyup.capture', function (e) { var time = new Date().getTime(); keyCapture.push({ key: e.which, t: time }) }); setTimeout(function () { $(document).off('.capture'); console.log(mouseCapture); console.log(keyCapture); }, 10000); } I formatted the code using the TidyUp button on JSFiddle.net. The problem becomes obvious when the indenting is correct :)
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24649924

http://stackoverflow.com/comment/38153063
type: QuestionComment
type: Comment
has text: why do you call next() if there's an error? is there an abort() like next() you can use?
comment on: http://stackoverflow.com/q/24619444
score: 0

http://stackoverflow.com/comment/38171983
has text: I think you can just add a label around the line
type: Comment
comment on: http://stackoverflow.com/q/24626694
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38469742
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24745274
has text: The relevant portion being the `"session": { "enabled": false }`.

http://stackoverflow.com/q/24633430
score: 0
has body: I am trying to pass variables from a page to a jquery dialog and it is coming up as undefined in the resulting dialog. I am passing the variable as so function attachModalEventHandler(){ $("#tempModalLauncher").click(function(e){ generateEditorModal(e, "#editorModal"); }); }; function generateEditorModal(e, identifier) { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); tips.text("").removeClass(); allFields.val( "" ).removeClass( "ui-state-error" ); $( identifier ).data('activeTemplate', selectedTemplate).dialog( "open" ); }; and then I am trying to read it from the modal $("#reloadActiveDoc").click(function(e){ var activeTemplate = $(this).data('activeTemplate'); alert("You are editing: " + activeTemplate); }); and while the variable works on the origin page, the resulting dialog page shows the variable as undefined. Thanks in advance. Edit: I have an alert in the code that shows the variable, selectedTemplate, is filled. It comes from my datatable "fnRowSelected": function (nodes) { selectedTemplate = nodes[0].cells[1].innerHTML; alert( 'The row with ID '+ selectedTemplate + ' was selected' ); }; and selectedTemplate is a global variable on the page
has comment: http://stackoverflow.com/comment/38178544
type: Question
has title: jquery .data variable passing
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38178542
answer count: 0

http://stackoverflow.com/q/24628351
has comment: http://stackoverflow.com/comment/38169236
has title: How to get textbox value? that exsist in input tag but not in textbox
type: Question
has answer: http://stackoverflow.com/a/24645992
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38169141
score: 0
has comment: http://stackoverflow.com/comment/38202153
accepted answer: http://stackoverflow.com/a/24645992
has comment: http://stackoverflow.com/comment/38169165
has body: I have a textbox which is empty, but when i inspected, it has following html: I am trying to get value of textbox as: $('#QuestionOptions_0__Text').val() and $('#QuestionOptions_0__Text').attr('value') but it always returns "" How can i get the value, Plz guide me, Thanx
has comment: http://stackoverflow.com/comment/38169189
has comment: http://stackoverflow.com/comment/38169147
type: AnsweredQuestion
tagged with: asp.net-mvc

http://stackoverflow.com/comment/111044505
comment on: http://stackoverflow.com/q/24716585
score: 0
type: Comment
type: QuestionComment
has text: Does this answer your question? [Onclick reload the div only](https://stackoverflow.com/questions/38413200/onclick-reload-the-div-only)

http://stackoverflow.com/q/24647180
score: 1
has answer: http://stackoverflow.com/a/24654678
has comment: http://stackoverflow.com/comment/38207786
favorite count: 0
type: Question
has body: I am working on a site which connects to a MySQL database and lets you display/edit the data in it. The site uses JavaScript and PHP, with HTML and CSS parts (these are added using JS). The site works, does everything I wanted it to do, but only from PC. When I try to use it from a smartphone, some of the hidden fields' value doesn't get submitted correctly to the PHP page responsible to working with them. First, I have a few of this select box: var maxLvl; var select = document.createElement( 'select' ); var trooplist = [archerLvl, giantLvl, wizardLvl, balloonLvl, dragonLvl]; //this array contains numbers, which will be used to set the starting option in the select select.id = "select" + k + " " + i; //k and i are both variables in their respective for loop: k goes from 0 to 2, in it there's another with i. select.onblur = function() { var selectid = this.id; var last = selectid.slice(-1); if(last==0){ document.getElementById("hiddenArcherid").value = this.value; alert(document.getElementById("hiddenArcherid").name + " " + document.getElementById("hiddenArcherid").value); }else if(last==1){ document.getElementById("hiddenGiant").value = this.value; alert(document.getElementById("hiddenGiant").name + " " + document.getElementById("hiddenGiant").value); }else if(last==2){ document.getElementById("hiddenWizard").value = this.value; alert(document.getElementById("hiddenWizard").name + " " + document.getElementById("hiddenWizard").value); }else if(last==3){ document.getElementById("hiddenBalloon").value = this.value; alert(document.getElementById("hiddenBalloon").name + " " + document.getElementById("hiddenBalloon").value); }else if(last==4){ document.getElementById("hiddenDragon").value = this.value; alert(document.getElementById("hiddenDragon").name + " " + document.getElementById("hiddenDragon").value); } }; select.style.position = "absolute"; select.style.left = 250 + (i*(width + (width/10))) +"px"; select.style.top = 110 + height + (rowcounter * (height * 1.5)) + "…
has comment: http://stackoverflow.com/comment/38206786
has comment: http://stackoverflow.com/comment/38208535
tagged with: php
linked to: http://stackoverflow.com/q/8789423
answer count: 2
tagged with: mysql
accepted answer: http://stackoverflow.com/a/24654678
upvote count: 1
has title: Submitting hidden field data on Android/iOS browsers does not work
has comment: http://stackoverflow.com/comment/38208302
tagged with: javascript
has comment: http://stackoverflow.com/comment/38211706
possible better answer: http://stackoverflow.com/a/56844681
tagged with: mobile-website
has comment: http://stackoverflow.com/comment/38207077
has answer: http://stackoverflow.com/a/56844681
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38212177
downvote count: 0

http://stackoverflow.com/q/24717130
accepted answer: http://stackoverflow.com/a/24718153
tagged with: javascript
tagged with: jquery
has body: I'm trying to get fancyBox (FB from now on) working and can't get it. I'll explain below what I do. The first is, of course, include the FB scripts and styles as follow: In my HTML code I have this: Register It's empty because the content is loaded trough AJAX call made on bmain_registro_2.js as you'll see below. Then in bmain_registro_2.js I write this: var $register = $("#register"); if ($register.length) { $register.load(Routing.generate('datos-basicos')); } $("#tabs").tabs(); $('.getregistered').on("click", function() { console.log("click"); $("#register").fancybox({ openEffect: 'elastic', closeEffect: 'elastic', autoSize: false, closeClick: false }); }); Routing.generate('datos-basicos') comes from Symfony2 and FOSJsRoutingBundle but it's working fine because I get the content I want to show on the modal. The problems? The modal content isn't hide (see the image below) and I think should be hide by default When I click on Register link the console.log() code is executed but the modal never show up What I'm missing here and is my code right?
score: 0
answer count: 1
tagged with: fancybox
has title: fancyBox with AJAX loaded content is not working
type: AnsweredQuestion
tagged with: fancybox-2
type: Question
has answer: http://stackoverflow.com/a/24718153

http://stackoverflow.com/q/24632297
score: 4
tagged with: karma-runner
tagged with: requirejs
has answer: http://stackoverflow.com/a/24657582
type: AnsweredQuestion
has body: I am trying to load a test helper module using requirejs, but it fails even when it has been already loaded as a dependency at the start of karma run, and I can't figure out what's the problem, I always get There is no timestamp for /base/spec/helpers/testHelpers!' Tests run fine, inside them I require any module of the app without problem, it only fails when I require specifically something from spec folder. I have checked all karma related questions and none of them apply to these case. My karma.conf file: module.exports = function (config) { 'use strict'; config.set({ basePath: '', frameworks: ['jasmine', 'requirejs'], files: [ 'bootstrapTests.js', { pattern: 'app/**/*.js', included: false }, { pattern: 'entities/**/*.js', included: false }, { pattern: 'config/**/*.js', included: false }, { pattern: 'libs/**/*.js', included: false }, { pattern: 'spec/**/*Spec.js', included: false }, { pattern: 'spec/helpers/**/*.js', included: false } ], exclude: [ 'bootstrap.js', 'bootstrap.built.js' ], preprocessors: { 'app/**/*.js': ['coverage'], 'entities/**/*.js': ['coverage'] }, coverageReporter: { reporters: [ { type: 'text-summary' } ] }, reporters: ['progress', 'coverage'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['PhantomJS'], singleRun: false }); }; My bootstrapTests.js file: var tests = []; for (var file in window.__karma__.files) { if (window.__karma__.files.hasOwnProperty(file)) { // Add all spec files and helpers if (/spec\/.+.js$/.test(file)) { tests.push(file); } } } require.config({ baseUrl: '/base', paths: { 'backbone': 'libs/backbone', 'marionette': 'libs/backbone.marionette', 'jquery': 'libs/jquery-2.1.1', 'json2': 'libs/json2', 'underscore': 'libs/underscore', 'twig': 'libs/twig', 'editor': 'app/editor', 'widgets': 'app/widgets', 'menu': 'app/menu', 'helpers': 'spec/helpers' }, map: { '*': { 'jquery': 'config/jquery/jqueryPrivate' }, 'config/jquery/jqueryPrivate': { 'jquery': 'jquery' } }, deps: tests, callback: window…
type: Question
upvote count: 4
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24657582
favorite count: 0
has title: requirejs throws a 404 trying to load a file from karma runner
possible better answer: http://stackoverflow.com/a/24638203
has answer: http://stackoverflow.com/a/24638203

http://stackoverflow.com/comment/38327054
has text: @Eamonn : If i link it directly in my page head section through _ _ then too i have to load the same font in all the pages.The problem is , i am using the same font for all the pages and i want to load the font once and use it in all the pages.
type: QuestionComment
comment on: http://stackoverflow.com/q/24712110
type: Comment
score: 0

drupal
type: Tag
tags question: http://stackoverflow.com/q/24713701
tag name: drupal

http://stackoverflow.com/a/24637568
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38193071
accepted answer of: http://stackoverflow.com/q/24637491
answers question: http://stackoverflow.com/q/24637491
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38186902
has body: Exactly as you'd expect: var mySelector = "#trackFilterTabSet_" + myStringGeneratingFunction(); $(mySelector + ' a').click(function (e) {... $(mySelector + ' a[data-toggle="tab"]').on(... A jQuery selector is simply a string. String concatenation works perfectly fine with it.

http://stackoverflow.com/q/24592127
downvote count: 0
score: 1
favorite count: 0
tagged with: kineticjs
type: UnansweredQuestion
answer count: 0
has title: KineticJS - Performance Difference Between Kinetic.Group.listening() and Individual Kinetic.Node.listening()
upvote count: 1
type: Question
tagged with: javascript
has body: Is there any performance difference between this: var rect1 = new Kinetic.Rect({ listening: false }), rect2 = new Kinetic.Rect({ listening: false }), group = new Kinetic.Group; group.add( rect1 ); group.add( rect2 ); ... and this: var rect1 = new Kinetic.Rect, rect2 = new Kinetic.Rect, group = new Kinetic.Group({ listening: false }); group.add( rect1 ); group.add( rect2 ); If so, why?

http://stackoverflow.com/a/70936150
has comment: http://stackoverflow.com/comment/125506925
type: Answer
answers question: http://stackoverflow.com/q/24672869
has body: Change browser for me that works in my case
score: 0

http://stackoverflow.com/q/24698034
tagged with: jquery
has title: knockoutjs: cloning an observableArray-Object
favorite count: 0
has answer: http://stackoverflow.com/a/24699130
possible better answer: http://stackoverflow.com/a/24698985
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24698985
upvote count: 3
accepted answer: http://stackoverflow.com/a/24699130
tagged with: knockout.js
type: Question
score: 3
has body: i want to clone/(deep)copy an item inside an knockoutjs observableArray. I can't find any information in the net regarding this problem. Everybody want's to just clone the hole array ;) Here is the jsfiddle: http://jsfiddle.net/drchef/dCHMC/1/ there you can see, i'm using a deepcopy method I found on SO. this.cloneLine = function() { //This 2 lines is what i found on SO. Should work, but doesn not :( //cloning the second line (sry hardcoded...) var lastLine = this.lines()[1]; this.lines.push(jQuery.extend(true, {}, lastLine)); }; In the viewmodel-output you can see the copy is working...but internally the new item and the cloned item reference still to the same values. If you change a value in the new line, it is also changed in the original line. Background: I have a grid of inputs and if the user is in the last line and hits "enter" in want a new line + the same data of the last line I don't want to write a method or something witch is cloning every single data. On every change of the vm, I have to update the mapping. ;( thank you
tagged with: javascript
answer count: 2
downvote count: 0

http://stackoverflow.com/q/24679661
tagged with: regex
has answer: http://stackoverflow.com/a/24679769
has comment: http://stackoverflow.com/comment/38265236
has answer: http://stackoverflow.com/a/24679882
has comment: http://stackoverflow.com/comment/38265204
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38269806
has title: Remove trailing whitespace via jQuery
has answer: http://stackoverflow.com/a/24679799
answer count: 6
has answer: http://stackoverflow.com/a/24679891
possible better answer: http://stackoverflow.com/a/24679785
score: 0
has answer: http://stackoverflow.com/a/24679785
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24682212
accepted answer: http://stackoverflow.com/a/24682212
has body: I'm trying to eliminate the whitespace following a "$", which is actually part of a string (ex. $ 100.00), and is dynamically generated per user-input. My knowledge of regular expressions is very limited. So I'm not sure if this is something I should be using. Or perhaps a more practical solution would be .trim(). But as I understand it, that method looks for beginning and ending whitespace. Here's the markup I'm working with: Estimated Total Price ‡ $ 172.84 USD And my JSFiddle. I'm still VERY new to jQuery and JS development in general. Any direction you can provide is appreciated.
has comment: http://stackoverflow.com/comment/38265142
has comment: http://stackoverflow.com/comment/38269766

http://stackoverflow.com/comment/38297213
score: 0
comment on: http://stackoverflow.com/a/24696315
type: AnswerComment
has text: Well, would it be possible to give a small sample code i.e. what to write in open function. That would really help me a lot. Thanks in advance.
type: Comment

http://stackoverflow.com/q/24732072
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/24768514
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: XTemplate Same level of array in Sencha Touch
tagged with: extjs
tagged with: sencha-touch-2
has body: Given two (or more) arrays of the same length, how do you express the values and desired output format within an ExtJS XTemplate? For example, my input data looks similar to: var data = { name : 'xxx', rowTitleArr : ['1','2','3'], colTitleArr : ['a','b','c'] }; ... and I'd like the output in the form: 1 a 2 b 3 c
tagged with: sencha-touch

http://stackoverflow.com/a/24713217
has body: I do not know why it alternates between true and false (i can reproduce it, too). The /t/ should not be anything special in the regex. It is not a special character like { or \ or [ and should just be a literal character t. But you could use another function to achieve more or less the same: 'Trafalgar Square'.match(pattern) =&gt; Array [ "T" ] 'lalala'.match(pattern) =&gt; null match takes slightly more resources than test would, but this is usually not a problem. The result will be an Array for matches or null when nothing matches, so you can just return that and the rest of your code will probably work just fine. Array... will be a truthy value and null will be a falsy value.
score: 1
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24713155

http://stackoverflow.com/comment/38104025
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24594535
type: QuestionComment
has text: any arabic words in particular or just random words?

http://stackoverflow.com/comment/38416377
comment on: http://stackoverflow.com/q/24709003
has text: @HakHak - [If I copy your code it works fine](http://jsfiddle.net/cJKCy/) (I only replaced `.load(...)` with `.html(...)` for demo purposes). I think you're going to have to provide more information before anyone can help. I believe I understand the problem you're facing (when you click `firstcontent1` it is loaded in both `content1` and `content2`?). The only problem is that that doesn't happen with the code you posted, so there is going to have to be some other factor somewhere which causes the behaviour you're seeing. Therefore, can you explain more or provide more code? Which browser?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38339111
type: AnswerComment
score: 0
type: Comment
has text: What do you mean by "older browsers"? I think it's safe to assume regexes with capturing groups are available. You make some good points about user experience and security, but the question was about making sure the separators are the same, and capturing groups can handle that.
comment on: http://stackoverflow.com/a/24716704

http://stackoverflow.com/comment/38129057
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24606186
has text: Thanks for your EDIT, too bad it doesn't work, but at least I can stop looking

http://stackoverflow.com/q/24693605
tagged with: gulp
favorite count: 0
tagged with: compass-sass
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42195532
upvote count: 3
has answer: http://stackoverflow.com/a/37299670
has title: gulp, compass, live reload & partials reloads
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/37299670
tagged with: gulp-watch
type: AnsweredQuestion
score: 3
has body: So, I'm using gulp in my project. I use gulp-compass to compile my assets. And, one of the task I have is a watch task for dev. like this: gulp.task('live', function() { gulp.watch('path/to/my/scss/files', function(event) { console.log('Event type: ' + event.type); console.log('Event path: ' + event.path); compass(event.path); }); }); The compass function: function compass(source) { return gulp.src(source) .pipe( plugins.compass({ config_file: 'config.rb', css: 'path/to/my/css/files', sass: 'path/to/my/scss/files' }).on('error', errorHandler) ) .pipe(gulp.dest('../web/css')) .pipe(plugins.livereload()); } Note: the errorHandler function is irrelevant on my question. The reason I watch files this way is in order to make gulp-compass not compile all files, but the one that have been changed (I use this for dev, so I will be working in one file at time), this way the refresh is fast, and I don't have to wait (typically, around 30 ~ 60 seconds in compile all scss). gulp-compass only perform compile, not watch. This works perfect when I'm working on a not partial file (ie: home.scss). But if I change something on a partial, that gets included on the main scss, things goes wrong: it will compile my partial, and that is, it doesn't refresh (I guess its try to refresh a partial, no sense). In order to make that happen, I have to do a dummy modification on the parent scss file, and the it works. I know this is due to the way I have define my taks (only send to compass one file at the time), and also due to gulp-compass perform always "compile". This gulp-plugin (so far) does not have the watch command (unless I patch it, and I don't want to do that). Does someone knows how to solve this situation and when I change something in a partial, "he knows" that this partials belong to a certain parent and then refresh it ? So far, I can do the dummy modification on the parent or watch explicitly the parent scss Im working on, but would love to have this automatic. I think one soluti…

http://stackoverflow.com/comment/38269653
type: AnswerComment
score: 0
type: Comment
has text: Because you have **duplicate IDs**.
comment on: http://stackoverflow.com/a/24681951

http://stackoverflow.com/q/24593598
tagged with: pager
type: Question
has answer: http://stackoverflow.com/a/24602454
answer count: 1
score: 0
has title: Pager.js with Lazy Bindings
tagged with: knockout.js
has body: I'm trying to use Pager.js to create a single page app. I have the following structure: #word/definition #word/example #word/synonym So that definition, example, and so on are divs with page bindings: &lt;div data-bind="page: {id: 'word'}"&gt; &lt;div data-bind="page: {id: 'definition'}"&gt; &lt;-- stuff goes here --&gt; &lt;div data-bind="page: {id: 'example'}"&gt; &lt;-- stuff goes here --&gt; and so on. Now, as it happens, each word has a single ViewModel for all the routes, which gets served by a JSON server handler: { definition: "A blah blah blah" , example: "Don't mess with Texas" , synonym: "fubar" } How do I load the ViewModel in such a way that the three routes "share" it? I tried loading it in as &lt;div data-bind="page: {id: 'word', withOnShow: getJsonWord}&gt; &lt;div data-bind="page: {id: 'definition'}"&gt; &lt;-- stuff goes here --&gt; &lt;div data-bind="page: {id: 'example'}"&gt; &lt;-- stuff goes here --&gt; where getJsonWord is a function that hits the server and slurps up JSON. It gets triggered, and I see a JSON response. But when I have the page structured like this, all of the child divs are visible, always. Pager doesn't switch between them.
accepted answer: http://stackoverflow.com/a/24602454
tagged with: javascript
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38202921
type: QuestionComment
has text: the `data()` may return a type `Number`, without method `replace()` of course.
score: 0
comment on: http://stackoverflow.com/q/24646128
type: Comment

http://stackoverflow.com/comment/38202740
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/24646067
type: Comment
has text: The URL is still the same, so what did you expect? If you don't want any caching you should make sure that every request is unique by appending a random number at the end, e.g. `&_=13141414124.123`.

http://stackoverflow.com/q/24697272
has comment: http://stackoverflow.com/comment/38297593
has answer: http://stackoverflow.com/a/24697807
tagged with: jquery
favorite count: 0
answer count: 9
has answer: http://stackoverflow.com/a/24697649
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
tagged with: css
has answer: http://stackoverflow.com/a/24697825
has answer: http://stackoverflow.com/a/24697749
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24697749
has comment: http://stackoverflow.com/comment/38297518
downvote count: 0
has comment: http://stackoverflow.com/comment/38297493
has comment: http://stackoverflow.com/comment/38297868
has answer: http://stackoverflow.com/a/24697655
has comment: http://stackoverflow.com/comment/38297594
has comment: http://stackoverflow.com/comment/38297506
possible better answer: http://stackoverflow.com/a/24697370
type: Question
has title: Refresh page after selecting radio button but keep the radio button value
has answer: http://stackoverflow.com/a/24697370
has body: I'm creating a page where the user can select an option by clicking on a radio button. I want the page to refresh keeping the selected radio button value. These are my codes. HTML Option 1 Option 2 Option 3 This is option 1 This is option 2 This is option 3 JAVASCRIPT $('input[type="radio"]').click(function(){ if($(this).attr("value")=="f1"){ $(".box").hide(); $(".f1").show(); } if($(this).attr("value")=="f2"){ $(".box").hide(); $(".f2").show(); } if($(this).attr("value")=="f3"){ $(".box").hide(); $(".f3").show(); } }); CSS .box{ padding: 20px; display: none; margin-top: 20px; border: 1px solid #000; } Is there a a way to reload just the div instead of refreshing the entire page?
has answer: http://stackoverflow.com/a/53298040
has answer: http://stackoverflow.com/a/55770672
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/38297487
has answer: http://stackoverflow.com/a/24697972

http://stackoverflow.com/q/24665207
tagged with: asp.net
has comment: http://stackoverflow.com/comment/38238984
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38238737
has body: Jquery custom function on masterpage not working I have a custom function like as follows : (function ($) { $.fn.scrollingCarousel = function (options, i) { ...something something }; jQuery.fn.scrollingCarousel.defaults = { autoScroll: false, autoScrollDirection: 'left', autoScrollSpeed: 10000, looped: false, scrollerAlignment: 'horizontal', scrollerOffset: 0, scrollSpeed: 'fast', beforeCreateFunction: null, afterCreateFunction: null }; })(jQuery); i am using it in a page which has a masterpage. i am using it in a page as follows. &lt;script type="text/javascript"&gt; $(document).ready(function () { $(this).('#carousel-demo1').scrollingCarousel(); }); &lt;/script&gt; i get an error as scrollingCarousel is not recognized. If i dont use the masterpage the code works fine.
type: Question
score: 0
has title: jquery masterpage custom function
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/38238688
tagged with: jquery
has comment: http://stackoverflow.com/comment/38238826
has answer: http://stackoverflow.com/a/24665446

http://stackoverflow.com/comment/39208499
type: AnswerComment
has text: Note that the filter method is ECMAScript 5.1 and upwards, so anything below IE9/FF1.5 will choke.
type: Comment
comment on: http://stackoverflow.com/a/24723030
score: 1

http://stackoverflow.com/a/24653876
has comment: http://stackoverflow.com/comment/38219821
has comment: http://stackoverflow.com/comment/38219143
has comment: http://stackoverflow.com/comment/38220122
accepted answer of: http://stackoverflow.com/q/24653633
answers question: http://stackoverflow.com/q/24653633
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38224283
has body: Finally got it after a lot of debugging using your plunker. Finally started to change the project.details in the toggle method, which worked. Then found the ng-show bug. The ng-show should not have the {{}}. So instead of p(ng-show='{{project.showDetails}}') {{project.details}} use p(ng-show='project.showDetails') {{project.details}} and done.
type: Answer
has comment: http://stackoverflow.com/comment/38220635
score: 0

http://stackoverflow.com/comment/38300568
type: Comment
comment on: http://stackoverflow.com/a/24698707
score: 0
has text: Warning: '$' was used before it was defined Error: Expected ')' to match '(' from line 11 and instead saw click unclosed string
type: AnswerComment

http://stackoverflow.com/comment/38329940
has text: @AlexBall your script works..but my motive is to display only one at a time..means John is displayed..then after interval of 1000ms it should disappear and Anna must be shown...
score: 0
type: Comment
comment on: http://stackoverflow.com/q/24713317
type: QuestionComment

http://stackoverflow.com/comment/38298658
score: 1
comment on: http://stackoverflow.com/q/24696984
type: Comment
has text: the requested ressource seems to be okay. Does the controller method exist and is it written correctly?
type: QuestionComment

http://stackoverflow.com/comment/38354843
comment on: http://stackoverflow.com/q/24726786
has text: I guess you are not cleaning up the string properly. There still seems to be metadata contained in it, or you are not extracting the right data. You can get rid of the questions marks my extracting the right data.
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24724450
upvote count: 1
has title: Emberj js onclick fail performance
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38364462
has comment: http://stackoverflow.com/comment/38352011
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js
has body: I'm trying to show a gif(loading animation) when I click over a button inside of form on login. When is loged right then I hide the gif. What happen, When I click the button it's take some seconds but, dont show nothing. This is the simple code of the handlerbars: Well, I've a div with class loading , I put the image inside of this div. So when beggining the IndexController I hide the div, but when is clicked the button I show the div, and I pretend stop the show image when I init another Controller App.IndexController = Ember.ObjectController.extend({ init: function() { //hide the image until is clicked the button $('.loading').hide(); }, actions:{ login:function(){ $('.loading').show(); if( isOK() ){ this.transitionToRoute('operador.lectura'); } } } }); When is redirected to this controller I hide the Image App.OperadorLecturaController = Ember.ObjectController.extend({ init:function() { $('.loading').hide(); } }); The trouble is that I never see that show/hide effect, why occurs this, and how to fix it?
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/38355143
type: UnansweredQuestion

http://stackoverflow.com/q/24720361
has answer: http://stackoverflow.com/a/24720433
type: Question
possible better answer: http://stackoverflow.com/a/24720433
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
has body: Here is Enter Your Name :xyz Enter Your Age :abc I want this preformatted text to be converted into charArray. I am trying to implement it by converting var something; var pre=document.getElementsByTagName("pre")[0]; pre.innerHTML.split(something); var something is supposed to be some regexp. Here are the requirements for regexp: 1) Preserve all white spaces including multiple spaces where ever present(ie. seperate index of each white space in array) 2) Preserve newline character Please provide answer in pure javascript .I would be really grateful.
has answer: http://stackoverflow.com/a/24720502
accepted answer: http://stackoverflow.com/a/24720502
tagged with: regex
has title: converting preformatted text to chararray
type: AnsweredQuestion

http://stackoverflow.com/comment/38258306
type: AnswerComment
has text: You are Welcome, about user object(are you mean user event object, or object was saved in script to do somthing?), if is a user event object, you can add a char between function parentheses like this .focus(function (e)... if is hte option tow, you can save an object in variable ..and then using a variable as a object like this var userOb = $(this);// when you can get an user object(global variable) then in any where you can use a userOb like userOb.show()// example
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24649334

http://stackoverflow.com/comment/38165058
comment on: http://stackoverflow.com/q/24625979
type: Comment
type: QuestionComment
has text: Toggling is not working in your code
score: 0

http://stackoverflow.com/comment/38146208
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24616189
has text: Can you please give code snippet?
score: 0

http://stackoverflow.com/comment/38305084
score: 0
has text: @Ian did you note that, it will work http://regex101.com/r/wY8kG1/22
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24700927

http://stackoverflow.com/q/24608816
answer count: 1
has title: PHP, Javascript & Twig Temaples
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24608929
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: symfony
tagged with: php
tagged with: twig
has body: I have this code to show points on a google map which I just can't quite get to work when I pass the information from my PHP to my Twig template. However it works just fine with an array directly in the javascript. Please can somewhere spare my hair pulling and help me out. PHP code: // Create a list of items return from SQL foreach ($mapdetails as $mapdetail){ if($locations!='') $locations.=','; $locations.='[ "'.$mapdetail['venue'].'" ,"'.$mapdetail['lat'].'" ,"'.$mapdetail['lng'].'" ]'; } // set template variables &amp; render template echo $template-&gt;render(array ( 'pageTitle' =&gt; 'Map Locations', 'locations' =&gt; $locations )); echoing $locations returns this: [ "Venue 1","53.301624" ,"-1.923434" ],[ "Venue 2" ,"53.160526" ,"-1.996968" ] JAVASCRIPT SNIPPET: When I use this line in the template it doesn't work var all = '[]'; When I use this line it does work var all = [[ "Venue 1" ,"53.301624" ,"-1.923434" ],[ "Venue 2","53.160526" ,"-1.996968"]]; FULL JAVASCRIPT &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"&gt;&lt;/script&gt; &lt;script&gt; // Set the Map variable var map; function initialize(){ var myOptions ={ zoom: 9, mapTypeId: google.maps.MapTypeId.ROADMAP }; THIS DOESN'T WORK When replaced with the below line it does var all = '[]'; THIS DOES WORK var all = [[ "Venue 1" ,"53.301624" ,"-1.923434" ],[ "Venue 2","53.160526" ,"-1.996968"]]; console.log(all); var infoWindow = new google.maps.InfoWindow; map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); // Set the center of the map var pos = new google.maps.LatLng(53.25,-1.91); map.setCenter(pos); function infoCallback(infowindow, marker) { return function() { infowindow.open(map, marker); }; } function setMarkers(map, all) { for (var i in all) { var venue = all[i][0]; var lat = all[i][1]; var lng = all[i][2]; var latlngset; latlngset = new google.maps.LatLng(lat, lng); co…
upvote count: 1

http://stackoverflow.com/comment/38093057
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24588910
score: 0
has text: @Idris: it can also be server-side with node.js...

http://stackoverflow.com/q/24706742
has answer: http://stackoverflow.com/a/24708151
possible better answer: http://stackoverflow.com/a/24707005
type: AnsweredQuestion
has body: I have a textbox which is used like a dropdown (using Css). This text box works like google suggest. When I type in a letter the textbox will be populated with the words matching the typed in letter. on the form submit I need to write a validation that checks whether the user has selected an item from the list or not. If not show an error message. HTML : Mau Ramir - mau.ramir@cor.tls.com Mah Gov - mg@gmail.com Mdu ira - mk@gmail.com Mdh Kn - mn@gmail.com This is what I tried so far (but not working): $.validator.addMethod("validSmartSrch", function (value, element) { var notValid = 0; var carts = $("[id^='ui-id-']").children() valid = false; if (value == $.inArray(value, carts)) { valid = true } return valid; }, 'Please select at least on item from the list');
has answer: http://stackoverflow.com/a/24707005
has title: Validate method to choose atleast one item from the list
score: 1
upvote count: 1
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/24708151
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
favorite count: 0

http://stackoverflow.com/a/24861895
answers question: http://stackoverflow.com/q/24617710
has body: Here you can find the details of the JS events: http://dorukeker.com/know-thy-gyroscope-and-js-part-i/ Here is which values are different on which devices: http://dorukeker.com/know-thy-gyroscope-and-js-part-ii/ And here is the JS file I prepared to deal with these differences: https://github.com/dorukeker/gyronorm.js UPDATE: I have just updated the gyronorm.js on GitHub. Now there are functions that tells you if a certain variable is available on the device/browser combination. Check the GitHub page to download and how to use. I hope these help. Enjoy!
type: Answer
has comment: http://stackoverflow.com/comment/40835200
upvote count: 4
has comment: http://stackoverflow.com/comment/40835150
has comment: http://stackoverflow.com/comment/40938681
has comment: http://stackoverflow.com/comment/40789236
downvote count: 0
has comment: http://stackoverflow.com/comment/38624465
has comment: http://stackoverflow.com/comment/40938334
score: 4

http://stackoverflow.com/a/24693943
upvote count: 1
score: 1
has body: Function submitBtnFunc has to be out of var app initialization, or has to be declared as var app method. Out of initialization: var app = { ... receivedElement.setAttribute('style', 'display:block;'); console.log('Received Event: ' + id); } }; function submitBtnFunc(id) { alert("user name is :"); var username = document.getElementById("username_edit").value; alert(username); } and &lt;input type="button" value="submit" id="login_submit" onclick="submitBtnFunc('login_submit');"/&gt; As app method: var app = { ... receivedElement.setAttribute('style', 'display:block;'); console.log('Received Event: ' + id); }, submitBtnFunc: function(id) { alert("user name is :"); var username = document.getElementById("username_edit").value; alert(username); } }; and &lt;input type="button" value="submit" id="login_submit" onclick="app.submitBtnFunc('login_submit');"/&gt;
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/24693710

http://stackoverflow.com/a/24598313
type: AcceptedAnswer
has body: try this, You are finding the control length not the control value length if (password.val().length &gt;=7)
type: Answer
answers question: http://stackoverflow.com/q/24598283
accepted answer of: http://stackoverflow.com/q/24598283
score: 0

http://stackoverflow.com/comment/38254002
type: AnswerComment
score: 0
type: Comment
has text: Thanks @RamRaider I can not figure this out, I am going to work from a visible form with an explanation on the screen for the moment to get it up an running, and devote time to a more elegant solution later. Thanks agian
comment on: http://stackoverflow.com/a/24595850

http://stackoverflow.com/comment/38144254
score: 3
comment on: http://stackoverflow.com/q/24615272
has text: your using a style tag instead of a link tag to load your css file.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24678872
type: Answer
has body: document.getElementById('search_term').onkeyup = null; Inline event handler attributes are assigned to the oneventname property of the element, so just set it to null to detach the event listener.
answers question: http://stackoverflow.com/q/24678799
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24678799
score: 5
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/comment/38170356
type: Comment
type: QuestionComment
has text: So you have to put `PHP` tag, one which you've missed at the beginning. btw, RoR is Ruby framework, and PHP is NOT Perl framework.
comment on: http://stackoverflow.com/q/24628584
score: 0

http://stackoverflow.com/a/24688183
has comment: http://stackoverflow.com/comment/38281610
has body: id="" attribute values are supposed to be unique. do the other way around: <div id="<?php echo $post_id; ?>" class='text'> <?php echo $text; ?> jquery $('.button').click(function(){ var ids = $(this).parent('div').attr('id'); alert(ids); }); Note: Stop using mysql_ functions, instead use mysqli_* or PDO Sample: <?php $con = new mysqli('localhost', 'username', 'password', 'database'); $result = mysqli_query($con, 'SELECT * FROM tests'); while($row = $result->fetch_assoc()) { $post_id = $row['id']; $text = $row['paragraph']; ?> <div id="post_<?php echo $post_id; ?>"> <?php echo $text; ?> Show <?php } ?> Very important point from Jeroen: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). Reference
has comment: http://stackoverflow.com/comment/38281241
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38281731
downvote count: 0
has comment: http://stackoverflow.com/comment/38281580
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24688145
score: 1
answers question: http://stackoverflow.com/q/24688145
has comment: http://stackoverflow.com/comment/38281147

http://stackoverflow.com/comment/38210604
score: 2
has text: This has bee answered already http://stackoverflow.com/questions/3684923/javascript-variables-declare-outside-or-inside-loop
comment on: http://stackoverflow.com/q/24650359
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/38548842
type: Comment
has text: Which you can reduce to `casper.waitForSelector('#elementid',`
comment on: http://stackoverflow.com/a/24742462
score: 0
type: AnswerComment

http://stackoverflow.com/a/24748267
has body: This is the snippet I use. I took only the needed part but if you need I could provide the rest of code. function codeAddress(obj) { var address = obj.parentNode.previousSibling.innerHTML; geocoder.geocode( { 'address': address, 'partialmatch': true}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { // uncomment next line to center the map // map.setCenter(results[0].geometry.location); // uncomment next line if you want to place a marker // placeMarker(results[0].geometry.location, map, results[0].formatted_address); // save latlng and use it later latlng = results[0].geometry.location.toString().replace("\(","").replace("\)","").replace(" ",""); } else { alert("Geocode was not successful for the following reason: " + status); } }); } Tip: Just to let you know that you cant sent more than ten queries per second. So, if you read addresses from a text file, implement a pause :)
has comment: http://stackoverflow.com/comment/38395416
upvote count: 1
answers question: http://stackoverflow.com/q/24747965
type: Answer
has comment: http://stackoverflow.com/comment/38395374
downvote count: 0
score: 1

http://stackoverflow.com/comment/38203285
comment on: http://stackoverflow.com/a/24646366
has text: Change the line `$this->load->model('contact_model');` to `$this->load->model('contact_model','',true);` in your `pages.php` controller and try again.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38171077
comment on: http://stackoverflow.com/q/24629092
type: Comment
type: QuestionComment
has text: show where your cordova.js is located
score: 0

http://stackoverflow.com/comment/38278088
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/24686478
has text: Sounds like your `weiredFunction` does async stuff, you should post it
type: Comment

http://stackoverflow.com/comment/38662372
score: 0
type: AnswerComment
type: Comment
has text: See Documentation [here](http://docs.sencha.com/extjs/5.0.0/apidocs/#!/api/Ext.layout.container.Border). Note: This method requires for one item to have `region:'center'` Extjs 5 layouts can be demoed and explored more [here](http://dev.sencha.com/ext/5.0.0/examples/kitchensink/#layouts)
comment on: http://stackoverflow.com/a/24889428

http://stackoverflow.com/comment/38257131
comment on: http://stackoverflow.com/q/24675555
type: Comment
type: QuestionComment
has text: Are you sure jQuery is loaded? Your error most likely happens because your `window.$` is undefined.
score: 0

http://stackoverflow.com/q/24705715
has comment: http://stackoverflow.com/comment/38314473
has comment: http://stackoverflow.com/comment/38314239
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/24705798
answer count: 5
has comment: http://stackoverflow.com/comment/38314292
type: UnansweredQuestion
score: -2
tagged with: php
has answer: http://stackoverflow.com/a/24705819
has body: How do I submit my form so that it goes through the ajax script to insert the data rather than the PHP script. When I submit the form now it goes to the PHP script. I want it to stay on the same page. I have jquery installed and the ajax script in the proper place. <input name="pid" type="hidden" value="<?php echo $pid ; ?>"> Save addsigningfee.php <?php require_once("connect.php"); $stmt = $db->prepare("INSERT INTO options(signingfee,pid)values(?,?)"); $stmt->bindParam(1, $_POST['signingfee'], PDO::PARAM_STR, 250); $stmt->bindParam(2, $_POST['pid'], PDO::PARAM_INT, 11); $stmt->execute(); ?>
has title: Submiting my form to a ajax script
downvote count: 2
has answer: http://stackoverflow.com/a/24705790
has answer: http://stackoverflow.com/a/24705792
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24706120
has comment: http://stackoverflow.com/comment/38314517
upvote count: 0
tagged with: jquery

http://stackoverflow.com/q/24701430
tagged with: knockout.js
type: Question
score: -2
has title: "undefined" return instead of name of game
tagged with: javascript
tagged with: http-post
upvote count: 0
has answer: http://stackoverflow.com/a/24708615
answer count: 1
favorite count: 0
has body: Currently I have a web page that users can title and create new "games" . What should happen is a user enters the name into a text box, hits "create" then the game is created. Currently when the user hits create , the GUID is generated an the game is created. If the user named the game Test, it should display, Game: Test Remove( clicking remove removes the game.) However the game is listed as , Game: undefined Remove. How can i make it so that the name the user give the game is displayed? Thank you for your help Here is my code Controller using PlanningPoker.Models; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace PlanningPoker.Controllers { public class GMController : ApiController { private static List<Game> games = new List<Game>() { new Game() { ID = Guid.NewGuid(), Title = "D&D" } }; [Route("data/games")] public IEnumerable<Game> GetAllGames() { return games; } [Route("data/games/create"), HttpPost] public Guid CreateGame(string title) { Game g = new Game() { ID = Guid.NewGuid(), Title = title }; games.Add(g); return g.ID; } [Route("data/games/remove"), HttpPost] public void RemoveGame(Guid id) { games.RemoveAll(g => g.ID == id); } } } Index (hmtl) (users can create games here, created games are displayed here) Planning Poker Create Game: Create Games Game : Remove Gamelist (js) function AppViewModel() { var self = this; self.games = ko.observableArray([]); $.getJSON("/data/games", function (d) { self.games(d); }); self.removeGame = function (game) { svc.Game.Remove(game.ID, function () { $.getJSON("/data/games", function (d) { self.games(d); }); }); } } $(function () { ko.applyBindings(new AppViewModel()); }); Game SVC var svc = svc || { Game: { Add: function (title, cb) { $.post('data/games/create/?title='+title, cb); }, Remove: function (id, cb) { $.post("data/games/remove/?id=" + encodeURIComponent(id), cb); } } };
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/comment/38298220
has text: But what results returns you, could you paste it?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24689902

http://stackoverflow.com/a/24628155
accepted answer of: http://stackoverflow.com/q/24627904
answers question: http://stackoverflow.com/q/24627904
type: AcceptedAnswer
score: 0
type: Answer
has body: You can directly use link().length to show number of links:- &lt;span data-bind="text: links().length"&gt;&lt;/span&gt; available links&lt;/div&gt; Or you have to use computed to get observableArray's length. there is one more way without computed, you can update numberOfLinks every time when you add new link. self.addLink = function(){ self.links.push(new Link(self.linkToAdd())); self.numberOfLinks(self.links().length); }; Fiddle Demo
has comment: http://stackoverflow.com/comment/38169737

http://stackoverflow.com/q/24746104
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/24747914
has body: I am creating my first mongoose database app. I am trying to write an express API call that returns an object that contains data from two documents. Whenever I call the /data route I get an empty array back. I added two console.log lines and the output is: test2 test1 What can I do to have the forEach finish before returning the result? Here's the code: router.route('/data') //get all data .get(function(req, res) { var results = []; Attendee.find(function(err, attendees) { if (err) {res.send(err);} else { attendees.forEach(function(attendee) { Message.find({userID: attendee._id}, function(err,messages){ results.push({ attendee: attendee, messages: messages }); }); console.log("test1"); console.log(results); }); console.log("test2"); res.json(results); } }); }); This is the result I would like to get [ { attendee: { _id: 53c060e7fb90e3d709d6bdae, fullName: ‘joe smith, phoneNumber: '+555’, __v: 0 }, messages: [ { _id: 53c06887fb1d24fb095fd365, phoneNumber: '+555', body: ‘test’, userID: '53c060e7fb90e3d709d6bdae', sid: 'SMa86f2914986d4b04067d7f054da205a5', __v: 0 }, { _id: 53c41cf3d068393d17dc0dbf, phoneNumber: '+555', body: ‘test’, userID: '53c060e7fb90e3d709d6bdae', sid: 'SM4f6c64ca7b39e6caee9859e761a2850d', __v: 0 }, { _id: 53c421e16371e54f171751cf, phoneNumber: '+555', body: ‘test’, userID: '53c060e7fb90e3d709d6bdae', sid: 'SM1097eae33e4f53cdcdad32651c016437', __v: 0 }, { _id: 53c421e16371e54f171751d0, phoneNumber: '+555', body: ‘test’, userID: '53c060e7fb90e3d709d6bdae', sid: 'SM5a452e51c995d7ad6ad8f7b85cec80b0', __v: 0 } ] } ]
type: Question
has title: mongoose db returning data from two documents
answer count: 2
tagged with: mongoose
tagged with: javascript
tagged with: express
score: 0
has answer: http://stackoverflow.com/a/24761821

http://stackoverflow.com/a/24737303
score: 0
answers question: http://stackoverflow.com/q/24736761
has body: It seems to be a valid code, the jslint suggestion is: Don't make functions within a loop Ref: http://jslinterrors.com/dont-make-functions-within-a-loop A possible solution is to move the inner function in an external function and call it inside the loop.
type: Answer

http://stackoverflow.com/q/24708577
has body: I'm building some React components and sometimes would like to log to the console the type of component that's being rendered, by displayName, which JSX uses when displaying the name of a component. From the context of a component, how can I access the displayName property? e.g. how can I make the console.log statement in this example show the displayName of the component? var Hello = React.createClass({ displayName: 'HeyHey', render: function() { console.log(this.displayName); return Hello {this.props.name} ; } }); Intended output in console: HeyHey
has answer: http://stackoverflow.com/a/49781922
downvote count: 0
has answer: http://stackoverflow.com/a/24708778
has title: ReactJS - How can I access the displayName of a component using javascript?
type: AnsweredQuestion
upvote count: 51
type: Question
accepted answer: http://stackoverflow.com/a/25691434
tagged with: reactjs
possible better answer: http://stackoverflow.com/a/49781922
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25691434
score: 51
answer count: 3

http://stackoverflow.com/q/24725023
has body: I have a little script that have to show next images, so I wrote something like that $(".img1").delay(2500).fadeIn(600); $(".img2").delay(6200).fadeIn(600); $(".img3").delay(8700).fadeIn(600); $(".img4").delay(11200).fadeIn(600); $(".img5").delay(13700).fadeIn(600); $(".img6").delay(16200).fadeIn(600); and now I wonder, how can I run function after last image? I don't want to use setTimeout.
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38351407
has answer: http://stackoverflow.com/a/24725060
has comment: http://stackoverflow.com/comment/38351420
has title: How to run function after 10 seconds not using setTimeout
has answer: http://stackoverflow.com/a/24725048
type: Question
has answer: http://stackoverflow.com/a/24725181
has answer: http://stackoverflow.com/a/24725085
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24725057
answer count: 5

http://stackoverflow.com/q/24744046
has comment: http://stackoverflow.com/comment/38388734
has answer: http://stackoverflow.com/a/24744137
accepted answer: http://stackoverflow.com/a/24744137
type: Question
upvote count: 1
tagged with: javascript
tagged with: jquery
has title: Plus and minus on accordion
tagged with: accordion
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Okay so I have a working accordion, which can be seen here This is my javascript $(document).ready(function ($) { $('#accordion').find('.accordion-toggle').click(function () { //Expand $(this).next().slideDown('fast'); $(this).children(".plusminus").text('-'); //hide other panels $(".accordion-content").not($(this).next()).slideUp('fast'); }); }); obviously in there somewhere I need something along the lines of: $(this).next().slideUp('fast'); $(this).children(".plusminus").text('+'); to make the content boxes close and the - get changed back to a + symbol but I have no idea how I would do this. Any help?
favorite count: 0
has comment: http://stackoverflow.com/comment/38387663
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38387639
downvote count: 0
tagged with: jquery-ui-accordion
score: 1

graph
tags question: http://stackoverflow.com/q/24627301
tags question: http://stackoverflow.com/q/24649724
tags question: http://stackoverflow.com/q/24740538
tag name: graph
tags question: http://stackoverflow.com/q/24640446
type: Tag
tags question: http://stackoverflow.com/q/24632155

http://stackoverflow.com/comment/38342634
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/24720277
has text: @PatrickEvans It happens in [10.4.3 Entering Function Code](http://www.ecma-international.org/ecma-262/5.1/#sec-10.4.3): "If the function code is strict code, set the ThisBinding to thisArg. ...Else if Type(thisArg) is not Object, set the ThisBinding to ToObject(thisArg)." `call`, `apply`, and `bind` just happen to be the only ways to get a non-object `this` at all.

http://stackoverflow.com/q/24687208
tagged with: php
has body: I'm having a somewhat common problem of getting my form to validate before submission. I've tried several variations on the same theme and with no dice: at best I could get nothing to submit, but usually my form just ignores codes and submits anyway. Chances are I'm missing something small but I'd appreciate any help! Essentially just trying to make sure the name isn't empty here (return true; is pointless IIRC but I was getting desperate haha). Once I can get some basic level of validation down it just comes down to coding the JS for more complicated maneuvers so this should be good enough, i hope. Thanks! Name: //More of the form Test.
has title: PHP Form Submits Before Javascript Validation
has answer: http://stackoverflow.com/a/24687243
has answer: http://stackoverflow.com/a/24687401
type: Question
tagged with: javascript
tagged with: forms
score: 0
answer count: 3
tagged with: validation
has answer: http://stackoverflow.com/a/24687278
tagged with: submit
type: UnansweredQuestion

http://stackoverflow.com/comment/38490074
score: 0
type: Comment
type: QuestionComment
has text: ok, how I unerstood you want to have seperate view files depends on type value , yes ?
comment on: http://stackoverflow.com/q/24743393

http://stackoverflow.com/comment/38314547
comment on: http://stackoverflow.com/a/24705272
score: 0
type: AnswerComment
type: Comment
has text: @ToranBillups Just make sure those functions are declared in the same scope as that code. Otherwise, it might be missing some variables if you put it too far outside.

http://stackoverflow.com/a/24715131
score: 0
answers question: http://stackoverflow.com/q/24715018
has body: I'd suggest using JSON to encode the data you fetch from the database. Try changing your ajax call as follows: $('#c_select').change(function(){ $.ajax({ type:'post', url:'get_course_info_db.php', data: 'c_id='+ $(this).val(), dataType: 'json', // jQuery will expect JSON and decode it for you success: function(reply_data){ $('#course_name').val(reply_data['c_name']); $('#course_credit').val(reply_data['c_credit']); } }); }); And your PHP as follows: include('db_connection.php'); // Escape your input to prevent SQL injection! $c_id = mysql_real_escape_string($_POST['c_id']); $result = mysql_query("SELECT * FROM course WHERE c_id = '$c_id'"); $all_course_data = mysql_fetch_array($result); echo json_encode($all_course_data); exit(); I haven't tested this but I imagine it'd work for you.
type: Answer

http://stackoverflow.com/q/24613543
has answer: http://stackoverflow.com/a/24613697
has comment: http://stackoverflow.com/comment/38140913
has comment: http://stackoverflow.com/comment/38140721
tagged with: highcharts
has answer: http://stackoverflow.com/a/24613880
tagged with: javascript
score: 0
answer count: 3
has title: JS value name and it's value
type: UnansweredQuestion
tagged with: php
type: Question
has body: I want to draw chart, I use highchars.js, data I can take from php script, so I have something like this after php month=["June","July",] and I need to place it in highchart $(function () { $('#container').highcharts({ chart: { type: 'column' xAxis: { categories : month }, ... }); but I see the name of variable, not it's value, is it possible to replace the name of variable with it's value. I want something like this var month=["June","July",]; $(function () { $('#container').highcharts({ chart: { type: 'column' xAxis: { categories : ["June","July"] }, ... });
has answer: http://stackoverflow.com/a/24613732
has comment: http://stackoverflow.com/comment/38140860

http://stackoverflow.com/comment/46697095
score: 0
type: AnswerComment
type: Comment
has text: @Vicary I think param() was never available in jqLite. Most likely you have a real jQuery pulled through dependencies of some 3rd party library etc, that's why it works for you. Anyway, the link I posted provides a complete official list of supported functions.
comment on: http://stackoverflow.com/a/24964658

http://stackoverflow.com/q/24663973
has answer: http://stackoverflow.com/a/24664023
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
has title: Angular, ui-router: how to ngShow from Directive template?
has body: I'm using a code like this: https://github.com/tarlepp/angular-sailsjs-boilerplate/blob/master/frontend/src/app/angular/Directives/NavigationHeader.js and my template code is this: https://github.com/tarlepp/angular-sailsjs-boilerplate/blob/master/frontend/src/app/partials/Directives/NavigationHeader/header.html The question: How to "ngShow" a "div" from "header.html" only if my ui-router's state is "anon.about"?
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: angular-ui-router
tagged with: sails.js

http://stackoverflow.com/comment/38255125
comment on: http://stackoverflow.com/a/24674024
type: AnswerComment
has text: Shouldn't do, it's the way they demonstrate it in the Angular docs - check out the **Associating Controllers with Angular Scope Objects** section at https://docs.angularjs.org/guide/controller.
score: 0
type: Comment

http://stackoverflow.com/comment/38179238
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24619965
has text: I solved this by creating a flag, touchLocked. If it was true the .on would return false. If it was not true then it would go through the rest of the method.

http://stackoverflow.com/comment/38428561
type: QuestionComment
comment on: http://stackoverflow.com/q/24748345
score: 0
has text: Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
type: Comment

http://stackoverflow.com/comment/57465729
has text: @Fractalf: Probably because it's too trivial and too generic. Most iteration is over collections, and the popular promise libraries do have helper methods for those already (e.g. Bluebird: `Promise.mapSeries(new Array(10), …)`). When you really need a `while`-like "loop", you'd usually just write out the recursive function in full.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24660323
type: Comment

http://stackoverflow.com/comment/38275621
type: Comment
type: QuestionComment
has text: Check that whether produkt is null or not before checking for c_id
comment on: http://stackoverflow.com/q/24685125
score: 0

http://stackoverflow.com/q/24721233
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/38344552
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24721417
favorite count: 0
has title: Drawing water container with CSS
answer count: 1
has comment: http://stackoverflow.com/comment/38344679
tagged with: css
has comment: http://stackoverflow.com/comment/38344624
has answer: http://stackoverflow.com/a/24721417
has comment: http://stackoverflow.com/comment/38344656
has comment: http://stackoverflow.com/comment/38344611
has comment: http://stackoverflow.com/comment/38344368
has comment: http://stackoverflow.com/comment/38344399
upvote count: 2
has body: I am not very good at JS even after reading the tutorial so I am asking for help here. I think a jsfiddle would help. I am trying to create a small box using JS and the box has green color filled from bottom to top when the "water container is full" When the water container is half the box is half green meaning half full. When the container is empty, no water, the JS drawn box is all empty with no green. So in essence, I am using PHP to do some back-end computations that output values between 0 and 1000 indicating the fullness of a container in real life. 0 means the container is empty and 1000 means the container is fully filled with water. Now to draw the GUI equivalent is what I am stuck on. How do I draw a box using JS that empties (green lowers) as the value PHP provides goes from 1000 to 0 (water empties) Here is an example of what I am trying to make. So basically, PHP pulls from MySQL DB a value from 1000 to 0 and 1000 means completely green box and 0 means completely empty or grey box on GUI. https://i.sstatic.net/j6642.png PHP provides the values for the "fullness" of each box in the form of 0-1000 integers. How do I draw this in JQuery? I assume I will be using the Content Refresh option in HTML to refresh the page every 5-10 seconds so that the boxes appear to be changing in fullness as PHP provides updated data. Here I am trying to create 3 divs with green background: http://jsfiddle.net/AAVT4/1/ So this way I can put these 3 divs inside another big div and do height-percentage changes on the 3 divs but I can't get the CSS right. HTML This is box 1. This is box 2. This is box 3. CSS
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/24594958
favorite count: 0
has answer: http://stackoverflow.com/a/24595023
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24595018
upvote count: 1
score: 1
has title: Javascript array length through user input
type: Question
answer count: 2
has body: I have a problem in Javascript I want to make a form which have one input text field and one button when I click on the button window.prompt is called. It will prompt depend upon my array length but I want array length get through input text field when I write 10 it will prompt 10 times when I write 2 it will prompt 2 times. How can i write this type of query? I tried this code but its not working. words = new Array (4); function a() { for ( k = 0 ; k &lt; words.length ; k = k + 1 ) { words[ k ] = window.prompt( "Enter word # " + k, "" ) ; } }
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/38365863
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24732401
type: Comment
has text: try changing onclick with onchange event.

http://stackoverflow.com/comment/38104964
comment on: http://stackoverflow.com/q/24594870
score: 0
type: Comment
type: QuestionComment
has text: I'm sure I have, but this seams really simple for something I'm not able to grasp. I have 5 divs set up as buttons, and I have 5 divs set up with content corresponding to the values of the buttons. they are all set to display: none at the moment except the first one.

http://stackoverflow.com/a/24682236
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/38270851
has comment: http://stackoverflow.com/comment/38271027
has body: Here is an updated fiddle: Fiddle Updated Directive: app.directive("announce", function () { return { restrict: "A", scope: { clickyThing: '&amp;', chore: '=' }, link: function (scope, elem, attrs) { var chore = scope.chore; elem.bind('click', function () { scope.clickyThing(chore); }); } }; }); Problems addressed: You've declared an isolated scope for the announce directive, but haven't imported the 'chore' model into your isolated scope - yet you reference chore when you execute the clickyThing(). I've changed it so that your directive imports the 'chore' model. You use { chore: chore } as the model passed to your click handlers - this is not necessary. I've changed this so that it passes the model directly. Within the updateName() method, its being called from outside the Angular context, so I've wrapped the assignment of chore in an $apply block. This ensures that a $digest is triggered after the execution of the code. I agree with Kevin, you should probably use ng-click instead.
has comment: http://stackoverflow.com/comment/38270915
has comment: http://stackoverflow.com/comment/38270692
has comment: http://stackoverflow.com/comment/38271044
downvote count: 0
answers question: http://stackoverflow.com/q/24681638
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38270671
accepted answer of: http://stackoverflow.com/q/24681638
type: Answer
has comment: http://stackoverflow.com/comment/38270707

http://stackoverflow.com/comment/38272226
comment on: http://stackoverflow.com/q/24683354
type: Comment
has text: Hey juvian, the server returns a javascript object so im stringifying it to turn it into JSON. Sorry I should have made that more clear.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38092200
score: 3
comment on: http://stackoverflow.com/q/24588516
has text: Could you mention the language you are using the regex in please?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38248870
has text: now it is not even searching the elements which are there in the list
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24671114
type: Comment

http://stackoverflow.com/a/24684857
has comment: http://stackoverflow.com/comment/38275171
downvote count: 0
answers question: http://stackoverflow.com/q/24684532
has body: Assuming the you want actual id. $(document).ready(function(){ $('.addManager').on( 'click', function() { var companyInputId = $('.company').attr('id'); alert(companyInputId); }); }); Tested, it works. Kept the alert message for testing purpose. DEMO
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/38122398
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24603768
has text: I have absolute position for the span. Positioned right above the icon element.
type: AnswerComment

http://stackoverflow.com/comment/38388811
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24744690
has text: Re-reading your question, it seems you already dynamically layout your form, so ignore the second half of the answer.
type: AnswerComment

http://stackoverflow.com/a/24606570
has comment: http://stackoverflow.com/comment/38160977
has comment: http://stackoverflow.com/comment/38161023
has comment: http://stackoverflow.com/comment/38161451
score: 0
has body: That is because the order of execution is different than we expect. ie The JSON loading section execution is happening before it get initialized. You can put the JSON loading section code in one function and call that function after initialization function is completed(.success or .done in the HTML element's event). I had one AJax function so I called this JSON loading function in the success of that AJAX call. Code: var json = [{ "key": "Apples", "value": "4" }, { "key": "Pears", "value": "7" }, { "key": "Bananas", "value": "9" }]; var processed_json = new Array(); $.map(json, function(obj, i) { processed_json.push([obj.key, parseInt(obj.value)]); }); if (processed_json.length != 0) { loadJson(); } function loadJson() { $('#container').highcharts({ chart: { type: 'column' }, xAxis: { type: "category" }, series: [{ data: processed_json }] }); }
type: Answer
answers question: http://stackoverflow.com/q/24606089
has comment: http://stackoverflow.com/comment/38145043

http://stackoverflow.com/q/24735120
has answer: http://stackoverflow.com/a/24735269
accepted answer: http://stackoverflow.com/a/24735269
upvote count: 1
possible better answer: http://stackoverflow.com/a/24735203
tagged with: jquery
has title: Using the attribute selector with Jquery but results dont work fully
favorite count: 0
has body: I have this code in my script: function setup_buttons() { $('#showdiv_Home').click(function() { $('div[id^=div]').hide(); $('#div1').show(); }); $('#showdiv_About_Overview').click(function() { $('div[id^=div]').hide(); $('#div2').show(); }); } This is the selection in the HTML: | HOME | | ABOUT US | and this is the div's it needs to show and hide: I am div 1 I am div 2 I cant see anything wrong with the code but I need some of you smart people to help me out here. When I click on my selection in changes the div display to block but only for a second and then changes itself back to hide. I cant figure out why. Really, my question is, how do I fix it?
has comment: http://stackoverflow.com/comment/38370658
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/24735306
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38370711
type: Question
has answer: http://stackoverflow.com/a/24735222
has comment: http://stackoverflow.com/comment/38371154
tagged with: javascript
has answer: http://stackoverflow.com/a/24735203
has comment: http://stackoverflow.com/comment/38370657

http://stackoverflow.com/q/24651885
has title: merging two data structures of different shapes
has body: I have two data structures with different shapes that come from two different API's. The data is in JSON format, language is JavaScript. Array 1: [ { "document" : { "html" : "some_html", "name" : "DOCUMENT_NAME_1" }, "tooltips" : [ { "html" : "some_html", "name" : "TASK_NAME_1" }, { "html" : "some_html", "name" : "TASK_NAME_2" } ] }, { "document" : { "html" : "some_html", "name" : "DOCUMENT_NAME_2" }, "tooltips" : [ { "html" : "some_html", "name" : "TASK_NAME_3" }, { "html" : "some_html", "name" : "TASK_NAME_4" } ] }] Array 2: [ [ { "name" : "TASK_NAME_1", "status" : "FINISHED" }, { "name" : "TASK_NAME_2", "status" : "OPEN" } ], [ { "name" : "TASK_NAME_3", "status" : "OPEN" }, { "name" : "TASK_NAME_4", "status" : "FUTURE" } ] ] The elements of the tooltips field from the array 1 contain the same "name"s as elements of array 2. How can I elegantly merge "status" from the array 2 into tooltips within array 1? I thought that lenses could be the right answer, but I'm unsure as I've never used them. I am aware of some ways I could solve it using nested iteration and updating array 1. I am ideally looking for an approach that doesn't modify existing data structures.
has answer: http://stackoverflow.com/a/24654162
favorite count: 0
has comment: http://stackoverflow.com/comment/38217430
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24652240
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38217372
type: Question
tagged with: lenses
tagged with: javascript
has comment: http://stackoverflow.com/comment/38214644
answer count: 3
tagged with: functional-programming
upvote count: 1
has answer: http://stackoverflow.com/a/24655440

http://stackoverflow.com/comment/38179844
has text: Of course. I meant I hope that does not add to your problems :) Back to point at hand, was the above answer helpful? You have not provided any feedback on it.
comment on: http://stackoverflow.com/a/24629789
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38282566
has text: If I understand what you are after, then you probably want to throttle `filterByName`. This will prevent `filteredRecords` from being notified until `filterByName` stops changing for x milliseconds.
type: Comment
type: QuestionComment
score: 6
comment on: http://stackoverflow.com/q/24688288

http://stackoverflow.com/q/24595192
tagged with: javascript
has answer: http://stackoverflow.com/a/24596611
has comment: http://stackoverflow.com/comment/38105333
tagged with: inheritance
answer count: 2
has body: I am new to AngularJS and i don't know if "Is controller inheritance a good practice in AngularJS?". I mean that if I have 2 almost the same controllers like here: someModule.controller('SimilarController1', function($scope) { $scope.theSameFun1 = function() { // Some $scope manipulation }; $scope.theSameFun2 = function() { // Some $scope manipulation }; $scope.foo = function() { // Some $scope manipulation }; }); someModule.controller('SimilarController2', function($scope) { $scope.theSameFun1 = function() { // Some $scope manipulation }; $scope.theSameFun2 = function() { // Some $scope manipulation }; $scope.bar = function() { // Some $scope manipulation }; }); then I can write it like this: someModule.controller('BaseController', function($scope) { $scope.theSameFun1 = function() { // Some $scope manipulation }; $scope.theSameFun2 = function() { // Some $scope manipulation }; }); someModule.controller('SimilarController1', function($scope, $controller) { $controller('BaseController', {$scope: $scope}); $scope.foo = function() { // Some $scope manipulation }; }); someModule.controller('SimilarController2', function($scope, $controller) { $controller('BaseController', {$scope: $scope}); $scope.bar = function() { // Some $scope manipulation }; }); Is that "Angular way" to solve this kind of problem? I have read that repeated parts should be in service/factory. I have also read that passing and manipulating on $scope in service/factory is bad practice, so it's probably not good idea in this situation.
possible better answer: http://stackoverflow.com/a/24596611
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/33760993
has comment: http://stackoverflow.com/comment/38159810
score: 2
type: AnsweredQuestion
upvote count: 3
tagged with: angularjs-controller
has title: Is controller inheritance a good practice in AngularJS?
accepted answer: http://stackoverflow.com/a/33760993
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/17389291

http://stackoverflow.com/q/24717660
type: Question
score: 3
linked to: http://stackoverflow.com/q/2336700
tagged with: mean-stack
tagged with: mongodb
accepted answer: http://stackoverflow.com/a/24726255
has body: I've spent some time researching MongoDB alternatives for implementing a many-to-many relationships including several stackoverflow articles (here and here) and these slides. I am creating an app using the MEAN stack and I'm trying to get confirmation on my schema setup and best practices in dereferencing a collection of objects. I have a basic many-to-many relationship between users and meetings (think scheduling meetings for users where a user can be in many meetings and a meeting contains several users). Given my use case I think it's best that I use referencing rather than embedding. I believe (from what I've read) that it would be better to use embedding only if my meetings had users unique to a single meeting. In my case these same users are shared across meetings. Also, although updating users would be infrequent (e.g., change username, password) I still feel that using a reference feels right - although I'm open to opinions. Assuming I went with references I have the following (simplified) schema: var MeetingSchema = new Schema({ description: { type: String, default: '', required: 'Please fill in a description for the meeting', trim: true }, location: { type: String, default: '', required: 'Please fill in a location for the meeting', trim: true }, users: [ { type: Schema.ObjectId, ref: 'User' } ] }); var UserSchema = new Schema({ firstName: { type: String, trim: true, default: '', validate: [validateLocalStrategyProperty, 'Please fill in your first name'] }, lastName: { type: String, trim: true, default: '', validate: [validateLocalStrategyProperty, 'Please fill in your last name'] }, email: { type: String, trim: true, default: '', validate: [validateLocalStrategyProperty, 'Please fill in your email'], match: [/.+\@.+\..+/, 'Please fill a valid email address'] }, username: { type: String, unique: true, required: 'Please fill in a username', trim: true }, password: { type: String, default: '', validate: [validateLocalStrategyPassword, 'Password should be long…
linked to: http://stackoverflow.com/q/11117854
answer count: 1
downvote count: 0
tagged with: mongoose
tagged with: javascript
has title: Understanding Many-to-Many relationships in MongoDB and how to dereference collections
favorite count: 0
has comment: http://stackoverflow.com/comment/38355687
has comment: http://stackoverflow.com/comment/38347638
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/38341437
linked to: http://stackoverflow.com/q/1208636
has answer: http://stackoverflow.com/a/24726255

http://stackoverflow.com/q/24625254
has comment: http://stackoverflow.com/comment/55730259
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24625644
has comment: http://stackoverflow.com/comment/38163819
tagged with: javascript
type: Question
score: 0
tagged with: firefox
answer count: 1
tagged with: button
tagged with: kendo-ui
linked to: http://stackoverflow.com/q/1359469
has body: Here is my code: $("#autogeneraterfid2").change(function () { // debugger if ($("#autogeneraterfid2").is(':checked')) { var kButton = $("#btnsaveprint").data("kendoButton"); kButton.element[0].innerText = "Save and Program RFID"; } else { var kButton = $("#btnsaveprint").data("kendoButton"); kButton.element[0].innerText = "Save &amp; Print"; } }); On checkbox change am changing the innerText of kendo button. This works fine in IE and Chrome whereas in Firefox it is not working. Can anyone tell me what is the exact problem?
tagged with: innertext
accepted answer: http://stackoverflow.com/a/24625644
has comment: http://stackoverflow.com/comment/38164043
has title: In Firefox kendo button text is not changing while in IE and Chrome working

http://stackoverflow.com/a/24732037
has body: In GAS global variables are not what they are in other languages. They are not constants nor variables available in all routines. I thought I could use global variables for consistency amongst functions and efficiency as well. But I was wrong as pointed out by some people here at SO. Global variable will be evaluated at each execution of a script, so not just once every time you run your application. Global variables CAN be changed in a script (so they are not constants that cannot be changed by accident), but will be reinitialized when another script will be invoked. There is also a speed penalty on using global variables. If within a function you use the same global variable two or more times, it will be faster to assign a local variable and use that instead. If you want to preserve variables between all functions in your application, it might be using a cacheService will be best. I found out that looping through all files and folders on a drive takes a LOT of time. But you can store info about files and folders within cache (or even properties) and speed up at least 100 times. The only way I use global variables now is for some prefixes and for naming widgets.
type: Answer
has comment: http://stackoverflow.com/comment/38400463
upvote count: 14
answers question: http://stackoverflow.com/q/24721226
score: 13
downvote count: 1
has comment: http://stackoverflow.com/comment/38414998
has comment: http://stackoverflow.com/comment/38385055

http://stackoverflow.com/comment/38338111
comment on: http://stackoverflow.com/a/24710082
has text: See [CodeReviewer :: Improvements to nsiZipReader and nsIScriptableInputStream](http://codereview.stackexchange.com/a/56824/49106) for implementation by @nmaier it's very interesting and the `try-catch` is done properly, because if `zr.open` does not open then it will throw error on the `zr.close` and my snippet above doesn't catch that. The input stream is also properly used. It also uses fewer interfaces, like no need for `FileUtils.jsm` and `OS.File.jsm`. Has some bonus on exception logic too, real nice.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/24714006
score: 3
has comment: http://stackoverflow.com/comment/38330134
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38330311
upvote count: 3
accepted answer of: http://stackoverflow.com/q/24713949
type: Answer
answers question: http://stackoverflow.com/q/24713949
has body: You can use callback function which will get called when response of ajax request arrives. $.ajax({ type:"method_type", url: "your_url", dataType: "data_type", async: true, success: function(data){ callback(data); } }); function callback(d){ // grid functionality } Update: $.when($.ajax("req1"), $.ajax("req2")) .then( callback, errfun); This will execute the function callback when both ajax requests are successful, or errfun if either one has an error.
downvote count: 0

http://stackoverflow.com/a/24636461
type: Answer
answers question: http://stackoverflow.com/q/24636229
score: 0
has comment: http://stackoverflow.com/comment/38184428
has body: Something like this will work (http://jsfiddle.net/QG9m4): var currentImage = 0; var numImages = jQuery('.gallery-li').length; jQuery('a.navLeft').click(function () { moveLeft(); }); jQuery('a.navRight').click(function () { moveRight(); }); function updateNav() { var hideLeft = currentImage == 0; var hideRight = currentImage == numImages; if( hideLeft ) jQuery('.navLeft').hide(); else jQuery('.navLeft').show(); if( hideRight ) jQuery('.navRight').hide(); else jQuery('.navRight').show(); } function moveRight() { if( currentImage &gt;= numImages ) return; currentImage += 3; jQuery(".gallery-li").animate({left: "-=380px",}, "slow" ); jQuery('.navLeft').css('display' , 'block'); updateNav(); } function moveLeft() { if( currentImage &lt; 1 ) return; currentImage -= 3; jQuery(".gallery-li").animate({left: "+=380px",}, "slow" ); updateNav(); }

http://stackoverflow.com/comment/38263669
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24642559
has text: Updated my answer. This should work for you. Don't forget to mark the answer as good if it is
score: 0

http://stackoverflow.com/a/24699519
answers question: http://stackoverflow.com/q/24696404
accepted answer of: http://stackoverflow.com/q/24696404
type: Answer
has body: You will need one http request per event (that was the case even with the "old" Universal Analytics which allowed to push multiple events at once to ga - that still resulted in multiple calls to the tracking pixel). IMO the best approach would be to track the form submissions as transactions with each submission as a single transaction and each field as a product. This will not save code or hits (each addItem call is a single interaction hit by the defintion of the google tos), but the resulting report will be much more userfriendly than the events report (e.g. you can click on the id for each form submission to break down by fields). This will of not course not work well if you are already doing transaction tracking for actual products.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38447922
has comment: http://stackoverflow.com/comment/38416250
has comment: http://stackoverflow.com/comment/38453284
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/24726492
has comment: http://stackoverflow.com/comment/38354495
upvote count: 3
type: AcceptedAnswer
has body: If you use jQuery to create the element for you through properties instead of string manipulation you can avoid these kind of problems: var libelle = 'tes\'te'; var id = 1; $('&lt;input /&gt;', { type: 'text', name: 'choix[' + id + ']', value: libelle }).appendTo('#test'); Example fiddle
has comment: http://stackoverflow.com/comment/38354391
type: Answer
accepted answer of: http://stackoverflow.com/q/24726475
downvote count: 0
answers question: http://stackoverflow.com/q/24726475
score: 3

http://stackoverflow.com/comment/70323975
has text: It works with include but if you need to pass another query does not work.
comment on: http://stackoverflow.com/a/40711110
type: AnswerComment
score: 0
type: Comment

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/24611778
tags question: http://stackoverflow.com/q/24747652
tag name: sequelize.js

http://stackoverflow.com/q/24596848
has body: I am curious. Is it possible to create a playlist with "file: videofile.mp4" and "file: http://www.youtube.com/watch?v=1234567" together, with JWPlayer? I tried it, it creates a js error on the page. Searched for, and couldn't find a documentation about that. I wonder if anybody else tried and succeeded creating such a playlist. Thanks!
has comment: http://stackoverflow.com/comment/38108503
has title: JWPlayer Mixed Source Playlist
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24597112
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/38108183
score: 0
tagged with: jwplayer6
accepted answer: http://stackoverflow.com/a/24597112
answer count: 1

http://stackoverflow.com/a/24650398
upvote count: 3
has body: I take it you are using Visual Studio 2013? Install the Web Essentials plug in then launch the application, then make browser window smaller - Use the inspect feature to hover over the div in browser - and it should highlight code in Visual Studio that is rendering the div.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24642962
type: Answer
answers question: http://stackoverflow.com/q/24642962
score: 3

http://stackoverflow.com/a/24673007
answers question: http://stackoverflow.com/q/24672794
type: Answer
accepted answer of: http://stackoverflow.com/q/24672794
has body: Why not use the orginal Datepicker jquery UI :) $( "#datepicker" ).datepicker({ showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true }); ref: http://jqueryui.com/datepicker/
score: 0
has comment: http://stackoverflow.com/comment/38254829
type: AcceptedAnswer

http://stackoverflow.com/comment/38438629
score: 0
comment on: http://stackoverflow.com/q/24731412
type: QuestionComment
type: Comment
has text: @Sergio Version of formcheck is 1.6 with mootools 1.2.1. I'll post it in jsFiddle soon

http://stackoverflow.com/a/24707462
has comment: http://stackoverflow.com/comment/38321865
has comment: http://stackoverflow.com/comment/38319475
has comment: http://stackoverflow.com/comment/38322689
type: Answer
has body: For starters, you shouldn't use "length()." length is an attribute, not a function. You use it correctly elsewhere. Also "google.map.LatLng" should be "google.maps.LatLng" Viewing the console in your browser when you try to run this will help you spot errors such as these.
answers question: http://stackoverflow.com/q/24706020
has comment: http://stackoverflow.com/comment/38319446
has comment: http://stackoverflow.com/comment/38319201
score: 0

http://stackoverflow.com/comment/38415850
score: 0
type: AnswerComment
type: Comment
has text: It is a two part implementation front-end and back-end, please see the link into the [showcase of lazy loading](http://www.primefaces.org/showcase/ui/data/datatable/lazy.xhtml)
comment on: http://stackoverflow.com/a/24753702

http://stackoverflow.com/q/24669924
has comment: http://stackoverflow.com/comment/38249413
tagged with: spring
has title: i want to get location attribute from response header in jQuery how it possible
downvote count: 4
has comment: http://stackoverflow.com/comment/38286222
upvote count: 0
has answer: http://stackoverflow.com/a/24670371
type: Question
has body: I have jsp page while clear the session value from cookies. I want to reload page and redirected to login.jsp page. using jQuery or javascript. How can I get location attribute from response header in javascript or jQuery? Content-Length 0 Date Thu, 10 Jul 2014 06:42:40 GMT Location **localhost:8080/Baldknobbers-Live/login.htm** Server Apache-Coyote/1.1 Set-Cookie JSESSIONID=8BF0090EFA8D05B09EA5E6F170DEE52F; Path=/Baldknobbers-Live/; HttpOnly view source Accept text/html, /; q=0.01 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Cache-Control no-cache Connection keep-alive Content-Length 0 Cookie JSESSIONID=; DWRSESSIONID= Host 192.168.1.201:8080 Pragma no-cache Referer localhost:8080/Baldknobbers-Live/admin/home.htm User-Agent Mozilla/5.0 (Windows NT 6.1; rv:30.0) Gecko/20100101 Firefox/30.0 X-Requested-With XMLHttpRequest
tagged with: jsp
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -4

http://stackoverflow.com/a/24591542
has comment: http://stackoverflow.com/comment/38098582
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24591510
has comment: http://stackoverflow.com/comment/38098759
answers question: http://stackoverflow.com/q/24591510
has comment: http://stackoverflow.com/comment/38098879
upvote count: 2
has body: Check out the angularjs docs for info on controllers and adding them to app level modules... For example for your code: var myApp = angular.module('myApp',[]); myApp.controller('SearchController', ['$scope', function($scope) { $scope.search = 'Hola!'; }]); myApp.controller('AddPropertiesController', ['$scope', function($scope) { $scope.props = []; }]); You're basically attaching each controller to the myApp instance, so the app is aware of the controllers.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38098564
has comment: http://stackoverflow.com/comment/38098734
type: Answer

http://stackoverflow.com/comment/38236128
score: 0
type: Comment
type: QuestionComment
has text: that is bizarre, it is just an event system, i did not know it feeds arguments to the callback functions
comment on: http://stackoverflow.com/q/24663786

http://stackoverflow.com/comment/38250516
comment on: http://stackoverflow.com/a/24671951
has text: In my question, I said that I wanted to get the TRUE or FALSE (0 or 1) in the PHP code, not in the javascript.. but thanks anyway..
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24717847
has answer: http://stackoverflow.com/a/24717903
accepted answer: http://stackoverflow.com/a/24717903
has answer: http://stackoverflow.com/a/24719155
type: Question
has body: I have multiple routes that need to access a database, for development I use a local database, and obviously production I use a hosted database The only problem is every time I go to push a release I have to go through each route manually changing the database link e.g. var mongodb = require('mongojs').connect('urlhere', ['Collection']); It would be nice if I could declare a variable in app.js like app.set('mongoDBAddress', 'urlhere'); then in each file do something like var mongodb = require('mongojs').connect(app.get('mongoDBAddress'), ['Collection']); Does anybody know if this is achievable I've been messing around with it for about an hour googling and trying to include different things but I have no luck. thanks.
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: express
has title: Is it possible to declare global variables in Node/Express 4.0
linked to: http://stackoverflow.com/q/4351521
possible better answer: http://stackoverflow.com/a/24719155
favorite count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/5447771
tagged with: node.js
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/24718593
upvote count: 12
has comment: http://stackoverflow.com/comment/38339249
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/61537789
answers question: http://stackoverflow.com/q/24718350
has comment: http://stackoverflow.com/comment/38339241
accepted answer of: http://stackoverflow.com/q/24718350
has comment: http://stackoverflow.com/comment/38339375
type: Answer
has comment: http://stackoverflow.com/comment/38339346
has comment: http://stackoverflow.com/comment/59808680
has body: It looks like you're attempting to replace the same element several times. But once it's been replaced, it's gone. To solve this store the currentHtml in a variable. Something like this: link: function (scope, element, attr, ctrl) { ......... var currentElement = element; scope.$watch('currentPage', function (newValue, oldValue) { if (newValue &amp;&amp; newValue != oldValue) { ....................... var html = ""; here is the code to generate the html ....................... var replacementElement = angular.element(html); currentElement.replaceWith(replacementElement); currentElement = replacementElement; } }); }
has comment: http://stackoverflow.com/comment/38339299
score: 12

http://stackoverflow.com/comment/38293004
has text: DO I need to do it? If someone know my database structure, how are they gonna play with this infomation?
type: Comment
comment on: http://stackoverflow.com/a/24694799
score: 0
type: AnswerComment

http://stackoverflow.com/q/24588194
tagged with: javascript
has comment: http://stackoverflow.com/comment/38091680
has comment: http://stackoverflow.com/comment/38092578
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24588367
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38093032
has comment: http://stackoverflow.com/comment/38091648
has title: Is it possible to apply media queries style with random window size using javascript?
has comment: http://stackoverflow.com/comment/38091646
tagged with: media-queries
type: Question
score: 0
answer count: 1
has body: Is it possible to apply media queries style with random window size using javascript ? I have 5 buttons, I need to switch using javascript to another css styles using the media queries definition in my css stylesheet. Is there any way to do that ?
has comment: http://stackoverflow.com/comment/38091841

http://stackoverflow.com/q/24651256
has comment: http://stackoverflow.com/comment/38212207
has body: Since Javascript doesn't support external (cross-domain) HttpRequest, is it still possible to send text message to external service using Javascript ? In the case, the external service is not in our control. So, it's not possible to add "Access-Control-Allow-Origin:*" in the remote site. By the way, to add a php in the local site is not the option, too.
linked to: http://stackoverflow.com/q/5584923
has comment: http://stackoverflow.com/comment/38212236
has comment: http://stackoverflow.com/comment/38212297
linked to: http://stackoverflow.com/q/9310112
type: Question
downvote count: 4
upvote count: 0
tagged with: javascript
score: -4
has answer: http://stackoverflow.com/a/24651327
answer count: 1
has comment: http://stackoverflow.com/comment/38212272
favorite count: 0
type: UnansweredQuestion
has title: Send Text Message Through Javascript to External Service

http://stackoverflow.com/comment/38428255
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24639053
has text: I'm doing POST requests unfortunately. I may have to look into the reverse proxy option, since I'm having a hard time finding viable ways of getting this to work. I'm also having a hard time believing that vanilla IE8 can make this request, but IE8 with Chrome Frame cannont.
type: AnswerComment

http://stackoverflow.com/q/24611559
has comment: http://stackoverflow.com/comment/38136823
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14220321
has title: Making synchronous Ajax calls fast
answer count: 0
type: Question
tagged with: synchronous
has comment: http://stackoverflow.com/comment/38136894
has comment: http://stackoverflow.com/comment/38136835
has body: I'm writing a website which heavily utilises Javascript and Ajax calls to a Python web server (Flask). The problem I'm having is that the calls usually lag or freeze the page for a brief moment giving a bad user experience. This occurs when sending a POST request to my Python script with the following Ajax-style call: var getUniversities = function() { var unis; $.ajax({ url: '/get/universities', type: 'POST', data: 'uid=1', dataType: 'json', async: false, success: function(data) { unis = data; } }); return unis; }; This is the general way I'm making Ajax requests and all of them generate some form of lag for my webpage. I believe it's because I'm trying to do it synchronously, but I can't see a way to retrieve data and have it ready for processing asynchronously. Thanks
tagged with: javascript
score: 0
tagged with: jquery
tagged with: asynchronous
linked to: http://stackoverflow.com/q/14220321
tagged with: ajax

http://stackoverflow.com/a/24595604
type: Answer
has body: well, I'm not good at expressing,so I give you the code directly. test
accepted answer of: http://stackoverflow.com/q/24595492
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24595492

http://stackoverflow.com/comment/38158403
type: Comment
type: QuestionComment
has text: Okay @jt0dd, can you give an example of code you would expect to work smoothly were you to implement what you are asking for?
comment on: http://stackoverflow.com/q/24622383
score: 0

http://stackoverflow.com/a/24634649
has comment: http://stackoverflow.com/comment/38185084
score: 0
type: AcceptedAnswer
has body: I suppose if you want to allow multiple easy to configure ads then you could store them in an array: var ads = [ { width: 100, height: 200, div: 'someDivID' }, ... ]; Or if you think that's too hard for your customers you could allow them to write their variables like the following: var ad1_width = 100; var ad1_height = 200; var ad1_div = 'someDivID'; var ad2_width = 200; var ad2_height = 100; var ad2_div = 'someOtherDivID'; Then in your code, you could check for their variables by checking against the window object: for (var i = 1; ; i++) { var widthKey = 'ad' + i + '_width', heightKey = 'ad' + i + '_height', divKey = 'ad' + i + '_div'; if (window.hasOwnProperty(widthKey)) { displayAd(window[widthKey], window[heightKey], window[divKey]); } else { break; } } It's weird and not exactly The Right Way(tm) but it does make it easy for end users to configure. Just make sure your customers always number them sequentially if you follow that way and that they're not using any other JS that could possible use any of the same variable names. Another possibility would be to setup a property on the window to listen for when those variables are being set: var adWidths = [], adHeights = [], adContainers = []; Object.defineProperty(window, 'ad_width', { set: function(val) { adWidths.push(val); } }); Object.defineProperty(window, 'ad_height', { set: function(val) { adHeights.push(val); } }); Object.defineProperty(window, 'ad_div', { set: function(val) { adContainers.push(val); } }); Now your customers can set their ads just by doing: ad_width = 200; ad_height = 100; ad_div = 'someDivID'; ad_width = 100; ad_height = 200; ad_div = 'someOtherDivID'; And you can access each ad with something like: for (var i = 0, len = adWidths.length; i &lt; len; i++) { displayAd(adWidths[i], adHeights[i], adContainers[i]); } But this does require you to run some code both before they run there's and after. This solution is not compatible with older versions of IE either.
has comment: http://stackoverflow.com/comment/38181281
type: Answer
has comment: http://stackoverflow.com/comment/38181435
has comment: http://stackoverflow.com/comment/38220577
answers question: http://stackoverflow.com/q/24634079
accepted answer of: http://stackoverflow.com/q/24634079

http://stackoverflow.com/comment/38235749
type: QuestionComment
comment on: http://stackoverflow.com/q/24663593
has text: Fiddle would do just fine
score: 0
type: Comment

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/24595594

http://stackoverflow.com/comment/38291443
score: 1
comment on: http://stackoverflow.com/q/24676771
type: Comment
type: QuestionComment
has text: @Sga thanks for help but it didn't work.

http://stackoverflow.com/q/24740153
has answer: http://stackoverflow.com/a/24740270
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/38380257
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
has body: I have a problem with firefox adding unnecessary scroll-bars (its working ok in chrome and ie). See the following two files: page.html & iframe.html. Page.html Iframe.html x In firefox v30 i always get vertical and horizontal scroll-bars showing. The size of the content in iframe.html is the same as the iframe tag size. I narrowed the problem down to using direction:rtl tag in the iframe.html file. When i add the direction:rtl i get the scrollbars and removing it fixes the problem. Any idea why ? How to fix this without using scrolling="no" on the iframe ? Edit: I dont think adding overflow:hidden is the solution, the content should not "overflow" - its smaller then the parent. Also i'd like to have the option for content to overflow and show scrollbars in-case that the content is long. Thanks for your help :)
tagged with: css
has answer: http://stackoverflow.com/a/24740225
score: 2
type: Question
tagged with: html-frames
tagged with: javascript
has title: Firefox IFrame Scrollbars

http://stackoverflow.com/q/24726435
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/24745668
has answer: http://stackoverflow.com/a/24745668
tagged with: knockout.js
type: Question
has title: Dependency Injection in JavaScript / Knockout.js
tagged with: dependency-injection
has body: My programming experience is primarily in PHP, JavaScript and a bit of Python. I've seen the term "dependency injection" thrown around quite a bit and I've done some searching, but I'm still a bit confused. This seems to be a highly rated post, but I'm still not satisfied (either that or I'm just hopeless) The example the accepted post uses is .... public SomeClass (MyClass myObject) { this.myObject = myObject; } I've used knockout.js a bit, and I've noticed similar scenarios for setting object values. Would passing arguments from the ReservationsViewModel to the SeatReservation function to set the object be considered dependency injection? I commented the two lines that I'm wondering about. function SeatReservation(name, initialMeal) { var self = this; self.name = name; self.meal = ko.observable(initialMeal); self.formattedPrice = ko.computed(function() { var price = self.meal().price; return price ? "$" + price.toFixed(2) : "None"; }); } function ReservationsViewModel() { var self = this; self.availableMeals = [ { mealName: "Standard (sandwich)", price: 0 }, { mealName: "Premium (lobster)", price: 34.95 }, { mealName: "Ultimate (whole zebra)", price: 290 } ]; self.seats = ko.observableArray([ //dependency injection????? new SeatReservation("Steve", self.availableMeals[0]), new SeatReservation("Bert", self.availableMeals[0]) ]); self.totalSurcharge = ko.computed(function() { var total = 0; for (var i = 0; i &lt; self.seats().length; i++) total += self.seats()[i].meal().price; return total; }); self.addSeat = function() { //dependency injection????? self.seats.push(new SeatReservation("", self.availableMeals[0])); } } Is it considered dependency injection when passing arguments to the SeatReservation function to set the "new SeatReservation" object's data? If it's not dependency injection, is there any specific term for the way these objects are being set?
tagged with: javascript
has answer: http://stackoverflow.com/a/24727272
answer count: 2
score: 3
linked to: http://stackoverflow.com/q/130794
downvote count: 0
accepted answer: http://stackoverflow.com/a/24727272
favorite count: 0

http://stackoverflow.com/comment/38294421
comment on: http://stackoverflow.com/a/24693609
score: 0
type: AnswerComment
type: Comment
has text: Option one is my preferred method - it's harder to get wrong because you're coding CSJS using a CSJS editor. Either return false or use No Submission to prevent it running a partial refresh.

http://stackoverflow.com/comment/38391891
comment on: http://stackoverflow.com/q/24746274
has text: You see, right now it's automatically giving the student an F every time, regardless of actual score.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/38379928
type: QuestionComment
comment on: http://stackoverflow.com/q/24739115
score: 1
has text: Probably a bug, I would contact the author.
type: Comment

http://stackoverflow.com/comment/38386359
score: 0
type: QuestionComment
type: Comment
has text: Are you sure your select query is working??
comment on: http://stackoverflow.com/q/24743456

http://stackoverflow.com/comment/38278548
score: 0
type: AnswerComment
has text: `typeof` is an operator, not a function.
comment on: http://stackoverflow.com/a/24686630
type: Comment

http://stackoverflow.com/comment/38374529
type: Comment
has text: What does the input data look like? Can you provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve)?
score: 0
comment on: http://stackoverflow.com/q/24735562
type: QuestionComment

http://stackoverflow.com/a/24712013
accepted answer of: http://stackoverflow.com/q/24711361
score: 1
has body: Assuming you meant this: var x = '\n ' +'\n ' +'\n El cielo es azul? ' +'\n SI ' +'\n NO ' +'\n Eso esta bien ' +'\n No esta bien ' +'\n ' +'\n ' +'\n Desarrolla por favor: ' +'\n PUEDE ' +'\n Gracias por participar ' +'\n Gracias por participar una vez mas ' +'\n ' +'\n ' ; xmlDoc = $.parseXML( x ); $(xmlDoc).find("pregunta").each(function() { console.log($(this).text()); // This shows contents of all "pregunta" correctly console.log($(this).find("enunciado").text()); // This shows ALL "enunciado" as one single string }) Note find("pregunta") not find("preguntas"). Also note that you need to have a single root element inside any XML document. so if there is other preguntas elements you need to surround them with a single element.
downvote count: 0
answers question: http://stackoverflow.com/q/24711361
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38326506
type: Answer
upvote count: 1

http://stackoverflow.com/comment/38296851
has text: Thanks Robert seems to be working here, but I have buttons that should be on top of my svg elements, but if I do a z-index -999 my svg is not "hoverable" anymore, how can I still hover my svg element and keepmy links clickable ?
comment on: http://stackoverflow.com/a/24693145
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24645233
favorite count: 0
has comment: http://stackoverflow.com/comment/38201261
upvote count: 2
answer count: 2
tagged with: assemble
has title: Grunt Assemble Cannot Read Property 'Stage'
has body: Running a pretty simply Assemble task on a project, but I'm getting the following error on my default grunt task: Running "assemble:site" (assemble) task Warning: Cannot read property 'stage' of undefined Use --force to continue. Currently running (via package.json): "assemble": "^0.4.41" "grunt": "^0.4.5", The assemble task in my Gruntfile: assemble: { options: { assets: '&lt;%= site.assets %&gt;', flatten: true, production: false, // Metadata pkg: '&lt;%= pkg %&gt;', site: '&lt;%= site %&gt;', // Template Config partials: '&lt;%= site.includes %&gt;', layoutdir: '&lt;%= site.layouts %&gt;', layout: '&lt;%= site.layout %&gt;' }, site: { files: {'&lt;%= site.root %&gt;/': ['&lt;%= site.templates %&gt;/pages/*.hbs']} } }, If it helps, here is my config.yml file too: # ============================================= # Build config # ============================================= # Root Distribution root: _gh_pages # Templates templates: templates includes: &lt;%= site.templates %&gt;/includes/*.hbs layouts: &lt;%= site.templates %&gt;/layouts layout: default.hbs # Assets Dir assets: &lt;%= site.root %&gt;/assets # ============================================= # Site metadata # ============================================= title: Feast Finder
has answer: http://stackoverflow.com/a/24651415
score: 2
has answer: http://stackoverflow.com/a/24686484
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: gruntjs
type: Question

http://stackoverflow.com/a/24702985
has body: One of your images in your array has the wrong src: http://nanomitetech.com/projects/stillmens/images/benefits.png.png Should be: http://nanomitetech.com/projects/stillmens/images/benefits.png This precludes the image from loading, so your load event listener doesn't get called for this broken image, and your loaded counter doesn't increment. 4/5 successful image loads = 80%
upvote count: 3
has comment: http://stackoverflow.com/comment/38308868
answers question: http://stackoverflow.com/q/24702770
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/38308857
type: Answer

http://stackoverflow.com/comment/38173765
has text: @A.Wolff My bad, it does work, I got confused with something else
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/24630827
type: Comment

http://stackoverflow.com/a/24625304
score: 0
answers question: http://stackoverflow.com/q/24624987
type: Answer
has body: In your ajax you are getting whole object in response i.e. response. You can get your play object by response i.e. response.play. now iterate the the values from play object. for (var i = 0; i &lt; response.play.length; i++) { //iterate your values here alert(response.play[i].object_key); //object_key is temparary name of your play object so give a proper key here. }

http://stackoverflow.com/comment/38111618
type: QuestionComment
comment on: http://stackoverflow.com/q/24598651
has text: You need to write server-side code and use a database.
score: 4
type: Comment

http://stackoverflow.com/comment/38309068
type: QuestionComment
type: Comment
score: 1
has text: Steven, check my answer...
comment on: http://stackoverflow.com/q/24701587

http://stackoverflow.com/q/24741825
has body: Could someone please tell me how to change the default delimiter for mustache.js? The default delimiter is {{var}} and I would like to change it to {|var|} I have the following code: $('body').append(Mustache.render(this.template, data)); Many thanks
upvote count: 3
possible better answer: http://stackoverflow.com/a/24741888
downvote count: 0
has answer: http://stackoverflow.com/a/58917631
favorite count: 0
has comment: http://stackoverflow.com/comment/38383253
has answer: http://stackoverflow.com/a/24741888
has answer: http://stackoverflow.com/a/27958377
tagged with: delimiter
answer count: 4
tagged with: mustache
type: AnsweredQuestion
score: 3
has title: How to change the default delimiter of mustache.js?
has answer: http://stackoverflow.com/a/27993393
accepted answer: http://stackoverflow.com/a/27993393
type: Question
linked to: http://stackoverflow.com/q/13944623
tagged with: javascript

http://stackoverflow.com/comment/38217642
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24653740
score: 1
has text: It's telling you that your JSON response is incorrect. You need to post it (or a sample of it)

http://stackoverflow.com/comment/38297123
score: 0
type: Comment
type: QuestionComment
has text: You are probably in the wrong scope. Could you provide an jsFiddle example? And you are using Dojo in the wrong way. Take a look at dojo's `on` module and the `require` module.
comment on: http://stackoverflow.com/q/24696976

http://stackoverflow.com/q/24693793
tagged with: javascript
tagged with: twitter-typeahead
has body: I'm trying to create an autocomplete text field using typeahead.js. The examples here show suggestion lists that are nicely formatted. However, when I use the same code, I only get a bland list of suggestions like so: Please see this jsFiddle for the code. I'm using Bootstrap with it. What do I have to do to get a list that is formatted the Bootstrap way?
tagged with: typeahead.js
accepted answer: http://stackoverflow.com/a/24697308
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/24697308
tagged with: twitter-bootstrap
has title: Styling the typeahead.js list (the bootstrap way)
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/comment/38501971
comment on: http://stackoverflow.com/a/24742462
score: 0
type: AnswerComment
has text: Thank you that worked well. For some reason when a user logs in, if I want them to click on a link, load the page, perform a search and click on the search button, and then log out, it will Hover over link, send keys, but it will not click. I am using **this.click('#menu-item-819 > a');** with CSS path, and have also tried XPath and neither are working. The only time the click works, is at the beginning when the script clicks on the **Log in** button. Any thoughts?
type: Comment

jquery-plugins
tags question: http://stackoverflow.com/q/24637393
tags question: http://stackoverflow.com/q/24666297
tags question: http://stackoverflow.com/q/24641123
type: Tag
tags question: http://stackoverflow.com/q/24742589
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/24603119
tags question: http://stackoverflow.com/q/24678553
tags question: http://stackoverflow.com/q/24700563
tags question: http://stackoverflow.com/q/24736416
tags question: http://stackoverflow.com/q/24651372

http://stackoverflow.com/comment/38102849
comment on: http://stackoverflow.com/q/24593935
score: 0
type: Comment
type: QuestionComment
has text: ive tried to update my yo version and it worked :)

http://stackoverflow.com/q/24683074
favorite count: 0
linked to: http://stackoverflow.com/q/43180248
has answer: http://stackoverflow.com/a/35213381
tagged with: angularjs
tagged with: drag-and-drop
has answer: http://stackoverflow.com/a/24694797
tagged with: draggable
possible better answer: http://stackoverflow.com/a/35213381
type: AnsweredQuestion
has body: I'm trying to create drag and drop directives for angularJS by following this post: http://jasonturim.wordpress.com/2013/09/01/angularjs-drag-and-drop/ But I can not send any data because inside the dragstart event handler dataTransfer and the originalEvent are always null. My drag directive looks like this: directives.directive('draggSrc', ['$rootScope', 'UuidService', function ($rootScope, UuidService) { var directive = {}; directive.restrict = 'A'; directive.link = function (scope, el, attrs) { el.attr("draggable", "true"); var id = attrs.id; if (!attrs.id) { id = UuidService.new(); el.attr("id", id); } el.bind("dragstart", function (evt) { console.log(evt); console.log(evt.dataTransfer); console.log(evt.originalEvent); evt.dataTransfer.setData('text', id); $rootScope.$emit("DRAG-START"); }); el.bind("dragend", function (evt) { $rootScope.$emit("DRAG-END"); }); }; return directive; }]); I have also called $.event.props.push('dataTransfer').
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/24694797
has title: event.dataTransfer and event.originalEvent are always null inside dragstart event handler
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/38310014
score: 0
type: Comment
has text: My 2.nd editor is in the pre I'd null_tabelle_dues1_text. I tried to put it in there. I think also, that is not running like that, when I send the text via InnerHTML it will put the desired text to the editor with the id null_tabelle_... Now, with your function it puts the text in the main editor.. How I can send it to the other?
type: AnswerComment
comment on: http://stackoverflow.com/a/24697010

http://stackoverflow.com/comment/38148823
comment on: http://stackoverflow.com/a/24617390
has text: When I used the `$(document).ready(function() { // function stuff });` suggestion the slider did not show up at all.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38178879
type: Comment
has text: @mrd the closest you will get to a JS object in C# is an [ExpandoObject](http://msdn.microsoft.com/en-us/library/system.dynamic.expandoobject(v=vs.110).aspx) (this is effectively just a wrapper around a dictionary).
comment on: http://stackoverflow.com/a/24633394
score: 1
type: AnswerComment

http://stackoverflow.com/comment/109501213
has text: Remember that setting such a global variable in your script won't trigger a re-execution of custom functions in spreadsheet cells. So you can't use a global variable to for instance have a cell in the spreadsheet automatically update based on reading that global variable.
comment on: http://stackoverflow.com/a/24749707
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/24599775
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/24602056
type: AnsweredQuestion
has body: I work in this tutorial http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/part-9 I want to generate edit form where the author is drop down list and the current author is selected I use a form similar to this function getAllbooks() { ajaxHelper(baseUri, 'GET').done(function (data) { self.books(data); }); Book ID Author Genre Price Title Year but I have javascript error authors undefined because it is inside the foreach book and I am not sure when I used value: $data.AuthorId will give me the id or not
tagged with: knockout.js
downvote count: 1
type: Question
has title: knockout options binding controls for more than one model
tagged with: c#
tagged with: javascript
score: -1
tagged with: api
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/24602056

http://stackoverflow.com/a/24589104
answers question: http://stackoverflow.com/q/24589084
has body: You could just add $('input').off(); to the end of your function.
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/a/24628108
score: 0
has body: Try the below regex, ^[0-9]{6}\.[0-9]{4}$ You need to specify the start ^ and the end$. EXplanation: ^ Means that we are at the beginning of the line. [0-9]{6} Matches a 6 digit number. \. Matches a literal dot. [0-9]{4} Matches a 4 digit number. $ End of the line.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24628063
type: Answer
accepted answer of: http://stackoverflow.com/q/24628063

http://stackoverflow.com/a/24699763
has comment: http://stackoverflow.com/comment/38303703
has body: Try this : var p = jQuery('#passwordfield').val(); if(p.length &lt;=7 || p.length &gt;= 33 || !p.match(/\d/) || !p.match(/[a-z]/i)) $('.whatever').addClass('error');
has comment: http://stackoverflow.com/comment/38302490
type: Answer
has comment: http://stackoverflow.com/comment/38302962
has comment: http://stackoverflow.com/comment/38303628
has comment: http://stackoverflow.com/comment/38303988
accepted answer of: http://stackoverflow.com/q/24699694
answers question: http://stackoverflow.com/q/24699694
has comment: http://stackoverflow.com/comment/38303525
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38302563

http://stackoverflow.com/comment/38177962
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24602542
type: Comment
has text: Many thanks @Smerny, you're awesome, I will check your code for understand how works and learn, your support is very much appreciated.

http://stackoverflow.com/a/24591284
score: 0
has body: Working example: http://jsbin.com/huxodire/1/ The main changes I did were the following: I used textContent instead of innerHTML because the later replaces the whole DOM contents and that includes removing your link to replace the text. There was no way to generate that event afterwards. I closed the first div or else all the text would be removed with the innerText including the text that works as a link. You said you wanted to replace back to the original text, so I used a variable to hold the last value only if this existed. Hope this helps, let me know if you need more assistance.
answers question: http://stackoverflow.com/q/24591202
type: Answer

http://stackoverflow.com/comment/130992844
type: AnswerComment
comment on: http://stackoverflow.com/a/67020180
type: Comment
has text: I don't think you should rely that people don't have plugins installed. Also `If the user can gain access and compromise one of them, he can compromise the other one, too.` does not seem to be correct. Faking HTTP Origin Header and session_id are different things. They have nothing in commen, if you can compromise one you do not get the other too.
score: 0

http://stackoverflow.com/a/29179255
score: 1
type: Answer
answers question: http://stackoverflow.com/q/24632406
has body: You need to add the following code in your .js file: var search = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('sear'), queryTokenizer: Bloodhound.tokenizers.whitespace, limit: 10, remote: { url: '/connection.php?query=%QUERY', filter: function(list) { return $.map(list, function(search) { return { name: sear }; }); } } }); The json file contains an array of strings, but the Bloodhound suggestion engine expects JavaScript objects so this converts all of those strings.
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/24708112
answers question: http://stackoverflow.com/q/24707812
score: 0
type: Answer
has body: After the suggestions here and continuing my search, the best solution seems to be: function load() { }); function loadResize() { }); function loadResizeScroll() { }); $(window) .on('load', load) .on('load resize', loadResize) .on('load resize scroll', loadResizeScroll);

http://stackoverflow.com/comment/38349101
score: 0
has text: Did you write all of this code yourself?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24632835

http://stackoverflow.com/a/24736088
score: 0
has body: This example calls a function which performs a calculation, and returns the result: enter code here This is a simple example for use script inside the html file. It may helps.
answers question: http://stackoverflow.com/q/24735352
type: Answer

http://stackoverflow.com/q/24633724
accepted answer: http://stackoverflow.com/a/25230826
type: AnsweredQuestion
has body: im looking for some javascript events that trigger at the start and at the end navigating via dragging on flot plots so that i can do some ajax updates, however, I've been looking around online for some code to help me. I've found a few things, most didn't work worked or had bugs. The best thing I've found so far is an answer from DNS, however it has unintentional behavior, when you hold the mouse click button down and stop panning the event triggers. var delay = null; element.on("plotpan", function() { if (delay) clearTimeout(delay); delay = setTimeout(function() { // do your stuff here delay = null; }, 500); });
score: 1
type: Question
tagged with: flot
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25230826
answer count: 1
has title: flot.navigate drag start/end events missing
favorite count: 0
upvote count: 1

http://stackoverflow.com/comment/38212053
type: AnswerComment
has text: Please read my edit. I'm not saying complete is fired before success.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24648399

http://stackoverflow.com/q/24604364
type: Question
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/24604386
downvote count: 4
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: IE 7/8 not running .innerhtml = data
has comment: http://stackoverflow.com/comment/38126413
upvote count: 0
type: UnansweredQuestion
has body: The below code doesn't run in IE7/8. I researched online, .innerhtml will not work in IE 7/8 Browser. I really need this code to run in those browsers. $(document).ready(function(){ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1); $.ajax({ type: "GET", url: "/get_header", data: hashes, success: function(data) { if (!$.support.leadingWhitespace) { alert('j'); document.getElementById('logo-bar').innerHTML = data; } else { $('#logo-bar').html(data); } }, error: function(data) {} });
score: -4
has comment: http://stackoverflow.com/comment/38129419

http://stackoverflow.com/a/24645157
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/24644645
type: Answer
has body: &lt;script&gt; function lazyLoader(id){ var images = document.getElementById(id).getElementsByTagName('img'); for(prop in images){ images[prop].setAttribute('src', images[prop].getAttribute('data-src')); } } // should be called after document ready or load - lazyLoader('lazy_loader'); &lt;/script&gt;

http://stackoverflow.com/a/24654371
type: Answer
answers question: http://stackoverflow.com/q/24653094
has body: I was missing a trailing slash from the ProxyPass directive. Adding this solved the issue.
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/24735327
has answer: http://stackoverflow.com/a/24735994
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38371552
score: 1
tagged with: knockout.js
answer count: 1
tagged with: x-editable
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/38371444
has title: Knockout layout and binding with transposed rows
has body: I am new knockout.js and I am using x-editable and knockout-x-editable for binding a data entry form that looks as follows, Firstname Lastname The rows should be transposed as below Firstname | Firstname1 | Firstname2 | Firstname3 Lastname | Lastname1 | Lastname2 | Lastname3 I would like to use knockout templates, is there any better way to achieve this? Any help on this is greatly appreciated.
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/q/24674881
type: Question
has comment: http://stackoverflow.com/comment/38256100
has answer: http://stackoverflow.com/a/24675162
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38256165
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/24676351
tagged with: ajax
type: UnansweredQuestion
has title: Get part of the content from the website to different one
has body: i want to get the part of the different website page to my website content. i have tried to do that with sending an ajax request to that webpage , but getting an cross domain access error have any idea how to do that? for example, i want to get this part only http://gyazo.com/600ee9facec408dd56a69c907293ebed from this website http://www.simbagames.com/en/aboutus.aspx to my existing webpage, and put that content in my webpage content part this is how i was tring to do that jQuery.ajax({ type:'POST', url: link, crossDomain: true, dataType: "html", // this is important headers: { 'Access-Control-Allow-Origin': '*' }, success: function (data) { console.log(data); } }) No need iframes is that possible?
has comment: http://stackoverflow.com/comment/38255762

http://stackoverflow.com/comment/38261072
has text: I'm using bootstrap button checkboxes, which don't actually change the state of the checkbox, they just add a "active" class to the label surrounding the checkbox.
comment on: http://stackoverflow.com/a/24677511
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38357652
type: Comment
has text: Ok, makes sense. Can you explain 5 high level steps, so I can go and learn how? I am using Code Igniter as my MVC on PHP... never touched Ajax.
type: AnswerComment
comment on: http://stackoverflow.com/a/24728089
score: 0

http://stackoverflow.com/q/24623590
tagged with: http://stackoverflow.com/tag/html
tagged with: scripting
tagged with: python
has body: I am looking to find a way to code a script in python that can click all the items in my Steam inventory. For those who do not know what that is here is an example: http://steamcommunity.com/id/timetoidle5/inventory/#753_0 Ideally it should be able to click each of the links and parse the new information that it gets. Ie. it should be able to find the difference between the different Left 4 Dead 2 cards. I have done some research and I have been told that downloading the selenium module may be the best way to deal with javascript on a webpage. Although I am still not entirely sure what the best way is. I have heard that mechanize may work as well, but is made for static webpages (webpages with little to no javascript?). I was hoping also for some tips/steps on how to get started on something like this. I already have some experience with HTML and CSS so I know my way around the syntax and currently I am quickly reading through a Javascript book. I also have done some Python scripting in the past and taken a few introductory courses on it.
answer count: 0
has title: Using python to click items on a page with text changing javascript and be able to parse the new information
type: Question
has comment: http://stackoverflow.com/comment/38163150
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/38160682
tagged with: parsing
type: UnansweredQuestion

http://stackoverflow.com/comment/38223801
type: Comment
type: QuestionComment
has text: @edhedges: What, are they cached already? I’m really not sure what this is going to be used for. If they are, move the files around or something. It’s like a querystring, but more tedious.
score: 0
comment on: http://stackoverflow.com/q/24657101

http://stackoverflow.com/q/24645315
answer count: 1
has title: Socket io and closures in a loop
has comment: http://stackoverflow.com/comment/38201454
type: AnsweredQuestion
has body: I wan to simplify the following code: socket.on('event1', function(data){ func1(data); }); .... socket.on('eventN', function(data){ funcN(data); }); So I tried to create and object var socketsMap = { event1 : func1, ..., eventN : funcN } And I thought that I have done closures correctly with for (var event in socketsMap){ socket.on(event, function(data){ return function(data){ socketsMap[event](data); }; }); } but apparently I am missing something as only the last one is always executed.
accepted answer: http://stackoverflow.com/a/24645445
tagged with: socket.io
linked to: http://stackoverflow.com/q/750486
type: Question
has comment: http://stackoverflow.com/comment/38201520
tagged with: closures
tagged with: javascript
has answer: http://stackoverflow.com/a/24645445
score: 0

http://stackoverflow.com/a/24718399
downvote count: 0
has body: Simple approach This first approach if you, and javascript's definition of "word" match. A more customizable approach is below. Try test.split(/\s*\b\s*/). It splits on word boundaries (\b) and eats whitespace. "hello how are you all doing, I hope that it's good! and fine. Looking forward to see you." .split(/\s*\b\s*/); // Returns: ["hello", "how", "are", "you", "all", "doing", ",", "I", "hope", "that", "it", "'", "s", "good", "!", "and", "fine", ".", "Looking", "forward", "to", "see", "you", "."] How it works. var test = "This is. A test?"; // Test string. // First consider splitting on word boundaries (\b). test.split(/\b/); //=> ["This"," ","is",". ","A"," ","test","?"] // This almost works but there is some unwanted whitespace. // So we change the split regex to gobble the whitespace using \s* test.split(/\s*\b\s*/) //=> ["This","is",".","A","test","?"] // Now the whitespace is included in the separator // and not included in the result. More involved solution. If you want words like "isn`t" and "one-thousand" to be treated as a single word while javascript regex considers them to be two you will need to create your own definition of a word. test.match(/[\w-']+|[^\w\s]+/g) //=> ["This","is",".","A","test","?"] How it works This matches the actual words an punctuation characters separately using an alternation. The first half of the regex [\w-']+ matches whatever you consider to be a word, and the second half [^\w\s]+ matches whatever you consider punctuation. In this example I just used whatever isn't a word or whitespace. I also but a + on the end so that multi-character punctuation (such as ?! which is properly written ‽) is treated as a single character, if you don't want that remove the +.
type: Answer
has comment: http://stackoverflow.com/comment/38346245
score: 14
upvote count: 14
has comment: http://stackoverflow.com/comment/38338911
has comment: http://stackoverflow.com/comment/38340798
accepted answer of: http://stackoverflow.com/q/24718348
answers question: http://stackoverflow.com/q/24718348
has comment: http://stackoverflow.com/comment/38339570
has comment: http://stackoverflow.com/comment/90513018
type: AcceptedAnswer

http://stackoverflow.com/a/24705385
accepted answer of: http://stackoverflow.com/q/24704871
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24704871
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: If I understand your question correctly, you are able to return json full of data you want and display it in #result but the style doesn't have the jQuery Mobile style applied. If this is a correct summation First, add an id to your listview element &lt;ul id="mylistview" data-role="listview" data-inset="true"&gt; then add this line after $("#result").html(data); $( "#mylistview" ).listview( "refresh" ); See the Listview Widget page for more on listviews.

http://stackoverflow.com/a/24625460
has comment: http://stackoverflow.com/comment/38164105
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38164219
score: 0
has comment: http://stackoverflow.com/comment/38164793
accepted answer of: http://stackoverflow.com/q/24625383
has comment: http://stackoverflow.com/comment/38164259
has comment: http://stackoverflow.com/comment/38164408
type: Answer
has body: First of all add your highest preferred js like jquery. and the its low precedence Like in your example.:
answers question: http://stackoverflow.com/q/24625383
has comment: http://stackoverflow.com/comment/38164264
has comment: http://stackoverflow.com/comment/38164527
has comment: http://stackoverflow.com/comment/38163969

http://stackoverflow.com/comment/38306199
score: 0
type: Comment
has text: That's much more simple than I expected it would be! Amazingly simple, quick and worked beautifully. Thanks!
comment on: http://stackoverflow.com/a/24701650
type: AnswerComment

http://stackoverflow.com/a/24619343
has body: I've posted the 2 ways you can use your filter in this fiddle: http://jsfiddle.net/9Ymvt/1844/ Using a filter in a directive or service is perfectly acceptable, but you need to inject the filter into the directive. You could inject $filter, but in the spirit of only requiring exactly what you need, it's probably better to inject the individual filter like so: angular.module('components', []) .directive('controllerFilter', function (shortNumFilter) { return { restrict: 'E', scope:{ num:'@' }, template: 'controllerFilter: {{ filteredNum }}', controller: function ($scope, $element, $attrs) { $scope.$watch('num', function(newVal, oldVal) { $scope.filteredNum = shortNumFilter(newVal); }) } } })
score: 0
answers question: http://stackoverflow.com/q/24601551
type: Answer

http://stackoverflow.com/q/24611267
has answer: http://stackoverflow.com/a/35851532
accepted answer: http://stackoverflow.com/a/24612595
has body: I am trying to change the title of the kendo grid. However when i do the below on change event the filtering doesn't work for that column. I have a sample code here to replicate the issue in jsfiddle: http://jsfiddle.net/nLn5b/4/ $("#change").on("click", function() { $("#grid th[data-field=FirstName]").html("MiddleName") }) var grid = $("#grid").kendoGrid({ dataSource: { data : createRandomData(10), pageSize: 5, schema : { model: { fields: { Id : { type: 'number' }, FirstName: { type: 'string' }, LastName : { type: 'string' }, City : { type: 'string' } } } } }, editable : false, pageable : true, filterable: true, columns : [ { field: "FirstName", width: 90, title: "First Name" }, { field: "LastName", width: 90, title: "Last Name" }, { field: "City", width: 100 } ] }).data("kendoGrid"); Thanks for any help.
possible better answer: http://stackoverflow.com/a/35851532
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: kendo-grid
has title: kendo grid title change
has answer: http://stackoverflow.com/a/24612595
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: kendo-ui

http://stackoverflow.com/q/24688145
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24688177
has answer: http://stackoverflow.com/a/24688218
score: 1
upvote count: 1
has body: I have 2 paragraphs coming from the database it work there is no issues with it. But I have added a button that when I click it will alert the ID of this current div which the button is present. Now this is my table: +--------+--------------------+ | id | paragraph | |--------+--------------------+ | 1 | this is text 1 | | 2 | another text | +-----------------------------+ My PHP and HTML code: &lt;?php $query = mysql_query(SELECT * FROM tests); while($row = mysql_fetch_assoc($query)){ $post_id = $row['id']; $text = $row['paragraph']; ?&gt; &lt;div id='text' class='&lt;?php echo "$post_id";?&gt;'&gt; &lt;p&gt;&lt;?php echo "$text";?&gt;&lt;/p&gt; &lt;input type='button' value='Show id' id='show'&gt; &lt;/div&gt; &lt;?php } ?&gt; And now probably 2 paragraphs are generated but when I click at show button it will show only the 1 id even if I click at the second one: This is my JQuery code: $('#show').click(function(){ var ids = $("#text").attr('class'); alert(ids); });
has comment: http://stackoverflow.com/comment/38281274
type: Question
accepted answer: http://stackoverflow.com/a/24688183
tagged with: javascript
has title: How to create for each div in a while loop an ID and alert it with JQuery
has comment: http://stackoverflow.com/comment/38281152
has answer: http://stackoverflow.com/a/24688205
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/38281071
favorite count: 0
has comment: http://stackoverflow.com/comment/38281056
has answer: http://stackoverflow.com/a/24688177
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/24688183
tagged with: php

http://stackoverflow.com/comment/38501490
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24741735
has text: :) Exacly! That's the thing, reusable components centralizes UI problems like that to one single place.

http://stackoverflow.com/q/24735777
tagged with: javascript
has answer: http://stackoverflow.com/a/24735883
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I cannot draw a proper circle, no matter what. I'm always getting an ellipse. Here's example code to show you what I mean: function canvasClicked(number) { var c = "canvas" + number; var canvas = document.getElementById(c); var context = canvas.getContext("2d"); var centerX = 150; var centerY = 75; context.beginPath(); context.arc(centerX, centerY, 70, 0, Math.PI * 2); context.lineWidth = 10; context.strokeStyle = "red"; context.stroke(); } #canvas1 { width: 200px; height: 200px; border: 1px solid black; } &lt;canvas id="canvas1" onclick="canvasClicked(1)"&gt;&lt;/canvas&gt; I tried to identify the cause of the issue but without any success. I know that the centerX and centerY should be equal to element.width / 2 and element.height / 2 but that gives me even more awkward results, moving the ellipse away from the center of the box.
accepted answer: http://stackoverflow.com/a/24735883
upvote count: 1
tagged with: css
type: AnsweredQuestion
has title: Cannot draw a proper circle with Canvas
score: 1
type: Question
tagged with: canvas
downvote count: 0
answer count: 1

import
type: Tag
tag name: import
tags question: http://stackoverflow.com/q/24679048
tags question: http://stackoverflow.com/q/24597759

http://stackoverflow.com/q/24680798
tagged with: mongodb
tagged with: javascript
has answer: http://stackoverflow.com/a/24682228
score: 0
answer count: 1
has title: finding documents in mongodb by array for one field?
tagged with: mongoose
accepted answer: http://stackoverflow.com/a/24682228
type: AnsweredQuestion
has body: Im trying to run a query to find all the documents that contain an array of phone numbers: for example: var mobileArray = ["07958485374","07958485375", "07958485378"]; an example document would be: { phone_number: 07958483297, brand: "Mercedes", model: "S 350 L", year: 2007, price: 9500, description: "Full options - Automatic transmission - Gulf import - Excellent condition - V6 - Beig leather seats - Screen - Sunroof - CD - DVD - Telephone - Navigation - Xenon - Finger print - Bluetooth - Memory - Cruise control - Sensor - Wood - Clause examination - ", images_length: 4, _id: ObjectId("53a844d26d437e394844f0a3"), date: ISODate("2014-06-23T15:16:34.233Z"), __v: 0 } So Im trying to run a query to find all documents that contains any of these elements in the array, I know I can probably run a for loop, but i would rather try do it in one query. Im using mongoose node module to query my results. for example: Car.find().where({"phone_number": "0795483297"}).limit(10).exec(function(err, docs) { res.send(docs); });
type: Question

http://stackoverflow.com/comment/38352185
comment on: http://stackoverflow.com/a/24725318
has text: There is a reason why we don't want answers that only link to jsFiddle. Is it really so difficult to include and explain the code in the post itself?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/24721962
type: UnansweredQuestion
tagged with: ruby-on-rails
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/38360804
tagged with: javascript
score: 0
has title: Backbone in Rails with JavaScript
has body: I'm using gem "rails-backbone" and trying to do this example, which is made with javascript. What should I do here to make it work? Because most examples I find to learn is made with javascript and I need them to work in my RoR app. Trying to figure this out so long but have no idea how... I need some help to start using backbone for real. Here are my files. What should I change/add here exactly? I think I won't understand partial, need a full explanation. Thx app/views/welcome/index.html.erb &lt;div id="canvas"&gt;&lt;/div&gt; app/assets/javascripts/backbone/models/welcome.js var Rectangle = Backbone.Model.extend({}); app/assets/javascripts/backbone/views/welcome/inde_view.js var RectangleView = Backbone.View.extend({ tagName: "div", className: 'rectange', render: function() { this.setDimensions(); this.setPosition(); return this; }, setDimensions: function() { this.$el.css({ width: this.model.get('width') + 'px', height: this.model.get('height') + 'px' }); }, setPosition: function() { var position = this.model.get('position'); this.$el.css({ left: position.x, top: position.y }); } }); var myRectangle = new Rectangle({ width: 100, height: 60, position: { x: 300, y: 150 } }); var myView = new RectangleView({model: myRectangle}); $('div#canvas').append(myView.render().el);
has comment: http://stackoverflow.com/comment/38351952
tagged with: backbone.js
tagged with: ruby

http://stackoverflow.com/comment/38357714
comment on: http://stackoverflow.com/q/24728118
score: 0
has text: It does not have to do with className, it has to do with the element not being there that you are trying to reference.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38259273
score: 0
comment on: http://stackoverflow.com/q/24675336
type: Comment
type: QuestionComment
has text: do you think that it doesn't work for this reason?? do you know some gem for calendar handling? (not fullCalendar)

http://stackoverflow.com/a/24686682
has body: Well you didn't give any sample code, so here's a CSS-only method. You would need to place your images inside of a parent container and give it a class such as "parent". HTML &lt;div class="parent"&gt; &lt;img src="bla.jpg" /&gt; &lt;img src="bla.jpg" /&gt; &lt;img src="bla.jpg" /&gt; &lt;img src="bla.jpg" /&gt; &lt;/div&gt; CSS .parent:hover &gt; img{ opacity:0.5; } .parent &gt; img:hover{ opacity:1; } This will cause all your images' opacity to change when you hover over their parent element, but will keep the opacity of the image you're hovering over the same. Demo
has comment: http://stackoverflow.com/comment/38278849
has comment: http://stackoverflow.com/comment/38278668
score: 0
answers question: http://stackoverflow.com/q/24685894
type: Answer
has comment: http://stackoverflow.com/comment/38279086

http://stackoverflow.com/a/24641572
has body: In addition to what the others have said about using val() to get the value of the element instead of attr('val') (which could be derived from the HTML), the example also didn't work because: You need to remove the has-error and has-success class before adding one or the other You are checking the value of the second password field onblur of the first one. It seems like you should compare the two in one event handler as in adeneo's answer.
answers question: http://stackoverflow.com/q/24641403
score: 0
type: Answer

http://stackoverflow.com/comment/38378337
type: QuestionComment
comment on: http://stackoverflow.com/q/24732397
has text: There are a couple of things you can do to solve this. 1 Extend modals in bootstrap to have lock property and lock the parent modal when opening the child. 2 Ensure you have a reference to the parent modal when opening the child modal and apply some css alter the z-index of the child modal's backdrop.
score: 0
type: Comment

http://stackoverflow.com/comment/38308922
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24702932
score: 0
has text: XECGR - yes - i've tried - here is the logXHR Loaded (form_handler.php - 200 OK - 1.005500078201294s - 402B) VM383:3 http://localhost/roy/Landing%20Page/handler/form_handler.php?name=roy+barak&email=barakroy%40gmail.com&phone=09-5555553 VM385:3 Time over 1000ms VM386:3 Object {startedDateTime: "2014-07-11T17:12:53.863Z", time: 1005.500078201294, request: Object, response: Object, cache: Object…} VM387:3

http://stackoverflow.com/q/24727689
has comment: http://stackoverflow.com/comment/38356948
has comment: http://stackoverflow.com/comment/38356892
tagged with: php
has answer: http://stackoverflow.com/a/24727761
accepted answer: http://stackoverflow.com/a/24727761
has comment: http://stackoverflow.com/comment/38356864
type: AnsweredQuestion
has body: Hello I have a javascript file in the directory root/ assets/ js / a.js and a php file at the directory root/php/foo.php At the a.js file I am trying to use ajax in order to connect with the foo.php . If the a foo.php is located at the root directory a.k.a root/foo.php the function works fine but when i put the file in the directory above nothing works. Here is the function associated with the connection if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState === 4 &amp;&amp; xmlhttp.status === 200) { alert(xmlhttp.responseText); } } xmlhttp.open("GET","../../studentSignupPHP/test.php?q=" + str, true); The relative path at the xmlhttp.open(..) seems fine to me,so I cannot understand what I am doing wrong. Can you help me? foo.php &lt;?php echo "test"; ?&gt;
type: Question
has comment: http://stackoverflow.com/comment/38356975
has comment: http://stackoverflow.com/comment/38356903
has title: ajax connection with php not working at subdirectory
answer count: 1
tagged with: javascript
tagged with: ajax
score: 0

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/24592607

http://stackoverflow.com/comment/38152756
has text: @user3253289 I updated the answer so you can see in steps how you can create form, it's elements and how can you delete all of them in one call.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24619002

http://stackoverflow.com/q/24737269
has body: What i am trying to do is display the response from a POST message on to the HTML loaded in my webview. However, the my webview appears blank. I can see the response message by in LogCat by printing it out. However, again my webview appears blank. Example.html is the page loading in my webview. My implementation is below: HttpPostID.java - class that sends a POST message to server public class HttpPostID extends AsyncTask<Void,Integer,Void> { public static String result; private static final String webphp = "http://..../queryRestaurantsList.php"; String IDs; HttpPostID(String ids){ this.IDs =ids; } @Override protected Void doInBackground(Void... params){ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(webphp); try { String hello="111,222,333"; List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("order",IDs)); nameValuePairs.add(new BasicNameValuePair("hello",hello)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity resEntity = response.getEntity(); result = EntityUtils.toString(resEntity); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void v){ System.out.println(result); Restaurant_view.myWebView.loadUrl("javascript:loadData('"+result+"')"); } } MainActivity.java public static WebView myWebView; protected void onCreate(Bundle savedInstanceState) { myWebView = (WebView) findViewById(R.id.webView3); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setDomStorageEnabled(true); myWebView.addJavascriptInterface(this,"Android"); myWebView.loadUrl(webaddress); new HttpPostID(tester).execute(); } example.html .php File on the Server mysql_connect($host,$username,$password); mysql_select_db($database) or die( "Unable to select database"); //Check if POST array is empty or…
has comment: http://stackoverflow.com/comment/38374865
has comment: http://stackoverflow.com/comment/38375411
answer count: 0
type: UnansweredQuestion
tagged with: webview
has comment: http://stackoverflow.com/comment/38374915
has comment: http://stackoverflow.com/comment/38434677
has comment: http://stackoverflow.com/comment/38374985
has comment: http://stackoverflow.com/comment/38442363
has comment: http://stackoverflow.com/comment/38374806
has title: Calling javascript function in webview from Android
has comment: http://stackoverflow.com/comment/38376315
tagged with: android-webview
has comment: http://stackoverflow.com/comment/38375515
has comment: http://stackoverflow.com/comment/38374789
type: Question
has comment: http://stackoverflow.com/comment/38443069
tagged with: javascript
has comment: http://stackoverflow.com/comment/38375043
score: 0
linked to: http://stackoverflow.com/q/24731932
linked to: http://stackoverflow.com/q/3149216
tagged with: android

http://stackoverflow.com/a/24652735
answers question: http://stackoverflow.com/q/24646573
has comment: http://stackoverflow.com/comment/38237019
downvote count: 0
has comment: http://stackoverflow.com/comment/38236057
type: Answer
upvote count: 1
has body: Add a single click event listener on the whole document or window. Then when the event listener is called, inspect target. You may need to traverse the .parentElement tree until you find the &lt;a&gt;. If successful .preventDefault() the event. And then, Do whatever you want(tm). Example: addEventListener("click", function(e) { let target = e.target; while (target &amp;&amp; !target.href) { // Find the parent &lt;a&gt;, if any target = target.parentElement; } if (!target) { // Nothing found; return; } e.preventDefault(); alert(target.href); // window.top.location = target.href; ?! }); Tested this in the Console, and it seems to work.
score: 1
has comment: http://stackoverflow.com/comment/38234570
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24646573

http://stackoverflow.com/a/24599906
type: Answer
has body: Try this &lt;%= button_tag "name", type: 'button', class: "btn btn-info", onclick: "codeAddress()" do %&gt; &lt;i class="icon-search"&gt;&lt;/i&gt; &lt;% end %&gt;
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/24599647
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24599647

http://stackoverflow.com/a/24756091
has body: Try this this.oList.bindItems("{checks&gt;/items}", oItemTemplete); instead of this.oList.bindItems("checks&gt;/items",oItemTemplate);
score: 0
answers question: http://stackoverflow.com/q/24740529
type: Answer

http://stackoverflow.com/comment/38391954
score: 3
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24746314
has text: `cover` would also work, if you want to maintain the size of the thumbnail, and don't mind cropping.

http://stackoverflow.com/q/24685208
tagged with: forms
type: Question
score: 20
upvote count: 20
has body: There are several questions/answers on this here, here and here and elsewhere, but they all seem JQuery specific and do not appear to apply to this (for example, I am NOT creating a new Form object, this is an existing form in the document. Also I am NOT using Jquery at all). I have a form which has to be modified before submission for reasons of IE7 compatibility. I have to strip out all the BUTTON tags from my form and then add a hidden field, but this is all in an existing form on the existing HTML page. This code works properly in IE and Chrome but doesn't work in Firefox (versions 23 &amp; 24 both tested). buttonClickFunction(formName, buttonObject) { var formObject = document.forms[formName]; var i = 0; // Strip out BUTTON objects for (i=0;i&lt;formObject.length;i++) { if (formObject[i].tagName === 'BUTTON') { formObject[i].parentNode.removeChild(formObject[i]); i--; } } // Create new field var newField = document.createElement('input'); newField.type = 'hidden'; newField.id=buttonObject.id; newField.name = buttonObject.name; if (buttonObject.attributes['value'] != null) { newField.value = buttonObject.attributes['value'].value; } else { newField.value = buttonObject.value; } // Submit form formObject.appendChild(newField); document.forms[formName].appendChild(newField); document.forms[formName].submit(); } In addition to the document.forms[formName].submit() I have also tried formObject.submit() - both work in Chrome but both fail in Firefox. I'm at a loss as to why this doesn't work - I've traced through the JS and watched that document.forms[formName].submit() execute - no exception appears but nothing goes to the server. Can anyone identify why Firefox won't submit this form, and how I can fix it?
has title: Javascript form.submit() not working in Firefox
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/24690917
linked to: http://stackoverflow.com/q/7117084
has answer: http://stackoverflow.com/a/38555352
answer count: 4
tagged with: dojo
has answer: http://stackoverflow.com/a/57196636
has answer: http://stackoverflow.com/a/71468388
linked to: http://stackoverflow.com/q/22555533
possible better answer: http://stackoverflow.com/a/57196636
linked to: http://stackoverflow.com/q/7391930
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24690917
tagged with: javascript
linked to: http://stackoverflow.com/q/18087721

http://stackoverflow.com/comment/129484501
score: 0
type: AnswerComment
has text: This is definitely the cleanest solution I have come across! thankyou
type: Comment
comment on: http://stackoverflow.com/a/63195157

http://stackoverflow.com/q/24698725
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38300702
has comment: http://stackoverflow.com/comment/38301167
has body: I have a checkbox with a OnCheckedChanged event. I change whether the checkbox is checked in javascript sometimes. When I change it via javascript this OnCheckedChanged event doesn't fire. Is there a way when I change the checkbox via javascript to have the OnCheckedChanged event fire? Thanks
upvote count: 0
has comment: http://stackoverflow.com/comment/38300586
has title: Cause ASP .NET OnCheckedChange server event from Javascript
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/38300476
has comment: http://stackoverflow.com/comment/38300716
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/38300326
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/24698787

http://stackoverflow.com/q/24613836
upvote count: 4
type: AnsweredQuestion
has title: Using David J Bradshaw's iframe-resizer
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/24615966
tagged with: iframe-resizer
favorite count: 0
type: Question
score: 4
tagged with: iframe
tagged with: wordpress
has body: I have a Teamspeak status viewing script hosted on a different domain than my wordpress. So I'm trying to show the script results in a text/html widget using an iframe except it will not auto-size the height. Wordpress is on shared hosting so this script will not communicate with my teamspeak server from there. I cannot find any other ts3 viewers that work while auto-hide empty channels and not completely ugly. After doing some research I came across what appears to be the latest and greatest solution, David J Bradshaw's iframe-resizer. Now I'm no expert on the subject and don't completely understand how I should set this up properly. Currently my wordpress widget reads like this: ts3.php reads like this: TSStatus <?php require_once("/var/www/ts3/tsstatus.php"); $tsstatus = new TSStatus("ts3.greatarchitect.us", 10011); $tsstatus->useServerPort(9987); $tsstatus->imagePath = "/ts3/img/"; $tsstatus->timeout = 2; $tsstatus->hideEmptyChannels = true; $tsstatus->hideParentChannels = true; $tsstatus->showNicknameBox = false; $tsstatus->showPasswordBox = false; echo $tsstatus->render(); ?> and that's pretty much all I have right now. I was hoping someone could help me properly install/setup this iframe-resizer. Thank you.
answer count: 1
has answer: http://stackoverflow.com/a/24615966
tagged with: javascript

http://stackoverflow.com/a/24637205
score: 1
answers question: http://stackoverflow.com/q/24637048
downvote count: 0
has body: Check the async library. Especially async.waterfall method. I think it's exactly what you need.
has comment: http://stackoverflow.com/comment/38193615
has comment: http://stackoverflow.com/comment/38186502
type: Answer
upvote count: 1

http://stackoverflow.com/q/24630972
accepted answer: http://stackoverflow.com/a/24631521
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38174840
upvote count: 1
tagged with: ruby-on-rails
tagged with: css
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/38175342
type: Question
has body: I am trying to modify the look of an input[type='file'] element which I have done, <%= f.label :image, id: 'own-image-label', class: 'lato-font fileContainer image_button' do %> Choose Your Own <%= f.file_field :image %> <% end %> CSS .fileContainer { overflow: hidden; position: relative; } .fileContainer input[type='file'] { cursor: inherit; display: block; font-size: 999px; filter: alpha(opacity=0); min-height: 100%; min-width: 100%; opacity: 0; position: absolute; right: 0; text-align: right; top: 0; } .image_button{ padding:15px; color:$white; background:$blue; text-transform:uppercase; } The next stage for me is to change the label text once a user selects a file, my first issue is that the event doesn't always fire, leaving a button with no content. $(document).ready( function() { // Update Choose your own image label with file name $( '#own-image-label [type=file]' ).on( 'click', function (){ var $input = $( this ); setTimeout( function (){ $input.parent().text( $input.val().replace(/([^\\]*\\)*/,'') ) }, 0 ) } ); }); and when it does fire I can't click the input any more as the following has been removed from the DOM: and secondly how can I stop the input type['file'] from being removed from the DOM? Edit This is the markup before Choose Your Own And then if I select a file called myfile.jpg this is the markup myfile.jpg
has title: Input[type='file'] label name
downvote count: 0
has answer: http://stackoverflow.com/a/24631521
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/24608093
type: Answer
upvote count: 3
score: 3
has body: Map that perserves order is also known as linked hashmap. Here's a link that shows how to construct one in javascript: http://dailyjs.com/2012/09/24/linkedhashmap/ If you're looking for a solution built in javascript, I don't think that it exists. Each browser has its own implementation on traversing objects.
accepted answer of: http://stackoverflow.com/q/24608024
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38131022
answers question: http://stackoverflow.com/q/24608024

http://stackoverflow.com/comment/45912454
has text: Per the first line in the answer.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24612294
type: Comment

http://stackoverflow.com/q/24638192
favorite count: 0
tagged with: css
has body: How can I make a button change its position after being clicked like this demo here but instead of the active parameter I would like it to be at margin-left:50px; definitely after clicked HTML Fb-Like CSS .button:active { margin-left:50px; } /* But with a on clicked parameter instead of active */
type: AnsweredQuestion
score: 3
upvote count: 3
has title: How can I make a button change its position after being clicked?
has answer: http://stackoverflow.com/a/24638300
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24638272
has comment: http://stackoverflow.com/comment/38188317
has answer: http://stackoverflow.com/a/24638272
has comment: http://stackoverflow.com/comment/38187902
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/24638300
linked to: http://stackoverflow.com/q/8888941

http://stackoverflow.com/q/24731729
type: Question
has body: I have an svg map with each path having a class="county-code-###". Also have an csv file with the county-name, county-code and county population. I have the following started but not sure how to populate the correct path with the date coming from the csv. d3.text("counties.csv", function (datasetText) { var parsedCSV = d3.csv.parseRows(datasetText); var sampleHTML = d3.select("div") .append("div") .style("") .style("") .selectAll("path") .data(parsedCSV) .enter().append("path") });
upvote count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24753141
tagged with: http://stackoverflow.com/tag/csv
answer count: 1
has answer: http://stackoverflow.com/a/24753141
has title: D3.js using data from csv file to populate svg map
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has comment: http://stackoverflow.com/comment/38368983
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/38311533
comment on: http://stackoverflow.com/a/24704265
type: Comment
has text: @cookiemonster Language barrier most probably (referring to tymeJV's thread). But basing from the title, *"identify presence of an Input tag"* - that's about as clear as we could get off of it.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38212595
has text: Here, you can start with this [JSFiddle](http://jsfiddle.net/6Y29N/). *(All I did was paste your current code...)*
comment on: http://stackoverflow.com/q/24651340
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38388344
type: AnswerComment
has text: @Someone33 ooops missed it
type: Comment
comment on: http://stackoverflow.com/a/24744362
score: 0

http://stackoverflow.com/comment/38184846
type: QuestionComment
has text: There is no anchor tag wrapped inside any `.homeAlerts` element in your posted HTML markup
comment on: http://stackoverflow.com/q/24636665
score: 0
type: Comment

http://stackoverflow.com/a/24686016
type: Answer
downvote count: 0
score: 1
has body: This piece of code was taken from a project of mine: $("#UL-OF-TAGIT").tagit({ singleField: true, allowSpaces: true, removeConfirmation: true, singleFieldNode: $("#FIELD-TAG-IT"), tagSource: function( request, response ) { $.ajax({ url: "YOUR-URL", data: { term:request.term }, dataType: "json", success: function( data ) { response( $.map( data, function( item ) { return { label: item.label, value: item.value } })); } }); } }); This is my tagit with autocomplete. To get what the user is writting use the request.term. From the docs: A request object, with a single term property, which refers to the value currently in the text input. For example, if the user enters "new yo" in a city field, the Autocomplete term will equal "new yo". http://api.jqueryui.com/autocomplete/
accepted answer of: http://stackoverflow.com/q/24685773
answers question: http://stackoverflow.com/q/24685773
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/38273076
comment on: http://stackoverflow.com/q/24683257
score: 0
type: Comment
type: QuestionComment
has text: it was working without quotes , but I have putted them. my need s using global array across different function of javascript.

http://stackoverflow.com/comment/38296201
comment on: http://stackoverflow.com/a/24696441
type: AnswerComment
has text: instead of (here.value=x;) i tried (here.innerHTML=x;)
score: 0
type: Comment

http://stackoverflow.com/comment/38275910
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24681013
score: 0
has text: possible duplicate of [How can I correctly capture and re-fire the form submit event, guaranteed?](http://stackoverflow.com/questions/12978566/how-can-i-correctly-capture-and-re-fire-the-form-submit-event-guaranteed)

http://stackoverflow.com/comment/38270487
comment on: http://stackoverflow.com/q/24669210
type: Comment
type: QuestionComment
score: 1
has text: It is not possible to re-arrange the elements, I'm afraid.

http://stackoverflow.com/a/24726306
answers question: http://stackoverflow.com/q/24726269
score: 1
upvote count: 1
downvote count: 0
has body: You have confusing ""(double quotes) in the innerHTML strings. Try this: instead of "q2.htm" use 'q2.htm'
type: Answer
has comment: http://stackoverflow.com/comment/38354029

http://stackoverflow.com/q/24744396
has answer: http://stackoverflow.com/a/47470096
downvote count: 0
tagged with: javascript
has title: How to get absolute paths with javascript_include_tag?
has comment: http://stackoverflow.com/comment/38407073
linked to: http://stackoverflow.com/q/1939942
favorite count: 0
has body: I'm working on Rails layout for pdf (using Pdfkit) and I need to include my javascript assets with absolute paths (full urls) because wkhtmltopdf doesn't see relative. this: = javascript_include_tag 'application' is converted to this: How can I get the same script tags with full urls? // edit = (javascript_include_tag 'application').gsub('="', "=\"#{ root_url }").html_safe
has comment: http://stackoverflow.com/comment/38391661
type: UnansweredQuestion
upvote count: 1
tagged with: ruby-on-rails
tagged with: wkhtmltopdf
has comment: http://stackoverflow.com/comment/38388474
tagged with: pdfkit
score: 1
has answer: http://stackoverflow.com/a/57876633
has comment: http://stackoverflow.com/comment/38392920
tagged with: absolute-path
type: Question
answer count: 2

http://stackoverflow.com/a/24650092
score: 0
has body: I think the problem is with your AJAX call, according to docs, you should use callback: &lt;script type="text/javascript"&gt; $(function () { $.get('test.json', function(data) { $('#container').highcharts({ chart: { type: 'line' }, series: [{ data: data }] }); }); }); &lt;/script&gt; So: create chart in callback, which is called after data from AJAX comes to the JS.
type: Answer
answers question: http://stackoverflow.com/q/24645946

http://stackoverflow.com/q/24631806
has answer: http://stackoverflow.com/a/24652054
type: Question
tagged with: javascript
answer count: 2
has title: How to access my GrapheneDB neo4j database through Javascript alone
downvote count: 0
tagged with: neo4j
has answer: http://stackoverflow.com/a/24650313
favorite count: 0
type: UnansweredQuestion
tagged with: php
score: 1
has body: I have a Neo4j database in GrapheneDB, and I want me and my friends to be able to create nodes and relationships from an HTML page through Javascript. I am hosting the HTML page to my server space. This is what I tried to test node creation. &lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; script type="text/javascript"&gt; var r = new XMLHttpRequest(); r.open("POST", "GRAPHENE REST URL", true); r.onreadystatechange = function () { if (r.readyState != 4 || r.status != 200) return; var json_response = JSON.parse(r.responseText); console.log(json_response); }; var cyQuery=JSON.stringify({"query" : "CREATE (ee:Person { name: 'Emil', klout: 99 })"}); r.send(cyQuery); &lt;/script&gt; As you can see, I tried to use REST API with Cypher but it produces the following error: "Failed to load resource: the server responded with a status of 401 (Unauthorized)" I understand that this is because I am not logged in to Graphene. My question is twofold: can I implement loging into Graphene in the background (through PHP maybe), so that all users that access the HTML page can create a node? can I do it without installing a Neo4j REST driver? I can not install programs in my server space, I can only upload files. Thank you, I hope my question makes sense.
upvote count: 1

http://stackoverflow.com/comment/38305398
score: 0
comment on: http://stackoverflow.com/a/24701116
type: Comment
has text: Your explanation is very strange and can't be true since the missing record is the fourth in the file.
type: AnswerComment

http://stackoverflow.com/comment/120569443
has text: To validate that the `result` is an array, use: `Array.isArray(result)`
score: 0
comment on: http://stackoverflow.com/a/24676032
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/38184496
score: 0
type: Comment
type: QuestionComment
has text: curious: why did you choose 'localStorage.setItem("item"+storedAt,item+storedAt)' instead of 'localStorage["item"+storedAt]=item+storedAt;'? i'm wondering why folks use the localStorage methods instead of property access.
comment on: http://stackoverflow.com/q/24635905

http://stackoverflow.com/q/24651631
has comment: http://stackoverflow.com/comment/38212958
has comment: http://stackoverflow.com/comment/38212985
type: Question
has body: I know that you cannot make ajax requests crossdomain or even to a different subdomain of the same domain. I have a static.domain.com where all my javascript files reside (static content). All the javascript files are included on domain.com. There is no inline javascript code domain.com. Question: I want a solution to make ajax POST requests from static.domain.com to domain.com. Is that possible and to behave the same in different browsers? Later Edit: I don't want to use jsonp. I want to send POST requests and read the response. Some of the requests include file uploading.
has comment: http://stackoverflow.com/comment/38213005
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38212969
tagged with: ajax
has comment: http://stackoverflow.com/comment/38212965
score: 0
linked to: http://stackoverflow.com/q/298745
duplicate of: http://stackoverflow.com/q/3076414
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/38212978
has title: Ajax calls from static.domain.com to domain.com
has comment: http://stackoverflow.com/comment/38213335
linked to: http://stackoverflow.com/q/3076414

http://stackoverflow.com/comment/38143225
type: Comment
score: 0
type: AnswerComment
has text: I actually read it before and +1ed it. But it was at the very beginning. I'll read it again now and see if I understand it better. :) thanks again...
comment on: http://stackoverflow.com/a/24614107

http://stackoverflow.com/q/24638680
tagged with: javascript
has title: Declaring the same variable name in a JavaScript loop
tagged with: variables
has answer: http://stackoverflow.com/a/24638740
has answer: http://stackoverflow.com/a/24638794
has answer: http://stackoverflow.com/a/24638827
favorite count: 0
has comment: http://stackoverflow.com/comment/38188844
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38188683
has answer: http://stackoverflow.com/a/24638734
score: 2
upvote count: 3
tagged with: loops
has answer: http://stackoverflow.com/a/24638825
downvote count: 1
has body: All clear with this example (see variable entry declaration): var list = { a:1, b:2, c:3 }, entry; for( var i in list ) { entry = list[ i ]; // ... } Having 'use strict' no error is thrown, but is it a good practice to declare entry this way? var list = { a:1, b:2, c:3 }; for( var i in list ) { var entry = list[ i ]; // ... }
type: Question

http://stackoverflow.com/a/24619692
type: Answer
has body: As was already mentioned in the comments, list-style-image does not support the behaviour you want. Using backgrounds If you don't have a background already: Just use the elements background-image property isntead. If you do have a background already: In CSS3 it's possible to define multiple backgrounds. This means that you can use the bullet image as an additional non repeating background as well giving you full control over it. Controlling multiple backgrounds though javascript is not a lot of fun though and I haven't heard of any good plugins for it either. You might want to take a look around though, someone might have made something and otherwise just write your own abstraction layer. Using data url's An alternative, more crazy, approach would be to load the image through ajax, draw it onto an canvas scaled in any way you like, generate a data uri from the canvas and set that as the uri of the list-style-image property.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/38153382
answers question: http://stackoverflow.com/q/24619543
upvote count: 1
has comment: http://stackoverflow.com/comment/38153497

http://stackoverflow.com/a/24643428
has comment: http://stackoverflow.com/comment/38197799
has comment: http://stackoverflow.com/comment/38197837
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38197870
type: Answer
has body: Why are you using . for concatenation? Use + instead: chrome.tabs.getSelected(null, function(tab) { document.getElementById('currentLink').innerHTML = "http://www.foo.com/index.php?bar=" + tab.url; });
score: 1
accepted answer of: http://stackoverflow.com/q/24643391
upvote count: 1
answers question: http://stackoverflow.com/q/24643391
has comment: http://stackoverflow.com/comment/38197649
has comment: http://stackoverflow.com/comment/38197809

http://stackoverflow.com/q/24634049
score: 0
has comment: http://stackoverflow.com/comment/38183750
has comment: http://stackoverflow.com/comment/38183607
accepted answer: http://stackoverflow.com/a/24635389
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38183442
has body: What I mean by this is I want to use the defaults object literal of Models, which calls this code from underscore: Temp Code var Feed = Backbone.Model.extend({ defaults: { name: '', picture: '', // I need this set when picture is 0 time: '', tweet: '' // h_file, view_picture } }); From Underscore _.defaults = function(obj) { each(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { if (obj[prop] === void 0) obj[prop] = source[prop]; } } }); return obj; }; It will only set a default if a value is set to undefined. However JSON does not support sending undefined, nor do I see this as default value in the mysql table I use. Obviously, I can use an intermediary value, which is what I'm currently doing. I just store the number 0 as a default for no value and send this via JSON, and then just do a basic if/else. But this is in-efficient and I would imagine there is a better 1 to 1 correlation I could use.
has answer: http://stackoverflow.com/a/24635389
tagged with: mysql
type: Question
has title: How do I set "no value" on the server to be compatible with Backbone?
answer count: 1
tagged with: javascript
tagged with: backbone.js

http://stackoverflow.com/a/25075257
upvote count: 4
has body: I just ran into the same problem, and it seems to be linked to the following security update from Microsoft http://support.microsoft.com/kb/2962872/en-us Under known issues, they've listed "Issue 3: After you install this security update, Internet Explorer may become unresponsive in some applications when web forms are being used or when files are being uploaded. This issue affects Internet Explorer versions 10 and 11. Note We are researching this problem and will post more information in this article when the information becomes available." After uninstalling this update, our file uploading once again works fine.
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/24735849
has comment: http://stackoverflow.com/comment/39018643

http://stackoverflow.com/comment/38094314
comment on: http://stackoverflow.com/q/24589557
score: 0
has text: `Foo()` already returns an object, why are you using `Object.create`?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38277703
has text: Response contains: `Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, DELETE Access-Control-Allow-Headers: content-type Access-Control-Allow-Credentials: true` - still no luck.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24685751

http://stackoverflow.com/comment/38203952
type: QuestionComment
has text: where does that IOS gone?
comment on: http://stackoverflow.com/q/24646741
score: 0
type: Comment

http://stackoverflow.com/q/24684843
has title: Mobile-safari private browsing local storage error but no code is calling it
type: UnansweredQuestion
tagged with: aem
tagged with: local-storage
type: Question
has body: I'm working on a page that's hosted via Adobe CQ5 (now AEM). The page rendered is a .JSP file that also has Java, HTML and Javascript code on it. I'm rendering a series of logos, and they are displaying totally fine on all browsers except mobile-safari in private browsing. That's yielding me the error in console of: QuotaExceededError: Dom exception 22: An attempt was made to add something to storage that exceeded the quota Researching around, it appears in private browsing in iOS7 local storage is turned off. However, none of my code calls local storage. I'm trying to figure out if local storage is the culprit here. I have some Java code that assembles a StringBuffer of the brand list. String cssClassPrefix = "svg-icon-"; String cssClass = ""; StringBuffer brandJsonObject = new StringBuffer(); String externalPrefix = ""; if(currentNode.hasProperty("brands")){ Property prop = currentNode.getProperty("brands"); if(prop.isMultiple()){ Value[] brandArray = prop.getValues(); for(Value brand : brandArray) { if(brandJsonObject.length() != 0){ brandJsonObject.append(", "); } cssClass = cssClassPrefix + brand.getString().toLowerCase(); brandJsonObject.append("{\"name\" : \""+brand.getString().toLowerCase()+"\", \"cssName\" : \""+cssClass+"\"}"); } } I then parse that string as JSON and put it into a JS variable: &lt;script id="data" type="application/json"&gt;&lt;%=brandJsonObject.toString() %&gt;&lt;/script&gt; var brandJSON = JSON.parse($("#data").html()); Then in a separate JS function, I iterate across the JSON object an display the html, I use the element and it's data attribute: function arrangeBrands () { // make all the json data into one long html string and put inside wraper via append() var brand = rowElement; $.each(brandJSON, function(i,n){ brand += '&lt;div class="span2' /* + (bootstrapSpan) */ +' brandItem brandItemStatic"&gt;&lt;object data="/etc/designs/searshomeservices/clientlib_base/images/svg-company-logos/'+n["name"]+'.svg" class="'+ n["cssName"]+' man…
tagged with: http://stackoverflow.com/tag/json
tagged with: mobile-safari
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27404614

http://stackoverflow.com/a/24686787
has comment: http://stackoverflow.com/comment/38278732
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38304761
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/24686717
upvote count: 3
answers question: http://stackoverflow.com/q/24686717
has body: If you look at the documentation for string.replace at MDN, you'll notice that $ alone has some special meanings for replace. Therefore, if you want to insert a $ you need to use $$. Your replace statement would then look like: var str1 = str.replace("&lt;'pass!23$'&gt;", "'pass!23$$'"); You can verify it is working by updating the Fiddle.
has comment: http://stackoverflow.com/comment/38305156

http://stackoverflow.com/comment/38394693
comment on: http://stackoverflow.com/a/24746459
type: AnswerComment
score: 0
type: Comment
has text: Wow very interesting for the DOM `File`, this is available to JSM. But from JSM shouldn't we use `new FileUtils.File`? Will content-type always be `application/octet-stream` for images? Also you IIRC a lot, where are you recalling this from, I would like to go there.

http://stackoverflow.com/a/24636604
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/100560175
answers question: http://stackoverflow.com/q/24633504
accepted answer of: http://stackoverflow.com/q/24633504
type: Answer
score: 0
upvote count: 1
downvote count: 1
has body: Found a workaround. For anyone having the same problem - here is my way of solving it: plugin.js: This code before "CKEDITOR.plugins.add( 'PLUGINNAME', {..." jQuery.extend({ getValues: function(url) { var result = null; $.ajax({ url: url, type: 'get', dataType: 'json', async: false, success: function(data) { result = data; } }); return result; } }); var results = $.getValues('.../ckeditor/plugins/PLUGINNAME/ajax.php'); This is the code for the select box { type : 'select', id : 'style', label : 'Style', setup : '', items : results, commit : function( data ) { data.style = this.getValue(); } }

recaptcha
tag name: recaptcha
type: Tag
tags question: http://stackoverflow.com/q/24609277

http://stackoverflow.com/comment/38395349
comment on: http://stackoverflow.com/a/24738113
has text: Please look at my html code that I updated.I can see video but video.src is still getting null.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38315399
has text: Question how does your script know what form is sending data to it. I have about fifty forms or more in this program.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24705798
type: Comment

http://stackoverflow.com/comment/38183428
score: 0
comment on: http://stackoverflow.com/a/24635515
type: Comment
has text: Thank you! I was looking at it from a completely different angle and overlooked the fact that `doc.head` already existed. I opted to rename from `doc.head` to `doc.heads`. Thanks again and sorry for the initial confusion.
type: AnswerComment

http://stackoverflow.com/a/24639172
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24638517
accepted answer of: http://stackoverflow.com/q/24638517
type: Answer
has body: you can do it just putting an extra control to your ng-show condition... Try this ng-show="items &amp;&amp; !items.length" here is PLUNKER demo

required
tag name: required
tags question: http://stackoverflow.com/q/24630849
type: Tag

http://stackoverflow.com/comment/53472606
has text: This works fine. Wondering why the person accepted this answer left with out up-voting this. Anyways, I am giving my vote.
comment on: http://stackoverflow.com/a/24671159
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24734398
has comment: http://stackoverflow.com/comment/38370333
tagged with: percentage
type: Question
has answer: http://stackoverflow.com/a/24734932
tagged with: width
tagged with: math
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/38369629
has body: I have the following situation and whilst I am fine with the coding, I am struggling with the maths lol. I have a div that is 500 pixels wide. Jquery is loaded. I am going to check the browser width and store it in a javascript variable called bwidth. If bwidth is less than 500px (the width of the div) then I want to resize the div using css zoom (for various reasons including the content of the div). All of this is easy to do code wise but what I am trying to work out is the algo for calculating what the zoom percentage should be to make the 500px width div actually fit inside a browser window that is bwdith pixels wide. I am not worried about height. So, lets say that bwidth is 250px - I know that I need a 50% zoom but only because I know that 250 is half of 500 lol! How do I calculate that 50% programmatically. What if bwidth is 325px ? How do I calculate the correct zoom ? Many thanks in advance for any help.
has title: How to calculate pixel size as a zoom percentage
accepted answer: http://stackoverflow.com/a/24734932
tagged with: zooming
type: AnsweredQuestion

http://stackoverflow.com/comment/38389832
type: Comment
comment on: http://stackoverflow.com/a/24745221
score: 0
type: AnswerComment
has text: If you know the ids and when they are unique, then yes you can. `getElementsByName` or even `getElementsByTagName` will also work, as long as you take into account that they don't return a single element but a list of zero or more elements. But if you have the ids, then that's the easiest solution.

http://stackoverflow.com/comment/38299676
type: Comment
comment on: http://stackoverflow.com/a/24697646
type: AnswerComment
score: 0
has text: @RezaRahmati does the click of the anchor need to be bound to the body?

http://stackoverflow.com/q/24741373
has answer: http://stackoverflow.com/a/24741998
tagged with: recursion
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/2752349
has title: How to approach recursive function for overlapping rectangles
has comment: http://stackoverflow.com/comment/38382609
upvote count: 3
has comment: http://stackoverflow.com/comment/38382766
has answer: http://stackoverflow.com/a/24743189
type: Question
has answer: http://stackoverflow.com/a/24741831
has body: I have an array of rectangles called myRects like so: const r1 = {x1: 10, x2: 80, y1: 10, y2: 80}, r2 = {x1: 60, x2: 100, y1: 60, y2: 100}, r3 = {x1: 90, x2: 180, y1: 90, y2: 140}, r4 = {x1: 120, x2: 140, y1: 130, y2: 160}, r5 = {x1: 160, x2: 210, y1: 80, y2: 110}, myRects = {r1: r1, r2: r2, r3: r3, r4: r4, r5: r5}; Here's how they look drawn: I also have a handy function called doRectanglesIntersect(r1, r2): function doRectanglesIntersect(r1, r2) { return (r1.x1 &lt;= r2.x2 &amp;&amp; r2.x1 &lt;= r1.x2 &amp;&amp; r1.y1 &lt;= r2.y2 &amp;&amp; r2.y1 &lt;= r1.y2) } What I want is a function called recursivelyGetIntersectingRects(rect) which will return an array of rectangles which intersect the given rectangle or its intersected rectangles ad infinitum. So if I pass r1 into this function I should get [r2,r3,r4,r5] as a return value as they're all connected. I don't mind if this function returns the object literals or the keys, but it should be as efficient as possible and not return duplicate values. I am able to formulate this problem but a solution escapes me. My mind does not work recursively. Here's a fiddle I've made which contains the code above and a canvas drawing as a visual aid: http://jsfiddle.net/b3jX6/5/
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38382676
linked to: http://stackoverflow.com/q/5891754
has comment: http://stackoverflow.com/comment/38382882
accepted answer: http://stackoverflow.com/a/24741998
answer count: 3
has comment: http://stackoverflow.com/comment/38382674
has comment: http://stackoverflow.com/comment/38382826
linked to: http://stackoverflow.com/q/12260491
favorite count: 0
linked to: http://stackoverflow.com/q/9474465
possible better answer: http://stackoverflow.com/a/24741831

http://stackoverflow.com/comment/38299019
score: 3
type: Comment
type: QuestionComment
has text: I'm not sure I get the question. Define a function that takes two params. Use that function reference as the value of `slide` (say). When it's called it'll get the two params.
comment on: http://stackoverflow.com/q/24698077

http://stackoverflow.com/comment/38397194
has text: If it returns `null`, the element with that ID doesn't yet exist.
comment on: http://stackoverflow.com/q/24749183
score: 4
type: QuestionComment
type: Comment

http://stackoverflow.com/a/31129920
type: Answer
answers question: http://stackoverflow.com/q/24603315
has body: If you return a id, value pair e.g "{\"SpecificationAttributeOptionId\":\"0\",\"SpecificationAttributeName\":\"XYZ\"}, {\"SpecificationAttributeOptionId\":\"1\",\"SpecificationAttributeName\":\"ABC\"}" Then you need to specify dataTextField, dataValueField. Otherwise if you return a List of string as follows, then you don't need to specify dataTextField, dataValueField and kendo will take care the rest. "{\"SpecificationAttributeName\":\"XYZ\"}, {\"SpecificationAttributeName\":\"ABC\"}" Hope this helps. $("#SpecificationAttributeOptionId").kendoDropDownList({ dataTextField: "SpecificationAttributeName", dataValueField: "SpecificationAttributeOptionId", dataSource: { transport: { read: { url: "/ControllerName/GetDropDownValueFunction", type: "POST", contentType: "application/json", dataType: "json" } } }, height: 100 });
has comment: http://stackoverflow.com/comment/80141946
score: 0

http://stackoverflow.com/comment/38411325
comment on: http://stackoverflow.com/a/24723161
type: AnswerComment
has text: Your error suggests your PHP isn't being run. You should make sure it's wrapped in `<?php` tags. You should be able to access `/apiproxy.php?method=getroutes` in your browser, and check what it returns (it should look like an CTA bus tracker API response). If you're not familiar with PHP, then [the tutorial](http://php.net/manual/en/tutorial.php) will be worth a look.
type: Comment
score: 1

http://stackoverflow.com/comment/38227103
type: Comment
has text: Good deal. Glad you found the problem.
type: QuestionComment
comment on: http://stackoverflow.com/q/24641083
score: 0

http://stackoverflow.com/comment/38279918
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24687214
score: 1
has text: I believe this [sending and retrieving json with ajax](http://stackoverflow.com/questions/24468459/sending-a-json-to-server-and-retrieving-a-json-in-return-without-jquery/24468752#24468752) is what you're looking for.

http://stackoverflow.com/a/24686617
upvote count: 1
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/24686498
has body: What about something like: if (a.length &gt; b.length) { console.log("winner: "+ a.name); return a; else { console.log("winner: "+ b.name); return b; } or if you want it to be really short: return a.length &gt; b.length ? a : b; As a side note, your logic could use a little work. Right now it returns the output from console.log, which is undefined. Returning the array makes more sense, and makes more sense from the name of your function.

http://stackoverflow.com/comment/38323875
has text: @Kevin i am not sure about this but..once when i tried sending a string it showed me an error
type: Comment
comment on: http://stackoverflow.com/a/24710549
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38295247
has text: That's a HTML 4.0 capability! This has been around for a very long time. People just forget about it.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/24695754
type: AnswerComment

http://stackoverflow.com/a/24653847
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/24652763
has body: zoom change event google map google.maps.event.addListener(map, 'zoom_changed', function() { var zoomLevel = map.getZoom(); map.setCenter(myLatLng); infowindow.setContent('Zoom: ' + zoomLevel); }); read more here https://developers.google.com/maps/documentation/javascript/events
downvote count: 0

http://stackoverflow.com/comment/38178767
type: AnswerComment
score: 0
type: Comment
has text: I have no idea how you create a variable in c#, I've never used the language.
comment on: http://stackoverflow.com/a/24633394

http://stackoverflow.com/comment/38199911
type: AnswerComment
score: 0
type: Comment
has text: Actually that didn't work, but since I was assigning req.body to location I did 'console.log (location.AddressValidateRequest.Address.length);' and it worked. I tried your suggestions and I got an error: "ReferenceError: request is not defined &nbsp; &nbsp;at Object.handle"
comment on: http://stackoverflow.com/a/24644494

http://stackoverflow.com/comment/38094388
has text: Same error for the jquery.iu.datepicker, I have edited the post to note that.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24589504

http://stackoverflow.com/q/24590662
upvote count: 1
tagged with: circular-dependency
tagged with: angularjs-directive
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24666982
score: 1
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/24666982
type: Question
has comment: http://stackoverflow.com/comment/38096840
has comment: http://stackoverflow.com/comment/38097366
has comment: http://stackoverflow.com/comment/38242076
answer count: 1
downvote count: 0
has title: Repeated element on AngularJS directive scope raising TypeError: Converting circular structure to JSON
tagged with: javascript
has body: I am getting a strange error that is breaking the idea that I had. Basically I want that a directive with access to two elements, a list of Charts and one specific Chart that it is contained in the former list. Considerating the AngularJS way of data binding and my lazyness I decided to pass 2 arrays, the first one would be the list of Charts and the second one could have zero elements or only one element (the selected to be the active). So here is the directive declaration (datatable and dimensions are used for other things and are working fine): app.directive("viscMiddleSection", function ($timeout) { return { restrict: "AEC", scope: { chartarray: "=", datatable: "=", dimensionsinuse: "=", activechart: "=" }, templateUrl: "components/middlesection/templates/middle_section.html", ... In the service I have the two arrays: app.service('metaDataService', function ($rootScope, $q, dataHtmlService) { this.activeChartMetadata = []; this.chartMetadatas = []; ... And in the controller I get those arrays using getter methods that simply return the arrays citated before: app.controller('GraphController', ['$scope', 'dataService', 'metaDataService', function ($scope, dataService, metaDataService) { $scope.chartMetadatas = metaDataService.getChartMetadatas(); $scope.activeChartMetadata = metaDataService.getActiveChartMetadata(); ... Finally I bind all in the html file: &lt;div visc-middle-section chartarray=chartMetadatas datatable=dataTable dimensionsinuse=dimensionsInUse activechart=activeChartMetadata&gt;&lt;/div&gt; When I try this way that I explained I got the following exception while rendering the template html file: Error: [$interpolate:interr] Can't interpolate: {{activechart}} TypeError: Converting circular structure to JSON Strangely this error only occurs when I pass the chart's object reference to the directive, if I change the 'metaDataService.getActiveChartMetadata()' function to return a number or only the name of the selected chart everything works fine. What…
has comment: http://stackoverflow.com/comment/38097281
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/24634951
score: 1
answers question: http://stackoverflow.com/q/24633677
upvote count: 1
has body: if you don't want to make custom binding handler then you can manually pass the id. var vm = { computeActive: function (id) { return data.selectedItem()== id?"activeText":"inActiveText" ; }, changeItem: function (event, sender) { } }; html:- ship cat dog Sample Fiddle
downvote count: 0
type: Answer

http://stackoverflow.com/q/24718042
upvote count: 1
answer count: 1
tagged with: parallax
favorite count: 0
tagged with: ruby
has title: Parallax not working with Rails
has comment: http://stackoverflow.com/comment/38337991
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: skrollr
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/38338388
type: Question
has comment: http://stackoverflow.com/comment/38338117
has body: I'm trying to recreate this demo in my own Rails project: http://ihatetomatoes.net/demos/parallax-scroll-effect/ Files are here: http://ihatetomatoes.net/demos/parallax-scroll-effect-1302.zip But it only shows the last slide and not scrollable. I suspect there's something wrong with loading the js files in Rails but I'm not entirely sure. Here is my repo: https://github.com/tihuan/parallaxtest. You can clone it and run rails s to see that it's broken. *Note that you can remove requiring js files from Welcome#index.html.erb since I already added them in application.js! ** Current application.js loading order: //= require js/vendor/jquery-1.9.1.min //= require js/vendor/modernizr-2.7.1.min //= require js/skrollr //= require js/imagesloaded //= require js/_main //= require_tree . Please help!
tagged with: javascript
has comment: http://stackoverflow.com/comment/38338046
has answer: http://stackoverflow.com/a/24718277
accepted answer: http://stackoverflow.com/a/24718277

http://stackoverflow.com/a/55992636
type: Answer
answers question: http://stackoverflow.com/q/24593573
score: 0
has body: Might be a little late but you can use Charles Proxy to do this and using the Rewrite feature you can place some code in there. I'm doing this for testing Google tag manager on some sites that don't belong to me :)

nexus
type: Tag
tags question: http://stackoverflow.com/q/24699996
tag name: nexus

http://stackoverflow.com/a/24675734
answers question: http://stackoverflow.com/q/24674087
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38260575
type: Answer
has comment: http://stackoverflow.com/comment/38260369
has body: jquery UI does not support touch events as of now. But you can use plugins like touchpunch to make it work with touch. All you have to do is include the library after query and jQuery UI like script src="jquery.ui.touch-punch.min.js">
accepted answer of: http://stackoverflow.com/q/24674087
downvote count: 0
score: 1

http://stackoverflow.com/q/24596092
type: Question
has title: looping xml strings in array in javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/24596266
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
has body: What i am trying to do is get strings from my xml file, put them in an array, loop it in javascript so that each string will be displayed one by one on click of a button. What I have so far is a JS array with the strings hardcoded: I would like to remove the hard coding of the data and retrieve the strings from this xml (named data.xml) a. this is the first string b. He lives in Nepal c. He lived in India for 7 years d. He lives in Nepal.

http://stackoverflow.com/comment/38387391
type: AnswerComment
score: 0
type: Comment
has text: Do this : `fut["return"](results)`
comment on: http://stackoverflow.com/a/24743650

http://stackoverflow.com/a/24624891
answers question: http://stackoverflow.com/q/24624843
type: Answer
has body: You should close your double quote 4th line of script. document.write("&lt;br&gt; Your second Entry: "+secondInt+"&lt;br&gt;");
score: 0
accepted answer of: http://stackoverflow.com/q/24624843
type: AcceptedAnswer

xsockets.net
type: Tag
tag name: xsockets.net
tags question: http://stackoverflow.com/q/24589272

http://stackoverflow.com/comment/38118245
type: Comment
type: QuestionComment
has text: Why what happen? Please explain what exactly is the problem.
score: 0
comment on: http://stackoverflow.com/q/24601848

http://stackoverflow.com/comment/38209354
has text: `window.scrollTo(0, $("body").offset().top)` this works, just tried it. you can also try `window.scrollTo(0, $(document).top)`
score: 0
comment on: http://stackoverflow.com/q/24649515
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24662912
has comment: http://stackoverflow.com/comment/38234591
score: 0
type: Answer
has body: http://jsfiddle.net/WfrM4/ $(document).ready(function () { $('form').submit(function (e) { // Dont trigger a page load on submit. e.preventDefault(); // Get all the values of the form??? var form_data = $('form[name="my_awesome_form"]').serialize() // Make an ajax call $.ajax({ url: "/ajax_form_receiver", data: form_data }); }); });
answers question: http://stackoverflow.com/q/24662792

http://stackoverflow.com/q/24706471
has comment: http://stackoverflow.com/comment/38317362
has comment: http://stackoverflow.com/comment/38325124
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38317444
has comment: http://stackoverflow.com/comment/38315737
has body: I have a directive with its controller reloaded each time a request/route changes. This causes some page flickering since it has to fetch data from the server and this lag is noticeable. I would like to stop this without moving it outside the ng-view. Only use the ng-include and control it when the route changes. My idea (maybe not the best solution, I welcome suggestions) will be to check if the value of 'notification_count' exists and and avoid reloading the content inside the SideCtrl. Let me know how you would go about this scenario. {{notification_count}}
has title: AgularJs avoid reloading ng-include when a value exists
downvote count: 0
has comment: http://stackoverflow.com/comment/38316451
has comment: http://stackoverflow.com/comment/38316021
favorite count: 0
has comment: http://stackoverflow.com/comment/38322224
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38316264
has comment: http://stackoverflow.com/comment/38316384

http://stackoverflow.com/comment/38127712
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24606333
score: 0
has text: Did you get any error during serialization?

http://stackoverflow.com/comment/38367927
type: Comment
comment on: http://stackoverflow.com/a/24723948
has text: Sorry for this late comment but this sort of works. Still just a small doubt. Won't making `display:none` by adding a class trigger `hide` event?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39083372
type: QuestionComment
comment on: http://stackoverflow.com/q/24591925
has text: i totally forgot to answer, thanks to @arthurakay, this gave me the solution.. i was missing an import for grid-filters. answer that again as a full answer and i will accept it
score: 1
type: Comment

pouchdb
tags question: http://stackoverflow.com/q/24661295
tag name: pouchdb
type: Tag

http://stackoverflow.com/comment/38236674
has text: No, it's not a remote. I got it working by just adding "document.location.href = "/page_3";. Still not sure why the redirect isn't working in the controller, but I think this resolved it.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/24663729
score: 0

http://stackoverflow.com/a/24605231
type: Answer
downvote count: 0
score: 3
has body: You can add ng-class="{active:item == selected}" to your &lt;a&gt; items http://plnkr.co/edit/gwhKwFkpTaA4EWJ8vrAO?p=preview
accepted answer of: http://stackoverflow.com/q/24604890
upvote count: 3
answers question: http://stackoverflow.com/q/24604890
type: AcceptedAnswer

http://stackoverflow.com/comment/38163600
type: QuestionComment
has text: yes, @mritunjay, it is giving undefined message
comment on: http://stackoverflow.com/q/24625058
score: 0
type: Comment

http://stackoverflow.com/comment/38312888
type: QuestionComment
score: 2
has text: The documentation also shows how to use it without jquery.'
comment on: http://stackoverflow.com/q/24704843
type: Comment

http://stackoverflow.com/q/24687559
answer count: 3
has answer: http://stackoverflow.com/a/31062397
tagged with: android
possible better answer: http://stackoverflow.com/a/31059150
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/50139268
has answer: http://stackoverflow.com/a/31059150
type: AnsweredQuestion
upvote count: 14
has title: How to pass a Blob object from javascript to Android?
tagged with: webview
type: Question
score: 14
linked to: http://stackoverflow.com/q/2250917
accepted answer: http://stackoverflow.com/a/31062397
tagged with: blob
has comment: http://stackoverflow.com/comment/50138899
downvote count: 0
has body: I have a Blob object inside my WebView, how can I pass it to Android? I want to save it to local file on device. I been trying to use: var url = webkitURL.createObjectURL(myBlob); But I wasn't been able to download it to device.
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/31138348

http://stackoverflow.com/q/24643742
score: 0
has comment: http://stackoverflow.com/comment/38198719
type: Question
has answer: http://stackoverflow.com/a/24643871
tagged with: javascript
answer count: 1
has body: I'm trying to write a reusable component using directives in AngularJS. The problem I'm having is that inside my reusable component, in the template, I want to use another directive. However, this directive has a require attribute and it throws an error as if it fails the requirement even if it shouldn't. Here is a plunker. Error Controller 'div', required by directive 'inner', can't be found! Directives directive('inner', function(){ return { require: 'div', link: function (scope, elem, attrs){ console.log('Inner Link'); } } }). directive('outer', function($timeout){ return { restrict: 'E', templateUrl: 'template.html', link: function (scope, elem, attrs, ngModel){ console.log('Outer Link') } } }) Template &lt;div&gt; &lt;div inner&gt;&lt;/div&gt; &lt;/div&gt; Edit Instead of div for the inner element and require, it should be input.
has comment: http://stackoverflow.com/comment/38198513
tagged with: angularjs
has title: AngularJS How to include a directive inside a template?
type: UnansweredQuestion

http://stackoverflow.com/q/24691096
tagged with: icheck
answer count: 0
has comment: http://stackoverflow.com/comment/38308381
type: UnansweredQuestion
tagged with: selenium
tagged with: selenium-rc
has comment: http://stackoverflow.com/comment/38307159
type: Question
has comment: http://stackoverflow.com/comment/38308256
tagged with: javascript
has body: I recently set up the jQuery plugin iCheck to improve checkbox and radio button of my application. But my selenium test fail with this plugin. The plugin set the opacity of checkbox and radio buttons to 0. So selenium don't see them.I tried to set the opacity to 0.1 or 1 with a left position to -9999px to put elements out of the viewport. Any solution?
score: 0
tagged with: jquery
has title: Selenium rc test fail with icheck jquery plugin

http://stackoverflow.com/comment/38162520
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24611055
has text: Have you tried, which I answered? :)
score: 0

http://stackoverflow.com/comment/38348775
score: 0
type: QuestionComment
type: Comment
has text: @Veedrac I gave it a go. I hope that OP will clarify it though because I'm not certain if I preserved the exact intention.
comment on: http://stackoverflow.com/q/24722906

http://stackoverflow.com/a/24648033
answers question: http://stackoverflow.com/q/24647601
type: AcceptedAnswer
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/24647601
has body: The quotes don't matter at all in this particular case, as the quotes you use between &lt;?php and ?&gt; are interpreted by php and as such never reach the browser, where the javascript will be interpreted. Actually, the problem is that you forgot a closing ). Your ouput will now be: $("#" + tID).css( "background", "url('http://url.com/images/halftone.png' #DDD"); And correct would be: $("#" + tID).css( "background", "url('http://url.com/images/halftone.png') #DDD"); Take attention to the second closing parenthesis after the ...halftone.png' So your php code would look like this: $("#" + tID).css( "background", "url('&lt;?php bloginfo('stylesheet_url'); ?&gt;/images/halftone.png') #DDD");

http://stackoverflow.com/q/24602838
downvote count: 0
has comment: http://stackoverflow.com/comment/38154263
favorite count: 0
has body: For Cloud Code (parse.com), I'm trying to scrape web data from another website, but I have been unable to get the source code of the websites as a string. I tried using the xmlhttprequest module var url = "www.targetWebsite.com"; var XMLHttpRequest = require("cloud/XMLHttpRequest.js").XMLHttpRequest; var xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", url, false ); xmlHttp.send( null ); var doc = xmlHttp.responseText; However, when I try running the code, I get the error Module child_process.js not found which I'm assuming refers to this line in the XMLHttpRequest.js file var spawn = require("child_process").spawn However, I could not find a child_process.js in the downloaded folder to add to the directory. Is there a way to include this file, or is there a better way to obtain source code? EDIT: Using httpRequest cloud function Parse.Cloud.define("pushFavorites", function(request, response) { var xpath = require("cloud/xpath.js"), dom = require("cloud/dom-parser.js").DOMParser; var doc; Parse.Cloud.httpRequest({ url: "website.com", success: function(httpResponse) { doc = new dom().parseFromString(httpResponse.text); }, error: function(httpResponse) { console.error('Request failed with response code ' + httpResponse.status); } }); var cells = xpath.select("//td[starts-with(@class, 'menugridcell')]", doc); //etc... On the line declaring the cells variable, I'm getting the error: Cannot read property 'nodeType' of undefined Using console.log, httpResponse.text correctly displayed the source code as a string. I'm not sure if the error is with the httpResponse or my xpath. I was able to get the xpath.select() function to work properly for some other manually contrived xml strings.
tagged with: parse-platform
upvote count: 1
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/38299912
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24714956
score: 1
has title: Obtaining html source code w/ XMLHttpRequest.js for parse.com CloudCode
linked to: http://stackoverflow.com/q/22973116
type: Question
tagged with: xml-parsing
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24714956

http://stackoverflow.com/q/24687214
has comment: http://stackoverflow.com/comment/38279918
has title: HTTP GET Request JSON response - REST API
type: UnansweredQuestion
has body: I need to pull inventory data from a third-party site a client uses and display that data on their website using the REST API. I've been looking around but haven't found a clear way to do this. I need to make a Get Request from: https://user.traxia.com/app/api/inventory // request { "key": "API Key Here", "query": "CAMERA", "consignorId": "false", "includeItemsWithQuantityZero": false } I would like the response to be { "results": [ { "status":"ACTIVE" "sku":"", "name":"", "cost":0 } ] } The documentation they list is here http://wiki.traxia.com/display/guide/List+and+Search+Inventory Since I don't know how to accomplish this, any help would be great! Code examples greatly appreciated!
upvote count: 1
linked to: http://stackoverflow.com/q/24468459
has answer: http://stackoverflow.com/a/24688009
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: http
type: Question
tagged with: api
has comment: http://stackoverflow.com/comment/38279829
downvote count: 0
tagged with: javascript
tagged with: rest
linked to: http://stackoverflow.com/q/247483
answer count: 1
favorite count: 0

http://stackoverflow.com/a/24687435
accepted answer of: http://stackoverflow.com/q/24687199
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/38280518
type: Answer
has body: You cannot reliably get the dimensions of a hidden element. See jQuery outerHeight for hidden element jQuery attempts to compensate, but you can sometimes still end up with incorrect values. See jQuery: height()/width() and "display:none" EDIT: Actually the real problem is $.offset() cannot be used to correctly set the position of a hidden element. It attempts to do calculations based on the current location of the element in relation to its offset parent and these calculations are just wrong if the element is hidden. Just move d.show(); to just before you set the offset fixes the problem.
answers question: http://stackoverflow.com/q/24687199
score: 3
downvote count: 0

http://stackoverflow.com/q/24720334
type: Question
has comment: http://stackoverflow.com/comment/38342609
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38342625
favorite count: 0
has answer: http://stackoverflow.com/a/24720365
accepted answer: http://stackoverflow.com/a/24720365
has body: I have the following html code s1 s2 I tried to set the selected value to 1. get the value of the second option. get the selected value in jquery but didnt get it right and please adive if there is any method to know the selection syntax easily
downvote count: 4
type: AnsweredQuestion
upvote count: 0
has title: How to get the selected option value from select inside div
score: -4

http://stackoverflow.com/a/24666773
downvote count: 0
has body: [ ] denotes an array. Arrays only hold values: var a1 = [1, 2, 3, 4] As @Qantas pointed out, array can hold more than just values. An array can even contain another array and/or object: var a2 = [1, 2, ["apple", "orange"], {one: "grape", two: "banana"}]; { } denotes an object. Objects have key-value pairs like var a3 = {one: 1, two: 2} In your case, it's really a matter of how you would like to be able to access the data. If you are only interested in knowing "apple", "pear", etc. Go ahead and use an array. You can access it via it's index a1[0]; // outputs 1 a1[1]; // outputs 2 or you can iterate over it with a loop. If you use the curly braces, (given the example I gave) you could access it with a3.one; // outputs 1 a3["two"]; // outputs 2 It's really up to you on how it would best fit your needs in this case. For a more extensive discussion see this article.
has comment: http://stackoverflow.com/comment/38241730
has comment: http://stackoverflow.com/comment/38241724
score: 18
accepted answer of: http://stackoverflow.com/q/24666758
answers question: http://stackoverflow.com/q/24666758
type: AcceptedAnswer
upvote count: 18
type: Answer

http://stackoverflow.com/q/24625276
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/24625906
accepted answer: http://stackoverflow.com/a/24625906
has answer: http://stackoverflow.com/a/35867703
has body: With JQM, I am trying to achieve the following header design |[Home] Company------------------------------[Search][Filter] [list of items] Home button and company tille left aligned and the Search and Filter right aligned. When the user clicks on the search icon, I want the following search bar to appear between the header and the list of items Search Input: JQM docs guided me to collapsible headers. While this is good, its incredibly hard to accommodate other icons like the home, company text and filter in the same header if it is marked collapsible. Is there any alternative to collapsible headers that I can use and still maintain status quo on the header?
answer count: 2
tagged with: jquery-mobile
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Collapsible search button without using collapsible header
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/35867703
upvote count: 3
type: Question

http://stackoverflow.com/a/24588402
has body: I suppose none of the links are causing a page refresh. In that case simple way would be add a class to each link lets call it nav-links Home then use jquery $('.nav-links').on('click', function(){ //remove active class from old link $('.nav-links').removeClass('active'); //add active class to current link $(this).addClass('active'); }
downvote count: 0
score: 1
type: Answer
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/24588346
answers question: http://stackoverflow.com/q/24588346

http://stackoverflow.com/comment/38314412
score: 0
type: Comment
has text: tried that there, it is still not doing anything. Is there other typo's I wonder?
comment on: http://stackoverflow.com/a/24705802
type: AnswerComment

http://stackoverflow.com/comment/72208203
comment on: http://stackoverflow.com/q/24724911
has text: Possible duplicate of [jQuery click events firing multiple times](http://stackoverflow.com/questions/14969960/jquery-click-events-firing-multiple-times)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38281732
has text: Please look at to the screenshots I posted bellow this page.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24680076
type: AnswerComment

http://stackoverflow.com/comment/38280753
type: QuestionComment
type: Comment
score: 1
has text: Please include relevant code in your post so that we can help you resolve the issue.
comment on: http://stackoverflow.com/q/24687951

http://stackoverflow.com/q/24690258
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/79323322
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24704570
has body: I'm custom an audio player with JS and HTML5. The first, I do simple with: And JS: $("#btnPlayPause").click(function(){ realSounder = document.getElementById('realSounder'); realSounder.src = "http://domain.com/aloha.mp3"; realSounder.play(); }); It runs well. But when I implement with UI control, need more complex code: function initPlayer () { realSounder = document.getElementById('realSounder'); realSounder.volume = 0.8; subscribe('canplay', realSounder, function() { if (realSounder.getAttribute('state') != 'playing') realSounder.play(); }); subscribe('canplaythrough', realSounder, function() { if (realSounder.getAttribute('state') != 'playing') realSounder.play(); }); } function subscribe(event, element, func) { //addEventListener for cross-browser. if (element.addEventListener) { element.addEventListener(event, func, false); } else if (element.attachEvent) { element.attachEvent("on" + event, func); } else { element['on' + event] = func; } } $(document).ready(function() { initPlayer(); $("#btnPlayPause").click(function(e) { e.preventDefault(); //do something for display play(); }); }); function play() { var loadUrl = "/wap.php/AjaxLoadAudio"; var audioId = $("#btnPlayPause").attr('playing'); //get id of audio $.getJSON( loadUrl, {audio_id:audioId}, function(json){ realSounder.src = json.audio_share_url; } ).error(function() { console.log('Error: 404'); }); } It doesn't works. It's seem tobe realSounder cannot raise event canplay or canplaythrough to play sound. Why? I'm try to console.log() or alert() in handler function at canplay and canplaythrough but nothing happend! NOTICE: I have tested this code and success on: IE11 / Windows Phone 8.1 Android Browser / Android 4.1,4.3 And Fail on: Safari / iPhone 4, 4S Firefox, Chrome / Android 4.1,4.3
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: HTML5 Audio Tag cannot raise event `canplay` on mobile
tagged with: html5-audio
accepted answer: http://stackoverflow.com/a/24704570

http://stackoverflow.com/a/24605323
has body: In fact you do need a very few Javascript. You could do that with a canvas, but I don't think it's the best solution. Here I place the white image in front of the black one. Then, I use the range to change the opacity of the white image, which renders as grey. CSS : &lt;style type="text/css"&gt; .greyslidercontainer { padding: 0px; background: url(black.png) no-repeat; } .greyslidercontainer img { display: block; opacity: 1; } &lt;/style&gt; HTML : &lt;div class="greyslidercontainer"&gt; &lt;img src="white.png" /&gt; &lt;input type="range" min="0.0" max="1.0" step="0.01" value="1" onchange="this.previousElementSibling.style.opacity = this.value" /&gt; &lt;/div&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/38156730
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/24600756
type: Answer

http://stackoverflow.com/q/24646067
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/38202699
type: Question
has comment: http://stackoverflow.com/comment/38202723
has comment: http://stackoverflow.com/comment/38202754
upvote count: 1
has comment: http://stackoverflow.com/comment/38202777
tagged with: php
has body: <?php if(isset($_GET['dt'])) { echo 'a'; die(); } ?> DATA If I run the above code in chrome (the latest version) and click the div it alerts a If, without refreshing my window I edit the php file and change the echo 'a' to echo 'b' then save it and click the div, it alerts b. The above is the expected behaivor. In the lastest version of internet explorer, for some reason it always alerts a. Why please?
has title: How to stop IE from caching my XHR
has comment: http://stackoverflow.com/comment/38202740
has answer: http://stackoverflow.com/a/24648562
answer count: 1
has comment: http://stackoverflow.com/comment/38202930
has comment: http://stackoverflow.com/comment/38202760
has comment: http://stackoverflow.com/comment/38206237
has comment: http://stackoverflow.com/comment/38203119
tagged with: javascript
type: UnansweredQuestion
tagged with: ajax
has comment: http://stackoverflow.com/comment/38203295
downvote count: 0
has comment: http://stackoverflow.com/comment/38202793

http://stackoverflow.com/comment/38276569
type: AnswerComment
comment on: http://stackoverflow.com/a/24684851
type: Comment
has text: Map is immutable meaning it won't change the original array. In most cases, when you change a piece of data it makes it more difficult to maintain. When a bug occurs on that piece of data, you need to walk through the code to find where that piece of data has changed. In this case, you would have to walk through a for loop to find the changes. Using map to produce a new array, you can treat it as a black box and you'll know that you should always get a new array with the specified changes. It's not as performant, but is better for more long term projects.
score: 1

http://stackoverflow.com/q/24726279
downvote count: 0
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/24726412
tagged with: arrays
tagged with: javascript
tagged with: jquery
has body: Please take a look at this fiddle. How can I slice an array into several small arrays var data = [ { number: '1' }, { number: '2' }, { number: '3' }, { number: '4' }, { number: '5' }, { number: '6' }, { number: '7' }, { number: '8' }, { number: '9' }, { number: '10'} ]; and build a table for each of them? Example: Number Number Number 1 2 3 Number Number Number 4 5 6 ........ The following code isn't working. The output is kind of a mess. As you can see in the fiddle, I can't access the key(number), and there are empty tags in between the tables. Can anyone show me how to slice the array properly. Code: var data = [ { number: '1' }, { number: '2' }, { number: '3' }, { number: '4' }, { number: '5' }, { number: '6' }, { number: '7' }, { number: '8' }, { number: '9' }, { number: '10'} ]; var chunks = []; var item_html =""; for (var i=0; i<data.length; ) { chunks.push(data.slice(i, i+=3)); } for (var i=0; i<chunks.length; i++) { item_html += " "; (i, chunks[i].map(function(key,v){ item_html += " "+key+" "; })); item_html += " "; (i, chunks[i].map(function(v){ item_html += " "+v.number+" "; })); item_html += " "; } $('#area').append(item_html)
has answer: http://stackoverflow.com/a/24726412
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Slicing an array into several chunks
favorite count: 0
type: AnsweredQuestion
tagged with: foreach

http://stackoverflow.com/q/24726219
tagged with: javascript
has answer: http://stackoverflow.com/a/24726263
has body: I'm using JSBin.com to test this simple code, for fun, but I can't seem to get it to output anything in the "Output" window on the site... is this just a limitation of the site or am I missing something completely obvious? Here's my HTML- Math.Random And my JS- function findRandom() { document.getElementById("getRandom").innerHTML = Math.random(); }
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38353851
accepted answer: http://stackoverflow.com/a/24726263
type: AnsweredQuestion
score: 0
tagged with: output
has title: Trying to Output Math.Random(); Unsuccessfully
type: Question
answer count: 1

http://stackoverflow.com/comment/38397123
type: AnswerComment
has text: It doesn't seem to be adding the clicks to vote. What do you mean by a wrapper function? Do you mean the functions such as $scope.deleteTodo?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/24725423

http://stackoverflow.com/comment/38263102
comment on: http://stackoverflow.com/q/24677694
has text: Did you see my answer..??? tell me if you find it useful :D
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/38311995
type: Comment
score: 3
comment on: http://stackoverflow.com/q/24704020
has text: you will need to re-add the title attribute since the disabled flag is using removeAttr('title')... try setting it a variable before the disable so you can add it back... but yea its kinda stupid
type: QuestionComment

jquery-file-upload
tags question: http://stackoverflow.com/q/24727116
type: Tag
tag name: jquery-file-upload
tags question: http://stackoverflow.com/q/24635693

http://stackoverflow.com/a/24707600
score: 5
has body: This isn't about promises, it's about references in JavaScript. When you do: p = p.then(function(){... You are changing the promise p is referring to, you are not changing the promise the deferred object will resolve when you fullfill/reject it - that's still the same p from before you re-assigned to it. So in your example code: promiseA = promiseA.then(function(result) { // THIS WILL EXECUTE FIRST // do stuff to...? }); promiseB = promiseA.then(function(result) { // THIS WILL EXECUTE SECOND // do stuff to resolve B }); deferA.resolve(data); When you attach more than one .then handler to a promise as in: var p = first.then(... var p2 = first.then(... I'm assuming a Promises/A+ implementation here. The spec guarantees that both .then handlers will execute when first fulfills. It will always happen in the order they were added. So, in the above case: First promiseA will resolve Then the upper promiseA.then will run (the one that was added first) Then the bottom promiseA.then will run (the one that was added later) Resolving the deferred before or after the .then addition will not change the result in a noticeable way (trivia: this is not the case with jQuery promises which is a big problem with them). It is possible to create a circular promise chain though, just a bit harder. Just like it's possible to create an infinite loop. Good promise libraries will either run it, or throw a circular reference error.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38323112
has comment: http://stackoverflow.com/comment/38318101
upvote count: 5
type: Answer
accepted answer of: http://stackoverflow.com/q/24707420
downvote count: 0
answers question: http://stackoverflow.com/q/24707420
has comment: http://stackoverflow.com/comment/38320604
has comment: http://stackoverflow.com/comment/38318182

http://stackoverflow.com/q/24657377
linked to: http://stackoverflow.com/q/14028959
score: 0
has body: I have the code needed to pass a variable from javascript to vb.net, but it is not working for some reason and I can't seem to figure out what is wrong with the code. Please help. I declared a hidden variable and it stores the value and is then posted back, but the variable in the codebehind file is always empty. Aspx code (EDITED:) <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication3.WebForm1" %> <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> <asp:HiddenField ID="nwLatHidden" runat="server" Value="" /> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"> </asp:ScriptReference> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <telerik:RadHtmlChart runat="server" ID="RadHtmlChart1"> <TextStyle FontSize="14" Color="Blue" FontFamily="Courier New, sans-serif" /> <telerik:AxisItem LabelText="KM41872"/> <telerik:AxisItem LabelText="KM41873"/> <telerik:AxisItem LabelText="KM41871"/> <MajorGridLines Visible="false" /> <MinorGridLines Visible="false" /> <MinorGridLines Visible="false" /> <telerik:LineSeries Name="Mean"> <telerik:CategorySeriesItem Y="0.59" /> <telerik:CategorySeriesItem Y="0.63" /> <telerik:CategorySeriesItem Y="0.6" /> <telerik:CategorySeriesItem Y="0.65" /> <telerik:CategorySeriesItem Y="0.64" /> <telerik:CategorySeriesItem Y="0.63" /> <telerik:CategorySeriesItem Y="0.65" /> <telerik:CategorySeriesItem Y="0.67" /> <telerik:CategorySeriesItem Y="0.63" /> </telerik:LineSeries> <telerik:LineSeries Name="Min"> <telerik:CategorySeriesItem Y="0.55" /> <telerik:CategorySeriesItem Y="0.56" /…
answer count: 1
tagged with: asp.net
has comment: http://stackoverflow.com/comment/38225324
has comment: http://stackoverflow.com/comment/38224231
has comment: http://stackoverflow.com/comment/38223826
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/38223975
has title: Passing javascript variable to VB.Net
tagged with: vb.net
has comment: http://stackoverflow.com/comment/38225779
type: Question
has answer: http://stackoverflow.com/a/24661827
tagged with: javascript
has comment: http://stackoverflow.com/comment/38224034
has comment: http://stackoverflow.com/comment/38224003

http://stackoverflow.com/comment/38315706
comment on: http://stackoverflow.com/q/24705741
type: Comment
type: QuestionComment
has text: Since your service is already handling promises, try calling results without promise callback. Results.get(function(data){ $log.info('Results: ' + data); }
score: 1

http://stackoverflow.com/a/57196636
has body: I had similar behaviour, when form.submit() didn't work on Firefox, but worked on other browsers. Just make sure that all the buttons within form contain type="button".
downvote count: 0
has comment: http://stackoverflow.com/comment/113062819
answers question: http://stackoverflow.com/q/24685208
type: Answer
score: 7
upvote count: 7

http://stackoverflow.com/q/24671202
tagged with: javascript
tagged with: gulp
upvote count: 7
accepted answer: http://stackoverflow.com/a/24671560
favorite count: 0
possible better answer: http://stackoverflow.com/a/24671577
downvote count: 0
tagged with: angularjs
has title: Remove scripts from index.html through gulp
has answer: http://stackoverflow.com/a/24671560
type: AnsweredQuestion
score: 7
has body: I'am using gulp in our application, we have 2 flows in Gulpfile.js, one for production and second for development, but I dont want to keep 2 index.html files e.g. index.html and index.dev. html, I want to have one index.html file, but for production build I have scripts which are no needed e.g . &lt;!--dev depends --&gt; &lt;script src="angular-mocks/angular-mocks.js"&gt;&lt;/script&gt; &lt;script src="server.js"&gt;&lt;/script&gt; &lt;!--dev depends --&gt; question is: How can I remove something from html through Gulp ?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/24671577

http://stackoverflow.com/a/24659438
has body: As stated in other answers/comments from the other posters, your use of $.each and the data[index] definition aren't correct. Try this (untested): function myAlerts(data) { $("#alertsListMissingPets").empty(); $.mobile.loading( 'hide', { theme: "b", text: "Loading", textonly: false}); if(data.length &gt; 0) { $.each(data, function(value) { //index isn't needed based on your code $("#alertsListMissingPets").append(" &lt;li&gt;&lt;a data-lostid='"+ value.LostKey + "' data-custom='"+ value.AnimalKey + "' href=\"#\"&gt;"+ value.Name + "&lt;span class=\"ui-li-count\"&gt;"+ value.Distance + "&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;"); }); $("#alertsListMissingPets").listview('refresh'); } else { navigator.notification.alert('No missing pets in your area!', alertDismissed, 'Good News', 'Okay' ); } } //moved this out of your else clause for aesthetics function alertDismissed() { $.mobile.changePage("#mainpage"); }
type: Answer
answers question: http://stackoverflow.com/q/24655785
score: 0

http://stackoverflow.com/comment/38415725
has text: Ok, so from my side no need to implement Lazy loading rite, if i want i can do it at database side. @Hatem Alimam
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/24753702
score: 0

http://stackoverflow.com/q/24670255
has comment: http://stackoverflow.com/comment/38247166
has comment: http://stackoverflow.com/comment/38247565
has title: How to get the selected value from select box in html
has body: i want to get the selected option from select box.I have this code: Seciniz <%for(int i=1;i<k+1;i++){kullancounter++; %> <%=ka[i] %> <%} %> but it opens alert but there is nothing in alert.What should i do?Thanks
has comment: http://stackoverflow.com/comment/38247239
type: Question
has comment: http://stackoverflow.com/comment/38247415
linked to: http://stackoverflow.com/q/1085801
tagged with: javascript
score: 0
duplicate of: http://stackoverflow.com/q/1085801
answer count: 1
has comment: http://stackoverflow.com/comment/38247211
has answer: http://stackoverflow.com/a/24670319
type: UnansweredQuestion

http://stackoverflow.com/a/24588682
accepted answer of: http://stackoverflow.com/q/24588193
type: Answer
has body: The approach you describe would quickly become hard to maintain and test. I imagine if you had a dictionary site you'd have a backend containing all the words. You'd need to use JavaScript to get that data - so you'd probably bind your UI to the data retrieved from that backend and the JS objects would be the place that everything else gets looked up from. This approach disconnects your UI from the underlying data and doesn't create a mangled mess of UI referring to other UI. I'd recommend reading about how to use a single page app framework such as AngularJS, DurandalJS or EmberJS in order to structure things 'correctly'.
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/24588193

http://stackoverflow.com/comment/38115663
type: Comment
has text: Where are you trying to log `tcResponse`? What is this code supposed to do? What does it actually do?
comment on: http://stackoverflow.com/q/24600596
score: 0
type: QuestionComment

http://stackoverflow.com/comment/38343955
has text: you mean the entire code from `<div` onwards? Or you mean declare span in another js file and refer it?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24720923

http://stackoverflow.com/comment/38194472
has text: I edited the question. Let me know if it's more clear. Thanks!
comment on: http://stackoverflow.com/q/24635241
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24593849
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/38103506
type: Answer
has comment: http://stackoverflow.com/comment/38103473
score: 1
has body: I assume this is what you're looking for? HTML: &lt;div id="sticky" class="banner-sticky" style="position: fixed;"&gt; Test &lt;/div&gt; JS: var Vicinity = function (pubReference, sessionId, done, err) { // defaults this.sessionId = sessionId; this.pubReference = pubReference; this.finishedGettingAd = false; this.ad = { getBannerHtml: function() { return '&lt;iframe src="http://www.lifehacker.com"&gt;&lt;/iframe&gt;'; } }; this.getLatLng = function(vicinity, done, err) { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(done, function(e) { console.warn('ERROR: ' + e.message); err(vicinity); }, { enableHighAccuracy:true } ); } else { console.warn("Browser doesn't support Geolocation"); err(vicinity); } }; this.init = function(done, err) { var that = this; this.getLatLng(that, function(position) { that.lat = position.coords.latitude; that.lng = position.coords.longitude; }, err); if(typeof done === 'function') done(this); }; this.init(done, err); }; $(document).ready(function() { var pubReference = 34; var sessionId = "abcd123"; var data = new Vicinity (pubReference, sessionId, function(result) { $("#sticky").html(result.ad.getBannerHtml()); //displayResults(result); }, function(result) { $("#sticky").html(data.ad.getBannerHtml()); //displayResults(result); } ); }); Note that the initialization of a Vicinity instance is inside a document ready (so you can aptly modify the DOM after a done/err). Also, you were not passing err into getLatLng. I also inserted a function call for done() at the end of the init (I assume this is what you wanted). If not, my fiddle has it removed: http://jsfiddle.net/PA8nr/3/
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24593666
answers question: http://stackoverflow.com/q/24593666

http://stackoverflow.com/comment/38346446
score: 0
type: AnswerComment
has text: Yeah, it has a few flaws, but I couldn't find/write a better one yet. That section from Kangax' article is valuable information, but doesn't target "you're doing it wrong" or clears up the wrongful term "associative array".
type: Comment
comment on: http://stackoverflow.com/a/24712685

http://stackoverflow.com/comment/71915977
type: AnswerComment
type: Comment
score: 1
has text: I saw your answer just now. That's great dude. Thanks :)
comment on: http://stackoverflow.com/a/42240115

http://stackoverflow.com/comment/38230503
score: 0
type: AnswerComment
type: Comment
has text: Thank you! I thought I had changed my code back to .attr("x", 3)but I hadn't. That solved it.
comment on: http://stackoverflow.com/a/24660045

http://stackoverflow.com/comment/38321360
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24709287
has text: `$('.row-totals').html(sum);` sets the content of all `.row-totals` elements to the same value. You already seem to know how to target elements relative to a specific element (since you are using `.find`). Have a look at http://api.jquery.com/category/traversing/tree-traversal/.

http://stackoverflow.com/a/35819809
upvote count: 0
answers question: http://stackoverflow.com/q/24623833
score: -1
has comment: http://stackoverflow.com/comment/68249824
downvote count: 1
type: Answer
has body: Similar to workgena, this did it for me. chart.tooltip.valueFormatter(function(d){ return (d +' %'); });

http://stackoverflow.com/comment/38362800
comment on: http://stackoverflow.com/a/24701803
score: 0
type: Comment
has text: $('a.bx-pager-link').click ( function() { var toSlide = $(this).attr('data-slide-index'); mySlider1.goToSlide(toSlide); mySlider2.goToSlide(toSlide); mySlider3.goToSlide(toSlide);}, function(){ var toSlide = $(this).attr('data-slide-index'); mySlider1.goToSlide(toSlide); mySlider2.goToSlide(toSlide); mySlider3.goToSlide(toSlide); return false; }); }); If we used this code instread of var toSlide = $(this).attr('data-slide'); mySlider1.goToSlide(toSlide); mySlider2.goToSlide(toSlide); mySlider3.goToSlide(toSlide); then it perform perfectly. Thanku for your contribution IndieRok.
type: AnswerComment

http://stackoverflow.com/q/24622430
score: 0
answer count: 2
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/24623126
has title: Pass array variable from background.js to content.js
possible better answer: http://stackoverflow.com/a/24623126
accepted answer: http://stackoverflow.com/a/24622638
type: AnsweredQuestion
type: Question
has body: I am really struggling with passing an array from my background.js to my content.js. Before I start, I will list my scripts. manifest.json { "manifest_version": 2, "name": "Tab Highlighter", "description": "Highlight already open tabs in a google search query", "version": "1.0", "content_scripts":[ { "matches": [ "http://www.google.com/*", "https://www.google.com/*", "https://*/*", "http://*/*" ], "js": ["content.js"], "run_at": "document_end" } ], "background": { "persistent": false, "scripts": ["background.js"] }, "permissions":[ "tabs" ] } content.js chrome.runtime.sendMessage({data: "getTabs"}, function(response) { var tabs = response.data; if(!tabs) { console.log("No Tabs could be found!!"); } else { console.log("TABS FOUND"); console.log(tabs); for(var k = 0; k &lt; tabs.length; k++) { console.log(tabs[k]); } var links = document.getElementsByTagName("a"); for(var i = 0; i &lt; links.length; i++) { var link = links[i]; var real_href = link.getAttribute("href"); if(real_href) { //console.log(real_href); for(var j = 0; j &lt; tabs.length; j++) { if(i == 0) { console.log("tab open: ", tabs[j]); } if(real_href == tabs[j]) { console.log("duplicate found: ", real_href); link.innerHTML = "Already Open"; } } } } console.log("End printing tabs"); } }); background.js chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if(request.data === "getTabs"){ var fourmTabs = new Array(); chrome.tabs.query({}, function(t) { for (var i = 0; i &lt; t.length; i++) { fourmTabs[i] = t[i].url; } // Moved code inside the callback handler for (var i = 0; i &lt; fourmTabs.length; i++) { if (fourmTabs[i] != null) console.log(fourmTabs[i]); else { console.log("??" + i); } } } ); if(!fourmTabs) { console.log("Tabs could not be generated!!"); } else { for(i = 0; i &lt; fourmTabs.length; i++) { console.log(fourmTabs[i]); } } sendResponse({data: fourmTabs}); //return true; used to see if this was asynchronous or not } }); UPDATED background.js chrome.runtime.onMessage…
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/24622638

http://stackoverflow.com/comment/38325906
type: AnswerComment
comment on: http://stackoverflow.com/a/24711616
type: Comment
score: 2
has text: who said that the source would get affected while using `.data()`..? You should have explained about the usage of `.data()` tag.. Instead you have suggested a kind of wrong way to the OP.. That is replacing the `.data()` with `.attr()`

http://stackoverflow.com/q/24680782
type: UnansweredQuestion
has title: Iframe redirect if content not avaliable
has comment: http://stackoverflow.com/comment/38273969
has comment: http://stackoverflow.com/comment/38271701
answer count: 0
tagged with: iframe
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/38272402
has body: Im trying to get my iframe to not break if its sent to websites with same orgin, I need it to recognize that nothing is going to load and automatically be redirected to another location. But the javascript has to be able to determine any site, without having to make a list of 1000 sites or just that the browser itself isnt detecting content available so default to a new location. Any help would be greatly appreciated. var inputArea = new Ext.form.TriggerField({value: '', emptyText: 'Input Web Address', width:155, qtip:'Input web address and hit enter.', listeners: { specialkey: function(f,e){ if ( e.getKey() == e.RETURN || e.getKey() == e.ENTER ) { //document.getElementById("center-iframe").setAttribute('data', 'http://' +f.getValue()); var element = document.getElementById("center-frame"); var result = f.getValue().search(new RegExp(/^http:\/\//i)); if( !result ) { element.setAttribute("data", " " +f.getValue()); } else { element.setAttribute("data", "http://" +f.getValue()); } } } }}); This is the code im currently using when it comes to a user inputing their own link to change the object, i need to know how i would go about makeing it looking for sameorgin sites or anything that wont or shouldnt load in a object/iframe/frame any of the above. Currently if you put google.com in this and hit enter it breaks the object. I need to find a way to make it so that doesnt happen and just defaults them to a specific page. Thank You
tagged with: javascript
has comment: http://stackoverflow.com/comment/38269443
tagged with: same-origin-policy
score: 0
has comment: http://stackoverflow.com/comment/38268948
tagged with: jquery
linked to: http://stackoverflow.com/q/4548984

http://stackoverflow.com/a/24610546
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/38134819
has comment: http://stackoverflow.com/comment/38134937
has comment: http://stackoverflow.com/comment/38136480
has body: Not with any native Q function. You could however write an every method for promises yourself (loosely based on Q.all): Q.every = function every(promises) { return Q.when(promises, function (promises) { var countDown = 0; var deferred = defer(); for (var i=0; i&lt;promises.length; i++) { var promise = promises[i]; var snapshot; if ( Q.isPromise(promise) &amp;&amp; (snapshot = promise.inspect()).state === "fulfilled" ) { if (!snapshot.value) { deferred.resolve(false); return deferred.promise; } } else { ++countDown; q.when( promise, function (value) { if (!value) deferred.resolve(false); else if (--countDown === 0) deferred.resolve(true); }, deferred.reject, (function(index) { return function (progress) { deferred.notify({ index: index, value: progress }); }; }(i)); ); } } if (countDown === 0) { deferred.resolve(true); } return deferred.promise; }); }
upvote count: 2
answers question: http://stackoverflow.com/q/24610100
has comment: http://stackoverflow.com/comment/38134934
type: Answer

http://stackoverflow.com/comment/38370224
score: 1
comment on: http://stackoverflow.com/q/24734894
has text: __Yes__, this can be done using `localStorage`, `sessionStorage`. You can simply modify the script which you found to be used with them.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/24637847
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/208016
accepted answer: http://stackoverflow.com/a/24637904
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/24637904
has body: I have this code like this: $scope.role.object_access_right = {contact:1,group:1,image:1,text:1,email_template:1,email:1,channel:1,campaign:1,invoice:1,user:1,account:1,tenant:1,} I have empty array here, $scope.access = []; How can I push the key to empty array to have result ? $scope.access = [contact,group,text ...]
score: 0
has title: How to add Object to array in javascript
linked to: http://stackoverflow.com/q/208016
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/q/24685521
has title: Keep losing incremental variable within for loop
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/24685647
type: Question
has comment: http://stackoverflow.com/comment/38278581
answer count: 2
has comment: http://stackoverflow.com/comment/38278466
has answer: http://stackoverflow.com/a/24685559
tagged with: javascript
has comment: http://stackoverflow.com/comment/38279089
favorite count: 0
has body: I've been fiddling with this for way too long and can't seem to get it working as it should. The problem I'm having is that I'm losing the value of my incremental variable in a for loop, specifically when it goes in to the if statement that I have inside of it. Ideally i want to iterate through an array until I find the correct value, attach a variable to that value and use it outside of the for loop. This is the structure of the array I'm working with. var dXId = [ {url:"url1", dId:"id1"}, {url:"url2", dId:"id2"}, {url:"url3", dId:"id3"} ]; And here is the loop that I'm running everything through: for(i=0; i &lt; dXId.length; i++) { if (dXId[i].url == currentUrl){ var dataXuId = dXId[i].dId; break; } } The incremental 'i' variable always reverts back to 0 within the if statement. It's odd, the dXId[i].url comes up correctly, but the dXId[i].dId pulls the first entry and 'i' seems to be lost after that. I'm sure there is a very simple solution to this, but javascript is something that I just always seem to have trouble with.
upvote count: 1
has comment: http://stackoverflow.com/comment/38317208
type: UnansweredQuestion

http://stackoverflow.com/q/24595789
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/901115
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to use Javascript to extract the "code" parameter from the URL. Can anyone tell me why the javascript that I wrote below does not print the query string on the HTML page? Your help is greatly appreciated. URL: google.com?code=123456789 HTML code: &lt;html&gt; &lt;body&gt; Your code is: &lt;script&gt; function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&amp;'); for(var i = 0; i &lt; hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; var code = getUrlVars()["code"]; } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
has title: Extracting URL query string using Javascript
score: 0
has answer: http://stackoverflow.com/a/24595841
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/38106381
accepted answer: http://stackoverflow.com/a/24595841
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/901115

http://stackoverflow.com/comment/38187134
has text: @Yesian_ you can se id after appending the html as well
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24637343

http://stackoverflow.com/a/24693685
answers question: http://stackoverflow.com/q/24693589
downvote count: 0
has body: I think you might have misunderstood how promises work. They won't magically turn an asynchronous operation into a synchronous one so unless you want to block you won't be returning JSON from your method. The then property of the object you end up returning with your code is a function that registers a handler for the promise, it's used exactly like you did with the result of the $.ajax call.
type: Answer
has comment: http://stackoverflow.com/comment/38302586
score: 2
upvote count: 2

http://stackoverflow.com/q/24735155
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/24735430
has comment: http://stackoverflow.com/comment/38370748
score: 2
linked to: http://stackoverflow.com/q/16494457
type: AnsweredQuestion
has title: AngularJS - Dynamic scope fields
downvote count: 0
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/24737387
has answer: http://stackoverflow.com/a/24737560
accepted answer: http://stackoverflow.com/a/24737560
tagged with: javascript
has answer: http://stackoverflow.com/a/24735430
has body: It is possible to use a dynamic parameter and set his scope value? $scope.testFunc= function(fieldName){ $scope.fieldName = 'Test'; }
answer count: 3

http://stackoverflow.com/q/24615853
has answer: http://stackoverflow.com/a/24615893
duplicate of: http://stackoverflow.com/q/1133770
has answer: http://stackoverflow.com/a/24615976
type: Question
has title: How do I convert a string to an integer?
answer count: 2
upvote count: 0
has body: I am developing a program to enter marks of a student and perform addition operation on it. My code is: Enter StudentNo: Enter StudentName: Enter Marks1: Enter Marks2: Enter Marks3: When I perform an addition operation on it, it is returning a string value, but when I perform a multiplication operation on it, it is returning an integer value. I tried the parseInt method to convert string to int, but it is also giving a string value only.
tagged with: javascript
linked to: http://stackoverflow.com/q/1133770
has comment: http://stackoverflow.com/comment/38145622
score: -6
favorite count: 0
has comment: http://stackoverflow.com/comment/38145452
type: UnansweredQuestion
downvote count: 6

http://stackoverflow.com/comment/38332660
comment on: http://stackoverflow.com/a/24715439
has text: would you like to explain what you did? sticking plain code as an answer does not really help especially when your code doesnt work...
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/50314942
comment on: http://stackoverflow.com/a/31138348
type: Comment
has text: Yes, If you want to save file, you can use file api of html5, Here is http://www.html5rocks.com/en/tutorials/file/dndfiles/
type: AnswerComment
score: 0

http://stackoverflow.com/q/24644062
type: Question
has answer: http://stackoverflow.com/a/24646980
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24646980
score: 0
has title: Create a "next record/previous record" button in Angular
answer count: 1
has comment: http://stackoverflow.com/comment/38199576
tagged with: angularjs
type: AnsweredQuestion
has body: I have an AngularJS app with one controller managing an index template displaying records received from an API call and a second controller managing the corresponding show template for a record. I'd like to create a forward/backward button on the show template so that you can simply skip through the records. If I reach the end, I would like it to restart at the beginning - and endless loop. I am not sure where to place the logic of "total number of records" so that my show controller knows that I've reached the end. Only my index controller has the complete set of data. It seems that services are useful in making controllers speak, but I'm not sure how to implement it for this case. API call currently happening in a factory: app.factory('studentsFactory', ['$http', '$cacheFactory', function ($http, $cacheFactory) { var factory = {}; factory.getStudents = function() { return $http.get('http://localhost:3000/students', { cache: true }); }; factory.getStudent = function(studentId) { return $http.get('http://localhost:3000/students/' + studentId, { cache: true }); }; return factory; }]); ...and handing off to an IndexCtrl: app.controller('IndexCtrl', ['$scope', 'studentsFactory', function ($scope, studentsFactory) { function init() { studentsFactory.getStudents() .success(function (students) { $scope.students = students; $scope.length = students.length }); }); } init(); }]); ...and a ShowCtrl: app.controller('ShowCtrl', ['$scope', 'studentsFactory', '$routeParams', function ($scope, studentsFactory, $routeParams){ var studentId = $routeParams.studentId; // var nextId = studentId++ (if &lt; max, go ahead, if not, reset to 1) function init() { studentsFactory.getStudent(studentId) .success(function (student) { $scope.student = student; }); }); init(); }]); Seems like it's right in front of me. Any chance the factory can also send data from the same API call to a service that could store a max as a variable? Many thanks.

http://stackoverflow.com/comment/38205391
type: AnswerComment
has text: The code works when I placed that code at the bottom of the SCRIPT SECTION, but once click on the new button there's an error, the save button does not shows up. Want me to send you my whole html code @Tilwin Joy so you can test it yourself?
score: 0
comment on: http://stackoverflow.com/a/24647016
type: Comment

http://stackoverflow.com/comment/38377108
type: Comment
type: QuestionComment
score: 1
has text: You may want to just consider making it convenient for the user to turn automatic smiley replacement on and off. There are potential issues other than just URLs where replacement may be unwante **d:** (maybe they're using parenthetical asides to talk about bo **b)** .
comment on: http://stackoverflow.com/q/24738347

http://stackoverflow.com/q/24591588
tagged with: mysql
has comment: http://stackoverflow.com/comment/38098591
has answer: http://stackoverflow.com/a/24592020
has comment: http://stackoverflow.com/comment/38098818
tagged with: function
answer count: 1
tagged with: javascript
has title: Javascript - calculating the remaining between two related fields
score: 0
accepted answer: http://stackoverflow.com/a/24592020
tagged with: input
tagged with: php
has body: First of all, I would like to calculate the remaining QTY (quantity) between two fields in a form; in other words I have the actual QTY input text field as a read-only where its value is obtained from mysql table AND there is the user QTY input text field is taken from the user input. All I want is to decrement the actual QTY based on what the user input in the user QTY. I have the following code as follows : $query2 = "SELECT * from store_00"; $result2 = mysql_query($query2); $n = array(); while($row2 = mysql_fetch_assoc($result2)){ echo "&lt;td align=center&gt;".$row2['item_no']."&lt;/td&gt;&lt;td align=center&gt;"; ?&gt; &lt;input type="text" id="fname" value="&lt;?php echo $row2['qty'] ?&gt;" readonly="readonly"/&gt; &lt;?php echo "&lt;/td&gt;"; for($i=0;$i&lt;$num;$i++){ echo "&lt;td align=center&gt;"; ?&gt;&lt;input autofocus="autofocus" onchange="myFunction(this.value);" type="text" name="n[]" value=""/&gt;&lt;?php echo "&lt;/td&gt;"; } echo "&lt;/tr&gt;"; } And the Javascript code : function myFunction(v) { var x=document.getElementById("fname"); x.value = x.value - v; } The above will output in the actual QTY correctly for the first time, but when user changes the value back to 0 , it will decrements from the new actual QTY value which gives a false remaining...So there must be a way to have a temporary actual QTY value saved somewhere. Anyways I know the code looks awful, I'm still new to JS and not sure how to just create a simple relation and remaining calculation between two fields.
has comment: http://stackoverflow.com/comment/38098866
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/24731067
has title: Sticky Navbar not working
tagged with: css
type: AnsweredQuestion
has body: I have been trying to achieve a sticky navbar in my project, but somehow its not working. I can't get what's wrong here (PS: it doesn't even show up in my fiddle but does show in local files I'm building. ) Have been using twitter bootstrap 3.x. What might possibly be going wrong? A little help would be much appreciated. Here's the code I'm implementing: HTML: this is a title Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc molestie posuere justo id condimentum. Morbi eu massa non enim varius lobortis vitae id massa. Aliquam congue consectetur nisi, sit amet tempus nunc mattis at. Aliquam non eleifend quam, ac accumsan urna. Nullam porta metus lacus, aliquam pretium purus rhoncus et. Donec in congue mi. Integer eu massa tincidunt, convallis diam in, ultrices lacus. Nulla bibendum metus sed enim faucibus, vel egestas tortor sollicitudin. Proin bibendum condimentum enim, ac luctus augue gravida et. Proin pretium tortor sed turpis gravida molestie. In hac habitasse platea dictumst. Home About me Resume Contact lol Proin auctor turpis ac elit pharetra laoreet. Cras consequat mauris ut condimentum vulputate. Nunc faucibus viverra suscipit. Sed sit amet ante interdum libero malesuada adipiscing sed at erat. Praesent et tristique lorem. Vestibulum lobortis laoreet tortor eget pellentesque. Nam commodo nibh libero, in elementum mi lobortis ut. this is a title Pellentesque interdum, quam sit amet sagittis porttitor, nunc lorem aliquam lorem, varius laoreet lectus diam vel mi. Fusce ut justo a neque vestibulum aliquam ac at ante. Phasellus porttitor mollis semper. Cras ultricies augue augue, non consequat nisi laoreet et. Donec sapien erat, molestie in faucibus ut, dapibus id risus. Morbi nec lorem nulla. Suspendisse potenti. Ut congue purus vel tincidunt facilisis. Cras condimentum lorem a purus lacinia dignissim. Curabitur convallis, leo ut vestibulum feugiat, ante urna ullamcorper ipsum, et aliquam justo sem ac urna. Praesent rhoncus risus nec dignissim ornare…
has comment: http://stackoverflow.com/comment/38368274
possible better answer: http://stackoverflow.com/a/24731221
tagged with: twitter-bootstrap
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/24731134
accepted answer: http://stackoverflow.com/a/24731134
score: 0
has answer: http://stackoverflow.com/a/24731221
answer count: 2
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/38400866
comment on: http://stackoverflow.com/a/24732372
score: 0
type: AnswerComment
has text: first of all, iPad actually can interpret m3u8 file. Thanks for the reminder, yet you advice only apply to the playlist items. the case here is the m3u8 itself got 404 response.
type: Comment

http://stackoverflow.com/comment/38333054
comment on: http://stackoverflow.com/q/24632527
score: 0
type: Comment
type: QuestionComment
has text: @RyanDuffy The problem with the last code is, that the master key is still "global". When I call the obj-c code that you can see above, the app crash with this error: `the user must be authenticated via logIn or signUp`, despite it worked well before I started using CloudCode.

http://stackoverflow.com/comment/38125843
has text: @JFK, I changed the script & update my question but script is behaving wired in it works only in FF private mode & in normal mode it doesnt show fancybox at all.
comment on: http://stackoverflow.com/q/24592656
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24605173
answers question: http://stackoverflow.com/q/24605053
has body: issue is uppercase P in datePicker change it to lowercase p as below: $('#datecobro').datepicker({ .......//-------^--------this lowercase p is required. }); Demo
type: Answer
has comment: http://stackoverflow.com/comment/38124905
has comment: http://stackoverflow.com/comment/38128393
score: 0

http://stackoverflow.com/q/24596805
score: 1
type: Question
has title: Can not build ngtoast
tagged with: javascript
accepted answer: http://stackoverflow.com/a/24596904
has comment: http://stackoverflow.com/comment/38108140
tagged with: ngtoast
upvote count: 1
answer count: 1
has body: I'm just trying to run ngtoast, I recently came across, but it gives me an error no such file or directory 'c:\modules' I'm trying to run ngtoast like this: ngtoast build what am I doing wrong? Here is my config file: { "public": "./public", "modules": "/modules", "output": "./public/modules.js" }
has answer: http://stackoverflow.com/a/24596904
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/38109012
type: QuestionComment
has text: Essentially, once your element is in it's "open" state, a click anywhere on the document (that is not one of your elements) would close the select element... So you might be able to listen for a click on the document object.
score: 1
comment on: http://stackoverflow.com/q/24597301
type: Comment

http://stackoverflow.com/comment/38156791
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24620934
type: Comment
has text: haha. i've seen it. just installed firefox. also good for testing. i see it works there. only in google chrome and IE 11 it does not work. so its not good because it has to work in all the populair browsers.

http://stackoverflow.com/comment/38279280
type: Comment
comment on: http://stackoverflow.com/a/24676304
has text: you would need to know the slope of the trajectory, I think it should be this kind of trajectory: http://en.wikipedia.org/wiki/Parabola but unfortunately I can't really help you on how to calculate that
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38228676
comment on: http://stackoverflow.com/q/24659841
score: 1
type: Comment
type: QuestionComment
has text: You can always use the `mouseup` event. For double clicks, just use any event and store the time each click happened in a global object. If the last time recorded isn't `undefined` and is within 200ms of the current event time, it should be counted as a double click.

http://stackoverflow.com/comment/38255976
has text: `sum += parseFloat(this.value * $("#gc").val());`
score: 2
comment on: http://stackoverflow.com/q/24675004
type: Comment
type: QuestionComment

http://stackoverflow.com/a/24887898
has body: You can use Image Column in JqxGrid. Tutorial
type: Answer
has comment: http://stackoverflow.com/comment/38755677
answers question: http://stackoverflow.com/q/24738393
has comment: http://stackoverflow.com/comment/38713404
score: 0
has comment: http://stackoverflow.com/comment/38737276

http://stackoverflow.com/q/24604236
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/2901102
has answer: http://stackoverflow.com/a/24604353
tagged with: javascript
possible better answer: http://stackoverflow.com/a/24605167
tagged with: jquery
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/24604353
has body: I have a div with a integer content in it. 12,747,822 I want to increase the content of it by a random number between 2 to 5 every second. Here is what I've tried so far For some reason this creates a blank div. How should I approach this?
type: Question
has comment: http://stackoverflow.com/comment/38123284
has comment: http://stackoverflow.com/comment/38123095
has comment: http://stackoverflow.com/comment/38123311
has comment: http://stackoverflow.com/comment/38123151
has title: Increment div content by a random value each second using jQuery
has comment: http://stackoverflow.com/comment/38123299
has answer: http://stackoverflow.com/a/24605167

http://stackoverflow.com/comment/38103597
type: QuestionComment
has text: Doh! Your're right. Thank you Satpal.
score: 1
comment on: http://stackoverflow.com/q/24594267
type: Comment

http://stackoverflow.com/a/24716065
downvote count: 0
has body: Here's a solution that you embed all your templates into angular ng-template script tags: &lt;script type="text/ng-template" id="myTemplate.html" class="angular-template"&gt; &lt;!-- jade template --&gt;&lt;/script&gt; The angular convention for this is the ID of type="text/ng-template" is a valid template URL and if found angular will pull from script tag before it would attempt to get via ajax Before bootstrapping angular compile innerHtml of these script tags var templates = document.querySelectorAll('.angular-template') for (i = 0; i &lt; templates.length; i++) { templates[i].innerHTML = jade.compile(templates[i].innerHTML.trim())() } Example app using ng-view for routing: var app = angular.module('plunker', ['ngRoute']); app.config(function($routeProvider) { $routeProvider. when('/', { templateUrl: 'myTemplate.html' /* note is same as script tag ID above*/ }); }); app.controller('testApp', function($scope){ $scope.title="See script tag for template"; $scope.numbers = [1,2,3,4,5] }) angular.bootstrap(document, ['plunker']) DEMO
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/24713990
answers question: http://stackoverflow.com/q/24713990
has comment: http://stackoverflow.com/comment/38339273
type: AcceptedAnswer

http://stackoverflow.com/comment/38107464
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/24596270
type: Comment
has text: I tried but using the bxSlider library as well I've struggled. I can show you the code by sending the file, but I've had no luck replicating any sort of behaviour in a JSFiddle

http://stackoverflow.com/a/24738327
type: Answer
answers question: http://stackoverflow.com/q/24738212
has body: Remove the extra quotes around the month value to be: 'datepicker-mode':"month", You had: $scope.dateOptions = { 'year-format': "'yy'", 'starting-day': 1, 'datepicker-mode':"'month'", 'min-mode':"month" }; same issue for: 'year-format': "'yy'"
has comment: http://stackoverflow.com/comment/38404448
has comment: http://stackoverflow.com/comment/38431814
has comment: http://stackoverflow.com/comment/47440291
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/24738212

http://stackoverflow.com/comment/38352975
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24725561
has text: @jfriend00, Barmar -- See, I thought so, which makes the discrepancy even more confusing.
score: 0

http://stackoverflow.com/a/24671197
has body: You're talking about IDs (#escape) but you're using classes (.escape). You should switch your class attributes to IDs because they're unique. Here I'll use the class though. You should put this in your onclick= attribute inside .escape. this.setAttribute('src',this.parentNode.getElementsByClassName('myimg2')[0].getAttribute('src')) Here we set the the src attribute to be that of the first .myimg2 class element that is inside .escape's parent element. If there are no other elements with the class .myimg2 you could use document.get... instead of this.parentNode.get.... With IDs instead of classes: this.setAttribute('src',document.getElementById('myimg2').getAttribute('src')) Note that with IDs you don't have to specify the parent node because IDs are unique to the element through the entire document.
answers question: http://stackoverflow.com/q/24671034
score: 0
type: Answer

http://stackoverflow.com/q/24604890
score: 0
has answer: http://stackoverflow.com/a/24605208
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/38156172
tagged with: angularjs
has body: I have been struggling with the ng-repeat to show the selected row as active. Any help will be greatly appreciated. Please find Plukr for this here http://plnkr.co/edit/PXgoCkqcKrZKPakjvlvc?p=preview Please note that I have been successful with doing this when used on a navbar menu where in the HTML I have ng-class="{'active' : setActive('/blah')}"&gt; and in the controller I have $scope.setActive = function (loc) { return loc === $location.path(); }; but this clearly don't work here for me.
has comment: http://stackoverflow.com/comment/38124654
has answer: http://stackoverflow.com/a/24605231
accepted answer: http://stackoverflow.com/a/24605231
has title: AngularJS - ngRepeat to show selected row as active
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/24605208
type: Question

http://stackoverflow.com/comment/38207508
has text: For example: All Objects in JS are children of Object.prototype and they all share the same prototype Object.prototype.
comment on: http://stackoverflow.com/q/24648400
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/38317271
type: Comment
has text: @ArtjomB. That really depends.. if those things are common, they can just be written in the layout. If you mean ie. ` `, well, then there would make sense to have one "master file" that includes layout, and tells it what title and what content to show.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/24707182

http://stackoverflow.com/a/24935971
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/24608257
type: Answer
has body: Solved: myapp.ViewBookshelf.Books_postRender = function (element, contentItem) { element.innerText = "Books" element.style.fontWeight = 'bold'; element.style.fontSize = "21px"; }; for Ints or Booleans contentItem.value = false; contentItem.value = 0;
accepted answer of: http://stackoverflow.com/q/24608257
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/38389206
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24744762
has text: Thank you!!! Does this mean I need a specific order for these files when I call the js in asset pipeline or if I'm linking the script files old-school style? I'm new.
score: 0

http://stackoverflow.com/q/24695946
has comment: http://stackoverflow.com/comment/38294905
type: AnsweredQuestion
has title: Javascript function not working per functionality
has comment: http://stackoverflow.com/comment/38295106
accepted answer: http://stackoverflow.com/a/24696242
has comment: http://stackoverflow.com/comment/38295200
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/24696115
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/38294914
has body: I have a following Javascript function for expand collapse of the content: function showAns(inp){ var hide="#hideAns"+inp; var show="#showAns"+inp; var ansdiv ="#ans"+inp; $(hide).click(function(){ $(ansdiv).hide(500); $(hide).hide(); $(show).show(); }); $(show).click(function(){ $(ansdiv).show(500); $(hide).show(); $(show).hide(); }); } This function is called from following piece of generated HTML code: Q. No.1) This is test question 112 This is test answer 112 Q. No.2) This is test question 110 This is test answer 110 problem here is that I have to click thrice the image first time then only expand collapse works fine. Once I click the image twice after that expand collapse works fine. I don't know what I am doing wrong, any help will be highly appreciated. Thank you.
possible better answer: http://stackoverflow.com/a/24696115
has answer: http://stackoverflow.com/a/24696242
has comment: http://stackoverflow.com/comment/38294919
has answer: http://stackoverflow.com/a/24696133

http://stackoverflow.com/comment/38297782
type: Comment
has text: Thanks...seems to bring back something. However it's now my 'to' value +1 (9)
type: AnswerComment
comment on: http://stackoverflow.com/a/24697329
score: 0

http://stackoverflow.com/comment/38270915
comment on: http://stackoverflow.com/a/24682236
has text: Yes i must appreciate the way example has been done by poxelbits. & its pretty working well. no problem. but what if I change color and press below button? it give $diegest error which is wrong.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/24715839
has comment: http://stackoverflow.com/comment/38334771
upvote count: 0
has comment: http://stackoverflow.com/comment/38334629
has comment: http://stackoverflow.com/comment/38333762
has body: I have a file list, when the user double clicks a file, it is displayed in an editor, The problem is, after opening a javascript file, all bootstrap functions get undefined. UPDATE: function openFile(file){ var filename = file.getPath(); $.ajax({ url: "${fileStorageServiceBaseUrl}" + applicationId + "/files/"+ resType + filename, type: "GET", success: function(response) { editor.setFile(filename, response); } }); openResType = resType; $("#saveButton").prop("disabled",false); } After calling this function, bootstrap functions get undefined. I'm calling it from the console, not via events now.
has comment: http://stackoverflow.com/comment/38334292
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/38333650
has comment: http://stackoverflow.com/comment/38334247
has comment: http://stackoverflow.com/comment/38334050
has comment: http://stackoverflow.com/comment/38334473
has comment: http://stackoverflow.com/comment/38333790
has answer: http://stackoverflow.com/a/24716386
type: AnsweredQuestion
answer count: 1
has comment: http://stackoverflow.com/comment/38333591
favorite count: 0
type: Question
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/38334272
has comment: http://stackoverflow.com/comment/38334711
score: -1
accepted answer: http://stackoverflow.com/a/24716386
has comment: http://stackoverflow.com/comment/38334021
has title: jquery $.ajax automatically evaluates javascript file
has comment: http://stackoverflow.com/comment/38334817
downvote count: 1
has comment: http://stackoverflow.com/comment/38334367

date
tags question: http://stackoverflow.com/q/24743108
tag name: date
tags question: http://stackoverflow.com/q/24728598
tags question: http://stackoverflow.com/q/24713819
tags question: http://stackoverflow.com/q/24728783
tags question: http://stackoverflow.com/q/24666893
tags question: http://stackoverflow.com/q/24607756
tags question: http://stackoverflow.com/q/24707253
tags question: http://stackoverflow.com/q/24629434
tags question: http://stackoverflow.com/q/24588910
type: Tag
tags question: http://stackoverflow.com/q/24658187
tags question: http://stackoverflow.com/q/24674748
tags question: http://stackoverflow.com/q/24707665
tags question: http://stackoverflow.com/q/24629937
tags question: http://stackoverflow.com/q/24617816
tags question: http://stackoverflow.com/q/24650696
tags question: http://stackoverflow.com/q/24625839
tags question: http://stackoverflow.com/q/24720600
tags question: http://stackoverflow.com/q/24644786
tags question: http://stackoverflow.com/q/24632572
tags question: http://stackoverflow.com/q/24636976
tags question: http://stackoverflow.com/q/24609673
tags question: http://stackoverflow.com/q/24695593

http://stackoverflow.com/comment/38213402
type: AnswerComment
comment on: http://stackoverflow.com/a/24590321
has text: Oh, It was the console.log :) But it is impossible to only get the search word , if I type TE, only tags white tag TE shows up?, not all like skaTE/winTEr @Noble Mushtak
score: 0
type: Comment

http://stackoverflow.com/q/24733108
has title: Testing AngularJS Services using $q within Jasmine
tagged with: jasmine
has answer: http://stackoverflow.com/a/29305364
favorite count: 0
tagged with: promise
tagged with: angularjs
has answer: http://stackoverflow.com/a/29155612
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23131838
score: 2
downvote count: 0
has body: Angulars build in $q promise implementation makes it hard for me to create tests in my Jasmine testing environment. I build a simple service which only purpose is to open an IndexedDB database: var myApp = angular.module('myApp', []); myApp.service('idb', function ($q) { var dbName = 'TestDb'; this.open = function () { var deferred = $q.defer(); var request = indexedDB.open(dbName, 1); request.onsuccess = function () { deferred.resolve(); }; request.onerror = function () { deferred.reject(); }; return deferred.promise; }; }); Here is my test in Jasmine: describe('indexed db test', function () { var idbOpened = false; var idb, $rootScope; beforeEach(module('myApp')); beforeEach(inject(function (_idb_, _$rootScope_) { idb = _idb_; $rootScope = _$rootScope_; })); beforeEach(function (done) { idb.open().then( function () { idbOpened = true; }, function () { idbOpened = false; })['finally'](done); $rootScope.$digest(); }); it('checks if indexeddb is opened', function () { expect(idbOpened).toBeTruthy(); }); }); You can find a jsfiddle here The test fails with a timeout because the asynchronous callback for finally is not invoked. I understand I have to call $rootScope.$digest() after the promise is resolved because Angular puts the promise.resolve callbacks on the evalAsync queue. What I don't understand is how I can do this in my Testing environment. Obviously how I'm calling it is not the way to go.
type: Question
tagged with: indexeddb
tagged with: javascript
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/38375094
type: QuestionComment
has text: @Barmar - no I have not I do not know what that is.
comment on: http://stackoverflow.com/q/24706945
score: 0
type: Comment

http://stackoverflow.com/q/24747374
tagged with: forms
has title: Modal Notification Appear On Form Send, Foundation/Abide.js
has comment: http://stackoverflow.com/comment/38393835
type: Question
has comment: http://stackoverflow.com/comment/38538765
tagged with: javascript
has body: I'm doing something very similar to this site here. When you send the form that is in in the footer, a modal window appears upon successful sending that thanks the user for submitting a form. I've built a site in Foundation and am validating the fields using Abide.js. Everything was working this morning until I tried using different AJAX/jQuery methods to have a message appear on the same page where the form is instead of the modal. Now that I'm trying to do the modal, my form isn't working at all. Here's my form's HTML: PHP: $name = $_POST["name"]; $email = $_POST["email"]; $phone = $_POST["phone"]; $to = "example@email.com"; $subj = "The Rivers Quick Contact Request"; $mess = "The following person has filled out the quick contact form on The Rivers website: Name: $name Email: $email Phone: $phone "; $headers = "From: info@therivers.com" . "\r\n" . "CC:example@email.com"; $mailsend = mail($to,$subj,$mess,$headers); And ideally the line of JS that would help the modal appear when the form is sent, using a function as defined by Foundation here. $(document).ready(function() { $('#form-contact').on('valid.fndtn.abide', function() { $('.modal').css({'opacity':'1'}); }); }); It's my understanding that the Abide.js should be taking care of all the validation, and then the PHP file will send the form to the specified email. I'm having a hard time figuring out where to go from here now that I've broken it.
tagged with: ajax
score: 0
tagged with: zurb-foundation
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/24834462
tagged with: php

http://stackoverflow.com/q/24610266
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38134346
has body: I am trying to create a database handler class in javascript. I would like to call the class by simply using: var databaseHandler = new DatabaseHandler(); result = databaseHandler.getResult("SELECT * FROM login"); I have created the class and used a callback for the ajax function (so as to wait for the ajax result to be returned). But all I am still receiving "undefined" as my result. If I use console.log(a) inside of the onComplete function, I get an array of the intended results. (function(window){ //Database class function DatabaseHandler(){ //Query this.query = function(query, whenDone){ request = $.ajax({ url: "../optiMizeDashboards/php/DatabaseQuery.php", type: "POST", data: {query : query}, dataType: "JSON" }); request.done(function(output) { whenDone(output); }); request.fail(function(jqXHR, textStatus) { console.log(textStatus); }); }; //Get result this.getResult = function(query){ this.query(query, this.onComplete); }; //Ajax callback this.onComplete = function(a){ return a; }; } //Make available to global scope window.DatabaseHandler = DatabaseHandler; }(window)) My question is: Is this something to do with the variable scope, or the way that ajax works? I have read all the answers explaining that ajax is ASYNC and I thought I had handled that by using a callback function "onComplete" Any help on this topic would be greatly appreciated!
score: 0
has title: jQuery AJAX issue? Or JS OOP scope issue?
accepted answer: http://stackoverflow.com/a/24610386
type: Question
tagged with: oop
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/24610386

http://stackoverflow.com/comment/38165312
has text: Generally `self` is used as a reference to a parent object, so you know what object it references instead of depending on `this` e.g. `(function() { var self = this; var internalFunction = function() { self.hello(); }; }());` - I'm assuming that's what it is in this case
comment on: http://stackoverflow.com/a/24626221
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/38150081
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/24618099
has text: Why are you using a `mysql_` function -> `$search_string = mysql_real_escape_string($search_string);`. Since you are using PDO and do not have a `mysql_connect` this will not work.

http://stackoverflow.com/q/24617490
has answer: http://stackoverflow.com/a/24617634
answer count: 3
downvote count: 3
has comment: http://stackoverflow.com/comment/38148685
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/38148741
possible better answer: http://stackoverflow.com/a/24617634
upvote count: 0
has comment: http://stackoverflow.com/comment/38148702
score: -3
has comment: http://stackoverflow.com/comment/38173447
tagged with: php
tagged with: css
tagged with: href
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/24617664
has title: Allow user to add a new link to their website?
has answer: http://stackoverflow.com/a/24617591
accepted answer: http://stackoverflow.com/a/24617591
type: Question
has body: Question How could i allow a user to add a new link to an already existing list of links permanently. Preferably the new link would be written directly to the HTML document without the need for a database to store the links, if possible. I do not want to use a Content Management System like, WordPress as i feel this negates any possibility of learning how to do such tasks and breeds laziness. (My opinion) Background I am creating a website for someone, who i would like to be able to update parts of their website without my help. All they need to be able to do is add a new link to a current list of links on one web page. The page is protected and only accessible to them once a secure password is entered. This is how the links are displayed, all i would need is, for a new link to be appended to the bottom and saved permanently to the html page. Markup Clients Purple Gecko Events Plymouth Volksfest Moriaty Land of the Giants Betamax Haunt the Woods Mingle Music Agency
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/24703062
has comment: http://stackoverflow.com/comment/38316287
has body: Here is the best example I have of how to implement this. I assumed some stuff about your controller and factory. Note that you need to inject $q into your factory to use deferreds. This is how I do it in my app. http://jsfiddle.net/JimTheDev/2zLEp/ /* NOTE: make sure to inject $q into your factory before this. For the purposes of my example, let's assume your factory looks like this: */ app.factory('mySweetFactory', ['$q', function($q) { return { // You probably have a bunch of other methods like // this one in your factory. myothermethod: function(argument1, argument2) { /* some code here */ }, update: function (staffList) { // Create a new deferred object var deferred = $q.defer(); // get local last updated timestamp var lastUpdatedLocal = ""; for (i=0; i &lt; staffList.length; i++) { // get largest (most recent) timestamp if(staffList[i].entry_date &gt; lastUpdatedLocal) { lastUpdatedLocal = staffList[i].entry_date; } } // Make a call to the remote api $http.get('REMOTE_API_CALL').then(function(response) { // Get the remote last updated // time from the response var lastUpdatedRemote = response.data[0].entry_date; // Check if local or remote is larger // You probably need to modify this // depending on your datetime formatting. // I am assuming an epoch string. if(lastUpdatedRemote &gt; lastUpdatedLocal) { // Resolve the deferred and return // the data so that the controller can // use it to update the view deferred.resolve(response.data); } else { // Since we don't need to do anything, // reject the deferred deferred.reject(); }); // Return the promise from the deferred object // immediately. We will eventually either // resolve or reject it, but at the start, it // will be in a pending state. return deferred.promise; } }; }]); app.controller('mySweetController', ['mySweetFactory', function(mySweetFactory){ $scope.doUpdate = function() { mySweetFactory.update($scope.staffList).then(function(newStaffList) { // Promise was resolved. List needs updating! $scope.st…
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24694231
answers question: http://stackoverflow.com/q/24694231
upvote count: 2
type: AcceptedAnswer

conflict
tag name: conflict
tags question: http://stackoverflow.com/q/24726449
type: Tag

http://stackoverflow.com/a/24660323
has comment: http://stackoverflow.com/comment/70138872
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/38829842
has comment: http://stackoverflow.com/comment/57451398
has body: I don't think it guarantees the order of calling logger.log(res); Actually, it does. That statement is executed before the resolve call. Any suggestions? Lots. The most important is your use of the create-promise-manually antipattern - just do only promiseWhile(…, function() { return db.getUser(email) .then(function(res) { logger.log(res); count++; }); })… Second, that while function could be simplified a lot: var promiseWhile = Promise.method(function(condition, action) { if (!condition()) return; return action().then(promiseWhile.bind(null, condition, action)); }); Third, I would not use a while loop (with a closure variable) but a for loop: var promiseFor = Promise.method(function(condition, action, value) { if (!condition(value)) return value; return action(value).then(promiseFor.bind(null, condition, action)); }); promiseFor(function(count) { return count &lt; 10; }, function(count) { return db.getUser(email) .then(function(res) { logger.log(res); return ++count; }); }, 0).then(console.log.bind(console, 'all done'));
has comment: http://stackoverflow.com/comment/90238574
has comment: http://stackoverflow.com/comment/57465729
type: Answer
accepted answer of: http://stackoverflow.com/q/24660096
has comment: http://stackoverflow.com/comment/67244698
has comment: http://stackoverflow.com/comment/80039705
answers question: http://stackoverflow.com/q/24660096
has comment: http://stackoverflow.com/comment/67270615
score: 77
has comment: http://stackoverflow.com/comment/67265208
has comment: http://stackoverflow.com/comment/90240423
downvote count: 0
has comment: http://stackoverflow.com/comment/38843345
has comment: http://stackoverflow.com/comment/90238312
has comment: http://stackoverflow.com/comment/38844529
has comment: http://stackoverflow.com/comment/90240250
has comment: http://stackoverflow.com/comment/38845116
has comment: http://stackoverflow.com/comment/38229675
has comment: http://stackoverflow.com/comment/38845526
has comment: http://stackoverflow.com/comment/38846320
has comment: http://stackoverflow.com/comment/80041504
has comment: http://stackoverflow.com/comment/38844629
has comment: http://stackoverflow.com/comment/38812186
has comment: http://stackoverflow.com/comment/38844021
has comment: http://stackoverflow.com/comment/67244887
upvote count: 77
has comment: http://stackoverflow.com/comment/38845232

http://stackoverflow.com/comment/75965411
has text: hi! .. sorry how can set a [AllowAnonymous] API? .. so i mean ... to let some api to be open to non logged user ? .. thnx very much!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/24766157

http://stackoverflow.com/comment/38358918
comment on: http://stackoverflow.com/a/24725151
has text: If you have something like ` `, the browser notices that the DIV has been closed, so it automatically closes everything inside it. If you want to suggest fixes to other bugs, they should be in comments, since they don't directly address the question.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/38221082
comment on: http://stackoverflow.com/q/24655983
has text: Always use a developer tool like [firebug](https://getfirebug.com/) to debug your code. This way you see `exactly` was it is sent and where.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/38332313
type: Comment
type: QuestionComment
has text: @user3799981 Above code will trigger every 10 sec. When exactly do you want to refresh the data..? dumping code blocks in comments is highly discouraged. Please edit the question and update more specific info to get a proper answer...
score: 0
comment on: http://stackoverflow.com/q/24712698

http://stackoverflow.com/a/24623206
has comment: http://stackoverflow.com/comment/38159795
has comment: http://stackoverflow.com/comment/38159817
has comment: http://stackoverflow.com/comment/38159777
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/24623179
has comment: http://stackoverflow.com/comment/38159764
has comment: http://stackoverflow.com/comment/38160087
upvote count: 2
has comment: http://stackoverflow.com/comment/38159846
type: Answer
has body: You can simply use add to create a new collection containing the elements from both collections. For instance: tr = tr.add(tr2); After this, tr would now contain both rows. You could then append them at once: $("#someTable").append(tr); // add all rows contained in tr
score: 2
answers question: http://stackoverflow.com/q/24623179

http://stackoverflow.com/comment/38272677
has text: I am getting object{}
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/24683569

http://stackoverflow.com/comment/38180132
has text: Ah it's because you had two `new` where you declare the Vector class.
type: Comment
comment on: http://stackoverflow.com/a/24634031
score: 0
type: AnswerComment

http://stackoverflow.com/a/24737259
type: Answer
score: 0
answers question: http://stackoverflow.com/q/24679937
has body: From the other answers I have found on the Internet it seems like you don't need the '\' before and after the month and the day. See here: UIAPickerWheel.selectValue() not working for text values within UIDatePicker I've been working a lot with UI Automation lately but I haven't had to use a picker yet so I may be wrong. I'll look into it a little more while I wait for my tests to finish! This may be of help too: UI Automation Testing: How do I select UIAPickerWheel values? What seems to be the case is that the UIADatePicker removes some functionality of the UIAPickerWheel class because of how many possibilities there can be. So if directly picking the date doesn't work use the method of tapWithOffset and then check the value.

http://stackoverflow.com/comment/38280521
type: QuestionComment
has text: Although it does answer the question, a solution could be to replace ng-show="show" with an ng-if.
comment on: http://stackoverflow.com/q/24687702
score: 0
type: Comment

http://stackoverflow.com/q/24702883
tagged with: javascript
linked to: http://stackoverflow.com/q/5347839
has comment: http://stackoverflow.com/comment/38309181
upvote count: 2
answer count: 2
duplicate of: http://stackoverflow.com/q/14878638
has body: I have a collection of divs with id of 0, 1, 2, 3, n. They are generated in php in ascending order. I want to make a button to re-arrange them so they display in descending order using jquery. I have absolutely no clue how to do this. Can anyone refer me to an article or something? Code: ... ... ... ... ... ... I want a button to make it: .... ... ... ... ... ...
tagged with: jquery
has comment: http://stackoverflow.com/comment/38309272
favorite count: 0
has answer: http://stackoverflow.com/a/24702970
has title: jQuery - Button to arrange elements by id in descending order
has comment: http://stackoverflow.com/comment/38309335
score: 2
linked to: http://stackoverflow.com/q/14878638
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/24703069
accepted answer: http://stackoverflow.com/a/24703069
type: Question
possible better answer: http://stackoverflow.com/a/24702970

http://stackoverflow.com/comment/38308068
type: Comment
comment on: http://stackoverflow.com/a/24689214
has text: When I install this I get an error while fetching the plugin. I don't think it's the right way?
score: 0
type: AnswerComment

http://stackoverflow.com/a/27153102
score: 1
has body: I had same error, "Failed to get composer template data.". I believe my path to Images was blacklisted by Facebook. Workaround was to create virtual path that points to Images folder. Then I could reference /Images with /OGImages virtual directory. Then I no longer received the error.
downvote count: 0
answers question: http://stackoverflow.com/q/24636903
type: Answer
upvote count: 1

http://stackoverflow.com/q/24696976
answer count: 1
has comment: http://stackoverflow.com/comment/38297123
has comment: http://stackoverflow.com/comment/38298195
favorite count: 0
has answer: http://stackoverflow.com/a/24698324
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40569752
has comment: http://stackoverflow.com/comment/38297686
tagged with: dojo
has comment: http://stackoverflow.com/comment/38297634
has title: menu items not working
has comment: http://stackoverflow.com/comment/40556179
has comment: http://stackoverflow.com/comment/38299869
has comment: http://stackoverflow.com/comment/38301344
has comment: http://stackoverflow.com/comment/38298379
has body: I have created menu and submenu items of my application using DOJO framework. I can able to click the menu items and navigate to submenu items in chrome but in IE and firefox i could not able to click/choose the submenu item, when i click on main menu below is the error i'm seeing on the browser console when i run the application.Even chrome is showing the error message but still i can able to see the submenu items. Error message: TypeError: this._openPopup is not a function this._openPopup(); code for menu.js: ..... dijit._MenuBase.prototype.onItemHover = function(item){ this.focusChild(item); if(this.focusedChild.popup &amp;&amp; !this.focusedChild.disabled){ this._openPopup(); //at this line it is showing the error. } }; ... Please suggest, how i can resolve this?
has comment: http://stackoverflow.com/comment/38300766
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/38300555
has comment: http://stackoverflow.com/comment/38297975
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/38298397
has comment: http://stackoverflow.com/comment/38299534
upvote count: 0

http://stackoverflow.com/comment/38404297
type: Comment
score: 1
comment on: http://stackoverflow.com/q/24699086
has text: You posted more or less the same question on the Ember Simple Auth issue tracker and got some help there already. Is this solved? If so, could you add the answer here and mark it as solved?
type: QuestionComment

http://stackoverflow.com/comment/38149991
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/24617839
has text: The simplest way that I've run into is to create a new authorization attribute for ajax requests that returns a status upon failure, then in your javascript, handle the response. See [this link](http://stackoverflow.com/questions/5258721/authorize-attribute-and-jquery-ajax-in-asp-net-mvc/11085769#11085769) for details.
score: 0

http://stackoverflow.com/comment/38184622
type: QuestionComment
comment on: http://stackoverflow.com/q/24636451
score: 0
has text: how would you "send out an event"? and what would listen for it?
type: Comment

http://stackoverflow.com/a/24702105
answers question: http://stackoverflow.com/q/24701915
score: 5
upvote count: 5
type: Answer
downvote count: 0
has body: More.. More.. More.. Paragraph 1 Paragraph 2 Paragraph 3 JS: $(document).ready(function () { $(".button").click(function(){ $("#text" + $(this).attr('t')).toggle(); }); }); Fiddle: http://jsfiddle.net/pgZWA/

http://stackoverflow.com/comment/38231129
type: Comment
has text: You can use this to replace all of the `&nbsp` characters in the text: `$('p').text($('p').text().replace(new RegExp(String.fromCharCode(160), "g"), ' '))`
comment on: http://stackoverflow.com/a/24659038
score: 0
type: AnswerComment

http://stackoverflow.com/q/24599361
type: Question
has comment: http://stackoverflow.com/comment/38112945
has title: Updating inline doesn't work with symbols such as +
tagged with: javascript
answer count: 1
downvote count: 0
has body: I've got the following table on a webpage: Name Rank MOS Tag MOSTs Prom. Date DI CMO MCRC Medals Leave <?php $rank = 'O-10'; $result->execute(); while($row = $result->fetch()) { ?> <td id="habbo_name:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['habbo_name']);?> <td id="rank:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['rank']);?> <td id="rating:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['rating']);?> <td id="tag:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['tag']);?> <td id="asts:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['asts']);?> <td id="promotion_date:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['promotion_date']);?> <td id="rdc_grade:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['rdc_grade']);?> <td id="cnl_trainings:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['cnl_trainings']);?> <td id="mcrc:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['mcrc']);?> <td id="medals:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['medals']);?> <td id="leave:<?php echo htmlspecialchars($row['user_id']); ?>" contenteditable="true"><?php echo htmlspecialchars($row['leave']);?> <?php } ?> I have this code which sends a request to ajax.php whenever a td is clicked: ajax.php: <?php include 'functions/user.php'; if(!empty($_POST)) { foreach($_POST as $field_name => $val) { $field_userid = strip_tags(trim($field_name)); $split_data = explode(':', $field_userid); $user_id = $split_data[1…
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/24599877
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/38112985
tagged with: php
type: AnsweredQuestion
tagged with: mysql
upvote count: 1
accepted answer: http://stackoverflow.com/a/24599877

http://stackoverflow.com/a/24738268
has comment: http://stackoverflow.com/comment/38376639
has comment: http://stackoverflow.com/comment/38377026
upvote count: 0
has body: You forgot dataType ajax param $.ajax({ url: domain + "/login/login_android_here/", type: "POST", data: data, dataType : 'json', //dataType param IS MISSING success: function (response) { alert("success"); window.location = 'file:///android_asset/www/posts.html'; }, error: function () { alert('some error in login'); } });
answers question: http://stackoverflow.com/q/24738133
type: Answer
downvote count: 1
score: -1

http://stackoverflow.com/q/24735722
answer count: 1
tagged with: javascript
tagged with: jquery
has title: CSS class missing on angular view
has answer: http://stackoverflow.com/a/24735801
tagged with: css
accepted answer: http://stackoverflow.com/a/24735801
tagged with: angularjs
score: 0
has body: index.html: myview.html: Name Product {{deal.name}} {{deal.product}} script.js: $(document).ready(function($) { $(".clickableRow").click(function() { console.log("click"); }); }); // does nothing console.log($(".clickableRow").length) // returns 0 I want to do some work when the user clicks on the clickableRows rows. Thanks
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/38372170

http://stackoverflow.com/comment/43964012
type: AnswerComment
type: Comment
has text: @BrockAdams: My understanding is that the code above always works, no matter which `@grant`s are enabled. The important part of my question is that this is the official solution.
comment on: http://stackoverflow.com/a/27733631
score: 0

http://stackoverflow.com/comment/38135071
type: Comment
comment on: http://stackoverflow.com/q/24610310
score: 1
has text: how can i open the file browser programatically to select a file? The widget button will be hidden.
type: QuestionComment

http://stackoverflow.com/q/24706945
accepted answer: http://stackoverflow.com/a/24707211
has comment: http://stackoverflow.com/comment/38377312
has comment: http://stackoverflow.com/comment/38316938
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/38316648
has title: Chrome appears to report wrong line for error
has comment: http://stackoverflow.com/comment/38316720
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/38375094
has comment: http://stackoverflow.com/comment/38316963
has comment: http://stackoverflow.com/comment/38317103
upvote count: 3
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/38316935
has comment: http://stackoverflow.com/comment/38381079
type: Question
has answer: http://stackoverflow.com/a/24707211
tagged with: debugging
score: 3
has comment: http://stackoverflow.com/comment/38316680
has comment: http://stackoverflow.com/comment/38317063
has comment: http://stackoverflow.com/comment/38316995
has body: I'm getting an error on line 975 ( this is what the console reports ), but when I look at the code it is clearly not 975. Cannot read property E of undefined: Here is a screenshot: Here is the screenshot showing the disparity for ...

http://stackoverflow.com/a/24649911
accepted answer of: http://stackoverflow.com/q/24649846
type: Answer
score: 1
upvote count: 1
has body: Is this what you're looking for? var myregex = /#{id:\d+}/g; var theMatchObject = myregex.exec(yourString); while (theMatchObject != null) { // do something with the match: // matched text: theMatchObject[0] theMatchObject = myregex.exec(yourString); } Explanation #{id: matches literal chars \d+ matches one or more ASCII digits } matches a literal char the code iterates through the matches
answers question: http://stackoverflow.com/q/24649846
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/38173887
score: 0
comment on: http://stackoverflow.com/q/24626316
type: Comment
has text: please create a fiddle of your code !
type: QuestionComment