http://stackoverflow.com/q/27181698
type: UnansweredQuestion
type: Question
has body: I'm trying to create some front-end tests for a site which accesses the local camera. Is it possible to mock accepting or denying the local camera in a protractor test? I've already got my unit tests which can check the state of the app which changes depending on if the camera has been accepted or not, but I am unable to check that the correct UI is displayed based on the status of camera permission. Is mocking getUserMedia the best way to manage that? Or is there another way? Note: I am not using angular, I'm using mercury.js
favorite count: 0
score: 4
upvote count: 4
tagged with: mocking
has title: testing browser media events with protractor
tagged with: protractor
answer count: 0
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27211553
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27211445
type: Answer
has body: Try this instead: Using AngularJS to create a simple Controller - http://jsfiddle.net/rv7r7nv7/
score: 3

http://stackoverflow.com/comment/42929713
type: QuestionComment
score: 0
has text: "java.lang.IllegalArgumentException: id to load is required for loading" would be the first exception I would try to tackle. This simply shows incorrect use of the api function. You are not passing in the required id to load.
comment on: http://stackoverflow.com/q/27225606
type: Comment

http://stackoverflow.com/q/27250896
has answer: http://stackoverflow.com/a/27250964
downvote count: 0
has body: How to using javascript scrollIntoView() go to id , with middle of page ? this code will go to id xxx at top page. document.getElementById("xxx").scrollIntoView() But i want to go to id xxx at middle page, Can i do that with scrollIntoView()
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27250960
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42975962
tagged with: http://stackoverflow.com/tag/html
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42975923
has title: How to using javascript scrollIntoView() go to id , with middle of page?
has comment: http://stackoverflow.com/comment/42976236
answer count: 2

http://stackoverflow.com/comment/43072506
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27288422
has text: I tried your code. It works! Well, it kinda works. It does write to the file the correct data, however, it does not get the data again once it's written and pull it back into the page. I suspect I'll have to write a separate function to do that. Thank you :-)

http://stackoverflow.com/q/27255003
type: AnsweredQuestion
upvote count: 0
has body: How to draw my butterfly animation : http://jsfiddle.net/38pnog5s/4/ with movement like this picture : I want to draw my butterfly moving around the canvas like the picture attached but the butterfly still on flitting motion. I've try to put a different variable, 1. Variable for flitting motion, 2. variable for bezier curve move. Then i put my 2nd variable inside of 1st variable But it moved so weird. This is the code how butterfly moving random with flitting motion : if (x &gt;= 0) { if (x &lt;= 450) { if (y &gt;= 0) { if (y &lt;= 450) { if (Math.floor(Math.random() * 4) == 0) { x = x + Math.random() + 15; } if (Math.floor(Math.random() * 4) == 2) { y = y + Math.random() + 15; } if (Math.floor(Math.random() * 4) == 1) { x = x - Math.random() - 15; } if (Math.floor(Math.random() * 4) == 3) { y = y - Math.random() - 15; } if (x &lt; 0) { x = 0; } if (y &lt; 0) { y = 0; } if (x &gt; 450) { x = 450; } if (y &gt; 450) { y = 450; } randomly[0] = x; randomly[1] = y;
has comment: http://stackoverflow.com/comment/42985554
type: Question
has comment: http://stackoverflow.com/comment/42983990
answer count: 1
tagged with: javascript
score: -1
has title: How to draw animation with bezier curve track
accepted answer: http://stackoverflow.com/a/27280104
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27280104

http://stackoverflow.com/comment/43158408
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27312431
has text: please try bind method instead of live method. If it didnt work I will give u a solution on javascript and jquery
type: AnswerComment

http://stackoverflow.com/a/65858432
type: Answer
has body: Async state management (Playground) The following solution allows for async state management and can be used for HTTP related requirements if implemented correctly. Requirements Only re-render elements consuming the observable. Automatically subscribe and unsubscribe from the observable. Support multiple and joint observables. Provide a loading state Simple and easy implementation Expected behaviour return ( &lt;Async select={[names$]}&gt; {result =&gt; &lt;div&gt;{result}&lt;/div&gt;} &lt;/Async&gt; ); The provided example above will subscribe to the observable names$. The content/children of the Async component will re-render when next is fired on the observable, not causing the current component to re-render. Async Component export type AsyncProps&lt;T extends any[]&gt; = { select: { [K in keyof T]: Observable&lt;T[K]&gt; }, children: (result?: any[]) =&gt; JSX.Element }; export type AsyncState = { result?: any[] }; export default class Async&lt;T extends any[]&gt; extends Component&lt;AsyncProps&lt;T&gt;, AsyncState&gt; { private subscription!: Subscription; constructor(props: AsyncProps&lt;T&gt;) { super(props); this.state = {}; } componentDidMount() { this.subscription = combineLatest(this.props.select) .subscribe(result =&gt; this.setState({ result: result as T })) } componentWillUnmount() { this.subscription.unsubscribe(); } render() { return ( &lt;Fragment&gt; {this.props.children(this.state.result)} &lt;/Fragment&gt; ); } }
answers question: http://stackoverflow.com/q/27192621
score: 0

http://stackoverflow.com/comment/43018052
score: 0
has text: You installed their browser plugin that allows it.
comment on: http://stackoverflow.com/q/27274349
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43069106
type: AnswerComment
comment on: http://stackoverflow.com/a/27299939
score: 0
has text: Thanks, good to hear it works - I didn't make the effort to test it :-)
type: Comment

http://stackoverflow.com/comment/42840964
comment on: http://stackoverflow.com/q/27175561
has text: Isn't `&` a invalid char for the none query part of the url? So the behavior how a browser would handle `/a&amp;b` is somehow undefined?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/27177348
answer count: 2
has comment: http://stackoverflow.com/comment/42917111
has comment: http://stackoverflow.com/comment/42948610
has answer: http://stackoverflow.com/a/27233148
has comment: http://stackoverflow.com/comment/42917389
tagged with: javascript
has title: Is an svg element in convex hull (path)?
has comment: http://stackoverflow.com/comment/42916761
has comment: http://stackoverflow.com/comment/42844238
linked to: http://stackoverflow.com/q/442404
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
accepted answer: http://stackoverflow.com/a/27233148
tagged with: d3.js
has comment: http://stackoverflow.com/comment/42916322
type: Question
possible better answer: http://stackoverflow.com/a/27248859
has answer: http://stackoverflow.com/a/27248859
score: 0
has body: I have an svg path which I can draw. With d3js I calculate a convex hull around the path with d3.geom.hull(...). Now I have some svg objects like nodes (svg:circle) and I want to find out whether the node is in the hull or not. How can I realize that? Here is a picture from my svg view: EDIT: My goal is to the node elements in the hull (which are within the path), not only at the edge of the path.

http://stackoverflow.com/q/27248433
has comment: http://stackoverflow.com/comment/43098524
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43020336
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42971645
type: Question
has comment: http://stackoverflow.com/comment/43475499
has comment: http://stackoverflow.com/comment/43084168
has title: Google Website Translator: TypeError when clicking "Contribute" button
has body: We use the standard Google Website Translator gadget on our site http://ut.no. The "Contribute a better translation" feature has stopped working. When you click on the "Contribute" button, you get this javascript error: TypeError: undefined is not an object (evaluating 'a[hd][H]') in "element_main.js" injected by Google. This worked fine several weeks ago. Are anyone else having this problem, or is it only us? After some testing, I fond out that it's the meta tag from Google that's part of the problem. Removing the "google-translate-customization" meta tag makes the suggestions work, but the suggestion never gets delivered to our Website Translator page.
tagged with: javascript
has comment: http://stackoverflow.com/comment/44986083
tagged with: google-translate
has comment: http://stackoverflow.com/comment/42993039
has comment: http://stackoverflow.com/comment/43014440

http://stackoverflow.com/comment/42997794
comment on: http://stackoverflow.com/a/27261098
type: Comment
has text: @JonathanBechtel No, it's because you probably have the ` ` tag in the document's ` `. See the flagged duplicate question for details
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42987524
type: QuestionComment
comment on: http://stackoverflow.com/q/27256877
has text: stopPropogation is designed to stop normal functioning (i.e. anchor will navigate to the href address). This does not stop other code added via some form of jquery event handling.
score: 0
type: Comment

http://stackoverflow.com/comment/42821751
comment on: http://stackoverflow.com/q/27164595
type: Comment
type: QuestionComment
has text: Toggle other class and id too.. $('.upfrm').toggle(); $('#submit').toggle();
score: 1

http://stackoverflow.com/q/27235580
has body: As an exercise in learning js, I am building a color picker plugin for jQuery. I have a bootstrap modal that is displayed (Click Me). When a color is selected in the modal I would like to set the button (the button that opened the modal) background to the button that was clicked in the modal. I can't figure out how to access the parent without resorting to using unique id's or any other bootstrap functionality. Here's what I have so far (sorry, couldnt get jsfiddle to load) plugin code: (function( $ ) { "use strict"; $.fn.colorpicker = function(options) { var opts = $.extend( {}, $.fn.colorpicker.defaults, options ); var colorContainer = $('&lt;ul/&gt;').attr('id', 'container'); $(opts.colors).each( function( index) { colorContainer.append('&lt;button style="background-color: ' +this+ ' "&gt; &amp;nbsp; &lt;/button&gt;'); }); var $modalHtml = $('&lt;div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"&gt; '+ '&lt;div class="modal-dialog modal-sm"&gt;' + '&lt;div class="modal-content" id=modal-colors&gt; ' + '&lt;/div&gt; ' + '&lt;/div&gt; ' + '&lt;/div&gt;'); $modalHtml.find('#modal-colors').append(colorContainer); $modalHtml.on('click', 'button' , function(){opts.onChanged($(this).attr('style'));}) this.parent().append($modalHtml); return this.each(function(index){ $(this).attr("id","color-picker-" + index); $(this).attr("data-toggle","modal"); $(this).attr("data-target",".bs-example-modal-sm"); }); }; }( jQuery )); $.fn.colorpicker.defaults = { colors : ["#000000", "#1A0000", "#330000", "#4C0000", "#660000", "#800000", "#990000"], onChanged: function(rgb){} }; and is called thus: &lt;script type="text/javascript"&gt; $( ".colorpicker" ).colorpicker({onChanged:function(color){ console.log(color) }}); &lt;/script&gt; http://joe-riggs.com/color/ Any other code criticisms welcome as well, thanks!
score: 0
accepted answer: http://stackoverflow.com/a/27236566
answer count: 1
tagged with: javascript
tagged with: jquery-plugins
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/27236566
has title: pass data back to a jQuery Plugin's caller element
type: Question
tagged with: twitter-bootstrap

http://stackoverflow.com/a/27295909
type: Answer
has comment: http://stackoverflow.com/comment/43058102
has body: Just load your file to an array. &lt;?php $file = file_get_contents('file.txt'); $fileArray = explode("\n",$file); alternatively: &lt;?php $file = fopen('file.txt', 'r'); $fileArray = array(); while (($line = fgets($file)) !== false) { $fileArray[] = $line; } both gives you array with file lines. After that you just have to sort arrays :) EDIT: It's really not nice way to do it. But should work if $kategorie is pure text (no html tags) and every line starts with &lt;tr&gt; html tag: &lt;?php $file = fopen('file.txt', 'r'); $fileArray = array(); // file to array and prepare for sorting while (($line = fgets($file)) !== false) { $pat = '~&lt;td&gt;([^&lt;]*)&lt;/td&gt;~Ui'; if (preg_match($pat,$line,$matches)) { $rep = '&lt;td&gt;{{TMP}}&lt;/td&gt;'; $line = $matches[1].preg_replace($pat,$rep,$line); } $fileArray[] = $line; } // do sorting on $fileArray alphabetically as categories are at beggining of elements // revert changes $fileArrayBack = array(); foreach ($fileArray as $line) { $pat = '~^([^&lt;]*)&lt;tr&gt;~Ui'; if (preg_match($pat,$line,$matches)) { $rep = '&lt;tr&gt;'; $line = preg_replace($pat,$rep,$line); $line = str_replace('{{TMP}}',$matches[1],$line); } $fileArrayBack[] = $line; } $fileArray = $fileArrayBack; unset($fileArrayBack); // enjoy sorted $fileArray table; to get back to string use $string = implode("\n",$fileArray);
has comment: http://stackoverflow.com/comment/43067395
has comment: http://stackoverflow.com/comment/43057580
score: 0
has comment: http://stackoverflow.com/comment/43058351
has comment: http://stackoverflow.com/comment/43096353
answers question: http://stackoverflow.com/q/27295775
has comment: http://stackoverflow.com/comment/43087253

http://stackoverflow.com/a/27166115
answers question: http://stackoverflow.com/q/27166007
has body: you can do this: ele.style.opacity = "0.2";// some desired value but string if for all browsers. for more info see this post:Setting opacity of html elements in different browsers
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/27280461
linked to: http://stackoverflow.com/q/30028615
tagged with: javascript
has answer: http://stackoverflow.com/a/78401777
has answer: http://stackoverflow.com/a/49902200
has answer: http://stackoverflow.com/a/35244490
has comment: http://stackoverflow.com/comment/56977304
downvote count: 0
possible better answer: http://stackoverflow.com/a/49902200
accepted answer: http://stackoverflow.com/a/28333757
favorite count: 0
has answer: http://stackoverflow.com/a/27280810
linked to: http://stackoverflow.com/q/3468154
has answer: http://stackoverflow.com/a/68876129
has answer: http://stackoverflow.com/a/41635462
has answer: http://stackoverflow.com/a/73166363
linked to: http://stackoverflow.com/q/33341027
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/34616017
answer count: 10
has title: Prevent Chrome from prompting to save password from input box?
has comment: http://stackoverflow.com/comment/43029726
type: AnsweredQuestion
score: 17
tagged with: google-chrome
upvote count: 17
type: Question
has answer: http://stackoverflow.com/a/28333757
has answer: http://stackoverflow.com/a/54567557
linked to: http://stackoverflow.com/q/12374442
has body: Chrome was recently updated with an annoying popup that comes down from an icon in the address bar and prompts to save a password on the page when the user submits the form. There's no other input box on this page, and no other browser prompts to save this password, so I don't know why Chrome does. It is a password, therefore it shouldn't be visible as plain text in the input box, but it's not a password that should ever be saved - it's not login credentials. It's actually quite important the user of the computer does not know this password - someone else must enter it in for them - so if the browser saves it that would be bad. How can you prevent Chrome (and all browsers) from prompting to save this password? Password: ");

http://stackoverflow.com/q/27304281
favorite count: 0
has body: Currently, the code below unfolds the DIVs every time the user clicks on a menu item (if he clicks several time on the same link it will fold and unfold the same number of times, but it never stays folded/closed). What I would like is that when the user clicks a second time on the same menu item link, the DIV gets folded and stays like this. Like on this website Edit: I realize the above might not be clear, so to summarize : Current process: One click on a navigation menu link opens (unfolds) the associated DIV One more click on the same navigation link hides (folds) the DIV then reopens it automatically Desired new process: One click on a navigation menu link opens (unfolds) the associated DIV One more click on the same navigation link hides (folds) the DIV and that's it. The DIV stays folded until the user clicks again on the same link, or on another menu items. How could I achieve that? Many thanks See http://jsfiddle.net/u3qtt6fo/5/ JS: $("a").click(function() { var page = $(this).data("page"); var active = $(".fold.active"); // if there is visible fold element on page (user already clicked at least once on link) if(active.length) { $(".fold.active") .animate({ width: "0" }, 200 ) .animate({ height: "0" }, 200, function() { // this happens after above animations are complete $(this).removeClass("active") $("#"+page) .addClass("active") .animate({ height: "500px" }, 1000, 'linear' ) .animate({ width: "500px" }, 400,'linear' ) }) // clicking for the first time } else { $("#"+page) .addClass("active") .animate({ height: "500px" }, 1000,'linear' ) .animate({ width: "500px" }, 400,'linear' ) } }); HTML Div menu item 1 Div menu item 2 Div menu item 3 Div menu item 4 Menu item 1 Menu item 2 Menu item 3 Menu item 4 CSS: .fold { display: none; width: 0; height: 0; } .fold.active { display: inline-block; } #fold1 { border: solid 5px #bada55; background: red; } #fold2 { border: solid 5px #fed900; background: aqua; } #fold3 { border: solid 5px #223322; background: green; } …
has answer: http://stackoverflow.com/a/27304439
upvote count: 1
tagged with: css
type: AnsweredQuestion
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/27304439
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: DIV folding/unfolding with javascript when clicking on navigation menu links
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27240623
score: 0
answer count: 3
has title: Is there way to make two HTML ID's link to one javascript function?
has comment: http://stackoverflow.com/comment/42957716
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27240640
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27240640
has answer: http://stackoverflow.com/a/27240642
type: Question
has body: I have two tables that need to have different IDs or they will not work. I'm using 3rd party data table code that uses the ID to differentiate between the different tables in the browser. &lt;table id="promo" class="display"&gt; &lt;table id="official" class="display"&gt; But I need to them to both link to the same script function. As you can see below, I have one for #promo and one for #official but they are both using the exact same code: $(document).ready(function() { $('#promo').DataTable( { // does a TON of stuff here } ); $('#official').DataTable( { // does a TON of stuff here } ); Is there a way to make both tables link to the same code in a script?
has answer: http://stackoverflow.com/a/27240689
possible better answer: http://stackoverflow.com/a/27240642
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/43069702
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27303075
has text: @rfornal I tried the setTimeOut() and it got the html, but it still doesn't work with .text() and .val(), and I tried both .text() and .val() with $('.f_hidden_p a') to no avail
score: 0

http://stackoverflow.com/q/27291373
has answer: http://stackoverflow.com/a/27293114
has answer: http://stackoverflow.com/a/27292184
favorite count: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27293114
accepted answer: http://stackoverflow.com/a/27292184
upvote count: 1
type: Question
tagged with: forms
has body: Let's say I've got a form like this: &lt;form id="formid" action="?a=do" method="POST" onChange="doSomething();&gt; &lt;input type="radio" name="buttonGroup_A[1]" value="1"&gt; &lt;input type="radio" name="buttonGroup_A[1]" value="3"&gt; &lt;input type="radio" name="buttonGroup_A[1]" value="2"&gt; &lt;input type="radio" name="buttonGroup_A[2]" value="1"&gt; &lt;input type="radio" name="buttonGroup_A[2]" value="3"&gt; &lt;input type="radio" name="buttonGroup_A[2]" value="2"&gt; &lt;input type="radio" name="buttonGroup_B[1]" value="1"&gt; &lt;input type="radio" name="buttonGroup_B[1]" value="3"&gt; &lt;input type="radio" name="buttonGroup_B[1]" value="2"&gt; &lt;input type="radio" name="buttonGroup_B[2]" value="1"&gt; &lt;input type="radio" name="buttonGroup_B[2]" value="3"&gt; &lt;input type="radio" name="buttonGroup_B[2]" value="2"&gt; &lt;input type="radio" name="buttonGroup_B[3]" value="1"&gt; &lt;input type="radio" name="buttonGroup_B[3]" value="3"&gt; &lt;input type="radio" name="buttonGroup_B[3]" value="2"&gt; &lt;/form&gt; The number of groups (and their name) is unknown. Now I want to forward that data to a soap interface. However, to do so I need an array of 1. the groups and 2. of the selected values: Result should be something like array ( "buttonGroup_A" =&gt; array( "1" =&gt; 2, "2" =&gt; 3 ), "buttonGroup_B" =&gt; array( "1" =&gt; 1, "2" =&gt; 3, "3" =&gt; 2 ) ) What I'm basically looking for is the function doSomething() function doSomething() { var resultArray; // Clever magic happens here return resultArray; } Sidenotes: The index of the buttonGroup is an UID of an entity If needed the available (or expected) group names (like buttonGroup_A) could be loaded via a soap interface
answer count: 2
has title: Get a Radio Button Value Array with JS
tagged with: arrays
downvote count: 0
tagged with: javascript
score: 1

http://stackoverflow.com/comment/42825017
type: AnswerComment
score: 0
has text: @Enzey, I used simple implementation to make case clear to those unfamiliar with Angular
type: Comment
comment on: http://stackoverflow.com/a/27165938

http://stackoverflow.com/comment/42976118
has text: Remarkable how difficult it is to build something that gives the user complete freedom over font size. This means that what I'm trying to do is impossible? I can't ask CKEditor what the fontsize is (so as to show it in a input field for him to edit). Am I correct?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27249156
type: Comment

http://stackoverflow.com/q/27311658
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43084247
has comment: http://stackoverflow.com/comment/43084328
score: 0
has answer: http://stackoverflow.com/a/27311966
accepted answer: http://stackoverflow.com/a/27311966
answer count: 1
has title: Set data to object property
has body: I've got a problem and I don't know how to get further. I have something like this. function Paginator() { this.currentPage = 1; }; Paginator.prototype.getCurrentPage = function() { return this.currentPage; }; Paginator.prototype.getNextPage = function () { this.currentPage++; return this.getCurrentPage(); }; Paginator.prototype.getPreviousPage = function () { this.currentPage--; return this.getCurrentPage(); }; Paginator.prototype.setCurrentPage = function (page) { this.currentPage = page; return this.getCurrentPage(); }; Paginator.prototype.renderPage = function (page, data) { this.currentPage = page; this.pageList = []; for(i = 0; i < Math.ceil(75/12); i++) { this.pageList.push([i, (i-1)*12, i*12]); } for(i=this.pageList[page][1]; i < this.pageList[page][2]; i++) { var tmpl = " " + data[i].title + " " + data[i].timestamp + " "; $(".video-container").append(tmpl); } }; This is my paginator object. When I call paginator.getCurrentPage(); it will return 1, because that's the default value. But, if I call renderPage(3, data); it should render the page 3 with data for page 3, and its working. Problem is that this render function is called in another function that is a callback for an ajax function: Loader.prototype.load = function (url, callback, from, to) { //load JSON from url var xhr = new XMLHttpRequest(); var self = this; xhr.onreadystatechange = ensureReadiness.bind(self); function ensureReadiness() { if (xhr.readyState < 4) { return; } if (xhr.status !== 200) { return; } // all is well if (xhr.readyState === 4) { var JSONObject = JSON.parse(xhr.responseText); (to) == "all" ? to = JSONObject.length : to; callback(JSONObject, from, to); } } xhr.open('GET', url, true); xhr.send(''); }; Cache.prototype.load = function(data, from, to) { this.data = data; paginator.renderPage(3, data); }; Everything is working, it loads the right data and display them, but on the bottom of the script I have: cache = new Cache(); paginator = new Paginator(); loader = new Loader(); loa…
has comment: http://stackoverflow.com/comment/43084434
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43084473
type: Question
has comment: http://stackoverflow.com/comment/43084395
has comment: http://stackoverflow.com/comment/43084097
tagged with: pagination

http://stackoverflow.com/comment/42831954
score: 0
type: Comment
has text: `s/modifier/flag/` :) Its called flags: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
comment on: http://stackoverflow.com/a/27170638
type: AnswerComment

http://stackoverflow.com/a/27305735
has comment: http://stackoverflow.com/comment/56962608
upvote count: 54
accepted answer of: http://stackoverflow.com/q/27211881
has body: To fix your ul to the top when it hits the top of the page on scroll, you can put a directive on it that checks for the window's scrollTop() exceeding the ul element's offset top. When that occurs, the directive can just add a class to the element that fixes it to the top. So your ul markup would look like this, with new directive set-class-when-at-top on it: &lt;ul class="nav nav-justified" set-class-when-at-top="fix-to-top"&gt; That directive would add the CSS class fix-to-top to the element when the element hits the top of the page. The directive definition would look like this: app.directive('setClassWhenAtTop', function ($window) { var $win = angular.element($window); // wrap window object as jQuery object return { restrict: 'A', link: function (scope, element, attrs) { var topClass = attrs.setClassWhenAtTop, // get CSS class from directive's attribute value offsetTop = element.offset().top; // get element's offset top relative to document $win.on('scroll', function (e) { if ($win.scrollTop() &gt;= offsetTop) { element.addClass(topClass); } else { element.removeClass(topClass); } }); } }; }); If you wanted to get a bit cheeky, you could even reduce your scroll handler to just one line: $win.on('scroll', function (e) { element[($win.scrollTop() &gt;= offsetTop) ? 'addClass' : 'removeClass'](topClass); }); And the fix-to-top CSS class would just be something like this: .fix-to-top { position: fixed; top: 0; } Here's a fiddle.
answers question: http://stackoverflow.com/q/27211881
downvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/52099095
has comment: http://stackoverflow.com/comment/64979860
score: 53
type: Answer

http://stackoverflow.com/q/27218268
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/30611385
tagged with: hammer.js
has title: Implement a vertical scrolling on a canvas
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has body: I try to implement a vertical scroller with touch pan event on a large background in a HTML5 canvas. I use hammer JS to recognize pan gesture: http://hammerjs.github.io/ It works fine when I move y axis of the background but I want to reproduce the native scoll effect of IOS or Android scroll. Is there any library or a simple JS to do that with the same smooth effect ? Thx!
type: UnansweredQuestion
upvote count: 1
type: Question
tagged with: ios

http://stackoverflow.com/comment/42987838
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27256966
has text: If your code does nothing then the first thing that needs to be evaluated is: where is your javascript code in relation to your HTML button. Have you included it properly?

http://stackoverflow.com/q/27233147
has answer: http://stackoverflow.com/a/27233931
upvote count: 5
has answer: http://stackoverflow.com/a/27233337
tagged with: http://stackoverflow.com/tag/html
has title: How can I create overlapping images that reveal themselves as you scroll
tagged with: css
has body: I am looking to create a scrolling effect similar to that shown here: http://www.seaham-hall.co.uk/ However I am unable to achieve the desired effect, and inspecting the sites code gives me no hints. Quite difficult to google for as it is also quite difficult to describe. The closest I can get to finding a solution is this JSFiddle: http://jsfiddle.net/xtyus/1/ (function($){ /* Store the original positions */ var d1 = $('.one'); var d1orgtop = d1.position().top; var d2 = $('.two'); var d2orgtop = d2.position().top; var d3 = $('.three'); var d3orgtop = d3.position().top; var d4 = $('.four'); var d4orgtop = d4.position().top; /* respond to the scroll event */ $(window).scroll(function(){ /* get the current scroll position */ var st = $(window).scrollTop(); /* change classes based on section positions */ if (st &gt;= d1orgtop) { d1.addClass('latched'); } else { d1.removeClass('latched'); } if (st &gt;= d2orgtop) { d2.addClass('latched'); } else { d2.removeClass('latched'); } if (st &gt;= d3orgtop) { d3.addClass('latched'); } else { d3.removeClass('latched'); } if (st &gt;= d4orgtop) { d4.addClass('latched'); } else { d4.removeClass('latched'); } }); })(window.jQuery); However I am not sure that is going in the right direction, this pulls images up and covers the previous image, but notice on the Seaham Hall site the images don't appear to move up at all, they are stationary and become revealed as you scroll. How do I recreate this effect? My initial thought was to have the first image shrink as you scroll from 1000px down to 0px, and the second image grow to 1000px, and as you continue to scroll this image then shrinks and the third grows, and so on. However this means that after the first image all the other images have a starting size of 0px and there would technically be no scrolling on the page to begin with, so that is an issue. My second thought is that perhaps the second image is fixed to the page, the first image slides up revealing the second as you scroll, th…
type: AnsweredQuestion
downvote count: 0
type: Question
score: 5
has answer: http://stackoverflow.com/a/27234722
possible better answer: http://stackoverflow.com/a/27233337
accepted answer: http://stackoverflow.com/a/27234722
tagged with: javascript
answer count: 3
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42856366
type: QuestionComment
comment on: http://stackoverflow.com/q/27184591
score: 0
type: Comment
has text: FF lags also a bit...

http://stackoverflow.com/comment/42921519
type: Comment
has text: In the sidebar on the right there is a dropdown where you can include various javascript libraries/apis/frameworks that allow you to do various things. jQuery is a very popularly used framework that adds more functions to javascript. As for your code, you need to include jQuery (the script reference I gave to you) and you have to have your actual script in the head as well. If you are new to jQuery I highly recommend taking a look at it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27220914

http://stackoverflow.com/comment/42989412
has text: Yes, it's the same for checking truthiness. I imagine it's just people being pedantic about testing an actual boolean in the conditional expression over letting the interpreter coerce it for them. IMHO, unless you want to explicitly return a boolean (e.g. `return !!err;`), a `!!` is superfluous.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27257803

http://stackoverflow.com/comment/42806096
comment on: http://stackoverflow.com/q/27155589
score: 0
type: Comment
type: QuestionComment
has text: While we're trying to figure this out: Batarang can sometimes help. https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk

http://stackoverflow.com/comment/42837934
has text: Okay, thanks - it's the opposite of what I was thinking then, and yes, you've got below exactly what I was going to suggest. It's because the UI isn't getting chance to update before your function runs, and then your function is blocking further execution until it's completed. You won't come across this often, but what you've done is the best way around it (currently).
comment on: http://stackoverflow.com/q/27169537
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43043213
type: Comment
has text: Yes, it is.. But for me, the txtEditor is not replacing.. But in alert, it changes..
comment on: http://stackoverflow.com/a/27287931
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42805295
score: 1
has text: You seem to have `encode` and `decode` switched.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27155419

http://stackoverflow.com/comment/42863410
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27188358
has text: Like I said, you can only change it using JavaScript if the master page (or page) is set to show the title as coming from the Title property of the page.
type: Comment

http://stackoverflow.com/q/27226312
has comment: http://stackoverflow.com/comment/42930481
possible better answer: http://stackoverflow.com/a/27226594
has answer: http://stackoverflow.com/a/27226594
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/42930484
type: Question
has comment: http://stackoverflow.com/comment/42930714
linked to: http://stackoverflow.com/q/20561249
has body: Hello I have been looking at other threads like mine and I can't seem to get my code working! I need to send the JS array containing ints to a servlet this is current code: Javascript code: function sendReminderEmails(){ $("#sendReminderEmails").click(function(){ var people = null; var peopleBatch1 = null; $.ajax({ type: "POST", url:"getAllUnregisteredPeople", async: false, success: function(data){ people =JSON.parse(data); } }); peopleBatch1 = people.splice(0,200); $.post("sendReminderEmails", {people:peopleBatch1, mode : "insert"} , function(data){ }); }); } Servlet Code: protected void doPost(HttpServletRequest request, HttpServletResponse response){ String peopleIDs[] = request.getParameterValues("people"); } It keeps returning null! Can someone tell me if I am doing something wrong ?
tagged with: arrays
linked to: http://stackoverflow.com/q/3831680
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42930662
has title: Sending an javascript array to a servlet
has answer: http://stackoverflow.com/a/27226621
accepted answer: http://stackoverflow.com/a/27226621
tagged with: servlets
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/19568142
has comment: http://stackoverflow.com/comment/42930824

http://stackoverflow.com/comment/43062990
type: AnswerComment
comment on: http://stackoverflow.com/a/27294560
score: 0
type: Comment
has text: It's even worse now.. http://i.imgur.com/v79Uhqk.png this is what is happening. I'm no longer using the $('.tab-display').datatables, instead i'm only using the code you sent me. If i use the [0] after append(otb) the amount of buttons is smaller, but still duplicating. But its more progressive, first table=4 buttons, 2 table = 16....

http://stackoverflow.com/q/27185208
tagged with: optgroup
favorite count: 0
accepted answer: http://stackoverflow.com/a/27186101
type: Question
tagged with: http://stackoverflow.com/tag/html
upvote count: 3
tagged with: select
answer count: 1
has answer: http://stackoverflow.com/a/27186101
tagged with: javascript
has body: I'm trying to fill an html select with javascript. Now I simply do: function addRow(selectID, testName) { var x = document.getElementById(selectID); var option = document.createElement("option"); option.text = testName; x.add(option); } for (var x = 0; x < testSet.length; x++) { addRow('select', testSet[x]); } where testSet is an array of string. In this way I have the filled select. Now I want to upgrade the fill of select using optgroup so, in my html code, I have Now to fill with my options I think I must do something like that for (var x = 0; x < testSet.length; x++) { if(testSet[x].indexOf("string1") != -1){ // Add testSet[x] in OptionSet1 } if(testSet[x].indexOf("string2") != -1){ // Add testSet[x] in OptionSet2 } if(testSet[x].indexOf("string3") != -1){ // Add testSet[x] in OptionSet3 } } What I must do to "Add testSet[x] in OptionSet"? I readed something on the web, but I cannot find anything that seems to work for me. Thank you.
has title: How to add option to select optgroup in jquery?
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42858610
tagged with: jquery

http://stackoverflow.com/a/43692921
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/75942568
has body: var node=$('#drives_tree').jstree("get_selected", true); $("#breadcrumbs").text($('#drives_tree').jstree().get_path(node[0], ' &gt; '));
type: Answer
has comment: http://stackoverflow.com/comment/74896772
answers question: http://stackoverflow.com/q/27169820
upvote count: 5

amazon-elastic-beanstalk
tags question: http://stackoverflow.com/q/27168076
tag name: amazon-elastic-beanstalk
type: Tag

http://stackoverflow.com/comment/43077111
score: 1
has text: That's it. Thanks Eugene. Coming from a procedural background, that's behavior I'm not used to.
type: AnswerComment
comment on: http://stackoverflow.com/a/27307304
type: Comment

http://stackoverflow.com/a/27186641
has body: success = function() { $('.result').fadeOut(1000, function() { $('.result').show(); }); }; You cannot stop the animation halfway. ie. you cannot call show() till the fadeout animation completes.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27186113

http://stackoverflow.com/comment/43282679
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27268326
has text: @ZacharyK Could you post you model code ? and where you set the url to the REST service
score: 0

http://stackoverflow.com/comment/42901501
comment on: http://stackoverflow.com/q/27209784
has text: @Bonatoc It's currently a 'game' that i'm working on. It says in the beginning that it will use U.S. standard measurements punctuation etc.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27264342
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27264209
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27264209
downvote count: 0
has body: Start by fixing your HTML -- the class and id attributes are running into each other: LimitControlTesting NumericControlDbValueTestig All Controls Then what you need is: var mText = "sheet002.html"; $('#sheets option').filter(function() { return this.value.indexOf( mText ) > -1; }) .prop('selected', true); var mText = "sheet002.html"; $('#sheets option').filter(function() { return this.value.indexOf( mText ) > -1; }) .prop('selected', true); LimitControlTesting NumericControlDbValueTestig All Controls

http://stackoverflow.com/q/27202748
answer count: 0
has title: Replace browser spinner with custom spinner
type: Question
has comment: http://stackoverflow.com/comment/42888381
tagged with: javascript
has comment: http://stackoverflow.com/comment/42888655
has comment: http://stackoverflow.com/comment/42888767
has comment: http://stackoverflow.com/comment/43031262
tagged with: browser
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42888726
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42888382
has body: When we click on any link, we see a browser spinner till the content we clicked gets loaded. I want to replace the browser spinner with any other custom spinner during that loading time. Is it possible ? If yes, how ? Can anyone please, help me with this ?

http://stackoverflow.com/q/27262581
tagged with: javascript
linked to: http://stackoverflow.com/q/728360
favorite count: 0
has body: Have I gone mad? I am trying to clone an object an then delete an element from it, but it also deletes from the initial object. I feel like I no longer understand life! var obj1 = { 'name' : 'bob', 'hair' : 'brown' } var obj2 = obj1; delete obj2.hair; This delete's obj1.hair. How? What? Why?
downvote count: 1
has answer: http://stackoverflow.com/a/27262604
has title: JS Cloning an object and deleting an element
linked to: http://stackoverflow.com/q/122102
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27262612
has answer: http://stackoverflow.com/a/27262614
type: Question
score: -1
linked to: http://stackoverflow.com/q/4459928
answer count: 3

http://stackoverflow.com/a/27167940
answers question: http://stackoverflow.com/q/27165569
has comment: http://stackoverflow.com/comment/43127412
has comment: http://stackoverflow.com/comment/42829998
accepted answer of: http://stackoverflow.com/q/27165569
has comment: http://stackoverflow.com/comment/42830240
has comment: http://stackoverflow.com/comment/43125032
has body: There are a couple of ways to 'add' formatting to text, and this is one of them. The problem is you are mixing text and styling into the same object -- a text string. It's similar to RTF Here is some \b bold\b0 and {\i italic} text\par but different from, say, the native format of Word .DOC files, which works with text runs: (text) Here is some bold and italic text\r (chp) 13 None 4 sprmCFBold 5 None 6 sprmCFItalic 6 None -- the number at the left is the count of characters with a certain formatting. The latter format is what you are looking for, since you want to index characters in the plain text. Subtracting the formatting lengths will show which one you are interested in. Depending on how many times you expect to ask for a formatting, you can do one-time runs only, or cache the formatted text somewhere. A one-time run needs to inspect each element of the encoded string, incrementing the "text" index when not inside a color string, and updating the 'last seen' color string if it is. I added a compatible getCharAt function for debugging purposes. var str = '\u001b[38;5;196m\u001b[1mBo\x1B[22mld &amp; Red\u001b[22m but this one is only red\u001b[0m'; const map = { bold: ["\x1B[1m", "\x1B[22m" ] , italic: ["\x1B[3m", "\x1B[23m" ] , underline: ["\x1B[4m", "\x1B[24m" ] , inverse: ["\x1B[7m", "\x1B[27m" ] , strikethrough: ["\x1B[9m", "\x1B[29m" ] }; String.prototype.getColorAt = function(index) { var strindex=0, color=[], cmatch, i,j; while (strindex &lt; this.length) { cmatch = this.substr(strindex).match(/^(\u001B\[[^m]*m)/); if (cmatch) { // Global reset? if (cmatch[0] == '\x1B[0m') { color = []; } else { // Off code? for (i=0; i&lt;map.length; i++) { if (map[i][1] == cmatch[0]) { // Remove On code? for (j=color.length-1; j&gt;=0; j--) { if (color[j] == map[i][0]) color.splice (j,1); } break; } } if (j==map.length) color.push (cmatch[0]); } strindex += cmatch[0].length; } else { /* a regular character! */ if (!index) break; strindex++; index--; } } return color.join…
upvote count: 2
has comment: http://stackoverflow.com/comment/42908096
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43125722
has comment: http://stackoverflow.com/comment/43124966
type: Answer
has comment: http://stackoverflow.com/comment/43127546
score: 2

http://stackoverflow.com/comment/58934954
type: AnswerComment
comment on: http://stackoverflow.com/a/27165366
type: Comment
has text: The question specified that they wanted to perform the alert from the context of the node-main file (javascript node context), not the main file (which is a html file)
score: 0

http://stackoverflow.com/comment/49968960
comment on: http://stackoverflow.com/a/30386335
score: 0
type: AnswerComment
has text: I keep getting this error: java.lang.ClassCastException: javax.json.JsonValue$2 cannot be cast to javax.json.JsonString every single time I try and parse "success" from the return value, JsonObject. Here is the actual call that throws the error, any thoughts? JsonString response = jsonObject.getJsonString("success");
type: Comment

http://stackoverflow.com/comment/43068948
comment on: http://stackoverflow.com/q/27302399
score: 0
has text: Good point Adam. That makes far more sense. Alright. Thank you for the advice guys
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27273870
has comment: http://stackoverflow.com/comment/43068517
has body: Try calling this function when the user changes the image with parameter of this. I hope I correctly understood what you are asking. If not let me know and I will recode it. Also if the slide show is finished please post your html and javascript. function whatever(this) { if(this.className == 'previous') { alert('the user has changed the image'); this.className = 'current'; } else { alert('the user hasn\'t changed the image'); } }
type: Answer
has comment: http://stackoverflow.com/comment/43100074
has comment: http://stackoverflow.com/comment/43022294
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43068495
upvote count: 1
answers question: http://stackoverflow.com/q/27200887

selenium-webdriver
tags question: http://stackoverflow.com/q/27287201
tags question: http://stackoverflow.com/q/27220724
tags question: http://stackoverflow.com/q/27155644
tags question: http://stackoverflow.com/q/27224959
tag name: selenium-webdriver
tags question: http://stackoverflow.com/q/27240744
tags question: http://stackoverflow.com/q/27258609
tags question: http://stackoverflow.com/q/27243661
tags question: http://stackoverflow.com/q/27305943
type: Tag
tags question: http://stackoverflow.com/q/27240657

javascript
tags question: http://stackoverflow.com/q/27173380
tags question: http://stackoverflow.com/q/27279758
tags question: http://stackoverflow.com/q/27195868
tags question: http://stackoverflow.com/q/27183139
tags question: http://stackoverflow.com/q/27274872
tags question: http://stackoverflow.com/q/27254406
tags question: http://stackoverflow.com/q/27242014
tags question: http://stackoverflow.com/q/27238444
tags question: http://stackoverflow.com/q/27201193
tags question: http://stackoverflow.com/q/27216676
tags question: http://stackoverflow.com/q/27209293
tags question: http://stackoverflow.com/q/27253392
tags question: http://stackoverflow.com/q/27205237
tags question: http://stackoverflow.com/q/27258077
tags question: http://stackoverflow.com/q/27242092
tags question: http://stackoverflow.com/q/27249748
tags question: http://stackoverflow.com/q/27203970
tags question: http://stackoverflow.com/q/27240969
tags question: http://stackoverflow.com/q/27188310
tags question: http://stackoverflow.com/q/27266686
tags question: http://stackoverflow.com/q/27250657
tags question: http://stackoverflow.com/q/27182960
tags question: http://stackoverflow.com/q/27268691
tags question: http://stackoverflow.com/q/27206855
tags question: http://stackoverflow.com/q/27298878
tags question: http://stackoverflow.com/q/27246829
tags question: http://stackoverflow.com/q/27181341
tags question: http://stackoverflow.com/q/27269883
tags question: http://stackoverflow.com/q/27204696
tags question: http://stackoverflow.com/q/27239249
tags question: http://stackoverflow.com/q/27171828
tags question: http://stackoverflow.com/q/27307212
tags question: http://stackoverflow.com/q/27308419
tags question: http://stackoverflow.com/q/27185459
tags question: http://stackoverflow.com/q/27253855
tags question: http://stackoverflow.com/q/27184053
tags question: http://stackoverflow.com/q/27254681
tags question: http://stackoverflow.com/q/27218440
tags question: http://stackoverflow.com/q/27200180
tags question: http://stackoverflow.com/q/27251318
tags question: http://stackoverflow.com/q/27298096
tags question: http://stackoverflow.com/q/27292949
tags question: http://stackoverflow.com/q/27212733
tags question: http://stackoverflow.com/q/27219508
tags question: http://stackoverflow.com/q/27185940
tags question: http://stackoverflow.com/q/27220717
tags question: http://stackoverflow.com/q/27174083
tags question: http://stackoverflow.com/q/27233493
tags question: http://stackoverflow.com/q/27198837
tags question: http://stackoverflow.com/q/27264146
tags question: http://stackoverflow.com/q/27249900
tags question: http://stackoverflow.com/q/27268855
tags question: http://stackoverflow.com/q/27236024
tags question: http://stackoverflow.com/q/27289367
tags question: http://stackoverflow.com/q/27271855
tags question: http://stackoverflow.com/q/27199773
tags question: http://stackoverflow.com/q/27295879
tags question: http://stackoverflow.com/q/27256983
tags question: http://stackoverflow.com/q/27180490
tags question: http://stackoverflow.com/q/27163500
tags question: http://stackoverflow.com/q/27271781
tags question: http://stackoverflow.com/q/27295537
tags question: http://stackoverflow.com/q/27204283
tags question: http://stackoverflow.com/q/27232372
tags question: http://stackoverflow.com/q/27245092
tags question: http://stackoverflow.com/q/27311658
tags question: http://stackoverflow.com/q/27201301
tags question: http://stackoverflow.com/q/27253034
tags question: http://stackoverflow.com/q/27313750
tags question: http://stackoverflow.com/q/27217861
tags question: http://stackoverflow.com/q/27311828
tags question: http://stackoverflow.com/q/27227349
tags question: http://stackoverflow.com/q/27240829
tags question: http://stackoverflow.com/q/27284422
tags question: http://stackoverflow.com/q/27286011
tags question: http://stackoverflow.com/q/27294383
tags question: http://stackoverflow.com/q/27221187
tags question: http://stackoverflow.com/q/27209753
tags question: http://stackoverflow.com/q/27233183
tags question: http://stackoverflow.com/q/27193552

http://stackoverflow.com/comment/43569837
has text: @andinho, your comment here doesn't make any sense. You are calling push() above but state that you don't want to store your data in the "DB" (Firebase isn't a database, it's a real-time persistence layer). AngularFire isn't about user handling. It's a real-time binding that synchronizes Firebase data with Angular's views and is perfectly suited for what you have above. Also, David's answer is spot on.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27317462
type: Comment

http://stackoverflow.com/comment/43343858
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27220816
has text: @LarsKotthoff I tried making a JsFiddle for it but I'm unable to get it to read the JSON file as a resource (currently the entire codebase is hosted and running on a local server and/or DropBox). I have added all the relevant files though and I hope that should help you to get it to work.
type: Comment

http://stackoverflow.com/comment/43048644
score: 0
has text: here are the code jQuery(document).ready(function ($) { var _SlideshowTransitions = [ //Fade { $Duration: 1200, $Opacity: 2 } ];
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27290955

http://stackoverflow.com/q/27160000
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27160491
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27160125
has answer: http://stackoverflow.com/a/27160325
accepted answer: http://stackoverflow.com/a/27160491
has title: Ajax Submit to asp.net mvc post action or turn collection into json?
has answer: http://stackoverflow.com/a/27160125
type: Question
has body: I need to get the Row ID for each table row where Finalize has been checked and post that string/json to an ASP.net MVC Controller. The Ajax is giving me problems. I managed to grab the data that needs to be submitted; but I'm not sure what the best way to proceed is. Do I need to create a json object and then post that or is there a simple way I can post what I have? I tried the json route and didn't get very far so I went back to this, which is at least grabbing the correct data. finalize = function() { var tableData = ""; $('#results').find('tr').each(function() { var row = $(this); if (row.find('input[type="checkbox"]').is(':checked')) { tableData = tableData + $(this).find('td:first').text() + '\n'; // get ID } }); //var myRows = JSON.parse(tableData); //$.post("/Journal/SaveEntry", { Row: myRows }); alert(tableData); }; Row ID ... Finalize R4915 ... R4942 ... Finalize
tagged with: asp.net-mvc

http://stackoverflow.com/a/27250547
upvote count: 1
has comment: http://stackoverflow.com/comment/42975456
answers question: http://stackoverflow.com/q/27249871
accepted answer of: http://stackoverflow.com/q/27249871
type: AcceptedAnswer
downvote count: 0
has body: The assignment ($scope.clients = clients;) after angular.forEach executes before the loop is completed. Try .... function ($scope, $location, $q, Util) { ... var refreshClientList = function () { gurcaHub.server.getClients("", 0).done(function (result) { angular.forEach(result, function (item) { // omitted for brevity, all this does is massage the data a bit clients.push(item); }); // execute when done processing $q.all(clients).then(function(){ $scope.clients = clients; }); }); }; ... }]);
type: Answer
has comment: http://stackoverflow.com/comment/42975161
score: 1

http://stackoverflow.com/q/27186316
type: UnansweredQuestion
has title: How to make an onShow onHide event for jQuery for only applied element?
type: Question
has body: I am using the following code, to enable on-show and on-hide events. So, for example when I make a DIV visible, it will automatically call my custom function and do appropriate changes on the DIV at that moment automatically. (function ($) { $.each(['show', 'hide'], function (i, ev) { var el = $.fn[ev]; $.fn[ev] = function () { this.trigger(ev); return el.apply(this, arguments); }; }); })(jQuery); The problem is, it is called when any other element inside that main DIV is show()ned too. So, when I do $('.mother').on('show',function(){ if(...){ $(this).find('.child').show(); } else { $(this).find('.child').hide(); } }); for &lt;div class="mother"&gt; &lt;div class="child"&gt;&lt;/div&gt; &lt;/div&gt; It goes to infinite loop, as in jQuery on() method requires a selector for the second parameter and it is triggered for an event that happens on the children too if that second parameter is omitted or null. I couldn't define that second parameter. So making it $('.mother').on('show','.mother', function(){ does not work, as it is already the mother... I do not want to type: if(event.target != event.delegateTarget){return;} to every single callback function and I couldn't do it in the plugin code too as it doesn't have event object there... These were what I have tried. How can I solve this? What can be the alternatives? I want to be able to bind onShow functions to specific elements which shall never be called on events those happen on it's children.
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27187773

http://stackoverflow.com/q/27290268
has comment: http://stackoverflow.com/comment/43051097
has title: Backone collection.add event firing but not appending HTML
tagged with: backbone-views
has comment: http://stackoverflow.com/comment/43050779
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43051481
tagged with: backbone.js
answer count: 0
has body: I have this code running in my application, App.Views.OrganisationProjectsTab = Backbone.View.extend({ tagName: 'div', attributes : function () { return { class: 'tab-pane', id : 'tab-' + this.model.cid + "-projects" }; }, template: _.template($('#tpl-projects-tab-panel').html()), events : { "click .js-add-new-project" : "createNewProject", "click .js-assign-client" : "assignClient", }, initialize: function() { App.Models.CurrentOrganisation = this.model; App.Models.CurrentOrganisation.get('projects').on('add', this.addOne, this); }, render: function() { this.$el.append( this.template() ); this.addAll(); return this; }, addAll: function() { this.model.get('projects').each(this.addOne, this); }, addOne: function(model) { console.log('adding one'); var tableRow = new App.Views.OrganisationsProjectRow({ model: model }); //$('body').append(tableRow.render().el); this.$('tbody').prepend(tableRow.render().el); }, createNewProject: function(e) { e.preventDefault(); $('.js-create-new-project').trigger("click"); }, assignClient: function(e) { e.preventDefault(); var element = $(e.currentTarget); element.hide(); var clientDropDown = new Pops.Views.ClientDropdown({ collection: this.model.get('clients') }); element.parent().append( clientDropDown.render().el ); } }); The view that addOne calls looks like this, App.Views.OrganisationsProjectRow = Backbone.View.extend({ tagName: 'tr', className: 'menu-entry', template: _.template( $('#tpl-organisation-project-row').html() ), events: { "change select" : "saveClient" }, initialize: function(options) { this.options = options; this.model.on('change', this.render, this); }, render: function() { console.log(this.model.toJSON()); this.$el.html( this.template( { project: this.model.toJSON(), hide_client: this.options.hide_client })); return this; }, saveClient: function(e) { var self = this; console.log(this.model.get('clients')); //this.model.get('clients').remove(); var client = new App.Models.Client({ id : $(e.currentTarget).val() });…
tagged with: backbone-events
type: UnansweredQuestion

http://stackoverflow.com/q/27306463
score: 0
answer count: 2
has title: Random card/Image using buttonjavascript
tagged with: button
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27306566
has comment: http://stackoverflow.com/comment/43076340
type: Question
has answer: http://stackoverflow.com/a/27307093
tagged with: javascript
has body: I want to create a card game using java script. Being a beginner at java script, I am finding great difficulty finding a suitable tutorial for what I am trying to do. When the 'start game' button is selected, I want the computer to produce a random card. I have tried many ways of doing this and have came to no avail. Here is my code. Christmas Assignment Card Game Computer Player Start Game Higher Equal Lower Draw your Card Reset Score body { background:#66ccff; } h1 { text-align:center; } #settings { float:right; margin-top:10px; } #bodydiv { width: 800px; height:600px; margin-left:200px; margin-top:40px; margin-bottom:60px; background:#ffccff; border-radius: 10px; } #computer { border-radius: 10px; position: absolute; left:35%; top:27%; } #player { border-radius: 10px; position: absolute; left:55%; top:27%; } #start_game { width :120px; height: 55px; margin-left: 350px; margin-top:50px; background:white; border:1px solid black; } #buttons_1 { text-align: center; margin-top:20px; } #higher { width:140px; height:50px; font-size: 15px; border-radius:10px; font-weight:bold; } #equal { width:140px; height:50px; font-size: 15px; border-radius:10px; font-weight:bold; } #lower { width:140px; height:50px; font-size: 15px; border-radius:10px; font-weight:bold; } #draw { width:160px; height:30px; margin-left:325px; margin-top: 30px; border:1px solid black; background:#FFFFCC; } #resetscore { text-align: center; margin-top: 40px; } #arrow { margin-left:370px; margin-top:-130px; } #comp { margin-top:240px; margin-left:265px; } #play{ margin-top:10px; margin-left:540px; }

http://stackoverflow.com/comment/42954446
type: Comment
score: 0
has text: Or maybe it adds a class or something else to indicate that the value has been updated
comment on: http://stackoverflow.com/q/27238614
type: QuestionComment

http://stackoverflow.com/a/27309455
has comment: http://stackoverflow.com/comment/43081218
has comment: http://stackoverflow.com/comment/43081282
has body: TL;DR io.js is the future incarnation of node.js. The io.js website says: "io.js is a node & npm compatible javascript platform." It's a set of tools (a runtime/VM, a package manager, etc.) which is compatible with what currently exists as node. Any differences will presumably be in the underlying implementation, and any extensions that io.js adds beyond the node.js feature set. (Why would something compatible with what already exists divide the community? Why's that a bad thing?) Note that io.js hasn't even been released yet! However the io.js roadmap illustrates some particularly relevant differences between node and io. "Node is pretty damn stable already" and yet Node still hasn't hit 1.0; it's currently at 0.10.33. "The entire ecosystem uses semver while node uses a confusing even/odd release structure." By introducing a new name for a new(ish) project, they'll be able to fix that. So as I understand it, io.js is the 1.0-alpha1 and future release of node, but with: different (sane) release versioning deliberately frequent releases governance by a technical committee
has comment: http://stackoverflow.com/comment/43080646
upvote count: 19
downvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/43080671
has comment: http://stackoverflow.com/comment/45719753
answers question: http://stackoverflow.com/q/27309412
score: 16

http://stackoverflow.com/a/27294707
answers question: http://stackoverflow.com/q/27294396
has body: I saw CSS3 in tags, so here is a pure CSS3 example: .block { transition: opacity 0.5s linear, transform 0.5s linear; opacity: 1; } .block.hidden { opacity: 0; transform: scaleY(0); } Here's the fiddle: http://jsfiddle.net/andunai/1e21endf/ However, in this case the element will just disappear visually and won't free the place which it takes, so you'll have to end up with either making this element have position: absolute or animage padding, margin and max-height as well - note that transition of height is still having problems: How can I transition height: 0; to height: auto; using CSS? .block { transition: opacity 0.5s linear, transform 0.5s linear, max-height 0.5s linear, padding 0.5s linear; opacity: 1; max-height: 30px; /* This one must be approximately of the height of element, not less */ } .block.hidden { opacity: 0; max-height: 0; padding: 0; transform: scaleY(0); } Here's an example of adding almost true scaling: http://jsfiddle.net/andunai/1e21endf/1/
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/27165317
tagged with: php
has body: I am actually creating a forum. So, there would be a "order by" dropdown box i.e a select tag in html. Where the user selects any order like by time or like, etc. An ajax function is called which dynamically brings content into the page from mysql database. Select menu By Time By Genuine Count By Dubious Count showposts function function showposts(str){ orderby=str; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("postsdiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","showposts.php?q="+str,true); xmlhttp.send(); } Showposts.php page $sql = "SELECT * FROM posts order by date desc "; $result = $connection->query($sql); $username=$_SESSION['username']; while($row = $result->fetch_assoc()) { echo ""; echo ""; echo "----------------------------------- "; echo "----------------------------------- "; echo "Posted By: ".$row['user']."&nbsp&nbsp&nbsp&nbsp"; echo "Time: ".$row['date']." "; echo "Genuine Count: ".$row['genuine']."; echo "Dubious Count: ".$row['dubious'].""; echo " ------------------------ "; echo "Subject: ".$row['subject']." "; echo "Post: ".$row['post'].' '; } Problem So, the problem here is, I want to use a continuous scroll option like the one which is used in facebook. All the javascripts and jquery libraries I saw use logic that when the user scrolls down to the page, the javascript then places some content after that. But, here I running a while loop which brings the data from database at a time. So, I couldn't implement the javascript code. So, is there any thing that I could do to achieve continuous scroll, like is there any possibility to break the while loop or retrieving entire data and display part by part or anything like that? javascript for scrolling function yhandler(){ var wrap=d…
score: 0
has answer: http://stackoverflow.com/a/27165561
has answer: http://stackoverflow.com/a/27165557
tagged with: mysql
has answer: http://stackoverflow.com/a/27165512
type: Question
tagged with: javascript
tagged with: ajax
answer count: 3
has title: continuous scrolling. AJAX, PHP, JAVASCRIPT, MYSQL
type: UnansweredQuestion

http://stackoverflow.com/q/27156449
tagged with: javascript
has answer: http://stackoverflow.com/a/27156537
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: How to convert data in another form using Regex?
tagged with: php
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27156537
score: 1
upvote count: 1
type: Question
has body: I have a huge list with all the countries and cities in this format below. city_states['Finland'] = '|Helsinki||Aland|Etela-Suomen Laani|Ita-Suomen Laani|Lansi-Suomen Laani|Lappi|Oulun Laani'; My question is how can I convert it into so that I can run it in an autocomplete script? I use notepad++ so it lets me to do regex. { value: 'Finland, Helsinki', data: '' }, { value: 'Finland, Aland', data: '' }, ... ... ... Thank you very much.

http://stackoverflow.com/a/27245083
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42965330
score: 1
has body: I would recommend you to avoid asp.session because it may cause performance issues and can expire anytime regardless of your application state, does not scale on cloud, it will block concurrent ajax requests). Better approach would be to use HTML 5 storage mechanism especially in conjunction with AngularJs (you can use ng-storage https://github.com/gsklee/ngStorage).
answers question: http://stackoverflow.com/q/27244801
downvote count: 0
has comment: http://stackoverflow.com/comment/42965533

http://stackoverflow.com/comment/43078650
has text: @CainNuke Say, you click add button, now you have 1 and 2. Then you click add button of 1, you want to insert a party between 1 and 2, AND you want the newly added to be 2, and original 2 becomes 3. Is that your desired?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27288842

http://stackoverflow.com/a/27302601
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27302340
type: Answer
has body: Your first function will work as you expect, because it accesses the arguments object of the func_1() call. Your second function accesses the arguments of the anonymous callback function that you pass to the Promise constructor. Here, myArgs == [resolve, reject]. Notice that for your task you should not use the Promise constructor with its callbacks at all, but the Promise.resolve function: function func(_, arg1, arg2) { return Promise.resolve((arg1 || 1) + (arg2 || 2)); }
has comment: http://stackoverflow.com/comment/43068881
score: 0
answers question: http://stackoverflow.com/q/27302340

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

http://stackoverflow.com/a/27240021
type: Answer
has body: In the absolute plain The Web there is no persistence or memory. You make a request such as a GET for a page, the webserver responds by sending the page (and any referenced images, css, etc.) and you're done. Every request is independent of every other request. Cookies are a way to maintain state between requests. Cookies are used to maintain a Session, a concept that is not part of the basic web, or to maintain simpler bits of information. (There are other ways besides cookies, but that's another topic) In your case, if you have users who login and have sessions you can store font size as some kind of preference that can be applied at sign-in. If you don't (or even if you do) you can store the preferred size as a cookie value. In either case you need some server-side processing beyond simple request/response to apply that preference, or some javascript in each page that would, for example, read the font size from the cookie and set it as a base font-size attribute on the &lt;body&gt; or some other appropriate element so all other sizes are adjusted accordingly — assuming you use relative font sizes using either percentages or em-s If you have more information to store in addition to preferred font size then HTML 5 localStorage may be appropriate, but I'd say that is overkill if you only have this one preference. In a system I have worked on, every page included "user.css" which was not an actual file; it was generated server-side when requested, based on a user's preferences stored in a database. Without knowing more about your system it's difficult to be more specific.
answers question: http://stackoverflow.com/q/27239826
score: 0

http://stackoverflow.com/q/27264254
type: AnsweredQuestion
type: Question
has title: Jquery Slide up and Slide down toggle
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27264429
accepted answer: http://stackoverflow.com/a/27264429
has body: I am working with ASP.NET MVC 4. I have a nested list in my razor view like so: Dental Materials Pulp Etchants Medicines Pulp Etchants Oral And the main CSS is: #product-cat-menu li { cursor: pointer; position: relative; } #product-cat-menu li .rightdown { position: absolute; right: 0; } #product-cat-menu ul { display: none; } #product-cat-menu li ul li { padding: 5px 0 5px 25px; width: 100%; } And jQuery is like: $(document).ready(function () { $("#product-cat-menu a").click(function () { $("#product-cat-menu ul").slideUp(); if (!$(this).next().is(":visible")) { $(this).next().slideDown(); } }); }); The problem is that when clicking on the li it slides down the child list but after going to the controller action it is slides up. I want show the slide down part after the page refreshing. For that i am trying the following code also: $(document).ready(function () { $("#product-cat-menu a .rightdown").click(function() { //........... }); }); but this is not working.
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: asp.net-mvc-4

http://stackoverflow.com/q/27299907
has body: My site will have a large animated gif (1900px wide). As you can expect, the initial load is very long and the animation is very choppy. Is there a better way to load the gif so it doesn't drag the site down (and make the scrolling choppy)?
score: -2
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/27302813
has answer: http://stackoverflow.com/a/27299986
answer count: 2
has title: How to load a large animated gif for the user
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: animated-gif
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
tagged with: loading

http://stackoverflow.com/comment/42846813
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27178438
has text: If the fiddle doesn't replicate the problem, then the problem is somewhere else and the fiddle is irrelevant.
score: 0

http://stackoverflow.com/q/27171605
score: 1
has answer: http://stackoverflow.com/a/27182423
accepted answer: http://stackoverflow.com/a/27182423
type: Question
has comment: http://stackoverflow.com/comment/42834443
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27172068
downvote count: 0
has title: Click event on just highlight days in datepicker
has comment: http://stackoverflow.com/comment/42834306
favorite count: 0
tagged with: datepicker
has body: I change the backgroud color of my highlight Days in datepicker with beforeShowDay : highlightDays, // it add a class name 'highlightdays' It work good but Now I want to make some processing on these highlight Days when i click on them I try the code below but it doesn't work $( ".highlightdays" ).click(function(e) { //.. } ); and i found that i have to use onSelect : afterclick But here is my problem this function select all days even non highlight days !
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27172068

http://stackoverflow.com/a/27208129
has comment: http://stackoverflow.com/comment/43161929
answers question: http://stackoverflow.com/q/27207998
type: Answer
accepted answer of: http://stackoverflow.com/q/27207998
has comment: http://stackoverflow.com/comment/43204453
has comment: http://stackoverflow.com/comment/43098535
has comment: http://stackoverflow.com/comment/43098426
has body: I would slightly modify the ids so that I can reuse them more easily inside my function and define a mapping for your widths.
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/43190644
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42898205

http://stackoverflow.com/a/27176967
type: Answer
answers question: http://stackoverflow.com/q/27176846
has body: Because this is async call, technically first block is finished, but the call(s) inside it wasn't. The only thing that comes to my mind is adding promise into userService and communicate through it: .run(function($http, $q, userService){ var base_url = 'http://server.com:3000'; var deferred = q.defer(); $http.get(base_url + '/users/isloggedin') .success(function(data, status, headers, config){ userService.setUserData(data.userData); userService.setIsUserLoggedIn(true); deferred.resolve(); }); userService.setPromise(deferred.promise); }) And in second run: .run(function(userService){ userService.getPromise().then(function(){ //code that requires first run to finish }); }) But if somewhere you need code from second run to finish(I mean do smth only after second run), it will require same structure again, and that's not really good, so you need to change the logic.
score: 0

http://stackoverflow.com/q/27248470
tagged with: internet-explorer-8
has body: I'm working on a project in which I have created a jQuery plugin and various other js files that use bind() in various places. The client requested IE8 support out of the blue, so we included some function polyfills to support ie8 but in IE8 in loops like the following the methods are enumerable which causes data corruption. for (var d in this.originalResponse.timespans) {} In particular our issue is regarding bind() and here is the mdn polyfill we are using if (!Function.prototype.bind) { Function.prototype.bind = function(oThis) { if (typeof this !== 'function') { // closest thing possible to the ECMAScript 5 // internal IsCallable function throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function() {}, fBound = function() { return fToBind.apply(this instanceof fNOP &amp;&amp; oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; } The result of an iteration will give out an extra iteration with the bind prototype which is unwanted. Is there a way to support the bind method on IE8 without being enumerable? UPDATE: this.originalResponse.timespans structure is an object in which the key is a unix timestamp and the value is an array of strings. When I tried to loop through this I was getting an extra iteration because the polyfill (for reason unknown to me) was creating a function prototype inside the object which was enumerable. UPDATE 2 the data are being received from an ajax / json call, this is a sample data structure from the server: { "timespans":[ { "1417685819":[ ] }, { "1417772219":[ ] }, { "1417858619":[ ] } ], "start":"7:00", "current":"11:36", "end":"23:00" } and after receiving these data for the sake of simplicity I transform the data structure like this: MyClass.prototype.success = function( r ) { var response = { timespans:{…
tagged with: javascript
has title: Javascript MDN Function prototype bind polyfill is enumerable in array
has comment: http://stackoverflow.com/comment/43006572
has comment: http://stackoverflow.com/comment/42997075
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/43047393
tagged with: jquery
has answer: http://stackoverflow.com/a/27248533
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42997090
has comment: http://stackoverflow.com/comment/42973673
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42972771
has comment: http://stackoverflow.com/comment/42972275
has comment: http://stackoverflow.com/comment/43011390
type: Question

http://stackoverflow.com/comment/42990991
type: AnswerComment
score: 0
type: Comment
has text: You shouldn't have to check every route for the user. You can apply the same hook to all of them. In our app we have a route controller which renders a connecting template when the user is logging in, and otherwise renders the correct template. All other route controllers extend from this one. Your db calls should never fail if the data is indeed on the client. Perhaps your waitOn hook isn't implemented correctly. You'll find that guards are often necessary when dealing with reactive data - it's just the reality of using this framework.
comment on: http://stackoverflow.com/a/27257676

http://stackoverflow.com/comment/42914647
comment on: http://stackoverflow.com/q/27217397
score: 0
type: Comment
type: QuestionComment
has text: Create method in factory, and put that factory on scope, more thou can call factory method directly from html

http://stackoverflow.com/q/27265282
has body: I'm familiar with JavaScript, but not familiar with using it in the DOM. I'm trying to make a form that will accept an item name + properties and store it like I'm writing out the object below: var grocery_list = { "Banana": { category: "produce", price: 5.99 }, "Chocolate": { category: "candy", price: 2.75 }, "Wheat Bread": { category: "grains and breads", price: 2.99 } } Here is the sample HTML Form I have: &lt;form&gt; &lt;input name="item"&gt;&lt;br&gt; &lt;input name="category"&gt;&lt;br&gt; &lt;input name="price"&gt;&lt;br&gt; &lt;input type="submit" value="do stuff"&gt; &lt;/form&gt; How can I use JavaScript take the input above and push it to an Object (like above)?
tagged with: javascript
has answer: http://stackoverflow.com/a/27265548
upvote count: 3
answer count: 2
has title: Form input to JavaScript Object
has comment: http://stackoverflow.com/comment/43002471
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27265517
has comment: http://stackoverflow.com/comment/43002307
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27265517
tagged with: forms
possible better answer: http://stackoverflow.com/a/27265548
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/43002215

http://stackoverflow.com/a/27163002
has comment: http://stackoverflow.com/comment/71794611
accepted answer of: http://stackoverflow.com/q/27162874
has body: If you are going to keep the existing implementation the following will work. The problem you are encountering is as the error message states: You can not initialize a new DataTable where one already exists so you have to destroy it and re-create it similar to the below. DataTables Destroy API call is what you are needing. Example (untested): $('#submit').on( 'click', function () { var table = $('#myTable').dataTable() || false; if (table) { table.api().destroy(); } getJsonReport(); // Run your update function }); NOTE The dataTable part. This syntax is required on the call to api(). Your getJsonReport() function will remain the same. I would actually use a different design model on the DataTable that self-contains all the logic for the DataTable and then uses the API exclusively do do any updated. This requires a refactor to how the table is generated so I did not want to include it, but if you want to see my approach to datatables (I have had to use this library for years at work, till we went Angular ;)) and I will be happy to provide it. Hope this helps.
has comment: http://stackoverflow.com/comment/42819040
answers question: http://stackoverflow.com/q/27162874
score: 1
has comment: http://stackoverflow.com/comment/42819115
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/27224791
accepted answer of: http://stackoverflow.com/q/27224717
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27224717
has body: It shouldnt be New. Its new! var temp1 = "movement at:2014-12-01T07:53:08"; var temp2 = temp1.replace("movement at:", ""); document.getElementById('movementlabel').innerHTML = temp2; alert(temp2); var MovementtDate= new Date(temp2); alert(MovementtDate.getMonth()); // check the month &lt;p id="movementlabel"&gt;&lt;/p&gt; Read about new operator | MDN.

http://stackoverflow.com/a/27288864
has comment: http://stackoverflow.com/comment/43048326
has comment: http://stackoverflow.com/comment/43052335
has comment: http://stackoverflow.com/comment/43049122
has comment: http://stackoverflow.com/comment/43086127
answers question: http://stackoverflow.com/q/27287732
downvote count: 0
has comment: http://stackoverflow.com/comment/43047335
has comment: http://stackoverflow.com/comment/43051618
has comment: http://stackoverflow.com/comment/43054190
has body: You need to refactor the code a bit: Move all global variables such as canvas and context outside of the loop function Inside the loop, clear full canvas at beginning, redraw sine Use requestAnimationFrame instead of setInterval Replace fillRect() with rect() and do a single fill() outside the inner for-loop Using a timeout value of 1 ms will potentially result in blocking the browser, or at least slow it down noticeably. Considering that a monitor update only happens every 16.7ms this will of course be wasted cycles. If you want to reduce/increase the speed of the sine you can reduce/increase the incremental step instead. In essence: var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var sineval = []; var offset = 0; init(); function init() { for (var i = 0; i &lt;= 1000; ++i) { sineval.push(Math.sin(i * Math.PI / 180)); } // Call the sineWave() function sineWave(); } function sineWave() { ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); ctx.beginPath(); ctx.fillStyle = "green"; // draw positive part of sine wave here for (var x = 0; x &lt; 1000; x++) { var y = sineval[x + offset]; if (y &gt;= 0) { y = 100 - (y - 0) * 70; ctx.rect(x, y, 2, 2); } } ctx.fill(); ctx.beginPath(); ctx.fillStyle = "red"; // draw negative part of sine wave here for (var x = 0; x &lt; 1000; x++) { var y = sineval[x + offset]; if (y &lt; 0) { y = 100 - (y - 0) * 70; ctx.rect(x, y, 2, 2); } } ctx.fill(); offset = (offset &gt; 360) ? 0 : ++offset; requestAnimationFrame(sineWave); } &lt;canvas id="canvas" width=800 height=500&gt;&lt;/canvas&gt; And of course, if you load the script in &lt;head&gt; you need to wrap it in a window.onload block so canvas element is available. Or simply place the script at the bottom of the page if you haven't already.
type: Answer
has comment: http://stackoverflow.com/comment/43087558
upvote count: 3
has comment: http://stackoverflow.com/comment/43052140
has comment: http://stackoverflow.com/comment/43084121
has comment: http://stackoverflow.com/comment/43086009
score: 3
has comment: http://stackoverflow.com/comment/43058377

http://stackoverflow.com/q/27195193
has title: express js routing issue
linked to: http://stackoverflow.com/q/10434001
has body: I wish to call my index.html page while using sendFile, but I ran into a problem. The problem is that it actually shows me the index.html although without any css and js\jquery effects. server.js: var express = require("express"); var app = express(); var server = app.listen(8000, function () { var host = server.address().address; var port = server.address().port; console.log('Example app listening at http://%s:%s', host, port) }); app.get('/', function (req, res) { res.sendFile(__dirname + '/index.html') });
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/27196336
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42875618
tagged with: node.js
has comment: http://stackoverflow.com/comment/42878118
accepted answer: http://stackoverflow.com/a/27196336
score: 0
answer count: 1

http://stackoverflow.com/comment/42897822
score: 0
comment on: http://stackoverflow.com/a/27207913
type: Comment
has text: Thanks a million my 'solutions' always rendered rather odd incoherent shapes.
type: AnswerComment

http://stackoverflow.com/q/27210362
tagged with: javascript
has answer: http://stackoverflow.com/a/27211098
tagged with: openlayers-3
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27211098
has title: open layers 3 how to draw a polygon programmatically?
score: 16
upvote count: 16
type: Question
type: AnsweredQuestion
has body: How to draw a polygon use open layer 3 programmatically? i have a json array coordinate: [ { "lng": 106.972534, "lat": -6.147714 }, { "lng": 106.972519, "lat": -6.133398 }, { "lng": 106.972496, "lat": -6.105892 } ] and now i want to draw it on map use open layers. how to do it?

http://stackoverflow.com/comment/42973530
score: 1
comment on: http://stackoverflow.com/a/27249149
has text: Indeed - until [`:has()`](http://dev.w3.org/csswg/selectors4/#has-pseudo) is supported that is
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43046184
score: 0
type: QuestionComment
type: Comment
has text: I placed code in body, expecting scope change, but it did not work.
comment on: http://stackoverflow.com/q/27289740

http://stackoverflow.com/comment/43011828
type: Comment
score: 0
has text: what you not understand? ...you embeded the jplayer from youtube link....now you need to add the playlist with a rss feed...
type: AnswerComment
comment on: http://stackoverflow.com/a/27249719

http://stackoverflow.com/a/27171597
has comment: http://stackoverflow.com/comment/42834198
has comment: http://stackoverflow.com/comment/42834929
has comment: http://stackoverflow.com/comment/42834550
has comment: http://stackoverflow.com/comment/42834660
answers question: http://stackoverflow.com/q/27171383
upvote count: 1
has comment: http://stackoverflow.com/comment/42834310
has comment: http://stackoverflow.com/comment/42834222
has body: You cannot force-download a file via JavaScript if that is what you are looking for. You can open the file in a new window, but in my opinion the proper way to do this is to avoid JavaScript and just link to a PHP file which forces download, that way the browser won't show the page because it is downloading a file. That would be something among the lines of: HTML / PHP &lt;a href="download.php?file=uploaded/document/&lt;?=$row['filelocation'];?&gt;"&gt;DOWNLOAD&lt;/a&gt; PHP Script (download.php) - I got parts of this code from http://davidwalsh.name/php-force-download &lt;?php // grab the requested file's name $file_name = urldecode($_GET['file']); // make sure it's a file before doing anything! if(is_file($file_name)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file_name).'"'); header('Content-Length: '.filesize($file_name)); // provide file size readfile($file_name); // push it out } ?&gt;
type: Answer
has comment: http://stackoverflow.com/comment/42834174
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42834866
has comment: http://stackoverflow.com/comment/42834161

http://stackoverflow.com/q/27186410
score: -1
has comment: http://stackoverflow.com/comment/42860305
tagged with: iframe
downvote count: 1
has answer: http://stackoverflow.com/a/27186457
type: Question
has title: how to change iframe src url anchor tags attribute target=_blank on cross domain
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have iframe and i want to change target="_blank" or want to remove that attribute instead of iframe target="_parent". Anybody have an idea about the script. How can i change or remove the properties from iframe child anchor tag. when iframe is open on my domain and when i clicked on uploaded website any hyperlink new tab is opened but i want to get new page within the iframe. I have tried code like that : &lt;script&gt; $(document).ready(function(){ setTimeout(function(){ $('#iframeid').contents().find('.linklist_single a').click(function() { $(this).removeAttr('target'); }); },2000); }); &lt;/script&gt; OR

http://stackoverflow.com/q/27244773
type: Question
has comment: http://stackoverflow.com/comment/42966485
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/42973688
has answer: http://stackoverflow.com/a/27252408
has body: I am creating a sample project in MVC. Suppose I have two projects A and B. In project A I have a javascript file which takes index page of project A and put it in a div having id Widget. In project B index page I have a reference to the javascript file of project A and a div with id Widget. On page load I want to load Project A's index page to Project B's Widget Div. Here is my code Project A Index.cshtml (Index view) @{ ViewBag.Title = "Index"; } Index Thi is index page. Widget.js (JavaScript file) $(document).ready(function (e) { $('#widget').load('/Home/Contact', function (response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: "; alert(msg + xhr.status + " " + xhr.statusText); } }); }; Here is another project Project B Index view which call the project A's index view @{ ViewBag.Title = "Index"; } Project B Index Above sample code display index view of Project B while I want to display index view of Project A
score: 0
tagged with: cors
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42972668
has comment: http://stackoverflow.com/comment/42965395
type: AnsweredQuestion
has title: Load webpage from different domain
has comment: http://stackoverflow.com/comment/42972950
accepted answer: http://stackoverflow.com/a/27252408

http://stackoverflow.com/comment/42955101
has text: I'm pretty sure it's because of the jQuery incompatibilities that your code is not running. Try to research on that subject, otherwise only if I took a look at the running code.
type: AnswerComment
comment on: http://stackoverflow.com/a/27234939
score: 0
type: Comment

http://stackoverflow.com/comment/42856156
comment on: http://stackoverflow.com/a/27182432
type: AnswerComment
has text: This worked for my problem perfectly. I did not know about filterFilter. Thank you very much.
score: 0
type: Comment

http://stackoverflow.com/comment/45585192
type: Comment
type: QuestionComment
has text: Possible duplicate: http://stackoverflow.com/questions/26041791/how-to-select-a-dropdown-value-in-selenium-webdriver-using-node-js/28643481#28643481
score: 0
comment on: http://stackoverflow.com/q/27273262

http://stackoverflow.com/comment/42859356
type: AnswerComment
type: Comment
score: 0
has text: You mind explaining what this changed, I see I've passed a parameter $timeout right now, but don't understand why this is needed. Also, element.children() is not null, but running a jQuery selector on it don't return any elements :s
comment on: http://stackoverflow.com/a/27186212

http://stackoverflow.com/comment/43094753
type: Comment
comment on: http://stackoverflow.com/a/27313111
has text: @Dmitry as Constantinius mentioned, I specified 1.57079633 as the literal value rather than calculating PI/2, although there is no particular requirement to use the literal value. I used it for brevity.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27194587
tagged with: mongoose
tagged with: javascript
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27196034
tagged with: node.js
has body: I am trying to iterate over a stream and update records if they are already in mongo or create them otherwise: School.findOne({nces_schid: mergeSchool['nces_schid']}) .lean() .exec(function(err, school){ if(err) { console.log(err); } if(school) { delete mergeSchool['nces_schid']; School.update({nces_schid: school['nces_schid']}, {$set: mergeSchool}, {multi: true}) .lean() .exec(function (err, updatedSchool) { console.log(err); mongoCallback(updatedSchool, err, education); }); } else { School.create(mergeSchool, function (err, newSchool) { mongoCallback(newSchool, err, education); }); } }); When this actually runs the stream loads all of the data in very fast, but the updates happen at an extremely slow rate. Around 1 per 3 seconds, with a lot of data this takes too much time. What am I doing wrong here?
score: 0
type: Question
tagged with: mongodb
has title: Mongoose update over iterator

http://stackoverflow.com/comment/42828913
has text: I think your problem is with `withCredentials`. I will post it as an answer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27167567
score: 0

http://stackoverflow.com/comment/42956986
score: 0
comment on: http://stackoverflow.com/q/27240215
type: Comment
type: QuestionComment
has text: Do you see any errors in the JavaScript console? The typo should have caused a syntax error.

http://stackoverflow.com/q/27292755
tagged with: javascript
has body: I have a library function that I'm calling from a method. It takes a callback with one parameter that I would like to be another method from the same object. I can't seem to get the syntax right. Here's what I've got: myOriginalObject.login = function() { // inside a method var obj = this; var closure = function(token) { return function() { obj._login2(token); } } $window.gapi.auth.authorize({"client_id": this.clientId, "immediate":false, "response_type":"token", "scope":this.scopes}, closure ); // .. some more code and method ends } myOriginalObject._login2 = function(authResult) { // .. I can't get this function called by the gapi library } P.S. sorry if this post isn't done properly (still learning) thanks!!!
has comment: http://stackoverflow.com/comment/43051059
has answer: http://stackoverflow.com/a/27292839
has answer: http://stackoverflow.com/a/27292896
possible better answer: http://stackoverflow.com/a/27292896
type: AnsweredQuestion
has title: trying to use a closure with parameters as a callback
accepted answer: http://stackoverflow.com/a/27292839
score: 0
type: Question
answer count: 2

http://stackoverflow.com/q/27256694
tagged with: fullcalendar
upvote count: 1
has title: Consume webservice before FullCalendar starting render
has body: I'm using FullCalendar built-in method "viewRender" to load my webservice with month content this way: $scope.viewRender = function (view, element) { $("td").removeClass("fc-today"); $("td").removeClass("fc-state-highlight"); var currentMonth = view.intervalEnd._d.getMonth(); var currentYear = view.intervalEnd._d.getFullYear(); ScheduleAttendanceSrvc.getCalendar(1, currentMonth, currentYear).then( function (calData) { window.calData = calData; }, function (statusCode) { toastr.warning("Calendar Data doesn't exist."); } ) } And I'm using FullCalendar built-in method "dayRender" to customize FullCalendar's appearance this way: $scope.dayRender = function (date, cell) { var formattedDate = date._d.toISOString().slice(0, 10); if (($.inArray(formattedDate, window.calData)) &gt; -1) { cell.context.bgColor = '#0aa699'; } else { cell.context.bgColor = '#f35958'; } }; The problem is that i have no guarantee that viewRender will always run first than all dayRender. In fact, view Render runs between all the dayRenders. Is there a better way to load my webservice before dayRender runs, since I depend on my webservice return to customize it's appearance? Thanks so much.
favorite count: 0
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43075817
type: AnswerComment
has text: How can `Array.prototype(.length)` be "usefully used"?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27306657

http://stackoverflow.com/comment/43086427
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27312894
type: Comment
has text: @KristjanVeskimäe yes exactly. i would recommend to start with basic tutorials first, a good place to start would be [w3schools](http://www.w3schools.com/) even though it has some errors, it is a good place to learn the basics

http://stackoverflow.com/q/27189654
type: UnansweredQuestion
downvote count: 1
tagged with: debugging
has answer: http://stackoverflow.com/a/27190152
type: Question
has title: javascript. formatting console.log
answer count: 2
upvote count: 0
tagged with: firebug
tagged with: javascript
has comment: http://stackoverflow.com/comment/42888574
has answer: http://stackoverflow.com/a/27189844
favorite count: 0
score: -1
has body: I´m working on a big angular.js project. Now, I´ve to profile some pages about the performance. With the console.log of the project I´m looking for the performance problems. I miss if console.log can output the current time (yes, I know in Chrome you can set up). Is there a way (like in log4java) to format the output? Thanks in advance,

http://stackoverflow.com/q/27307269
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: This code doesn't hide the box div which was supposed to be hidden when I press the Esc key. function Boxup(elementN, event){ $("#"+elementN).css({ "display":"block", "top":event.pageY+"px" , "left":event.pageX+"px" }) } function hideCurrentPopup(ele){ $(ele).parent().hide(); } $(this).keyup(function(event) { if (event.which == 27) { disablePopup(); } }); Am I missing something?
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43076799
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27307294
accepted answer: http://stackoverflow.com/a/27307294
score: 1
has title: hide element press Esc
tagged with: hide
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/43076827
answer count: 1

http://stackoverflow.com/comment/43177531
score: 0
type: AnswerComment
has text: I'd put a guard condition on your call to bind (i.e. encapsulate your call to bind in another method with a check to see if its already been called) to stop this method from being bound multiple times. It's worth trying out just to check to see if this is what is causing the multiple triggering.
comment on: http://stackoverflow.com/a/27337920
type: Comment

http://stackoverflow.com/q/27295444
has comment: http://stackoverflow.com/comment/43056285
tagged with: visual-studio-2013
type: AnsweredQuestion
has title: How do I get each value from each table row in an MVC project?
has answer: http://stackoverflow.com/a/27316038
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/27358707
accepted answer: http://stackoverflow.com/a/27358707
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/43057903
tagged with: javascript
score: 0
has body: I have the following webgrid in my view: @using (Html.BeginForm("InsertSensorsInExistingPredefineView", "PredefinedViews", FormMethod.Post)) { @gridSensorChoose.GetHtml( tableStyle: "webgrid3-table", headerStyle: "webgrid3-header", footerStyle: "webgrid3-footer", alternatingRowStyle: "webgrid3-alternating-row",// selectedRowStyle: "webgrid3-selected-row", rowStyle: "webgrid3-row-style",// mode: WebGridPagerModes.All, columns: gridSensorChoose.Columns( gridSensorChoose.Column("SensorID", format: @ , style: "col1Width"), gridSensorChoose.Column("DeviceID", format: @ @item.DeviceID , style: "col1Width"), gridSensorChoose.Column("SensorType", format: @ @item.SensorType , style: "col1Width"), gridSensorChoose.Column("SensorName", @Html.Localize("sensorName").ToString(), format: @ @item.SensorName , style: "col2Width", canSort: false), gridSensorChoose.Column("VAL", format: @ @Html.CheckBox("val") , style:"col1Width", canSort: false), gridSensorChoose.Column("MIN", format: @ @Html.CheckBox("min") , style: "col1Width", canSort: false), gridSensorChoose.Column("AVG", format: @ @Html.CheckBox("avg") , style: "col1Width", canSort: false), gridSensorChoose.Column("MAX", format: @ @Html.CheckBox("max") , style: "col1Width", canSort: false), gridSensorChoose.Column("SUM", format: @ @Html.CheckBox("sum") , style: "col1Width", canSort: false), gridSensorChoose.Column("INT", format: @ @Html.CheckBox("int") , style: "col1Width", canSort: false) )) } This view displays the following html in the browser like so: SensorID DeviceID SensorType Sensor Name VAL MIN AVG MAX SUM INT 1 1 10 Soil Temperature 2 1 1 Soil Moisture na 15cm 3 1 1 Soil Moisture na 30cm 4 1 101 Leaf wetness prvi 5 1 201 Ait temperature 6 1 202 Air humidity 7 1 203 Wind speed 8 1 204 Wind direction 9 1 205 Precipitation 10 1 206 Solar radiation 51 1 20 Battery 56 1 101 Leaf wetness drugi So I now I want to get each value (even if it is false) of each check box (there are six check boxes in total) of each row (that can…
answer count: 2
linked to: http://stackoverflow.com/q/1688794
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27316038

http://stackoverflow.com/a/27223233
answers question: http://stackoverflow.com/q/27222172
has body: you can try this: var result=[]; var indexes = data.map(function (el) { return el.EmployeeId; }); indexes=$.unique(indexes); indexes.filter(Create); function Create(element) { obj = { "EmployeeId" :element }; for(x in data){ if(data[x].EmployeeId == element){ obj[data[x].FieldName] = data[x].Value;//adding value as a property } } result.push(obj); } console.log(result);
score: 0
type: Answer

http://stackoverflow.com/q/27311756
has comment: http://stackoverflow.com/comment/43084198
downvote count: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/947373
accepted answer: http://stackoverflow.com/a/27311844
has title: How dynamically determining the holiday of a particular country?
tagged with: javascript
score: -1
tagged with: date
has comment: http://stackoverflow.com/comment/43084225
has body: I want to determine the country of holiday that you specified using the php or javascript. Is this possible? And how? ++I want Sat,Sun and holidays for CSS automatic change. (US, UK, France, Australia, Hong-Kong, China, Germany) $holiday = $t->format("D"); $date = $t->format("D, M j Y"); if( $holiday == 'Sun' || $holiday == 'Sat') { $cal = "cal_holiday"; } else { $cal = "cal"; } echo " $date ";
type: Question
upvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27311844
tagged with: php

http://stackoverflow.com/q/27283466
has comment: http://stackoverflow.com/comment/43064912
accepted answer: http://stackoverflow.com/a/27306033
has title: Phantom wont initialize/loaded angularjs controller methods
favorite count: 0
has comment: http://stackoverflow.com/comment/43064434
tagged with: angularjs
has body: i need help creating a pdf file off a html page powered by an angularjs controller. the pdf will be created by using phantom module. im able to display and bind data correctly as soon as i navigate to the specific url, but when i call phantom to render the page it doesnt load/initiliaze/call the controller methods i have tried different methods such as doing ng-init from the div or calling a function from the controller once is done loading or even using $scope.$on('$viewContentLoaded', function(){ //code here... }) phantom code: function DoThePDF(){ phantom.create(function(ph){ ph.createPage(function(page) { page.set("paperSize", { format: "A4", orientation: 'portrait', margin: '1cm' }); page.open(address, function(status) { if(status !== 'success'){ console.log('unable to open webpage'); } else{ setTimeout(function() { page.render("reports.pdf"); console.log("page rendered"); ph.exit(); }, 5000); } }) }) }); } when calling page.open(address, function(status) {...} i can see that the page is been opened but the angular events/methods dont get initialized/called so when the page gets rendered is an empty html template no data gets binded. i have added delays but still it doesnt help.
tagged with: node.js
type: AnsweredQuestion
tagged with: phantomjs
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43035754
type: Question
has answer: http://stackoverflow.com/a/27306033
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43068084
answer count: 1

http://stackoverflow.com/comment/42971164
comment on: http://stackoverflow.com/q/27248297
type: QuestionComment
has text: you may need to use ng-class/ng-style conditionally to apply those styles and you can use ng-pattern for regular expression. (You can give it a try)
type: Comment
score: 0

http://stackoverflow.com/q/27192224
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27199630
tagged with: jvectormap
score: 0
has title: Population density and Circles (to represent earthquakes) on the same Map
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27199630
type: AnsweredQuestion
has body: I need to create a Map to compare the population density of a country (e.g. USA at county -or state- level) and the epicenter of some earthquakes to see how many people could have felt those quakes. The problem is that I can't find a way to put these 2 things on the same map. In a db I have some earthquakes taken from USGS and the population data taken from Census.gov. I was able to map earthquakes (coordinates lat/lng) with circles thanks to the Google Maps API but without population density. I also created a map with Highcharts (Highmaps) to display population density, but I can't put circles on that because lat/lng points are not supported. I also read about vectorWorkz and jVectorMap but couldn't find examples. Is there a way to do such thing? I'm not an expert so if someone has a solution or could provide me a little example I would be eternally grateful. Thank you!
tagged with: google-maps
tagged with: highcharts
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27281626
has body: It happens because you're passing strings as arguments. getRandomInt('0', '256') // 1540 What happens next - is the number returned by Math.floor(Math.random() * (max - min + 1)) expression is concatenated with the min string. You must convert it explicitly to integers using parseInt(rmax, 10)
upvote count: 3
has comment: http://stackoverflow.com/comment/43031808
type: Answer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/27281537
answers question: http://stackoverflow.com/q/27281537
has comment: http://stackoverflow.com/comment/43031781
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43031837

http://stackoverflow.com/comment/42857748
comment on: http://stackoverflow.com/a/27169490
score: 0
type: AnswerComment
has text: The problem I keep having is that it just opens the link as a new page instead of it appearing inside of the "pages" div.
type: Comment

http://stackoverflow.com/q/27209118
accepted answer: http://stackoverflow.com/a/27210629
has body: I have a problem with this code i just want to know if there is a way in that the array isn't repeated at the end of the loop. HTML: word Javascript: $(function () { var data = {"seed": [ { "num1":"title1", "num2":"title2", "num3": [ "1","2","3" ] }, { "num1":"title3", "num2":"title4", "num3": [ "a","b","c" ] }, { "num1":"title5", "num2":"title6", "num3": [ "d","gh","34" ] } ]}; var conta = data.seed.length; var recorre = data.seed; //alert(conta); function getNumbers() { var jokeId = Math.floor((Math.random()*conta)); var joke = $('.word'); var result = data.seed[jokeId].num3; var categ = data.seed[jokeId].num1; joke.empty() for (var c in result) { var newElement = document.createElement('div'); newElement.id = result[c]; newElement.innerHTML = result[c]; joke.append(newElement); } } $( "button" ).click(function() { getNumbers(); }); });
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42902237
has comment: http://stackoverflow.com/comment/42902693
tagged with: random
has comment: http://stackoverflow.com/comment/42900128
tagged with: arrays
has answer: http://stackoverflow.com/a/27210629
answer count: 1
has title: Random data in array without repeat
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/71179918
score: 0
has text: Hi @Kaido, thanks for the reply. I am using IE11 (has to be IE11 and I know everyone using the system it will be on IE11). I have finally got it to work using canvg! Thanks! The method on this link [save file to SharePoint](http://www.cardinalsolutions.com/blog/2014/12/export_svg_sharepoint_library) is what got me exactly what I needed
type: Comment
comment on: http://stackoverflow.com/a/33227005
type: AnswerComment

http://stackoverflow.com/q/27283673
upvote count: 1
has answer: http://stackoverflow.com/a/27587061
has title: How to get JS results in webkit2gtk-4.0 in Vala?
type: AnsweredQuestion
score: 1
type: Question
has body: I am using webkit2gtk-4.0 in my Vala appication to display Google Maps. And I need to get marker coordinates on button click. How can I manage it? I figured out how to run javascript using run_javascript(), but I can't understand hot to get the results of it.
accepted answer: http://stackoverflow.com/a/27587061
downvote count: 0
tagged with: javascript
tagged with: webkitgtk
tagged with: vala
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/16885242

http://stackoverflow.com/a/54567557
has comment: http://stackoverflow.com/comment/101251201
score: 0
answers question: http://stackoverflow.com/q/27280461
type: Answer
has body: I fixed with the following markup #txtPassword { -webkit-text-security: disc; } Login
has comment: http://stackoverflow.com/comment/99119708

prototype
tags question: http://stackoverflow.com/q/27177507
tags question: http://stackoverflow.com/q/27307465
tags question: http://stackoverflow.com/q/27173578
tags question: http://stackoverflow.com/q/27204673
tags question: http://stackoverflow.com/q/27285716
tag name: prototype
type: Tag
tags question: http://stackoverflow.com/q/27213678
tags question: http://stackoverflow.com/q/27198434

http://stackoverflow.com/comment/42997525
type: AnswerComment
comment on: http://stackoverflow.com/a/27262346
has text: Thanks! I was searching for hours and then 2 minutes after I posted this, I found it. But since your answer is correct, you get the check. :-)
type: Comment
score: 0

http://stackoverflow.com/comment/42904905
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27165736
has text: Hi Leo. Thanks again for your contribution. I do have a CSS transition for this class, but it is not working in pair with the JS. The JS plugin I am using, add styles to an element when it is visible in the viewport. Once the element in the viewport, rather than transitioning .reveal's attributes unto the element, the element appears with .reveal already added, thus with no transition. This is why I would like the element to be visible as it, delay, then add .reveal so there is a transition from div to div.reveal. Does that make sense?
type: AnswerComment

http://stackoverflow.com/q/27307635
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27307729
downvote count: 0
tagged with: javascript
score: 4
answer count: 3
has answer: http://stackoverflow.com/a/27307753
has comment: http://stackoverflow.com/comment/43077599
favorite count: 0
has comment: http://stackoverflow.com/comment/43077505
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/32744127
tagged with: d3.js
has title: D3.js IE vs Chrome SVG not showing
has body: I have a simple D3 donut diagram with a .mouseover() event that updates an SVG:text element at the center of the donut hole. It works great... Until I encounter users with IE 9, 10 and 11. These browsers won't render the center label. Is there a way to accommodate IE and show the center label in both browsers? The HTML page is based on HTML5BoilerPlate with the various shims to detect old browsers. The D3 script seems pretty straight forward. d3.json("data/census.php", function(error, dataset) { var h = 220, w = 295; var outerRadius = h / 2, innerRadius = w / 4; var color = d3.scale.category20b(); var svg= d3.select("#dailycensus") .append("svg") .data([dataset]) .attr("width", w) .attr("height", h) .append("svg:g") .attr("transform", "translate(" + outerRadius + "," + outerRadius + ")"); var arc = d3.svg.arc() .innerRadius(innerRadius) .outerRadius(outerRadius); var pie = d3.layout.pie() .value(function(d,i) { return +dataset[i].Census; }); var arcs = svg.selectAll("g.slice") .data(pie) .enter() .append("svg:g") .attr("class", "slice"); var syssum = d3.sum(dataset, function(d,i) { return +dataset[i].Census; }); var tip = d3.tip() .attr("class", "d3-tip") .html(String); var formatter = d3.format(".1%"); svg.append("text") .attr("id", "hospital") .attr("class", "label") .attr("y", -10) .attr("x", 0) .html("Health System Census"); // Default label text svg.append("text") .attr("id", "census") .attr("class", "census") .attr("y", 40) .attr("x", 0) .html(syssum); // Default label value arcs.append("svg:path") .call(tip) // Initialize the tooltip in the arc context .attr("fill", function(d,i) { return color(i); }) // Color the arc .attr("d", arc) .on("mouseover", function(d,i) { tip.show( formatter(dataset[i].Census/syssum) ); // Update the doughnut hole label with slice meta data svg.select("#hospital").remove(); svg.select("#census").remove(); svg.append("text") .attr("id", "hospital") .attr("class", "label") .attr("y", -10) .attr("x", 0) .html(dataset[i].Facility); svg…
type: AnsweredQuestion
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/27307753
tagged with: internet-explorer-11
possible better answer: http://stackoverflow.com/a/27307729

http://stackoverflow.com/q/27189499
tagged with: postmessage
upvote count: 1
type: Question
downvote count: 0
has title: Dart Language: MessageEvent.source not working properly on JavaScript
tagged with: javascript
has comment: http://stackoverflow.com/comment/42869425
tagged with: dart
has comment: http://stackoverflow.com/comment/42870870
favorite count: 0
type: UnansweredQuestion
has body: I'm starting a listener on a MessageEvent, as follows: window.onMessage.listen((MessageEvent e) { if (e.source == newWindow) { // Do something. } }); And I'm opening "newWindow" like this: newWindow = window.open("some_page.html", ""); Now let's get to the unexpected behavior: (e.source == newWindow) Dart returns TRUE, while JavaScript (build from Dart Editor) returns FALSE. Just to clarify, when "newWindow" sends a message to its opener (via window.opener.postMessage), my application should accept the message, since "source equals to newWindow". And it is, in fact, working. However just on Dart code. When the application is executed via JavaScript, this doesn't work. The verifying of "e.source equals to newWindow" returns false. Any ideas on why this is happening?
answer count: 0
score: 1

http://stackoverflow.com/a/27225270
upvote count: 1
downvote count: 1
has body: Try this:- var query; query[x]={}; query[x][y]=z;
score: 0
has comment: http://stackoverflow.com/comment/42928946
has comment: http://stackoverflow.com/comment/42928568
has comment: http://stackoverflow.com/comment/42928460
type: Answer
answers question: http://stackoverflow.com/q/27225166

http://stackoverflow.com/q/27156990
has title: Setting ID input (DOM) issue
type: Question
score: -2
has comment: http://stackoverflow.com/comment/42808353
has answer: http://stackoverflow.com/a/27157400
tagged with: javascript
answer count: 2
upvote count: 0
has body: I wonder why this won't work. I'm trying to set an ID on two input-field, so I can grab it, then use it in a function. I can create the elements and then set an ID, but my task requires me to do it this way (School project). var div = document.getElementById('div'); var p = document.createElement('p'); var butt = document.createElement('input'); var inputOne = document.createElement('input'); var inputTwo = document.createElement('input'); div.appendChild(inputOne); div.appendChild(inputTwo); inputOne.SetAttribute="type","text"; inputOne.placeholder="Something"; inputTwo.SetAttribute="type","number"; inputTwo.placeholder="SomethingElese"; butt.type="button"; butt.value="clickMe!"; div.appendChild(butt); butt.onclick=func(); inputOne.SetAttribute="id","MyID"; function func(){ var text = document.getElementById('MyID').value; alert(text); }
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27157023
downvote count: 2
has comment: http://stackoverflow.com/comment/42808166
has comment: http://stackoverflow.com/comment/42814844

http://stackoverflow.com/comment/43078692
type: Comment
has text: after that how to store to database. did i need 100 column for that? in case user want input 100 data? how about suddenly user want input 200 data? here im stuck. i dont know what table structre i want to use..
type: AnswerComment
comment on: http://stackoverflow.com/a/27290647
score: 0

http://stackoverflow.com/q/27198525
tagged with: three.js
upvote count: 24
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/48042492
has answer: http://stackoverflow.com/a/48042492
tagged with: javascript
has answer: http://stackoverflow.com/a/27200267
score: 24
answer count: 2
accepted answer: http://stackoverflow.com/a/27200267
has body: What is PlaneBufferGeometry exactly and how it is different from PlaneGeometry? (r69)
downvote count: 0
favorite count: 0
has title: Three.js - What is PlaneBufferGeometry

http://stackoverflow.com/comment/79254552
comment on: http://stackoverflow.com/a/27232525
score: 1
has text: problem with this answer is only a piece of the ger=nerated image appear converted to png image, not the whole svg image converted
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27194925
has comment: http://stackoverflow.com/comment/42875173
has comment: http://stackoverflow.com/comment/42875203
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Strategy for managing blocks of template markup
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27195063
type: Question
score: 1
tagged with: javascript
has body: I need a way to manage blocks of HTML in my scripts, as I'm told my way is too unreadable. Typically, I would write something like the following: app.templates = (function () { return { status: '{0} {1}', date: '{0} - {1}', details: ' {0} cart \ {1} total \ {2} items ' Then I'd do something like: $('.status').html(utls.format(app.templates.status, status)); I do have to manage a non-trivial number of these template blocks, can anyone point me in the direction of a better strategy to do this?
accepted answer: http://stackoverflow.com/a/27195063

http://stackoverflow.com/q/27267022
has title: Gulp - Error Causing Task to Stop
answer count: 1
downvote count: 0
tagged with: gulp
favorite count: 0
tagged with: browserify
has body: I'm setting up a project using Gulp along with Browserify but I'm having a little trouble with getting the watch command to catch errors and keep on watching. I run a 'gulp' command using the default task (code below). This task sets up using watch to catch any changes in my files, then compiles my js using Browserify and also compiles my scss files. All goes well unless I make a syntax error in my js. Basically, if that happens the console shows the error but ceases to catch anymore changes to my js files. I had originally omitted the error handling which was causing the whole watch task to fail but now I have that in there - the watch task is still going and it works just fine for my scss (even if I make a syntax error) but it won't catch any changes at all to my js. var gulp = require('gulp'), gutil = require('gulp-util'), browserify = require('browserify'), changed = require('gulp-changed'), compass = require('gulp-compass'), uglify = require('gulp-uglify'), livereload = require('gulp-livereload'), transform = require('vinyl-transform'), sassSources = ['_src/sass/**/*.scss'], jsSources = ['_src/js/admin.js', '_src/js/main.js']; var onError = function (err) { gutil.log(gutil.colors.green(err)); }; gulp.task('js', function() { var browserified = transform(function(filename) { var b = browserify(filename); return b.bundle(); }); return gulp.src(jsSources) .pipe(browserified) .pipe(uglify()) .pipe(gulp.dest('assets/js')) }); gulp.task('js-dev', function() { var browserified = transform(function(filename) { var b = browserify(filename); return b.bundle(); }); return gulp.src(jsSources) .pipe(browserified) .on('error', onError) .pipe(gulp.dest('assets/js')) .pipe(livereload()) }); gulp.task('sass', function() { gulp.src(sassSources) .pipe(compass({ style: 'compressed', sass: '_src/sass', css: 'assets/css', font: 'assets/fonts', image: 'assets/images', javascript: 'assets/js', relative: true, require: ['breakpoint'] })) .pipe(gulp.dest('assets/css')) }); gulp.task('sas…
accepted answer: http://stackoverflow.com/a/27267093
tagged with: node.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27267093

http://stackoverflow.com/comment/42983305
comment on: http://stackoverflow.com/q/27235456
has text: I tried it out, and it looks to me very manual. As I am working with dynamic data, I need the tables to be updated frequently (like every 10s). I don't see how that would work with Fusion Tables as it only supports a manual input for the moment?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27157540
upvote count: 6
score: 6
answers question: http://stackoverflow.com/q/27157361
has comment: http://stackoverflow.com/comment/95363112
has body: The browser downloads the HTML source and parses it into a DOM (document object model). Any issues are fixed as good as possible, and elements that can be omitted in the source might be added in the DOM. From that moment on, this memory structure is used to render the page, and it is this structure as well what you refer to in JavaScript. So if you request the innerHTML of an element, you just get a piece of HTML source code that is rendered based on the DOM. The original source is not available at all in JavaScript. So, that's the reason why it happens. And also there is not much you can do about it. I think the only workaround is to re-load the entire page using AJAX into a string and get the required piece of source yourself. But a better solution, obviously, would be to remove those "misuses" and make your HTML source valid. If you just need to enclose some information in the page to be used by JavaScript alone, you might choose to embed a script tag that initializes a couple of variables with those values, rather than generating some invalid HTML.
has comment: http://stackoverflow.com/comment/42809842
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27157361
has comment: http://stackoverflow.com/comment/42809410
type: Answer
has comment: http://stackoverflow.com/comment/42809614

coding-style
tags question: http://stackoverflow.com/q/27180514
tags question: http://stackoverflow.com/q/27287507
tags question: http://stackoverflow.com/q/27214520
tags question: http://stackoverflow.com/q/27294743
type: Tag
tag name: coding-style

http://stackoverflow.com/comment/43053853
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27294460
score: 0
has text: Which IE Version are you talking about?

angularjs
tags question: http://stackoverflow.com/q/27243474
tags question: http://stackoverflow.com/q/27235196
tags question: http://stackoverflow.com/q/27298526
tags question: http://stackoverflow.com/q/27197028
tags question: http://stackoverflow.com/q/27243922
tags question: http://stackoverflow.com/q/27172394
tags question: http://stackoverflow.com/q/27189440
tags question: http://stackoverflow.com/q/27160285
tags question: http://stackoverflow.com/q/27310364
tags question: http://stackoverflow.com/q/27162387
tags question: http://stackoverflow.com/q/27301932
tags question: http://stackoverflow.com/q/27204967
tags question: http://stackoverflow.com/q/27198060
tags question: http://stackoverflow.com/q/27303692
tags question: http://stackoverflow.com/q/27254823
tags question: http://stackoverflow.com/q/27248760
tags question: http://stackoverflow.com/q/27262270
tags question: http://stackoverflow.com/q/27313051
tags question: http://stackoverflow.com/q/27196952
tags question: http://stackoverflow.com/q/27178725
tags question: http://stackoverflow.com/q/27240776
tags question: http://stackoverflow.com/q/27199659
tags question: http://stackoverflow.com/q/27209829
tags question: http://stackoverflow.com/q/27155476
tags question: http://stackoverflow.com/q/27279123
tags question: http://stackoverflow.com/q/27174487
tags question: http://stackoverflow.com/q/27222535
tags question: http://stackoverflow.com/q/27162072
tags question: http://stackoverflow.com/q/27172871
tags question: http://stackoverflow.com/q/27248322
tags question: http://stackoverflow.com/q/27297102
tags question: http://stackoverflow.com/q/27271162
tags question: http://stackoverflow.com/q/27287734
tags question: http://stackoverflow.com/q/27228217
tags question: http://stackoverflow.com/q/27297995
tags question: http://stackoverflow.com/q/27192157
tags question: http://stackoverflow.com/q/27164526
tags question: http://stackoverflow.com/q/27152812
tags question: http://stackoverflow.com/q/27160680
tags question: http://stackoverflow.com/q/27251235
tags question: http://stackoverflow.com/q/27240657
tags question: http://stackoverflow.com/q/27190104
tags question: http://stackoverflow.com/q/27283195
tags question: http://stackoverflow.com/q/27189430
tags question: http://stackoverflow.com/q/27288967
tags question: http://stackoverflow.com/q/27235720
tags question: http://stackoverflow.com/q/27254207
tags question: http://stackoverflow.com/q/27249098
tags question: http://stackoverflow.com/q/27222662
tags question: http://stackoverflow.com/q/27191123
tags question: http://stackoverflow.com/q/27204198
tags question: http://stackoverflow.com/q/27238406
tags question: http://stackoverflow.com/q/27226868
tags question: http://stackoverflow.com/q/27236322
tags question: http://stackoverflow.com/q/27202749
tags question: http://stackoverflow.com/q/27154027
tags question: http://stackoverflow.com/q/27154764
tags question: http://stackoverflow.com/q/27266964
tags question: http://stackoverflow.com/q/27294929
tags question: http://stackoverflow.com/q/27223418
tags question: http://stackoverflow.com/q/27201729
tags question: http://stackoverflow.com/q/27160485
tags question: http://stackoverflow.com/q/27170072
tags question: http://stackoverflow.com/q/27221222
type: Tag
tags question: http://stackoverflow.com/q/27181630
tags question: http://stackoverflow.com/q/27258434
tags question: http://stackoverflow.com/q/27207802
tags question: http://stackoverflow.com/q/27221625
tags question: http://stackoverflow.com/q/27179043
tags question: http://stackoverflow.com/q/27217152
tags question: http://stackoverflow.com/q/27296507
tags question: http://stackoverflow.com/q/27241650
tags question: http://stackoverflow.com/q/27260739
tags question: http://stackoverflow.com/q/27211983
tags question: http://stackoverflow.com/q/27207291
tags question: http://stackoverflow.com/q/27247495
tags question: http://stackoverflow.com/q/27170431
tags question: http://stackoverflow.com/q/27288242
tags question: http://stackoverflow.com/q/27310829

http://stackoverflow.com/a/27240745
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27240659
type: Answer
score: 2
upvote count: 2
has body: There are a few issues here related to proper escaping and enclosure of strings; I personally use printf() to print HTML, this is what it would look like: printf(' ', htmlspecialchars($playerLine, ENT_QUOTES, 'UTF-8'); ); This piece of code in particular is tricky: echo "".$playerLine.""; The problem is that $playerLine doesn't contain JavaScript string enclosures and so it would attempt to resolve EV-F1 into EV - F1 (i.e., the subtraction of EV and F1). To fix that, you need to encode the variable using JSON and then apply HTML escaping: printf('%s', htmlspecialchars(json_encode($playerLine), ENT_QUOTES, 'UTF-8'), htmlspecialchars($playerLine), ENT_QUOTES, 'UTF-8') );
has comment: http://stackoverflow.com/comment/42958103
answers question: http://stackoverflow.com/q/27240659

http://stackoverflow.com/comment/42891472
has text: I haven't fix it unfortunately. You can see the error when you click on one of the repo.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27204198

http://stackoverflow.com/comment/42876810
type: AnswerComment
has text: BTW `getPerfResults()` retrieves the *average* execution time of each global function in relation to `performance.now()`.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27195301

url
tags question: http://stackoverflow.com/q/27191949
tag name: url
tags question: http://stackoverflow.com/q/27241326
tags question: http://stackoverflow.com/q/27232298
tags question: http://stackoverflow.com/q/27225775
tags question: http://stackoverflow.com/q/27196224
tags question: http://stackoverflow.com/q/27193948
tags question: http://stackoverflow.com/q/27188608
tags question: http://stackoverflow.com/q/27288108
tags question: http://stackoverflow.com/q/27221748
tags question: http://stackoverflow.com/q/27195704
tags question: http://stackoverflow.com/q/27247489
tags question: http://stackoverflow.com/q/27219712
tags question: http://stackoverflow.com/q/27250338
tags question: http://stackoverflow.com/q/27218188
type: Tag

http://stackoverflow.com/q/27226868
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42931506
has body: I add ui-bootstrap-tpls-0.12.0.js to my project and us accordion and now I wanna use pagination but i get this error ngModelCtrl.$render is not a function here is my code i add ui.bootstrap angular.module("boors", ['ui.router','ui.bootstrap','angularUtils.directives.uiBreadcrumbs','ngAnimate','truncate']); and in my script tag i have <script src="<?=$this->assetsBase?>/js/lib/ui-bootstrap-tpls-0.12.0.js"> accordion works fine but pagination doesnt work
type: Question
type: AnsweredQuestion
tagged with: pagination
accepted answer: http://stackoverflow.com/a/27227094
answer count: 2
has comment: http://stackoverflow.com/comment/42931462
downvote count: 0
has answer: http://stackoverflow.com/a/27227088
tagged with: javascript
tagged with: angular-ui-bootstrap
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27227088
has title: pagination in angular js ui.bootstrap doesnt work for me
score: 2
has answer: http://stackoverflow.com/a/27227094
upvote count: 2

http://stackoverflow.com/comment/42965628
comment on: http://stackoverflow.com/a/27244286
score: 0
type: AnswerComment
has text: yes thanks its working fine but problem is that when im loading the page first it shows green color then it changes to red...how to fix it
type: Comment

http://stackoverflow.com/comment/42995892
type: QuestionComment
score: 1
has text: This may help:http://javascript.about.com/library/bltoword.htm
comment on: http://stackoverflow.com/q/27261402
type: Comment

http://stackoverflow.com/comment/42937901
type: AnswerComment
type: Comment
has text: Hi $collin thanks for you help, I also tried what you suggested in you pastebin and I never get to see the second message, I even increase the time to `this.timeout(10000);` and didn't work, my guess is that faking a click is disrupting the app
comment on: http://stackoverflow.com/a/27181803
score: 0

php
tags question: http://stackoverflow.com/q/27189317
tags question: http://stackoverflow.com/q/27271521
tags question: http://stackoverflow.com/q/27199669
tags question: http://stackoverflow.com/q/27274324
tags question: http://stackoverflow.com/q/27203128
tags question: http://stackoverflow.com/q/27178702
tags question: http://stackoverflow.com/q/27277566
tags question: http://stackoverflow.com/q/27290734
tags question: http://stackoverflow.com/q/27167709
tags question: http://stackoverflow.com/q/27193320
tags question: http://stackoverflow.com/q/27166712
tags question: http://stackoverflow.com/q/27293482
tags question: http://stackoverflow.com/q/27201553
tags question: http://stackoverflow.com/q/27261042
tags question: http://stackoverflow.com/q/27200581
tags question: http://stackoverflow.com/q/27233048
tags question: http://stackoverflow.com/q/27182628
tags question: http://stackoverflow.com/q/27190309
tags question: http://stackoverflow.com/q/27311756
tags question: http://stackoverflow.com/q/27286992
tags question: http://stackoverflow.com/q/27176465
tags question: http://stackoverflow.com/q/27163211
tags question: http://stackoverflow.com/q/27199336
tags question: http://stackoverflow.com/q/27197662
tags question: http://stackoverflow.com/q/27227733
tags question: http://stackoverflow.com/q/27183467
tags question: http://stackoverflow.com/q/27284595
tags question: http://stackoverflow.com/q/27261240
tags question: http://stackoverflow.com/q/27266660
tags question: http://stackoverflow.com/q/27181096
tags question: http://stackoverflow.com/q/27184612
tags question: http://stackoverflow.com/q/27195491
tags question: http://stackoverflow.com/q/27283501
tags question: http://stackoverflow.com/q/27249720
tags question: http://stackoverflow.com/q/27224422
tags question: http://stackoverflow.com/q/27289129
tags question: http://stackoverflow.com/q/27296364
tags question: http://stackoverflow.com/q/27200134
tags question: http://stackoverflow.com/q/27257166
tags question: http://stackoverflow.com/q/27222202
tags question: http://stackoverflow.com/q/27267511
tags question: http://stackoverflow.com/q/27273444
tags question: http://stackoverflow.com/q/27278558
tags question: http://stackoverflow.com/q/27201699
tags question: http://stackoverflow.com/q/27279728
tags question: http://stackoverflow.com/q/27312834
tags question: http://stackoverflow.com/q/27311956
tags question: http://stackoverflow.com/q/27199204
tags question: http://stackoverflow.com/q/27264018
tags question: http://stackoverflow.com/q/27261902
tags question: http://stackoverflow.com/q/27207605
tags question: http://stackoverflow.com/q/27296633
tags question: http://stackoverflow.com/q/27183066
tags question: http://stackoverflow.com/q/27282891
tags question: http://stackoverflow.com/q/27158582
tags question: http://stackoverflow.com/q/27193870
tags question: http://stackoverflow.com/q/27166277
tags question: http://stackoverflow.com/q/27264749
tags question: http://stackoverflow.com/q/27252990
tags question: http://stackoverflow.com/q/27293347
tags question: http://stackoverflow.com/q/27240898
tags question: http://stackoverflow.com/q/27249529
tags question: http://stackoverflow.com/q/27267629
tags question: http://stackoverflow.com/q/27221894
tags question: http://stackoverflow.com/q/27225937
tags question: http://stackoverflow.com/q/27293537
tags question: http://stackoverflow.com/q/27170992
tags question: http://stackoverflow.com/q/27295967
tags question: http://stackoverflow.com/q/27213873
tags question: http://stackoverflow.com/q/27297005
tags question: http://stackoverflow.com/q/27257328
tags question: http://stackoverflow.com/q/27303981
tags question: http://stackoverflow.com/q/27172429
tags question: http://stackoverflow.com/q/27199728
tags question: http://stackoverflow.com/q/27241995
tags question: http://stackoverflow.com/q/27153827
tags question: http://stackoverflow.com/q/27271169
tags question: http://stackoverflow.com/q/27183056
tags question: http://stackoverflow.com/q/27173396
tags question: http://stackoverflow.com/q/27177224

http://stackoverflow.com/comment/42967070
comment on: http://stackoverflow.com/a/27244095
score: 0
type: AnswerComment
type: Comment
has text: Thanks a lot! I did your step and I didnt able to connect,I got error unable to connect,any idea why I put the exact user and pass...,maybe firewall or something....?

http://stackoverflow.com/a/27218885
has comment: http://stackoverflow.com/comment/42918116
answers question: http://stackoverflow.com/q/27218791
has body: In order to properly stop, you'll need to store a handle to the interval to clear later: var itvlReload; function start() { itvlReload = setInterval(reload, ms); } function stop() { clearInterval(itvlRload); } This removes the need for the exe variable. Alternatively, in your reload function, query exe: function reload() { if (exe) { document.getElementById('update_frame').contentWindow.location.reload(true); } } Finally, you don't actually need sleep() (it's actually quite bad, since it uses up cycles even when "idle"), since you're using an interval.
has comment: http://stackoverflow.com/comment/42917233
score: 0
has comment: http://stackoverflow.com/comment/42918978
type: Answer

http://stackoverflow.com/a/27229193
type: Answer
answers question: http://stackoverflow.com/q/27228951
has body: You can also use data attributes then: var btn = document.getElementById("my-button") btn.dataset.a=="ndTh6ffu77AKIx8ZpViA" //true //etc..
score: 0

http://stackoverflow.com/q/27167350
has title: node.js Buffer not empty
has comment: http://stackoverflow.com/comment/93294011
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: When I create lots of Buffers they aren't always empty: for (var i = 0; i &lt; 100; i++) { console.log((new Buffer(30)).toString('hex')); } (Partial) Output: 782668013a0000003b00000035000000b0c17900391100003c0000003d00 e4216801ffffffff000000000100000000000000000000003e0000003f00 40c27900100000000100000000000000000000000000000018c379000000 000000000000000000000000000000000000000000000000000000000000 --&gt; Empty 000000000000000000000000000000000000000000000000000000000000 --&gt; Empty 0000000000000000108269014000000041000000c86f79000cf679000000 6611000080c27900c0c27900040000000100000000000000d0c279000000 00000000000000005c2468014200000043000000cc6f7900002668014400 (Partial) Output (without .toString('hex') and only new Buffer(10)): &lt;Buffer 01 00 00 00 58 db 62 00 b4 86&gt; &lt;Buffer 90 b9 65 00 08 00 00 00 03 00&gt; &lt;Buffer 10 ba 65 00 04 00 00 00 00 00&gt; &lt;Buffer 04 00 00 00 00 00 00 00 00 00&gt; &lt;Buffer 10 00 00 00 00 00 00 00 70 ba&gt; &lt;Buffer 00 00 00 00 00 00 00 00 00 00&gt; --&gt; Empty &lt;Buffer 00 00 00 00 00 00 00 00 00 00&gt; --&gt; Empty &lt;Buffer ff ff ff ff ff ff ff ff 00 00&gt; &lt;Buffer 00 00 00 00 0f 00 00 00 8c 6f&gt; &lt;Buffer 80 ba 65 00 00 00 00 00 aa 00&gt; I'm running node.js v0.10.33 on a 32-bit Windows 7 machine. Is this a problem with my specific machine? Is this a general problem (aka. bug) of node.js? Is this a problem of a special composition (e.g. only Windows environments)? Is this expected and I have to clear the Buffer before I start using it? Is this documented? Update: Better behaviour on v0.11.14, worse behaviour on v0.8.28
has answer: http://stackoverflow.com/a/27169268
possible better answer: http://stackoverflow.com/a/41632560
tagged with: buffer
has answer: http://stackoverflow.com/a/41632560
tagged with: node.js
favorite count: 0
accepted answer: http://stackoverflow.com/a/27169268

http://stackoverflow.com/comment/42845229
has text: ah ok. let me try it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27178164
score: 0

http://stackoverflow.com/a/27201918
downvote count: 0
has body: 1) Set width and height attributes on your canvas element instead of applying a css style i.e: You don't support canvas. 2) divide the value of gravity by 60 because your update function is invoked every 1/60th of a second i.e: this.start = function (angle, velocity) { this.gravity = 9.8 / 60; this.angle = angle / 180 * Math.PI; // convert to radians this.velX = velocity * Math.cos(this.angle); this.velY = velocity * Math.sin(this.angle); this.accX = 0; // zero intially this.accY = 0; // TODO: set option for user to set himself }; 3) change the update function to: this.update = function () { this.velY += this.gravity; this.x += this.velX; this.y += this.velY; }; 4) move the ctx.clearRect method outside the for loop otherwise you will only see one ball animating always i.e setInterval(function () { ctx.clearRect(0, 0, WIDTH, HEIGHT); for (var i = 0, len = balls.length; i < len; i++) { balls[i].draw(); balls[i].update(); } }, 1000 / 60); // 1000/x depicts x fps Here the updated js-fiddle: http://jsfiddle.net/km6ozj6L/1/
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27201755
score: 1
answers question: http://stackoverflow.com/q/27201755
has comment: http://stackoverflow.com/comment/42887166
has comment: http://stackoverflow.com/comment/42887125
type: AcceptedAnswer

http://stackoverflow.com/q/27270073
score: 0
has title: Setting HTML check box to check using javascript
has body: I have a constructor that creates a series of checkboxes inside a loop. I am trying to set the checkboxes to checked, but it is not working. The code is below: function customMultiSelect(pDiv, pOptions, inputID, currentSelected) { this.Div = pDiv; this.options = pOptions; this._initialise(); for (var idxOption = 0; idxOption &lt; pOptions.length; idxOption++) { var checkbox = document.createElement("input"); checkbox.type = "checkbox"; checkbox.style.width = "30px"; checkbox.style.border = "none"; checkbox.style.float = "right"; if (pOptions[idxOption] != "") { var arrTemp2 = pOptions[idxOption].split(","); var sText = arrTemp2[0]; if (arrTemp2.length &gt; 1) { sText = arrTemp2[1]; } checkbox.value = arrTemp2[0]; checkbox.id = inputID + "|" + idxOption; checkbox.checked = true; var textLabel = document.createElement("label"); textLabel.appendChild(checkbox); textLabel.innerHTML += arrTemp2[1]; textLabel.style.display = "block"; textLabel.style.clear = "right"; } this.Div.appendChild(textLabel); } }
type: Question
answer count: 2
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has answer: http://stackoverflow.com/a/27270587
has answer: http://stackoverflow.com/a/27270451
type: UnansweredQuestion

http://stackoverflow.com/comment/42981415
type: Comment
has text: @ruffin alex already edited the answer after Benjamin's comment. :)
score: 0
comment on: http://stackoverflow.com/a/27252940
type: AnswerComment

http://stackoverflow.com/q/27220516
has answer: http://stackoverflow.com/a/27408801
tagged with: javascript
has comment: http://stackoverflow.com/comment/42920151
tagged with: input
has title: Google Maps JavaScript API v3 - Autocomplete fields on webpage viewed on iPhone do not store a value, returns no places
accepted answer: http://stackoverflow.com/a/27408801
type: AnsweredQuestion
tagged with: autocomplete
has body: I'm building a web page which has two text fields and a Google Map. A user enters a start location in the first box and a destination in the second box, then they get some info back from Google about the distance, etc. The text boxes are hooked up for Autocomplete for Places, so as you start typing a list of suggestions should appear. The problem I'm having is that on iPhones the text boxes are not holding a value. As soon as I move focus away from the field I am editing, (e.g. tap the next text box,) the text I have entered goes away. Also, no autocomplete results are appearing, so the user can't pick one to then trigger a place_changed event and carry on getting the distance, etc. Example code here showing the problem: http://comparerideshare.com/test.html Testing: Works fine on desktop browsers, (tried FF, Chrome and Safari on OSX so far.) Works fine on my Nexus 7 tablet using Chrome. Didn't try other browsers. Didn't try an Android phone. Works fine using Safari in iOS Simulator, (set to iPhone 5S,) and on an iPad Air, (which may have been running iOS7.) Didn't test other browsers. Does not work on my iPhone 5S with iOS 8.1 using Safari or Chrome. Didn't try other versions of iOS, other iPhone models or other browsers. How can I resolve this? Are things working as expected, but perhaps there is a resolution limit for showing autocomplete results? If so, do I have to disable autocomplete for lower resolutions and do something else or those users?
tagged with: google-maps-api-3
type: Question
score: 0
tagged with: iphone
answer count: 1

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/27298063
tags question: http://stackoverflow.com/q/27169906
tags question: http://stackoverflow.com/q/27299061
tags question: http://stackoverflow.com/q/27181302
tags question: http://stackoverflow.com/q/27160299
tags question: http://stackoverflow.com/q/27267540
tags question: http://stackoverflow.com/q/27178451
tags question: http://stackoverflow.com/q/27193355
tags question: http://stackoverflow.com/q/27297540
tags question: http://stackoverflow.com/q/27262111
tags question: http://stackoverflow.com/q/27198999
tags question: http://stackoverflow.com/q/27263961
tags question: http://stackoverflow.com/q/27264120
tags question: http://stackoverflow.com/q/27169730
tags question: http://stackoverflow.com/q/27233629
tags question: http://stackoverflow.com/q/27198744
tags question: http://stackoverflow.com/q/27311274
tags question: http://stackoverflow.com/q/27255775
tags question: http://stackoverflow.com/q/27289740
tags question: http://stackoverflow.com/q/27211497
tags question: http://stackoverflow.com/q/27267575
tags question: http://stackoverflow.com/q/27258767
tags question: http://stackoverflow.com/q/27169017
tags question: http://stackoverflow.com/q/27230293
tags question: http://stackoverflow.com/q/27220456
tags question: http://stackoverflow.com/q/27284935
tags question: http://stackoverflow.com/q/27285558
tags question: http://stackoverflow.com/q/27266885
tags question: http://stackoverflow.com/q/27238100
tags question: http://stackoverflow.com/q/27199577
tags question: http://stackoverflow.com/q/27256077
tags question: http://stackoverflow.com/q/27262156
tags question: http://stackoverflow.com/q/27166102
tags question: http://stackoverflow.com/q/27240659
tags question: http://stackoverflow.com/q/27270820
tags question: http://stackoverflow.com/q/27190634
tags question: http://stackoverflow.com/q/27244572
tags question: http://stackoverflow.com/q/27152872
tags question: http://stackoverflow.com/q/27230771
tags question: http://stackoverflow.com/q/27287018
tags question: http://stackoverflow.com/q/27246019
tags question: http://stackoverflow.com/q/27254250
tags question: http://stackoverflow.com/q/27277078
tags question: http://stackoverflow.com/q/27218054
tags question: http://stackoverflow.com/q/27186410
tags question: http://stackoverflow.com/q/27164525
tags question: http://stackoverflow.com/q/27206488
tags question: http://stackoverflow.com/q/27268784
tags question: http://stackoverflow.com/q/27186113
tags question: http://stackoverflow.com/q/27160159
tags question: http://stackoverflow.com/q/27216459
tags question: http://stackoverflow.com/q/27230842
tags question: http://stackoverflow.com/q/27173392
tags question: http://stackoverflow.com/q/27270207
tags question: http://stackoverflow.com/q/27195455
tags question: http://stackoverflow.com/q/27186277
tags question: http://stackoverflow.com/q/27250535
tags question: http://stackoverflow.com/q/27243151
tags question: http://stackoverflow.com/q/27239053
tags question: http://stackoverflow.com/q/27302497
tags question: http://stackoverflow.com/q/27283212
tags question: http://stackoverflow.com/q/27311226
tags question: http://stackoverflow.com/q/27178513
tags question: http://stackoverflow.com/q/27245235
tags question: http://stackoverflow.com/q/27258880
tags question: http://stackoverflow.com/q/27154197
tags question: http://stackoverflow.com/q/27256378
tags question: http://stackoverflow.com/q/27250504
tags question: http://stackoverflow.com/q/27186914
tags question: http://stackoverflow.com/q/27238328
tags question: http://stackoverflow.com/q/27213827
tags question: http://stackoverflow.com/q/27263957
tags question: http://stackoverflow.com/q/27250227
tags question: http://stackoverflow.com/q/27176508
tags question: http://stackoverflow.com/q/27265024
tags question: http://stackoverflow.com/q/27187964
tags question: http://stackoverflow.com/q/27313569
tags question: http://stackoverflow.com/q/27176369
tags question: http://stackoverflow.com/q/27219094
tags question: http://stackoverflow.com/q/27247254

http://stackoverflow.com/comment/43069863
has text: http://jsfiddle.net/L2Looqa4/ What row are each of these blocks in as you collapse the screen? The longer the OP spends trying to solve his layout problem with flawed JS, the more time he will waste.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27303127
score: 0

http://stackoverflow.com/q/27280962
answer count: 2
has comment: http://stackoverflow.com/comment/43030579
favorite count: 0
has answer: http://stackoverflow.com/a/27281080
possible better answer: http://stackoverflow.com/a/27281080
has answer: http://stackoverflow.com/a/27281006
has body: Here is my code: var looptimesfrarray_TEST = reversegridarrayFORUNDEFINE(st_time_formated_TEST); for (var c = 0; c &lt; obj.length - 1; c++) { if (looptimesfrarray_TEST[c] === undefined) { var mycharttime = Highcharts.dateFormat('%H:%M:%P', this.value); return timsesubstringforXaxis(mycharttime); } else { return timsesubstringforgrid(looptimesfrarray_TEST[c]); } } I would like to return return multiple results based on the if/else in the for loop, but my c is not increasing in the loop, so it gives me c = 0 every time. I tried to use break and continue, but they didn’t work. How can I do this?
type: AnsweredQuestion
downvote count: 3
type: Question
upvote count: 0
has title: Using multiple return statements in a for loop
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27281006
score: -3

http://stackoverflow.com/q/27207508
answer count: 1
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/27271992
score: 2
type: AnsweredQuestion
tagged with: bacon.js
has body: Perhaps, having the Bacon.js hammer in hand, everything starts to look like a nail. But this feels like a problem that could be elegantly solved with it, and I don't have enough experience yet to figure it out. Many places in my application need to have their own Bacon.EventStream. Computing the values of these various streams requires some expensive setup and breakdown: var stream1 = Bacon.fromPoll(100, function () { setup(); // expensive var result = compute1(); // cheap breakdown(); // expensive return new Bacon.Next(result); }); // similar for stream2, stream3, etc. But the setup and breakdown is the same for all such streams. Therefore, it makes sense to group as many of those computations together as possible: Bacon.interval(100, function () { setup(); // compute value for property1 // compute value for property2 // compute value for property3 // ... breakdown(); }); But all those independent streams will be set up in different places in the code, and may have different polling rates and such. Each of them should wait for the next available window to compute their value. The pacing would be set by some global stream providing this window. A computation should never be performed outside of a window. As many computations as possible should be grouped within the same window. Preferably, setup and breakdown should not occur if there are no computations to perform. I've been playing around, and the JSFiddle here is the best I've come up with so far. But (1) it isn't correct; .skipWhile(property) seems to only skip one time, and (2) the code is already looking too complex. Can you do better? Edit: I updated the JSFiddle. It's working correctly now. But I wonder whether I'm using best practices. Can this code be simplified?
has title: Having different Bacon.js streams compute their values in the same intermittent window
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27271992
downvote count: 0

http://stackoverflow.com/q/27311411
possible better answer: http://stackoverflow.com/a/27311439
has title: Click function on the table cell
score: 1
answer count: 3
tagged with: function
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: click
favorite count: 0
has answer: http://stackoverflow.com/a/27311476
has answer: http://stackoverflow.com/a/27311436
accepted answer: http://stackoverflow.com/a/27311436
has comment: http://stackoverflow.com/comment/43083491
has answer: http://stackoverflow.com/a/27311439
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26567867
tagged with: twitter-bootstrap
upvote count: 1
has body: I'd like to make a function on click on tabes first cell in each row only. This is table built with plugin and this method does not work $('#ecoTableTotal').find('tr').find('td').eq(0).click(function(){ console.log('click'); }) This one is working, but I need this to click only on the first cell. Is this possible? $('#ecoTableTotal').on('click', 'tr' , function (event) { console.log('click'); }); EDIT: Table is generated using Bootstrap table (http://wenzhixin.net.cn/p/bootstrap-table/docs/index.html). This question is also about the same problem with click function.
type: Question

http://stackoverflow.com/a/27247817
downvote count: 1
has body: You can try this :- $(document).ready(function(){ if($('video').length){ //search for any video tag inside DOM alert("here"); // do whatever you want here } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27247771
upvote count: 1

http://stackoverflow.com/q/27290254
has title: Load Image Instead of link?
accepted answer: http://stackoverflow.com/a/27290395
has body: I have been trying out different methods of how to load an image, I was trying to load the image from a web address but instead of loading the image its just loading the link to the address? I have updated the code which is below (just the sections for loading the cards) however it still only loads the link not the image? Can anyone see where i am going wrong? card js (there are more cards than 2 but for this example I only added two) GABIH20.cards = (function(){ var public_stuff = {}; var cards = [ {name: "Gabi H20", energy: 90, saving: 99, eco: 98, ease: 89, image: 'http://www.lessons4living.com/images/penclchk.gif'}, {name: "Sherlock H20lmes", energy: 30, saving: 70, eco: 35, ease: 60, image:'http://www.sherlock.com/images/penclchk.gif'}, ]; var shuffle = function(v){ //This is just random code I plucked from the Internet. Seems to work for this purpose. for(var j, x, i = v.length; i; j = parseInt(Math.random() * i), x = v[--i], v[i] = v[j], v[j] = x); return v; } public_stuff.get_cards = function() {return cards;} public_stuff.deal_hands = function() { var half_way_point = cards.length / 2; var shuffled_deck = shuffle(cards); return [cards.slice(0, half_way_point), cards.slice(half_way_point)]; } return public_stuff; }()); event js GABIH20 = {}; GABIH20.game = (function(){ var num_rounds_played_in_this_game = 0; var playing_game = false; var player, opponent, player_name; var public_stuff = {}; public_stuff.current_view = "#menu_view"; var populate_card_view = function(player) { var card = player.get_current_card(); $("header .distro_name").html(card.name); $(".attr_image .attr_imgvalue").html(card.image); $(".attr_energy .attr_value").html(card.energy); $(".attr_saving .attr_value").html(card.saving); $(".attr_eco .attr_value").html(card.eco); $(".attr_ease .attr_value").html(card.ease); } public_stuff.playing_game = function() { return playing_game; } public_stuff.get_player_name = function() { return player_name; } HTML You drew the Ubuntu card Now choose an …
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27290395
tagged with: javascript
tagged with: jquery
tagged with: image
score: 0
answer count: 1

http://stackoverflow.com/comment/42830320
type: Comment
score: 0
type: QuestionComment
has text: @ymz the problem is just with the binary file. If I upload it base64 encoded them it works perfectly. It is written correctly. And all works. Just when I transfer it binary it doesn't work. I get the feeling it is because of the non printable characters in certificates
comment on: http://stackoverflow.com/q/27160520

http://stackoverflow.com/comment/42887970
comment on: http://stackoverflow.com/a/27202446
has text: @LiNoimiSemain: Read the link I gave you.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27192719
has comment: http://stackoverflow.com/comment/42872101
has comment: http://stackoverflow.com/comment/42871679
type: Question
tagged with: 3d
has comment: http://stackoverflow.com/comment/42871538
answer count: 1
has body: Good day, all! :) For the past month, I have been working on a function to return 2 or more THREE.js materials in 1 function at 1 time. I've run into a small problem though. For some reason, I can't get this function to return the MeshBasicMaterial object AS WELL AS the MeshLambertMaterial data object. I KNOW my code is right because I've gone over it over 40 times already looking for errors. Here's the WHOLE code: /** * A function for converting hex &lt;-&gt; dec w/o loss of precision. * * The problem is that parseInt("0x12345...") isn't precise enough to convert * 64-bit integers correctly. * * Internally, this uses arrays to encode decimal digits starting with the least * significant: * 8 = [8] * 16 = [6, 1] * 1024 = [4, 2, 0, 1] */ // Adds two arrays for the given base (10 or 16), returning the result. // This turns out to be the only "primitive" operation we need. function add(x, y, base) { var z = []; var n = Math.max(x.length, y.length); var carry = 0; var i = 0; while (i &lt; n || carry) { var xi = i &lt; x.length ? x[i] : 0; var yi = i &lt; y.length ? y[i] : 0; var zi = carry + xi + yi; z.push(zi % base); carry = Math.floor(zi / base); i++; } return z; } // Returns a*x, where x is an array of decimal digits and a is an ordinary // JavaScript number. base is the number base of the array x. function multiplyByNumber(num, x, base) { if (num &lt; 0) return null; if (num == 0) return []; var result = []; var power = x; while (true) { if (num &amp; 1) { result = add(result, power, base); } num = num &gt;&gt; 1; if (num === 0) break; power = add(power, power, base); } return result; } function parseToDigitsArray(str, base) { var digits = str.split(''); var ary = []; for (var i = digits.length - 1; i &gt;= 0; i--) { var n = parseInt(digits[i], base); if (isNaN(n)) return null; ary.push(n); } return ary; } function convertBase(str, fromBase, toBase) { var digits = parseToDigitsArray(str, fromBase); if (digits === null) return null; var outArray = []; var power = [1]…
has comment: http://stackoverflow.com/comment/42872198
tagged with: javascript
has comment: http://stackoverflow.com/comment/42871860
has comment: http://stackoverflow.com/comment/42872522
score: 0
has title: How do you return the resulting object in a function?
has comment: http://stackoverflow.com/comment/42871131
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42871744
tagged with: three.js
has comment: http://stackoverflow.com/comment/42871196
has comment: http://stackoverflow.com/comment/42871261
has comment: http://stackoverflow.com/comment/42871814
has answer: http://stackoverflow.com/a/27204195

http://stackoverflow.com/q/27266857
has body: I'm trying to document an Express middleware, but the build-in validation tool in WebStorm tells me that types are incorrectly assigned in the following JSDoc block: /** * My middleware. * * @param {Object} req * @param {Object} res * @param {Function} next * @return {Object} */ exports.show = function(req, res, next) { ... }; In Express sources, I didn't find any @typedefs to help me. Also, I want to avoid things like @param {*}. What is the correct way to document Express middleware using JSDoc? Thanks for any help.
type: Question
has answer: http://stackoverflow.com/a/36409525
has comment: http://stackoverflow.com/comment/51808551
answer count: 8
tagged with: jsdoc
has comment: http://stackoverflow.com/comment/58627371
has answer: http://stackoverflow.com/a/35543188
score: 69
has answer: http://stackoverflow.com/a/35542535
downvote count: 1
has answer: http://stackoverflow.com/a/56330802
linked to: http://stackoverflow.com/q/57771798
has answer: http://stackoverflow.com/a/65108929
tagged with: javascript
type: UnansweredQuestion
tagged with: webstorm
upvote count: 70
tagged with: express
has comment: http://stackoverflow.com/comment/61946608
has answer: http://stackoverflow.com/a/74284857
has title: How to annotate Express middlewares with JSDoc?
has comment: http://stackoverflow.com/comment/58627793
favorite count: 0
has answer: http://stackoverflow.com/a/52076608
has answer: http://stackoverflow.com/a/52925555

http://stackoverflow.com/a/27278866
has comment: http://stackoverflow.com/comment/43029061
answers question: http://stackoverflow.com/q/27278440
has body: Q1: Without knowing the css for the buttons. Try adding the display:inline to the css for your buttons. Q2: How about adding remote: true to the button/link render line. Rails js adds ajax events to link_to and button_to elements that use this, using the http method supplied and the url on the element(which you will have to add). So your code should look something like: &lt;%= button_to "Publish Article", publish_article_path(@article), id: "publish_button", class: "btn btn-primary", remote: true %&gt; You can hook into the ajax events using: $("#publish_button").on("ajax:success", function(e){ //blah }); All remote events here Just a note, its not best practice to use click events for submitting ajax requests and there is no need to with rails.
type: Answer
has comment: http://stackoverflow.com/comment/43060898
has comment: http://stackoverflow.com/comment/43049364
score: 0
has comment: http://stackoverflow.com/comment/43063753
has comment: http://stackoverflow.com/comment/43049326

http://stackoverflow.com/q/27287551
has title: How to pass parameters to javascript function that are defined outside the form tag?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27287865
score: 1
has body: i am trying to pass a parameter to a javascript function thats been defined outside the tag.but when i try to use it in the javascript function it shows undefined.i am using alert to print the value both in the jsp page and in javascipt function...please help ....some html... ......some html.... and this is my javascript function: function validateDate(ValDate,origValDate) { var valueDate=ValDate.value; var OrigvalueDate=origValDate.value; confirm(valueDate); confirm(OrigvalueDate); **//displays undefined here** var hh=replaceAll(valueDate,'-',''); confirm(hh); if (replaceAll(valueDate,"-","")<=valueDate<=replaceAll(OrigvalueDate,"-","")) { return true; } else { alertPopup("Please enter a valid value date"); document.f1.ValDate.focus(); return false; } }
type: Question
has answer: http://stackoverflow.com/a/27287865
has answer: http://stackoverflow.com/a/27287804
accepted answer: http://stackoverflow.com/a/27287804
answer count: 2
has comment: http://stackoverflow.com/comment/43042267
downvote count: 0
tagged with: jsp
tagged with: javascript
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: jsp-tags

http://stackoverflow.com/q/27283710
type: UnansweredQuestion
tagged with: animation
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43037452
has body: How can I increase the speed of my canvas animation and still get a smoothly moving object? In my example a boy is moving from the top to the bottom of the canvas. The movement seems to jolt, the bigger the y-step is. How can I avoid the jolts and still have a fast movement to the bottom? Fiddle window.requestAnimFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60); }; })(); (function animloop() { requestAnimFrame(animloop); redraw(); })(); function redraw() { ctx.clearRect(0, 0, canvasWidth, canvasHeight); ctx.beginPath(); ctx.rect(20, y, 90, 90); ctx.fillStyle = "red"; ctx.fill(); y += 5; }
score: 1
tagged with: canvas
downvote count: 0
answer count: 1
tagged with: javascript
has title: Canvas - Increase animation speed without jolts
favorite count: 0
has answer: http://stackoverflow.com/a/27284092
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27306809
answer count: 1
accepted answer: http://stackoverflow.com/a/27307414
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27307414
type: Question
tagged with: google-visualization
tagged with: javascript
tagged with: jquery
score: 0
has body: Trying to select the google chart SVG then append a line that is drawn by clicking and dragging the mouse. I can get the lines to draw on a blank SVG by doing var graph = d3.select("body").append("svg") But when I try to select the google chart SVG like I did in my code below, I don't get any lines drawing when I click and drag the mouse.
has title: Draw Lines on Google Chart Using D3

http://stackoverflow.com/comment/43013521
comment on: http://stackoverflow.com/q/27271871
type: Comment
type: QuestionComment
has text: *"The problem is that I want to prevent the posibility of manual scroll."* **Why**? Why surprise your visitors with weird behavior when they try to do something normal? People don't *like* doing X, which always gets them Y, and getting Z instead.
score: 4

http://stackoverflow.com/comment/43030937
type: Comment
comment on: http://stackoverflow.com/a/27280368
score: 0
has text: @northkildonan originally instead of the text updates (.html/innerhtml) I just did console.log("my messages") where the updates are at, and they would slowly pop up as the script went on. I figured my .innherhtml/.html would do the same. Yes, I send requests to my controller (C#) which does the request with my keys, then passes my json data back to the javascript for dissection.
type: AnswerComment

http://stackoverflow.com/comment/42886560
has text: Basically yes, the user is clicking the "remove" button which then turns a flag in the database to "read" by refreshing the div, that particular would then no longer show. Hope that helps?
type: Comment
comment on: http://stackoverflow.com/q/27201424
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43064972
type: AnswerComment
type: Comment
has text: Thanks for the advice. I am very new to angular and after doing a lot of reading I now see that this is horrible practice. I have since updated my code and have resolved the issue.
comment on: http://stackoverflow.com/a/27219285
score: 0

http://stackoverflow.com/q/27218244
accepted answer: http://stackoverflow.com/a/27218522
type: Question
downvote count: 4
answer count: 1
tagged with: jquery
tagged with: stripe-payments
favorite count: 0
score: -3
has answer: http://stackoverflow.com/a/27218522
has body: I'm trying to create a form that accepts a users bank account details using Stripe.js and HTML. The problem is, every time i try to submit the details, I get an error regardless of whether or not it is right. The input form is below. Any ideas? Give us your bank info Bank Location United States Routing Number Account Number Make Recipient!
upvote count: 1
has title: Accepting Bank Account using Stripe.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42916047
tagged with: javascript
has comment: http://stackoverflow.com/comment/42916236

http://stackoverflow.com/comment/43020629
type: Comment
has text: Take a look at the top snippet of code in my answer, the id of your form is not `form` that is the tag, you need to give it an id in the html by adding the id attribute to your form tag `id="firstForm"`
comment on: http://stackoverflow.com/a/27275638
type: AnswerComment
score: 0

http://stackoverflow.com/a/27253645
accepted answer of: http://stackoverflow.com/q/27252801
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27252801
type: AcceptedAnswer
has body: Yes, document ready was missing. See the working demo below. You could also add data-animation to your div with class .Thumbnail, so you can easily modify the animation just with your HTML markup. See different animation for "Designs". You can find it also at jsFiddle here. $(function () { var animationend = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; $('.Thumbnails').on('click', function () { var $this = $(this); var animationName = $this.data('animation') || 'animated bounce' ; $this.addClass(animationName).one(animationend, function () {; $this.removeClass(animationName); }); }); }); @charset"UTF-8"; #container { max-width: 960px; margin-right: auto; margin-left: auto; } body { /*background-image: url(images/bg.png);*/ background-repeat: repeat-x; } name, h3 { color: black; padding-left: 5px; margin: 0; } name { font-size: 51px; } h3 { margin-bottom: 2em; } h2 { margin-top: 30px; margin-bottom: 5px; } p { font-size: 16px; margin: 0 0 0 0; max-width: 960px; } #float { float: left; padding-left: 10px; } img { min-width: 246px; float: left; margin-right: 2em; margin-top: 6px; margin-left: 1em; } /*-----------------------*/ /* Navigation */ .nav { height:auto; margin: 0 .3em 0 0; display:inline; display:inline-block; } /* specifying the nav list horizontal */ .nav li { display: inline; font-size:16px; padding: 0 0 0 15.8em; } .nav a { text-decoration: none; display: inline-block; } /* ---------------------------- */ /* Designs_Drawings Div ------ */ #content .Designs_Drawings { width: 680px; height: 160px; margin: 8em auto 3em auto; } #content .Designs { background-color: #CCC; border-style: solid; border-width: 2px; width: 230px; height: 150px; border-radius: 1em; -ms-transform: rotate(-10deg); /* IE 9 */ -webkit-transform: rotate(-10deg); /* Chrome, Safari, Opera */ transform: rotate(-10deg); float: left; display: inline-block; } #content .Designs p { text-align: right; /* Top,Right,Down,Left */ margin: .5em 1em 0 0; } #content .…

http://stackoverflow.com/q/27273961
tagged with: digital-signature
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43046222
upvote count: 3
has answer: http://stackoverflow.com/a/31765660
linked to: http://stackoverflow.com/q/24567858
type: Question
score: 3
has body: I would like to be able to sign data on the browser using 100% JavaScript and cryptographic token based keys. From what I have seen so far, all old implementations of this functionality are being discontinued (e.g. even new ActiveXObject("CAPICOM.Store"); doesn't seem to work in IE11 any more since it throws an error! - I don't know if I am missing something... Perhaps because I run it in the Console window...). I have looked into the specs of the WebCryptoAPI (that is supposed to be the be the new supported way): http://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-sign ...and then at this (which is more clear, organized and helpful): http://msdn.microsoft.com/en-us/library/ie/dn302332(v=vs.85).aspx ...and I saw that it allows you to create new keys (generateKey), but I am not sure if it supports using keys from tokens. There is an importKey but from the description it seems that is not what I need in order to sign with an existing key that the OS can see. Does this web-standard aim at allowing that kind of functionality? Can I use it as it is now and achieve my goal? Can I do anything better at least in Firefox that has a device manager (Options->Certifivates->Security Devices)? Related questions: Accessing signing/encryption in a browser&#39;s Keystore using JavaScript - sample code? (WebCryptoAPI) js signature on chrome with OS keystore UPDATE: I have also found this PDF: http://webpki.org/papers/PKI/x509-webcrypto-extension-scheme.pdf From what I have seen, there is no window.crypto.subtle.KeyStore in any of the browsers, so I guess this is wild dreams that people have for the distant future... UPDATE2: This was the reason I couldn't load the ActiveX in IE11: https://stackoverflow.com/a/5157766/2173353 So, at least, there is one old way still working...
accepted answer: http://stackoverflow.com/a/31765660
linked to: http://stackoverflow.com/q/25684734
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: webcrypto-api
linked to: http://stackoverflow.com/q/5157183
has title: WebCryptoAPI - Does it support signing with cryptographic tokens?
tagged with: cryptography

http://stackoverflow.com/q/27217854
score: 2
type: AnsweredQuestion
tagged with: declaration
has comment: http://stackoverflow.com/comment/42917069
has comment: http://stackoverflow.com/comment/42916969
upvote count: 2
has comment: http://stackoverflow.com/comment/42918169
has comment: http://stackoverflow.com/comment/42915464
has answer: http://stackoverflow.com/a/27219384
linked to: http://stackoverflow.com/q/5519596
type: Question
linked to: http://stackoverflow.com/q/2228477
accepted answer: http://stackoverflow.com/a/27219384
has comment: http://stackoverflow.com/comment/42915269
tagged with: expression
has body: Say that I am creating a simple JavaScript language parser that is only concerning with parsing functions. I need to differentiate between function "declarations"/"statements" and function expressions. Because they look practically identical, I figure I need to know the context in which function is used. I suppose that I can determine a function expression by the preceding token. I am thinking that the following algorithm might work: If token is "function", then If previous token is an operator, except for a "closing" operator, like "]", "}", or ")", OR if previous token is ":", then Function is an function expression. Else Function is a function declaration. Can I expect this algorithm to correctly determine if a function is a declaration or an expression? If it has flaws, what should be fixed? Or, if it is not possible to distinguish the forms simply by looking at the previous token, how else could I distinguish the forms with the least amount of effort? (I am aware that Esprima and co. exist. I want to implement a native parser in a different language.)
tagged with: abstract-syntax-tree
has title: JavaScript Language Parsing: Distinguish function expressions and declarations
has comment: http://stackoverflow.com/comment/42916257
has comment: http://stackoverflow.com/comment/42917092
has comment: http://stackoverflow.com/comment/42916929
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42915254
has comment: http://stackoverflow.com/comment/42915852
has comment: http://stackoverflow.com/comment/42918312
tagged with: parsing

http://stackoverflow.com/q/27189466
has title: Why am I getting $digest () iterations reached? How can I track my recursive script's activity?
has answer: http://stackoverflow.com/a/27189643
answer count: 1
has body: I am trying to understand my recursive script, which it acting inefficient. I tried creating counters that will tell me how many times its been called and from where, so I could better understand it's behaviour. However, I am getting errors in the console that it's overloading the amount of iterations it can call: Uncaught Error: 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [["fn: function (context) {\n for(var i = 0, ii = length, part; i<ii; i++) {\n if (typeof (part = parts[i]) == 'function') {\n ......... After doing extensive reading, I have a strong feeling it has to do with Angular recalculating everything each time it updates the counter, which $watch sees as a a change, sparking a new $digest round. Is this correct? If so, how can I implement a counter on my recursive script? To provide an example extremely similar to what I am trying to do, I forked a JSFiddle by ganarajpr and added to it here: JSFiddle. As Stackoverflow demands, the Code is replicated below: HTML: Counter {{counter}} Javascript: var app = angular.module("myApp", []); app.controller("MainCtrl", ['$scope', function ($scope) { $scope.counter = 0; $scope.incrementCounter = function () { console.log("Increment called"); $scope.counter++; document.counter++; } }]); app.controller("TreeController", ['$scope', function ($scope) { $scope.delete = function (data) { data.nodes = []; }; $scope.add = function (data) { var post = data.nodes.length + 1; var newName = data.name + '-' + post; data.nodes.push({ name: newName, nodes: [] }); }; $scope.tree = [{ name: "Node", nodes: [] }]; }]);
accepted answer: http://stackoverflow.com/a/27189643
tagged with: angularjs
type: AnsweredQuestion
tagged with: watch
score: 0
type: Question
tagged with: counter
tagged with: javascript

http://stackoverflow.com/q/27203374
has title: How to show object.name from a list using object.id
has answer: http://stackoverflow.com/a/27203476
has body: Is there any option to take member name from the other list to in the table based on the member id ? (function(){ var app = angular.module('tableApp',[]); app.controller('tableController', function($scope){ $scope.users = [ { id: 2, name: 'member2'}, { id: 5, name: 'member5'}, { id: 1, name: 'member1'}, { id: 4, name: 'member4'}, { id: 3, name: 'member3'} ]; $scope.items = [ { product: 'Lorem ipsum', date: '12-March-2013', rate: 12.35, member: 1, status: 'approved' }, { product: 'dolor sit', date: '1-January-2011', rate: 60.54, member: 3, status: 'pending'}, { product: 'adipisicing', date: '14-November-2014', rate: 0.99, member: 1, status: 'approved'}, { product: 'do eiusmod', date: '2-November-2014', rate: 4.00, member: 2, status: 'approved'}, { product: 'culpa qui', date: '1-November-2014', rate: 34.05, member: 1, status: 'pending'}, { product: 'mollit anim', date: '3-November-2014', rate: 45.00, member: 4, status: 'approved'} ]; }); })(); Date Amount Member {{item.product}} {{item.date}} {{users[item.member-1].name}}
tagged with: angularjs
tagged with: angular-nglist
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27203476
possible better answer: http://stackoverflow.com/a/27204031
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27204031
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27257364
has comment: http://stackoverflow.com/comment/42990470
answer count: 1
tagged with: javascript
tagged with: kendo-ui
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42991717
has answer: http://stackoverflow.com/a/27274707
tagged with: vb.net
has title: Kendo UI Grid not calling ASP.NET web service
has comment: http://stackoverflow.com/comment/42991510
has comment: http://stackoverflow.com/comment/42991225
score: 0
has body: I just started working with the Kendo UI grid. I'm trying to get it to work w/ an ASP.NET web service. Here's the js I have to create the grid: $("#grid").kendoGrid({ pageable: true, dataSource: { serverPaging: true, schema: { data: "d.Records", total: "d.total" }, pageSize: 10, type: "json", transport: { read: { url: "/services/Records.asmx/GetRecords", dataType: "json", type: "POST", contentType: "application/json; charset-utf-8" } } }, rowTemplate: kendo.template($("#kendoTmpl").html()) }); Here's the code for the web method (just testing things out obviously): &lt;WebMethod()&gt; _ &lt;ScriptMethod(ResponseFormat:=ResponseFormat.Json)&gt; _ Public Function GetRecords() As RecordList Dim x as List(Of Record) = New List(Of Record) Dim total as Integer = 25 Dim skipVal as Integer = Convert.ToInt32(HttpContext.Current.Request.QueryString("skip")) Dim takeVal as Integer = Convert.ToInt32(HttpContext.Current.Request.QueryString("take")) For i as Integer to total 'Record class has ID and Detail properties x.Add(new Record(i, "This is Record #" + i.ToString())) Next 'RecordList has Total and Records properties Return New RecordList(total, x) End Sub I have also referenced w/ the page: jquery.min.js //jQuery v1.9.1 kendo.all.min.js kendo.web.min.js I've set up breakpoints w/in the webmethod, but they never get hit. What am I missing?
type: Question
tagged with: kendo-grid

http://stackoverflow.com/a/27267871
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27267770
answers question: http://stackoverflow.com/q/27267770
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43006785
has body: In $scope.create function you defined book var book = new Books({ and never use it. That's reason you get warning. If you want to skip jshint warnings in development use grunt -f or allow unused variables in your grunt configuration (or .jshintrc if you use it)
upvote count: 1

http://stackoverflow.com/comment/42994926
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27221694
has text: In case my previous comment suggested otherwise, I should point out that this code won't work at all as-is. The infinite loop needs to be fixed, and the `observe()` method needs an additional parameter: `attributeOldValue: true`. **[Look here](http://jsfiddle.net/py19g2xs/)** if you want to see my suggested edit. It has been tested, and it works (as well as this technique can).
score: 1

forms
tags question: http://stackoverflow.com/q/27193552
tags question: http://stackoverflow.com/q/27281399
tags question: http://stackoverflow.com/q/27225679
tags question: http://stackoverflow.com/q/27222006
tags question: http://stackoverflow.com/q/27156427
tags question: http://stackoverflow.com/q/27279596
tags question: http://stackoverflow.com/q/27178670
tags question: http://stackoverflow.com/q/27184925
tags question: http://stackoverflow.com/q/27198195
tags question: http://stackoverflow.com/q/27265282
tags question: http://stackoverflow.com/q/27158147
tags question: http://stackoverflow.com/q/27171366
type: Tag
tags question: http://stackoverflow.com/q/27186759
tags question: http://stackoverflow.com/q/27249040
tags question: http://stackoverflow.com/q/27177771
tags question: http://stackoverflow.com/q/27258767
tags question: http://stackoverflow.com/q/27242676
tags question: http://stackoverflow.com/q/27284699
tags question: http://stackoverflow.com/q/27274882
tags question: http://stackoverflow.com/q/27216454
tags question: http://stackoverflow.com/q/27220121
tags question: http://stackoverflow.com/q/27276545
tags question: http://stackoverflow.com/q/27158842
tags question: http://stackoverflow.com/q/27198938
tags question: http://stackoverflow.com/q/27237744
tags question: http://stackoverflow.com/q/27223568
tags question: http://stackoverflow.com/q/27303201
tags question: http://stackoverflow.com/q/27185940
tags question: http://stackoverflow.com/q/27199773
tags question: http://stackoverflow.com/q/27268174
tags question: http://stackoverflow.com/q/27282042
tags question: http://stackoverflow.com/q/27284934
tags question: http://stackoverflow.com/q/27297777
tags question: http://stackoverflow.com/q/27180920
tags question: http://stackoverflow.com/q/27221767
tags question: http://stackoverflow.com/q/27184353
tags question: http://stackoverflow.com/q/27304283
tags question: http://stackoverflow.com/q/27278780
tags question: http://stackoverflow.com/q/27289740
tags question: http://stackoverflow.com/q/27249509
tags question: http://stackoverflow.com/q/27188108
tags question: http://stackoverflow.com/q/27239039
tags question: http://stackoverflow.com/q/27160065
tags question: http://stackoverflow.com/q/27291373
tags question: http://stackoverflow.com/q/27217672
tags question: http://stackoverflow.com/q/27277311
tags question: http://stackoverflow.com/q/27221251
tags question: http://stackoverflow.com/q/27157644
tags question: http://stackoverflow.com/q/27180712
tags question: http://stackoverflow.com/q/27197950
tags question: http://stackoverflow.com/q/27182873
tags question: http://stackoverflow.com/q/27239797
tags question: http://stackoverflow.com/q/27226978
tags question: http://stackoverflow.com/q/27220260
tags question: http://stackoverflow.com/q/27309224
tags question: http://stackoverflow.com/q/27165903
tags question: http://stackoverflow.com/q/27204746
tags question: http://stackoverflow.com/q/27275575
tags question: http://stackoverflow.com/q/27180767
tags question: http://stackoverflow.com/q/27180429
tags question: http://stackoverflow.com/q/27274125
tag name: forms
tags question: http://stackoverflow.com/q/27283264
tags question: http://stackoverflow.com/q/27280424
tags question: http://stackoverflow.com/q/27198381
tags question: http://stackoverflow.com/q/27182615
tags question: http://stackoverflow.com/q/27279471
tags question: http://stackoverflow.com/q/27223146
tags question: http://stackoverflow.com/q/27282891
tags question: http://stackoverflow.com/q/27240898
tags question: http://stackoverflow.com/q/27298116
tags question: http://stackoverflow.com/q/27184456
tags question: http://stackoverflow.com/q/27312164
tags question: http://stackoverflow.com/q/27170746
tags question: http://stackoverflow.com/q/27221344
tags question: http://stackoverflow.com/q/27259471
tags question: http://stackoverflow.com/q/27188310

http://stackoverflow.com/a/27156168
has body: if you want to shutdown.reboot,kill the server that is hosting your site you could go with php but keep in mind that web scripts on your server are run by httpd/apache user or maybe a special user you have assigned. So in order to achieve what you want you could do a root crontab on your server which will take a minute to reboot the server. the plan is like this: with php create a file in the web directory of your server then the crontab runs a script which checks if the file exists ... if exists the delete it and reboot server... else if it doesnt exists do nothing ... ofcourse this path is not advisible and if you do it make sure you log everything good i give you an example root crontab content: * * * * * /usr/local/sbin/check.sh the content of check.sh: #!/bin/bash if [ -f /var/www/html/restart.myserver ]; then rm -f /var/www/html/restart.myserver /sbin/shutdown -r now fi and the php file lets say restart.php which will be linked to your anchor element &lt;?php fh = fopen("/var/www/html/restart.myserver",'w'); fwrite($fh,"Reboot now\n"); fclose($fh); ?&gt;
type: Answer
answers question: http://stackoverflow.com/q/27155765
score: 0

http://stackoverflow.com/a/27258907
type: Answer
answers question: http://stackoverflow.com/q/27258174
has comment: http://stackoverflow.com/comment/42992131
upvote count: 1
has comment: http://stackoverflow.com/comment/42991324
has comment: http://stackoverflow.com/comment/42991638
has body: I think there are 2 bad ideas in the designs you describe. Defining the data structures based on UI convenience. This is a bad idea because you want your API to be clear, multipurpose (supporting different clients with different UIs potentially), and long-lived (API refactoring is operationally expensive). Instead, try to accurately and concisely represent your data in the purest, most accurate, most generalized form, and leave presentation issues such as formatting, truncation, localization, units of measure, page layout, etc to the UI. Overloading a single data field to express a concept that it doesn't naturally model by way of a "magic value". Assigning extra semantic meaning to the number zero is an example of this, and it's generally regarded as error prone and confusing and a leaky abstraction. Every client will have to encode the magic semantic that zero means forever. Of course, there's the glaring cognitive dissonance that the true meaning of zero would be "not at all". I'd model this as 2 fields, an enumeration called retentionPeriod allowing exactly 2 values: "PERMANENT" and "YEARS" and a separate field perhaps retentionValue to store the integer representing the years. If you end up losing the argument with your back end developer, I'd at least argue that the magic value should be -1 meaning forever instead of 0. (I also think null matches "not at all" more than "forever" which is why I think -1 is the least-bad of the bad magic options. There is some precedent out there for this, at least) In your specific case I'd argue one of your UI drop-downs would control retentionPeriod and the other would control retentionValue. But my reasoning for this is not because it happens to pair up with your current UI implementation in a straightforward way (that's more of a happy coincidence), it's because it's a clearer representation of the data. That said, in my experience this specific instance is fairly mild in it's badness. I'd be much more strongly concerned ab…
has comment: http://stackoverflow.com/comment/42992061
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42991533
score: 1
accepted answer of: http://stackoverflow.com/q/27258174

http://stackoverflow.com/comment/43060638
score: 0
type: Comment
type: QuestionComment
has text: You are binding the click event to an element with the ID=teste, but it appears that you do not have such an element
comment on: http://stackoverflow.com/q/27298150

http://stackoverflow.com/comment/43070361
type: Comment
score: 3
comment on: http://stackoverflow.com/a/27303519
has text: Try it with `var myJSON = JSON.stringify(["This nullifies the answer"])`.
type: AnswerComment

http://stackoverflow.com/q/27205398
upvote count: 3
score: 1
has comment: http://stackoverflow.com/comment/42893546
has answer: http://stackoverflow.com/a/27205674
type: Question
tagged with: hyperlink
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27205591
answer count: 3
has title: How do I call a function on all hyperlinks on my page?
favorite count: 0
has answer: http://stackoverflow.com/a/27206288
has answer: http://stackoverflow.com/a/27205591
downvote count: 2
has body: I have a web page with multiple hyperlinks. They all have an href of "#". They are dynamically generated. How do I call a function when ANY of them are clicked? I wish to preserve default hyperlink actions.
possible better answer: http://stackoverflow.com/a/27205674
type: AnsweredQuestion

http://stackoverflow.com/q/27284683
has body: I am working with a page featuring a Bootstrap accordion. It works correctly, but I was asked to implement a feature whereby a specific collapsible element is "open" when linked from various other pages - so "www.whatever.tld#e2" would take you to the second element already opened. There was no problem getting something to behave like this, it's adequately covered by various other pages on StackOverflow and elsewhere. The implementation I tried was as follows: $(window.location.hash + '.collapse').collapse('toggle'); This functions as desired, it opens the correct section of the accordion. However, after navigating to the page like this, it "locks" the page in that form - it no-longer responds to any clicks on accordion elements and you cannot close the opened element or open others. Nobody else seems to have been experiencing this problem or did not mention it if they did e.g. here: Bootstrap Collapse - open the given id fragment bootstrap-collapse.js hide and show events I have attempted variations on this code, e.g. var anchor = window.location.hash; $(".collapse").collapse('hide'); $(anchor).collapse('show'); This behaves unexpectedly - all elements are forced open, and cannot close. Removing the second line fixes this issue, but then otherwise behaves as the original code I specified does - it opens the targeted element, but freezes the accordion. The following is an excerpt of the structure of the accordion I am working with. I would prefer not to have to modify this unless I can't avoid it, since I'm trying to stick with organisational style guides and this accordion code is a standard accordion that people use on our CMS: Pharmacy I am not amazing at JS or its use so any pointers people had to put me on the right track would be greatly appreciated.
has comment: http://stackoverflow.com/comment/43038376
linked to: http://stackoverflow.com/q/13412778
type: Question
has comment: http://stackoverflow.com/comment/43037588
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27287152
score: 0
has title: Manual toggle of Bootstrap accordion "locks" it
answer count: 1
tagged with: accordion
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/q/27262111
score: 0
answer count: 3
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have a text field which should hide when it loses focus. I also have a button. The problem is, when you click the button, the text field first loses focus, which moves the button, preventing it from receiving the click event. HTML: Focus on the text field, and then click the button click me JS: $(function() { $('#focusMeOut').on('focusout', function(e) { $('#hideMeOnFocusOut').hide(); }); $('#clickMe').on('click', function(e) { alert('clicked!'); }); }); http://jsfiddle.net/u86ycf5e/ The button should still move. But it should also receive the click event.
has answer: http://stackoverflow.com/a/27262153
has answer: http://stackoverflow.com/a/27262189
has answer: http://stackoverflow.com/a/27262233
type: Question
has title: Moving button doesn't receive click event
tagged with: javascript

http://stackoverflow.com/a/27183315
answers question: http://stackoverflow.com/q/27183066
has body: try $(function(){ $(document).ready(function(e) { var $stars = $('.input-star-rate'); $stars.bind('change', function() { var phpvalue = "&lt;?php echo $arate_num; ?&gt;"; alert(phpvalue); var num3 = parseInt(phpvalue, 10); alert(num3); }); }); });
accepted answer of: http://stackoverflow.com/q/27183066
type: Answer
score: 3
downvote count: 0
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/42953727
comment on: http://stackoverflow.com/q/27212674
has text: What version of Angular are you using? The type=date format should be working on angular 1.3 or newer. Otherwise you might have to settle for a displaying empty date input (see fiddle: http://jsfiddle.net/r1s83ev5/2/) or using a custom directive (https://github.com/betsol/angular-input-date)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27153782
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to replace the option of select with some image and text but didn't succeeded.My select code as follow: Select Language English Chinese French German My js code is : The select Field is also created using js code.
has title: Replace Selection option with image and text in js
has comment: http://stackoverflow.com/comment/42802074
tagged with: select
type: Question
has answer: http://stackoverflow.com/a/27154165
has comment: http://stackoverflow.com/comment/42801939
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/27154276
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42802410

http://stackoverflow.com/q/27201729
has answer: http://stackoverflow.com/a/27201746
has answer: http://stackoverflow.com/a/27202393
answer count: 2
has body: i have taken a span and after clicking the span, it adds 1 to it. but what i need is, ngclick should add only once to whatever value is inside the span. Again for another click it should subtract 1 from it. It should not iterate continuously. i am getting {{tvshow.episode.ratings.loved}} from json data. pls help. //html {{tvshow.episode.ratings.loved}}
tagged with: javascript
score: 0
tagged with: angularjs
has title: how to make ngclick work like toggle?
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/42949549
type: Comment
has text: you can specify which attribute the model will use for its unique id. 'cid' is created automatically for each distinct element. Can you update your question with some of the attributes for your existing models? More info: http://backbonejs.org/#Model-idAttribute
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27235047

http://stackoverflow.com/q/27156812
tagged with: for-loop
tagged with: google-sheets
answer count: 1
tagged with: javascript
score: 0
has title: Returning null values in Google Apps Script
has answer: http://stackoverflow.com/a/27161232
accepted answer: http://stackoverflow.com/a/27161232
type: AnsweredQuestion
type: Question
tagged with: google-apps-script
has body: The function below is returning null values the second and third time it goes through the 'for loop' and I can't figure out why. The for loop containing 'i=start' is looping through the 'decisionPoints' variable and returning data based on the the value in the first column. The first few rows in 'decisionPoints' have '1' in the first column. The next few rows have '2' in the first column and the next few have '3'. When the loop searches for '2' and '3', it returns null values for each row before the row containing the first value it's looking for. So, when it searches for '2', I see three null values for the preceding rows containing '1'. When it searches for '3', I see six null values for the preceding rows containing '1' or '2'. Can anyone explian why? var loBuild = function(loNumber,category){ var lo = [], spreadsheet = SpreadsheetApp.getActiveSpreadsheet(), decisionPointsSheet = spreadsheet.getSheetByName("Decision Points"), lastColumn = decisionPointsSheet.getLastColumn(), lastDecisionPoint = decisionPointsSheet.getLastRow(), decisionPoints = decisionPointsSheet.getRange(1,1,lastDecisionPoint,lastColumn).getValues(), count = 0, loColumn = []; decisionPoints.shift(); for(i in decisionPoints){ loColumn.push(decisionPoints[i][0]); if(decisionPoints[i][0] === loNumber){ count++; } } var start = loColumn.indexOf(loNumber); for(i = start; i &lt; count+start; i++){ lo[i] = []; var dp = decisionPoints[i][1]; var dpLabel = decisionPoints[i][3]; for(j = 0; j &lt; lastColumn; j++){ switch(j){ case 0: lo[i][j] = dp; break; case 1: lo[i][j] = "=countifs('" + dpLabel + "'!F:F,\"" + category + "\")" break; case 2: lo[i][j] = "=countifs('" + dpLabel + "'!F:F,\"FCC\")" break; } } } return(lo); }

http://stackoverflow.com/q/27240585
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42972156
has comment: http://stackoverflow.com/comment/42985241
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27261006
has comment: http://stackoverflow.com/comment/42967866
linked to: http://stackoverflow.com/q/728360
has title: Private namespaces for library sub-modules using prototype
has body: I'm working on a large JavaScript UI module, think about something in the dimension of iScroll. For keeping the thing sane, I split the library up into several logical sub-modules (like: touch interaction, DOM interaction, etc.) that communicate with each other using a simple pubsub system. Each of these sub-modules has it's own namespace I use for storing variables. To enable several instances of the library running at the same time, the constructor includes some logic to copy every namespace that has been assigned to a 'toCopy' object directly into every new instance. The basic structure looks something like this: // constructor function Constructor() { for (var key in this.toCopy) { // create a deep copy and store it inside the instance this[key] = utils.copyObj(this.toCopy[key]); } } Constructor.prototype.toCopy = {} // sub-module #1 Constructor.prototype.toCopy._module1Namespace = {} Constructor.prototype._privateFn = function() { /** do stuff within this._module1Namespace or send events */ } Constructor.prototype._privateFn = function() { /** do stuff within this._module1Namespace or send events */ } // sub-module #2 Constructor.prototype.toCopy._module2Namespace = {} Constructor.prototype._privateFn = function() { /** do stuff with this._module2Namespace or send events */ } Constructor.prototype._privateFn = function() { /** do stuff with this._module2Namespace or send events */ } My problem: I really dislike having to expose the namespace of each sub-module to the rest of the library. Although I'm disciplined enough not to access the namespace of sub-module #1 within a function of sub-module #2, I want it to be technically impossible. However, as several instances of the UI library have to run at the same time, I cannot put every sub-module inside a closure and define a private namespace inside this closure. This would result in every instance of the library accessing the same sub-module closure and therefore the same namespace. Also, putting everything insi…
score: 0
has comment: http://stackoverflow.com/comment/42994782
has comment: http://stackoverflow.com/comment/42967247
has comment: http://stackoverflow.com/comment/42958006

http://stackoverflow.com/comment/43083608
has text: I'm guessing that older versions of IE have trouble matching a regex across a newline boundary. In the back of my mind I remember issues like that in IE from awhile ago. Can't remember the exact specifics.
comment on: http://stackoverflow.com/q/27311349
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27160557
score: 0
has answer: http://stackoverflow.com/a/27160617
has comment: http://stackoverflow.com/comment/42885457
has comment: http://stackoverflow.com/comment/42814988
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42814985
has comment: http://stackoverflow.com/comment/42814868
has comment: http://stackoverflow.com/comment/42815023
tagged with: text
has body: Noob question; Please help me with this.. I'm just a beginner and I'm finding it hard to do the following: I want to manipulate this text using Javascript to make it look differently: "5555 55:55: John: New York 6666 66:66: Jack: Los Angeles" After the manipulation I want it to be: [{ name:"John", address:"New York", number:"5555 55:55"},{ name:"Jack", address:"Los Angeles", number:"6666 66:66"}] So I really want to know how to tell Javascript that here is a new line, that means a new value.. here is a xxxx: and that's a name.. and here is a xxxx:(space) and after that is the address.. I don't know if that's possible but your help is really really appreciated. Thank you in advanced UPDATE text is: var text = "5555 55:55: John: New York \n 6666 66:66: Jack: Los \n Angeles 7777 77:77: Smith: South Park: 3321" my code so far: var result = text.match(/\d\d\d\d \d\d:\d\d: [a-zA-Z]+: /g) .map(function (x) { x = x.split(': '); return { number: x[0], name: x[1], address: x[2] }; }); But I'm getting just the word "Los" because the regEx is wrong and the split at ': ' isn't working proberly because the Address has this sometimes.
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: filtering
has title: how to manipulate text to make it JSON?
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/42808435
type: Comment
has text: That would be fine. Also note that there is no need to pass it to the function as a parameter because it's a plugin. Because of that it's good practice to add plugins at the end of your require array.
comment on: http://stackoverflow.com/a/27157027
type: AnswerComment
score: 0

http://stackoverflow.com/comment/99224569
score: 1
has text: Working fine for me
type: AnswerComment
comment on: http://stackoverflow.com/a/51351011
type: Comment

http://stackoverflow.com/q/27154503
linked to: http://stackoverflow.com/q/21122811
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42825308
has body: I have a force layout graph. i have a button that when i click it, it sorts the nodes out in some sort of order. Giving them absolute coordinates on the screen. I wish to, when i click this button, transition between both movements smoothly rather than just jump straight into it. I want to do this so further down the line i can see where the nodes are coming from
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27155110
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42808948
tagged with: d3.js
type: UnansweredQuestion
has title: How do I transition from a force layout graph to one where I have positioned the nodes?

http://stackoverflow.com/q/27310577
has body: http://demos.dojotoolkit.org/demos/themePreviewer/demo.html In this theme previewer, no matter how I change theme, nothing happens. Besides, in any samples of the reference guide, when I try to run them, they appear without styles at all, as if the css is not present. I tried other browsers, all the same. Although it works well on my project, I wonder what's wrong.
type: UnansweredQuestion
tagged with: css
tagged with: dojo
has answer: http://stackoverflow.com/a/27327227
type: Question
answer count: 2
tagged with: javascript
has title: Theme doesn't work on dojo's website?
score: 0
has answer: http://stackoverflow.com/a/27311171

http://stackoverflow.com/comment/42852405
score: 2
comment on: http://stackoverflow.com/q/27182214
type: Comment
type: QuestionComment
has text: ` `

http://stackoverflow.com/comment/43004292
score: 0
type: QuestionComment
type: Comment
has text: the answer has a decent example, but consider the converse: if it didn't trickle down to the proto, setters would be virtually useless on prototypes. it is a bit odd though, you're right.
comment on: http://stackoverflow.com/q/27264539

http://stackoverflow.com/comment/42837621
has text: I don't believe it's `var dog = new animal();` which is giving him the problem though!?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27173895
type: AnswerComment

http://stackoverflow.com/a/27305683
type: Answer
score: 0
has body: Calling only sort on them won't actually visually change the DOM, it just returns a sorted collection. So basically you just need to get the collection, sort it, then return it. Something like this should work: $('#ProductContainer &gt; div').detach().sort(function (a, b) { var contentA = $(a).data('name'); var contentB = $(b).data('name'); return (contentA &lt; contentB) ? -1 : (contentA &gt; contentB) ? 1 : 0; }).appendTo('#ProductContainer'); You'll want to make sure that you use the detach() method and not remove(), as detach() will retain all of the data and events associated with the collection items.
answers question: http://stackoverflow.com/q/27305268

http://stackoverflow.com/comment/42922712
has text: I don't have a fix Start Date.
type: Comment
comment on: http://stackoverflow.com/a/27221912
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42989122
type: Comment
has text: @Nathalie I copied and pasted your code and it works fine I just added the value...
comment on: http://stackoverflow.com/a/27257686
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42883009
comment on: http://stackoverflow.com/q/27180892
score: 0
type: Comment
has text: @imslavko: If I call `console.log(Assets.getText('index.html'));` in a `Tinytest.addAsync()`, I get `Assets is not defined`. Plus, I have to create a `private` directly, when the file can (apparently) already be pulled into the package via `api.addFiles('src/test.html', 'client'); `
type: QuestionComment

http://stackoverflow.com/q/27294730
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27294833
tagged with: javascript
upvote count: 2
has body: I always read about having to concatenate and minify your javscript to decrease load times, but I'm not sure about what to do in case of a multi-page application. Is it better to concatenate and minify ALL javascript for the entire site, include the same file in every page and rely on caching or is it better to only group the specific JS needed for each page separately?
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27294833
has comment: http://stackoverflow.com/comment/43054331
accepted answer: http://stackoverflow.com/a/27294797
type: AnsweredQuestion
has title: What is more efficient, loading all javascript at once or loading it as required per-page?
score: 1
has answer: http://stackoverflow.com/a/27294797

http://stackoverflow.com/a/27244975
type: Answer
has comment: http://stackoverflow.com/comment/42965354
score: 1
upvote count: 3
downvote count: 2
has body: querySelectorAll is an HTML5 DOM API, IE7, 8 are not ready for it. See this page for more info. Alternatively, since you are using jquery, you can use $(".price") instead.
has comment: http://stackoverflow.com/comment/42972279
has comment: http://stackoverflow.com/comment/42965844
has comment: http://stackoverflow.com/comment/42965945
answers question: http://stackoverflow.com/q/27244942

http://stackoverflow.com/q/27164008
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/42821816
has comment: http://stackoverflow.com/comment/42821592
tagged with: javascript
has body: I was typing some code, when (After like 3 hours searching) I found this (Sorry, my main language is Spanish and I don't know how to explain this): I have a function in another file which makes an Array to add an object while keeping the number of elements I want: exports.addToArrayKeepingNum = function(ob, arr, count){ if (arr.length &lt; count){ arr[arr.length] = ob; }else{ var auxArr = new Array(); var oLength = arr.length; for (var a = (arr.length - 1); arr.length &gt;= count; a--){ arr.shift(); } arr[arr.length] = ob; } } But now, from mongoose I extract a document and try to make this: Tools.addToArrayKeepingNum({ip: req.ip, datetime: Date.now()}, doc.last_visits, 15); And then, Mongoose doesn't accept the document because It has been changed the schema... but If I do: var arr = doc.last_visits; Tools.addToArrayKeepingNum({ip: req.ip, datetime: Date.now()}, arr, 15); doc.last_visits = arr; It works... Why? I mean... I am passing a reference, I'm not? So It should works with the first example... I think... If you can explain me, It would be helpful! EDIT: Here is the error printed in the console: Thu, 27 Nov 2014 06:38:48 GMT uncaughtException Object #&lt;Object&gt; has no method ' save' TypeError: Object #&lt;Object&gt; has no method 'save' at C:\Users\MyName\Desktop\TheProject\node_modules\mongoose\lib\docum ent.js:1299:13 at Array.forEach (native) at model.pre.err.stack (C:\Users\MyName\Desktop\TheProject\node_modul es\mongoose\lib\document.js:1281:12) at model._next (C:\Users\MyName\Desktop\TheProject\node_modules\mongo ose\node_modules\hooks\hooks.js:50:30) at model.proto.(anonymous function) [as save] (C:\Users\MyName\Desktop\Y amireProject\node_modules\mongoose\node_modules\hooks\hooks.js:96:20) at Promise.&lt;anonymous&gt; (C:\Users\MyName\Desktop\TheProject\lib\misc\l oginUtils.js:76:17) at Promise.&lt;anonymous&gt; (C:\Users\MyName\Desktop\TheProject\node_modul es\mongoose\node_modules\mpromise\lib\promise.js:177:8) at Promise.emit (events.js:95:17) a…
score: 0
has title: What happen here? (Array and pointer)
has comment: http://stackoverflow.com/comment/42821917
has comment: http://stackoverflow.com/comment/42821428
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42822713
tagged with: node.js
answer count: 0

http://stackoverflow.com/comment/42938359
type: Comment
has text: So u can use a div before that button to show it. is it ok?
type: QuestionComment
comment on: http://stackoverflow.com/q/27230629
score: 0

http://stackoverflow.com/comment/42920710
comment on: http://stackoverflow.com/q/27220717
type: Comment
type: QuestionComment
has text: Maybe this helps you http://stackoverflow.com/questions/1977871/check-if-an-image-is-loaded-no-errors-in-javascript
score: 0

http://stackoverflow.com/q/27291926
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27292225
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have this slider in my website with multiple slides and different text nebeath it for each slide. The problem is that the controls go up and down a bit when the text is longer..... see here, http://prntscr.com/5d2veh . How can I make my controls stay at the center of the picture in the middle? Thanks, a lot! P.S. If you see a thing in my question which isnt well explained or anything please tell me so I can make a better question next time :) Code: Clubs Rijssen Risnestars Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Hengelo Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Oldenzaal Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Enschede Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer Clubnaam Adres Plaatsnaam, Postcode Telefoonnummer CSS: /* * Owl Carousel Owl Demo Theme * v1.22 */ .owl-theme .owl-controls{ margin-top: 0; text-align: center; } /* Styling Next and Prev buttons */ .owl-theme .owl-controls .owl-buttons div{ color: #FFF; display: inline-block; zoom: 1; *display: inline;/*IE7 life-saver */ margin: 5px; padding: 0 12px; font-size: 12px; opacity: 0.9; color: #fff; } /* Clickable class fix problem with hover on touch devices */ /* Use it for non-touch hover action */ .owl-theme .owl-controls.clickable .owl-buttons div:hover{ filter: Alpha(Opacity=100);/*IE7 fix*/ opacity: 1; text-decoration: none; } /* Styling Pagination*/ .owl-theme .owl-controls .owl-page{ display: inline-block; zoom: 1; *display: inline;/*IE7 life-saver */ margin-top: 10px; } .owl-theme .owl-controls .owl-page span{ /* es este pilas*/ display: block; width: 12px; height: 12px; margin: 5px 7px; -webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px; background…
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/27292225
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: twig
score: 1
has title: How can i make my slider controls stay at the same position

ajax
tags question: http://stackoverflow.com/q/27221119
tags question: http://stackoverflow.com/q/27257307
tags question: http://stackoverflow.com/q/27217191
tags question: http://stackoverflow.com/q/27207948
tags question: http://stackoverflow.com/q/27226542
tags question: http://stackoverflow.com/q/27222505
tags question: http://stackoverflow.com/q/27303464
tags question: http://stackoverflow.com/q/27242182
tags question: http://stackoverflow.com/q/27271726
tags question: http://stackoverflow.com/q/27281553
tags question: http://stackoverflow.com/q/27168501
tags question: http://stackoverflow.com/q/27277151
tags question: http://stackoverflow.com/q/27265021
tags question: http://stackoverflow.com/q/27288371
tags question: http://stackoverflow.com/q/27165101
tags question: http://stackoverflow.com/q/27263054
tags question: http://stackoverflow.com/q/27251013
tags question: http://stackoverflow.com/q/27244399
tags question: http://stackoverflow.com/q/27224004
tags question: http://stackoverflow.com/q/27277927
tags question: http://stackoverflow.com/q/27248409
tags question: http://stackoverflow.com/q/27247106
tags question: http://stackoverflow.com/q/27305872
tags question: http://stackoverflow.com/q/27232821
tags question: http://stackoverflow.com/q/27165317
tags question: http://stackoverflow.com/q/27166697
tags question: http://stackoverflow.com/q/27218485
tags question: http://stackoverflow.com/q/27269374
tags question: http://stackoverflow.com/q/27313460
tags question: http://stackoverflow.com/q/27185109
tags question: http://stackoverflow.com/q/27226978
tags question: http://stackoverflow.com/q/27197053
tags question: http://stackoverflow.com/q/27196806
tags question: http://stackoverflow.com/q/27181429
tags question: http://stackoverflow.com/q/27193672
tags question: http://stackoverflow.com/q/27297955
tags question: http://stackoverflow.com/q/27312480
tags question: http://stackoverflow.com/q/27164309
tags question: http://stackoverflow.com/q/27252801
tags question: http://stackoverflow.com/q/27233313
type: Tag
tags question: http://stackoverflow.com/q/27204746
tags question: http://stackoverflow.com/q/27180767
tags question: http://stackoverflow.com/q/27308527
tags question: http://stackoverflow.com/q/27255409
tags question: http://stackoverflow.com/q/27221113
tags question: http://stackoverflow.com/q/27171435
tags question: http://stackoverflow.com/q/27261042
tags question: http://stackoverflow.com/q/27165582
tags question: http://stackoverflow.com/q/27200581
tags question: http://stackoverflow.com/q/27247923
tags question: http://stackoverflow.com/q/27230860
tags question: http://stackoverflow.com/q/27217289
tags question: http://stackoverflow.com/q/27308931
tags question: http://stackoverflow.com/q/27180294
tags question: http://stackoverflow.com/q/27286992
tags question: http://stackoverflow.com/q/27299441
tags question: http://stackoverflow.com/q/27176465
tags question: http://stackoverflow.com/q/27269232
tags question: http://stackoverflow.com/q/27163211
tags question: http://stackoverflow.com/q/27307740
tags question: http://stackoverflow.com/q/27303351
tags question: http://stackoverflow.com/q/27182759
tags question: http://stackoverflow.com/q/27283501
tags question: http://stackoverflow.com/q/27205436
tags question: http://stackoverflow.com/q/27277280
tags question: http://stackoverflow.com/q/27257166
tags question: http://stackoverflow.com/q/27310014
tags question: http://stackoverflow.com/q/27301583
tags question: http://stackoverflow.com/q/27181021
tags question: http://stackoverflow.com/q/27177897
tags question: http://stackoverflow.com/q/27231233
tags question: http://stackoverflow.com/q/27209245
tags question: http://stackoverflow.com/q/27282891
tags question: http://stackoverflow.com/q/27196320
tags question: http://stackoverflow.com/q/27158582
tags question: http://stackoverflow.com/q/27267629
tags question: http://stackoverflow.com/q/27225937
tags question: http://stackoverflow.com/q/27154774
tags question: http://stackoverflow.com/q/27158186

http://stackoverflow.com/a/27294545
has comment: http://stackoverflow.com/comment/43054158
score: 1
has comment: http://stackoverflow.com/comment/43060565
has comment: http://stackoverflow.com/comment/43057976
downvote count: 0
has comment: http://stackoverflow.com/comment/43060742
has comment: http://stackoverflow.com/comment/43054626
answers question: http://stackoverflow.com/q/27294136
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43060547
has body: I think you should not use named views if you don't need it. If I understand correclty what you want, all you need is only one &lt;ion-nav-view&gt;&lt;/ion-nav-view&gt; in your page. You need to name a view only if you want to have states modifying more than one area of your page. See ui-router docs for more. You also have to change your default state to $urlRouterProvider.otherwise('home'); (not '/home'). Here is a working codepen http://codepen.io/anon/pen/ogjRwP
accepted answer of: http://stackoverflow.com/q/27294136
has comment: http://stackoverflow.com/comment/43054248
type: Answer
upvote count: 1

http://stackoverflow.com/a/27261569
score: 3
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27261281
type: Answer
answers question: http://stackoverflow.com/q/27261281
downvote count: 0
has body: Just finished writing it, and then realized that it would look cleaner with switch case: For anyone's reference. If there is in fact some JS function or API that will make this a lot cleaner and simpler, please answer and I'll mark it. switch(ret_mask = path.mask) { case "0.0.0.0": return ret_mask = "/0"; case "128.0.0.0": return ret_mask = "/1"; case "192.0.0.0": return ret_mask = "/2"; case "224.0.0.0": return ret_mask = "/3"; case "240.0.0.0": return ret_mask = "/4"; case "248.0.0.0": return ret_mask = "/5"; case "252.0.0.0": return ret_mask = "/6"; case "254.0.0.0": return ret_mask = "/7"; case "255.0.0.0": return ret_mask = "/8"; case "255.128.0.0": return ret_mask = "/9"; case "255.192.0.0": return ret_mask = "/10"; case "255.224.0.0": return ret_mask = "/11"; case "255.240.0.0": return ret_mask = "/12"; case "255.248.0.0": return ret_mask = "/13"; case "255.252.0.0": return ret_mask = "/14"; case "255.254.0.0": return ret_mask = "/15"; case "255.255.0.0": return ret_mask = "/16"; case "255.255.128.0": return ret_mask = "/17"; case "255.255.192.0": return ret_mask = "/18"; case "255.255.224.0": return ret_mask = "/19"; case "255.255.240.0": return ret_mask = "/20"; case "255.255.248.0": return ret_mask = "/21"; case "255.255.252.0": return ret_mask = "/22"; case "255.255.254.0": return ret_mask = "/23"; case "255.255.255.0": return ret_mask = "/24"; case "255.255.255.128": return ret_mask = "/25"; case "255.255.255.192": return ret_mask = "/26"; case "255.255.255.224": return ret_mask = "/27"; case "255.255.255.240": return ret_mask = "/28"; case "255.255.255.248": return ret_mask = "/29"; case "255.255.255.252": return ret_mask = "/30"; case "255.255.255.254": return ret_mask = "/31"; case "255.255.255.255": return ret_mask = "" }

http://stackoverflow.com/q/27169730
has body: I am working on small project. I got some problem when trying to get elements value in the clicked table row. Here is my project codes <% for (int i = 0; i < 15; i++) {%> <select name="prefix<%=i%>" class="form-control"> 044 51 555 43 33 66 <input name="phone" id="number<%=i%>" type="text" onblur="test2()" class="form-control input" > <select name='status<%=i%>' class="form-control"> The number is belong to man Out of area Dialed already The number is not defined <textarea id="desc<%=i%>" class="form-control" rows="3"> <%}%> My javascript code is the following: $('#info tbody').on('click', 'tr', function() { var $td = $(this).closest('tr').children('td'); var clId = $td.eq(0).attr('id'); });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42830395
type: Question
has comment: http://stackoverflow.com/comment/42830971
has comment: http://stackoverflow.com/comment/42830382
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27169925
has comment: http://stackoverflow.com/comment/42830855
has comment: http://stackoverflow.com/comment/42830730
downvote count: 4
has title: how to get selected element value by clicking tr
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42830405
favorite count: 0
has comment: http://stackoverflow.com/comment/42830380
upvote count: 2
has comment: http://stackoverflow.com/comment/42830497
accepted answer: http://stackoverflow.com/a/27169925
score: -2
tagged with: css

http://stackoverflow.com/comment/45962456
has text: Hello GARPdev , thanks for your answer and I have tried your solution but it works for one's and some times it's going to fail say example in my scenario there is need to fill the address form by reading the csv file for multiple records at that time this solution is going to fail
comment on: http://stackoverflow.com/a/28837699
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43006301
has text: Share the code pls. Put it in your question, and format it, if you could:)
type: Comment
comment on: http://stackoverflow.com/a/27267403
score: 0
type: AnswerComment

recursion
type: Tag
tags question: http://stackoverflow.com/q/27243812
tags question: http://stackoverflow.com/q/27250780
tags question: http://stackoverflow.com/q/27290515
tag name: recursion
tags question: http://stackoverflow.com/q/27195099
tags question: http://stackoverflow.com/q/27212558
tags question: http://stackoverflow.com/q/27159374
tags question: http://stackoverflow.com/q/27256297
tags question: http://stackoverflow.com/q/27265655
tags question: http://stackoverflow.com/q/27219964
tags question: http://stackoverflow.com/q/27178580
tags question: http://stackoverflow.com/q/27312742
tags question: http://stackoverflow.com/q/27226884
tags question: http://stackoverflow.com/q/27270264
tags question: http://stackoverflow.com/q/27299004
tags question: http://stackoverflow.com/q/27280616

http://stackoverflow.com/a/27269392
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27269232
answers question: http://stackoverflow.com/q/27269232
type: Answer
has comment: http://stackoverflow.com/comment/43009393
has comment: http://stackoverflow.com/comment/43009805
has body: You can use local storage (HTML5) of browser or cookies.

http://stackoverflow.com/q/27225049
tagged with: javascript
tagged with: jquery
score: 0
has title: events sharing each other in full calendar
has answer: http://stackoverflow.com/a/27241706
type: UnansweredQuestion
tagged with: calendar
type: Question
tagged with: fullcalendar
has body: I have created an application in full-calendar, the application is working fine but the problem is that under the week view i have two events for today (Nov 9 - 15, 2014)- Meeting 1 and Meeting 2, both are within the boundary levels which you can see a light green event. The problem which i am facing is the events is sharing the time which is been allocated to them through dragging and dropping like as shown below. Since my requirement is that the any events should not share their time with any other events Can anyone please tell me some solution for this Working JSfiddle My code is as given below $(document).ready(function() { $('#calendar').fullCalendar({ slotEventOverlap : false, header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, defaultDate: '2014-11-12', businessHours: true, // display business hours editable: true, events: [ { title: 'Business Lunch', start: '2014-11-03T13:00:00', constraint: 'businessHours' }, { title: 'Meeting 1', start: '2014-11-13T11:00:00', end: '2014-11-13T12:00:00', constraint: 'availableForMeeting', // defined below color: '#257e4a' }, { title: 'Meeting 2', start: '2014-11-13T12:00:00', end: '2014-11-13T14:00:00', constraint: 'availableForMeeting', // defined below color: '#257e4a' }, { title: 'Conference', start: '2014-11-18', end: '2014-11-20' }, { title: 'Party', start: '2014-11-29T20:00:00' }, // areas where "Meeting" must be dropped { id: 'availableForMeeting', start: '2014-11-11T10:00:00', end: '2014-11-11T16:00:00', rendering: 'background' }, { id: 'availableForMeeting', start: '2014-11-13T10:00:00', end: '2014-11-13T16:00:00', rendering: 'background' }, // red areas where no events can be dropped { start: '2014-11-24', end: '2014-11-28', overlap: false, rendering: 'background', color: '#ff9f89' }, { start: '2014-11-06', end: '2014-11-08', overlap: false, rendering: 'background', color: '#ff9f89' } ], eventDrop: function (event, delta, revertFunc) { return false; } }); });
linked to: http://stackoverflow.com/q/10008113
answer count: 1

http://stackoverflow.com/q/27161839
tagged with: javascript
score: 1
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/27162026
answer count: 3
has answer: http://stackoverflow.com/a/27164067
tagged with: ruby
possible better answer: http://stackoverflow.com/a/27164067
upvote count: 1
has title: Post AJAX request in "vanilla" javascript, no jQuery, in Rails 4
tagged with: ruby-on-rails
has body: I've done my googling and searching for a solution to my problem and haven't found a solid solution in part because of how odd my project is. I'm trying to make a simple Chat-App with Rails 4 backend using only "vanilla" javascript (no jQuery or Rails helpers allowed). I've got a GET Ajax request working which gathers all of the seeded message data and shows it in the chat. However, when I try to write a POST request to my Rails backend I'm running into two main problems. They may or may not be related to each other. The first problem, which I've temporarily overcome, is a 422 status error (Unprocessable Entity). I believe this is because my xmlhttp.setRequestHeadervalues are wrong? However, I don't know what else they should be. I've temporarily by-passed this problem by putting a skip_before_filter :verify_authenticity_token in my Rails MessagesController. Is there a more elegant way of solving this? This leads me to my next problem which is a 400 status error (Bad Request). When I look at my error on the Terminal while running my server the problems looks like... Started POST "/messages" for 127.0.0.1 at 2014-11-26 17:32:48 -0800 Processing by MessagesController#create as */ * Parameters: {"user"=>"namechatsample", "content"=>"messsagechatsample"} Completed 400 Bad Request in 4ms ActionController::ParameterMissing (param is missing or the value is empty: message): app/controllers/messages_controller.rb:17:in message_params' app/controllers/messages_controller.rb:9:increate' Any guidance and help would be appreciated! Here is my Code. Ajax Calls var getRequest = function(callback) { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200) { data = JSON.parse(xmlhttp.responseText); callback(data.messages) } else if (xmlhttp.status == 400) { alert('There was an error 400 for GET') } else { a…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27162026
has answer: http://stackoverflow.com/a/27161958
type: Question
tagged with: ruby-on-rails-4
linked to: http://stackoverflow.com/q/7560837
downvote count: 0

http://stackoverflow.com/q/27163587
favorite count: 0
tagged with: classname
has comment: http://stackoverflow.com/comment/42819967
has answer: http://stackoverflow.com/a/27163632
has title: How do I add a class name to Javascript string?
downvote count: 0
has answer: http://stackoverflow.com/a/27163616
possible better answer: http://stackoverflow.com/a/27163614
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27163681
has answer: http://stackoverflow.com/a/27163614
has answer: http://stackoverflow.com/a/27165736
accepted answer: http://stackoverflow.com/a/27165736
score: 1
answer count: 6
has body: I'm a JS newbie trying to alter the following code. It looks like it's adding style attributes. I would like to add the class name "reveal" to this string or below. What would that syntax look like? Many thanks for your help, guys! inline = ( elem.domEl.getAttribute( 'style' ) ) ? elem.domEl.getAttribute( 'style' ) + '; visibility: visible; ' : 'visibility: visible; '
type: Question
has comment: http://stackoverflow.com/comment/42819954
upvote count: 1
has answer: http://stackoverflow.com/a/27163634
tagged with: javascript

http://stackoverflow.com/a/27165139
accepted answer of: http://stackoverflow.com/q/27165099
upvote count: 5
has body: If you echo and don't die, you run the risk of mistakenly producing more output someday than required, later down the lines. If you die, it prints and ends everything right there. That's the only difference. Here is an example using your code &lt;?php if(!($mail_to_address, $mail_subject, $content, $headers)) { echo json_encode(false); // a die would stop everything here } else{ echo json_encode(true); } echo "oops this was mistakenly printed"; // this breaks your JSON ?&gt; If you use die instead of echo then the last echo won't break your JSON because it will never execute. If you know there is nothing after your conditional checks, or if you are confident there is no special reason to use die(), you can keep using your echo. So the answer to your question is: None of them is superior to the other as long as your output is under your control.
score: 5
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27165099
type: Answer

http://stackoverflow.com/a/30555310
has body: Have you tried placing your script src links in the header? Sure, it's sometimes required to place them in the footer, but if you want them to fire before anything else, play about with the order. Looking at the code, I'd suggest placing your tags in the head?
type: Answer
answers question: http://stackoverflow.com/q/27216148
score: 0

http://stackoverflow.com/comment/43029200
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27280134
has text: It's not advisable to fade texts on a page. If you don't want them to be seen, remove them entirely.
score: 0

http://stackoverflow.com/comment/43078024
has text: Haven't tested this, but leave a note here if it's still not working and I'll create something to test it further.
comment on: http://stackoverflow.com/a/27307943
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27175228
has comment: http://stackoverflow.com/comment/42841897
has body: You can save a reference to the outer this: var that = this; $.get(APIURL, function (data) { that.setState({resdata: "This is a new state"}); }); Or use $.proxy: $.get(APIURL, $.proxy(function (data) { this.setState({resdata: "This is a new state"}); }, this)); The this you use inside the function normally refers to the jqXHR object, ref http://api.jquery.com/jquery.ajax/
accepted answer of: http://stackoverflow.com/q/27175184
answers question: http://stackoverflow.com/q/27175184
score: 12
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42885083
has comment: http://stackoverflow.com/comment/63223806
type: Answer
upvote count: 12
has comment: http://stackoverflow.com/comment/42885458
downvote count: 0

http://stackoverflow.com/comment/42901875
comment on: http://stackoverflow.com/a/27210111
type: AnswerComment
has text: hummm but that is what i want to avoid i want to run it as a background any option?
score: 0
type: Comment

http://stackoverflow.com/q/27232821
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42965025
answer count: 1
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/27245066
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/24609776
tagged with: php
has comment: http://stackoverflow.com/comment/42942366
has body: I have been bashing away at this for a while and seem to be advancing small steps at a time. I need to offer a way for users to upload their files via Ajax. I have seen that formData needs to be used in order to pass the file itself. Using these two questions as a reference: Uploading file in Yii using ajax Yii ajax file upload I have the following code on my view page: &lt;?php $form=$this-&gt;beginWidget('CActiveForm', array( 'id'=&gt;'post-form', 'htmlOptions' =&gt; array('enctype' =&gt; 'multipart/form-data'), )); echo '&lt;div class="columns small-5"&gt;' . $form-&gt;fileField($upload, 'image') . '&lt;/div&gt;'; echo $form-&gt;error($upload, 'image'); echo CHtml::button("(+)",array('title'=&gt;"Topic",'onclick'=&gt;'js:upload_file(this);')); $this-&gt;endWidget(); ?&gt; &lt;script&gt; function upload_file(){ var fd = new FormData(); var e = document.getElementById("UploadedFiles_image"); fd.append( "UploadedFiles[image]", $(e)[0].files[0]); $.ajax({ url: 'UploadInstallPhoto', type: 'POST', cache: false, data: fd, datatype: 'json', processData: false, contentType: false, success: function (data) { }, error: function () { alert("ERROR in upload"); } }); } &lt;/script&gt; I have the following code in my controller: if(Yii::app()-&gt;request-&gt;isAjaxRequest) { $upload = new UploadedFiles; $upload-&gt;attributes = $_POST['UploadedFiles']; $file = CUploadedFile::getInstance($upload,'image'); $pi = pathinfo($file); $upload-&gt;name = $pi['filename']; $upload-&gt;ext = $pi['extension']; $upload-&gt;acc_id = $id; $upload-&gt;type_id = 1; $upload-&gt;date_uploaded = date('Y-m-d'); if($upload-&gt;save()) { $file-&gt;saveAs(Yii::app()-&gt;params['uploadFiles'] . $upload-&gt;id . '.' . $pi['extension']); Yii::app()-&gt;user-&gt;setFlash('success',Yii::t('flash','flash.accounts.successful_upload')); } } With the above code I am now able to do ajax file submissions and this is working as expected. The issue I am now having is that the file is placed into a folder and an ent…
linked to: http://stackoverflow.com/q/21061989
type: Question
has title: Yii Upload Files with Ajax - pass data array (formData)
tagged with: yii

http://stackoverflow.com/a/27312801
type: Answer
has comment: http://stackoverflow.com/comment/43091042
score: 0
answers question: http://stackoverflow.com/q/27312357
has body: var dates = ['2014-10-09','2014-10-10','2014-10-11','2014-10-12']; var objArray = [{date:"2014-10-09", model:"A", price:"100" }, {date:"2014-10-10", model:"A", price:"99" }, {date:"2014-10-12", model:"A", price:"102" }]; var val; var priceResult = []; for (var a in dates) { val = null; for (var b in objArray) { if (dates[a] == objArray[b].date) { val = objArray[b].price; } } priceResult.push(val); } var dates = ['2014-10-09', '2014-10-10', '2014-10-11', '2014-10-12']; var objArray = [{ date: "2014-10-09", model: "A", price: "100" }, { date: "2014-10-10", model: "A", price: "99" }, { date: "2014-10-12", model: "A", price: "102" }]; var val; var priceResult = []; for (var a in dates) { val = null; for (var b in objArray) { if (dates[a] == objArray[b].date) { val = objArray[b].price; } } priceResult.push(val); } // output result in StackOverflow snippet document.write(JSON.stringify(priceResult));

http://stackoverflow.com/q/27168356
upvote count: 1
tagged with: object
has answer: http://stackoverflow.com/a/27168847
tagged with: underscore.js
has body: Below is the response I get from the server using $.getJSON. I want to be able to call each array separately so I can use an underscore js template to output the data. How can I split the arrays out or call each array separately to perform the necessary loop to show both the kept and passed data? { kept: [ 0: { counter: "1", image: "image1.png", name: "alias" }, 1: { counter: "1", image: "image2.png", name: "lorem" } ], passed: [ 0: { counter: "1", image: "image3.png", name: ""dolores"" }, 1: { counter: "1" image: "image4.png" name: ""quisquam"" } ] }
accepted answer: http://stackoverflow.com/a/27168847
has answer: http://stackoverflow.com/a/27168578
type: AnsweredQuestion
tagged with: arrays
downvote count: 0
tagged with: javascript
score: 1
possible better answer: http://stackoverflow.com/a/27168578
favorite count: 0
type: Question
has title: Split arrays from object and use in underscore template
answer count: 2

http://stackoverflow.com/q/27158252
accepted answer: http://stackoverflow.com/a/27158332
has title: How to load .txt into canvas
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27158504
upvote count: 2
has comment: http://stackoverflow.com/comment/42810664
has answer: http://stackoverflow.com/a/27158504
type: Question
has body: i'm not to bad at javascript myself but i am wondering for a few days at this moment wheter it's possible or not. And if it is, who can help me ? i need to build a single page application , and i am at the early phase. now one part where i am stuck at the moment is. i wish to load different kind of questions into a canvas. => java of the canvas var Question = 'questions'; //&lt;= **this is the part that needs to be corrected** var canvas = document.getElementById('myCanvas'); var ctx = canvas.getContext('2d'); ctx.font = 'italic 18px Arial'; ctx.textAlign = 'center'; ctx. textBaseline = 'middle'; ctx.fillStyle = 'red'; // a color name or by using rgb/rgba/hex values ctx.fillText(Question,100,50)// text and position to be more clear. i have let's say 10 questions. i want to load them one by one into the canvas by clicking a button. but i can't figure out how to load .txt files into the canvas can anyone PLEASE help me ? thanx in advance , any help would be much appriciated
has answer: http://stackoverflow.com/a/27158332
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42909203
has text: I believe there's a global execution context as well. One that's entered when the javascript file is being evaluated. Afterall, there has to be some execution context within which to evaluate the definition of Foo.
type: Comment
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/27214528

http://stackoverflow.com/q/27242592
has comment: http://stackoverflow.com/comment/42961396
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42961374
has comment: http://stackoverflow.com/comment/42961382
tagged with: closures
tagged with: javascript
tagged with: jquery
tagged with: jquery-selectors
upvote count: 1
has title: Iterating over jQuery selector with variable, using closures
downvote count: 0
answer count: 1
favorite count: 0
has body: [First time on stackoverflow.] I am trying to dynamically add html buttons to my page and then give them a javascript function to run when they are clicked, using jQuery's click. I want to have one button for each element in an array, so I used a for loop. My code looks like this (simplified) for (var i = 0; i &lt; results.length; i++) { $("#" + place[i].place_id).click(function(){console.log("Test");}) $("#" + place[i].place_id).click(); } (I inject buttons with the right id's in the same loop.) This code, when run, console logs "Test" the right number of times, but afterwards, only the last button responds "Test" when clicked. (This situation is a little absurd.) So, I think the event handler ends up using only the final value of i to assign the event handler. I think the problem has to do with closures, but I am not sure how to make a closure out of a jQuery Selector (and in general am not familiar with them). In contrast, as a hack solution, I "manually" wrote code like the below right below and outside the for loop, and it works as expected, in that clicking causes the console log. $("#" + place[0].place_id).click(function(){console.log("Test");); $("#" + place[1].place_id).click(function(){console.log("Test");}); etc. (Of course, this all occurs within a larger context - specifically a Google Maps Places API call's callback.) First, am I understanding the problem correctly? Second, what would work? Should I take a different approach altogether, like use a .each()? (I later would want to display a property of place[i] when clicked, which I would think would need another callback My final hack code looks like this: $("#" + place[0].place_id).click(function(){google.maps.event.trigger(placeMarkers[0], "click"); repeated 20 times
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27242779
linked to: http://stackoverflow.com/q/750486

http://stackoverflow.com/q/27165513
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27165744
has answer: http://stackoverflow.com/a/27174183
type: UnansweredQuestion
has title: Convert CKEDITOR to TextArea
has body: I have a text area and a button. On click of that button I'm converting textarea to ckeditor. My additional requirement is that , on click of other button the ckeditor must be converted back to textarea. My code: &lt;textarea name="editor"&gt;&lt;/textarea&gt; &lt;input type="button" value="click" onclick="CreateEditor('editor')" /&gt; &lt;script type="text/javascript"&gt; function CreateEditor(name) { var editor = CKEDITOR.instances[name]; if (editor) { editor.destroy(true); } CKEDITOR.replace(name, { toolbarStartupExpanded: false, autoGrow_onStartup: true }); if (CKEDITOR.env.webkit) { CKEDITOR.on("instanceReady", function (e) { document.getElementsByClassName("cke_wysiwyg_frame cke_reset")[0].contentDocument.body.parentNode.contentEditable = "true"; if (typeof FocusedElement !== 'undefined') { FocusedElement = e.editor.name; } }); } } &lt;/script&gt; How can i achieve this?
type: Question
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has answer: http://stackoverflow.com/a/27166638
score: 0

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

http://stackoverflow.com/comment/42959414
type: AnswerComment
has text: I Like it - I'm trying to do that in a sort function at the moment - I'm sure I'm just one step away from some really elegant logic :)
comment on: http://stackoverflow.com/a/27240966
score: 0
type: Comment

http://stackoverflow.com/q/27183056
tagged with: jquery
has body: For layout major reasons I want to have two parts of a form in different parts of the page. At the top I have: <?php echo "$content"?> <input name="userName" type="hidden" value="<?php echo "$userName"; ?>"> etc. This is in the top part of a Bootstrap panel. It is the message that will be sent out at various times In the panel body I have all the possible times the messages can be sent. Sun - Sat, week of the month 1-5. IE 35 <input type="text fields generated by a php foreach loop pulling down the individual times and ids from a DB. Viz five times: <?php echo (" $localDay "); // $dayScheduleId //For each time schedule get time foreach ($timeSchedule as $timeItem) { echo " "; $localTime = $mySchedule->retrieveTime ($timeItem); debug($localTime,"hola"); $localTime = $mySchedule->dirtyTime ($localTime); /////////////////////////////////// NB 5 TIMES A WEEK TIME TAB ?> <input name="time_id<?php echo"$timeItem"?>" id="time_id_id<?php echo"$timeItem"?>" class="form-control input-sm" style="width:55px; height:20px; margin:0; padding:2px; text-align: center;" type="text" value="<?php echo"$localTime"?>"> <?php echo " "; } echo " "; Originally I had two separate forms but when a user sees the page it is all too tempting to edit the text and then go down the page and edit the times. If you hit the top submit button the message is updated and not the times and the bottom button vice versa. Very unhelpful. I cleaned everything out and made one big form BUT did not realise that Chrome (and I presume other browsers) inset a tag if you try and push the form past a . I presume they are kindly fixing unclosed tags. I have tried naming the forms the same but that does not work. The top part of the form is very simple - just a text area whose value is populated by a php echo. My JS is rudimentary and jQuery just about non existent. If there is not a straight HTML way through this is there a SIMPLE JS solution (and/or PHP)? Grateful for any ideas.
has comment: http://stackoverflow.com/comment/42854416
has comment: http://stackoverflow.com/comment/42854342
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/42855379
has answer: http://stackoverflow.com/a/31507074
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42854031
has title: How can I "spread" a form to two areas of a Bootstrap panel? (Browser "fixing" unclosed form tag)
has comment: http://stackoverflow.com/comment/42853840
type: Question
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/43018876
has text: Instead of `topChamps=[]; topChamps[0]=champion;` it's better to simply do `topChamps=[champion];`. And you should use `topChamps.push(champion)` instead of `topChamps[topChamps.length]=champion;` for readability.
comment on: http://stackoverflow.com/a/27274173
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27181579
type: Answer
answers question: http://stackoverflow.com/q/27181525
score: 0
has body: The first and most important thing is: This is only the client side of the code where you are trying to prevent the user from submitting multiple votes. Pay attention as anyone could use the developer tools in their browsers to send the ajax request again and again. So I would rather prevent the voting in the model and the database structure behind the scenes before fixing a simple UI issue. The second thing is: If your page is being refreshed after clicking the button, I reckon you need to change the "type" attribute of your button from "submit" to "button". The first and the second code should be fine to get the result you want. Look at the code @plalx put in the answers for a better one. Hope this helps!

http://stackoverflow.com/comment/43009232
has text: Would you be better using a [static map](https://developers.google.com/maps/documentation/staticmaps/), which can have multiple markers? Or maybe just using the [Javascript Maps API](https://developers.google.com/maps/documentation/javascript/), writing your own javascript to load a map and as many markers as you like?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27268262

http://stackoverflow.com/q/27303156
has body: So, i am in the midst of making a little website where you can calculate right angled triangles. Y'know, just for the fun of it. Atm, i'm testing the real time calculation of the different html forms, however, i can't figure out why the form for cathetusB isn't updating. Any help is appreciated! This is how all the forms are set up: &lt;input type="number" step="0.01" id="someID" onkeyup=calculate();&gt; The JS code messed up when i tried to paste it in, so here's a fiddle! EDIT: Added all the code to the Fiddle!
answer count: 2
has comment: http://stackoverflow.com/comment/43069701
has comment: http://stackoverflow.com/comment/43069524
tagged with: javascript
has comment: http://stackoverflow.com/comment/43070129
favorite count: 0
linked to: http://stackoverflow.com/q/14028959
has comment: http://stackoverflow.com/comment/43069477
score: 0
has comment: http://stackoverflow.com/comment/43069622
has comment: http://stackoverflow.com/comment/43069999
tagged with: http://stackoverflow.com/tag/html
has title: HTML form not updating, when being manipulated by JavaScript
has answer: http://stackoverflow.com/a/27303230
downvote count: 2
has comment: http://stackoverflow.com/comment/43070196
has comment: http://stackoverflow.com/comment/43069443
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27303609
accepted answer: http://stackoverflow.com/a/27303609
tagged with: dom
possible better answer: http://stackoverflow.com/a/27303230
type: Question
upvote count: 2

http://stackoverflow.com/q/27310727
tagged with: javascript
tagged with: routes
score: 0
has comment: http://stackoverflow.com/comment/43087671
tagged with: backbone.js
type: UnansweredQuestion
tagged with: refresh
answer count: 0
has body: I have the following code: // /views/view.js App.NavBarView = Backbone.View.extend({ tagName: 'li', template: _.template('&lt;a href="page1"&gt;&lt;/a&gt;'), render: function () {// some code here}, events: { 'click a': 'reroute' }, reroute: function (e) { e.preventDefault(); App.Router.navigate($(e.target).attr('href'), {trigger: true}); } }); // js/app.js var appRouter = new App.Router({ main: $('#main'), }); Backbone.history.start({ pushState: true }); When I clicked on the anchor, I will get the following results: //localhost:3000/page1 Which is okay. But when I execute a page refresh (cmd + R for Mac)(F5 for windows), I got the following error: // Cannot GET /page1 How can I reroute the page back to the same url (localhost/page1) when I clicked on the refresh button?
has comment: http://stackoverflow.com/comment/43084070
has comment: http://stackoverflow.com/comment/43082583
type: Question
has title: Backbone return to the same route on page refresh
has comment: http://stackoverflow.com/comment/43084965

http://stackoverflow.com/a/27290116
answers question: http://stackoverflow.com/q/27289974
has comment: http://stackoverflow.com/comment/43046502
type: Answer
has body: To my understanding, sorting is not necessary; at least in your example, the desired resulting array can be generated in linear time as follows. var Result; for ( var i = 0; i &lt; Input.length; i++ ) { Result[i] = Input[Order[i]-1]; } Here Result is the desired output, Input is your first array and Order the array containing the desired positions.
score: 0
has comment: http://stackoverflow.com/comment/43046391

http://stackoverflow.com/comment/42912838
score: 1
comment on: http://stackoverflow.com/q/27216476
type: Comment
type: QuestionComment
has text: Consider using the jquery ajax methods $.ajax() or $.post(). Right now you are just posting a form without ajax.

http://stackoverflow.com/comment/61384741
comment on: http://stackoverflow.com/a/27157871
score: 0
type: Comment
has text: Unfortunately that appears to not work in Angular 1.5. The raw HTML is printed in the select.
type: AnswerComment

http://stackoverflow.com/comment/42865070
score: 0
comment on: http://stackoverflow.com/q/27189482
type: Comment
type: QuestionComment
has text: It's working but you are not refreshing the page. Textarea it's rendendered at time 0. Then you have Ajax call at time 1. Textarea it's already rendered so it's not refreshed.

http://stackoverflow.com/comment/43275273
comment on: http://stackoverflow.com/q/27290671
score: 0
has text: @nathanchere: I saw your profile and found that why my question is irrelevant for you. My question is related with google may and no related tag i found in your profile. :)
type: QuestionComment
type: Comment

cryptojs
tags question: http://stackoverflow.com/q/27220297
tag name: cryptojs
tags question: http://stackoverflow.com/q/27174971
tags question: http://stackoverflow.com/q/27171390
type: Tag

http://stackoverflow.com/a/27278499
has body: You can use a blurred rectangle at z-index -1 and a non blurred rectabgle at z-index 1. So the non blurred rectangle will be placed over the blurred rectange and so its contents will be displayed clearly. HTML: HELLO CSS: .blurredRectangle { background-color: black; opacity: .7; top: 15px; width: 1870px; height: 900px; position: absolute; -webkit-filter: blur(5px); -moz-filter: blur(5px); -o-filter: blur(5px); filter: blur(5px); z-index: -1; } .nonBlurredRectangle { top: 15px; width: 1870px; height: 900px; position: absolute; z-index: 1; } .noBlur { top: 30px; width: 1870px; height: 900px; position: absolute; -webkit-transform: translateZ(0) !important; -webkit-filter: blur(0px); -moz-filter: blur(0px); -o-filter: blur(0px); filter: blur(0px); }
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27278251
answers question: http://stackoverflow.com/q/27278251
score: 2
downvote count: 0

http://stackoverflow.com/q/27175171
answer count: 2
has title: Debugging JavaScript minification errors (in Liferay 6.2)
tagged with: javascript
has answer: http://stackoverflow.com/a/27184045
score: 0
has body: Liferay 6.2. tries to use best practices and JS minification is one of them. But what do you do when your unminified JavaScript works and minification produces errors like this (in Tomcat console): 12:23:48,794 ERROR [http-bio-8080-exec-10][MinifierUtil:111] 607: 21: identifier is a reserved word 12:23:48,797 ERROR [http-bio-8080-exec-10][MinifierUtil:111] 608: 45: identifier is a reserved word 12:23:48,802 ERROR [http-bio-8080-exec-10][MinifierUtil:111] 1: 0: Compilation produced 2 syntax errors. 12:23:48,805 ERROR [http-bio-8080-exec-10][MinifierUtil:88] JavaScript Minifier failed for_________ AUI().use('node', 'aui-base', 'aui-io-request', 'aui [MinifierUtil:111] 607: 21: and [MinifierUtil:111] 608: 45: are not line numbers in your code (jsp/ftl/...) as man expects from console log and googling "identifier is a reserved word" or "JavaScript Minifier failed for_________" helped me almost nothing (ok, I knew about https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords normally). Pasting code between &lt;script&gt; and &lt;/script&gt; to JS lint or hint or any other JS tool is not an option as it contains many JAVA and spring/freemarker/liferay tags etc... So - my question is - as I wasn't able to find best practices / methodologies for debugging this - what is your opinion (or even better - experience :)) ?
tagged with: minify
has answer: http://stackoverflow.com/a/27175172
accepted answer: http://stackoverflow.com/a/27184045
type: Question
possible better answer: http://stackoverflow.com/a/27175172
type: AnsweredQuestion
tagged with: liferay

http://stackoverflow.com/q/27224221
linked to: http://stackoverflow.com/q/203198
upvote count: 0
has answer: http://stackoverflow.com/a/27224249
duplicate of: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/27224278
has title: unable to set CSS and click handler in jQuery after use of replaceWith()
type: AnsweredQuestion
score: -1
type: Question
tagged with: javascript
tagged with: jquery
has body: I am using jQuery to replace normal checkbox with image. I am able to replace checkbox with image but unable to set CSS and click handler on image. This is my jQuery code. (function ($) { $.fn.SetOnOff = function (onImage,offImage) { debugger; var html = '&lt;img style="width: 80px; height: 30px" src="'+offImage +'"/&gt;'; $(this).replaceWith(html); $(html).css('cursor','pointer'); $(html).click(function(){ var fileName = $(this).attr('src'); if (fileName == onImage) $(this).attr('src', offImage); else $(this).attr('src', onImage); }); return $(this); }; } (jQuery)); can anybody let me know how to do this? you use This link to test it
possible better answer: http://stackoverflow.com/a/27224272
favorite count: 0
has answer: http://stackoverflow.com/a/27224272
answer count: 3
downvote count: 1
accepted answer: http://stackoverflow.com/a/27224278

http://stackoverflow.com/comment/42863201
has text: that would be possible but reading the comments above I guess yo already got it to work?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27187150
type: Comment

http://stackoverflow.com/a/27156242
has body: After a bit of investigation, I discovered that the WordPress admin area uses several script tags with the type="text/html". ICanHaz.js looks for any script tags with this type to use as it's templates, and it removes them from the DOM. So when the WordPress admin javascript looks for these tags, they no longer exist, causing the error. So it appears I Can't Haz ICanHaz.js in my WordPress admin interface.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27154728

http://stackoverflow.com/a/27238287
downvote count: 0
score: 4
type: Answer
has body: Use javascript to target the hidden input and set the value before submitting the form: HTML &lt;input type="hidden" name="chat" id="hiddenInput" /&gt; JS var input = document.getElementById('hiddenInput'); input.value = testVariable.toString(); Also, on your Node server, you need to access req.body.chat - the body property you want corresponds to the name of the input element
accepted answer of: http://stackoverflow.com/q/27238231
has comment: http://stackoverflow.com/comment/42954060
has comment: http://stackoverflow.com/comment/42955658
answers question: http://stackoverflow.com/q/27238231
upvote count: 4
has comment: http://stackoverflow.com/comment/93677519
type: AcceptedAnswer

http://stackoverflow.com/q/27256161
has answer: http://stackoverflow.com/a/27257545
favorite count: 0
has comment: http://stackoverflow.com/comment/42988731
accepted answer: http://stackoverflow.com/a/27257545
type: AnsweredQuestion
score: 10
has body: I want to do something like: db.ratings.find().forEach(function(doc){ var item = db.items.find({_id: doc.item_id}) var ry = item.detail.ry db.ratings.update(doc,{$set: {itd: ry}}) }) The problem is that db.items.find({_id: doc.item_id}) is returning something to which I cannot call document properties directly. Which would it be the correct way of doing this? Thanks! db.items: { "_id" : ObjectId("5461c8f0426f727f16000000"), "n" : "The Shawshank Redemption", "detail" : { "ry": 1992 } }
upvote count: 10
has title: Querying other collection inside forEach
type: Question
tagged with: mongodb
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/45010516
score: 0
comment on: http://stackoverflow.com/a/27371780
type: Comment
has text: Yes, you will need to just grab a reference to the item and do ".addListener('refresh',function(){ })"
type: AnswerComment

http://stackoverflow.com/a/27221609
has comment: http://stackoverflow.com/comment/42921964
has body: Use push method my_2d_array.push({'id':name,'socket':socket}); my_2d_array.push({'id':name,'socket':socket}); And my_2d_array.length to get the count
answers question: http://stackoverflow.com/q/27221572
score: 3
has comment: http://stackoverflow.com/comment/42922018
has comment: http://stackoverflow.com/comment/42921971
downvote count: 0
has comment: http://stackoverflow.com/comment/42921948
has comment: http://stackoverflow.com/comment/42922099
type: Answer
upvote count: 3

http://stackoverflow.com/q/27263330
score: 3
tagged with: javascript
downvote count: 0
has title: dimple.js - show gaps in line chart
favorite count: 0
type: UnansweredQuestion
has body: I would like to draw a line chart that will show gaps for missing data for any dates along the x-axis. I looked at this example here http://bl.ocks.org/mbostock/3035090 and then looked at the dimple source. i essentially attached a new draw function to series.plot.draw that was the same as in line.js but replace the getLine function with one below. I see the new draw function getting called, but still does not seem to work however...as no gaps are appearing where missing data exist for certain dates. getLine = function (inter, originProperty) { return d3.svg.line() .defined(function (d) { return d.y != null; }) .x(function (d) { return (series.x._hasCategories() || !originProperty ? d.x : series.x[originProperty]); }) .y(function (d) { return (series.y._hasCategories() || !originProperty ? d.y : series.y[originProperty]); }) .interpolate(inter); }; Any thoughts on how to solve this?
tagged with: dimple.js
answer count: 0
tagged with: d3.js
upvote count: 3
type: Question

http://stackoverflow.com/comment/43281919
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27355135
type: Comment
has text: Well, you* don't, you cannot speak for people in general as some other people here did visit the website to check out the problem.. It wasn't even a code program, more of a logical problem. Posting the code here wouldn't have been any help ;p

http://stackoverflow.com/q/27220495
has body: im trying to get data out of firebase to be used in a game programmed in JS. The problem is I can never get the data. this is the JSON i'm adding in the editor: {xcord: 23, ycord: 3543} This is the JS code im using to try and get the data: fb.on('child_added', function(snapshot) { obj = snapshot.val(); alert(obj.xcord); c1.x = obj.xcord; c1.y = obj.ycord; stage.update(); }); When the alert pops up, all i get is 'undefind'. Anyone know whats wrong?
has comment: http://stackoverflow.com/comment/42955085
has comment: http://stackoverflow.com/comment/42958058
upvote count: 1
accepted answer: http://stackoverflow.com/a/27240856
tagged with: firebase
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/27220754
has comment: http://stackoverflow.com/comment/42933231
type: Question
has answer: http://stackoverflow.com/a/27220754
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
has title: I cant get data out of firebase in javascript
has comment: http://stackoverflow.com/comment/42957709
favorite count: 0
has answer: http://stackoverflow.com/a/27240856

http://stackoverflow.com/q/27286631
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27290737
tagged with: css
tagged with: drupal
has body: Facing the drupal slowness issue. But have a very different issue than the others mentioned. I disabled all the content also the drupal header for a drupal page of a specific content type. Still the time taken by this page to load is above 20 secs! I took help of YSlow and NET firebug panels. Upon looking at them, noticed: JS and CSS files inclusion individually takes 3 to 2 secs, and there are fair bit of inclusions happening, as a result it takes like 20 secs. But i am not able to figure out, why the js and css inclusions are taking so much time. (this includes normal drupal core js and css files as well)
has answer: http://stackoverflow.com/a/27287146
type: Question
answer count: 2
tagged with: drupal-7
tagged with: javascript
tagged with: jquery
score: 0
has title: Drupal site page slowness (this is a different from other questions on same topic)

http://stackoverflow.com/q/27287201
has body: I am using Selenium Webdriver (Java) with Firefox driver. When i hit the 'Submit' button on a specific page, it does nothing other than scrolling the screen down a bit. The 'Submit" button does not gets clicked and the rest of the operation fails. Anyone has a clue why it does like this? I have tried clicking the same button with its ID, css and xpath. Does the same using all these locators.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/43677573
tagged with: selenium-webdriver
has title: Upon clicking the submit button the screen scrolls down and does nothing
has comment: http://stackoverflow.com/comment/43042861
has comment: http://stackoverflow.com/comment/43045882
tagged with: selenium
has comment: http://stackoverflow.com/comment/43043558
has comment: http://stackoverflow.com/comment/43043459
type: Question
has comment: http://stackoverflow.com/comment/43080763
tagged with: javascript
has comment: http://stackoverflow.com/comment/43041979
has comment: http://stackoverflow.com/comment/43041348
score: 0
answer count: 1

http://stackoverflow.com/comment/42961377
type: AnswerComment
type: Comment
has text: i have edited to question with detail of my javascript and java codes.. Please see the question
score: 0
comment on: http://stackoverflow.com/a/27231514

http://stackoverflow.com/comment/42953553
comment on: http://stackoverflow.com/a/27238464
type: Comment
score: 0
type: AnswerComment
has text: indeed i get an alert, thanks. but I still cant select anything from the drop down menu.

http://stackoverflow.com/a/27364734
accepted answer of: http://stackoverflow.com/q/27250053
answers question: http://stackoverflow.com/q/27250053
has body: This question really doesn't have anything to do with jQuery or D3; it's just plain JavaScript and JSON. If you just want your code to work with any other array in your JSON object, then it's simply a matter of replacing your if statement where you check for d["children"] to go through all the attributes of the JSON object and recurse on anything that is an array instead. Something like this: function flatten(root) { var nodes = [], i = 0; function recurse(node) { for (var x in node) { if (Array.isArray(node[x])) { node.size = node[x].reduce(function(p, v) { return p + recurse(v); }, 0); } } if (!node.id) node.id = ++i; nodes.push(node); return node.size; } root.size = recurse(root); return nodes; }
score: 3
downvote count: 0
type: AcceptedAnswer
upvote count: 3
type: Answer

http://stackoverflow.com/a/27294097
type: Answer
has comment: http://stackoverflow.com/comment/43068631
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43069068
has comment: http://stackoverflow.com/comment/43068876
answers question: http://stackoverflow.com/q/27293877
upvote count: 1
has body: For Json Parsing in angular you have to use the following code in success method. .success(function(data){ var response=angular.fromJson(data); $scope.artists = response.fields; }) modify your &lt;table&gt; as below, Because you have assign the response array to $scope.artists. Then you can use your json data with individual key. &lt;table ng-repeat="artist in artists"&gt; &lt;tr&gt; &lt;td&gt;{{artist.link}}&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; check whether the value is getting or not in console. .success(function(data){ var response=angular.fromJson(data); $scope.artists = response.fields; console.log("artist :"+$scope.artists.artist); console.log("link :"+$scope.artists.link); })

http://stackoverflow.com/a/27251584
has comment: http://stackoverflow.com/comment/42985660
score: 3
accepted answer of: http://stackoverflow.com/q/27235768
answers question: http://stackoverflow.com/q/27235768
type: AcceptedAnswer
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/42978768
downvote count: 0
has body: You are on the right track. Here is a way to make what you have work: from mpld3 import utils, plugins class ClickInfo(plugins.PluginBase): """Plugin for getting info on click""" JAVASCRIPT = """ mpld3.register_plugin("clickinfo", ClickInfo); ClickInfo.prototype = Object.create(mpld3.Plugin.prototype); ClickInfo.prototype.constructor = ClickInfo; ClickInfo.prototype.requiredProps = ["ids"]; function ClickInfo(fig, props){ mpld3.Plugin.call(this, fig, props); }; ClickInfo.prototype.draw = function(){ this.props.ids.forEach(function(id, i) { var obj = mpld3.get_element(id); obj.elements().on("mousedown", function(d){alert("clicked on bar[" + i + "]");}); }); } """ def __init__(self, bars): self.dict_ = {"type": "clickinfo", "ids": [utils.get_id(bar) for bar in bars]} x = range(0,10) y = np.random.rand(10) fig, ax = plt.subplots() bars = ax.bar(x, y) plugins.connect(fig, ClickInfo(bars)) You can see it in action here. Perhaps someone else will have time to extend this answer with more of an explanation of how the code works.

http://stackoverflow.com/comment/42838033
type: QuestionComment
has text: I think Bin packing is more suited for this ... look here for example http://stackoverflow.com/a/21282418/2521214
comment on: http://stackoverflow.com/q/27174138
score: 0
type: Comment

http://stackoverflow.com/comment/42812307
comment on: http://stackoverflow.com/q/27158983
type: Comment
type: QuestionComment
has text: But your code uses font which overrides the header's font size. Try using a base font size on the `fitin` div and set the child elements font-size using em
score: 1

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

http://stackoverflow.com/comment/43022681
type: Comment
has text: The great news is that is working! Thanks! But when I try to set the new center, like: `$(function(){ Gmaps.buildMap(function(){ Gmaps.map.setCenter(43.652976, -79.390409); Gmaps.map.setZoom(5); }) })` - nothing happens right now, and no JS error in the console.
type: AnswerComment
comment on: http://stackoverflow.com/a/27272640
score: 0

http://stackoverflow.com/a/27282009
has body: The JavaScript that runs in a .gs code file, runs on Google's server. It's server side code. There is no window object for a .gs code file. One useful service for storing data is the Cache Service Google Documentation Link - Cache Service You just need to search the Google Apps Script documentation for Classes, Methods and Properties that are available. There is auto-complete in the code editor, which should give you an idea of what's available to Apps Script Classes. There are classes in Apps Script that are specific to Apps Script, like: UI service or the HTML service, and the Content service. If you are looking for what is available to client side JavaScript in the browser, that's different. You can use client side JavaScript and jQuery with HTML Service.
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/64727795
score: 2
has comment: http://stackoverflow.com/comment/43042518
accepted answer of: http://stackoverflow.com/q/27280399
answers question: http://stackoverflow.com/q/27280399
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43054496
score: 0
type: Comment
has text: Thanks for the heads-up as well. I'll try a workaround for that. Anyway, since the page is running in a kiosk and the initial request will be always done through the shortcut/links created for that environment I just have to make sure they always have this information.
comment on: http://stackoverflow.com/a/27280608
type: AnswerComment

http://stackoverflow.com/q/27234034
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42945254
answer count: 0
has comment: http://stackoverflow.com/comment/42983882
has comment: http://stackoverflow.com/comment/42945436
type: Question
has comment: http://stackoverflow.com/comment/42945465
has body: I have a form, &lt;form id="collabAccess" onsubmit="return accessBox.submitCollabForm()" &gt; which runs accessBox.submitCollabForm() on submit. The code for submitCollabForm is: function submitCollabForm() { console.log('in submitcollabform'); var valid = validateEmails(); console.log(valid); if (valid == false) { $('#email').addClass('error'); $('#errorMessage').removeClass('hidden'); return false; } else { postCollaborators(); console.log('in valid email'); return true; } } However, whenever the variable valid is true, it appears that submitCollabForm is not actually running the else statement, as no console log statements are being output. I'm not sure if I'm misunderstanding how onsubmit works, or if something is wrong in my code. Is the else statement actually being executed? The postcollaborators() function: postCollaborators = function() { baseURL = ""; binId = "xyz"; var pubaccess = $('#pubacc').val(); var email = $('#email').val(); var emailval = email.split(','); var emaildata = ""; var useraccess = $('#collabaccess').val(); var access=''; if (useraccess === 'Can Read') { access="Read"; } else if (useraccess === 'Can Write') { access="Write"; } else if (useraccess === 'Can Read &amp; Write'){ access="ReadWrite"; } else { access="Administrator"; } for (var i = 0; i &lt; emailval.length; i++) { emailval[i] = emailval[i].trim(); emaildata += (emailval[i] + "=" + access +"?"); } var bindata = "Bin="+binId + "?"; var datastring = baseURL +"?" + bindata + emaildata + alldata;
tagged with: javascript
has comment: http://stackoverflow.com/comment/42945265
score: 0
has comment: http://stackoverflow.com/comment/42945056
has title: Onsubmit not executing function when it returns true
has comment: http://stackoverflow.com/comment/42945183

http://stackoverflow.com/q/27214312
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Javascript get responseText from object
has comment: http://stackoverflow.com/comment/42908920
score: 1
has comment: http://stackoverflow.com/comment/42910115
type: Question
has comment: http://stackoverflow.com/comment/42908754
tagged with: responsetext
downvote count: 0
tagged with: javascript
tagged with: response
has body: I have this response when I call URL: Now I want to get responseText.message but I dont know how... I try: Object.responseText.message and Data.responseText.message and data.message but I get Undefined How to get reponseText?
favorite count: 0

http://stackoverflow.com/comment/43040023
comment on: http://stackoverflow.com/q/27286320
score: 0
has text: @Kartikeya then u tell me how to pass different value?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42817498
comment on: http://stackoverflow.com/q/27161953
has text: I don't understand the question. `.welcome-msg` will select the `` elements, why do the ` ` elements matter?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27265898
score: 0
has comment: http://stackoverflow.com/comment/43003247
has answer: http://stackoverflow.com/a/27265982
has answer: http://stackoverflow.com/a/27266019
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27265960
accepted answer: http://stackoverflow.com/a/27265982
linked to: http://stackoverflow.com/q/4524661
has answer: http://stackoverflow.com/a/27265997
has answer: http://stackoverflow.com/a/27266054
has answer: http://stackoverflow.com/a/27265960
has answer: http://stackoverflow.com/a/27272627
has title: I am not getting any alert message
has comment: http://stackoverflow.com/comment/43003086
has comment: http://stackoverflow.com/comment/43003119
type: Question
tagged with: javascript
answer count: 6
tagged with: jquery
has body: I am trying to get the row index of a table with the help of jquery using the alert function but I am not able to get any output . When I click on the edit button there is no action Please help me with this!

http://stackoverflow.com/q/27208352
has body: I can create a Cat object and set a method on it's prototype to print out the cat's name. var log = function(message) { var results = $('#result'); results.append('&lt;p&gt;' + message + '&lt;/p&gt;'); }; function Cat(name) { this.name = name; } Cat.prototype.speak = function() { log('My name is ' + this.name); }; var fluffy = new Cat('Fluffy'); var tiddles = new Cat('Tiddles'); log(fluffy.name); fluffy.speak(); log(tiddles.name); tiddles.speak(); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="result"&gt;&lt;/div&gt; However, when I try to set the cat's prototype to an animal, I can't access the speak method: function Animal(name, sound) { this.name = name; this.sound = sound; this.speak = function() { log(sound + '! My name is ' + name); }; } function Cat(name) { this.prototype = new Animal(name, 'Meow'); } var fluffy = new Cat('Fluffy'); fluffy.speak(); // TypeError: undefined is not a function Why does fluffy not get the speak() method of its prototype?
upvote count: 4
type: AnsweredQuestion
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/27208370
has title: Can't access methods on object's prototype
has answer: http://stackoverflow.com/a/27208406
accepted answer: http://stackoverflow.com/a/27208406
tagged with: javascript
score: 4
possible better answer: http://stackoverflow.com/a/27208370
has comment: http://stackoverflow.com/comment/42898622
answer count: 2
has comment: http://stackoverflow.com/comment/42898679
favorite count: 0

http://stackoverflow.com/comment/42988864
type: QuestionComment
score: 2
has text: Simply take a screenshot, fade it out, and use it as a background image.
comment on: http://stackoverflow.com/q/27257631
type: Comment

http://stackoverflow.com/a/27312006
has body: You're going to need to give the inmoti6_ted_seminar user permissions. Log in as root to the mysql server and execute the following SQL, you can of course set which permissions they have, but I assumed you just wanted INSERT. CREATE USER 'inmoti6_ted_seminar'@'localhost' IDENTIFIED BY 'Polarbear5'; GRANT INSERT ON inmoti6_westcl5_ted_sem.* TO 'inmoti6_ted_seminar'@'localhost';
score: 0
answers question: http://stackoverflow.com/q/27309951
type: Answer

http://stackoverflow.com/q/27172394
accepted answer: http://stackoverflow.com/a/27174391
tagged with: asp.net-web-api
tagged with: javascript
score: 15
has title: javascript doesn't convert angular ui datepicker date to UTC correctly
answer count: 3
downvote count: 0
tagged with: angular-ui
has body: I'm using angular ui datepicker in my project(asp.net web api + angularjs). All works fine but when I'm trying to save date to Db it doesn't convert it to UTC format correctly and substructs 1 day(actually a few hours but it affects for a day too). For example when I choose 01/11/2014 in the datepicker: Angularjs object: Sat Nov 01 2014 00:00:00 GMT+0200 (FLE Standard Time) In request: 2014-10-31T22:00:00.000Z In asp.net api controller: {31-Oct-14 10:00:00 PM} Datepicker controller: app.controller('DatepickerCtrl', function ($scope) { $scope.today = function () { $scope.dt = new Date(); }; $scope.today(); $scope.clear = function () { $scope.dt = null; }; $scope.open = function ($event) { $event.preventDefault(); $event.stopPropagation(); $scope.opened = true; }; $scope.format = 'dd/MM/yyyy'; $scope.dateOptions = { 'starting-day': 1 }; }); hnml: Date of Birth But seems like angular datepicker highlight the correct date: I've tried to manually convert date to UTC format but unsuccessfully as well toUTCDate: function (d) { var date = new Date(d); var _utc = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());//, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds() return _utc; } Should I specify timezone or use angular js filter?
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27174811
has answer: http://stackoverflow.com/a/27174391
tagged with: datepicker
has answer: http://stackoverflow.com/a/29030439
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29030439
type: Question
upvote count: 15

http://stackoverflow.com/comment/43034717
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27282757
has text: can I have an example based on my problem please?

http://stackoverflow.com/q/27158944
downvote count: 3
has comment: http://stackoverflow.com/comment/42811874
type: Question
tagged with: javascript
tagged with: jquery
score: -3
has body: So I have function that reads the value of the text input and I just want to console.log that value to make sure it's working. But console.log returns just empty string. My Chrome developer tools shows no errors. Here is the code: Confirm
has answer: http://stackoverflow.com/a/27158975
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: jQuery reads the value but returns empty string

http://stackoverflow.com/q/27223568
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27223618
has comment: http://stackoverflow.com/comment/42925486
has comment: http://stackoverflow.com/comment/42925521
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42925563
has answer: http://stackoverflow.com/a/27223753
tagged with: forms
has body: I have an input which uses angular to generate a list of names, and I want each name to be a link that submits the form with the name as the input value. {% csrf_token %} Search: {({ artist })} The .val({({ artist })}); is where I want to inject whatever the value of {({ artist })} is, since I want the link to submit the form with the name as the value. How can I get the angular variable into the jquery?
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27223628
answer count: 3
has comment: http://stackoverflow.com/comment/42925817
has answer: http://stackoverflow.com/a/27223618
has title: How to use angular variable in jQuery code
possible better answer: http://stackoverflow.com/a/27223628

http://stackoverflow.com/q/27284599
has title: Take the array with the value more proximity
downvote count: 2
answer count: 1
favorite count: 0
has body: I have a set of data that I pick it up using a form and make a call to an api of a website with these data. To be a single value, did that make any checking and with that value to the call, that returned a value with the percentage that I had to subtract the value number entered on the form. GET /getvalues?id={FORMNUMBER} RETURN { "id": {FORMVALUE} "percent": 45 } Now in some cases api returns multiple values, and they have no identifier associated with each value, so would be easy, as they would only have to go and take the value of the identifier. GET /getvalues?id={FORMNUMBER} RETURN { "id": {FORMVALUE}, "values" : [ { "value": 18, "percent": 10 },{ "value": 45, "percent": 24 },{ "value": 57, "percent": 32 } ] } In the previous example, if the value in my form is 21 should take 18 since it has less difference between both numbers, but if the value is 40 also I take the value of 18 since it has not passed the value of 45. I need to take the value more equal or lower than this more next to a value that pick up the form and only occurs to me do it through all the array, making a subtraction and lesser value add to an array, catching the end of lower value. Is there any way more simple do it?. I think I can only make it with a function quite long and complex, and possibly inefficient. Thanks.
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/27284719
type: Question
has answer: http://stackoverflow.com/a/27284719
score: -2
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: sorting

http://stackoverflow.com/comment/42928574
type: QuestionComment
has text: You can put the code on JSFiddle. Such that easier for others to get a fast interpretation of your idea.
score: 0
comment on: http://stackoverflow.com/q/27224844
type: Comment

http://stackoverflow.com/q/27172871
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
downvote count: 0
type: UnansweredQuestion
has title: Smooth transition on collapsing element with angular & css only
type: Question
upvote count: 2
has body: I am trying to add a collapsable element to my app. I don't want to use jQuery or any other dependency than Angular. I have built a very simple demo here: http://jsfiddle.net/eg69cfub/2/ The elements are displayed/hidden properly the only problem is the transition. I don't understand why it is so abrupt, I'd like it to be smooth. How can I fix this please? HTML: Hello {{ test }} Goodbye CSS: li { list-style: none; } .header { width: 100%; background-color: red; } .body { width 100%; background-color: blue; display: block; min-height: 1px; transition: all ease 3s; overflow: hidden; } .collapsed { min-height: 0; height: 0; } JS: var myApp = angular.module('myApp',[]); function accordionCtrl($scope) { $scope.isVisible = false; }
has answer: http://stackoverflow.com/a/27174384
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/27260739
has comment: http://stackoverflow.com/comment/42994577
has answer: http://stackoverflow.com/a/27261025
has comment: http://stackoverflow.com/comment/42994666
has comment: http://stackoverflow.com/comment/42995629
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27261025
has body: Why does this replace instead of adding onto the object? I have also tried using this.push() instead of .concat() but exactly the same thing happens, it overrides whats been previously added the object. $scope.checkMatchinAnswer = function (required, ans, input) { $scope.correctAnswers = []; angular.forEach(required, function (value) { if (angular.equals(value.answer, ans) &amp;&amp; angular.equals(value.id, qid)) { $scope.correctAnswers = $scope.correctAnswers.concat([{ id: qid, answer: value.answer }]); } }); }
has comment: http://stackoverflow.com/comment/42994852
accepted answer: http://stackoverflow.com/a/27281828
has comment: http://stackoverflow.com/comment/42994733
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15013016
has comment: http://stackoverflow.com/comment/42994811
has comment: http://stackoverflow.com/comment/42994561
type: Question
answer count: 2
has title: concat and push overrides what has been previously added to the object
tagged with: javascript
has comment: http://stackoverflow.com/comment/42994641
has answer: http://stackoverflow.com/a/27281828
score: 0

http://stackoverflow.com/comment/43080452
type: AnswerComment
comment on: http://stackoverflow.com/a/27308578
score: 0
type: Comment
has text: I will change the name. But if I add this after `.appendTo( ul );` I don't see how it can work because anything after a `return` statement in a function has no effect. (I don't know javascript well, but that rule should apply in any language.)

http://stackoverflow.com/comment/42903571
type: QuestionComment
type: Comment
has text: @chicharito: thanks for clarifying. you got a great answer. :)
comment on: http://stackoverflow.com/q/27211052
score: 0

http://stackoverflow.com/q/27235301
type: UnansweredQuestion
downvote count: 2
has title: jQuery serialize nested form
type: Question
linked to: http://stackoverflow.com/q/379610
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/27238429
has body: I have a form inside another form element but when I try to serialize the nested form the function just returns an empty object. I ask this because I'm coding a Wordpress plugin and I need a form in the post editor page and everything I put in the page seems to be added inside a parent form, so here is an exmaple of what I want: JS Fiddle Other content goes here... This is the JS code var formData = jQuery('#otroform').serializeArray(); console.log(formData); Returns: [] If I remove the parent form then it will work normally. Thanks in advance.
answer count: 3
upvote count: 0
has answer: http://stackoverflow.com/a/27235407
tagged with: jquery
has answer: http://stackoverflow.com/a/27235365
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42947383

http://stackoverflow.com/a/27178953
has comment: http://stackoverflow.com/comment/42983622
has comment: http://stackoverflow.com/comment/42847515
has comment: http://stackoverflow.com/comment/42977479
has comment: http://stackoverflow.com/comment/42986891
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27178681
has comment: http://stackoverflow.com/comment/42985329
has body: You must define the properties on this instead of the constructor function function User(params) { var _username; Object.defineProperty(this, 'id', { get: function() { return _username; } }); Object.defineProperty(this, 'username', { get: function() { return _username; }, set: function(username) { _username = username; } }); if (params &amp;&amp; params.username) { this.username = params.username; } } User.prototype.stringify = function () { return JSON.stringify({ username: this.username}); }
has comment: http://stackoverflow.com/comment/42854831
has comment: http://stackoverflow.com/comment/42869568
accepted answer of: http://stackoverflow.com/q/27178681
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43005777
has comment: http://stackoverflow.com/comment/42988564
has comment: http://stackoverflow.com/comment/42991125
type: Answer

http://stackoverflow.com/a/27189817
accepted answer of: http://stackoverflow.com/q/27189445
has comment: http://stackoverflow.com/comment/42866011
has comment: http://stackoverflow.com/comment/42865949
answers question: http://stackoverflow.com/q/27189445
type: Answer
score: 1
upvote count: 1
has body: If the difference between now and previous frame is less or equal to zero, you have reached your 00 seconds if($scope.sales[i].vtimer &lt;= 0){ alert("Timer is over"); }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43183582
type: Comment
comment on: http://stackoverflow.com/a/27310881
type: AnswerComment
has text: Also—is it really necessary to use an additional package for this? Are not reactive variables built in to Meteor, i.e. Deps?
score: 0

http://stackoverflow.com/q/27177960
tagged with: mysql
upvote count: 1
type: Question
has title: Change Select Dropdown to checkbox
tagged with: javascript
has comment: http://stackoverflow.com/comment/42860093
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42845958
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/27181381
tagged with: laravel
has body: i have a select dropdown in my script, if you click on a entrie you add instant a filter to the site to sort the movies by genre. The script is as fallowing {{ trans('dash.genres') }} @foreach ($options->getGenres() as $genre) {{ $genre }} @endforeach Now i want to change the select dropdown to checkboxes, i achieved that with fallowing @foreach ($options->getGenres() as $genre) {{ $genre }} @endforeach but if i click on a checkbox nothing happens, for now i want it how it be with the one page filter result. The select dropdown adds a filter with js instantly on the page, how can i do this with the checkboxes? Any ideas how to change or what? Edit This is the list where the Genre get in after click on select This is the Js file for this function (function($) { 'use strict' app.viewModels.titles.index = { /** * Stores all the games in their original state. * * @type Array */ sourceItems: ko.observableArray(), /** * Latest genre user has selected. * * @type string, */ genre: ko.observableArray(), /** * Stores all parameters user is currently restricting titles query by. * * @type {Object} */ params: { /** * Currently selected sorting option. * * @type ko.observable(String) */ order: ko.observable('mc_num_of_votesDesc'), /** * Stores users query to filters games on. * * @type ko.observable(String), */ query: ko.observable().extend({ rateLimit: { method: "notifyWhenChangesStop", timeout: 400 } }), /** * Filter titles that were released after this date. * * @type ko.observable(String), */ after: ko.observable(), /** * Filter titles that were released before this date. * * @type ko.observable(String), */ before: ko.observable(), /** * Filter movies to only ones that specified actors appeared in. * * @type string */ cast: ko.observable(), /** * Filter titles by genres. * * @type string, */ genres: ko.observableArray(), type: ko.observable(), minRating: ko.observable(), maxRating: ko.observable(), }, /** * Uri to hit for paginated results. * * @type {String} */ uri: 'titles…
score: 1

http://stackoverflow.com/q/27249430
tagged with: neo4j
has answer: http://stackoverflow.com/a/27250025
accepted answer: http://stackoverflow.com/a/27250025
has body: I am trying to make a interaction with my local neo4j dataset through javascript. But I get this error: Uncaught SyntaxError: Unexpected token : (13:20:43:754 | error, javascript) at http://localhost:7474/?callback=jQuery111107695061936974525_1417522841327&{%22statements%22:[{%22statement%22:%22MATCH%20(n)%20RETURN%20count(n)%22}]}&_=1417522841328:2 success (13:20:43:958) at public_html/index.html:34 I.e. I want to sent and receive queries with a web application. This is my code by now: TODO supply a title
tagged with: localhost
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
score: 0
has title: Why doesn't my connection to neo4j work (through Javascript)

http://stackoverflow.com/comment/42907165
has text: if not using jsonp it will work. Now I confused btw json and jsonp.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27213364

http://stackoverflow.com/comment/42872546
type: Comment
comment on: http://stackoverflow.com/a/27193305
has text: If you alert() your *real* input string and actually *see* "\ue40a" then to replicate that string in javascript you need to use two \\ instead of one \ - http://jsfiddle.net/ztj0akp6/
type: AnswerComment
score: 0

http://stackoverflow.com/a/27291608
answers question: http://stackoverflow.com/q/27291520
upvote count: 1
has comment: http://stackoverflow.com/comment/43049280
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43050731
has body: &lt;script&gt; function code(inputd) { var phoneno = /^\d{11}$/; if(inputd.match(phoneno)) { return true; } else { alert("error"); return false; } } &lt;/script&gt; &lt;form&gt; &lt;input type="text" id='Phone'&gt; &lt;input type="submit" onclick=return code(document.getElementById("Phone").value);&gt; &lt;/form&gt; Please try this hope it is helpful.
type: Answer
has comment: http://stackoverflow.com/comment/43050262
has comment: http://stackoverflow.com/comment/43050766

http://stackoverflow.com/q/27285981
favorite count: 0
has body: i got a very weird situation here. At first, I wrote a simple directive. mublABase.directive('parentSize', function() { return { link : function(scope, elem, attrs) { scope.parentSize = { width : elem.parent().width(), height : elem.parent().height() } } } }); And this is my simplified html code &lt;input type="text" ng-model="parentSize.width"&gt; //for test No.1 &lt;div parent-size class="no-border"&gt; {{parentSize.width}} //for test No.2 &lt;span class="glyphicon glyphicon-leaf" ng-style="{'font-size':'{{parentSize.width}}px'}"&gt;&lt;/span&gt; //this is the problem No.3 &lt;/div&gt; And result is broken. No.1 input and No.2 text says width is 285. But at No.3, that leaf icon's size is just default size. (Sorry for not posting result image. I'm very noob here and i don't have any reputation) How can it happened? And much importantly, how can i solve it?
tagged with: angularjs
score: 2
type: AnsweredQuestion
upvote count: 3
downvote count: 1
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43039382
tagged with: ng-style
tagged with: javascript
has answer: http://stackoverflow.com/a/27286028
has title: Angular scope's variable from directive not syncing in ng-style
accepted answer: http://stackoverflow.com/a/27286028
answer count: 1

http://stackoverflow.com/q/27197198
type: Question
has comment: http://stackoverflow.com/comment/42910969
tagged with: javascript
tagged with: jquery
has body: I was hoping to get pointed in the right direction to start a build I'm attempting. Just getting used to jQuery and not really sure what I'm looking for exactly - hopefully my description below should explain it accurately. I'm looking to build a slider or counter of sorts, with each slide being two sets of coordinates (ie 22°33'N and 44°55'E) and when the user clicks on a navigation button the coordinates scrolls through to the next set (ie 66°77'N and 88°99'E) perhaps jumbling the numbers as the transition happens. Now I'm aware this might be a very rudimental question so please excuse my ignorance. Any help would be highly appreciated!
score: 0
has comment: http://stackoverflow.com/comment/42913211
has comment: http://stackoverflow.com/comment/42880244
has title: Build a jQuery counter with onclick event?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42889397

http://stackoverflow.com/a/27184893
has body: Javascript (server-side) for Node.js is a bit different language from usual client side javascript. It is a javascript but has different context environment. jQuery supposed to help the client side javascript only. Try the following link for further information. Client side scripting and Server side scripting languages
type: Answer
downvote count: 2
upvote count: 1
answers question: http://stackoverflow.com/q/27184300
score: -1
has comment: http://stackoverflow.com/comment/42873893

http://stackoverflow.com/a/27262076
has comment: http://stackoverflow.com/comment/43037993
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42997343
has body: Just a thought... look for a GET variable (for example showMessage) when Page 2 loads that would display the same popup from Page 1 so it appears to be the same message. Sample function for your click event handler. function redirectHandler(pageURL) { // Display Popup // Redirect to pageURL and append "?showMessage=true" } When the DOM is ready on Page 2, display the popup before the page's load event. $( document ).ready() { // Get query parameters // Display popup if showMessage is true } Once Page 2 completes loading, hide your popup $( window ).load(function() { // Remove popup }); The GET variable could also be handled server side and there would be no JS delay to handle rendering the popup.
answers question: http://stackoverflow.com/q/27261891

http://stackoverflow.com/comment/42866284
has text: possible duplicate of [Does it matter which equals operator (== vs ===) I use in JavaScript comparisons?](http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27189947

http://stackoverflow.com/comment/42991957
has text: can you please elaborate on what needs to come after this? I'm a bit new to javascript and jquery.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27258479

http://stackoverflow.com/comment/42996455
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27261817
has text: you could just use a `DISTINCT` in your query instead of doing that in PHP
score: 1

http://stackoverflow.com/q/27272760
has comment: http://stackoverflow.com/comment/54096889
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/43016305
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43016170
upvote count: 1
has comment: http://stackoverflow.com/comment/43015440
tagged with: css
score: 1
has comment: http://stackoverflow.com/comment/43016888
has comment: http://stackoverflow.com/comment/43015113
has title: Dynamic loading of CSS with sequence and priority
type: Question
tagged with: liferay
downvote count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43016286
has body: I am using LifeRay. Have some css files in the header section coming thru LifeRay header template (common for all portlets), and another css file in a portlet (specific to one portlet). The portlet code is inside portlet - view.JSP. The generated HTML output is like: &lt;html..&gt; &lt;head&gt; ... ... &lt;link href="base.css" ../&gt; &lt;link id="custom" href="custom.css" /&gt; ... ... &lt;/head&gt; &lt;body&gt; ... ... &lt;div class='portlet...'&gt; ... ... &lt;link href="port.css" ../&gt; .. ... &lt;/div&gt; .. .. &lt;/body&gt; &lt;/html&gt; Here, problem is I wanted to have "custom.css" to be loaded at last, but due to liferay structure port.css is getting loaded in the last, after liferay-header template. One solution is, I can simply have the custom.css inclusion near the bottom of the liferay template (or say, footer template), so that it'll be loaded last (after portlet's port.css), but it's against W3C recommendation - to have all CSS in head section. Now, I wrote a little script in my portlet .jsp, that will dynamically load the port.css before custom.css, using jquery. portlet -- view.jsp -- $("&lt;link href='port.css' ../&gt;").insertBefore( $("#custom") ); .. .. Now, with this approach, in FireBug, I can see the port.css listed "before" custom.css - as expected. I even observed the styles are applied with proper sequence/priority from both the css. My queries are: - How good/correct is this approach? - Is there any limitation/constraint to this? - Any Browser issue?? Any thoughts on this?

http://stackoverflow.com/comment/42954014
score: 0
has text: Ok, thanks. The example I was following didn't do that but, I guess it didn't do anything with the results anyway.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27229929

http://stackoverflow.com/a/33905119
answers question: http://stackoverflow.com/q/27290068
score: 0
type: Answer
has body: I ran into the same problem. I was not able to install any link from connect, upload anything or even update or uninstall. Turns out it came from my .htaccess I wouldn't be able to say what exactly because I just switched back to my .htaccess backup - so I don't know what caused the problem, but if you're running in the same problem, try restoring the original .htaccess and making your changes 1 by 1

http://stackoverflow.com/a/27270952
downvote count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/43012304
has comment: http://stackoverflow.com/comment/43011956
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/43012190
has body: How about using HTML Entities &lt;input class="form-control" name="gla" placeholder="m&amp;sup2;" type="text"&gt; Yes it works
answers question: http://stackoverflow.com/q/27270820

http://stackoverflow.com/q/27297005
linked to: http://stackoverflow.com/q/14892874
has title: Stopping php-called mysql server from running if website is refreshed
has comment: http://stackoverflow.com/comment/43058881
type: UnansweredQuestion
has body: I have a local website running that will query a mysql database via inputs given by a html form. The form values are sent to php via jQuery to call the query. Is there a way to send a command to the mysql server to kill the query if the website is refresh? Currently if I refresh, the last mysql call will still run, so the website will be locked up until that query is finished. Edit: To give a little more background information on the website, it is a local website that is solely running d3 visualizations based on a series of involved queries (lots of full text searches) on a large database (3 tables all in the 1 - 5 million record range). The "lockout" I'm referring to is not being able to abandon a query and try a more efficient query (i.e. something that will limit my results more).
tagged with: php
score: 0
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/43058673
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27297162
answer count: 1
tagged with: web

http://stackoverflow.com/comment/42940008
comment on: http://stackoverflow.com/a/27231442
score: 0
type: AnswerComment
type: Comment
has text: Ahhh, I see what you are saying, I don't think you can have a string based template. I think what you are needing is a custom binding.

http://stackoverflow.com/q/27310768
has comment: http://stackoverflow.com/comment/43082595
has title: Value not selected in select list with firefox (works with chrome, safari, opera)
score: 0
tagged with: dom
type: Question
linked to: http://stackoverflow.com/q/1479233
has body: This code should select an option in a select list: $('#ref_nationalite-pharmacien option[value='+t[14]+']').attr("selected", "selected"); It works fine with Google Chrome and Opera. With Firefox (all version, I'm using Firefox 34), the option is not selected. I tried to replace attr by pop, without result. This is a short part of my code: function actualiser_remplir_champ(reponse) { var t = reponse.split("#"); Retour is (I changed private informations): 283##SMITH#Bill#1964-09-28#1987-01-01#Google Street 19#Mons##523601#1##sspf formation specifique et generale##21# The last number 21 is the value to select in my select list, it doesn't work with Firefox but works fine with other web browser.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43082381
has answer: http://stackoverflow.com/a/27310863
answer count: 1
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4831848

global
type: Tag
tags question: http://stackoverflow.com/q/27157248
tag name: global
tags question: http://stackoverflow.com/q/27253705
tags question: http://stackoverflow.com/q/27187546
tags question: http://stackoverflow.com/q/27170423
tags question: http://stackoverflow.com/q/27205891

http://stackoverflow.com/q/27154468
accepted answer: http://stackoverflow.com/a/27156212
tagged with: javascript
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27156212
has body: If I have an HTML element that is pre-populated from the server (e.g. PHP or ASP.NET) like this: &lt;input type="text" data-bind="value:TheMeaningOfLife" data-revert-to="42" /&gt; and I declare my model as var TheMeaningOfLife = ko.observable(69); how can I get the model to initialise with the value of data-revert-to? I started with the following custom binding: ko.bindingHandlers.serverValue = { init: function (element, valueAccesor, allBindingsAccessor, viewModel) { var el = $(element); var serverValue = el.data("revert-to"); if (serverValue == undefined) { return; } el.val(serverValue); } } and update my control to &lt;input type="text" data-bind="serverValue:TheMeaningOfLife" data-revert-to="42" /&gt; but that seems to kill the update event, because when I change the value in the textbox, the viewmodel does not update. Solution as per segfault's answer I tweaked segfault's answer a little to follow more closely how the server code is emitted: ko.bindingHandlers.serverValue = { init: function (element, valueAccesor, allBindingsAccessor, viewModel) { var observable = valueAccesor(); if (observable() == undefined) { var el = $(element); var serverValue = el.data("revert-to"); observable(serverValue); } ko.applyBindingsToNode(element, { value: observable }); } } and this works just fine. I just need to make sure that the observable is initialised with a null, rather than an empty string.
score: 0
answer count: 1
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/42805250
has title: How to initialise a KO observable from the server

http://stackoverflow.com/comment/43066441
type: QuestionComment
comment on: http://stackoverflow.com/q/27290460
has text: Where is this code being used within actionhero? Is it an action?
score: 0
type: Comment

http://stackoverflow.com/comment/43001135
type: AnswerComment
score: 0
type: Comment
has text: In above code action is being called and also child window closes instantaneously but How we will know the result of action as success cant be used.
comment on: http://stackoverflow.com/a/27228045

http://stackoverflow.com/q/27166265
type: Question
answer count: 1
tagged with: javascript
tagged with: amazon-web-services
has title: Cordova/Phonegap upload image to amazon S3 through javascript
score: 0
has body: Please help me on this one. I can't seem to find what the problem is. It looks like it goes all the way (fetching image, policy, signature etc.) until where it uploads the file. It does get rejected by Amazon... any idea why? Here's my upload code: POLICY_JSON = { "expiration": "2020-08-06T12:00:00.000Z", "conditions": [ {"bucket": "gloportalmobile"}, {"acl": "public-read"} ] }; var policyEncBase64 = btoa(JSON.stringify(POLICY_JSON)); var secret = "--My--Secret--Key--Here--"; var encodedSignature = b64_hmac_sha1(secret, policyEncBase64); b64_hmac_sha1(secret, policyEncBase64); var s3URI = encodeURI("https://gloportalmobile.s3.amazonaws.com/"), policyBase64 = policyEncBase64, signature = encodedSignature, awsKey = 'My--AWS--Key--here--', acl = "public-read"; function upload(imageURI, fileName) { var deferred = $.Deferred(), ft = new FileTransfer(), options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = fileName; options.mimeType = "image/jpeg"; options.chunkedMode = false; options.params = { "key": fileName, "AWSAccessKeyId": awsKey, "acl": acl, "policy": policyBase64, "signature": signature }; alert('encodedPolicy: '+policyBase64); alert('encodedSignature: '+signature); alert('imageURI '+imageURI); alert('s3URI '+s3URI); ft.upload(imageURI, s3URI, function (e) { alert('cool'); deferred.resolve(e); }, function (e) { alert('rejected'); deferred.reject(e); }, options); return deferred.promise(); } return { upload: upload } So in those alert messages I can see the policy,signature,imageURI and S3URI with their values but is still throwing the alert "rejected" message. Is this because my policy or signature is encoded wrong? or do i need to setup something on my gloportal bucket in Amazon S3 to accept it? Or some way amazon can tell me why they reject it? Thanks!
tagged with: cordova
type: UnansweredQuestion
tagged with: amazon-s3
has answer: http://stackoverflow.com/a/30878083

http://stackoverflow.com/a/27230861
has comment: http://stackoverflow.com/comment/42938798
answers question: http://stackoverflow.com/q/27230629
type: Answer
has body: &lt;form method="post" id="formtopost"&gt; &lt;input type="radio" name="date_selected" value="1" checked="checked"/&gt;1d &lt;input type="radio" name="date_selected" value="7" /&gt;1w &lt;input type="radio" name="date_selected" value="30" /&gt;1m &lt;input type="radio" name="date_selected" value="90" /&gt;3m &lt;input type="button" id="aht_btn" name="get_aht" value="Get AHT" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;?php if($_POST &amp;&amp; $_POST['date_selected']){ $today = new datetime(); $date_selected = new datetime('-'.$_POST['date_selected'].' days'); echo '-----------------&lt;br /&gt;'; echo '| '.$today-&gt;format('Y-m-d').' |&lt;br /&gt;'; echo '-----------------&lt;br /&gt;'; echo '| '.$date_selected-&gt;format('Y-m-d').' |'; echo '-----------------&lt;br /&gt;'; } ?&gt;
score: 0
has comment: http://stackoverflow.com/comment/42938611

http://stackoverflow.com/a/27296735
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27272660
has body: I googled "accessing google maps api from .net client" and it led me to the Google APIs Client Library for .NET: https://developers.google.com/api-client-library/dotnet/ I'm assuming this will allow your .net program (might not even have to run on an asp.net server depending on your requirements) to become a direct google map API client so you can do all this processing locally. Edit: Addressing your original question, in order to get data from the client back to your web server the client needs to post back the information. This question seems to cover that pretty well: Send javascript variables to server-side ASP .NET . However I would not recommend attempting this based on what you said you wanted to accomplish. I'd try the .NET client library for the API first.
accepted answer of: http://stackoverflow.com/q/27272660
score: 1
upvote count: 1

http://stackoverflow.com/comment/42913853
has text: Yep, my spacePressed is actually called from a event handler. How can I access the function in that case?
type: Comment
comment on: http://stackoverflow.com/q/27216268
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43000203
type: Comment
type: QuestionComment
has text: That works, but strictly speaking, "expando" properties aren't part of the spec and some sources say they can cause memory leaks in certain browsers. See: http://stackoverflow.com/questions/1915341/whats-wrong-with-adding-properties-to-dom-element-objects.
comment on: http://stackoverflow.com/q/27263713
score: 0

http://stackoverflow.com/q/27174760
tagged with: jquery
linked to: http://stackoverflow.com/q/15533811
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/csv
linked to: http://stackoverflow.com/q/13405129
answer count: 0
duplicate of: http://stackoverflow.com/q/2897619
has comment: http://stackoverflow.com/comment/42839856
has body: I have a variable in javascript the contents of which are valid for a .csv file. I want the user to save its contents in a file of his/her choice. I do the following: HTML Download CSV JS $('#downloadCSV').click(function () { var csvContent = generateCSV(); //The function generates a valid CSV var encodedUri = encodeURI(csvContent); window.open(encodedUri); }); This does two things that I don't want: Opens another chrome tab. just says 'download' in the windows pop up (Even the extension needs to be added manually). Instead of that I want it to have a default name with extension. Say foobar.csv I have gone through similar questions like this but to no avail. How can I achieve this?
type: Question
has title: How to save a variable in .csv format in javascript?
linked to: http://stackoverflow.com/q/2897619
score: 0
has comment: http://stackoverflow.com/comment/42839181
tagged with: javascript

http://stackoverflow.com/comment/43068084
has text: approach 1: compile phantomJS2 unknown state. approach 2: build webpage on server side using angularjs-server and by the time phamton requests the page is already load and no need to communicate with websockets. i will post my final solution
comment on: http://stackoverflow.com/q/27283466
type: Comment
type: QuestionComment
score: 0

jquery
tags question: http://stackoverflow.com/q/27298211
tags question: http://stackoverflow.com/q/27306809
tags question: http://stackoverflow.com/q/27272852
tags question: http://stackoverflow.com/q/27309417
tags question: http://stackoverflow.com/q/27275016
tags question: http://stackoverflow.com/q/27181806
tags question: http://stackoverflow.com/q/27154626
tags question: http://stackoverflow.com/q/27293987
tags question: http://stackoverflow.com/q/27234366
tags question: http://stackoverflow.com/q/27197599
tags question: http://stackoverflow.com/q/27169537
tags question: http://stackoverflow.com/q/27178510
tags question: http://stackoverflow.com/q/27299773
tags question: http://stackoverflow.com/q/27161540
tags question: http://stackoverflow.com/q/27185177
tags question: http://stackoverflow.com/q/27281585
tags question: http://stackoverflow.com/q/27285802
tags question: http://stackoverflow.com/q/27223965
tags question: http://stackoverflow.com/q/27222535
tags question: http://stackoverflow.com/q/27291214
tags question: http://stackoverflow.com/q/27176619
tags question: http://stackoverflow.com/q/27169499
tags question: http://stackoverflow.com/q/27225769
tags question: http://stackoverflow.com/q/27292484
tags question: http://stackoverflow.com/q/27244227
tags question: http://stackoverflow.com/q/27200339
tags question: http://stackoverflow.com/q/27168080
tags question: http://stackoverflow.com/q/27313320
tags question: http://stackoverflow.com/q/27181557
tags question: http://stackoverflow.com/q/27240893
tags question: http://stackoverflow.com/q/27290111
tags question: http://stackoverflow.com/q/27284459
tags question: http://stackoverflow.com/q/27221496
tags question: http://stackoverflow.com/q/27235580
tags question: http://stackoverflow.com/q/27305870
tags question: http://stackoverflow.com/q/27267942
tags question: http://stackoverflow.com/q/27255552
tags question: http://stackoverflow.com/q/27170450
tags question: http://stackoverflow.com/q/27171605
tags question: http://stackoverflow.com/q/27269710
tags question: http://stackoverflow.com/q/27207613
tags question: http://stackoverflow.com/q/27270313
tags question: http://stackoverflow.com/q/27287734
tags question: http://stackoverflow.com/q/27166456
tags question: http://stackoverflow.com/q/27310440
tags question: http://stackoverflow.com/q/27203918
tags question: http://stackoverflow.com/q/27283771
tags question: http://stackoverflow.com/q/27241524
tags question: http://stackoverflow.com/q/27278666
tags question: http://stackoverflow.com/q/27306618
tags question: http://stackoverflow.com/q/27272333
tags question: http://stackoverflow.com/q/27273281
tags question: http://stackoverflow.com/q/27225463
tags question: http://stackoverflow.com/q/27248183
tags question: http://stackoverflow.com/q/27220641
tags question: http://stackoverflow.com/q/27162217
tags question: http://stackoverflow.com/q/27188795
tags question: http://stackoverflow.com/q/27214019
tags question: http://stackoverflow.com/q/27294429
tags question: http://stackoverflow.com/q/27290755
tags question: http://stackoverflow.com/q/27157803
tags question: http://stackoverflow.com/q/27249351
tags question: http://stackoverflow.com/q/27166221
tags question: http://stackoverflow.com/q/27285711
tags question: http://stackoverflow.com/q/27198422
tags question: http://stackoverflow.com/q/27197337
tags question: http://stackoverflow.com/q/27277006
tags question: http://stackoverflow.com/q/27198121
tags question: http://stackoverflow.com/q/27293294
tags question: http://stackoverflow.com/q/27250973
tags question: http://stackoverflow.com/q/27164209
tags question: http://stackoverflow.com/q/27230723
tags question: http://stackoverflow.com/q/27159443
tags question: http://stackoverflow.com/q/27299997
tags question: http://stackoverflow.com/q/27252126
tags question: http://stackoverflow.com/q/27224039
tags question: http://stackoverflow.com/q/27250945
tags question: http://stackoverflow.com/q/27287470
tags question: http://stackoverflow.com/q/27169129
tags question: http://stackoverflow.com/q/27286631

http://stackoverflow.com/q/27209862
type: Question
tagged with: javascript
tagged with: dojox.grid.datagrid
downvote count: 0
has title: How to retrieve no of rows after applying filter to dojo enhanced grid?
has body: I want to retrieve no of rows while applying filter on a dojo enhanced grid. I get the no of items in the bottom of the grid i.e 34 of 29 items. But How to retrieve it programatically ?
favorite count: 0
has comment: http://stackoverflow.com/comment/42909677
type: UnansweredQuestion
tagged with: dojo
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/43199062
has text: Perhaps [imagesloaded](https://github.com/desandro/imagesloaded) plugin can be helpful for you.
comment on: http://stackoverflow.com/a/27298866
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27182779
has comment: http://stackoverflow.com/comment/42853396
type: UnansweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27182890
type: Question
has body: So, I'm trying to hit the button after a form is filled in. I have this currently: document.getElementById("checkout_shipping_address_country").dispatchEvent(event); document.getElementById("checkout_shipping_address_phone").value = userInfo.tel; if ($("#checkout_shipping_address_province").length != 0) { document.getElementById("checkout_shipping_address_province").value = userInfo.state; $("input[name='commit']")[0].click(); } It is an ajax form so it reloads after every click, in this case it seems like it's repeating the click, how can I only have it run once?
has title: Javascript click button only once
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/42853386
answer count: 1
favorite count: 0

http://stackoverflow.com/q/27252371
tagged with: web
has comment: http://stackoverflow.com/comment/42978980
possible better answer: http://stackoverflow.com/a/27252525
accepted answer: http://stackoverflow.com/a/27252505
has answer: http://stackoverflow.com/a/27252525
has title: JavaScript: Using Object.defineProperties()
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42978988
has comment: http://stackoverflow.com/comment/42978769
type: Question
has answer: http://stackoverflow.com/a/27252505
has body: I'm trying to learn how to use Object.defineProperties(). I'm using the following code: var Person = function(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; }; Object.defineProperties(Person, { sayHi : { get : function() {return "Hello";}, enumerable : true }, sayBye : { get : function() {return "Bye";}, enumerable : true } }); var john = new Person('John', 'Doe'); console.log(john.sayHi()); But I keep getting: TypeError: john.sayHi is not a function console.log(john.sayHi()); Can someone tell me what is wrong with this code? Thanks
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42978848
answer count: 2

http://stackoverflow.com/q/27156700
tagged with: editor
tagged with: text-editor
has comment: http://stackoverflow.com/comment/42807584
has comment: http://stackoverflow.com/comment/42807520
answer count: 1
tagged with: javascript
score: 0
has body: I just designed a web page using HTML, PHP, JavaScript, ... In every page I imported some files and after months of editing code, I can't say if I ended up using some of these files. I know that Dreamweaver leaves me see what are linked, but it doesn't show if I'm actually using those files. Any idea?
has answer: http://stackoverflow.com/a/27157061
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42807622
has title: Editor that shows links between archives
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42807704
tagged with: php
type: Question

http://stackoverflow.com/a/27219145
answers question: http://stackoverflow.com/q/27219087
accepted answer of: http://stackoverflow.com/q/27219087
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has body: Wrap the whole thing in a function, then you can simply return to break out of both. var input = prompt(); (function () { while(true) { switch(input) { case 'hi': break; case 'bye': return; } /*Other code*/ } })();

http://stackoverflow.com/comment/42827957
type: QuestionComment
has text: @Scimonster I found it here https://www.npmjs.org/package/express-partial. Pls point me the new way to do so
score: 0
comment on: http://stackoverflow.com/q/27168144
type: Comment

http://stackoverflow.com/a/27297968
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27297455
type: Answer
answers question: http://stackoverflow.com/q/27297455
score: 2
upvote count: 2
has body: Took a look at your code ... it is working. However, you are setting the attribute "display" to "inline"; if you inspect the element for correct or incorrect answer this is NOT in the style ... adjustment below. Also, you are only given a correct or incorrect when on Fruits U-Z and there is NO correct answer ... you, in this case, are comparing "Ugli fruit" in the array with "Ugli Fruit" as a string. var cells = document.getElementsByTagName("td"); for (var i = 0; i &lt; cells.length; i++) { cells[i].addEventListener("click", function () { var word = document.getElementById("outputNumber").innerHTML; var answer1 = document.getElementById("output1"); var answer2 = document.getElementById("output2"); var answer3 = document.getElementById("output3"); var answer4 = document.getElementById("output4"); var answer5 = document.getElementById("output5"); var answer6 = document.getElementById("output6"); var answer7 = document.getElementById("output7"); var answer8 = document.getElementById("output8"); var answer9 = document.getElementById("output9"); console.log(word, answer1.innerHTML); if(word == "Fruits U-Z") { if(answer1.innerHTML == "Ugli Fruit") { document.getElementById("correctAnswer").setAttribute("style", "display:inline; position:absolute; left:100px;"); document.getElementById("incorrectAnswer").setAttribute("style", "display:none; position:absolute; right:100px;"); } else { document.getElementById("correctAnswer").setAttribute("style", "display:none; position:absolute; left:100px;"); document.getElementById("incorrectAnswer").setAttribute("style", "display:inline; position:absolute; right:100px;"); } } }); }
type: AcceptedAnswer

http://stackoverflow.com/comment/43053515
comment on: http://stackoverflow.com/q/27294291
type: Comment
type: QuestionComment
score: 0
has text: You can hide and show elements, you can update the text and HTML of the DOM, you can show alerts, you can open new windows or tabs. All of these would be consiered showing output.

http://stackoverflow.com/q/27171687
downvote count: 0
type: Question
score: 5
has answer: http://stackoverflow.com/a/27172265
tagged with: google-visualization
tagged with: javascript
has body: i tried to create a bar chart using google chart api. in which i want to remove the x-axis title &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1.1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Year', 'first six', 'second six'], ['2010', 3750, 3800], ['2011', 3900, 3850], ['2012', 3850, 3900], ['2013', 4280, 4160], ['2014', 4350, 0000] ]); var options = { width: 400, height: 320, bar: {groupWidth: "90%"}, legend: { position: "none" }, }; var chart = new google.charts.Bar(document.getElementById('columnchart_material_price')); chart.draw(data, options); } this is the code for bar chart i tried var options = { hAxis: {title: ' ', titleTextStyle: {color: 'white'}}, } but this does nothing . how can i remove x-axis title it is by default "year"?
tagged with: http://stackoverflow.com/tag/html
has title: how can i remove x-axis title in google bar chart?
has answer: http://stackoverflow.com/a/34871073
answer count: 4
favorite count: 0
upvote count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27172364
has answer: http://stackoverflow.com/a/31763057
tagged with: charts

while-loop
tags question: http://stackoverflow.com/q/27244341
type: Tag
tags question: http://stackoverflow.com/q/27219087
tags question: http://stackoverflow.com/q/27247188
tag name: while-loop

http://stackoverflow.com/a/27170523
has body: You want to use the exists function: var i = 0; var fs = require('fs'); casper.repeat(j, function(){ (function(i){ casper.thenOpen(arrdata[i], function(){ if (casper.exists("#Trie")){ fs.write("pages/trie/"+i+".html", casper.getHTML()); } else { fs.write("pages/road/"+i+".html", casper.getHTML()); } }); })(i); i++; }); Note that this must be done in a step, otherwise you run into concurrency problems. In your code all the open calls are executed before the first wait is executed.
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42837406
has comment: http://stackoverflow.com/comment/42831950
has comment: http://stackoverflow.com/comment/42837479
has comment: http://stackoverflow.com/comment/42832432
accepted answer of: http://stackoverflow.com/q/27169906
type: Answer
has comment: http://stackoverflow.com/comment/42838007
has comment: http://stackoverflow.com/comment/42837900
answers question: http://stackoverflow.com/q/27169906
has comment: http://stackoverflow.com/comment/42838156
has comment: http://stackoverflow.com/comment/42838616
has comment: http://stackoverflow.com/comment/42832356
has comment: http://stackoverflow.com/comment/42838856
has comment: http://stackoverflow.com/comment/42837758

http://stackoverflow.com/comment/43039252
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27285716
type: Comment
has text: Whether that boolean comparison would be true or not depends entirely upon how the object was created and whether it was purposely set to have a constructor property that will make your test `true`. For custom objects, the language does not make that statement true for you automatically, specific code must do the right thing to make that `true`.

http://stackoverflow.com/a/27246402
answers question: http://stackoverflow.com/q/27246142
has comment: http://stackoverflow.com/comment/43038096
has comment: http://stackoverflow.com/comment/43041709
type: Answer
has comment: http://stackoverflow.com/comment/42984195
has comment: http://stackoverflow.com/comment/43017302
has comment: http://stackoverflow.com/comment/43038109
upvote count: 2
has comment: http://stackoverflow.com/comment/43038681
has comment: http://stackoverflow.com/comment/43039030
score: 2
has comment: http://stackoverflow.com/comment/43017620
has comment: http://stackoverflow.com/comment/43038785
downvote count: 0
has body: No, you have to realize that &lt;input type="submit" and &lt;button&gt; submit is not included in .serializeArray(), you'll have to just build the data object to be passed: $("#submit, #submit2").click( function() { var data = null; if($(this).attr('id') == 'submit') { values = {'submit': true}; } else { values = {'submit2': true}; } $.post( $("#myForm").attr("action"), values, function(data) { $("#ack").empty(); $("#ack").html(data); }); }); Sample Demo

http://stackoverflow.com/a/27294158
has comment: http://stackoverflow.com/comment/43053774
score: 1
has comment: http://stackoverflow.com/comment/43053706
has body: Try This Code: $('.qty').keyup(function(){ if($(this).val() == ""){ $('.qty').val('0'); }else if($(this).val() &gt; 0){ console.log($(this).val()); $(this).val().replace(0,''); } if($(this).val()!=0){ var text = $(this).val(); alert(text.slice(0,1)); if(text.slice(0,1)==0) { $(this).val(text.slice(1,text.length)); } } }); Working Demo
downvote count: 0
has comment: http://stackoverflow.com/comment/43053826
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43054144
answers question: http://stackoverflow.com/q/27294006
has comment: http://stackoverflow.com/comment/43053629

camanjs
type: Tag
tag name: camanjs
tags question: http://stackoverflow.com/q/27230628

http://stackoverflow.com/q/27231614
tagged with: c#
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42940221
answer count: 1
has comment: http://stackoverflow.com/comment/42940060
has comment: http://stackoverflow.com/comment/42940421
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42940134
has answer: http://stackoverflow.com/a/27388236
favorite count: 0
has title: Unidentified He's Dead Jim issue
has comment: http://stackoverflow.com/comment/42940044
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/43223247
accepted answer: http://stackoverflow.com/a/27388236
upvote count: 1
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42940078
downvote count: 1
has body: This isn't isn't common with my code but one of the testers has found the issue in Chrome producing a "He's Dead Jim" in my section of old code. Ie/FF/Opera/safari can not replicate the issue in their own right. Currently able to replicate in Chrome Version 39.0.2171.71 m (Most Recent todate). We use third party components through out the project, Kendo exclusively. And all of them are seen by the browser before reaching the part of the project where my piece is at (work flow wise). There are not any network related issues, (No 500s or 404s or 505s etc) JS console shows no issues. So i'm a little at odds when trying to diagnose and figure out the issue with this. Can anyone provide me anything else to attempt to test in trying to determine the cause of this? I have tested this with modifying the source code itself. The JS is fine, and whenever i remove the actual html (bootstrapped) it comes through fine. If i remove this section of code it comes back without issues... @Html.LabelFor(i => i.PropertyTypeId) @Html.Kendo().DropDownListFor(a => a.PropertyTypeId).BindTo(Model.PropertyTypeList).DataTextField("Text").DataValueField("Value").HtmlAttributes(new { @class = "form-control" }).Events(a => a.Change("changePropertyType").DataBound("changePropertyType")) @Html.LabelFor(i => i.StatusOfProperty) @foreach (var PropertyTypes in Model.StatusOfProperty) { @PropertyTypes } @Html.LabelFor(i => i.Description) @Html.TextAreaFor(i => i.Description, new { style = "width:100%; height:164px;", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" }) @Html.LabelFor(i => i.SerialNumber) @Html.TextBoxFor(i => i.SerialNumber, new { style = "width:100%", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" }) @Html.LabelFor(i => i.ModelNumber) @Html.TextBoxFor(i => i.ModelNumber, new { style = "width:100%", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" }) @Html.LabelFor(i => i.BrandName) @…
type: AnsweredQuestion

http://stackoverflow.com/tag/xml
tags question: http://stackoverflow.com/q/27190448
tags question: http://stackoverflow.com/q/27169199
tags question: http://stackoverflow.com/q/27155440
tags question: http://stackoverflow.com/q/27285553
type: Tag
tags question: http://stackoverflow.com/q/27184769
tags question: http://stackoverflow.com/q/27304352
tags question: http://stackoverflow.com/q/27166456
tags question: http://stackoverflow.com/q/27276997
tags question: http://stackoverflow.com/q/27276944
tags question: http://stackoverflow.com/q/27212112
tags question: http://stackoverflow.com/q/27185505
tags question: http://stackoverflow.com/q/27159576
tag name: xml
tags question: http://stackoverflow.com/q/27167709
tags question: http://stackoverflow.com/q/27168108
tags question: http://stackoverflow.com/q/27270848
tags question: http://stackoverflow.com/q/27188054
tags question: http://stackoverflow.com/q/27252595
tags question: http://stackoverflow.com/q/27177898

http://stackoverflow.com/comment/42815574
comment on: http://stackoverflow.com/a/27160633
score: 0
type: AnswerComment
has text: Can you clarify that?
type: Comment

http://stackoverflow.com/a/27165122
accepted answer of: http://stackoverflow.com/q/27164988
has body: http://jsfiddle.net/x8jwavje/ function car() { } car.prototype = { update1: function(s) { console.log("updated "+s+" with update1") }, update2: function(s) { console.log("updated "+s+" with update1") }, update3: function(s) { console.log("updated "+s+" with update1") }, update: function(s, updateFn) { this[updateFn]( s) } } var c = new car() c.update("tyres", 'update1') this is how you should call a function whose name passed as a parameter this[updateFn]( s) Edit: http://jsfiddle.net/x8jwavje/1/
answers question: http://stackoverflow.com/q/27164988
type: Answer
upvote count: 3
downvote count: 0
score: 3
type: AcceptedAnswer

http://stackoverflow.com/q/27182126
has answer: http://stackoverflow.com/a/27182359
has comment: http://stackoverflow.com/comment/42852257
has title: How would I scrape the JS-generated data on this webpage?
has comment: http://stackoverflow.com/comment/42852583
accepted answer: http://stackoverflow.com/a/27182359
type: AnsweredQuestion
has body: This past week, there was the launch of a new tool called #Homescreen that allows people to share a screenshot of the apps that they have on their iPhone home screen. For example: https://homescreen.is/iamfinnym I'd like to build a scraper that extracts the names of all the apps given a user's page (in addition to their location on the screen). How would I do this? I know how to build a normal HTML scraper, but it looks like the apps are generated onto the page via some kind of React.js javascript call, and I'm not sure how to go about figuring this out. (I can write basic Javascript, but have never used React.js before and I don't know how to get started.)
has comment: http://stackoverflow.com/comment/42852404
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/42852278
tagged with: reactjs
tagged with: scraper
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
answer count: 1

http://stackoverflow.com/comment/42937414
comment on: http://stackoverflow.com/a/27229452
score: 0
has text: Ah okay apologies. Editted it
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42943786
has text: my intention is to make a question page score by radio , then creating a graph point depends on the user score , i have being looking all over the internet , this is the only way i found it easy,can any one of you show me a way ? i looked sessionstorage too but they say some browers will fail if they dont have support it.so how ?
score: 0
comment on: http://stackoverflow.com/q/27232298
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27155904
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42808369
type: Answer
has comment: http://stackoverflow.com/comment/42806218
accepted answer of: http://stackoverflow.com/q/27155863
has body: var geojson = JSON.parse(geojson_data); Turns the geojson string into an object, from there you can get whatever you values you want from it. Edit: your json is invalid, where are you getting the data from? I cleaned it up, so you can call JSON.parse on it. However, it is not valid geojson, so I'd double check where you come up with the data. This geojson validator might help. { "metadata": { "generated": 1417015873000, "11-26T14: 33: 40&amp;endtime=2014-11-26T14: 33": 45, "title": "USGSEarthquakes", "status": 200, "api": "1.0.13", "count": 1 }, "features": [ { "type": "Feature", "properties": { "mag": 6.8, "place": "160km NW of Kota Ternate, Indonesia", "time": 1417012423350, "updated": 1417015584000, "tz": 480, "url": "http://comcat.cr.usgs.gov/earthquakes/eventpage/usb000t08w", "detail": "http://comcat.cr.usgs.gov/fdsnws/event/1/query?eventid=usb000t08w&amp;format=geojson", "felt": 1, "cdi": 5, "mmi": 4.98, "alert": "green", "status": "reviewed", "tsunami": 1, "sig": 712, "net": "us", "code": "b000t08w", "ids": ",at00nfnhsd,pt14330000,usb000t08w,", "sources": ",at,pt,us,", "types": ",cap,dyfi,general-link,geoserve,impact-link,losspager,moment-tensor,nearby-cities,origin,phase-data,shakemap,tectonic-summary,", "nst": null, "dmin": 1.45, "rms": 1.32, "gap": 37, "magType": "mwb", "type": "earthquake", "title": "M 6.8 - 160km NW of Kota Ternate, Indonesia" }, "geometry": { "type": "Point", "coordinates": [ 126.5456, 1.9752, 41.06 ] }, "id": "usb000t08w" } ] }
answers question: http://stackoverflow.com/q/27155863
has comment: http://stackoverflow.com/comment/42807727
has comment: http://stackoverflow.com/comment/42816907
has comment: http://stackoverflow.com/comment/42807059
score: 0

http://stackoverflow.com/a/27188578
upvote count: 2
downvote count: 0
has body: Do you load it in 2 seperated css files? If yes your overwrite have to be loaded at last. But I think it is better to overwrite it directly with modifying the .navbar attributes. So make a new css file for your overwrites load it behind the bootstrap.css and than put in your overwrites: .navbar{ margin-bottom: 0px !important; position: absolute; } And delete the navbar1 in html. This works for me every time I modify the bootstrap css.
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42867579
answers question: http://stackoverflow.com/q/27188438
has comment: http://stackoverflow.com/comment/42867534

http://stackoverflow.com/comment/43080222
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27309274
score: 0
has text: what if i am scrolling to 10000 pages ?

http://stackoverflow.com/comment/42882073
type: Comment
type: QuestionComment
score: 0
has text: I'm guessing your click handler for `dataConfirmOK` is not even firing since you're creating that element dynamically. You should check out http://stackoverflow.com/questions/20819501/jquery-click-event-not-working-for-dynamically-created-button
comment on: http://stackoverflow.com/q/27198837

http://stackoverflow.com/q/27265021
has answer: http://stackoverflow.com/a/27268717
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43003347
has answer: http://stackoverflow.com/a/27268175
has comment: http://stackoverflow.com/comment/43002647
type: Question
has comment: http://stackoverflow.com/comment/43003298
has comment: http://stackoverflow.com/comment/43002966
has body: I have a simple input box in a form the value of which I'm trying to send to django via Ajax post, but I'm getting a 500 error ValueError at /rest/ Cannot use None as a query value {% csrf_token %} Search: submit View: def rest(request): artistname = request.POST.get("artist") # <- problem here? response_data = {} query_results = Art.objects.filter(artist__contains=artistname) response_data['results'] = query_results return HttpResponse(json.dumps(response_data), content_type="application/json") When I check the headers under Form Data it shows artist: da vinci which is what I typed in. Where is the train getting derailed?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27268717
tagged with: ajax
has comment: http://stackoverflow.com/comment/43003657
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43003120
has title: Why is ajax request submitting 'none' for value of dom element?
tagged with: django
has comment: http://stackoverflow.com/comment/43002711
possible better answer: http://stackoverflow.com/a/27268175
has comment: http://stackoverflow.com/comment/43005622

http://stackoverflow.com/a/27173209
has comment: http://stackoverflow.com/comment/42836661
type: Answer
has comment: http://stackoverflow.com/comment/42836590
answers question: http://stackoverflow.com/q/27172963
upvote count: 3
has comment: http://stackoverflow.com/comment/42928093
has comment: http://stackoverflow.com/comment/42839633
score: 3
has body: You need to target the font-size style of the HTML element. You'll have to make sure that an initial value exists so that you can easily modify it. You can do so in the following manner: document.getElementsByTagName( "html" )[0].style[ "font-size" ] = "10px" All that is left to do is implement the increments of the value: function increaseFontSize(){ var existing_size = document.getElementsByTagName( "html" )[0].style[ "font-size" ]; var int_value = parseInt( existing_size.replace( "px", "" ); int_value += 10; document.getElementsByTagName( "html" )[0].style[ "font-size" ] = int_value + "px"; } I would recommend using a few helper functions to clean up this code: function extract_current_size(){ var existing_size = document.getElementsByTagName( "html" )[0].style[ "font-size" ]; return parseInt( existing_size.replace( "px", "" ); } function increaseFontSize(){ var existing_value = extract_current_size() existing_value += 10; document.getElementsByTagName( "html" )[0].style[ "font-size" ] = existing_value + "px"; }
downvote count: 0

asp.net-mvc-4
tags question: http://stackoverflow.com/q/27189747
tags question: http://stackoverflow.com/q/27229042
tags question: http://stackoverflow.com/q/27164145
tag name: asp.net-mvc-4
tags question: http://stackoverflow.com/q/27221802
tags question: http://stackoverflow.com/q/27246598
tags question: http://stackoverflow.com/q/27218679
tags question: http://stackoverflow.com/q/27251082
type: Tag
tags question: http://stackoverflow.com/q/27264504
tags question: http://stackoverflow.com/q/27227408
tags question: http://stackoverflow.com/q/27228251
tags question: http://stackoverflow.com/q/27159086
tags question: http://stackoverflow.com/q/27235531
tags question: http://stackoverflow.com/q/27172763
tags question: http://stackoverflow.com/q/27312480
tags question: http://stackoverflow.com/q/27260042
tags question: http://stackoverflow.com/q/27275382
tags question: http://stackoverflow.com/q/27244497
tags question: http://stackoverflow.com/q/27255881
tags question: http://stackoverflow.com/q/27264254

http://stackoverflow.com/q/27304976
answer count: 1
has comment: http://stackoverflow.com/comment/43094336
favorite count: 0
tagged with: google-places-api
has answer: http://stackoverflow.com/a/27487420
accepted answer: http://stackoverflow.com/a/27487420
type: AnsweredQuestion
downvote count: 0
has title: Google Maps API v3: Why are there inconsistencies between my search results by Google Maps API V3 and Google Maps?
score: 1
tagged with: search
type: Question
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/43094546
upvote count: 1
has body: I'm working with a custom map application that uses Google Maps API v3. There are a few problems that I'm encountering. I'm using the places library to do a search nearby the center of my map with a large radius with a keyword. Problem 1: When I do a search for "Home Depot" without quotes, I get results for 'Home' or 'Depot', so realtors come back, a dentist named "Dental Depot" is returned, and so on. This doesn't happen in Google Maps itself, however. They manage to only return Home Depots without the need to add quotes. This problem is, of course, solved by adding quotes into my keyword used for the request, but I do not think my users will necessarily know to add quotes. My problem is that Google Maps knows to only return Home Depots by default, why doesn't their API? Problem 2: Other times, places are not found at all. There is a pizza restaurant called "The Wedge" and searching 'wedge' returns no results at all, but searching 'wedge' over my city in google maps returns four points of interest, both restaurants and two Targets. Why the inconsistency?

http://stackoverflow.com/a/27219601
has comment: http://stackoverflow.com/comment/42918343
has comment: http://stackoverflow.com/comment/42918587
type: Answer
has comment: http://stackoverflow.com/comment/42918503
has comment: http://stackoverflow.com/comment/42918465
answers question: http://stackoverflow.com/q/27219435
has comment: http://stackoverflow.com/comment/42918442
has comment: http://stackoverflow.com/comment/42918380
has body: Something like this: $(document).ready(function () { $(".nav").on('click', function() { $("#text").html( $(this).html() ); // Getting too nested here } }
has comment: http://stackoverflow.com/comment/42918427
has comment: http://stackoverflow.com/comment/42918414
score: 0

http://stackoverflow.com/q/27277202
type: Question
has comment: http://stackoverflow.com/comment/50310388
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 2
has body: i have the code like this: ///&lt;reference path='typescript_defs/node.d.ts' /&gt; ///&lt;reference path='typescript_defs/socket.io.d.ts' /&gt; import sio = require('socket.io'); function main(io: sio.Server) { io.sockets.on('connection', function(socket: sio.Socket) { }); } main(sio.listen(4444)); i expected that this would work after reading and looking at other examples, but it gives a name error at sio.Server and sio.Socket support.ts(12,19): error TS2304: Cannot find name 'sio'. support.ts(14,47): error TS2304: Cannot find name 'sio'. if i put 'string' in replace of 'sio.Socket' to intentionally get an error it tells me the expected type is Server. now, whether i use sio.Server or Server, it makes no difference there is still a name error and i don't understand how i'm supposed to make use of the types in .d.ts files and cant find documentation or examples that work for it. hope someone can help me! thanks~
has title: 'Cannot find name' compile error for imported required module
has answer: http://stackoverflow.com/a/27278651
type: AnsweredQuestion
score: 2
tagged with: typescript
accepted answer: http://stackoverflow.com/a/27278651
tagged with: socket.io

http://stackoverflow.com/comment/42864451
comment on: http://stackoverflow.com/q/27189053
score: 0
type: Comment
type: QuestionComment
has text: Please see the accepted answer in this thread http://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index

http://stackoverflow.com/q/27210060
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27210141
score: 0
answer count: 2
has title: Run PHP page every hour automatically-without using Cron jobs
has comment: http://stackoverflow.com/comment/42902219
has answer: http://stackoverflow.com/a/27210111
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27210111
has answer: http://stackoverflow.com/a/27210141
tagged with: mysql
type: Question
has body: How can i run or refresh PHP page every 10 Minutes or an hour. so that add new record from one database to another i doesn't matter with using javascript but without using cron jobs.

http://stackoverflow.com/q/27177485
has answer: http://stackoverflow.com/a/31049572
has comment: http://stackoverflow.com/comment/55850286
favorite count: 0
has comment: http://stackoverflow.com/comment/43949106
type: Question
has title: node.js / ES6 / class creation : SyntaxError: Unexpected reserved word
has answer: http://stackoverflow.com/a/28032345
tagged with: node.js
score: 15
has comment: http://stackoverflow.com/comment/43950675
answer count: 3
has body: I try to create a class on my node.js / express app. It works in basic js / prototype mode such as : function MyClass() { /* constructor code */ }; MyClass.prototype.myMethod = function() { /* method code */ }; module.exports = MyClass; But I want to do use the class, constructor, extends, ... keywords. I've try that : class MyClass { constructor() { /* constructor code */ } myMethod() { /* method code */ } } But it doesn't work, the error is : class MyClass { ^^^^^ SyntaxError: Unexpected reserved word My command line to launch the app with all harmony options : node `node --v8-options | grep harmony | cut -d ' ' -f | xargs` my-app.js An idea to launch my app correctly please ?
has answer: http://stackoverflow.com/a/38506985
tagged with: javascript
type: UnansweredQuestion
tagged with: express
upvote count: 15
tagged with: ecmascript-6
tagged with: ecmascript-harmony
has comment: http://stackoverflow.com/comment/42844090
downvote count: 0

http://stackoverflow.com/comment/42929783
comment on: http://stackoverflow.com/q/27156731
has text: About source code: +1, you can use F12 (DevTools, Firebug, etc) to inspect current values of attributes. And with Firefox and good ol' WDT (Web Developer Toolbar), last item of menu has "View **Generated** source code" that will show current DOM as tags and attributes *after* JS was executed, not simply as initially sent by the server
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27293773
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: video
has body: I'm creating a mobile website that has youtube videos on it. They play no problem but the problem is when I press the back button the video continues to play only the sound anyway. Is there anyway to stop this from happening?? HTML code for videoplayer: Videos Home Info Home Recipes Videos Photos Tweets Videos Videos Javascript code for playing the videos: function listVideos(data) { var output =''; for ( var i=0; i<data.feed.entry.length; i++) { var title = data.feed.entry[i].title.$t; var thumbnail = data.feed.entry[i].media$group.media$thumbnail[0].url; var description = data.feed.entry[0].media$group.media$description.$t; var id = data.feed.entry[0].id.$t.substring(38); var blocktype = ((i % 2)===1) ? 'b': 'a'; output += ' '; output += ''; output += ' ' + title + ' '; output += ' '; output +=""; output +=" "; } $('#videolist').html(output); } function playVideo(id, title, description) { var output =' '; output += ' ' + title + ' '; output += ' ' + unescape(description) + ' '; $('#myplayer').html(output); }
upvote count: 1
tagged with: youtube
has title: Youtube videos keep playing after pressing the back button in website
tagged with: mobile
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/27299312
answers question: http://stackoverflow.com/q/27299266
accepted answer of: http://stackoverflow.com/q/27299266
type: AcceptedAnswer
downvote count: 0
has body: If you view source from a browser, you will probably find the IDs have been thrown away and replaced with generated ones. runat="server" causes it to use its own naming system. Use ClientIDMode="Static" so that it will retain your original IDs. e.g. &lt;input type="hidden" id="at" runat="server" ClientIDMode="Static" /&gt; Reference: http://msdn.microsoft.com/en-us/library/system.web.ui.control.clientidmode.aspx
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/42814494
has text: Ah, actually, I see why you said that and where the confusion came from. When I posted my comment at first the post wrapped the "external js" inside of `$(function(){ /*extneral code*/ }`. After my comment the ready shortcut was removed and that is where the confusion was. So, you are correct that it wasn't closed over when you viewed it. But when I viewed it, it was.
type: Comment
comment on: http://stackoverflow.com/q/27158171
score: 0
type: QuestionComment

http://stackoverflow.com/q/27156850
answer count: 1
downvote count: 0
tagged with: string
favorite count: 0
tagged with: hex
type: UnansweredQuestion
score: 1
upvote count: 1
has title: Decoding or Escaping HEX code numbers in a string
type: Question
tagged with: decode
tagged with: javascript
tagged with: ascii
has body: I need your help. How do you decode or escape HEX code numbers in a string? var str = "Pneus de contrefa\00E7on. Prot\00E9gez-Vous" I should mention that the string above is generated above is from a Database query. The converted string should read as follows: var str = "Pneus de contrefaçon. Protégez-Vous" Not sure what to do here.
has answer: http://stackoverflow.com/a/32077853

http://stackoverflow.com/q/27157530
has title: Bind angulajs UI-Select to UI-Grid filter
type: UnansweredQuestion
score: 2
tagged with: angular-ui-grid
downvote count: 0
has body: I'm attempting to combine AngularUI's ui-grid and ui-select, so that I can have ui-select behavior while filtering the ui-grid. I have a plunker that's part of the way there here: http://plnkr.co/edit/1rREdYPV4qz8slbwSLai?p=preview {{$item.name}} But at this point, the only thing I can think of is to hide the native filters with JS, and use JS to push the output of the ui-select dropdowns into the filter behind the scenes. This feels pretty hacky though. Is there an angularjs way to BIND the output of the ui-select to the filter? Or perhaps replace the filter with ui-select behavoir?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/33129820
tagged with: ui-select
upvote count: 2
answer count: 2
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/28510613
tagged with: angularjs

http://stackoverflow.com/comment/42896446
comment on: http://stackoverflow.com/q/27206299
type: Comment
has text: Maybe scope.$apply(function () { scope.customAlert(); }) ?
score: 0
type: QuestionComment

http://stackoverflow.com/q/27178283
linked to: http://stackoverflow.com/q/1042885
type: Question
tagged with: google-maps
linked to: http://stackoverflow.com/q/20279876
downvote count: 0
has title: Google Maps API (JS): check if I reached my destination
tagged with: javascript
tagged with: google-maps-api-3
answer count: 3
accepted answer: http://stackoverflow.com/a/27180218
has answer: http://stackoverflow.com/a/67532676
favorite count: 0
upvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27180384
has body: I'm developing HTML5 web-app for iPad that uses Google Maps API. This API is new for me, I have searched answers for many questions related to it. Markers, info windows, routes, geolocation, street view. The most useful information about that all was found in official documentation: https://developers.google.com/maps/documentation/javascript/3.exp/reference?hl=ru However, I still cannot find a solution to one (maybe, simple) problem. For example, I've created a new map instance and one marker (destination), started watching for my position (GEO Location) and drew a route to the location of this marker. How can I check when I will reach the destination? I've looked for appropriate events of DirectionsService, DirectionsRenderer and etc. but with no results. Also, I found the same topic on this website, but it is about Android development, not JS (Android: How to check that whether i reach/near my Destination?). Being hopeless, I invented my own solution, but it seems not to work properly (I have not fully tested it yet, I'll do it in the next few days). I thought if I would compare lat&amp;lng of my current position with lat&amp;lng of destination - then I could catch the moment when destination is reached: if (myPosition.lat() == dest.marker.position.lat() &amp;&amp; myPosition.lng() == dest.marker.position.lng()) { alert('You have arrived!'); } This code executes in successful watch position callback of navigator.geolocation.watchPosition Do you have any ideas?
score: 1
has answer: http://stackoverflow.com/a/27180384
has answer: http://stackoverflow.com/a/27180218

http://stackoverflow.com/q/27202122
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27202378
answer count: 1
downvote count: 0
has body: So I have a simple project of - Create a Hangman game. I had the incredibly basic game of hangman with a single word, no array being used, coded and working. Upon adding in additive guesses and an array that randomized words, it no longer works. From what I can tell, It no longer chooses a word (the dashes that take place of the letters only shows one dash now, before when there was no array and I had a preset word, it showed dashes for each letter), so therefor all guesses are wrong. Secondly, even though all these guesses are wrong, none are being counted. JSfiddle - http://jsfiddle.net/7jo8w1zw/ HTML - jquery - function hangman(word) { var trys = 0 var alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $.each(alpha.split(''), function(i, val) { $('#alpha').append($('' + val + '')); }); $.each(word.split(''), function(i, val) { $('#word').append($('-')); }); $('.guess').click(function() { var count = $('#word [letter=' + $(this).text() + ']').each(function() { $(this).text($(this).attr('letter')); }).length; $(this).removeClass('guess').css('color', (count > 0 ? 'green' : 'red')).unbind('click'); if (guess > 0) { $('#win').text("Correct Guess"); } else if (guess < 0) { $(this).html(++trys); $('#win').text("You have tried to guess the word and failed " + trys + " times"); } if (trys == 6) { alert("You have guessed six times, you lose"); trys = 0; $("#win").text(""); } }); } $(document).ready(function() { $('#but').click(function() { var options = new Array("Dog", "Cat", "Bat", "Horse", "Tiger", "Lion", "Bear", "Liger", "Doom", "Spider", "Trees", "Laptop"); var random = 1 + Math.floor(Math.random() * 12); hangman('options'[random]); }); }); /*Createa web page with the game Hangman, in which the user guesses letters in a hidden word. Create an array with at least a dozen words and pick one at random each time the game is started. Display a dash for each missing letter. Allow the user to guess letters continuously (up to 6 guesses) until all the letters in the word are correctly g…
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42887846
has answer: http://stackoverflow.com/a/27202378
score: 1
upvote count: 1
has title: Code just isn't performing, might have a syntax issue or i could be completely wrong
type: Question

http://stackoverflow.com/q/27180914
type: Question
accepted answer: http://stackoverflow.com/a/27181089
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/85175212
tagged with: javascript
favorite count: 0
tagged with: random
has body: I've been trying to create a function that will return a random decimal number between 0 (inclusive) and 1 (exclusive) via the Window.crypto.getRandomValues() function. Currently, my code is as follows: var rand = function(){ var ra = window.crypto.getRandomValues(new Uint32Array(1))[0]; function dec(n,m){ return (n&gt;=0&amp;&amp;n&lt;=1)?n:dec(n/m,m); } return dec(ra,8); } My problem is that this isn't uniformly distributed; it tends to be between .2 and .7, and rarely falls under .2 and over .7. Is there a better way to use the .getRandomValues() method to obtain a number like that of the Math.random() function? I am not using the .random() method because I wish to have secure numbers for what I am trying to perform.
tagged with: cryptography
upvote count: 3
has answer: http://stackoverflow.com/a/27181089
type: AnsweredQuestion
score: 3
has title: How to get a cryptographically strong number in the range [0,1)?

http://stackoverflow.com/comment/42904636
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27211785
has text: Yep, I abstracted the code too much, I've edited it to give a better idea.
score: 0

http://stackoverflow.com/a/27157587
has body: You're a bit mixed up. category is just a string, so you're passing in y (years) into calendarModel I think you want to use the loop index on the outside. option.innerHTML = calendarModel[category][i]; //notice [i] is not the index of the category string anymore
has comment: http://stackoverflow.com/comment/42814051
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27157507
accepted answer of: http://stackoverflow.com/q/27157507
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42809325
type: Answer

http://stackoverflow.com/comment/42804065
type: Comment
type: QuestionComment
score: 0
has text: @sixfingeredman The rational explanation is that you can go from an open parenthesis to it's close parenthesis and you have something meaningful between them. The invocation isn't "dangling on the end". It also has a tiny difference to do with _interpreted > invoked > returned_ vs _interpreted > returned > invoked > returned_ which isn't worth worrying about.
comment on: http://stackoverflow.com/q/27154637

http://stackoverflow.com/q/27221921
score: 0
has answer: http://stackoverflow.com/a/27221952
accepted answer: http://stackoverflow.com/a/27221952
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
tagged with: css
type: AnsweredQuestion
has title: How to make rotate photos when you change position iPhones in ios app
type: Question
has body: Who has any ideas how to implement this? My application is created using the cordova 4.0.0, js html css
tagged with: ios
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27245944
score: 0
answers question: http://stackoverflow.com/q/27245624
type: Answer
has body: Yes. In JavaScript, we have functions are first-class objects and you can manipulate them easily. Combined with the fact that objects are prototype based and not class-based, you can easily add a method to an object. Or to an object's prototype : //add function to one object : var object = {}; object.sayHello = function(){ alert("hello"); }; object.sayHello(); //add function to a prototype //our constructor function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } var p = new Person("John", "Doe"); Person.prototype.sayMyName=function(){ alert("My name is "+this.firstName+ " " + this.lastName); }; //now all persons can say their name p.sayMyName(); p2 = new Person("Isaac", "Newton"); p2.sayMyName(); Play with is on jsbin

http://stackoverflow.com/q/27312503
has title: Javascript for dynamic url content
has answer: http://stackoverflow.com/a/27313133
tagged with: javascript
has comment: http://stackoverflow.com/comment/43085798
has comment: http://stackoverflow.com/comment/43085511
answer count: 3
has comment: http://stackoverflow.com/comment/43086275
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43085815
has answer: http://stackoverflow.com/a/27312922
has comment: http://stackoverflow.com/comment/43086723
favorite count: 0
has body: I have a html link reference something like: click herewww.example.com Now I want to add javascript tags to make the www.example.com url to be dynamic. so it will always retrieve as www.example.com Can anyone please advice?TQ
has answer: http://stackoverflow.com/a/27313140
type: UnansweredQuestion
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/43085679
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43086472

http://stackoverflow.com/q/27256699
answer count: 3
upvote count: 1
tagged with: arrays
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27256736
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42987024
has comment: http://stackoverflow.com/comment/42987110
has answer: http://stackoverflow.com/a/27257848
type: Question
has answer: http://stackoverflow.com/a/27256951
has body: The url has following json data: [{ "topic": "cricket", "value": "Player [ playerid=123, category=b, high=150, total=2300]", "place": "xyz"}, { "topic": "cricket", "value": "Player [ playerid=456, category=c, high=60, total=300]", "place": "abc"}, { "topic": "cricket", "value": "Player [ playerid=789, category=a, high=178, total=5300]", "place": "bnm"}] I tried online to check whether this is valid json or not through following link: http://jsonformatter.curiousconcept.com/ it says valid. if it is, how do I access each playerid ?
has title: Is this valid json data?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42987038
score: 0
has comment: http://stackoverflow.com/comment/42987044

http://stackoverflow.com/comment/43027611
comment on: http://stackoverflow.com/q/27253995
score: 0
has text: You say you do "scientific calculations" that are "not supposed to be used for display". What geometries are you transforming? Why wouldn't you want to do it on the server side? I don't need detail, I want to understand the overall picture.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27262503
favorite count: 0
type: Question
has body: I have been doing some research into this, and I came up with nothing. Basically, I am trying to write a data collection program that calls a function 3 times, waiting 10 seconds in between each call. But, all I can find is "How to call a function every x seconds for y seconds", and it doesn't solve my problem completely, since it may take more than y seconds to complete all three calls. I know I will have to use the setInterval and clearIntervals, but I don't know how I would go about formatting my loops.
answer count: 2
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27262543
has title: Javascript - Execute function every x seconds, but only execute function 3 times
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/27262532
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27262543
possible better answer: http://stackoverflow.com/a/27262532
type: AnsweredQuestion

http://stackoverflow.com/a/27160365
score: 4
upvote count: 4
downvote count: 0
has body: Some double-headed arrow characters exist in UTF-8 if you don't want to draw it yourself in CSS : U+2194 ↔ U+2195 ↕ U+21D4 ⇔ U+21D5 ⇕ This page has a lot of them if you need more.
has comment: http://stackoverflow.com/comment/42814619
has comment: http://stackoverflow.com/comment/42814565
answers question: http://stackoverflow.com/q/27160299
type: Answer

http://stackoverflow.com/comment/42977763
has text: Your problem is "table-row" and "table-cell". You need to change that with media query when you want your 3 divs in column
score: 0
comment on: http://stackoverflow.com/q/27251101
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42996500
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27261817
has text: Thanks but I would like to still show unique value in this drop down since this page is being used to retrieve data, can you assist?
type: Comment

http://stackoverflow.com/comment/42811874
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27158944
score: 0
has text: fill out the input value and run again

http://stackoverflow.com/a/27242496
answers question: http://stackoverflow.com/q/27242271
type: Answer
has body: use filter() in jquery var arrayValue = [4, 1]; $(".chk").filter(function () { return arrayValue.indexOf(+this.value) != -1 // check arrayvalue is present in check box or not using indexOf }).closest("td").css('background-color', 'red').find(".chk").hide(); // set background for closest td and hide chk DEMO
has comment: http://stackoverflow.com/comment/42961527
score: 0

http://stackoverflow.com/comment/42890542
score: 1
comment on: http://stackoverflow.com/a/27203883
type: AnswerComment
type: Comment
has text: @deemeetree Yes only functions can run asynchronously. The only way to know is to look at the documentation or the source code for each function. Most of the time you can tell this by what the function is doing. All I/O in Node.js is by default asynchronus, so if you're reading from a file, etc., it will be asynchronous. You can also tell an async function by the fact that it accepts a callback as one of its arguments.

http://stackoverflow.com/comment/42883575
type: Comment
comment on: http://stackoverflow.com/q/27199728
type: QuestionComment
score: 1
has text: Try using nested ajax calls this will be helpful:- [link](http://stackoverflow.com/a/22233745/3190165). You are simultaneously calling 3 ajax call you have to wait for success of one ajax then call the other ajax call.

http://stackoverflow.com/q/27276534
has title: jquery tabs with extra padding on create/remove new tabs dynamically
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: tabs
has body: I have an issue with Jquery Tabs and to be more precise with padding between each tabs that, on my page, I create and delete several times. Every time that I create and delete a tab, and extra space is left on tabs area: Why the distance between [ Main Tab ] and [ Tab 1 ] is not the same between [ Tab 1 ] and [ Tab 9 ] considering that in the middle 8 new tabs has been created and removed? HTML: Main Tab Tab 1 Main Reference tab JavaScript: $( '#demo' ).tabs(); var tabs = $( "#demo" ).tabs(); var ul = tabs.find("ul"); //-- Create 10 tabs for (i = 1; i < 10; i++) { $( " Tab " + i + " " ).appendTo(ul); $( " This is the tab " + i + " " ).appendTo(tabs); } tabs.tabs('refresh'); //-- Delete 9 tabs for (i = 1; i < 9; i++) { $( "#demo ul a[href^=#tab" + i + "]" ).remove(); $( "#demo div[id^=tab" + i + "]" ).remove(); } tabs.tabs('refresh'); This is the JsFiddle to reproduce it http://jsfiddle.net/wh3ct1cn/
downvote count: 0
tagged with: spacing
score: 1
accepted answer: http://stackoverflow.com/a/27276732
type: Question
has answer: http://stackoverflow.com/a/27276732
tagged with: javascript
has answer: http://stackoverflow.com/a/27276777
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/27276777
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/27243430
has comment: http://stackoverflow.com/comment/42962972
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42962632
has comment: http://stackoverflow.com/comment/42962779
has comment: http://stackoverflow.com/comment/42962923
upvote count: 2
has comment: http://stackoverflow.com/comment/42962679
has body: In your ajax request specify dataType:'html' as shown :- j.ajax({ url: "refresh.php", dataType:"html", cache: true, success: function (html) { j(".refresh").html(html); } });
has comment: http://stackoverflow.com/comment/42962508
has comment: http://stackoverflow.com/comment/42962641
type: Answer
answers question: http://stackoverflow.com/q/27243406

http://stackoverflow.com/comment/42980071
comment on: http://stackoverflow.com/q/27253037
has text: FYI your code could be *massivley* condensed if you used some loops.
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42948251
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27235800
has text: Thanks, I was hoping I wouldn't have to do all that, LOL! Oh well, I guess there's a limit what JS can do.

http://stackoverflow.com/a/38506985
score: 7
has comment: http://stackoverflow.com/comment/80902935
has comment: http://stackoverflow.com/comment/80959371
downvote count: 0
type: Answer
has body: You need a newer version of nodejs. The class keyword is supported in 4.4.x, but I'm personally seeing it work in v4.2.6. (Not entirely sure what version of v8 released it, which is what would tell the node version.)
upvote count: 7
answers question: http://stackoverflow.com/q/27177485

http://stackoverflow.com/comment/43016393
score: 0
has text: It is not a valid HTML to nest a 'div' element inside an 'a' element. Checkout my answer for a working and valid example (fiddle included).
type: Comment
comment on: http://stackoverflow.com/q/27273118
type: QuestionComment

http://stackoverflow.com/q/27269710
has comment: http://stackoverflow.com/comment/43009981
tagged with: jquery
has answer: http://stackoverflow.com/a/27271504
has comment: http://stackoverflow.com/comment/43009909
has answer: http://stackoverflow.com/a/27271471
has comment: http://stackoverflow.com/comment/43009949
has comment: http://stackoverflow.com/comment/43009810
has comment: http://stackoverflow.com/comment/43009917
has comment: http://stackoverflow.com/comment/43009760
type: Question
possible better answer: http://stackoverflow.com/a/27271471
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43009819
accepted answer: http://stackoverflow.com/a/27271504
has body: One of my clients wants to have on his website the links to pdf files opened automatically in a new window. I’ve written this code and it works : $("a[target!='_blank'][href$='.pdf']").attr("target", "_blank"); I was wondering if there was other good solutions ?
has comment: http://stackoverflow.com/comment/43009879
has title: Automatically open pdf files in new window
has comment: http://stackoverflow.com/comment/43009958
tagged with: javascript
has comment: http://stackoverflow.com/comment/43010318
score: 0
has comment: http://stackoverflow.com/comment/43009826
answer count: 2
has comment: http://stackoverflow.com/comment/43009717

http://stackoverflow.com/comment/42802576
score: 1
comment on: http://stackoverflow.com/q/27154027
has text: Aside from not actually calling `get()` (which is the only place where you're actually defining `.data`), you're probably making [this mistake](http://stackoverflow.com/questions/23667086/why-is-my-variable-unaltered-after-i-modify-it-inside-of-a-function-asynchron).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42849331
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27180408
has text: Don't use `document.write`. Use `append` or `html` and `text` functions in jQuery instead.
type: Comment

http://stackoverflow.com/q/27154951
has body: In Rails, I'm working on integrating Stripe into a project I'm working on. As it is a membership site, I need to collect cc data when a user makes an account. I've already installed the stripe gem and added the keys. I have the following fields on devise/registrations/new.html.erb <%= label_tag :card_number, "Credit Card Number" %> <%= text_field_tag :card_number, nil, {:name => nil, :'data-stripe' => "number", class: "form-control"} %> <%= label_tag :card_code, "CVC" %> <%= text_field_tag :card_code, nil, {:name => nil, :'data-stripe' => "cvc", class: "form-control"} %> <%= label_tag nil, "Expiration Date" %> <%= select_month nil, { use_two_digit_numbers: true }, {:name => nil, :'data-stripe' => "exp-month", class: "form-control"} %> <%= select_year nil, { start_year: Date.today.year, end_year: Date.today.year+10 }, {:name => nil, :'data-stripe' => "exp-year", class: "form-control"} %> Next, I need to validate these fields on submission of the form. I was directed to do this with javascript, so I created a new file registrations.js.coffee: jQuery -> Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content')) payment.setupForm() payment = setupForm: -> $('#new_registration').submit -> $('input[type=submit]').attr('disabled', true) Stripe.card.createToken($('#new_registration'), payment.handleStripeResponse) false handleStripeResponse: (status, response) -> if status == 200 alert(response.id) else alert(response.error.message) When I submit this form on localhost, I get the error message: SyntaxError: [stdin]:14:5: unexpected if (in c:/Users/Bill/Desktop/testapp/app/assets/javascripts/registrations.js.coffee) This line of code is highlighted: <%= javascript_include_tag "application", "data-turbolinks-track" => true %> Actual indent of coffee:
has title: Validating Credit Card Data With Stripe Error
tagged with: stripe-payments
has comment: http://stackoverflow.com/comment/42805933
has comment: http://stackoverflow.com/comment/42807132
answer count: 0
type: UnansweredQuestion
score: 0
tagged with: coffeescript
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/42806927
tagged with: devise
tagged with: javascript
has comment: http://stackoverflow.com/comment/42805695

http://stackoverflow.com/a/27214505
score: 1
has body: Am assuming that by 10 MB you mean the total size of all images and you have several images. I would also assume that this is your use-case (you might be purposefully showing high-res photos). All these divs are hidden in the beginning and based on navigation, these divs are shown one by one. There is a menu div which will control the hiding and displaying of other divs If you have a fixed number of such images as shown in the question, then one method you could apply is to load each image as and when required. i.e. as per your menu option when a div is shown, at that time load the image. This way the first image will be loaded along with the page load, and the rest will be loaded on demand. You may show a "loading" indicator during that time. Also, note that you will need to load-on-demand only once for each image, which will then be cached for re-use. Here is a very simple and crude example: Demo Fiddle: http://jsfiddle.net/abhitalks/rmx4so40/1/ You maintain an array holding all your image urls and cached state. Inititally, the cached state will be false for all images. We will then turn it on for every image we show. (At this point we are assuming that the images will be cached, there are scenarios where images may not be cached). Next, wire up a load event handler for images and put in your code to systemically show the current images and hide other, if required. On your menu click, check the array if cached flag is on. If not, let the load event handler take care. If yes, show the image right away. Sample Snippet: var images = [{'url': 'http://lorempixel.com/320/320', 'isCached': false }, {'url': 'http://lorempixel.com/321/321', 'isCached': false }, {'url': 'http://lorempixel.com/322/322', 'isCached': false }, {'url': 'http://lorempixel.com/323/323', 'isCached': false } ], idx = 0, len = images.length; displayImage(0); // intitially display first image on page load right away $("#nxt").on("click", function() { idx = (++idx % len); displayImage(idx); }); $("#prv…
downvote count: 0
answers question: http://stackoverflow.com/q/27213745
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42895981
type: QuestionComment
has text: Can you put this in a fiddle
comment on: http://stackoverflow.com/q/27206755
score: 0
type: Comment

http://stackoverflow.com/q/27291385
has title: Comparision of dates in javascript
has comment: http://stackoverflow.com/comment/43048840
score: 0
type: UnansweredQuestion
has body: var date_arr = new Array( "Jan", "Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); var Avl_date = document.getElementById("Available_Date").value; var V_date1 = Avl_date.split('-'); var date1 = new Date (V_date1[2], date_arr.indexOf(V_date1[1]),V_date1[0]); var myDate = new Date(); myDate.setHours(0,0,0); var a=''; a=validateDate(date); var y=document.getElementById("Available_Date"); document.FM_NewComplaint.Available_Date.value=a[1]; //alert(date2); alert(date1); alert(myDate); if (a[0] != '') { document.FM_NewComplaint.Available_Date.focus(); y.style.border = '1px solid #ff6000'; document.getElementById("Available_DateError").innerHTML='Enter Proper Date'; document.getElementById("Available_DateError").style.display = ""; return false; } else if(date1&lt;=myDate) { alert("Hi"); document.FM_NewComplaint.Available_Date.focus(); y.style.border = '1px solid #ff6000'; document.getElementById("Available_DateError").innerHTML=getErrorMsg(60591); document.getElementById("Available_DateError").style.display = ""; return false; } else { Available_Date.style.border = '1px solid #d3dbe3'; document.getElementById("Available_DateError").innerHTML=''; document.getElementById("Available_DateError").style.display = "none"; return true; } This function is used to validate the date where in i need to compare present date with the selected(input) date, The condition is if Selected date is less than the Present date then the error message should print. Everything going smoothly but when the selected date and present date are similar then also its printing the error message, i.e its going through else if condition. I have tried the possibilities like &lt;=,>=. But still its going inside the loop.What should i do if i want to compare only date which is less than the present date.
has comment: http://stackoverflow.com/comment/43048623
tagged with: date
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27291601

http://stackoverflow.com/q/27158712
has title: Transcluding a text file into html via javascript
tagged with: javascript
score: 0
has body: I've been looking around at various solutions, and the 'easiest' I've found so far appears to be on this comment on a similar question. I have very little knowledge of javascript or how to implement it, so I'm stuck as to why this might not be working. So far I have: Goal, Strategy, Tactic and in the body: Android_String_Update.txt being a text file with content. I'm also testing this out on safari 8.0 which supports xhr2 Text file content is: Example of text in file is #### Inputs No inputs required #### Tools * Jenkins * Gitlab #### Steps 1. Navigate to the jenkins 1. Click on "Build Now" Any ideas what I'm doing wrong?
answer count: 1
has answer: http://stackoverflow.com/a/27158948
accepted answer: http://stackoverflow.com/a/27158948
tagged with: xmlhttprequest
linked to: http://stackoverflow.com/q/18366191
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/43025827
type: Comment
comment on: http://stackoverflow.com/q/27277927
type: QuestionComment
score: 0
has text: @squint I get that code from somewhere and is untested is just curious to me how it should work in order to modify and fit to my environment, should be `err.error` as you say? And for the `catch` I mean when any fails on the server side I send a `400` response to the Ajax request and also sends as a Json the generic message for the application, but I'm pretty sure that will be errors from the Ajax,jQuery, jqXHR side, I'm right? I need to catch all of them, the ones from JSON coming from 400 response and the ones from jqXHR, why?

http://stackoverflow.com/a/27240632
has body: The way you have it set up, javascript is changing the definition of someArg on load, almost immediately after it first defines it. You need to use another variable like so: var someArg = "Hello"; elem1.onclick = function() { foo(someArg); }; var someArg2 = "Bye"; elem2.onclick = function() { foo(someArg2); }; or pass a variable into the function and define that variable elsewhere: elem1.onclick = function(someArg) { foo(someArg); }; elem2.onclick = function(someArg) { foo(someArg); }; //Some stuff happens.... thisVariable = 'stuff happened'; elem2.onclick(thisVariable); This will result in foo being called with 'stuff happened' in the argument. Hopefully this helps. If not, please provide more details on your use case so we can focus our answers a bit more.
type: Answer
answers question: http://stackoverflow.com/q/27240557
has comment: http://stackoverflow.com/comment/42957823
score: 0

http://stackoverflow.com/comment/42982629
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27254250
has text: That's nice. Good luck figuring it out. Did you have a question? I don't see any questions. Just a list of requirements and a strong "do this for me for free" slant.
score: 0

http://stackoverflow.com/q/27238457
linked to: http://stackoverflow.com/q/21565991
tagged with: meteor
upvote count: 5
downvote count: 0
accepted answer: http://stackoverflow.com/a/27242261
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27242261
type: Question
tagged with: mongodb
score: 5
has body: I've written my code so far and can get a list of all the records to show up on a webpage, however I need to be able to get it as a CSV (comma separated values) file. Right now the page shows a list like follows: Name Address Description Bob 1 street Journalist Bill 2 street Fireman etc... Anyway I can have meteor create a CSV file for download, instead of it showing up as a webpage with all the HTML markup?
answer count: 1
tagged with: javascript
has title: Creating a CSV file from a Meteor.js Collection
favorite count: 0
has comment: http://stackoverflow.com/comment/42954003
tagged with: http://stackoverflow.com/tag/csv

http://stackoverflow.com/comment/43074954
has text: Could be your JS is being cached so updates that fix the code aren't being applied when you reload. Check with a hard reload (ctrl+ f5)
comment on: http://stackoverflow.com/q/27306184
type: Comment
type: QuestionComment
score: 3

wordpress
tags question: http://stackoverflow.com/q/27308527
tags question: http://stackoverflow.com/q/27225099
tags question: http://stackoverflow.com/q/27188514
tags question: http://stackoverflow.com/q/27286206
tags question: http://stackoverflow.com/q/27261240
tags question: http://stackoverflow.com/q/27224422
tags question: http://stackoverflow.com/q/27296364
tags question: http://stackoverflow.com/q/27259259
tags question: http://stackoverflow.com/q/27282309
tags question: http://stackoverflow.com/q/27274324
tags question: http://stackoverflow.com/q/27285363
tags question: http://stackoverflow.com/q/27252337
tags question: http://stackoverflow.com/q/27250091
tags question: http://stackoverflow.com/q/27154728
tags question: http://stackoverflow.com/q/27294496
tags question: http://stackoverflow.com/q/27300163
tags question: http://stackoverflow.com/q/27298522
tags question: http://stackoverflow.com/q/27213551
tags question: http://stackoverflow.com/q/27233028
tags question: http://stackoverflow.com/q/27282596
tags question: http://stackoverflow.com/q/27187458
tags question: http://stackoverflow.com/q/27301496
tags question: http://stackoverflow.com/q/27158663
tags question: http://stackoverflow.com/q/27252598
tags question: http://stackoverflow.com/q/27183139
tags question: http://stackoverflow.com/q/27298878
tags question: http://stackoverflow.com/q/27179919
tags question: http://stackoverflow.com/q/27287024
tag name: wordpress
tags question: http://stackoverflow.com/q/27208211
tags question: http://stackoverflow.com/q/27218721
tags question: http://stackoverflow.com/q/27254250
tags question: http://stackoverflow.com/q/27205582
tags question: http://stackoverflow.com/q/27251101
tags question: http://stackoverflow.com/q/27289823
tags question: http://stackoverflow.com/q/27233132
tags question: http://stackoverflow.com/q/27218730
tags question: http://stackoverflow.com/q/27293197
tags question: http://stackoverflow.com/q/27306618
tags question: http://stackoverflow.com/q/27186927
tags question: http://stackoverflow.com/q/27240414
tags question: http://stackoverflow.com/q/27285366
type: Tag
tags question: http://stackoverflow.com/q/27226188

http://stackoverflow.com/q/27158371
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: key
has body: Lets say i want to change the key "c3" to a variable x = "b2" and keep the value of the key itself, so it should look like this: "b2": "example3". var x = { "a1": "example1", "b2": "example2", "c3": "example3" }; Also, are there "better" types of arrays, that would go through all keys in this array just fine with a for ( var a in x ) loop?
favorite count: 0
has comment: http://stackoverflow.com/comment/42810872
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27158556
score: 1
accepted answer: http://stackoverflow.com/a/27158556
type: Question
has title: Renaming keys in javascript array
upvote count: 1

http://stackoverflow.com/q/27161578
has answer: http://stackoverflow.com/a/27161690
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42816695
type: Question
has title: json - add 2 elements on the same node at once ? (or in an inexistent node)
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: This must be easy..but I can't find the answer... var crit = { 'webshopId': webshopId, 'type': 'product'} }; i need to add sku.regularPrice = { $gte : parameters.minPrice} on crit; so...if I do crit.sku.regularPrice = { $gte : parameters.minPrice}; I will receive a exception: TypeError: Cannot set property 'regularPrice' of undefined it's because sku does not exists on crit. Ok, so, let's create... crit.sku = {}; This will bring me un unwished result...like this... { webshopId: 'rawDemo', type: 'product', sku: { regularPrice: { '$gte': '3' } } } So, a child node has been created :( I really need : sku.regularPrice : { $gte : 3} So, my expected result must be... { webshopId: 'rawDemo', type: 'product', sku.regularPrice: { '$gte': '3' } } at the crit variable. A hard coded representation could be... var crit = { webshopId: 'rawDemo', type: 'product', sku.regularPrice: { '$gte': '3' } } any clue ?
accepted answer: http://stackoverflow.com/a/27161690
score: 0
has comment: http://stackoverflow.com/comment/42816827
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0

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

http://stackoverflow.com/comment/42976041
has text: document.getElementById("xmlTable"); returns an html object, not a javascript object, so it doesn't have a rows array.table.insertRow(0); won't work because of that. You think you're editing the XML but that's not possible anymore. Do you want to recreate your table?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27249568
type: QuestionComment

http://stackoverflow.com/q/27220183
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42925623
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27223614
upvote count: 2
tagged with: knockout.js
type: Question
has body: This is probably yet another javascript scope question with a knockout spin. Going through the examples in a book that I purchased in which the author presents an example of a single page application but chooses not to completely explain the javascript as it is not the focus of the book. My question is how does the function in the success action in the ajax call understand the definition for the nested object used as an argument. outerobj.myarray.push.apply(outerobj.myarray, data.map(function (nestedobj) { nestedobj.prop1 })) The main object var outerobj = { view: ko.observable("View1") nestedobj : { prop1 : ko.observable(""), prop2 : "", prop3 : ko.observable("") }, myarray : ko.observableArray([]) } In a later Ajax/Jquery option there is a call to push.apply with a call like this var getProperties = function () { $.ajax("/path", { type: "GET", success: function (data) { outerobj.myarray.removeAll(); outerobj.myarray.push.apply(outerobj.myarray, data.map(function(nestedobj) { return nestobj.prop1; })) outerobj.view("Result"); } }); }
tagged with: javascript
has title: Understand how knockout is interacting with a javascript object with the push.apply
accepted answer: http://stackoverflow.com/a/27223614
has comment: http://stackoverflow.com/comment/42920311
downvote count: 0

http://stackoverflow.com/a/56358386
score: -1
type: Answer
upvote count: 0
has body: Here is solution from firebase docs: Query query = cities.orderBy("name", Direction.DESCENDING).limit(3); https://firebase.google.com/docs/firestore/query-data/order-limit-data
downvote count: 1
answers question: http://stackoverflow.com/q/27195851

http://stackoverflow.com/q/27204156
has title: Pregmatch html attribute with a json content
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42890997
tagged with: http://stackoverflow.com/tag/json
score: -1
type: Question
has comment: http://stackoverflow.com/comment/42891014
answer count: 2
has comment: http://stackoverflow.com/comment/42890935
upvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42890970
has comment: http://stackoverflow.com/comment/42891105
possible better answer: http://stackoverflow.com/a/27204204
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to get the contents of an html tag attribute but somehow I am failing to get all of the contents: Example html // clipped for brevity &lt;a href="someurl/somemore" data-custom="{"foo": 0, "bar": "string"}"&gt; // some more html Now I want to get all the contents of the json object that is oddly using double quotes. For that reason I tried to get first the value of the data attribute and parse the json later. I did: preg_match('/&lt; *a[^&gt;]*data-custom *= *["\']?([^"\']*)/i', $re, $matches); var_dump($matches); where $re is the html shown above. But I am getting this: array(2) { [0]=&gt; string(39) "&lt;a href="someurl/somemore" data-vote="{" [1]=&gt; string(1) "{" What do you think? Also if you happen to know a direct way to extract the json values in a faster way, how would you do it?
has answer: http://stackoverflow.com/a/27204204
has comment: http://stackoverflow.com/comment/42891294
has answer: http://stackoverflow.com/a/27204243
has comment: http://stackoverflow.com/comment/42891349
tagged with: php
downvote count: 1
accepted answer: http://stackoverflow.com/a/27204243

http://stackoverflow.com/comment/43021976
has text: no not yet latest flowplayer module and drupal 7
comment on: http://stackoverflow.com/q/27259250
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27279556
has comment: http://stackoverflow.com/comment/43028014
has body: Try this it works in chrome...also check out this link
answers question: http://stackoverflow.com/q/27279436
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43028189
has comment: http://stackoverflow.com/comment/43028285
type: Answer
has comment: http://stackoverflow.com/comment/43027868
has comment: http://stackoverflow.com/comment/43027844
has comment: http://stackoverflow.com/comment/43028223

http://stackoverflow.com/q/27158945
linked to: http://stackoverflow.com/q/15971167
type: Question
tagged with: mocha-web-velocity
tagged with: javascript
tagged with: mocha.js
has comment: http://stackoverflow.com/comment/42817986
score: 4
has title: how to test showing an element after a click?
has comment: http://stackoverflow.com/comment/42835819
answer count: 1
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
upvote count: 4
has comment: http://stackoverflow.com/comment/42817994
downvote count: 0
has body: I'm working with mocha unit test and I need to test if an element is visible after click on a radio button. In other words I have two radio buttons that toggle two elements using javascript and I would like to test this. this is my test: it("Checking #completed-task existance", function (done) { chai.assert.equal($("#completed-task").length, 1); done(); }); it("Checking #completed-task is visible", function (done) { $("#master div.onoffswitch").find("input[data-id='completed-task']").click(); chai.assert.equal($("#completed-task").is(":visible"), true); }); the first test passes but the second one doesn't. the problem is that $("#completed-task").is(":visible") is always false, in the actual page this works just fine, any suggestions?
has answer: http://stackoverflow.com/a/27181803

http://stackoverflow.com/q/27228656
accepted answer: http://stackoverflow.com/a/27246822
favorite count: 0
has comment: http://stackoverflow.com/comment/42936868
has comment: http://stackoverflow.com/comment/42935944
type: Question
has comment: http://stackoverflow.com/comment/42936971
tagged with: spring
has title: How to use d3.js in JSP?
tagged with: d3.js
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27246822
has comment: http://stackoverflow.com/comment/42936267
tagged with: java
tagged with: javascript
has body: In a Spring web application I am trying to create a dummy JSP page to build on: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ page session="false"%> <spring:url value="/resources/scripts/d3.js" var="d3_url" /> A Pagey Page Hello world! What up? I loaded d3.js in the header of the page and there are no complaints about it, so I assume the resource was found. However when I come to use a D3 script in the body of the page I get "Uncaught ReferenceError: d3 is not defined". I am positive about the syntax of the call, because I've tested the same thing in a simple HTML page and it worked. So, either this is not the way to use D3 in a JSP page or somehow the resource isn't loaded after all. My resources folder is declared in the config file: <resources mapping="/resources/**" location="/resources/" /> and I triple-checked that d3.js is indeed in the /resources/scripts folder. What is the right way to use d3.js in JSP? UPDATE: In Google Chrome development tools console d3 is not recognized. This leads to conclusion that despite the lack of warnings about loading d3 in the header, it hasn't been properly loaded. But why? UPDATE 2: When I replace <spring:url value="/resources/scripts/d3.js" var="d3_url" /> with I get Failed to load resource: the server responded with a status of 404 (Not Found) in the Chrome console for that line. SOLVED: My bad. After removing the leading slash from the resource location, it worked! value="resources/scripts/d3.js". I still don't get why that would affect the outcome taking into account that the resources root was explicitly indicated.
type: AnsweredQuestion
downvote count: 0
tagged with: jsp
score: 1

http://stackoverflow.com/a/27282895
upvote count: 0
answers question: http://stackoverflow.com/q/27282723
has comment: http://stackoverflow.com/comment/43042472
type: Answer
downvote count: 1
score: -1
has body: $dirty of any form would tell you whether the form is dirty or not in the form controller you can watch for any form changes and store a boolean value in a service, remember to clear the watch as soon as you know the form is dirty $locationChangeStart is fired when the user tries to navigate to another view inject the service in $locationChangeStart event and check to see if the boolean value is true of false. Please ensure you clear the boolean value to false or undefined when the $locationChangeSuccess
has comment: http://stackoverflow.com/comment/43083943

http://stackoverflow.com/comment/42856122
type: AnswerComment
score: 0
type: Comment
has text: Okay, OP posted case specific code. It looks like there isn't any code that specific to different getObject() values. He could directly use if(type = fruit)..., else if(type = beverage).
comment on: http://stackoverflow.com/a/27184320

http://stackoverflow.com/a/27310798
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/50148365
has body: After debugging by the elimination method, I finally found the source of the problem. It was in the css, in an external theme. The culprit was this line: img { max-width: 100% !important; } I removed it and the markers came back :)
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/27294383
upvote count: 2
answers question: http://stackoverflow.com/q/27294383

http://stackoverflow.com/a/27264335
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27264172
has body: Hope this will be a help, var count = 0; $("#btn").click(function() { count++; $("#lbl").html(count); } 1 Button

http://stackoverflow.com/comment/42920685
has text: tutorials? the easier way is just add the css of the theme to your project. that is a clean solution, have a look at this themes, they are clear and you only need to add that css to your project http://bootswatch.com/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27220825
score: 2

http://stackoverflow.com/comment/42952572
comment on: http://stackoverflow.com/q/27237864
score: 1
has text: You should use `$("h3").wrap(' ')`.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27182404
has body: Use getSelectionModel function to get the reference of grid's selected row Sample fiddle here: https://fiddle.sencha.com/#fiddle/e5l also bbar config should display toolbar at the bottom of the panel, not sure what problem you are facing..
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27181370
answers question: http://stackoverflow.com/q/27181370
has comment: http://stackoverflow.com/comment/43166139
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42916139
has text: I would simplify your function: `function _(str) { return document.querySelectorAll(str); }`.
score: 4
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27218364

http://stackoverflow.com/a/27283942
type: Answer
has comment: http://stackoverflow.com/comment/43036267
accepted answer of: http://stackoverflow.com/q/27283896
has comment: http://stackoverflow.com/comment/43036303
answers question: http://stackoverflow.com/q/27283896
has comment: http://stackoverflow.com/comment/43036233
has body: In jQuery you can use the method empty(): $("#graph").empty(); Then you can add the new content. READ MORE: http://www.w3schools.com/jquery/html_empty.asp
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43036253
score: 0

http://stackoverflow.com/q/27214991
answer count: 1
has title: Unsubscribe Pusher channel
tagged with: pusher
has answer: http://stackoverflow.com/a/27216066
type: AnsweredQuestion
has body: I'm new to using Pusher with my Rails app. Everything is working fine and i'm now able to subscribe to channels and receive JSON message. But i want to make an button where i can unsubscribe from a specific channel. I have tried this Unsubscribe But it do not work. If i look in the debug console when i press the button all that happens is that it make a new connection and i keep receiving messages from the "test_channel".
tagged with: javascript
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/27216066
upvote count: 2
score: 0
downvote count: 2
tagged with: ruby-on-rails

http://stackoverflow.com/q/27260702
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27260869
has title: Page is not completely loaded/rendered when onLoadFinished fires
answer count: 1
favorite count: 0
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/27260869
linked to: http://stackoverflow.com/q/14968690
tagged with: phantomjs
type: AnsweredQuestion
score: 2
has body: I'm using Phantomjs to examine my application. The page I am looking at includes a lot of components and is powered by Angularjs. My test server is slow. In the onLoadFinished event, I am imaging the web page using render: page.onLoadFinished = function(response) { console.log(response, page.url); if (page.url.indexOf("login") == -1) { page.render('zoot.png'); phantom.exit(); } }; My issue is that zoot.png only includes the site's menu bar. The menu bar's text and static images are rendered but the icons are Xs. The main page area is blank. A textual version number appears in the lower right which is expected. It looks like the page was not fully drawn when the render happened. Is there another event that means "done and ready for use"?
type: Question

http://stackoverflow.com/q/27157295
has comment: http://stackoverflow.com/comment/42808773
has answer: http://stackoverflow.com/a/27158484
has comment: http://stackoverflow.com/comment/42810891
has title: Remove object from array
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27158484
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27157412
score: 0
has body: I have following code: app.controller('modalController', function($scope, $http,$modalInstance, $rootScope, items){ // Get info $http.post('/ajax/bundle', {'items':items}).success(function(data){ $scope.info = data['info']; }); // [BUTTON] Add Bundle $scope.selectBundle = function() { // Push the info to the cart $rootScope.cart.push($scope.info); // simplified info $rootScope.selectedBundle.push(items) // Close modal $modalInstance.close(); } // [BUTTON] Remove bundle $scope.removeBundle = function() { // Run all bundles angular.forEach($rootScope.selectedBundle,function(value, key){ // Exists if (angular.equals(value,items)) { // Remove simplified $rootScope.selectedBundle.splice($rootScope.selectedBundle.indexOf(value), 1); // remove form cart // $rootScope.cart.splice($rootScope.cart.indexOf($scope.info), 1); } }); // Close modal $modalInstance.close(); } }); When i use: console.log($rootScope.cart); console.log($scope.dados); console.log($rootScope.cart.indexOf($scope.dados)); in $scope.selectBundle, returns correct position Now, when i use in $scope.removeBundle, always returns -1 (not found) Someone can help me?
answer count: 2
possible better answer: http://stackoverflow.com/a/27157412

http://stackoverflow.com/a/27183491
type: Answer
has body: if $row['sell_code'] is a string the you can use $sellCode = $row['sell_code']; onClick="goNewWin('&lt;?php echo $sellCode; ?&gt;')"&gt;
score: 0
answers question: http://stackoverflow.com/q/27183467

http://stackoverflow.com/a/27202069
has body: This should get the job done. [DataContract] public class Item { private string firstName= ""; private string secondName= ""; [DataMember(Name = "First Name")] public string FirstName { get { return firstName; } set { firstName= value; } } [DataMember(Name = "Second Name")] public string SecondName { get { return secondName; } set { secondName= value; } } } If this isn't flexible enough for your needs you will have to implement custom formatting. Read more about it here: WebApi Json.NET custom date handling
has comment: http://stackoverflow.com/comment/42887367
score: 1
upvote count: 2
answers question: http://stackoverflow.com/q/27202013
type: Answer
has comment: http://stackoverflow.com/comment/42887332
has comment: http://stackoverflow.com/comment/78208020
downvote count: 1

http://stackoverflow.com/q/27210855
score: 0
accepted answer: http://stackoverflow.com/a/27210880
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42904148
has title: validation for alphabets forward slash and dot
has body: am trying to validate relation field which will have alphabets, forward slash and dot for e.g (s/o. Mr.ram or w/o. Mr.ram), i have already tried this ([a-z])/([a-z]) but it is not working please help am new to this thanks in advance
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27210880
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27216331
type: AnsweredQuestion
upvote count: 2
has body: I'm making an application and I have to display data in a chart. I also only want the last 5 transactions entered to display. I'm using Backbone.js and Chart.js. In my prototype displaying data was no problem because I just bootstrapped the data. But now that I'm trying to pull the data from my Backbone Collection it's not working. I only get a transparent image // Model (function (exports) { var Transaction = Backbone.Model.extend({ defaults: { amount: 0, transactionDate: "", transactionType: "debit", category: "miscellaneous", description: "" }, categories: [ "salary", "rent", "miscellaneous" ], transactionTypes: [ "credit", "debit" ], initialize: function() { this.set({transactionDate: this.attributes.transactionDate || Date.now()}, {validate: true}); }, validate: function(attrs, options) { if (attrs['transactionType'] !== undefined &amp;&amp; !_.contains(this.transactionTypes, attrs['transactionType'].toLowerCase())) { return 'Invalid type: ' + attrs['transactionType']; } else if (attrs['category'] !== undefined &amp;&amp; !_.contains(this.categories, attrs['category'].toLowerCase())) { return 'Invalid category: ' + attrs['category']; } else if (attrs['transactionDate'] !== undefined &amp;&amp; _.isNaN(parseInt(attrs['transactionDate'])) || attrs['transactionDate'] &lt; 0) { return 'Invalid date: '+ attrs['transactionDate']; } else if (attrs['amount'] !== undefined &amp;&amp; _.isNaN(parseInt(attrs['amount'])) || attrs['amount'] &lt; 0) { return 'Invalid amount: '+ attrs['amount']; } return null; } }); // export for global use exports.expensus.Models.Transaction = Transaction; }(this)); This is the collection I'm using .. ;(function (exports) { var Transactions = Backbone.Collection.extend({ // stuff and thangs model: expensus.Models.Transaction, localStorage: new Backbone.LocalStorage('TransactionsCollection'), latestFive: function(toJSON) { this.sortByDate(-1); // sort latest first if (!toJSON) { return _.first(this.models, 5); } else { var models = _.first(th…
has title: Doughnut Chart not displaying data with Chart Js and Backbone js
accepted answer: http://stackoverflow.com/a/27230654
type: Question
tagged with: charts
tagged with: chart.js
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/27230654
has comment: http://stackoverflow.com/comment/42923423
score: 2

http://stackoverflow.com/q/27235531
tagged with: javascript
score: 1
favorite count: 0
has title: Wait for Javascript function finished inside foreach cshtml?
answer count: 3
accepted answer: http://stackoverflow.com/a/27238837
tagged with: razor
possible better answer: http://stackoverflow.com/a/27235873
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/42954365
has answer: http://stackoverflow.com/a/27235873
upvote count: 2
has comment: http://stackoverflow.com/comment/42947823
has answer: http://stackoverflow.com/a/27236343
linked to: http://stackoverflow.com/q/13325008
downvote count: 1
type: AnsweredQuestion
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/27238837
has comment: http://stackoverflow.com/comment/42947961
type: Question
has body: I'm trying to make simple autotype with Javascript. My problem is the autotype is cannot run sequentially if i call it from view (.cshtml). My cshtml like this: &lt;script type="text/javascript" src="@Url.Content("/Scripts/autotype.js")"&gt;&lt;/script&gt; @foreach (var temp in @Model) { &lt;script&gt; auto_type("ABCDEFG", 0) &lt;/script&gt; } &lt;div id="divauto"&gt;&lt;/div&gt; and it's autotype.js : function auto_type(wrt, i) { wrt = wrt.split(''); var delay = 100; while (i &lt; wrt.length) { setTimeout(function () { $('#divauto').append(wrt.shift()) }, delay * i) i++; } } From these codes, the output will be like "AAABBBCCCDDDEEEFFFGGG" but i need the output like: "ABCDEFGABCDEFGABCDEFG"

http://stackoverflow.com/comment/42992179
type: Comment
comment on: http://stackoverflow.com/a/27258955
has text: I looked deeper in the code and you were right. I added before self.Location().Address1 that says if (!self.Location()) self.Location(new AddressModel()) where AddressModel has all the stuff needed.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42958373
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27240455
type: AnswerComment
has text: Yup you are right. `request.body` doesn't get populated for 'GET' requests. I'll update my answer with more relative information.

http://stackoverflow.com/a/27439524
score: 64
type: Answer
accepted answer of: http://stackoverflow.com/q/27254735
downvote count: 0
has comment: http://stackoverflow.com/comment/43320339
answers question: http://stackoverflow.com/q/27254735
has comment: http://stackoverflow.com/comment/43539420
upvote count: 64
has body: Try wrapping your onload function in another function. Here the closure gives you access to each file being processed in turn via the variable f: function openFiles(evt){ var files = evt.target.files; for (var i = 0, len = files.length; i &lt; len; i++) { var file = files[i]; var reader = new FileReader(); reader.onload = (function(f) { return function(e) { // Here you can use `e.target.result` or `this.result` // and `f.name`. }; })(file); reader.readAsText(file); } } For a discussion of why a closure is required here see these related questions: JavaScript closure inside loops – simple practical example Javascript infamous Loop issue?
has comment: http://stackoverflow.com/comment/105252706
has comment: http://stackoverflow.com/comment/43320240
has comment: http://stackoverflow.com/comment/75520511
has comment: http://stackoverflow.com/comment/87712484
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/54865883

http://stackoverflow.com/comment/43041942
comment on: http://stackoverflow.com/a/27285722
score: 0
type: Comment
has text: I knew closure for a long time, but haven't used it yet. This is a very good example, thx!
type: AnswerComment

http://stackoverflow.com/q/27313706
has comment: http://stackoverflow.com/comment/43166203
has comment: http://stackoverflow.com/comment/43087917
has answer: http://stackoverflow.com/a/27359895
has title: How to get to previous ajax request
accepted answer: http://stackoverflow.com/a/27359895
type: AnsweredQuestion
has body: I'm working on one script which contains a lot of ajax requests. Script is working absolutely fine, I have there a lot of dynamic content which is changing depends on user's select or search input. I've started looking for how I can to manipulate the browser history and basically make these request saved in browser history. I've went through MDN - Manipulating the browser history. I've got the general idea of this article, but I'm a bit struggling with implementing it in my project. Here is a bit of code for live search part: $('#search').keyup(Foundation.utils.throttle(function(e) { var searchField = $('#search').val(); var regex = /[\D]+/; $('.loader').show(); if (regex.exec(searchField)) { $.get("getEventsWithVideos.php?text=" + searchField, function(data) { }); $.get("getClubsWithVideos.php?text=" + searchField, function(data) { }); } else { // If searchField is a number $.get("getMembersWithVideos.php?text=" + searchField, function(data) { $events.empty(); $clubs.empty(); $members.empty(); $membersdeep.empty(); $members.append(" Members "); var vals = jQuery.parseJSON(data); $.get("getVideosDyn.php?membershipno=" + vals['Member']['membership_no'], function(data) { }); }); } }, 400)); Can please someone point my up with snippet based on my code, how I can create a link for each request to be saved in browser history so I could create a button and add on.click goto 1 request back. Thank you in advance
has comment: http://stackoverflow.com/comment/43162554
type: Question
upvote count: 4
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/43166516

http://stackoverflow.com/q/27284511
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/27284768
linked to: http://stackoverflow.com/q/14935996
type: Question
has title: Locating next item in ng-repeat which uses orderBy
has body: TL;DR: http://jsfiddle.net/ajpbuymt/1/ I render a list with ng-repeat. I want to allow users to sort this list by clicking on column headers. I implement this using orderBy filter. The problem is I need a way to navigate to next item in the list (as seen by user). And also retrieve that actual item from the original array. This should be a function on the scope. (In fact, this will be called when certain shortcut key is pressed.) I can maintain 'current index' in the controller. But then, it's impossible to resolve to the actual item from the controller, because the index of the original array is not the same as what is shown by ng-repeat. Please refer to full demo here: http://jsfiddle.net/ajpbuymt/1/. By name By age By salary --> {{card.name}}, {{ card.age }}, {{ card.salary }} Next item: $scope.nextItem = function () { $scope.selectedIndex++; if ($scope.selectedIndex >= $scope.cards.length) { $scope.selectedIndex = 0; } // How to locate the correct lastData when the list is sorted?? $scope.lastData = $scope.cards[$scope.selectedIndex].name; } Any idea will be appreciated!
tagged with: angularjs-scope
tagged with: angularjs-filter
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27284768
favorite count: 0
tagged with: angularjs
tagged with: angularjs-ng-repeat

bulkinsert
type: Tag
tag name: bulkinsert
tags question: http://stackoverflow.com/q/27253669

http://stackoverflow.com/a/27209408
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/27209259
answers question: http://stackoverflow.com/q/27209259
upvote count: 1
has body: This will alert values that are typed in the box. But you should be using a UI for this. Why reinvent the wheel. Time is precious. jQuery UI is among the most popular due to it's cross browser compatibility. Select a date jQuery UI Datepicker http://jqueryui.com/datepicker/

java
tags question: http://stackoverflow.com/q/27170632
tags question: http://stackoverflow.com/q/27312954
tags question: http://stackoverflow.com/q/27254424
tags question: http://stackoverflow.com/q/27288180
tags question: http://stackoverflow.com/q/27179875
tags question: http://stackoverflow.com/q/27174889
tags question: http://stackoverflow.com/q/27188834
tags question: http://stackoverflow.com/q/27248749
tags question: http://stackoverflow.com/q/27249674
tags question: http://stackoverflow.com/q/27159242
tags question: http://stackoverflow.com/q/27312993
tags question: http://stackoverflow.com/q/27272228
tags question: http://stackoverflow.com/q/27176530
tags question: http://stackoverflow.com/q/27225606
tags question: http://stackoverflow.com/q/27289398
tags question: http://stackoverflow.com/q/27213533
tags question: http://stackoverflow.com/q/27228656
tags question: http://stackoverflow.com/q/27221675
tags question: http://stackoverflow.com/q/27283742
tags question: http://stackoverflow.com/q/27226583
tags question: http://stackoverflow.com/q/27225237
tags question: http://stackoverflow.com/q/27311097
tags question: http://stackoverflow.com/q/27185588
tags question: http://stackoverflow.com/q/27184337
tags question: http://stackoverflow.com/q/27312151
tags question: http://stackoverflow.com/q/27271567
tags question: http://stackoverflow.com/q/27297067
tags question: http://stackoverflow.com/q/27216454
tags question: http://stackoverflow.com/q/27292442
tags question: http://stackoverflow.com/q/27297879
tags question: http://stackoverflow.com/q/27226312
tags question: http://stackoverflow.com/q/27219336
tags question: http://stackoverflow.com/q/27153613
tags question: http://stackoverflow.com/q/27279579
tags question: http://stackoverflow.com/q/27194121
tags question: http://stackoverflow.com/q/27283453
tags question: http://stackoverflow.com/q/27231579
tags question: http://stackoverflow.com/q/27311256
tags question: http://stackoverflow.com/q/27231194
tags question: http://stackoverflow.com/q/27153808
tags question: http://stackoverflow.com/q/27231573
tags question: http://stackoverflow.com/q/27264970
tags question: http://stackoverflow.com/q/27200481
tags question: http://stackoverflow.com/q/27162250
tags question: http://stackoverflow.com/q/27313642
tags question: http://stackoverflow.com/q/27304352
tags question: http://stackoverflow.com/q/27271752
tags question: http://stackoverflow.com/q/27214409
tags question: http://stackoverflow.com/q/27200298
tag name: java
tags question: http://stackoverflow.com/q/27214683
tags question: http://stackoverflow.com/q/27175847
tags question: http://stackoverflow.com/q/27228780
tags question: http://stackoverflow.com/q/27262998
tags question: http://stackoverflow.com/q/27221698
tags question: http://stackoverflow.com/q/27165521
tags question: http://stackoverflow.com/q/27215466
tags question: http://stackoverflow.com/q/27227390
tags question: http://stackoverflow.com/q/27228411
tags question: http://stackoverflow.com/q/27168076
tags question: http://stackoverflow.com/q/27270089
tags question: http://stackoverflow.com/q/27278915
tags question: http://stackoverflow.com/q/27248639
tags question: http://stackoverflow.com/q/27230250
tags question: http://stackoverflow.com/q/27241328
tags question: http://stackoverflow.com/q/27236173
type: Tag
tags question: http://stackoverflow.com/q/27295431
tags question: http://stackoverflow.com/q/27211191
tags question: http://stackoverflow.com/q/27213337
tags question: http://stackoverflow.com/q/27164216
tags question: http://stackoverflow.com/q/27310018
tags question: http://stackoverflow.com/q/27178658

http://stackoverflow.com/q/27283361
tagged with: javascript
has answer: http://stackoverflow.com/a/27283438
favorite count: 0
has comment: http://stackoverflow.com/comment/43035093
answer count: 3
downvote count: 3
has answer: http://stackoverflow.com/a/27283396
has body: is there a way i can remove the scrollbars (horizontal and vertical) from my website?
upvote count: 0
type: UnansweredQuestion
score: -3
has title: where is the scroll bar coming from and how can i remove it?
duplicate of: http://stackoverflow.com/q/3034390
tagged with: scrollbar
has answer: http://stackoverflow.com/a/27283395
type: Question
linked to: http://stackoverflow.com/q/3034390

http://stackoverflow.com/q/27242014
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27242991
type: Question
has answer: http://stackoverflow.com/a/27242575
tagged with: javascript
score: 0
answer count: 2
tagged with: shopify
tagged with: jquery
has answer: http://stackoverflow.com/a/27242991
accepted answer: http://stackoverflow.com/a/27242575
has title: Shopify Drop down Validation
has body: I'm building a web store on shopify. I want to add a validation to dropdown that if no size/value is selected from drop down, it automatically select 1st size/value. when we click on add to cart button. Thanks for the help.

http://stackoverflow.com/comment/42926285
has text: Javascript uses lexical scoping of variables. The scope of a local variable is only the functions that are _defined_ within the body of the function where the variable is declared. It doesn't include functions that are passed as parameters to these functions.
comment on: http://stackoverflow.com/q/27224014
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43010924
has text: Yes, I have realised this aswell. Still you gave me lots of good info about the regex parts =)
comment on: http://stackoverflow.com/q/27269766
score: 0
type: Comment
type: QuestionComment

deftjs
tag name: deftjs
tags question: http://stackoverflow.com/q/27229678
type: Tag

http://stackoverflow.com/q/27193672
tagged with: post
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27193755
tagged with: ajax
favorite count: 0
downvote count: 1
has answer: http://stackoverflow.com/a/27193755
type: AnsweredQuestion
has title: Bypass Certificate expiration in javascript
score: -1
has body: I am trying to make a Https post request to an url having an expired certificate. Is there a way to bypass that security in Javascript? I was able to do it in C# and Java. function post() { var xmlhttp; xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST","https://something.com:8443/trigger",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("code=6644&amp;workflow.reponame=test"); }
tagged with: ssl-certificate

http://stackoverflow.com/a/31142719
has body: Use $parent to get the value. Template: Go! Controller: for (var i = 0; i < mArray.length; i++) { var marker = { id : mArray[i]._id, coords : { latitude : mArray[i].address.latitude, longitude : mArray[i].address.longitude } }; $scope.markers.push(marker); }
downvote count: 0
score: 2
answers question: http://stackoverflow.com/q/27308371
upvote count: 2
type: Answer

http://stackoverflow.com/a/27400651
has comment: http://stackoverflow.com/comment/43279397
type: Answer
has comment: http://stackoverflow.com/comment/43251549
answers question: http://stackoverflow.com/q/27295247
has body: You can disable the animation on each individual chart, rather than all of them. This is achieved via the EnableAnimation property and is demonstrated in the following example: https://demos.shieldui.com/aspnet/line-chart/forex-data I hope this helps.
score: 0

http://stackoverflow.com/q/27242319
tagged with: javascript
type: UnansweredQuestion
has body: if(document.getElementById('3w').checked) { alert('3w'); }else if(document.getElementById('6w').checked) { alert('6w'); } &lt;input type="radio" name="pnltype" id="3w" value="3w" /&gt; 3W &lt;input type="radio" name="pnltype" id="6w" value="6w" checked /&gt; 6W My problem: this will run perfectly in firefox. For example, if I tick 3w and than choose "reload", I get alert '3w' But not in Chrome. In Chrome although I check 3W, and then manually "reload" the page, 'the alert will be '6w'. What is the reason? In previous versions I used the onClick option in the radio buttons and this function: function radioClick() { window.location.reload(); } And again - in firefox it behave as expected, not in chrome Thanks for any help.
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42960817
has answer: http://stackoverflow.com/a/27242789
has answer: http://stackoverflow.com/a/27242437
has title: radio buttons and passing values
score: 0
answer count: 3
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42961315
has answer: http://stackoverflow.com/a/27242863

http://stackoverflow.com/comment/43198038
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27291972
has text: I created an example in fiddle, however, since fiddle was made with extjs it renders the tooltips and such correctly. In my case, i use extjs just for some functionalities along with the rest of my website (made with php). for those interested, i will post the code of fiddle in the post

http://stackoverflow.com/q/27229275
has answer: http://stackoverflow.com/a/27229864
favorite count: 0
linked to: http://stackoverflow.com/q/22560868
has comment: http://stackoverflow.com/comment/42936083
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has comment: http://stackoverflow.com/comment/42936138
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27229864
upvote count: 1
has body: I'm using the jquery 'remove' to delete an element from the DOM. The problem is, it is not deleting from memory. I'm trying all variations of 'purge', and 'deleteData' to delete from the DOM and memory but still no luck. The debugging script below highlights the problem. It posts to the console the before/after totals to check for memory deletion. When the [x] is clicked the row is deleted, but no matter what I try the data stays in memory. Commented out are some of what I've tried... // discardElement(current_row) ; // jQuery.removeData(current_row) ; // $.removeData(current_row) ; // current_row.removeData(); //purge(current_row) ; // $.purge(current_row) ; // $.removeData(current_row) ; No luck with these solutions either: How to clear DOM elements created with jQuery from memory? Removing SVG from dom and memory I've been at this for a few hours now. What am I doing wrong? my code in jsfiddle HTML code : &lt;div data-role="page"&gt; &lt;!-- /header --&gt; &lt;div data-role="content"&gt; &lt;!-- entry points table --&gt; &lt;section id="entry_points_section"&gt; &lt;div class="section_titles"&gt;Enter market entry points:&lt;/div&gt; &lt;div class="input_fields_wrap"&gt; &lt;table class="responsive" id="input_entries_table"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th scope="col" id="entry_price_column"&gt;Entry price&lt;/th&gt; &lt;th scope="col"&gt;Percent&lt;/th&gt; &lt;th scope="col"&gt;Order amount&lt;/th&gt; &lt;th scope="col"&gt;Capital value&lt;/th&gt; &lt;th scope="col"&gt;Breakeven&lt;/th&gt; &lt;th scope="col"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="17%" style="min-width:3em"&gt;&lt;input type="number" class="entryprice_class" name="entryprice" size="5" min="0" placeholder="0" value="500"&gt;&lt;/td&gt; &lt;td style="min-width:2em"&gt;&lt;input type="range" name="slider-fill_1" class="entry_percent" id="entry_percent_1" value="0" placeholder="0%" min="0" max="100" data-highlight="true"/&gt;&lt;/td&gt; &lt;td width="17%" style="min-width:3em"&gt;&lt;…
tagged with: dom
downvote count: 1
has answer: http://stackoverflow.com/a/27229954
type: Question
has title: How to Remove DOM Element From DOM and From Memory?
linked to: http://stackoverflow.com/q/15177654
possible better answer: http://stackoverflow.com/a/27229723
tagged with: javascript
has answer: http://stackoverflow.com/a/27229723
score: 0
has answer: http://stackoverflow.com/a/27229911
tagged with: jquery

http://stackoverflow.com/a/27242383
has comment: http://stackoverflow.com/comment/42961223
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27242271
accepted answer of: http://stackoverflow.com/q/27242271
type: Answer
has comment: http://stackoverflow.com/comment/42962221
has body: UPDATED try this: var arr=[4,1];// array list received from php for(i=0;i< arr.length;i++){ $('table tbody tr td input[type=checkbox]').each(function(){ if($(this).val()==arr[i]){ $(this).hide(); $(this).closest('td').css('background-color','red'); }else if($(this).is(':visible')){ $(this).closest('td').css('background-color','pink'); } }); } 1 2 3 4
has comment: http://stackoverflow.com/comment/42961548
has comment: http://stackoverflow.com/comment/42961301
has comment: http://stackoverflow.com/comment/42961714
has comment: http://stackoverflow.com/comment/42961944
has comment: http://stackoverflow.com/comment/42961471
has comment: http://stackoverflow.com/comment/42962798
has comment: http://stackoverflow.com/comment/42961378
score: 0
has comment: http://stackoverflow.com/comment/42962014

http://stackoverflow.com/comment/42857005
type: AnswerComment
has text: Aha! Yeah, that solved the issue. As a sidenote, spawn seems to only accept the full command in the `'command', ['arg1', 'arg2']` mode, otherwise it just doesn't work at all.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27173625

http://stackoverflow.com/q/27188292
downvote count: 0
has body: I am trying to perform a script that should run only on Chrome 64-bit version browsers. Is there a way to check using JavaScript if the Chrome version installed on a user's machine is 64-bit or 32-bit? t should be browser-specific, because for example I run a 64-bit OS and a 32-bit version of Chrome. So far I managed to detect if the open browser is Chrome and what version of it using Bowser. But I am still struggling with the 64-bit browser detection.
tagged with: browser-detection
has comment: http://stackoverflow.com/comment/48746273
has comment: http://stackoverflow.com/comment/48579273
has comment: http://stackoverflow.com/comment/48742439
tagged with: google-chrome
type: Question
linked to: http://stackoverflow.com/q/28766423
has answer: http://stackoverflow.com/a/30219347
has comment: http://stackoverflow.com/comment/42862987
tagged with: javascript
upvote count: 13
has comment: http://stackoverflow.com/comment/48746011
tagged with: browser
answer count: 3
has answer: http://stackoverflow.com/a/30309328
has answer: http://stackoverflow.com/a/30220714
favorite count: 0
has comment: http://stackoverflow.com/comment/42864555
linked to: http://stackoverflow.com/q/19877924
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1741933
has title: Detect if Chrome browser installation is 64-bit
score: 13
has comment: http://stackoverflow.com/comment/48742405
tagged with: 32bit-64bit

http://stackoverflow.com/comment/42885768
type: Comment
comment on: http://stackoverflow.com/a/27201120
type: AnswerComment
score: 0
has text: For some reason attr doesn't work for me, getAttribute does, is this the same, because getAttribute doesn't fix my problem

http://stackoverflow.com/q/27246710
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/42969861
score: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42973745
has body: I am trying to use PhantomJS and angular-seo (https://github.com/steeve/angular-seo) to make my app crawlable. As I am not using hashbangs, I've added the following meta tag to my app's header: &lt;meta name="fragment" content="!" /&gt; In my main controller, I trigger $scope.htmlReady when the content is fully loaded: $scope.$on('$viewContentLoaded', function() { $scope.htmlReady(); }); I have loaded the seo module properly and while my server's app listens on port 4000 (I use an express server), I launch phantomJS on port 4040 with the following command: phantomjs --disk-cache=no ./bin/angular-seo-server.js 4040 http://127.0.0.1:4000 If I check how things are working for the homepage with a simple curl 'http://127.0.0.1:4040/?_escaped_fragment_=' I get the correct HTML rendered properly. But if I try a different route like http://127.0.0.1:4040/test?_escaped_fragment_= I only get &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt; while http://127.0.0.1:4000/test works fine. How can I make sure all my pages are indexed and not only my homepage?
has title: Use PhantomJS to make my angular app crawlable
tagged with: angularjs
tagged with: seo
linked to: http://stackoverflow.com/q/16677528
has comment: http://stackoverflow.com/comment/42978303
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42969666
upvote count: 1

http://stackoverflow.com/comment/47943814
has text: @I'm nidhin Do you mean td element? I can't find easy way to get it. If I must do it I think I would use offset() function on .k-event div and find td which has a similar position.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27255537
type: Comment

http://stackoverflow.com/q/27230343
duplicate of: http://stackoverflow.com/q/20279484
tagged with: jquery-boilerplate
tagged with: javascript
tagged with: jquery
answer count: 1
has answer: http://stackoverflow.com/a/27230496
linked to: http://stackoverflow.com/q/26390152
linked to: http://stackoverflow.com/q/20824364
has title: jQuery Boilerplate - Losing Access to "this" Scope
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/20279484
has comment: http://stackoverflow.com/comment/42938061
score: 0
accepted answer: http://stackoverflow.com/a/27230496
has body: I'm trying to write my first plugin using jQuery Boilerplate. The issue I'm having is that I lose access to the this scope as soon as I try to handle an event, due, I assume, to variable shadowing. It seems like would be a common use case for jQuery Boilerplate, so I'm guessing that I'm going about it incorrectly. I found two similar questions here on SO: jQuery plugin object: attached an event handler via .on() and now have a scope issue of this. (the main plugin object) - Has no answer Javascript scoping Issue using JQuery Boilerplate - Doesn't answer my question I've created a minimal sample to demonstrate the issue. HTML One Two Three PLUGIN (function($, window, document, undefined) { 'use strict'; var pluginName = 'elementValueLog', defaults = {}; function Plugin(element, options) { this.element = element; this.$element = $(element); this.settings = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.init(); } $.extend(Plugin.prototype, { init: function() { this.$element.on('click', this.doLog); }, doLog: function() { // HERE: I can't figure out how to access the Plugin "this" scope // I want to be able to use "element", "$element", "settings", etc. console.log(this.$element.val().trim()); } }); $.fn[pluginName] = function(options) { this.each(function() { if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, options)); } }); return this; }; }(jQuery, window, document, undefined)); USE PLUGIN $(document).ready(function() { $('li').elementValueLog(); }); SOLUTION I would have preferred to add this as an answer, but being marked as "duplicate" is preventing that. After trying several methods shown in the answers on the other post, I found a solution. I personally think my question is specific enough to stand on its own, because the "canonical" answer on the other post is quite broad. For browsers that support bind, the init function can be changed like this: init: function() { this…
type: Question

http://stackoverflow.com/a/27171736
answers question: http://stackoverflow.com/q/27171630
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
has body: This issue is because you are doing 1 too many loops. Arrays are 0 indexed so you want to loop up to length - 1. This will then allow you to use i for accessing the array: for(var i = 0; i &lt; dataArray.length; i++) { tbody += '&lt;tr&gt;'; tbody += '&lt;td&gt;' + (i+1) + '&lt;/td&gt;'; tbody += '&lt;td&gt;' + dataArray[i].Device_Name + '&lt;/td&gt;'; tbody += '&lt;td&gt;' + dataArray[i].Device_Id + '&lt;/td&gt;'; tbody += '&lt;/tr&gt;\n'; }
accepted answer of: http://stackoverflow.com/q/27171630

http://stackoverflow.com/a/27240883
has comment: http://stackoverflow.com/comment/42990685
has comment: http://stackoverflow.com/comment/42958362
has body: This is where element.all() + map() would help: var titles = element.all(by.css('.submenu li a')).map(function (elm) { return elm.getText(); }); expect(titles).toBeArrayOfStrings(); expect(titles).toEqual(['find a store', 'clinic']); FYI, here is the relevant feature request: Add map() function to element.all Also see: protractor - how to get the result of an array of promises into another array AngularJS + Protractor sum all row values in repeater
accepted answer of: http://stackoverflow.com/q/27240657
answers question: http://stackoverflow.com/q/27240657
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42958326

http://stackoverflow.com/q/27248145
has comment: http://stackoverflow.com/comment/42971243
accepted answer: http://stackoverflow.com/a/27249248
score: 0
has comment: http://stackoverflow.com/comment/42971019
has comment: http://stackoverflow.com/comment/42971896
has body: I am developing a product form where the user has the option to create several input fields. When I click the button to create a new input, JavaScript return me the new field. But within the JavaScript contains the PHP tags "laravel" and as it turns template code is within double quotes and my code does not work. JavaScript code: //FUNÇÕES PARA PAGINA DE PRODUTOS $(function(){ //CRIANDO CAMPOS DINAMICAMENTE var scntDiv = $('#campos_roupas'); var i = $('#campos_roupas').size() + 1; $('#mais_roupa').live('click', function() { $(' Número:* {{ Form::select("categoria_pai", Variaveis::where("categoria", "=", 1 )->lists("variavel", "id"), "", array("class" => "form-control")) }} Cor:* {{ Form::select("categoria_pai", Variaveis::where("categoria", "=", 2 )->lists("variavel", "id"), "", array("class" => "form-control")) }} Estoque:* {{ Form::text("estoque", Input::old("estoque"), array("class" => "form-control")) }} ').appendTo(scntDiv); i++; return false; }); }); Could inform me as sending it to the PHP without the quotes at the beginning and end?
tagged with: javascript
tagged with: laravel-4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27249248
has comment: http://stackoverflow.com/comment/42972190
type: Question
has comment: http://stackoverflow.com/comment/42972349
has title: JavaScript and Laravel php
has comment: http://stackoverflow.com/comment/42971752
tagged with: php
answer count: 1

http://stackoverflow.com/comment/42989861
type: Comment
comment on: http://stackoverflow.com/a/27257850
type: AnswerComment
score: 0
has text: @jfriend00 Due to hang of my pc, I'm late to explain what I wanted to say, please check my answer to verify what I wanted to comment above...

http://stackoverflow.com/comment/125620746
type: Comment
has text: @Gotham'sReckoning it's been removed
type: AnswerComment
comment on: http://stackoverflow.com/a/28129950
score: 0

http://stackoverflow.com/q/27287734
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43042207
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43042235
answer count: 0
score: 0
type: UnansweredQuestion
has body: I have a page named StockGraph.aspx which has the HTML STOCK QUOTE Type In any Company name in the below Text Box to obtain the current stock value of the corresponding Company Try typing "Apple" Show Quote My angular Controller is defined like this, function StockGraphController($scope) { $scope.showquote = function () { var dur = 365; var stockSymbol = $scope.equitystock.symbol; new Markit.InteractiveChartApi(stockSymbol, dur) } } I have placed the angular function in the Master file. the above angular function calls the Stock api and displays the chart in the div id="chartDemoContainer". This function works fine in a simple standalone aspx file. But when i design the same scenario using the Master ->Child aspx page design, the angular function after retrieving the data, refreshes the page which inturn refresh the Master Page also, hence my graph to be loaded gets lost!!!! because of the master page refresh. Is there a way to stop the master page from being refreshed or any way in the angular directive ?? Please help on the issue??
type: Question
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has title: Prevent Master Page reload in asp.net after Angular JS function call

http://stackoverflow.com/comment/43009815
comment on: http://stackoverflow.com/a/27269410
has text: Thanks for the insight however, the click event is not yet printing out the value into the console and the span messes up the bootstrap grid layout.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27304728
score: 1
answers question: http://stackoverflow.com/q/27303391
has body: Just load the toggle.php url in an invisible webview. This should work. Something like this: webView = (WebView) findViewById(R.id.webView1); webView.loadUrl("http://walialu.com/my/pi/script/url/toggle.php");
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27303391
type: Answer
has comment: http://stackoverflow.com/comment/43152919
downvote count: 0

http://stackoverflow.com/q/27274349
has title: Ctrl + C / Ctrl + V in Google Sheets - how does it work?
has comment: http://stackoverflow.com/comment/43018454
linked to: http://stackoverflow.com/q/27238594
type: Question
duplicate of: http://stackoverflow.com/q/27238594
score: 1
has comment: http://stackoverflow.com/comment/43018052
upvote count: 1
linked to: http://stackoverflow.com/q/400212
tagged with: javascript
favorite count: 0
has body: In the web application I am developing, when users hit Ctrl + C, their screen selection needs to be saved in their local clipboard. I can already detect the Ctrl + C key press, and I already have the data to be copied to the clipboard in a Javascript variable. My question is: how to actually get the data to the clipboard when Ctrl+C is pressed? I am aware of browser limitations regarding clipboard access and of workarounds for this - I already have a Copy icon on the web page that puts the data in the clipboard, using ZeroClipboard. I've noticed that when you select one or more cells in Google Sheets and press Ctrl + C, it actually puts the data directly in your clipboard, but I can't figure out how. Any ideas?
downvote count: 0
has comment: http://stackoverflow.com/comment/43018203
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27203475
has comment: http://stackoverflow.com/comment/42891080
score: 0
has body: You can fix the issue by calling transform only while the window has focus: (function() { var inTab= false; $(window).blur(function() { inTab= false; }); $(window).focus(function() { inTab= true; }); setInterval(function() { if(inTab) { transform($('#img'), getImage()); } }, 1000); })(); Fiddle Click the image to simulate the window being focused. You can then switch between tabs, and the animation will no longer break.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42890183
accepted answer of: http://stackoverflow.com/q/27202511
type: Answer
has comment: http://stackoverflow.com/comment/42890599
answers question: http://stackoverflow.com/q/27202511
has comment: http://stackoverflow.com/comment/42889835

http://stackoverflow.com/comment/43059146
has text: it only outputs the last data :(
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27296862

http://stackoverflow.com/a/27218522
type: Answer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27218244
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27218244
has body: So you're using Stripe's data-stripe attributes but in your Javascript you are selecting the values through css selectors. $('.country') is a call to JQuery that returns JQuery objects representing DOM elements of class country. Your html for your form doesn't use classes for the fields you are trying to reach though, only data-stripe attributes. With the data-stripe attributes, you can pass the whole form to Stripe.bankAccount.createToken() and Stripe will automatically grab the fields it needs. Your javascript would end up looking like this (note where I pass in $form to Stripe.bankAccount.createToken: Stripe.setPublishableKey('pk_test_i2txBI2jUjSQIMoqFz3Fo326'); var stripeResponseHandler = function(status, response) { var $form = $('#inst-form'); if (response.error) { alert("Error"); // Not sure how to get these errors. $form.find('button').prop('disabled', false); } else { var token = response.id; $form.append($('&lt;input type="hidden" name="stripeToken" /&gt;').val(token)); console.log(response); } }; // Now the handler is done, lets use it when the form is submitted. // On form submission execute: jQuery(function($) { $('#inst-form').submit(function(event) { // Get the form object. var $form = $(this); // Disable the submit button to prevent repeated clicks $form.find('button').prop('disabled', true); // Create a token with Stripe Stripe.bankAccount.createToken($form, stripeResponseHandler); // Prevent the form from submitting with the default action return false; }); });
score: 6

http://stackoverflow.com/a/27311819
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/43084435
accepted answer of: http://stackoverflow.com/q/27311595
answers question: http://stackoverflow.com/q/27311595
has body: Replace var totalPxl = this.pathArray[i].getTotalLength(); by totalPxl += this.pathArray[i].getTotalLength(); If you just want to print the total, move the console.log statement outside and below the for loop.
type: Answer

http://stackoverflow.com/comment/42929612
type: QuestionComment
comment on: http://stackoverflow.com/q/27219418
score: 0
has text: If you would like to make frequent use of SO, I advise against taking that view - it is much better to be philosophical about downvotes, accept the occasional one as a fact of life, and learn from their message if you can. In this case, it's worth noting that subjective questions are [specifically discouraged](https://stackoverflow.com/help/dont-ask).
type: Comment

http://stackoverflow.com/q/27220639
answer count: 1
has body: Lets say I have a really heavy piece of computation, it involves two nested for loops goings over an array of size 1000*1000 The calculation takes about 1 minute to do. I have a bunch of other stuff going on in the webpage especially user interaction. ( on-click, on-scroll, animation, etc ) Now I need to do the 60s calculation at some point. I can for example do: setTimeout TwoForLoops,0 this will defer the function call to until all the other on-click,on-scroll,etc events are cleared. however as the calculation takes 1 Minute, the user might trigger some event during that time. do you think if I just do the following I will prevent JavaScript from hanging. Assuming that heavyComputation takes about 0.06 millisecond to computate. # _.map is from underscore@ library, basically does a for loop # HeavyComputation is a slow function with lots of operations made for my app NonBlockMap = (x,f)-&gt; setTimeout (-&gt;_.map x,f),0 NonBlockHeavyComputation = (x) -&gt; setTimeout (-&gt; HeavyComputation(x)),0 TwoForLoops = (ArrayOfArray) -&gt; SecondLoop = (element) -&gt; NonBlockHeavyComputation element FirstLoop = (array) -&gt; NonBlockMap array, SecondLoop return NonBlockMap ArrayOfArray,FirstLoop This would essentially mean that the maximum javascript will hang for is about 0.06 millisecond but I am not so sure if this will work. WhatDo ?
tagged with: asynchronous
favorite count: 0
type: AnsweredQuestion
downvote count: 0
tagged with: underscore.js
score: 1
tagged with: coffeescript
has title: Deferring all heavy computation using setTimeout
type: Question
tagged with: nonblocking
tagged with: javascript
has answer: http://stackoverflow.com/a/27222272
accepted answer: http://stackoverflow.com/a/27222272
has comment: http://stackoverflow.com/comment/42921273
upvote count: 1

http://stackoverflow.com/comment/42849013
has text: This code has been revised to address the question exactly. Earlier I was generating permutations of the data rather than permuted combinations.
comment on: http://stackoverflow.com/a/27180041
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27290374
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43049649
has comment: http://stackoverflow.com/comment/43047124
answers question: http://stackoverflow.com/q/27278157
has comment: http://stackoverflow.com/comment/43049170
has comment: http://stackoverflow.com/comment/43052228
type: Answer
accepted answer of: http://stackoverflow.com/q/27278157
has comment: http://stackoverflow.com/comment/43099731
has body: AFAIK the syntax for the ngInclude directive is or
has comment: http://stackoverflow.com/comment/43047646
has comment: http://stackoverflow.com/comment/43081142
score: 0
has comment: http://stackoverflow.com/comment/43047272

http://stackoverflow.com/a/27209691
score: 0
type: Answer
has body: From your code, it doesn't look there should be a delay. Can you post a JSFiddle to show this problem in action? To address the latter concern, you want to be using the JQuery stop() method to stop the animation by cleaning the animation queue. This can be done, like so: $(this).stop().animate({ width: 240 }, 500); Check out this JSFiddle.
answers question: http://stackoverflow.com/q/27209614

http://stackoverflow.com/comment/83443383
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/42493241
type: Comment
has text: Why do you test end to end of your code with phantomjs? Also notice that Protractor has been used by many people through the CI and does not need a Windows VM. I have done it so many times on Linux boxes. You just need xvfb to run it.

http://stackoverflow.com/comment/43103817
score: 0
type: Comment
type: QuestionComment
has text: @Ian do you mind putting it as an answer so that I could mark it as a solution?
comment on: http://stackoverflow.com/q/27313363

http://stackoverflow.com/q/27161608
tagged with: javascript
has answer: http://stackoverflow.com/a/27161811
has title: Order in which JavaScript reads code
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27161646
has comment: http://stackoverflow.com/comment/42816777
type: AnsweredQuestion
has body: I am just wondering in what order does JavaScript executes code. From what I understand, Javascript doesn't go from top to bottom. I would just like to know what it reads first and why. Also, I have been experimenting with js and noticed that if I write a function: $('#closeMenu').click(function() { $('#menu').hide(); }); It will run at anytime. So, am I right to conclude that if I write a function to open a menu outside of a function, anytime the user clicks on the button to open a menu, the menu will open? Does js re-use blocks of codes if the event is called by the user? Thank you for the answers!
has comment: http://stackoverflow.com/comment/42816785
has answer: http://stackoverflow.com/a/27161646
type: Question
has comment: http://stackoverflow.com/comment/42816972
possible better answer: http://stackoverflow.com/a/27161811

http://stackoverflow.com/comment/70166215
has text: For security reasons, I'd be very careful about storing a user's password unencrypted in Local Storage. Username is probably fine, but password seems extremely risky. It'd be especially bad if the site is being served over HTTP rather than HTTPS because the password could be stolen by a MITM injecting extra JS into the page.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27270310

http://stackoverflow.com/a/27155642
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/76309284
has body: $.each loops over the result of the selector, which in your attempt was the container element, not its children. You want to adjust the selector to find the children img tags, build up an array of their titles and finally join the array together with commas or whatever separator you like: var combined = []; $(".deal img").each(function() { combined.push($(this).attr('title')); }); var combinedStr = combined.join(", "); $("#title").text("Above: " + combinedStr); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="deal"&gt; &lt;img src="http://lorempixel.com/60/40" alt="Xbox One 500 GB Black box art/packaging" title="Xbox One 500 GB Black" height="60" width="40" class="console" /&gt; &lt;img src="http://lorempixel.com/60/40" alt="Additional Controller box art/packaging" title="Additional Controller" height="60" width="40" /&gt; &lt;img src="http://lorempixel.com/60/40" alt="FIFA 15 box art/packaging" title="FIFA 15" height="60" width="40" /&gt; &lt;/div&gt; &lt;div id="title"&gt;&lt;/div&gt;
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27155463

http://stackoverflow.com/comment/42832645
score: 0
type: Comment
type: QuestionComment
has text: yes i am talking about the Default browser of Android. And my Android Version is 4.1.2 .
comment on: http://stackoverflow.com/q/27164328

http://stackoverflow.com/comment/43030130
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27280669
has text: No no .htaccess rules have been set. The URL to it is http://chiveandroidtaylor.org.uk/includes/header.php/ It does the notifications in the corner, it would usually show numbers in the red bubbles but they don't work.

http://stackoverflow.com/comment/42862326
type: Comment
has text: sweet. didnt think of adding elements like that. Cheers dude, ill have a go at it now :)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27187897

http://stackoverflow.com/comment/43080716
comment on: http://stackoverflow.com/q/27309561
has text: There is no way to 100% restrict user action in a browser. what if the user disables javascript? You need to take action at your backend(server side) for such actions.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27295479
tagged with: angularjs
tagged with: momentjs
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: angular-moment
has body: I have a page with angular-moment on it. Upon page rendering angular-moment is working. Using But when I append new html.. it's not working var date = ''; angular.element('#here').append(date); Did I missed something? Please help... Thanks, Kurai
type: Question
tagged with: javascript
has title: angular-moment not working via dom injection
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27303663
accepted answer: http://stackoverflow.com/a/27303663
favorite count: 0
has comment: http://stackoverflow.com/comment/43056217

http://stackoverflow.com/comment/85466294
has text: Please explain what you did editing your answer, avoid only code answer and take a look to : https://stackoverflow.com/help/how-to-answer
score: 1
comment on: http://stackoverflow.com/a/49230195
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27296669
answers question: http://stackoverflow.com/q/27296268
type: Answer
has body: When you click on a link or .sub-menu inside of tag you're also clicking the li itself (have a look at example http://jsfiddle.net/op02x1qn/ and try clicking a link) So one of the options is to get click event of exactly the item you want clicked. You can wrap your text inside of li like this (and style it css to be full width of parent element etc.): NFL Superbowl And JS: $('.mainli-text').on('click',function(e){ document.location.href = $(this).data('url'); }); So now when you click on something other than that new span.mainli-text inside of parent li it will have it's own click event.
score: 0

http://stackoverflow.com/comment/43095847
has text: Here is the live demo of fancy menu: http://insicdesigns.com/demo/css3/exp1/index.html This code works fine, if active class is added to li. But I want it to be on Anchor tag. If I add this, the animation doesn't work.
type: AnswerComment
comment on: http://stackoverflow.com/a/27312171
type: Comment
score: 0

http://stackoverflow.com/q/27233866
type: UnansweredQuestion
has body: I'm trying to update the src attribute of &lt;img&gt; tags so that the user can insert images to the code from our asset manager. Consider this HTML: &lt;div&gt; &lt;img src="some_image_already_defined.jpg" alt="Some Image" /&gt; &lt;/div&gt; So if the user places the cursor to any position inside the img tag, I'll replace "some_image_already_defined.jpg" with the new image user selected. The simplified version of code is smt. like that: var image_path = 'some_new_image.jpg'; $('#insert-image').click(function() { var cur = codeMirrorHtml.getCursor(); var token = codeMirrorHtml.getTokenAt(cur); var inner = CodeMirror.innerMode(codeMirrorHtml.getMode(), token.state); if (inner.state.tagName == 'img') { var srcPosition = findTheSrcAttributePosition(); // How do I do this? codeMirrorHtml.setSelection(srcPosition.anchor, srcPosition.head); codeMirrorHtml.replaceSelection('src="' + image_path + '"'); } }); So I want to traverse the token somehow but I couldn't find a way to do it.
tagged with: codemirror
has title: Edit src of img with codemirror
has answer: http://stackoverflow.com/a/27557403
type: Question
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/q/27162146
tagged with: iron-router
type: Question
tagged with: node.js
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has body: I'm trying to push new data on to my clients array each time the loadMoreClients method is called. The publication is expecting this back_to parameter and knows how to handle it. My problem is that I can't seem to call these methods from my Template helpers . I logged Iron and Iron.controller to the console and both of those exist and are showing me what I expected to see. I just can't seem to find current docs or examples of how to access Iron.controller() methods/properties from my Template helpers Here is my RouteController code: ClientController = ApplicationController.extend({ action : function(){ this.render(Router.current().route.getName()) }, data : function(){ if( this.params._id ){ return Clients.findOne({ _id:this.params._id }) } }, waitOn : function(){ return [ Meteor.subscribe('directory'), Meteor.subscribe('clients') ] }, loadMoreClients : function(){ this.months_back += 3 this.back_to = moment().subtract(this.months_back,'months').startOf('day') this.clients.push(Meteor.subscribe('clients', {back_to:this.back_to, skip:this.clients.length})) }, loadAllClients : function(){ this.clients.push(Meteor.subscribe('clients', {back_to:this.start_of_time, skip:this.clients.length})) }, // we'll use these properties to 'load more' client data clients : [], back_to : moment().subtract(3,'months').startOf('day'), months_back : 3, start_of_time : moment(new Date(0)) }) Here is my helpers code: Template.client_list.helpers({ clients : function(){ var clients = [] Iron.controller().clients.forEach(function(client){ // ... some stuff here... clients.push(client) }) return clients }, earliestClientLoaded : function(){ var controller = Iron.controller() return controller.clients[controller.clients.length - 1].createdAt } }) Template.client_list.events({ 'click .btn-load-more' : function(e){ e.preventDefault() Iron.controller().loadMoreClients() }, 'click .btn-load-all' : function(e){ e.preventDefault() Iron.controller().loadAllClients() } }) I'm getting undefined functi…
has answer: http://stackoverflow.com/a/27220296
tagged with: meteor
tagged with: meteor-blaze
has title: call method in Iron-Router RouteController from Template.tmpl.helpers() not working

http://stackoverflow.com/q/27231563
has answer: http://stackoverflow.com/a/27235306
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: gulp
score: 4
favorite count: 0
tagged with: css
type: UnansweredQuestion
tagged with: gulp-less
has title: How do I create a sourcemap back to the original .less files from a minified CSS file?
tagged with: source-maps
has body: I am working with Gulp.js, and I am stumped trying to get gulp-sourcemaps to point all the way back at the original less files, after I do a minification step. Since gulp-minify-css doesn't support sourcemaps, I am using postcss &amp; csswring. Ideally, I'd like to end up with: ss.css (unminified) ss.css.map (pointing from ss.css back to original .less files) ss.min.css (minified) ss.min.css.map (pointing from ss.min.css back to original .less files) For now, I've stopped trying to output both the minified and non-minified versions, but even getting the minified version to point back to the original .less files doesn't seem to work. Without doing a minification step, my .map file works great and looks like this: {"version":3,"sources":["ss.less"],"names":[],"mappings":";AAEA;... When I do the minification step, it changes the map to point the minified file back at the compiled CSS, not the original Less files: {"version":3,"sources":["ss-min.css"],"names":[],"mappings":";AAEA;... Here's my gulpfile.js: var csswring = require('csswring'), gulp = require('gulp'), less = require('gulp-less'), path = require('path'), postcss = require('gulp-postcss'), rename = require('gulp-rename'), sourcemaps = require('gulp-sourcemaps'); var sourceLess = path.join(__dirname, 'app', 'assets', 'less'); var targetCss = path.join(__dirname, 'app', 'assets', 'css'); // Compile Less to CSS and then Minify, Include Sourcemaps gulp.task('less-and-minify-css', function () { return gulp.src(lessFiles) .pipe(sourcemaps.init()) .pipe(less()) .pipe(rename({suffix: "-min"})) .pipe(postcss([csswring])) .pipe(sourcemaps.write('.')) .pipe(gulp.dest(targetCss)); }); As always, any thoughts appreciated! I have experimented with using a filter to only rename the generated .css files and nothing else, but that doesn't seem to fix the core issue.
type: Question
upvote count: 4

http://stackoverflow.com/a/27223032
has comment: http://stackoverflow.com/comment/42929685
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/27221733
answers question: http://stackoverflow.com/q/27221733
has body: It is needed to make a clone of the menu in order to keep the layout unchanged. And then operate on the clone. DEMO http://codepen.io/anon/pen/dPYXLO var menuClone = $(); if($(this).scrollTop() &gt; pos.top+menu.offset().top-menu.height() &amp;&amp; menuClone.length==0){ // ^^^^^^^^^^^^^^^^^^^ menuClone = menu.clone().appendTo('body').removeClass('menudefault').addClass('menufixed').hide().fadeIn('400'); // ^^^^^^^^^^^^^^^^^^^^^^^^^ } else if($(this).scrollTop() &lt;= pos.top &amp;&amp; menuClone.length&gt;0){ // ^^^^^^^^^^^^^^^^^^^ menuClone.fadeOut('100', function(){ menuClone.remove(); menuClone = $(); }); } EDIT I suggest to get rid of menuClone.fadeOut(), just remove the clone menuClone.remove(); menuClone = $();
has comment: http://stackoverflow.com/comment/42932298
type: AcceptedAnswer

node.js
tags question: http://stackoverflow.com/q/27154475
tags question: http://stackoverflow.com/q/27255901
tags question: http://stackoverflow.com/q/27244074
tags question: http://stackoverflow.com/q/27235796
tags question: http://stackoverflow.com/q/27173043
tags question: http://stackoverflow.com/q/27164008
tags question: http://stackoverflow.com/q/27238503
tags question: http://stackoverflow.com/q/27238231
tags question: http://stackoverflow.com/q/27269766
tags question: http://stackoverflow.com/q/27210449
tags question: http://stackoverflow.com/q/27295879
tags question: http://stackoverflow.com/q/27308965
tags question: http://stackoverflow.com/q/27232372
tags question: http://stackoverflow.com/q/27164404
tags question: http://stackoverflow.com/q/27212023
tags question: http://stackoverflow.com/q/27255551
tags question: http://stackoverflow.com/q/27309412
tags question: http://stackoverflow.com/q/27174971
tags question: http://stackoverflow.com/q/27169873
tags question: http://stackoverflow.com/q/27190525
tags question: http://stackoverflow.com/q/27239780
tags question: http://stackoverflow.com/q/27228852
tags question: http://stackoverflow.com/q/27176767
tags question: http://stackoverflow.com/q/27180846
tags question: http://stackoverflow.com/q/27155945
tags question: http://stackoverflow.com/q/27290460
tags question: http://stackoverflow.com/q/27249802
tags question: http://stackoverflow.com/q/27252979
tags question: http://stackoverflow.com/q/27254958
tags question: http://stackoverflow.com/q/27291980
tags question: http://stackoverflow.com/q/27304542
tags question: http://stackoverflow.com/q/27159489
tags question: http://stackoverflow.com/q/27290354
tags question: http://stackoverflow.com/q/27209369
tags question: http://stackoverflow.com/q/27278863
tags question: http://stackoverflow.com/q/27224959
tags question: http://stackoverflow.com/q/27230365
tags question: http://stackoverflow.com/q/27284461
tags question: http://stackoverflow.com/q/27209552
tags question: http://stackoverflow.com/q/27240524
tags question: http://stackoverflow.com/q/27244564
tags question: http://stackoverflow.com/q/27299061
tags question: http://stackoverflow.com/q/27191438
tags question: http://stackoverflow.com/q/27242676
tags question: http://stackoverflow.com/q/27267263
tags question: http://stackoverflow.com/q/27281398
tags question: http://stackoverflow.com/q/27292521
tags question: http://stackoverflow.com/q/27184558
tags question: http://stackoverflow.com/q/27276944
tags question: http://stackoverflow.com/q/27165569
tags question: http://stackoverflow.com/q/27308367
tags question: http://stackoverflow.com/q/27275458
tags question: http://stackoverflow.com/q/27230944
tags question: http://stackoverflow.com/q/27235982
tags question: http://stackoverflow.com/q/27159179
tags question: http://stackoverflow.com/q/27219964
tags question: http://stackoverflow.com/q/27219418
tags question: http://stackoverflow.com/q/27295377
tags question: http://stackoverflow.com/q/27251898
tags question: http://stackoverflow.com/q/27237744
tags question: http://stackoverflow.com/q/27302262
tags question: http://stackoverflow.com/q/27197494
tags question: http://stackoverflow.com/q/27287218
tags question: http://stackoverflow.com/q/27271020
tags question: http://stackoverflow.com/q/27289858
tags question: http://stackoverflow.com/q/27260662
tags question: http://stackoverflow.com/q/27195833
tags question: http://stackoverflow.com/q/27253597
tags question: http://stackoverflow.com/q/27216742
tags question: http://stackoverflow.com/q/27290417
tags question: http://stackoverflow.com/q/27243661
tags question: http://stackoverflow.com/q/27270176
tags question: http://stackoverflow.com/q/27304646
tags question: http://stackoverflow.com/q/27153254
tags question: http://stackoverflow.com/q/27305626
tags question: http://stackoverflow.com/q/27168144
tags question: http://stackoverflow.com/q/27174366
tags question: http://stackoverflow.com/q/27178722
tags question: http://stackoverflow.com/q/27155746
tags question: http://stackoverflow.com/q/27267085

http://stackoverflow.com/a/27250681
type: Answer
answers question: http://stackoverflow.com/q/27244935
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27244935
score: 1
has body: This was the result of implementing nesting promise chains: var loadMemberInfo = function( userId ) { return membersService .getMember(community.url, community.user.api_key, community.user.auth_token, $stateParams.userId) .then(function(data) { $scope.member = data.result; }); }, getConversationFrom = function() { return messagesService .getConversation(community.url, community.user.api_key, community.user.auth_token, community.user.user_info.guid, $stateParams.userId, "from") .then(function(cf) { if(cf.data.result["entities"].length &gt; 0) { messages = messages.concat(cf.data.result["entities"]); subject = "Re: "+cf.data.result["entities"][cf.data.result["entities"].length-1].title; } $scope.messageData.subject = subject; }); }, getConversationTo = function() { messagesService .getConversation(community.url, community.user.api_key, community.user.auth_token, community.user.user_info.guid, $stateParams.userId, "to") .then(function(ct) { log = []; if(ct.data.result["entities"].length &gt; 0) { angular.forEach(ct.data.result["entities"], function(v, k) { v.owner_guid = $stateParams.userId; log.push(v); }, log); messages = messages.concat(log); } //order array messages = messages.sort(function(a,b) { return a.time_created - b.time_created } ); var log = []; var count = 0; angular.forEach(messages, function(v, k) { messages_reorder.push(v); }, log); }); }, orderFullConversation = function() { $ionicLoading.hide(); console.log(messages); if(messages_reorder.length &gt; 5) { var messages_partial = messages_reorder.slice(messages_reorder.length-5,messages_reorder.length); } else { var messages_partial = messages_reorder; } $scope.messages = messages_partial; $scope.community = community; }; loadMemberInfo( $stateParams.userId ) .then( getConversationFrom ) .then( getConversationTo ) .then( orderFullConversation ); More details here
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43030669
type: QuestionComment
has text: `if(hasFancybox) { /*use FancyBox*/ }`?
score: 0
comment on: http://stackoverflow.com/q/27280991
type: Comment

http://stackoverflow.com/comment/42823571
comment on: http://stackoverflow.com/q/27165738
score: 0
type: Comment
type: QuestionComment
has text: If you have a look at https://stackoverflow.com/editing-help#code, you don't have to use pastebin anymore when asking a question here.

http://stackoverflow.com/comment/42839982
type: Comment
type: QuestionComment
has text: @adeneo http://jsfiddle.net/hbzjctww/3/ In my code they are defined so. And your example works wrong(actually my example works wrong)=(
score: 0
comment on: http://stackoverflow.com/q/27174803

http://stackoverflow.com/comment/42905911
type: AnswerComment
comment on: http://stackoverflow.com/a/27212478
has text: It should be better to keep one function for both array and straight object and the iterate through through the array calling the function.
type: Comment
score: 0

http://stackoverflow.com/q/27202823
has title: How to create a smart navigation with array in PHP or Javascript for previous and next?
has answer: http://stackoverflow.com/a/27202956
has comment: http://stackoverflow.com/comment/42888555
has answer: http://stackoverflow.com/a/27202913
type: UnansweredQuestion
upvote count: 1
type: Question
has body: I have a list of filenames aeyrt.php nviorf.php vyutkd.php oiuybd.php poiuuy.php Suppose that the current opened page is vyutkd.php I have two arrows &lt; and &gt; My question is how using PHP or Javascript the &lt; will link to nviorf.php and the &gt; to oiuybd.php ? The same scenario goes if the current page is the first one. The &lt; button should go to the last of the list. Thank you
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42888563
tagged with: php

http://stackoverflow.com/q/27250615
score: 0
has answer: http://stackoverflow.com/a/27250997
accepted answer: http://stackoverflow.com/a/27250997
answer count: 1
has body: So I have a small problem. I need to store specific information(a description and date) by using JSON. the current Javascript I have is: var main = function () { var dates = {}; var addCommentFromInputBox = function () { var $newcomment if ($(".comment-input input").val() !== "") { $new_comment = $("&lt;p&gt;").text($(".comment-input input").val()); if ($(".date-input input").val() !== "") { $new_date = $("&lt;p&gt;").text($(".date-input input").val()); } else { $new_date = $("&lt;p&gt;").text("indetermined"); } $new_date.hide(); $new_comment.hide(); $(".comments").append($new_comment); $(".date").append($new_date); $new_comment.fadeIn(); $new_date.fadeIn(); $(".comment-input input").val(""); $(".date-input input").val(""); } else { window.alert("Please fill in some text"); } }; $(".comment-input button").on("click", function (event) { addCommentFromInputBox(); }); $(".comment-input input").on("keypress", function (event) { if (event.keyCode == 13) { addCommentFromInputBox(); } }); $(".date-input button").on("click", function (event) { addCommentFromInputBox(); }); $(".date-input input").on("keypress", function (event) { if (event.keyCode == 13) { addCommentFromInputBox(); } }); }; $(document).ready(main); And now I need to store the created object to a server. I'm wondering what the best way to do this is. Thanks for the help!
has comment: http://stackoverflow.com/comment/42975392
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: using json to store created 2 var items
type: Question
tagged with: javascript

http://stackoverflow.com/q/27309417
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/14529358
has answer: http://stackoverflow.com/a/27309874
linked to: http://stackoverflow.com/q/13761222
tagged with: anchor
type: AnsweredQuestion
has title: Open file from shared path in browser
linked to: http://stackoverflow.com/q/26859269
tagged with: jqgrid
type: Question
accepted answer: http://stackoverflow.com/a/27309874
has body: I have a shared path for a PDF file. if i paste the path in address bar,the file opens in all browser perfectly. Below code working fine in IE 8, but not in Chrome and Firefox Code: function openPDF(file) { window.open(file, '_blank'); } function linkFormatter(cellvalue, options, rowObject) { if ($.trim(cellvalue) == "" || cellvalue == null) return $.trim(cellvalue); else return '&lt;a href="#" onclick="openPDF(\'file:' + rowObject["URL"].replace(/\\/g, "/") + cellvalue + '\')" &gt;' + cellvalue + '&lt;/a&gt;'; } I am using this code in JQgrid to make link column. Kindly help on this to make that working in all browsers.
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42958794
type: QuestionComment
has text: What you are seeing is a limitation of `CanvasRenderer` due to how it handles depth sorting. There are no "distorted normals".
score: 0
comment on: http://stackoverflow.com/q/27187512
type: Comment

http://stackoverflow.com/comment/43094336
type: QuestionComment
comment on: http://stackoverflow.com/q/27304976
score: 0
has text: https://developers.google.com/maps/faq#geocoder_differences
type: Comment

http://stackoverflow.com/a/27256715
answers question: http://stackoverflow.com/q/27256637
score: 1
has comment: http://stackoverflow.com/comment/42987135
downvote count: 0
has body: Use and style it as button: Button 1 Button 2 and add css to hide the input[type="radio"]. Not everything needs Angular.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42987186

http://stackoverflow.com/comment/42910859
comment on: http://stackoverflow.com/a/27214015
has text: Will do. Thanks again for your time, I'll keep messing around with it.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43021123
type: Comment
has text: I see what you mean. So is there a way to call the user_brands function inside remaining_brands? Or something along those lines.
comment on: http://stackoverflow.com/q/27275903
score: 0
type: QuestionComment

http://stackoverflow.com/q/27154834
has title: Getting 404 for PUT and DELETE request on IIS 7.5 server 2008
answer count: 2
has comment: http://stackoverflow.com/comment/42804509
tagged with: javascript
has comment: http://stackoverflow.com/comment/42805349
has comment: http://stackoverflow.com/comment/42805253
score: 0
has answer: http://stackoverflow.com/a/27155898
has comment: http://stackoverflow.com/comment/42804891
has answer: http://stackoverflow.com/a/27156438
has comment: http://stackoverflow.com/comment/42805623
type: UnansweredQuestion
has body: It's been several days I'm fighting to solve the PUT,DELETE issues in my web app. I'm using REST server (php) Windows Server 2008 R2 IIS 7.5 My server is a dedicated server hosted at contabo company in germany Client side using js (sencha touch) GET,POST works fine my domain and my database on the same server, I have tried many suggestion using the net: Enable verbs in "Handler Mappings" Webdav not installed Create web.config: &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;configuration&gt; &lt;system.webServer&gt; &lt;httpProtocol&gt; &lt;customHeaders&gt; &lt;add name="Access-Control-Allow-Origin" value="http://example.com" /&gt; &lt;add name="Access-Control-Allow-Methods" value="GET, POST, DELETE, PUT, OPTIONS" /&gt; &lt;add name="Access-Control-Allow-Credentials" value="true" /&gt; &lt;add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept,*" /&gt; &lt;add name="Access-Control-Max-Age" value="1000" /&gt; &lt;/customHeaders&gt; &lt;/httpProtocol&gt; &lt;/system.webServer&gt; &lt;/configuration&gt; I also tryied to medify the: 'applicationHost.config' (C:\Windows\System32\inetsrv\config): &lt;add name="PHP_via_FastCGI" path="*.php" verb="GET,HEAD,PUT,DELETE,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.6\php-cgi.exe" resourceType="Either" /&gt; &lt;add name="PHP53_via_FastCGI" path="*.php" verb="GET,HEAD,PUT,DELETE,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" resourceType="Either" /&gt; &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" /&gt; but nothing :-( I also have laptop with win7 and IIS 7.5 and no problem it's working great. I just don't know how to fix it in my server? Thank you for advice
tagged with: iis
tagged with: php
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/42805483

http://stackoverflow.com/q/27253034
tagged with: javascript
has body: From JSLint.com: JavaScript uses a C-like syntax which requires the use of semicolons to delimit certain statements. JavaScript attempts to make those semicolons optional with a semicolon insertion mechanism. This is dangerous because it can mask errors. Like C, JavaScript has ++ and -- and ( operators which can be prefixes or suffixes. The disambiguation is done by the semicolon. In JavaScript, a linefeed can be whitespace or it can act as a semicolon. This replaces one ambiguity with another. JSLint expects that every statement be followed by ; except for for, function, if, switch, try, and while. JSLint does not expect to see unnecessary semicolons or the empty statement. So a good practice is: var one = 'something'; var two = 'other thing'; vs: var one = 'something' , two = 'other thing'; When it comes to method chaining, Air BnB's Style Guide - under the Whitespace Section suggests using indentation for method chains. // bad $('#items').find('.selected').highlight().end().find('.open').updateCount(); // good $('#items') .find('.selected') .highlight() .end() .find('.open') .updateCount(); // bad var leds = stage.selectAll('.led').data(data).enter().append('svg:svg').class('led', true) .attr('width', (radius + margin) * 2).append('svg:g') .attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')') .call(tron.led); // good var leds = stage.selectAll('.led') .data(data) .enter().append('svg:svg') .class('led', true) .attr('width', (radius + margin) * 2) .append('svg:g') .attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')') .call(tron.led); Can this sort of indentation causes issues when Javascript goes to insert semicolons?
has title: Javascript - Can indentation on method chaining cause issues with semicolons?
accepted answer: http://stackoverflow.com/a/27253063
favorite count: 0
downvote count: 1
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27253063
has answer: http://stackoverflow.com/a/27253059
has comment: http://stackoverflow.com/comment/42980533
type: Question
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/42980475
possible better answer: http://stackoverflow.com/a/27253059

http://stackoverflow.com/comment/42867868
comment on: http://stackoverflow.com/a/27190529
type: AnswerComment
score: 0
type: Comment
has text: I did not know I needed to add a function too. I thought angular would look at the property IsActive of my products. I'm trying that, thx.

http://stackoverflow.com/q/27204382
has title: getting gmail Contacts
tagged with: google-oauth
score: 0
answer count: 1
tagged with: google-plus
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27216665
has body: I am trying to get g mail contacts ,with oauth google plus api javascript i am to get his profile, but unfortunately i am not able to get all email of contacts,but i mention every thing correct in scope and all, can any one suggest me how can i get gmail contacts. I am using below js : https://apis.google.com/js/client.js i wrote bellow code to get contact emails var authParams = gapi.auth.getToken(); // from Google oAuth authParams.alt = 'json'; $.ajax({ url: 'https://www.google.com/m8/feeds/contacts/default/full', dataType: 'jsonp', data: authParams, success: function(text) { alert("text?????????"+JSON.stringify(text.feed)); } });
type: Question

http://stackoverflow.com/q/27214409
has body: Can any one please suggest me a idea for the achieving below pagination. 1 2 3 4 5 next&gt;&gt; suppose if you are clicking "next>>" it should show next set of pagination like below 6 7 8 9 10 next&gt;&gt; and control should be in 6th page scenario: 1 2 3 4 5 next&gt;&gt; if we are in any of the page and clicking next&gt;&gt; should go to 6th page i.e next set's 1st page ex: if we are in 2nd page and next&gt;&gt; should go to 6th page or 3rd page next&gt;&gt; go to 6th page?? Thanks in advance.
answer count: 1
type: UnansweredQuestion
tagged with: demandware
has answer: http://stackoverflow.com/a/31805388
tagged with: java
score: 0
type: Question
tagged with: javascript
has title: Pagination logic
has comment: http://stackoverflow.com/comment/42908940

http://stackoverflow.com/comment/42806176
comment on: http://stackoverflow.com/a/27155948
type: Comment
has text: "alter the response object on the server to include the newly-created object's id" - I already do this, as shown in the second code snippet above. I thought that Angular automatically updates the object with the server's response?
score: 0
type: AnswerComment

http://stackoverflow.com/a/27158754
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27158686
has body: The following two lines: sessionStorage.setItem("unArray", JSON.stringify("bob", "sam")); sessionStorage.setItem("pwArray", JSON.stringify("lol", "jk")); are not using the JSON.stringify function correctly. They should be: sessionStorage.setItem("unArray", JSON.stringify(["bob", "sam"])); sessionStorage.setItem("pwArray", JSON.stringify(["lol", "jk"])); See the following link for reference: Mozilla Developer Network. Per the documentation, the JSON.stringify parameters are defined as the following: Syntax JSON.stringify(value[, replacer [, space]]) Parameters value - The value to convert to a JSON string. replacer (Optional) - If a function, transforms values and properties encountered while stringifying; if an array, specifies the set of properties included in objects in the final string. A detailed description of the replacer function is provided in the JavaScript guide article Using native JSON. space (Optional) - Causes the resulting string to be pretty-printed.
downvote count: 0

http://stackoverflow.com/a/27250882
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27250816
upvote count: 2
has body: That is because you defined the "grades" in resolve as "items", not grades: resolve: { items: function () { return $scope.grades; }, index: function (){ return index; } } Make it the following and it will work: resolve: { grades: function () { return $scope.grades; }, index: function (){ return index; } }

http://stackoverflow.com/comment/42815769
comment on: http://stackoverflow.com/a/27156212
has text: Does the job for me! I've updated the question above to show the (slightly reworked) solution. Many many thanks, I was bashing my head against the wall on this one.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42861253
type: Comment
comment on: http://stackoverflow.com/q/27187360
type: QuestionComment
has text: Dupe of http://stackoverflow.com/questions/2024486/is-there-an-easy-way-to-reload-css-without-reloading-the-page
score: 0

http://stackoverflow.com/comment/42916222
type: QuestionComment
has text: can you show the code for `renderPlaceList` please?
comment on: http://stackoverflow.com/q/27218419
score: 0
type: Comment

http://stackoverflow.com/comment/42907851
type: AnswerComment
has text: function selectDataset() { if (document.getElementById("rb1").checked) { chart.dataProvider = AmCharts.loadJSON('data.php'); chart.validateData(); } }
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27213642

http://stackoverflow.com/comment/42940748
has text: @Teemu it sounds right, but there are examples where it sounds true (i.e. calculating a total for an unsigned number)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27231874

http://stackoverflow.com/a/27224754
answers question: http://stackoverflow.com/q/27223856
type: AcceptedAnswer
downvote count: 0
has body: I found a workaround to hardcode wait time until the map-canvas element is created and it seems no other way Template.dispMap.rendered = function(){ function drawCanvas(){ if($('#map-canvas').length){ console.info("map-canvas added to the dom"); $('#map-canvas').ready(gmap.initialize()); }else { console.info("wait for map-canvas to be ready"); setTimeout(drawCanvas, 500); } } drawCanvas(); }
accepted answer of: http://stackoverflow.com/q/27223856
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/27277716
type: Answer
score: 1
upvote count: 1
has body: var numbers = [156,845,34,849,5,48,54,8,879]; var indexes=[]; numbers.map(function(num,index){ if(num &lt; 10) indexes.push(index); }) console.log(indexes)
downvote count: 0
answers question: http://stackoverflow.com/q/27277649

http://stackoverflow.com/a/27184823
downvote count: 0
score: 1
has body: This answer doesn't solve the problem but will help a little bit and is too much for a comment. I tested the plugin jquery.cluetip with jquery-1.11.1 in Firefox 33 on Windows 7 / 64 with this simple setup: CSS: #tipElem.highlight {border: 10px solid blue;} JS: // on hover cluetip adds class 'highlight' to the element $("#tipElem").cluetip({hoverClass: 'highlight'}); // additional event listener $("#tipElem").on('mouseenter', function(ev) {console.log(ev);}); // trigger 'mouseenter' without defining any event params window.setTimeout(function() {$("#tipElem").mouseenter();}, 3000); cluetip injects some elements into the html, one of them has the id cluetip. By default they are display: none;. With Firebug opened following happens: When mouse enters: 1) The border is applied, so the plugin works. 2) An error is thrown inside jQuery's event system. 3) The #cluetip stays display: none; When mouse leaves: 1) the border is removed. 2) The error is thrown inside jQuery. After 3 sec: 1) The border is applied. 2) The error is thrown. 3) The event isn't logged. Without Firebug (or with Firefox' own developer tools) all steps works as expected. Result: 1) The plugin can be triggered by a synthetic mouseenter even without any event parameters defined. 2) The plugins broad event system conflicts somehow with Firebug.
answers question: http://stackoverflow.com/q/27175313
has comment: http://stackoverflow.com/comment/42864810
upvote count: 1
type: Answer

http://stackoverflow.com/a/27222686
type: AcceptedAnswer
has body: Yes, it works. I just needed affirmation after all. I tested it and it works. Thanks for those who answered.
type: Answer
accepted answer of: http://stackoverflow.com/q/27190230
score: 0
answers question: http://stackoverflow.com/q/27190230

http://stackoverflow.com/a/27187510
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27187341
has body: I have read the article on Wikipedia about Same-origin policy. Perhaps you should skip "www." in the location string to be aligned with the rule: "same protocol, host and port".
has comment: http://stackoverflow.com/comment/42933549

http://stackoverflow.com/q/27204907
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42893085
tagged with: d3.js
has answer: http://stackoverflow.com/a/27233462
has comment: http://stackoverflow.com/comment/42895248
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
type: Question
has body: I'm working on a D3 timescale/pricescale financial chart. The chart SVG itself uses zoom() to pan and scale the data geometrically and re-draw the axes. Beneath the chart is an SVG brush pane which shows the entire data set at a high level and allows panning itself. The issue I'm facing is the same behavior as shown in this fiddle (not my code): http://jsfiddle.net/p29qC/8/. Zooming after brushing results in jumpy behavior because zoom() never picked up the changes from brush(). Zoom and brush work well independently, but I'm having trouble making them work together. When the chart is brushed, I'd expect zoom to detect that so the next time the chart is zoomed, it picks up where brush left off. And visa versa. I've managed to set up a synchronization function to get the brush to update properly when zoom is initiated, but I can't get the reverse to work - update the chart zoom when brush occurs in the navigator. I've searched for hours to no avail. Are there any patches out there to fix this? My apologies for the long code blocks but I hope that it's helpful to set the context! Setup code (some basic variables omitted for brevity): // Create svg var svg = d3.select('#chart') .append('svg') .attr({ class: 'fcChartArea', width: width+margin.left+margin.right, height: height+margin.bottom, }) .style({'margin-top': margin.top}); // Create group for the chart var chart = svg.append('g'); // Clipping path chart.append('defs').append('clipPath') .attr('id', 'plotAreaClip') .append('rect') .attr({ width: width, height: height }); // Create plot area, using the clipping path var plotArea = chart.append('g') .attr({ class: 'plotArea', 'clip-path': 'url(#plotAreaClip)' }); // Compute mins and maxes var minX = d3.min(data, function (d) { return new Date(d.startTime*1000); }); var maxX = d3.max(data, function (d) { return new Date(d.startTime*1000); }); var minY = d3.min(data, function (d) { return d.low; }); var maxY = d3.max(data, function (d) { return d.high; }); // Compute s…
has title: D3 - Reset Zoom when Chart is Brushed?
tagged with: javascript
linked to: http://stackoverflow.com/q/23784092

http://stackoverflow.com/comment/42898712
type: Comment
type: QuestionComment
has text: Using Chrome i cant copy text from alert, how you're doing that? O_o
score: 0
comment on: http://stackoverflow.com/q/27208403

http://stackoverflow.com/comment/43078012
has text: Thanks. "Socratic" sounds awfully close to sarcastic which is how it came across.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27281486

http://stackoverflow.com/a/27222824
has body: Setup a variable to store the fillHeight value. then run an if statement to see if the data-round is grater than 0. If so add 20 to the fillHeight var otherwise reset the fillHeight to 0. var fillHeight = 0; if('[data-round]' &gt; 0){ fillHeight + 20; } else { fillHeight = 0; } $('#fill').css({'height': fillHeight+'px'});
score: 0
answers question: http://stackoverflow.com/q/27222461
type: Answer
has comment: http://stackoverflow.com/comment/42924687

http://stackoverflow.com/a/27305332
answers question: http://stackoverflow.com/q/27305084
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: I think the best approach is to use the resolve param here . $routeProvider.when('/tests/:id',{ templateUrl : 'partials/tests.html', controller : 'testController', resolve : { hidden : function(riakAPIService){ return riakAPIService.hideTest(); } } }) And for the service angular.module('WebApp.services', []). factory('riakAPIService', function($http,$location) { var riakAPI = {}; riakAPI.hideTest = function(key) { return $http({ // Some code for setting a "hide" flag for this test in the database }).then(function(){ $location.path('/tests'); }); } });
accepted answer of: http://stackoverflow.com/q/27305084
type: AcceptedAnswer

http://stackoverflow.com/a/76766831
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27194359
has body: I am late to the party too, but this will work for English words or Spanish: String.prototype.pluralize = function(count, plural = 's') { return count === 1 ? this : plural.length > 2 ? plural : this + plural }; This way you can use any string like so: "Apple".pluralize(1) // Apple "Apple".pluralize(2) // Apples "Company".pluralize(1, "Companies") // Company "Company".pluralize(5, "Companies") // Companies "Tooth".pluralize(1, "Teeth") // Tooth "Tooth".pluralize(2, "Teeth") // Teeth Some Spanish: "arbol".pluralize(1,"es") // arbol "arbol".pluralize(2,"es") // arboles "manzana".pluralize(1) // manzana "manzana".pluralize(2) // manzanas

http://stackoverflow.com/comment/42995581
type: AnswerComment
has text: What if the functions are not defined at window but inside another function? Shouldn't it be this[value.type] ? @SLaks
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27259507

http://stackoverflow.com/comment/42858252
comment on: http://stackoverflow.com/a/27184965
score: 1
type: AnswerComment
type: Comment
has text: Ah, wonderful. I should have known to reassign player with every call. Thanks for the spot-on answer!

http://stackoverflow.com/a/27172732
type: Answer
has comment: http://stackoverflow.com/comment/42835912
answers question: http://stackoverflow.com/q/27172429
score: 0
has comment: http://stackoverflow.com/comment/42835841
has body: Although all answers are true, none explain what's the real problem. In your add_on.php, you initiate a function. But if the function echo some text, it will not be echoed where the function is initiated, but where it is called. So when you use include('add_on.php'); you're just adding the file that contain a function declaration. However, there is HTML not included in the function. That HTML is directly "echoed". You then call the function that echo the other div. If you can't include the first div in the function (as stated in your comments). I suggest you to not use a function at all. Just set your variable first and then include : PHP <?php $number = '12345'; include('add_on.php'); ?> add_on.php <?php if($number != '') { ?> test <?PHP } ?>

http://stackoverflow.com/comment/42997499
has text: Then, you need an additional bit of information per each `employee` record about whether and how current user has voted, and code your `like()` and `dislike()` functions accordingly. You might also consider adding `canLike()` and `canDislike()` to enable/disable the button.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27262270
type: QuestionComment

http://stackoverflow.com/comment/42960727
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27242256
has text: @cattla It did not work.

http://stackoverflow.com/q/27295310
accepted answer: http://stackoverflow.com/a/28366642
tagged with: import
type: Question
answer count: 1
tagged with: javascript
has body: I searched for some easily portable mesh simplification implementations to port them to javascript, e.g. to use them directly when importing a model. I found some possible candidates: http://truesculpt.googlecode.com/hg-history/2936b0558a85ec55d2235847e1b36a6875253fb5/Doc/mesh_simplification.pdf http://www.cg.tuwien.ac.at/studentwork/VisFoSe98/msh/ http://sajty.elementfx.com/progressivemesh/GSoC2012.pdf http://gts.sourceforge.net/ My question is, why is there no javascript implementation existent especially for a library like three.js where level of detail is a well supported feature? Will it take ages to do the computations in js? I dont think so.. And crosscompiling one of the c++ implementations should also not be so hard right?
score: 0
has title: Mesh simplification algorithm implemented in javascript
tagged with: simplification
tagged with: three.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43056549
has answer: http://stackoverflow.com/a/28366642

http://stackoverflow.com/comment/43067085
type: QuestionComment
comment on: http://stackoverflow.com/q/27287512
score: 0
type: Comment
has text: They are all existing modules and I can not change it. This is also a part of js. You are welcome with your own ideas.

http://stackoverflow.com/comment/42845680
type: Comment
type: QuestionComment
has text: you are looking for letters. the ^ here is the start of the string and not the negation operator.
score: 0
comment on: http://stackoverflow.com/q/27178382

http://stackoverflow.com/q/27189114
score: -2
has title: Execute javascript in a Link
downvote count: 2
has answer: http://stackoverflow.com/a/27189369
has answer: http://stackoverflow.com/a/27189176
type: Question
has answer: http://stackoverflow.com/a/27189988
tagged with: javascript
has comment: http://stackoverflow.com/comment/42864477
answer count: 3
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42864440
type: UnansweredQuestion
has body: How can I execute in a link? The idea is to show a pop up saying abc when I execute the link in a web browser.

http://stackoverflow.com/q/27249074
has answer: http://stackoverflow.com/a/27249111
has body: This is my structure in ASP.net: I'm trying to get the id of the clicked table row. this is my Javascript code: alert($(this).closest('tr').attr('tableID')); Unfortunately, the alert result is undefined. When I look into the source code of the page, there is an id for each table row. How can I fix this problem?
has comment: http://stackoverflow.com/comment/42972446
type: Question
has answer: http://stackoverflow.com/a/27253080
answer count: 2
tagged with: javascript
score: 0
tagged with: asp.net
has title: Select table id from ASP.net table with Javascript
type: UnansweredQuestion

http://stackoverflow.com/q/27201074
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42885861
has body: Hey guys i am very new to this so i am sorry if there is just something completely stupid i am missing here. I have the following Sign Up Form. And in the URL http://www.rockaholics-cologne.de/root/signup.php?e=cataras@gmx.de i am trying to submit the value e. However, in all cases e is simply empty or undefined: <?php // Ajax calls this REGISTRATION code to execute if(isset($_POST["u"])){ // CONNECT TO THE DATABASE include_once("php_includes/db_conx.php"); // GATHER THE POSTED DATA INTO LOCAL VARIABLES $u = preg_replace('#[^a-z0-9]#i', '', $_POST['u']); $p = $_POST['p']; $e = $_GET['e']; echo "test"; echo "$e"; // GET USER IP ADDRESS $ip = preg_replace('#[^0-9.]#', '', getenv('REMOTE_ADDR')); // DUPLICATE DATA CHECKS FOR USERNAME AND EMAIL $sql = "SELECT id FROM team WHERE username='$u' LIMIT 1"; $query = mysqli_query($db_conx, $sql); $u_check = mysqli_num_rows($query); // FORM DATA ERROR HANDLING if($u == "" || $p == ""){ echo "The form submission is missing values."; exit(); } else if ($u_check > 0){ echo "The username you entered is alreay taken"; exit(); } else if (strlen($u) < 3 || strlen($u) > 16) { echo "Username must be between 3 and 16 characters"; exit(); } else if (is_numeric($u[0])) { echo 'Username cannot begin with a number'; exit(); } else { // END FORM DATA ERROR HANDLING // Begin Insertion of data into the database // Hash the password and apply your own mysterious unique salt $cryptpass = crypt($p); include_once ("php_includes/randStrGen.php"); $p_hash = randStrGen(20)."$cryptpass".randStrGen(20); // Add user info into the database table for the main site table $sql = "UPDATE team SET username='$u',password='$p_hash',ip='$ip',signup=now(),lastlogin=now(),notecheck=now() WHERE email='$e'"; $query = mysqli_query($db_conx, $sql); $uid = mysqli_insert_id($db_conx); // Create directory(folder) to hold each user's files(pics, MP3s, etc.) if (!file_exists("user/$u")) { mkdir("user/$u", 0755); } // Email the user their activation link $to = "$e"; $from = …
has comment: http://stackoverflow.com/comment/42886445
has comment: http://stackoverflow.com/comment/42885942
type: Question
has comment: http://stackoverflow.com/comment/42885751
accepted answer: http://stackoverflow.com/a/27204829
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/60174
answer count: 1
has title: PHP and Javascript - Problems with undefinded variable
has answer: http://stackoverflow.com/a/27204829
has comment: http://stackoverflow.com/comment/42885717

http://stackoverflow.com/a/27311433
type: Answer
upvote count: 1
score: 1
has body: The Fiddle you link to isn't working for two reasons: You never invoke the function updatepage You haven't included jQuery on your page You can solve this by moving the code out of the function: $("#make").change ( function () { var targID = $(this).val (); $("div#style-sub-1").hide (); $('.' + targID).show (); }); and including jQuery. Here's a demo of it working.
accepted answer of: http://stackoverflow.com/q/27308527
answers question: http://stackoverflow.com/q/27308527
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/72136269
type: AnswerComment
comment on: http://stackoverflow.com/a/27205949
type: Comment
score: 2
has text: It's located here now: https://docs.woocommerce.com/document/woocommerce-rest-api/

http://stackoverflow.com/comment/42973674
has text: Can you show the code where you create the var table? because the table doesn't seem to have a rows array. I think you may have configured it wrong.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27249568
type: QuestionComment

http://stackoverflow.com/q/27269135
score: 3
has title: &quot; is JSON string
downvote count: 0
has comment: http://stackoverflow.com/comment/47767301
favorite count: 0
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43008800
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27269228
tagged with: jstree
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/43009648
tagged with: javascript
linked to: http://stackoverflow.com/q/9244824
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/61876842
has body: I have a JSON string which looks like this when displayed in an ASP.NET MVC page using @Model.JsonData [ { "id": 123, "text": "Consumer", "parent": "#"; } ] When I use the same @Model.JsonData in the JavaScript code it is encoded as: [ { &amp;quot;id&amp;quot;: 123, &amp;quot;text&amp;quot;: &amp;quot;Consumer&amp;quot;, &amp;quot;parent&amp;quot;: &amp;quot;#&amp;quot; } ] Why does the JavaScript segment encode the double quotes? When the double quotes are encoded the jstree plugin expecting JSON data does not work. &lt;script&gt; $(function () { $('#jstree').jstree({ 'core': { 'data': function () { var jsonTreeData = @Model.JsonTreeData; return jsonTreeData; } } }); }); &lt;/script&gt; Error message: "SCRIPT1015: Unterminated string constant"
tagged with: encoding

http://stackoverflow.com/q/27229010
answer count: 2
has answer: http://stackoverflow.com/a/27229394
tagged with: function
has comment: http://stackoverflow.com/comment/42935769
has answer: http://stackoverflow.com/a/27229122
linked to: http://stackoverflow.com/q/4862193
has body: i'm creating a very simple Santa's game for my friends. So the logic is again very simple. Given a list of names, user need to insert his/her name and whenever the button is clicked, a random name will pick up from the list and display as result. I have two small problems: I can find and display the random name form the list but I cannot pass in the luckyName function and display it if is not the same of the user's name. In case the name of the current user is the same of the picked up name, I 'm not sure how to or what's the best way to pick up another name. So far I just call again the pickRandomName function. Html: Santa ask: Who are you kid? Go js: var nameList = [ 'gio', 'anna', 'chiara', 'ella', 'sarah', 'sara' ]; $(document).ready(function(){ pickRandomName(); luckyName(); }); var luckyName = function(randomName){ var section = $('section'); $('section').on('click', '#go', function(){ var currentSanta = $('#santaName').val(); console.log(currentSanta); if( currentSanta != randomName){ console.log(randomName); $('section').append(randomName); } else { //pick up another random name pickRandomName(randomName); console.log(randomName); } }); }; var pickRandomName = function(randomName){ var randomName = nameList[Math.floor(Math.random() * nameList.length)]; console.log(randomName); }; and here the fiddle: http://jsfiddle.net/anaketa/r9morh87/1/
tagged with: jquery
has comment: http://stackoverflow.com/comment/43600190
possible better answer: http://stackoverflow.com/a/27229122
has title: How to pass value between functions?
accepted answer: http://stackoverflow.com/a/27229394
score: 0
has comment: http://stackoverflow.com/comment/42935153
has comment: http://stackoverflow.com/comment/42936522
type: AnsweredQuestion
tagged with: javascript
type: Question

http://stackoverflow.com/a/27303212
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27302919
has body: I would try this way: check https://www.npmjs.org/package/googlemaps (moshen/node-googlemaps) read this code https://github.com/moshen/node-googlemaps/blob/master/lib/googlemaps.js f.e. there is function createEncodedPolyline(points) {..} step by step try to recreate request to Google Geometry Library
answers question: http://stackoverflow.com/q/27302919
has comment: http://stackoverflow.com/comment/43069529
type: Answer

http://stackoverflow.com/q/27154027
has answer: http://stackoverflow.com/a/35327521
linked to: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/42802576
answer count: 4
type: AnsweredQuestion
tagged with: angularjs-controller
possible better answer: http://stackoverflow.com/a/27154285
has comment: http://stackoverflow.com/comment/42802570
type: Question
has answer: http://stackoverflow.com/a/27155631
accepted answer: http://stackoverflow.com/a/27155631
tagged with: javascript
has answer: http://stackoverflow.com/a/27154305
has body: I have a problem in controller with the properties of object. My factory return one object with another object and one function. I can call the function but i can't access in another object properties. Here is my code: My factory app.factory('User', function () { var User = {}; User.get = function () { // Call the service... done User.data = response.data; }; return User; }); My controller app.controller('Controller', function ($scope, User) { $scope.user = User; console.log(user); // print correct one object with the function get and data object with user data console.log(user.data); // undefined }); Thanks, and sorry for my english disaster
has comment: http://stackoverflow.com/comment/42802560
score: 0
has comment: http://stackoverflow.com/comment/42802502
has comment: http://stackoverflow.com/comment/42802586
has title: Angularjs undefined variable in controller
has answer: http://stackoverflow.com/a/27154285
tagged with: undefined
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42802846
tagged with: angularjs-factory

http://stackoverflow.com/a/27264650
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27264539
answers question: http://stackoverflow.com/q/27264539
has comment: http://stackoverflow.com/comment/43002571
has comment: http://stackoverflow.com/comment/43003468
type: AcceptedAnswer
downvote count: 0
has body: The engine does what it always does, which is to look for the property first on the instance and then, if not on the instance, in the prototype chain. If the property, wherever found and however defined, is defined with a setter, then the setter is executed. In your case, it finds the property in the prototype parent, and executes the setter, displaying the alert. Nothing is actually set. (Of course, if the property is not defined with a setter, then the value is set on the instance.) If you want to actually create a property by the same name on the instance itself, you can do so using defineProperty (or the second argument to Object.create). This property will "shadow" (hide) the property by the same name on the prototype. The next time you attempt to set the property, the engine will find the property on the instance, and set it there (unless the property you define on the instance also has a setter, in which case that setter will be invoked). Note that setters themselves do no setting. Whatever setting you might want to do, you will have to do yourself. For instance, you might want to set a proxy property such as _num, by saying this._num = v. Obviously, this here is the instance--even though the setter is defined on the prototype--and thus the _num property will be on the instance. If you try to do this.num = v inside the setter, you will end up with an infinite loop, because that will invoke the same setter again. num cannot be both a property based on getter/setter and a normal-valued property at the same time. Consider the following: parent = { set num(v) { alert(v); } }; obj = Object.create(parent); obj.num = 44; // alert obj2 = Object.create(parent, { num: { value: 55 } }); obj2.num = 99 // proto ignored, no alert, simple assignment
type: Answer
score: 3

http://stackoverflow.com/comment/43014537
has text: You don't have included JQuery itself but another librarie jquery.color
comment on: http://stackoverflow.com/q/27272435
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/27324846
type: Answer
answers question: http://stackoverflow.com/q/27169045
upvote count: 1
score: 1
downvote count: 0
has body: If an addon messes with a website's URL, it's going to break the website. This is not the fault of you, the website developer, but instead the fault of the addon developer (assuming you did not install these "addons" into your website yourself). I feel like there's some sort of miscommunication or something missing if the "addon" is changing your url from a hash to an html5mode pushstate url. Have the user figure out WHICH addon is causing the bug by one by one having her disabling every addon until the problem goes away. With the information you provided there's absolutely not enough information to go on and I would generally advocate to close this question on that basis. Once you identify the addon in question, contact their developer asking them why they are changing the URL of random websites. If the user has an addon that converts www.google.com to www.giggle.com would you not expect the website to "break"? You can't expect google to fix this behavior.

http://stackoverflow.com/comment/42843052
has text: Why not: `calendarModel.siteContainer.empty();` ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27176987

http://stackoverflow.com/comment/42966395
type: QuestionComment
type: Comment
has text: the controller function DController($scope) { var defaultInputText = "hello"; $scope.Title = "check"; $scope.SpanTitle = "Span"; $scope.Status = false; $scope.LastName = defaultInputText; $scope.LastNameClick = function () { if ($scope.LastName ==defaultInputText) { $scope.LastName = ""; } } $scope.LastNameOut = function () { if ($scope.LastName.length == 0) { $scope.LastName = defaultInputText; } } }
comment on: http://stackoverflow.com/q/27244530
score: 0

http://stackoverflow.com/comment/42994769
has text: Can you provide more code, possibly on jsfiddle?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27238904
score: 0

http://stackoverflow.com/a/27292729
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/27292560
answers question: http://stackoverflow.com/q/27292560
has body: You're pushing the entire row into uniqueNames. The array will never be equal to the number at the end of each row, so the $.inArray() test will always fail. You need separate arrays for just the element you're comparing and the resulting array. var newArray = []; var uniqueNames = {}; $.each(arr, function(i, insidearr) { if (!(insidearr[6] in uniqueNames)) { newArray.push(insidearr); uniqueNames[insidearr[6]] = true; } }); I used an object rather than an array for uniqueNames, because searching for an object key is faster than scanning an array.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42970726
has text: Sounds like a xy problem: http://mywiki.wooledge.org/XyProblem
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27247952
type: QuestionComment

http://stackoverflow.com/a/27258058
score: 3
has comment: http://stackoverflow.com/comment/42989880
has body: You're doing it all wrong. Fill an array with all of your range of numbers from smallest to largest. Use a Fisher/Yates/Knuth shuffle to mix the array. Draw out as many numbers as you need. (No code included on purpose because I didn't fix your problem)
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27257954
upvote count: 3
answers question: http://stackoverflow.com/q/27257954
type: Answer
downvote count: 0

http://stackoverflow.com/q/27164216
tagged with: servlets
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27164468
tagged with: javascript
has comment: http://stackoverflow.com/comment/42824170
score: 0
has body: Hi I am getting the access_token value dynamically from server for servlet request it is below: now i want to retrive the access_taken value in to my servlet program. { "access_token":"AQWP_EVkqdc7E0wD09J6msmjnUlvilhP304gUIDzl6KKgNxwnHyz_W9nOxS0IroDJwEfVr3n3O-IC9YKc3bjyuwYRm6qbKRiP3A2AzuDjo8ohZERZFRCMyfjjqqDjNJ5J5ReCQDhkFJam51eiqsOeXDg4U_c9XJzc1dUx7Qxck0p9RNE0", "expires_in": 5183999 } my code is below: public class Demo extends HttpServlet { private static final long serialVersionUID = 1L; private static final String PROTECTED_RESOURCE_URL = "http://api.linkedin.com/v1/people/~:(first-name,last-name,email-address)"; /** * @see HttpServlet#HttpServlet() */ public Demo() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out=response.getWriter(); String authCode = request.getParameter("code"); request.setAttribute("authCode",authCode); out.println(authCode); doPost(request,response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out=response.getWriter(); Object url=request.getAttribute("authCode"); response.sendRedirect("https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&amp;code="+url+"&amp;redirect_uri=http://localhost:8080/LinkedinMails/dem&amp;client_id=xxxxxxxxxxxxx&amp;client_secret=xxxxxxxxxxxxxxx"); } } Thank You.
has answer: http://stackoverflow.com/a/27164488
accepted answer: http://stackoverflow.com/a/27164468
has title: Retrieving dynamic JSONObject value from server response in servlets
possible better answer: http://stackoverflow.com/a/27164488
has comment: http://stackoverflow.com/comment/42821538
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42825094
tagged with: java
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/27301910
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
tagged with: bluebird
type: Question
has answer: http://stackoverflow.com/a/27301958
answer count: 1
tagged with: javascript
has body: How would I check the JSON for a property and if it's missing return an error exiting and catching the chain? var Promise = require("bluebird"); var fs = Promise.promisifyAll(require("fs")); fs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) { if (!json.prop) return new Error("missing prop"); return json; }).catch(SyntaxError, function (e) { console.error("file contains invalid json"); }).catch(Promise.OperationalError, function (e) { console.error("unable to read file, because: ", e.message); }); Example taken from bluebird documentation.
downvote count: 0
linked to: http://stackoverflow.com/q/22820101
score: 1
favorite count: 0
has title: Creating an error in promise chain
tagged with: promise
accepted answer: http://stackoverflow.com/a/27301958
duplicate of: http://stackoverflow.com/q/22820101

http://stackoverflow.com/q/27254523
tagged with: android-fragments
tagged with: javascript
has answer: http://stackoverflow.com/a/27254682
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27254682
has title: Android Radio Button not invisible or uncheck
type: Question
tagged with: android
has body: I use Sherlock fragment in my android and i add code to unchecked in invisible my radio button when fragment. I use check box to show radio button and the problem is here when i make radio button visible and change fragment and again back to this fragment (as I said before I add code to Invisible and unchecked radio button) but the radio button not being invisible and even not being unchecked. The Code that I used in onCreateView() for my fragment is: chb_week.setChecked(false); chb_week.setVisibility(View.INVISIBLE); rbtn_week_even.setChecked(false); rbtn_week_odd.setChecked(false); rbtn_week_even.setVisibility(View.INVISIBLE); rbtn_week_odd.setVisibility(View.INVISIBLE); I can't find any problem i add them after any View installation. and i say there is no error I Invisible more thing like button and spinners they are all worked but this code won't I don't know why?
score: 0
answer count: 1

http://stackoverflow.com/comment/43027619
has text: Are you trying to put content in the ` `?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27279436
score: 1

http://stackoverflow.com/q/27258161
has answer: http://stackoverflow.com/a/27258195
has title: javascript formatting time from Date() object
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/8888491
has answer: http://stackoverflow.com/a/27258431
accepted answer: http://stackoverflow.com/a/27258431
answer count: 3
tagged with: datetime
has comment: http://stackoverflow.com/comment/42990227
favorite count: 0
possible better answer: http://stackoverflow.com/a/27258195
upvote count: 2
has body: 1.) Is there a built in formatting option in javascript to display time obtained from Date() to be 12 hr format? 2.) With the script below the minutes and seconds field are displayed as 1 digit format when the values are less than 10. Is there a way force 2 digit reporting on the minutes/seconds values so that 1.. 2... 3... displays as 01... 02... 03... and so on.... function updateTime(){ var dt = new Date(); var weekday = new Array(7); weekday[0]= 'Sunday'; weekday[1] = 'Monday'; weekday[2] = 'Tuesday'; weekday[3] = 'Wednesday'; weekday[4] = 'Thursday'; weekday[5] = 'Friday'; weekday[6] = 'Saturday'; var time = weekday[dt.getDay()] + ' ' + dt.getDate() + '/' + dt.getMonth() + '/' + dt.getFullYear() + ' ' +dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds(); document.getElementById('dttime').innerHTML = time; } setInterval(updateTime, 1000);
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27258620
type: Question

http://stackoverflow.com/a/27229737
type: Answer
has body: Simply can do like this setInterval( function() { var img1 = document.getElementById('img1'); var img2 = document.getElementById('img2'); if ( img1.style.opacity == "0"; ){ img1.style.opacity = "1"; img2.style.opacity = "0"; } else if( img2.style.opacity == "0") { img1.style.opacity = "0"; img2.style.opacity = "1"; } else { img2.style.opacity = "0"; img2.style.opacity = "1"; } }, 3000 ); Make sure your loading this interval after document ready .
score: 0
answers question: http://stackoverflow.com/q/27229263

http://stackoverflow.com/q/27260863
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42994849
has comment: http://stackoverflow.com/comment/42995019
downvote count: 1
has comment: http://stackoverflow.com/comment/42996215
has comment: http://stackoverflow.com/comment/42994911
has comment: http://stackoverflow.com/comment/42994919
has answer: http://stackoverflow.com/a/27261098
has comment: http://stackoverflow.com/comment/42995716
has comment: http://stackoverflow.com/comment/42995052
has comment: http://stackoverflow.com/comment/42995743
type: Question
has comment: http://stackoverflow.com/comment/42995054
upvote count: 0
has comment: http://stackoverflow.com/comment/42994862
tagged with: javascript
has comment: http://stackoverflow.com/comment/42995006
answer count: 1
has comment: http://stackoverflow.com/comment/42994816
has body: I'm trying to use the product of one function to be used later on in my program. I have the following code: var calculate = function(ingVolume, percentCarrier, totalCarrierVolume, totalIngredientVolume) { var volume = document.getElementById(ingVolume).value; var carrier = document.getElementById(percentCarrier).value; var mCarrier = carrier/100; var x = document.getElementById(totalCarrierVolume).innerHTML = mCarrier*(volume/(1- mCarrier)); var y = document.getElementById(totalIngredientVolume).innerHTML = parseInt(volume) + x; return [x, y]; }; var value1 = calculate('a', 'b', 'c', 'd'); var subvalue1_1 = value1[0]; var subvalue1_2 = value1[1]; var value2 = calculate('e', 'f', 'g', 'h'); var subvalue2_1 = value2[0]; var subvalue2_2 = value2[1]; var value3 = calculate('i', 'j', 'k', 'l'); var subvalue3_1 = value3[0]; var subvalue3_2 = value3[1]; var value4 = calculate('m', 'n', 'o', 'p'); var subvalue4_1 = value4[0]; var subvalue4_2 = value4[1]; var value5 = calculate('q', 'r', 's', 't'); var subvalue5_1 = value5[0]; var subvalue5_2 = value5[1]; function calculate2() { document.getElementById("demo").innerHTML = value1; }; If I plug some numbers into this and run it, the variable 'value1' is returned as undefined. However, when I run calculate('a', 'b', 'c', 'd') in the javascript console it runs fine and returns [value of x, value of y] for those parameters. The exact error message is "Uncaught TypeError: Cannot read property 'value' of null" for line 17 which is var volume = document.getElementById(ingVolume).value; It is being run for the following html: Ingredient Name Amount (in Mg) % Carrier Total Carrier Volume Total Ingredient Volume Mg % Calculate Final Volume New Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Click Me I want to eventually use subvalue…
has comment: http://stackoverflow.com/comment/42994936
score: -1
favorite count: 0
linked to: http://stackoverflow.com/q/14028959
has comment: http://stackoverflow.com/comment/42994961
has title: Variable that calls function with parameters is undefined
has comment: http://stackoverflow.com/comment/42994840

http://stackoverflow.com/comment/43055524
has text: Btw, what are you doing with the matches? Are you doing any kind of replacement?
score: 0
comment on: http://stackoverflow.com/q/27295393
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27194683
linked to: http://stackoverflow.com/q/27283373
linked to: http://stackoverflow.com/q/27217383
tagged with: jquery-plugins
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27241778
tagged with: jquery
has body: I am attempting to use the jQuery File Upload Plugin here The behavior I want is similar to the home page that loads - i.e - the ability to select multiple files - when selected I don't need the button to upload files individually (just remove with the cancel button individually) and remove all with the cancel button along the top bar I am developing my site in c# mvc and the file gets uploaded to a ECM solution via CMIS Browser Bindings so I dont actually hit an MVC controller method. As I am using Browser Bindings I need to upload each file individually to the CMIS Endpoint. The code works fine doing an auto data submit for each file So the working code I have is: $('#uploadFile').fileupload({ replaceFileInput: false, singleFileUploads: true, add: function (e, data) { $.each(data.files, function (index, file) { data.url = 'mycmis_url'; data.type = 'POST'; data.submit(); }); }, done: function (e, data) { alert("Done"); } }); If I do have 3 files selected to upload I will get 3 'Done' alerts but the 3 files all upload successfully. However as mentioned the behavior I want is one Uppload All button that would trigger the upload for each of my selected files. I have the code below: $('#uploadFile').fileupload({ replaceFileInput: false, singleFileUploads: true, autoUpload: false, add: function (e, data) { $.each(data.files, function (index, file) { data.url = 'mycmis_url'; data.type = 'POST'; }); $("#uploadAllFilesBtn").unbind('click').on('click', function () { data.submit(); }); }, done: function (e, data) { alert("Done"); } }); So I have set the autoUpload property to false but if I select two files and then click my Upload All Files button as my uploadAllFiles button is outside my each loop if my first selected file is called foo.txt and my 2nd selected file is bar.txt it will only upload bar.txt. Has anyone got any idea how I could have a button called upload all that would trigger a data.submit for each individual file?
tagged with: jquery-file-upload
score: 0
tagged with: file-upload
has title: jQuery File Upload hooked to button
has answer: http://stackoverflow.com/a/27241778
type: AnsweredQuestion

http://stackoverflow.com/q/27210068
has body: I want to be able to pass D, I, H, and A to the next page. My code on that page needs to be able to access their values. Here's what I have tried so far: function tally() { var Dpoint, Ipoint, Hpoint, Apoint; var party_Score = ['Dpoint', 'Ipoint', 'Hpoint', 'Apoint']; var D, I, H, A; var value_Point; var type_Choice; var tag_Choice; var inputs = document.getElementsByTagName("input"), iLength = inputs.length; D = I = H = A = 0; for (i = 0; i &lt; iLength; i++) if (inputs[i].checked) { value_Point = parseInt(inputs[i].value); if (inputs[i].name.search('D') &gt; -1){ D += value_Point; } if (inputs[i].name.search('I') &gt; -1){ I += value_Point; } if (inputs[i].name.search('H') &gt; -1){ H += value_Point; } if (inputs[i].name.search('A') &gt; -1){ A += value_Point; } } // DIHA is areadly added how to pass them them to other page ? document.getElementById('D').style.width = D + 'px'; alert(D); document.getElementById('I').style.width = I + 'px'; document.getElementById('H').style.width = H + 'px'; document.getElementById('A').style.width = A + 'px'; Dpoint = D; //passing this value to next page Ipoint = I; //passing this value to next page Hpoint = H; //passing this value to next page Apoint = A; //passing this value to next page }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27210325
has comment: http://stackoverflow.com/comment/42901821
type: Question
has title: How to pass a variable's value to the next page with JavaScript?
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42901829
answer count: 1

http://stackoverflow.com/q/27268466
tagged with: button
has comment: http://stackoverflow.com/comment/43007784
tagged with: richfaces
has body: In my Web Application I need to Apply common java script method for all Button when onclick action occur For example For all following buttons need to apply onclick="commonOnClickJavaScript();" &lt;h:commandButton id="createCarButton" title="Create Car" action="#{carController.add}" styleClass="submit_btn" /&gt; &lt;h:commandButton id="editCarButton" title="Edit Car" action="#{carController.edit}" styleClass="submit_btn" /&gt; &lt;h:commandButton id="createDoorButton" title="Create Door" action="#{doorController.add}" styleClass="submit_btn" /&gt; &lt;h:commandButton id="editDoorButton" title="Edit Door" action="#{doorController.edit}" styleClass="submit_btn" /&gt; The native solution is taht To embed onclick="commonOnClickJavaScript();" in every button For example &lt;h:commandButton id="createCarButton" title="Create Car" action="#{carController.add}" styleClass="submit_btn" onclick="commonOnClickJavaScript();" &gt; But in my application I need to apply that for hundreds of buttons so this solution will not be simple and waste a lot of time Any Ideas?
accepted answer: http://stackoverflow.com/a/27268974
type: AnsweredQuestion
tagged with: jsf
has comment: http://stackoverflow.com/comment/43036784
has title: How to apply common java script method for all Button when onclick action occur?
type: Question
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27268974
has comment: http://stackoverflow.com/comment/43008380
answer count: 1

http://stackoverflow.com/comment/43037421
type: AnswerComment
has text: Ahh, it is. Apologies I've had a nightmare answering this question... Thanks for your patience. Will update again.
comment on: http://stackoverflow.com/a/27284107
score: 0
type: Comment

http://stackoverflow.com/comment/42988081
has text: Thank you! I've added the fiddle and some additional info :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27255076

http://stackoverflow.com/comment/42967540
comment on: http://stackoverflow.com/q/27242770
score: 0
type: Comment
type: QuestionComment
has text: If you want just to export a part of your chart, you can't. The function only works for the whole chart. And because the exporting function works with the highcharts server we can't change it to fulfill our needs. The only solution I can think of is to change the data series and let the chart only show the values you want to export.

http://stackoverflow.com/comment/42843596
type: QuestionComment
type: Comment
score: 1
has text: Jeopardized in what way? The content of the cookie should only have meaning to your server (e.g. a unique hash). It can't be hidden from the client user and could remain on their hard drive forever, so there will always be the chance of the cookie being viewed by someone.
comment on: http://stackoverflow.com/q/27177064

http://stackoverflow.com/q/27245049
possible better answer: http://stackoverflow.com/a/27245128
tagged with: javascript
has body: I am using MomentJS for converting the date format. I have a date in this format 2010/12/01 and I want to convert it to 01/12/2010 using MomentJS only. I have another date in this format "12/02/2014" and I want to convert in "2014/12/02" &lt;!--begin snippet: js hide: false console: true babel: false--&gt; &lt;!--language: lang-js--&gt; var date = moment(new Date(2010/12/01)).format("MMM Do h/mm"); console.log(date); &lt;!--language: lang-html--&gt; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js"&gt;&lt;/script&gt; &lt;!--end snippet--&gt; How do I convert them using MomentJS
has answer: http://stackoverflow.com/a/27245128
favorite count: 0
answer count: 3
has title: Convert date in YYYY/MM/DD format in MomentJS
has answer: http://stackoverflow.com/a/47844593
has comment: http://stackoverflow.com/comment/42965393
upvote count: 6
tagged with: momentjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27245178
score: 6
type: Question
has comment: http://stackoverflow.com/comment/42965362
accepted answer: http://stackoverflow.com/a/27245178
downvote count: 0
has comment: http://stackoverflow.com/comment/42965463

http://stackoverflow.com/comment/43076340
comment on: http://stackoverflow.com/q/27306463
type: Comment
type: QuestionComment
has text: Try to debug your code first. I found many mistakes. Use your browser's developer tools.
score: 2

http://stackoverflow.com/a/27311984
score: 0
answers question: http://stackoverflow.com/q/27310657
type: Answer
has body: JS : $(document).ready(function(){ $('.checkbox').click(function(){ $('input[type=checkbox]').prop('checked',false) $(this).prop('checked',true) }); }) HTML : &lt;input type="checkbox" id="xxx" class="checkbox" checked&gt; xxx &lt;br&gt; &lt;input type="checkbox" id="yyy" class="checkbox"&gt; yyy

http://stackoverflow.com/comment/42831056
has text: Just store the last value in a variable
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27170055

http://stackoverflow.com/comment/42942122
type: Comment
comment on: http://stackoverflow.com/a/27228551
has text: I think a JS solution is preferable for exactly the "Date on the client" reason. You want to wish someone happy birthday in the timezone they are in, not in a timezone possibly halfway round the world where your server is hosted.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43075944
has text: hey, thanks a lot for a quick response. However, I still think there should be a way to do that. The last resort, which I don't want to deal with is just `getElementById("scriptElemId").src = newUrl;`. But as I mentioned, I want to have pure model in the controller, no UI friction. Is there a better way to do that? Or maybe I will need to get rid of the old element and render a new one with new value in src instead.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27306744
type: AnswerComment

http://stackoverflow.com/a/27236548
score: 1
accepted answer of: http://stackoverflow.com/q/27236269
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: The problem is that checkboxes from the first list #task1 are moved to the list #task2 on change event. After that has happened and on the subsequent change events, checkboxes are still moved to the same list, because events handler is the same. That's why you can't move checkboxes back to the initial list. To fix it you can write one function instead of two moveFromTask1to2 and moveFromTask2to1. For example: var moveFromTo = function() { var moveTo = this.parentNode.parentNode === task1 ? task2 : task1; moveTo.appendChild(this.parentNode); }; Check the demo below. var task1 = document.getElementById("task1"); var task2 = document.getElementById("task2"); var moveFromTo = function() { var moveTo = this.parentNode.parentNode === task1 ? task2 : task1; moveTo.appendChild(this.parentNode); } var bindElement = function(listItem, task) { var checkbox = listItem.querySelector("input[type=checkbox]"); checkbox.onchange = task; } for (var i = 0; i < task1.children.length; i++) { bindElement(task1.children[i], moveFromTo); } //(1) for (var i = 0; i < task2.children.length; i++) { bindElement(task2.children[i], moveFromTo); } //(2) Item task11> Item task12> Item task21> Item task22>
answers question: http://stackoverflow.com/q/27236269
upvote count: 1

http://stackoverflow.com/q/27185109
type: UnansweredQuestion
has title: Issue with downloadable CSV using AJAX with PHP
tagged with: php
has answer: http://stackoverflow.com/a/27187863
has comment: http://stackoverflow.com/comment/42857351
has comment: http://stackoverflow.com/comment/42862006
type: Question
tagged with: javascript
score: 0
has body: I am trying to create a panel, where I can select input from 5 dropdowns (4 are multiselect dropdowns) and send them through an ajax call. In the ajax function I am trying to create a csv downloadable file. But the issue is, I can get the alert to display the content that should be in the file, but the file isn't downloading neither its getting saved in some folder. Here's my JavaScript function triggering the ajax call: function create_csv() { var v = $('#drp_v').val(); var cnt = $('#drp_cnt').val(); var ctg = $('#drp_ctg').val(); var api = $('#drp_api').val(); var nt = $('#drp_nt').val(); alert("version :"+v+" category :"+ctg+" country :"+cnt); $.post("ajax.php", { 'version':v,'category':ctg, 'country':cnt,'network_id':nt, 'api':api,'func':'create_csv' }, function(data) { alert(data); }); } And here's my PHP function function create_csv($version,$ctg,$cnt,$nt,$api) { $cnt_table = "aw_countries_".$version; $ctg_table = "aw_categories_".$version; $off_table = "aw_offers_".$version; $sizeof_ctg = count($ctg); $cond_ctg = " ( "; for($c = 0; $c &lt; $sizeof_ctg ; $c++) { $cond_ctg = $cond_ctg." $ctg_table.category = '".$ctg[$c]."' "; if($c &lt; intval($sizeof_ctg-1)) $cond_ctg = $cond_ctg." OR "; else if($c == intval($sizeof_ctg-1)) $cond_ctg = $cond_ctg." ) "; } $sizeof_cnt = count($cnt); $cond_cnt = " ( "; for($cn = 0; $cn &lt; $sizeof_cnt ; $cn++) { $cond_cnt = $cond_cnt." $cnt_table.country = '".$cnt[$cn]."' "; if($cn &lt; intval($sizeof_cnt-1)) $cond_cnt = $cond_cnt." OR "; else if($cn == intval($sizeof_cnt-1)) $cond_cnt = $cond_cnt." ) "; } $sizeof_nt = count($nt); $cond_nt = " ( "; for($n = 0; $n &lt; $sizeof_nt ; $n++) { $cond_nt = $cond_nt." $off_table.network_id = '".$nt[$n]."' "; if($n &lt; intval($sizeof_nt-1)) $cond_nt = $cond_nt." OR "; else if($n == intval($sizeof_nt-1)) $cond_nt = $cond_nt." ) "; } $sizeof_api = count($api); $cond_api = " ( "; for($a = 0; $a &lt; $sizeof_api ; $a++) { $cond_api = $cond_api." $off_table.api_key = '".$api[$a]."' "; if($a …
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42858614
tagged with: ajax

http://stackoverflow.com/q/27192586
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42872011
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42870994
answer count: 0
tagged with: html5-appcache
type: Question
has body: I'm trying to get a webpage working so that a page that constantly updates throughout the day can continue to function like normal and if possible cache correctly/better. Currently I'm using the following htaccess file: &lt;FilesMatch "\.(html|htm|js|css|php)&gt; FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" &lt;/FilesMatch&gt; Which basically is making everything re-download every time they refresh, it would be good if there was/is a way to only make it re-download if something has changed (I have no idea how to do this, could it be done by checking one specific file or something?) I am also trying to get a way to have a "Go Offline" or "Cache Website" (Better if it is automatic) so that it caches/downloads a copy of the entire webpage + some other pages of my choice (if possible) which would mean if I was to load the page on a mobile phone and then disable wifi/data and refresh the page it would still be accessible. I've tried using the manifest files (.appcache and .manifest) but it just seems to cache the entire page regardless and when I make a change to the webpage it doesn't update even if the data/wifi is enabled, I have to clear the cache before it works... Any ideas?
has title: A toggle/function to cache/download a webpage so there is an "offline" copy/version
tagged with: javascript
has comment: http://stackoverflow.com/comment/42872070
tagged with: caching
score: 0
tagged with: .htaccess

http://stackoverflow.com/comment/42878529
type: Comment
has text: @talles_jp Please post your entire view (HTML) and viewModel (js). What you're saying tells me that you are somehow initializing the `loading` observable to true, or that you haven't adjusted your view to dereference the `loading` observable. I need more information.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27180845

http://stackoverflow.com/q/27278135
has answer: http://stackoverflow.com/a/28604801
has comment: http://stackoverflow.com/comment/43025294
has comment: http://stackoverflow.com/comment/65367926
has comment: http://stackoverflow.com/comment/65440559
answer count: 3
tagged with: google-chrome
downvote count: 1
tagged with: debugging
has comment: http://stackoverflow.com/comment/57064469
has title: Chrome DevTools script blackboxing not working
upvote count: 35
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/54404181
has comment: http://stackoverflow.com/comment/58682019
favorite count: 0
score: 34
has body: I am trying to use the new feature of chrome devtools "blackboxing a script". This Chrome Devtools article lists script blackboxing functionality What happens when you blackbox a script? Exceptions thrown from library code will not pause (if Pause on exceptions is enabled) Stepping into/out/over bypasses the library code Event listener breakpoints don't break in library code The debugger will not pause on any breakpoints set in library code. The end result is you are debugging your application code instead of third party resources. I have tried to blackbox the file directly by right clicking the file from source tab and everything goes right the yellow notification shows at the top of file "This script is blackboxed in debugger". Strangely none of the above listed points work, debugger goes through blackboxed script also event listeners reference the blackboxed script. I have also enabled Developer Tools experiments at chrome://flags/ With these options set i thought i would have been ok, i also have the latest chrome at this time 39.0 beta,i have no idea what i'm missing. Did anybody go through this? Thnx!
has answer: http://stackoverflow.com/a/53182613
type: Question
has comment: http://stackoverflow.com/comment/58773706

css
tags question: http://stackoverflow.com/q/27179782
tags question: http://stackoverflow.com/q/27273223
tags question: http://stackoverflow.com/q/27214520
tags question: http://stackoverflow.com/q/27280134
tags question: http://stackoverflow.com/q/27286320
tags question: http://stackoverflow.com/q/27254080
tags question: http://stackoverflow.com/q/27240701
tags question: http://stackoverflow.com/q/27284319
tags question: http://stackoverflow.com/q/27224410
tags question: http://stackoverflow.com/q/27158071
tags question: http://stackoverflow.com/q/27279885
tags question: http://stackoverflow.com/q/27241186
tags question: http://stackoverflow.com/q/27211881
tags question: http://stackoverflow.com/q/27283742
tags question: http://stackoverflow.com/q/27196905
tags question: http://stackoverflow.com/q/27256761
tags question: http://stackoverflow.com/q/27298909
tags question: http://stackoverflow.com/q/27263234
tags question: http://stackoverflow.com/q/27260699
tags question: http://stackoverflow.com/q/27243847
tags question: http://stackoverflow.com/q/27288634
tags question: http://stackoverflow.com/q/27313016
tags question: http://stackoverflow.com/q/27289603
tags question: http://stackoverflow.com/q/27202511
tags question: http://stackoverflow.com/q/27264172
tags question: http://stackoverflow.com/q/27268527
tags question: http://stackoverflow.com/q/27267249
tags question: http://stackoverflow.com/q/27221531
tags question: http://stackoverflow.com/q/27184337
tags question: http://stackoverflow.com/q/27208994
tags question: http://stackoverflow.com/q/27228350
tags question: http://stackoverflow.com/q/27156483
tags question: http://stackoverflow.com/q/27233111
tags question: http://stackoverflow.com/q/27274300
tags question: http://stackoverflow.com/q/27161327
tags question: http://stackoverflow.com/q/27258448
tags question: http://stackoverflow.com/q/27233147
tags question: http://stackoverflow.com/q/27298635
tags question: http://stackoverflow.com/q/27281735
tags question: http://stackoverflow.com/q/27278251
tags question: http://stackoverflow.com/q/27200897
tags question: http://stackoverflow.com/q/27256311
tags question: http://stackoverflow.com/q/27276902
tags question: http://stackoverflow.com/q/27177371
tags question: http://stackoverflow.com/q/27250406
tags question: http://stackoverflow.com/q/27212559
tags question: http://stackoverflow.com/q/27196942
tags question: http://stackoverflow.com/q/27184353
tags question: http://stackoverflow.com/q/27225421
tags question: http://stackoverflow.com/q/27304996
tags question: http://stackoverflow.com/q/27293326
tags question: http://stackoverflow.com/q/27214262
tags question: http://stackoverflow.com/q/27310951
tags question: http://stackoverflow.com/q/27284978
tags question: http://stackoverflow.com/q/27299227
tags question: http://stackoverflow.com/q/27160299
tags question: http://stackoverflow.com/q/27193355
tags question: http://stackoverflow.com/q/27263961
tags question: http://stackoverflow.com/q/27264120
tags question: http://stackoverflow.com/q/27169730
tags question: http://stackoverflow.com/q/27198744
tags question: http://stackoverflow.com/q/27266696
tags question: http://stackoverflow.com/q/27211497
tags question: http://stackoverflow.com/q/27198736
tags question: http://stackoverflow.com/q/27303823
tags question: http://stackoverflow.com/q/27199566
tags question: http://stackoverflow.com/q/27291918
tags question: http://stackoverflow.com/q/27270820
tags question: http://stackoverflow.com/q/27244572
tags question: http://stackoverflow.com/q/27277078
tags question: http://stackoverflow.com/q/27164525
tags question: http://stackoverflow.com/q/27203698
tags question: http://stackoverflow.com/q/27220684
tags question: http://stackoverflow.com/q/27268784
tags question: http://stackoverflow.com/q/27272760
tags question: http://stackoverflow.com/q/27267909
tags question: http://stackoverflow.com/q/27178513
tags question: http://stackoverflow.com/q/27258880
tags question: http://stackoverflow.com/q/27250504
tags question: http://stackoverflow.com/q/27156304

http://stackoverflow.com/comment/42838887
type: QuestionComment
has text: Edited it so it all looks as it should as to what I'm working on.
score: 0
comment on: http://stackoverflow.com/q/27174477
type: Comment

http://stackoverflow.com/q/27161441
downvote count: 1
has title: Line chart in D3 is all over the place
tagged with: javascript
favorite count: 0
has body: everyone! Currently trying to generate a line chart using D3 with a simple JSON data. I'm using mbostock's line chart code, I just change data.tsv with my own JSON file: [ {"date":"Aug-14","close":"1"}, {"date":"Feb-14","close":"2"}, {"date":"Jan-14","close":"1"}, {"date":"Jul-14","close":"3"}, {"date":"Jun-14","close":"1"}, {"date":"Mar-14","close":"3"}, {"date":"May-14","close":"1"}, {"date":"Nov-14","close":"1"}, {"date":"Oct-14","close":"1"}, {"date":"Sep-14","close":"1"} ] However, I get a graph that looks like this crazy line chart And I have no idea why it's drawing the lines like that. Any input would be amazing! Edit: Adding the current code I'm using. &lt;script&gt; //Setting up... var margin = {top: 20, right: 20, bottom: 30, left: 50}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var parseDate = d3.time.format("%d-%b-%y").parse; var x = d3.time.scale() .range([0, width]); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left"); var line = d3.svg.line() .x(function(d) { return x(d.date); }) .y(function(d) { return y(d.close); }); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); d3.json("test.php", function(error, data) { data.forEach(function(d) { d.date = parseDate(d.date); d.close = +d.close; console.log(d.date); }); x.domain(d3.extent(data, function(d) { return d.date; })); y.domain(d3.extent(data, function(d) { return d.close; })); svg.append("g") .attr("class", "x axis") .attr("transform", "translate(0," + height + ")") .call(xAxis); svg.append("g") .attr("class", "y axis") .call(yAxis) .append("text") .attr("transform", "rotate(-90)") .attr("y", 6) .attr("dy", ".71em") .style("text-anchor", "end") .text("Price ($)"); svg.append("path"…
has answer: http://stackoverflow.com/a/27161478
upvote count: 0
tagged with: d3.js
type: UnansweredQuestion
score: -1
type: Question
answer count: 1

http://stackoverflow.com/comment/42837479
has text: [This](http://stackoverflow.com/a/19324832) shows pretty good what it is and why it is necessary.
type: Comment
comment on: http://stackoverflow.com/a/27170523
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42971517
comment on: http://stackoverflow.com/q/27248378
score: 0
type: Comment
type: QuestionComment
has text: And what is your question?

http://stackoverflow.com/comment/42855415
comment on: http://stackoverflow.com/q/27184049
type: Comment
has text: Going to need actual examples of what "task a" and "task b with value X" are :). In general though, that looks like something you can refactor into function calls.
type: QuestionComment
score: 0

http://stackoverflow.com/a/27263072
answers question: http://stackoverflow.com/q/27262958
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: This if (n===1||2) { needs to be if (n===1||n===2) { Your code is evaluating the truthiness of 2, which is always true. Also, it's unnecessary to evaluate i===n during each iteration. This will be true only after the last iteration of the loop, so just alert(y) after the loop.

http://stackoverflow.com/a/27310253
has comment: http://stackoverflow.com/comment/43082774
has comment: http://stackoverflow.com/comment/43082703
has comment: http://stackoverflow.com/comment/43081907
answers question: http://stackoverflow.com/q/27310186
has comment: http://stackoverflow.com/comment/43082382
has body: change html formatting change jquery to var template = ' ' +' ' +' ' +v+' ' +' '; $("#all_deal_type").append(template);`
downvote count: 0
has comment: http://stackoverflow.com/comment/43081680
has comment: http://stackoverflow.com/comment/43081860
type: Answer
has comment: http://stackoverflow.com/comment/43081688
score: 1
upvote count: 1

http://stackoverflow.com/comment/42954060
type: Comment
comment on: http://stackoverflow.com/a/27238287
has text: Hi Jordan, seems that it now is passing the object but as a string, if I print the recieved variable it prints `"[object Object]"` (inclusing the quotes), I updated the question with the new form
score: 0
type: AnswerComment

http://stackoverflow.com/q/27235057
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27235711
favorite count: 0
tagged with: slider
tagged with: css
upvote count: 3
has body: Jquery UI slider gives access to class ui-slider-range to do custom css on the selected range. Is there an easy way to add custom css (in my case background color) to what is left and right of the selected range? Changing the slider background color changes both left and right, I however want a trio effect essentially of 3 separate background colors for the 3 divided regions created by the range min/max selectors;
has title: Jquery UI Slider range styling (left, and right as well)
has answer: http://stackoverflow.com/a/27235711
tagged with: jquery-ui-slider
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/7842393
type: Question
answer count: 1

http://stackoverflow.com/a/27196379
has comment: http://stackoverflow.com/comment/42897325
answers question: http://stackoverflow.com/q/27193160
has comment: http://stackoverflow.com/comment/42885769
has comment: http://stackoverflow.com/comment/42935709
has body: Well, you want to affect the "today" button, yet you are adding code for the "next" button. You want to do something like: $(".fc-today-button").click(function() { alert('Clicked Today!'); }); This applies a click event to anything with the class "fc-today-button" (that is the class that the Today button will have). Working example: $('#fullCal').fullCalendar({ events: [{ title: 'Event 1', start: moment().add(1, 'h'), end: moment().add(2, 'h'), allDay: false }], header: { left: '', center: 'prev title next today', right: '' }, timezone:'local', defaultDate: '2014-11-15', editable: false, eventLimit: false, firstDay: 6, defaultView: 'agendaWeek', }); $(".fc-today-button").click(function() { alert('Clicked Today!'); });
has comment: http://stackoverflow.com/comment/42888255
score: 4
has comment: http://stackoverflow.com/comment/42936675
has comment: http://stackoverflow.com/comment/45535645
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/42930364
type: Answer

http://stackoverflow.com/q/27178555
answer count: 1
accepted answer: http://stackoverflow.com/a/27178792
has comment: http://stackoverflow.com/comment/42887869
tagged with: http://stackoverflow.com/tag/html
tagged with: modernizr
has body: I would like to upgrade my markup to use the "picture" element, while relying on a responsive images script that I wrote as a fallback. Is there any way I can conditionally fire my responsive images script only in browsers that do not support the element? Modernizr doesn't appear to have this test available until v.3 which is still in beta, so I'm not sure I should be using that in production. Thank you!
type: AnsweredQuestion
has title: Javascript test for picture element or srcset support
has answer: http://stackoverflow.com/a/27178792
type: Question
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/42887995
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42846350

http://stackoverflow.com/q/27201078
has answer: http://stackoverflow.com/a/27201171
has answer: http://stackoverflow.com/a/27201228
has answer: http://stackoverflow.com/a/27201120
has comment: http://stackoverflow.com/comment/42885700
tagged with: onclick
has title: Javascript image src attribute returns wrong value
has body: I have a little javascript code attached to a button with onclick to the following code: function ondelete () { var getDiv = document.getElementById("imgdiv"); var lb_img = $("#imgdiv").children(); for (var i = 0; i &lt; lb_img.length; i++) { console.log(lb_img[i].src); } } This returns a single output which is great, this is the corresponding html when opened in chrome with F12 developers tool: &lt;div id="imgdiv" class="modal-body next"&gt; &lt;img draggable="false"src="http://(urlfrommywebsite)/A_LANX/get/OTc1/179f42"&gt; &lt;/div&gt; So the code should return that src attribute, but instead it returns http://127.0.0.1/stage/local/admin/galleries/gallery/2 which is my url. On other images it returns the value of another img or this same url, really weird. This all happens inside a lightbox, so the normal code without a lightbox open is &lt;div id="imgdiv" class="modal-body next"&gt;&lt;/div&gt; I'm really stuck here, so a little help is really usefull :) EDIT: No answer seems to help so far, any recommendations for other lightboxes with maybe a function like getImage() or something simular? p.s. fancybox doesn't quitte work for me either.
tagged with: src
type: Question
linked to: http://stackoverflow.com/q/8149203
tagged with: javascript
tagged with: jquery
answer count: 3
score: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42885629
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/43077178
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27307432
has text: try adding a console.log() statement after you get your lat long values from the file and see what they are as they get passed to LatLng function.

http://stackoverflow.com/comment/43031077
type: Comment
comment on: http://stackoverflow.com/a/27280368
type: AnswerComment
score: 0
has text: @Austin your ajax itself is not cross-domain then. but that your `console.log` messages work the right way is reall strange. will update my answer with a suggestion to solve your problem in a sec.

http://stackoverflow.com/a/27262227
answers question: http://stackoverflow.com/q/27261792
score: 1
downvote count: 0
has body: First of all - in case you missed it in pretty much every tutorial about Angular - Do Not Modify DOM Within a Controller! This will spare you a lot of headaches and will place you on the right path of using Angular properly. Angular uses a different paradigm (MVVM) than typical jQuery-built apps. So, your pushCommand could just be: $scope.pushCommand = function () { var cmdText = $scope.text; if (!cmdText) { cmdText = 'ERROR! NO INPUT...'; } $scope.text = ''; $scope.commands.push(cmdText); }; and your HTML (notice the ng-repeat): &lt;form ng-submit="pushCommand()"&gt; &lt;input type="text" id="new-command" ng-model="text" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;p class="command" ng-repeat="cmd in commands track by $index"&gt;{{cmd}}&lt;/p&gt; &lt;p id="current-input"&gt;{{ text }}&lt;span class="block"&gt;&lt;/span&gt; I don't see the lag that you are referring to, but this would be a good place to start to identify what, if anything, is laggy and how to fix it. Here's your forked fiddle
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42981382
comment on: http://stackoverflow.com/q/27250221
type: Comment
score: 0
type: QuestionComment
has text: you want to check if enhanceddetails != null or empty ??

http://stackoverflow.com/a/27294833
has body: If you're creating multi-page applications, you should try to separate it out into different bundles. It's all about "time to glass". If you include stuff that you don't need on the page, then it will load slower, which users never want. I would suggest setting up a base bundle that is used between pages and is needed for everything, cache the hell out of it, and then set up page specific bundles.
answers question: http://stackoverflow.com/q/27294730
score: 0
has comment: http://stackoverflow.com/comment/43054451
type: Answer
has comment: http://stackoverflow.com/comment/43057013
has comment: http://stackoverflow.com/comment/43054512

http://stackoverflow.com/comment/42936426
type: Comment
has text: @BlueShark can you make a jsfiddle?
score: 0
comment on: http://stackoverflow.com/a/27229460
type: AnswerComment

http://stackoverflow.com/comment/43070750
type: Comment
type: QuestionComment
has text: @Adam, the purpose is to add menu separators, but with a ability to hide the first and last ones from each row. CSS selectors won't work because the `first-child- or `nth-of-type` can change, based on the width of the container.
comment on: http://stackoverflow.com/q/27303127
score: 0

http://stackoverflow.com/a/27303917
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27303803
upvote count: 5
has body: The unary + operator casts the instance to a Number in the same way that calling the Number() function will cast a variable to a Number. If you'd like to override how your specific instance is cast, you need to override the valueOf property for that instance: var a = { valueOf: function () { return 5; } }; console.log(a); //Object { valueOf: function () {...} } console.log(+a); //5 From the ES5 standard: 11.4.6 Unary + Operator # Ⓣ Ⓡ Ⓖ The unary + operator converts its operand to Number type. The production UnaryExpression : + UnaryExpression is evaluated as follows: Let expr be the result of evaluating UnaryExpression. Return ToNumber(GetValue(expr)). ToNumber on an Object will then result in a ToPrimitive with hint Number. ToPrimitive will then call the DefaultValue internal method which states: When the DefaultValue internal method of O is called with hint Number, the following steps are taken: Let valueOf be the result of calling the Get internal method of object O with argument "valueOf". If IsCallable(valueOf) is true then, Let val be the result of calling the Call internal method of valueOf, with O as the this value and an empty argument list. If val is a primitive value, return val. Let toString be the result of calling the Get internal method of object O with argument "toString". If IsCallable(toString) is true then, Let str be the result of calling the Call internal method of toString, with O as the this value and an empty argument list. If str is a primitive value, return str. Throw a TypeError exception.
has comment: http://stackoverflow.com/comment/43071493
answers question: http://stackoverflow.com/q/27303803
score: 5
type: AcceptedAnswer

http://stackoverflow.com/a/27290846
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27290021
has comment: http://stackoverflow.com/comment/43050149
type: Answer
has body: From the docs: $(function() { $('.item').matchHeight(); }); Will set all elements with the class item to the height of the tallest. That means that you have to give your sidebar and your content area the same class (at the moment they don't have a common class) Here's a demo of it working as expected.
score: 0
accepted answer of: http://stackoverflow.com/q/27290021

http://stackoverflow.com/q/27181806
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/42882498
type: Question
tagged with: javascript
has title: Maintain dynamically added controls and its values using javascript in asp.net
score: 0
has body: Good Morning, I wrote a simple javascript to add rows into the table, then a label &amp; checkbox in the row using javascript and I put a asp:button to postback the page. Now I need to display the data whatever I have added before postback(I click on the button). Can I have a piece of code what to write in code behind. Can anyone help. Thanks for your help in advance. Code I have wrote in a input type button to add: var row = tblrw.insertRow(tblrw.rows.length); rl = tblrw.rows.length; var i = document.getElementById('txtAddItem').value; var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var element1 = document.createElement("input"); var element2 = document.createElement("label"); element1.type = "checkbox"; element1.id = "chk" + i; element1.className = "chkclass"; element2.appendChild(document.createTextNode(i)); element2.className = "lblclass"; element2.id = "lbl" + i; cell1.appendChild(element1); cell2.appendChild(element2); document.getElementById('txtAddItem').value = "";
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42852192

http://stackoverflow.com/a/27202224
has body: That's because you're not returning the object: function custom(obj){ obj.name="johnson"; return obj; } Fiddle
has comment: http://stackoverflow.com/comment/42887622
has comment: http://stackoverflow.com/comment/42887638
score: 4
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/27202201

http://stackoverflow.com/comment/42871299
has text: Can you check your Network Tab in the Chrome Debugger tool and see which call is getting failed.
comment on: http://stackoverflow.com/q/27192298
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27238100
type: Question
has comment: http://stackoverflow.com/comment/42952957
has comment: http://stackoverflow.com/comment/42953346
tagged with: javascript
has comment: http://stackoverflow.com/comment/42953310
score: 0
has comment: http://stackoverflow.com/comment/42953430
has title: Changed background color based on td number using ID
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42953102
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42953010
has comment: http://stackoverflow.com/comment/42952976
has comment: http://stackoverflow.com/comment/42952961
answer count: 0
has body: I am having trouble changing a background color of a table cell based on its value. I have made it work using the var elems = document.getElementsByTagName(td); But I would like to make it check the number with an ID tag. The reason is because I will have multiple rows where the variable range of good and bad (green or red) will be different. My javascript looks like: var elems = document.getElementById("cho"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerHTML>7) { elems[i].style.background="#ef0401";} if (elems[i].innerHTML<=7) { elems[i].style.background="#4CB900";} } I tried looking this up, do I have to replace innerHTML with children? Here is the HTML Total CholesterolA Type of Fat 80 LDL"Bad" Cholesterol 1 A link to jsfiddle

http://stackoverflow.com/q/27222461
type: Question
tagged with: css
score: 0
answer count: 2
has body: If this is a poor question I apologize in advance, I'll try to make it as clear as possible. I'm making a game from jquery + HTML 5. It's a round based game, if you win a round the round number increases by 1, if you lose, the round number resets to 0. Example: endGame: function() { $($('[data-round]').get(0)).text('0'); This all works perfectly fine, What I need is to change a CSS element based off of $('[data-round]'). for every time the number increases I need a CSS element to increase in height by 20px. Specifically: I need to increase #fill{ height: 0px;} +20px. every time $('[data-round]') increases by 1. Then if $('[data-round]') returns to 0, #fill{ height: 0px;} so.. if ('[data-round]') = 0 then #fill{ height: 0px;} and ('[data-round]') = 1 then #fill{ height: 20px;} ('[data-round]') = 2 then #fill{ height: 40px;} ('[data-round]') = 3 then #fill{ height: 60px;} and so on.. Can anybody help? HTML structure: Round: 0 Play Game Sorry, you lost after rounds!
has comment: http://stackoverflow.com/comment/42923582
has comment: http://stackoverflow.com/comment/42923605
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/27222507
has title: Change css from data-number
has answer: http://stackoverflow.com/a/27222824

http://stackoverflow.com/q/27228046
accepted answer: http://stackoverflow.com/a/27228120
possible better answer: http://stackoverflow.com/a/27228168
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27228120
tagged with: scroll
type: Question
has title: jQuery select DIV by class name starting from top
has body: I have a structure like the following to create a one page web application, using some scroll functionalities: &lt;div class="home_section"&gt;&lt;/div&gt; &lt;!-- 1 --&gt; &lt;div class="home_section"&gt;&lt;/div&gt; &lt;!-- 2 --&gt; &lt;div class="home_section"&gt;&lt;/div&gt; &lt;!-- 3 --&gt; &lt;div class="home_section"&gt;&lt;/div&gt; &lt;!-- 4 --&gt; I need to scroll to each of the above DIVs when the scroll event starts. So, for example, when the scroll starts, if the first DIV visible from top is &lt;!-- 2 --&gt;, the body will have to scroll to the DIV &lt;!-- 3 --&gt; automatically. This is what I am doing: if ($(this).attr('id') == 'home') { $(document).on("scrollstart", function (e) { console.log('scrolling started on home'); e.preventDefault(); var next = $(this).find(".home_section"); //here I need to calculate which is the next DIV to scroll to $('html, body').animate({ scrollTop: next.offset().top }); }); } The problem is that I do not know how to check which is the first .home_section DIV visibile starting from top, so I am unable to calculate which is the next target DIV to scroll to. Thanks for ay help
has answer: http://stackoverflow.com/a/27228168
upvote count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/27228235
linked to: http://stackoverflow.com/q/24768795

http://stackoverflow.com/q/27217242
has answer: http://stackoverflow.com/a/34757720
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm looking for the fastest way to create formules inside a web page. I thought I found the solution on jsperf in which MathQuill is by far the quickest. After I studied the tests a bit I noticed that the test for MathQuill runs in sync-mode, but it had an async setup. However, if you check the async checkbox, MathQuill will never fire the render event and thus the test will never complete. So the questions is, is MathQuill async ? And is this is good performance test ? And is there maybe a better formula renderer ?
possible better answer: http://stackoverflow.com/a/65823032
tagged with: katex
tagged with: mathquill
has answer: http://stackoverflow.com/a/65823032
linked to: http://stackoverflow.com/q/3284131
accepted answer: http://stackoverflow.com/a/34757720
type: Question
tagged with: mathjax
type: AnsweredQuestion
tagged with: performance
has title: compare performance MathJax vs MathQuill vs Katex
score: 12
answer count: 2
upvote count: 12

http://stackoverflow.com/q/27219964
accepted answer: http://stackoverflow.com/a/27220090
has title: recursive in callback functions
tagged with: node.js
has body: I have a function with callback, where I'm using "listTables" method of dynamoDB, which returns just 100 table names and if there is anymore tables, it returns another field called "LastEvaluatedTableName" which we can use in our new query in listTables to query another 100 tables from the mentioned "LastEvaluatedTableName"; how can I have recursion in callbacks in javascript in this logic? I have tried the following which is not correct: module.exports.ListTables = function (start, callback) { var params; if (start) { params = { "ExclusiveStartTableName": start }; } dynamodb.listTables(params, function (err, data) { var totalData = []; totalData.push(data); if (data.LastEvaluatedTableName) { data = module.exports.ListTables(data.LastEvaluatedTableName); } callback(err, totalData); }); } Please let me know if you need more clarifications! Thanks!
type: AnsweredQuestion
tagged with: recursion
type: Question
has answer: http://stackoverflow.com/a/27220090
answer count: 1
tagged with: javascript
tagged with: express
score: 0

http://stackoverflow.com/a/27295323
has comment: http://stackoverflow.com/comment/43056648
has body: You didn't define the angular module 'builder' anywhere. The following format (which your file uses): angular.module("builder") means, "use the angular module 'builder' which I have already defined." The following format: angular.module("builder",[]) means, "create the angular module 'builder' right here and now (and eliminate any previous one)". You can create and use at the same time as: angular.module("builder",[]).config(.... but you must define it somewhere at least once.
answers question: http://stackoverflow.com/q/27294929
has comment: http://stackoverflow.com/comment/43087683
has comment: http://stackoverflow.com/comment/43087107
score: 0
type: Answer

http://stackoverflow.com/q/27254810
type: Question
accepted answer: http://stackoverflow.com/a/27274941
possible better answer: http://stackoverflow.com/a/27275283
has comment: http://stackoverflow.com/comment/42984497
has body: I have a circular image that rotates on page load and stops and starts on mouseover/out. The circle is also draggable so that I can manually spin it. This all works fine in Mozilla, but doesn't work so well in Chrome. The problem is that it doesn't re-initiate the rotateCircle(); on mouseout. can anyone help find out why this is? I am using jQueryRotate and Greensock Draggable for this. $(function() { var angle = 0; var int; rotateCircle(); function rotateCircle() { int = setInterval(function() { angle += 3; $("#circle").rotate(angle); }, 100); } $("#circle").mouseover(function() { clearInterval(int); Draggable.create("#circle", {type:"rotation",throwProps:true}); }).mouseout(function() { rotateCircle(); }); }); &lt;/script&gt;
has answer: http://stackoverflow.com/a/27275283
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: JQuery rotate - re-initiate rotation in chrome
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42986171
has answer: http://stackoverflow.com/a/27274941
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42983875
has comment: http://stackoverflow.com/comment/42986601

http://stackoverflow.com/comment/42977498
score: 0
comment on: http://stackoverflow.com/q/27251651
type: Comment
type: QuestionComment
has text: @jValdron Thanks for the tip. That worked a treat!

http://stackoverflow.com/comment/42993980
type: AnswerComment
has text: No kidding. I'm using SetValue instead of SetValues. The data is being written vertically although it should be horizontally. With these corrections, it works.
score: 0
comment on: http://stackoverflow.com/a/27259033
type: Comment

http://stackoverflow.com/comment/42829018
score: 0
type: AnswerComment
has text: where do you set monthNames? I suppose in calendar.js. what datepicker are you using?
type: Comment
comment on: http://stackoverflow.com/a/27168559

http://stackoverflow.com/comment/42905820
has text: Was this answer useful to you? - if it helped, you can accept it - that way others will be able to learn from your question
comment on: http://stackoverflow.com/a/27211521
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27290111
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27290958
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to move control around inside a fieldset using keydown event, but moving the control 1px up or down in Firefox results in a massive jump down every time you press the up or down key. I'm using jQuery to get the position of the control and it seems to add either 18 or 20 pixels to the Top property of the position object. In Chrome and IE10 the jQuery method seems to work. So I tried normal JavaScript, but that seems even worse and I get the same problem in Firefox and Chrome with this. The first JSFiddle is using jQuery. The second is using normal JavaScript. JSFiddle with jQuery JSFiddle with plain JavaScript html: blablablabla Some Label js: $(document).ready(function () { $("#MyFieldSet").resizable(); $("#MyLabel").css({"position": "absolute", "top": " 20px"}); $(document) .keydown(function (event) { var $SelectedControl = $("#MyLabel"); $("#Lbl_Position").text($SelectedControl.position().top); if (event.which == '40') // down { var Top = $SelectedControl.position().top + 1; $SelectedControl.css({"top": Top + "px"}); } else if (event.which == '38') // up { var Top = $SelectedControl.position().top - 1; $SelectedControl.css({ "top": Top + "px" }); } }); }); I added the resizable so it's as close to my actual work as possible. Am I missing something? Anyone got any ideas how to get this to work?
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27290958
has title: HTML Fieldset incorrect JQuery.position in Firefox
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27187190
score: 1
has comment: http://stackoverflow.com/comment/42861817
has comment: http://stackoverflow.com/comment/42861938
has comment: http://stackoverflow.com/comment/42861748
downvote count: 0
type: AcceptedAnswer
has body: Please read this Caveats of the load event when used with images ( same applies to videos ) A common challenge developers attempt to solve using the .load() shortcut is to execute a function when an image (or collection of images) have completely loaded. There are several known caveats with this that should be noted. These are: It doesn't work consistently nor reliably cross-browser It doesn't fire correctly in WebKit if the image src is set to the same src as before It doesn't correctly bubble up the DOM tree Can cease to fire for images that already live in the browser's cache Solution: I would suggest trying this : $("video").on("load",function() { $("#screen").fadeIn(); });
accepted answer of: http://stackoverflow.com/q/27186585
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27186585

mapmyindia-api
tags question: http://stackoverflow.com/q/27211053
type: Tag
tag name: mapmyindia-api

http://stackoverflow.com/q/27242000
has answer: http://stackoverflow.com/a/27242016
type: AnsweredQuestion
type: Question
score: 5
accepted answer: http://stackoverflow.com/a/27242102
upvote count: 5
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27242068
answer count: 3
tagged with: jquery-selectors
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has title: jQuery Multi Select Option - Check if a option is selected or not
favorite count: 0
has body: I have a HTML Multi select box All Volvo Saab Opel Audi What I am trying to do is check if option "All" is selected or not in jQuery. What I have tried is But it is not working. Can anyone help me please? Thanks in advance for helping.
has answer: http://stackoverflow.com/a/27242102
possible better answer: http://stackoverflow.com/a/27242016

http://stackoverflow.com/comment/42860201
comment on: http://stackoverflow.com/q/27186595
has text: Do you open window to send e-mail in the same window where javascript place? If it is, your script never been working.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42814912
score: 0
type: AnswerComment
has text: Is it really `<custom-column="column">`? That seems to be invalid HTML.
type: Comment
comment on: http://stackoverflow.com/a/27160609

http://stackoverflow.com/q/27176846
has comment: http://stackoverflow.com/comment/42842819
has answer: http://stackoverflow.com/a/27176967
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27184259
tagged with: angularjs-scope
type: Question
has body: I have a run block that is querying my server to check if the user is authenticated. .run(function($http, userService){ var base_url = 'http://server.com:3000'; $http.get(base_url + '/users/isloggedin') .success(function(data, status, headers, config){ userService.setUserData(data.userData); userService.setIsUserLoggedIn(true); }); }) Later, I have another run that will require info from the first run block. The problem with this is that my run code has async code and I am not getting the true value at the first time to userService.getIsUserLoggedIn(). How can I tell angularjs to execute the second run block only after the first one has been completed? The second run block: .run(function($rootScope, $location, $state, userService){ //Run to handle authentication var authOnly = ['/painel']; var unAuthOnly = ['/home']; var checkAuthRoute = function(url){ var exist = authOnly.indexOf(url); return exist &gt; -1; }; var checkUnAuthRoute = function(url){ var exist = unAuthOnly.indexOf(url); return exist &gt; -1; }; $rootScope.$on('$stateChangeStart', function(evt, toState, toParams, fromState, fromParams){ console.log(toState.url + ' ' + fromState.url + ' - ' + userService.getIsUserLoggedIn()); if(!userService.getIsUserLoggedIn() &amp;&amp; checkAuthRoute(toState.url)){ console.log('Aqui..'); evt.preventDefault(); $state.go('login'); } }); }) Thanks
has title: How use async code inside app.run?
tagged with: javascript
answer count: 2
upvote count: 1

http://stackoverflow.com/q/27305786
possible better answer: http://stackoverflow.com/a/27305953
has comment: http://stackoverflow.com/comment/43074278
has answer: http://stackoverflow.com/a/27305953
has comment: http://stackoverflow.com/comment/43074269
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43074432
score: 1
has comment: http://stackoverflow.com/comment/43074342
favorite count: 0
has title: HTML and JavaScript Code Review
has comment: http://stackoverflow.com/comment/43074215
has comment: http://stackoverflow.com/comment/43074502
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/27305937
has body: Please Have a Look at my code i am not getting results when function total_Cost(); is called i am not understanding why this is happening to me. function total_Cost() { var x = document.getElemenById('1'); var y = document.getElemenById('2'); var z = document.getElemenById('3'); var s = document.getElemenById('cost'); s.value = (x.value * 3.49) + (y.value * 3.60) + (z.value * 4.49); } &lt;body&gt; &lt;h2&gt;Coffee Order Form&lt;/h2&gt; &lt;form method='get'&gt; &lt;table border="1" cellpadding='0px' cellspacing='0px'&gt; &lt;tr&gt;&lt;th&gt;Product Name &lt;/th&gt;&lt;th&gt;Price&lt;/th&gt;&lt;th&gt;Quantity&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;French Vanilla (1 lb)&lt;/td&gt;&lt;td&gt;$3.49&lt;/td&gt;&lt;td&gt;&lt;input type = "text" size='5'id='1' value=''&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Hazelnut Cream (1 lb)&lt;/td&gt;&lt;td&gt;$3.60&lt;/td&gt;&lt;td&gt;&lt;input type = "text" size='5'id='2' value=''&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td align='centre'&gt;Colombian (1 lb)&lt;/td&gt;&lt;td&gt;$4.49&lt;/td&gt;&lt;td&gt;&lt;input type = "text" size='5' id='3' value=''&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;br&gt; &lt;input type='button' Value='Total Cost' id='total' onclick='return total_Cost();'&gt; &amp;nbsp;&lt;input type = "text" size='10' id='cost' value=''&gt; &lt;br&gt; &lt;br&gt; &lt;input type='submit' Value='Submit Order'&gt; &amp;nbsp; &lt;input type='submit' Value='Clear Order Form'&gt; &lt;/form&gt; &lt;/body&gt;
answer count: 2
has comment: http://stackoverflow.com/comment/43074319
has comment: http://stackoverflow.com/comment/43074464
has comment: http://stackoverflow.com/comment/43074220
downvote count: 1
has comment: http://stackoverflow.com/comment/43074397
tagged with: function
has answer: http://stackoverflow.com/a/27305937
tagged with: javascript

http://stackoverflow.com/comment/43032820
type: Comment
has text: I took it out before posting because it done nothing. Tried it again when you posted but still does nothing. I just dont understand how everything else on my page (banner, navbar, the gallary main image) all is centered, its just the thumbnails that aren't. :(
comment on: http://stackoverflow.com/a/27281433
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43087773
score: 2
type: AnswerComment
has text: Your first option is not a good pattern to follow in modern jQuery (that's why we have delegated events). :)
type: Comment
comment on: http://stackoverflow.com/a/27313765

http://stackoverflow.com/q/27209707
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: intervals
favorite count: 0
tagged with: angularjs
has title: Execute method with Angular's $timeout in a for loop
possible better answer: http://stackoverflow.com/a/27209812
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27209812
has body: I'm learning AngularJS. What I want to do is execute a method in a for loop with $timeout. Here is example: for(var i = 0; i &lt; 10; i++) { $timeout(function(i) { someMethod(i); }, 1000); } function someMethod(i) { console.log('Executed : ', i); } But I cannot pass variable 'i'. How can I achieve this? Also, I'd like to know how to solve this problem with Angular $interval() as well. Thanks!
upvote count: 3
has answer: http://stackoverflow.com/a/27209744
tagged with: timeout
type: Question
accepted answer: http://stackoverflow.com/a/27209744

http://stackoverflow.com/comment/42913354
has text: Your post led me to my answer: `optionsList[1].value`
type: Comment
comment on: http://stackoverflow.com/a/27216516
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42844489
type: Comment
comment on: http://stackoverflow.com/a/27177754
score: 0
type: AnswerComment
has text: Unfortunately I've never used node.js so I can't help you there.

http://stackoverflow.com/comment/42804161
type: QuestionComment
comment on: http://stackoverflow.com/q/27154764
has text: There's a `getDay()` method in `Date`. Notice, that `new Date(2014, 1, 1)` doesn't probably return what you think, months are zero-based.
score: 0
type: Comment

http://stackoverflow.com/q/27181637
has comment: http://stackoverflow.com/comment/42851510
tagged with: http://stackoverflow.com/tag/html
has title: jQuery code not executed in JSFiddle
tagged with: regex
has answer: http://stackoverflow.com/a/27181690
type: AnsweredQuestion
downvote count: 0
has body: I am still learning jQuery and I referred to some tutorials online. I got my code from this site and i plugged it into JSFiddle to try but it didn`t work: http://www.leniel.net/2012/10/javascript-regex-jquery-to-match-only-english-characters-in-input-textbox.html#sthash.XQxbhteA.1FTBwPAJ.dpbs HTML &lt;input id="mytextbox" style="width:300px" placeholder="Only English letters are allowed here..."&gt; JS $("#mytextbox").on("keypress", function(event) { // Disallow anything not matching the regex pattern (A to Z uppercase, a to z lowercase and white space) // For more on JavaScript Regular Expressions, look here: https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions var englishAlphabetAndWhiteSpace = /[A-Za-z ]/g; // Retrieving the key from the char code passed in event.which // For more info on even.which, look here: http://stackoverflow.com/q/3050984/114029 var key = String.fromCharCode(event.which); //alert(event.keyCode); // For the keyCodes, look here: http://stackoverflow.com/a/3781360/114029 // keyCode == 8 is backspace // keyCode == 37 is left arrow // keyCode == 39 is right arrow // englishAlphabetAndWhiteSpace.test(key) does the matching, that is, test the key just typed against the regex pattern if (event.keyCode == 8 || event.keyCode == 37 || event.keyCode == 39 || englishAlphabetAndWhiteSpace.test(key)) { return true; } // If we got this far, just return false because a disallowed key was typed. return false; }); $('#mytextbox').on("paste",function(e) { e.preventDefault(); }); The framework I used was No-Library (pure JS) and extension was set to onload. This script however seems to work on the site I referred to. May I know where I did wrong? Would it be that I did not include some jQuery libraries?
type: Question
has answer: http://stackoverflow.com/a/27181695
linked to: http://stackoverflow.com/q/3050984
tagged with: jsfiddle
accepted answer: http://stackoverflow.com/a/27181695
score: 1
possible better answer: http://stackoverflow.com/a/27181652
answer count: 3
has answer: http://stackoverflow.com/a/27181652
upvote count: 1
linked to: http://stackoverflow.com/q/3781142
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42851490
favorite count: 0

http://stackoverflow.com/comment/42858177
has text: when i add alert(sensorNumber) before the if block I get exactly the number that is written in the selected row
comment on: http://stackoverflow.com/a/27185488
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43068579
has text: Yeah, I said I replaced it. My bad, I should've been more clear. I removed the complete: code, and did as you said, and it still doesn't work correctly. I do have a lot of semicolons in my "Stuff" field. ".dat" is now "#dat," by the way.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27301512

http://stackoverflow.com/comment/42864404
comment on: http://stackoverflow.com/a/27176743
has text: I see, sorry about that. However I can't find a way to revert it as there is no 'rollback' link and nothing happens when switching revision. If anyone knows how, please feel free to do so.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42843247
type: QuestionComment
score: 1
has text: Pretty sure fullPage.js is what you're looking for and has the capability to enable normal scrolling at the end of the page.
type: Comment
comment on: http://stackoverflow.com/q/27177032

http://stackoverflow.com/q/27255757
tagged with: android
tagged with: cordova
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42985932
type: Question
has body: I have following code to save image from url to Download folder var filename = url.replace(/^.*[\\\/]/, ''); var filePath = cordova.file.externalRootDirectory + 'Download/' + filename; $cordovaFile.downloadFile(url, filePath, true, {}) .then(function(result) { // Success! $cordovaToast.showShortCenter('This picture has been saved!'); }, function(err) { $ionicPopup.alert({ title: 'Error!', template: angular.toJson(err) }); }); It saves the image successfully. I can explore the file in the SD card. But it is not visible in Gallery app. When i search for it, i found that we should run some media scanner on that file. How do i run media scanner? is there any api?
tagged with: javascript
has answer: http://stackoverflow.com/a/27256439
tagged with: ionic-framework
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42986491
favorite count: 0
tagged with: cordova-plugins
has title: Gallery does not show the image after download?
type: UnansweredQuestion

http://stackoverflow.com/comment/43086978
comment on: http://stackoverflow.com/q/27313001
has text: Try to open this URL on mobile and see whether its loading or not. http://fantasy.nfl.com/league/1444853/team/1/gamecenter?week=14
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27317462
answers question: http://stackoverflow.com/q/27313696
downvote count: 0
has comment: http://stackoverflow.com/comment/43095566
has comment: http://stackoverflow.com/comment/43569837
has body: You are only using the Firebase JavaScript library and not AngularFire. AngularFire is built on top of the Firebase JS library and Angular. AngularFire does a lot of useful things such as, auto synchronizing objects and arrays (you might want to check that out for your array example). AngularFire also handles $scope.apply properly. This way any updates are applied to the view. If you choose not use AngularFire, you'll need to wrap the parts of your code that update the view in the $timeout service. Plunker $scope.createUser = function(){ ref.createUser({ email : "a.b@c.com", password : "mypassword" }, function(error) { // this will update the view because it's wrapped in $timeout $timeout(function() { if (error === null) { console.log("User created successfully"); AlertService.addSuccessAlert("User created successfully"); } else { console.log("Error creating user:", error); AlertService.addWarningAlert("Error while creating user"); } }); }); } I highly recommend giving the AngularFire docs a good read. It will save you a fair amount of time in your project.
score: 5
type: AcceptedAnswer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/27313696
type: Answer

http://stackoverflow.com/a/27295598
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27295387
has body: try this: Assign some id to your header to discriminate other ul if at all they are on the page $("#header li").click(function(){ $(this).attr("class", "selectedtab"); $("#header li").not(this).removeAttr("class"); }); sample html: Home Contact AboutUs Projects hiiiii
accepted answer of: http://stackoverflow.com/q/27295387
score: 0

http://stackoverflow.com/q/27184130
tagged with: upload
tagged with: javascript
has answer: http://stackoverflow.com/a/27184391
tagged with: ajax
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27184391
type: Question
has title: How to deal file upload error with XmlHttpRequest and asp.net mvc?
score: 0
answer count: 1
has body: for simplicity: client: var xrh = new XmlHttpRequest(); ... xrh.onerror = on_upload_error; xrh.send(...) server: public class file_transfer { [HttpPost] public void Upload(HttpPostedFileBase[] files_to_upload) { ... if (succeeded) { // what should I to to let the client know the success? in onload } else { // what should I to to let the client know the failaure? maybe in onerror } } } what should I to to let the client know the success? in onload? what should I to to let the client know the failaure? maybe in onerror?
tagged with: asp.net-mvc

http://stackoverflow.com/a/27246927
type: Answer
answers question: http://stackoverflow.com/q/27246676
score: 0
has body: Maybe not the best solution - but you could do something like: $.fn.added = function() { console.log('inserted'); }; $('body').append('&lt;div&gt;&lt;/div&gt;').added(); $('body').append('&lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;').added();

http://stackoverflow.com/a/27277843
score: 0
has body: Turns out the prevent default suggested broke all a links on the page and what i didn't realise was I had a height:100% on the body and html which was preventing the back to top button from working. After removing that the back to top works.
answers question: http://stackoverflow.com/q/27277006
type: Answer

http://stackoverflow.com/q/27262846
has comment: http://stackoverflow.com/comment/42998289
has body: Trying to propagate a value to five input fields on a button press. I am trying: <input name="common<?php echo"$timeItem"?>" id="common<?php echo"$timeItem"?>" class="form-control input-sm" style="width:55px; height:20px; margin:0; padding:2px; text-align: center;" type="text" value="111"> <button type="button" onclick=' myElement = document.getElementById("common<?php echo $temp;?>").value; document.getElementById("time_id<?php echo $temp;?>").innerHTML = myElement; <?php $temp=$temp-1;?> document.getElementById("time_id<?php echo $temp;?>").innerHTML = myElement; <?php $temp=$temp-1;?> document.getElementById("time_id<?php echo $temp;?>").innerHTML = myElement; <?php $temp=$temp-1;?> document.getElementById("time_id<?php echo $temp;?>").innerHTML = myElement; <?php $temp=$temp-1;?> document.getElementById("time_id<?php echo $temp;?>").innerHTML = myElement'> Click me to update. but I am being told "Cannot set property 'innerHTML' of null". I just cannot see why this is not picking up the value of the input text field which seems to have the right spelling! EDIT: This is how it is rendered by the browser - easier to read: Click blah blah.
has comment: http://stackoverflow.com/comment/42998197
answer count: 3
has answer: http://stackoverflow.com/a/27262959
tagged with: javascript
has answer: http://stackoverflow.com/a/27262936
score: 0
has comment: http://stackoverflow.com/comment/42998418
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27262942
accepted answer: http://stackoverflow.com/a/27262942
type: Question
has comment: http://stackoverflow.com/comment/42998380
possible better answer: http://stackoverflow.com/a/27262936
has title: Javascript not reading value on getElementById

http://stackoverflow.com/comment/42919399
type: QuestionComment
comment on: http://stackoverflow.com/q/27220028
has text: Please provide somo more description, like part of html, css and javascript you have used so someone can help you
score: 0
type: Comment

http://stackoverflow.com/q/27237832
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42952424
downvote count: 3
has body: I have a game in jquery in which if you press right key on the keyboard it loads a certain image and if you press left key on the keyboard it loads another image . My problem is that all of this is happening in an interval that keeps repeating . As soon as the program finds that my right key is no longer pressed it will automatically draw the second Image. I want it to do the following : - if I press right arrow, it will draw the Image1 and remain in that state until I press the left key -if I press left arrow, I want my Image2 to be drawn and remain in that state until I press the right key If I do this in a while loop my web page will crash because it will stay in that while loop and what follows won t be executed . This is working, but as soon as I release the right key, rightDown will be false and when the program finds the if statement again it will draw my Image2 . (the interval is really fast) if(rightDown)drawImage1(); else drawImage2(); If I use this if(rightDown)drawImage1(); else if(leftDown) drawImage2(); and I don t press the left or right key no image will be drawn. rightDown and leftDown function onKeyDown(evt) { if (evt.keyCode == 39) rightDown = true; else if (evt.keyCode == 37) leftDown = true; else if (evt.keyCode == 38) upKeyDown = true; else if(evt.keyCode == 40) downKeyDown = true; } and the part when they are not clicked function onKeyUp(evt) { if (evt.keyCode == 39) rightDown = false; else if (evt.keyCode == 37) leftDown = false; else if (evt.keyCode == 38) upKeyDown = false; else if (evt.keyCode == 40) downKeyDown = false; } $(document).keydown(onKeyDown); $(document).keyup(onKeyUp);
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has title: How can you define something to happen and remain in that state?
type: Question
has answer: http://stackoverflow.com/a/27238150
score: -2
favorite count: 0
has comment: http://stackoverflow.com/comment/42952821

http://stackoverflow.com/comment/42953927
has text: possible duplicate of [how to trigger click event on dynamically created element in jquery](http://stackoverflow.com/questions/18734393/how-to-trigger-click-event-on-dynamically-created-element-in-jquery)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27238614

http://stackoverflow.com/comment/42948879
type: QuestionComment
score: 0
has text: value can not be null so those null checks are useless. And learn about the [label element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label)
comment on: http://stackoverflow.com/q/27236173
type: Comment

http://stackoverflow.com/a/35548094
score: 53
has comment: http://stackoverflow.com/comment/58871007
type: Answer
upvote count: 54
has body: ES6-style with recursion: Redacted June 2018 Update: There is now an ES proposal for an Array.prototype.flat method. It is currently at stage 3, meaning it's likely to be implemented by browsers soon(ish) and make it into the spec in its current form. There are probably some polyfills floating around. Example: const nested = [[[0], [1]], [[2], [3]], [[4], [5]]]; const flattened = nested.flat(2); // Need to specify depth if &gt; 1 June 2019 Update: Array.prototype.flat was officially added to the language in the ES2019 spec.
downvote count: 1
has comment: http://stackoverflow.com/comment/121601899
answers question: http://stackoverflow.com/q/27266550
has comment: http://stackoverflow.com/comment/125699816

http://stackoverflow.com/q/27179434
has answer: http://stackoverflow.com/a/27179469
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27179584
has answer: http://stackoverflow.com/a/27179584
tagged with: javascript
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27179469
has title: Reg Ex: Match numbers after specific string
has body: Using Reg Ex (in this case Javascript's implementation) is it possible to match the numbers after a particular string? Example: In the following example match only the numbers that follow any string of 'airplane' and not the numbers following any other string. airplane737 train232 motorbike995 car66 airplane747 Many thanks in advance for help D
tagged with: regex

http://stackoverflow.com/q/27153015
type: AnsweredQuestion
has title: Change in nvd3 graph only when screen size is adjusted
has body: I have page with a set of input radio options and a nvd3 graph. I want that when the user clicks one of the radio options the graph represents the values of that radio option. I found how to do that with the help of Strange functionality of NVD3 Graph when updating data Only my code doesn't work 100%. The data in the graph is only updated after resizing the screen. What am I missing here? Here is my code: http://jsfiddle.net/h4tzLd1u/3/ var staafgrafiek; var chartData; nv.addGraph(function () { var width = 320, height = 300; var staafgrafiek = nv.models.multiBarChart(); staafgrafiek.showControls(false) staafgrafiek.groupSpacing(0.05) staafgrafiek.reduceXTicks(false) staafgrafiek.yAxis.tickFormat(function (d) { return '€' + d3.format('s')(d) }) staafgrafiek.xAxis.tickFormat(d3.format('.0f')) staafgrafiek.width(width) staafgrafiek.height(height) var data_2011 = [{ key: "Salary", color: "#d96704", values: [{ x: 2011, y: 38788 }, { x: 2012, y: 2001 }, { x: 2013, y: 50000 }] }, { key: "Adjusted", color: "#3c8c30", values: [{ x: 2011, y: 30263 }, { x: 2012, y: 30263 }, { x: 2013, y: 30263 }] }]; chartData = d3.select('#staafgrafiek svg').datum(data_2011); chartData.transition().duration(1000).call(staafgrafiek).attr('width', width).attr('height', height); nv.utils.windowResize(staafgrafiek.update); return staafgrafiek; }); var data_2009 = [{ key: "Salary", color: "#d96704", values: [{ x: 2009, y: 5000 }, { x: 2010, y: 25000 }, { x: 2011, y: 3000 }] }, { key: "Adjusted", color: "#3c8c30", values: [{ x: 2009, y: 22002 }, { x: 2010, y: 22002 }, { x: 2011, y: 22002 }] }]; function update_2009() { chartData.datum(data_2009).transition().duration(1000).call(staafgrafiek); nv.utils.windowResize(staafgrafiek.update); }; d3.select("#input_2009").on("click", update_2009); var data_2010 = [{ key: "Salary", color: "#d96704", values: [{ x: 2010, y: 25000 }, { x: 2011, y: 3000 }, { x: 2012, y: 2001 }] }, { key: "Adjusted", color: "#3c8c30", values: [{ x: 2010, y: 21000 }, { x: 2011, y:…
has answer: http://stackoverflow.com/a/28014577
type: Question
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/27130835
answer count: 1
tagged with: jquery
tagged with: nvd3.js
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/28014577

http://stackoverflow.com/comment/42999123
type: AnswerComment
comment on: http://stackoverflow.com/a/27263360
score: 0
has text: ANd why is that, @jfriend00?
type: Comment

http://stackoverflow.com/comment/42866507
has text: I was reading a book Expert Javascript. I didn't understand the line, "Without specifying a hint for the internal DefaultValue function, JavaScript assumes you want a number. This results in a call to valueOf() instead". So my assumption was .valueOf() would return a numeric value.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27189947
type: Comment

http://stackoverflow.com/comment/43065864
has text: Also, when you say "highest 25% (rounding up)", why wouldn't 16 be in that list? 25% of 10 is 2.5, rounding up, that's 3 numbers...if you're picking the highest 3, that's 16, 30, and 31. Are you saying "at _most_, the top 25%, based on some additional criteria"?
score: 1
comment on: http://stackoverflow.com/q/27300728
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42804207
type: Comment
has text: http://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file
type: QuestionComment
comment on: http://stackoverflow.com/q/27154840
score: 0

http://stackoverflow.com/q/27248731
has body: i need to check the div is empty after remove all span inside that div,without refreshing page. this my code html N y k r $(function() { $('.listed').click(function(){ $(this).remove(); return false; }); }); if ($('#word_splatter').is(':empty')) { { alert('The container contains something.'); } else { alert('The container is empty.'); }
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42971886
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42972068
tagged with: css
has comment: http://stackoverflow.com/comment/42971815
downvote count: 3
has comment: http://stackoverflow.com/comment/42972016
has answer: http://stackoverflow.com/a/27248770
type: Question
tagged with: javascript
score: -3
has answer: http://stackoverflow.com/a/27248978
has comment: http://stackoverflow.com/comment/42971793
has answer: http://stackoverflow.com/a/27248789
answer count: 3
upvote count: 0
has title: how check div is empty after all span removed without refreshing page

http://stackoverflow.com/q/27245201
type: Question
has comment: http://stackoverflow.com/comment/42966914
answer count: 1
has body: I have a requirement of combining text-box and drop-down list in Angularjs. User should be able to select an item in the drop down list or can enter his own new item and submit the form. I tried ui-select, in which item should be selected from the drop-down list only. User will not able to enter new value. Any help?
has title: How to add drop down suggestions to a text box in Angularjs?
tagged with: javascript
tagged with: drop-down-menu
has comment: http://stackoverflow.com/comment/42965933
tagged with: textbox
score: 0
tagged with: input
accepted answer: http://stackoverflow.com/a/27246222
has comment: http://stackoverflow.com/comment/42971862
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27246222

http://stackoverflow.com/q/27277006
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27277461
accepted answer: http://stackoverflow.com/a/27277461
possible better answer: http://stackoverflow.com/a/27277843
type: Question
has title: Scroll to top button with jQuery not working in Safari v. 7.0.5?
tagged with: javascript
has comment: http://stackoverflow.com/comment/43023358
score: 0
has comment: http://stackoverflow.com/comment/43023192
has comment: http://stackoverflow.com/comment/43023150
answer count: 2
has comment: http://stackoverflow.com/comment/43023043
has answer: http://stackoverflow.com/a/27277843
tagged with: jquery
has body: I'm building a Tumblr theme and I'm having some trouble with my back to top button. It seems to be working on Chrome and Firefox and newer versions of Safari but on my version of Safari (7.0.5) the link works to direct the link back to the top but the animated scroll isn't working. Incase it helps I'm also using jquery version 1.10.1. I've tried all sorts but can't see where I'm going wrong. I think there might be something thats conflicting with it but I'm not 100% sure. Below is the code I'm using and here is a link to theme if inspecting would help. http://minori-theme.tumblr.com Any suggestions or help would be greatly appreciated. HTML &lt;body&gt; &lt;a name="top"&gt;&amp;nbsp;&lt;/a&gt; &lt;div class="wrapper"&gt; Main Content here &lt;/div&gt; &lt;a href="#top"&gt;Back to Top&lt;/a&gt; &lt;/body&gt; JS &lt;script&gt; $(document).ready(function() { function scrollToAnchor(aid){ var aTag = $("a[name='"+ aid +"']"); $('html,body').animate({scrollTop: aTag.offset().top},'slow'); } $("a").click(function() { var href = $(this).attr('href').replace('#', '') scrollToAnchor(href); }); }); &lt;/script&gt;
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/42818524
has text: Not so sure what the question is exactly, but you can attach any kind of custom attributes to DOM elements and retrieve them from JavaScript. Good practice has it to prefix them with `data-`.
score: 1
comment on: http://stackoverflow.com/q/27162639
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27185595
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27185652
has comment: http://stackoverflow.com/comment/42858116
upvote count: 1
answer count: 1
has body: I am creating a forum in which the posted user has option to delete his own posts. So, I am using ajax to send get request to delete a particular post and I am echoing null in place of the deleted post. The problem here is the post is getting deleted but the page is reloading after deletion which shouldn't happen as I am using ajax request. Can anyone help? PHP CODE TO DISPLAY THE POSTS(ONLY A PART) $sql = "SELECT * FROM classposts where branch='$branch' and joindate='$year' and class='$class' order by".$orderby." desc"; $result = $connection->query($sql); if(isset($_SESSION['username'])){ $username=$_SESSION['username']; } while($row = $result->fetch_assoc()) { echo ""; echo ""; echo "----------------------------------- "; echo "----------------------------------- "; echo "Posted By: ".$row['user']."&nbsp&nbsp&nbsp&nbsp"; if($username==$row['user']){ echo "DELETE POST&nbsp&nbsp&nbsp"; } Ignore if any parenthesis are not matching as this is only a part of the code. javascript function which is called after delete link is clicked function deletepost(postid){ var r=confirm("Are you sure you want to delete the post?"); if(r==true){ var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("postspan"+postid).innerHTML=xmlhttp.responseText; } }; xmlhttp.open("GET","deletepost.php?pid="+postid,true); xmlhttp.send(); }else{} } deletepost.php page $pid=$_GET['pid']; $query="delete from dubiousposts where id='$pid'"; $sql=mysqli_query($connection,$query); $query="delete from genuineposts where id='$pid'"; $sql=mysqli_query($connection,$query); $query="delete from posts where id='$pid'"; $sql=mysqli_query($connection,$query); if($result=mysqli_fetch_array($sql)){ echo ""; }
has answer: http://stackoverflow.com/a/27185652
has comment: http://stackoverflow.com/comment/42858266
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42858114
has comment: http://stackoverflow.com/comment/42858296
has comment: http://stackoverflow.com/comment/42858232
linked to: http://stackoverflow.com/q/27165317
has title: AJAX page reload
has comment: http://stackoverflow.com/comment/42858308
has comment: http://stackoverflow.com/comment/42858293
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/27189265

http://stackoverflow.com/q/27199364
type: Question
tagged with: javascript
score: 0
answer count: 2
upvote count: 1
has body: I have created a simple random color generator application. The barrier is that the button created through javascript is clicked automatically even before any click event on it. I am new to javascript Here is my whole code. Thanks in advance.
downvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27199377
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27199433
tagged with: css
has answer: http://stackoverflow.com/a/27199433
has answer: http://stackoverflow.com/a/27199377
type: AnsweredQuestion
has title: javascript button doesn't wait for to be clicked

http://stackoverflow.com/q/27257094
type: AnsweredQuestion
type: Question
tagged with: canvas
upvote count: 6
tagged with: javascript
score: 4
has body: dear stackoverflowers I have 2 canvases: A canvas to show presentations, And a second hidden canvas to create presentations. I need to switch which canvas is visible with a single button click is it possible ? if so , how ? at this moment i trying to solve it with JS ^^ thanks in advance
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27260292
accepted answer: http://stackoverflow.com/a/27260292
favorite count: 0
has title: how do i toggle visibility between 2 canvas using html / css / js /?

http://stackoverflow.com/comment/43201063
type: AnswerComment
has text: I know that's in the find() routine, I must add some parameters to filter the results, but I don't know how and where to do that :s thanks again ;)
comment on: http://stackoverflow.com/a/27305629
type: Comment
score: 0

http://stackoverflow.com/comment/42927920
type: AnswerComment
has text: But `location.origin` already gives me `https://localhost:8443`. Also when I tried `location.href = location.protocol + '// + location.hostname + ':' + location.port + '/admin';`, it still does not work.
type: Comment
comment on: http://stackoverflow.com/a/27224946
score: 0

http://stackoverflow.com/comment/43006198
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27267045
has text: it worked perfectly. Thanks. My bad on using the for loop incorrectly.
score: 0

http://stackoverflow.com/q/27165559
upvote count: 0
has comment: http://stackoverflow.com/comment/42823770
tagged with: javascript
type: UnansweredQuestion
has title: Is it possible to include the comment in a comment by using JS or other PL?
linked to: http://stackoverflow.com/q/7298802
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: -1
type: Question
has comment: http://stackoverflow.com/comment/42824912
answer count: 1
has comment: http://stackoverflow.com/comment/42823861
has comment: http://stackoverflow.com/comment/42823254
has body: Is it possible to include the comment in a comment by using any other languages? The only condition is that I'am building static website, so we need to avoid using PHP. I know that this has been asked already, and it is here. The answer states that I need to use version control, but that answer is on the year 2011. This question is also the same here and it clearly says it is not possible in HTML, but the answer is on the year 2012. Are there any other methods out there? It's almost 2015, maybe I can achieve it by using JS? I would like to use that in a situation where I can easily make the sources online (if I have the internet) and offline (If I don't have internet). Sample code: Notice that this will only comment this code is the end of a comment. There are also situation where I'am debugging the code that has lots of comment trying to explain everything and I just want to comment a certain block of codes so I can try something. Like this Now I can do anything that I want to this code while leaving a comment of this portion of the code!
has comment: http://stackoverflow.com/comment/42823907
has comment: http://stackoverflow.com/comment/42823279
tagged with: comments
has comment: http://stackoverflow.com/comment/42825140
downvote count: 1
has answer: http://stackoverflow.com/a/27167038
linked to: http://stackoverflow.com/q/12998915

http://stackoverflow.com/a/28921575
answers question: http://stackoverflow.com/q/27153166
type: Answer
upvote count: 4
downvote count: 0
has body: Using require('react') and require('React') inconsistently causes this problem as well, even if you only have one version of React. https://www.npmjs.com/package/gulp-browserify didn't have this problem. Once I stopped using gulp-browserify and switched to watchify+browserify, Uncaught TypeError: Cannot read property 'firstChild' of undefined started happening.
score: 4

http://stackoverflow.com/comment/42860358
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27186457
score: 0

http://stackoverflow.com/comment/112365222
comment on: http://stackoverflow.com/a/27210553
has text: @Republican31 Your approach does not work also, Image is in front of text again!!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43083929
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27310608
has text: You absolutely can. Open a new window with `Services.ww.openWindow` make it modal and load an HTML page. OR overlay your current window with a xul element such as stack, deck, or other overlapping, append an iframe and load an html page there. Install this addon from this repo: https://github.com/Noitidart/adhelp/tree/patch-1 use [GitHub Extension Installer](https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/) after install, restart browser, press alt for menu bar, see the "AdHelp" menu item, chose the "Picture"i tem from it, it overlays current tab.

http://stackoverflow.com/q/27263212
has comment: http://stackoverflow.com/comment/42999754
answer count: 2
possible better answer: http://stackoverflow.com/a/27263619
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42999374
has body: I have a function which is working in firefox: function widthimg() { var wheight = document.getElementById('recent-img1'); console.log(wheight.clientHeight); document.getElementById('recent-img2').style.height = wheight.clientHeight +'px'; } but not in chrome, chrome shows no image at all (a image with 0 height). Weird thing is, both elements are images: &lt;div class="col-lg-6 col-sm-6 margin-top-60 zoominmouse"&gt; {{HTML::image('images/recentprojects1.png','recent',array('class' =&gt; 'img-responsive img-center image-popup-vertical-fit', 'id' =&gt; 'recent-img1')) }} &lt;/div&gt; &lt;div class="col-lg-6 col-sm-6 margin-top-60 zoominmouse" id="test"&gt; {{ HTML::image('images/pricing1.png','recent',array('class' =&gt; 'img-responsive img-center image-popup-vertical-fit', 'id' =&gt; 'recent-img2')) }} &lt;/div&gt; So, as firefox reads out the property of wheight.clientHeight I thought I give this a try: function widthimg() { var wheight = document.getElementById('recent-img1'); console.log(wheight.clientHeight); document.getElementById('recent-img2').clientHeight = wheight.clientHeight; } as I now pass clientHeight to clientHeight, which makes sense for me, but this works in none of both browsers. So my 3 questions are: What can I do to make the function working in chrome? Why can't I pass clientHeight to clientHeight? Is there a possibility to make both of the images the height of img1 with css?
tagged with: css
has comment: http://stackoverflow.com/comment/42999715
has answer: http://stackoverflow.com/a/27263619
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/42999612
has answer: http://stackoverflow.com/a/27263834
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27263834
has title: Strange clientHeight behaviour for image

http://stackoverflow.com/q/27308885
tagged with: jquery
type: UnansweredQuestion
score: 1
type: Question
has body: I have user photo which I want to put on top other image, so as to make that image complete. Here is my code Done I have other image which I am taking from cache and putting in some I want to style it so that I can put the cached image on top of someImage also The entire containerDiv should be responsive to the browser window. So, I want to get the css part of this. I tries using relative and absolute positioning I want the button to be responsive with the someImage too. But it does not move along with the image. Also the cached image should be in sync with someImage. Thanks in advance.
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: I want to overlay image on top of other existing image using javascript
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/43079649
answer count: 1
has comment: http://stackoverflow.com/comment/43079903
has answer: http://stackoverflow.com/a/27310143
has comment: http://stackoverflow.com/comment/43079769
tagged with: image
has comment: http://stackoverflow.com/comment/43079859
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27178614
has comment: http://stackoverflow.com/comment/42846940
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42846469
has title: Parse.com CloudCode add user to existing role not working
has answer: http://stackoverflow.com/a/27179167
type: Question
accepted answer: http://stackoverflow.com/a/27179167
tagged with: javascript
has comment: http://stackoverflow.com/comment/46873397
tagged with: parse-cloud-code
upvote count: 3
answer count: 1
favorite count: 0
tagged with: parse-platform
tagged with: parse-javascript-sdk
has body: Here is the Parse javascript cloud code I am trying to use. As a new _User is created I want to add them to my 'Client' Role. Parse.Cloud.afterSave(Parse.User, function(request) { Parse.Cloud.useMasterKey(); query = new Parse.Query(Parse.Role); query.equalTo("name", "Client"); query.first ({ success: function(role) { role.getUsers().add(request.user); role.save(); }, error: function(error) { throw "Got an error " + error.code + " : " + error.message; } }); }); This is taking code directly from Parse.com's Role example. The code runs happily when a new _User is saved, returning Result: Success, but when I check the "users" tied to that Role in the Data Browser, nothing has happened. I have also tried substituting role.getUsers().add(request.user); for role.relation("users").add(request.user); as per an example on Parse.com's old forum, but no difference. This seems like it should be really straight forward, so I'm not sure what I'm doing wrong. (I have manually used the REST API, using curl, to add _Users to the Client Role, and this does work, so I know it should work.)

http://stackoverflow.com/q/27267253
has title: Proper way to use promises as data dependencies
has answer: http://stackoverflow.com/a/27267744
type: Question
tagged with: javascript
has body: I'm trying to rebuild a process based on reading an article here: https://blog.jcoglan.com/2013/03/30/callbacks-are-imperative-promises-are-functional-nodes-biggest-missed-opportunity/ The code below throws an error, I realise now because theResults.org is not a promise by the time the process tries to use theResults.org.then(), but you can probably see what I'm trying to achieve. I want to set everything up so that rather than dictating control flow I just make sub processes dependant on the data coming into the promises, but I'm lost on how to get some of the chaining right. After validation, the org must be created, then when it exists, the context is created etc etc. I know I'm missing a key understanding here - can anyone point out to me the step or syntax I'm getting wrong please? 'use strict' var q = require('q'); module.exports["purchaseSchool"] = function(req, successCB, failCB) { try { //var purchaseData = req.body.formData; var purchaseData = ""; var theResults = { bValidated: null, org: null, context: null, cohort: null, invoice: null, bInvoiced: null, bEmailed: null } // validate the data theResults.bValidated = validatePurchaseData(purchaseData); theResults.bValidated.then(function () { // DEBUG: remove this console.log("validated"); theResults.org = createOrg(purchaseData); }); theResults.org.then(function() { // DEBUG: remove this console.log("org"); theResults.context = createContext(purchaseData, theResults.org); }); theResults.context.then(function() { // DEBUG: remove this console.log("context"); theResults.cohort = createCohort(purchaseData, theResults.context); }); theResults.cohort.then(function() { // DEBUG: remove this console.log("cohort"); theResults.invoice = createInvoice(purchaseData); }); theResults.invoice.then(function() { // DEBUG: remove this console.log("invoice"); theResults.bInvoiced = sendInvoice(theResults.invoice); }); theResults.bInvoiced.then(function() { // DEBUG: remove this console.log("invoice sent"); theResults.bEmaile…
accepted answer: http://stackoverflow.com/a/27267744
answer count: 1
has comment: http://stackoverflow.com/comment/43006219
tagged with: chaining
tagged with: promise
type: AnsweredQuestion
score: 0

http://stackoverflow.com/q/27188246
downvote count: 0
favorite count: 0
has title: Resizing Images to display in HTML5 Canvas
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27193829
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27193829
has body: I'm trying to get an image to be displayed on an HTML5 Canvas while keeping the aspect ratio and having the image reduced (if larger than the canvas). I've look around at some answers but seem to be missing something and wondered if you guys can help. I'm using the function "calculateAspectRatioFit" suggested by one of the Stackoverflow answers, but it seems to not resize the image for me, as it did in the answer - so I may be doing something wrong :) Here's my code: function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) { var ratio = Math.min(maxWidth / srcWidth, maxHeight / srcHeight); var rtnWidth = srcWidth*ratio; var rtnHeight = srcHeight*ratio; return { width: rtnWidth, height: rtnHeight }; } var canvasImage = new Image(); canvasImage.src = "http://www.greenwallpaper.org/backgrounds/simply-green-502085.jpeg"; var ctx = this.getContext('2d'); var parentWidth = self._widgetSize[0]; var parentHeight = self._widgetSize[1]; canvasImage.onload = function() { var imgSize = calculateAspectRatioFit(canvasImage.width, canvasImage.height, parentWidth, parentHeight); ctx.clearRect(0, 0, parentWidth, parentHeight); ctx.drawImage(canvasImage, 0, 0,imgSize.width, imgSize.height); }; The image is displayed but is larger than the HTML5 Canvas. What I am after is to have the image the same width as the Canvas, and if the height is larger than the height of the canvas then it overflows and is hidden...I just want to fill the width and keep the aspect ratio. Can anyone help point out what I am missing? Appreciate your help :) ---Update 30/11--- I've just added the answer to my code and I get the following: (this is the 2nd answer) var canvasImage = new Image(); canvasImage.src = "http://www.greenwallpaper.org/backgrounds/simply-green-502085.jpeg"; var ctx = this.getContext('2d'); canvasImage.onload = scaleAndDraw(this, ctx, canvasImage); function scaleAndDraw(canvas, ctx, srcImage) { // Image is 2560x1600 - so we need to scale down to canvas size... // does th…
tagged with: html5-canvas
answer count: 1

http://stackoverflow.com/q/27169534
has comment: http://stackoverflow.com/comment/42830296
has answer: http://stackoverflow.com/a/29741969
answer count: 1
has body: I'm performing drawing operations on canvas. The best way to calculate cursor position relative to canvase top left corner is, in my opinion, usage of .getBoundingClientRect(): HTMLCanvasElement.prototype.relativeCoords = function(event) { var x,y; //This is the current screen rectangle of canvas var rect = this.getBoundingClientRect(); //Recalculate mouse offsets to relative offsets x = event.clientX - rect.x; y = event.clientY - rect.y; //Debug console.log("x(",x,") = event.clientX(",event.clientX,") - rect.x(",rect.x,")"); //Return as array return [x,y]; } I see nothing wrong with this code and it works in firefox. Test it. In google chrome however, my debug line prints this: x(NaN) = event.clientX(166) - rect.x(undefined) What am I doing wrong? Is this not according to the specifications? Edit: seems my code follows W3C: From the specs: getBoundingClientRect() The getBoundingClientRect() method, when invoked, must return the result of the following algorithm: Let list be the result of invoking getClientRects() on the same element this method was invoked on. If the list is empty return a DOMRect object whose x, y, width and height members are zero. Otherwise, return a DOMRect object describing the smallest rectangle that includes the first rectangle in list and all of the remaining rectangles of which the height or width is not zero. DOMRect interface DOMRect : DOMRectReadOnly { inherit attribute unrestricted double x; inherit attribute unrestricted double y; inherit attribute unrestricted double width; inherit attribute unrestricted double height; };
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29741969
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42830438
has comment: http://stackoverflow.com/comment/42839624
upvote count: 21
tagged with: google-chrome
type: Question
tagged with: getboundingclientrect
has title: In google chrome, getBoundingClientRect().x is undefined
score: 21
tagged with: javascript

http://stackoverflow.com/q/27209259
has answer: http://stackoverflow.com/a/27209381
has answer: http://stackoverflow.com/a/27209754
tagged with: jsp
tagged with: javascript
has body: I'm quite new to javascript and JSP and am having a difficult time wrapping my head around what's getting called and when and where. I'm writing this all in a single JSP file. The starting code I have right now is: &lt;input type=text name="myTextField" &gt; &lt;input type=button name="myTextButton" value="Select a date" onclick="displayDatePicker(myTextField)"&gt; &lt;script type="text/javascript"&gt; // ??? &lt;/script&gt; The first thing that confuses me is the displayDatePicker function. I can't for the life of me find any documentation on this function (is it jquery? is it javascript? is it bootstrap? can i pass in other args?). An alternative would be to declare a custom function and have myTextButton's onclick call that function. I managed to get that to work, but I don't know how to display a datepicker that actually has a callback when a date is chosen. Here's the functionality I want to have: User clicks on myTextField, manually types in a date, then an alert pops up "You selected ../../...." or "Invalid date selected" User clicks on myTextButton, selects a date from the date picker, then myTextField is populated with that date and an alert pops up "You selected ../../...."
has answer: http://stackoverflow.com/a/27209408
accepted answer: http://stackoverflow.com/a/27209408
has title: How to call a function after a date is selected from a date picker?
answer count: 3
downvote count: 0
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/27209754
score: 2
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/27286320
has body: I making a context menu and it almost done, just left this problem for me, but i have no idea to do this: This is the JS Fiddle Get different value from input hidden to a single link, because I want to pass it into a controller action im here im there im where // link Cancel this app I want to pass the value to theid , for example when right click im here the link should get the hidden value = 1 and so on, any suggestion to do that ? Thanks
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/43040070
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27286403
has comment: http://stackoverflow.com/comment/43040053
has comment: http://stackoverflow.com/comment/43039983
has title: Jquery get different input hidden value to a link
has comment: http://stackoverflow.com/comment/43040525
downvote count: 3
has comment: http://stackoverflow.com/comment/43040023
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/27143818
has comment: http://stackoverflow.com/comment/43039960
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43040085
accepted answer: http://stackoverflow.com/a/27286403
has comment: http://stackoverflow.com/comment/43040006

http://stackoverflow.com/q/27204283
type: Question
possible better answer: http://stackoverflow.com/a/27204348
has answer: http://stackoverflow.com/a/27204348
score: 0
tagged with: object
answer count: 4
has title: Object inside of Array
has answer: http://stackoverflow.com/a/27204351
tagged with: arrays
has answer: http://stackoverflow.com/a/27204331
tagged with: javascript
has body: Beginner javascript programmer here, and I'm trying to create a complicated variable. var mainList = [{ value : 1, mainQuestion : 'Question1', answerChoices : ['Answer 1', 'Answer 2', 'Answer 3'] }, { value : 2, mainQuestion : 'Question 2', answerChoices : ['Answer 1', 'Answer 2'] }]; The issue I'm having, is that I need to associate values with the answers. This is going to be a set of questions, that narrows things down to where it helps get you to the right information to help solve your problem. So how can I associate a value with the answers (Answer 1, Answer 2) ? Basically I'm needing the value associated with these answers to be added to a list element on the page, so that I can continue with further questions. I've tried turning them into another object, but keep getting console errors, and can't get it to work. Any help is greatly appreciated. Edit: Wow, you guys are fast and super helpful. Consider this resolved, as I've been given plenty of information to get this to work. Thank you so much!
type: AnsweredQuestion
tagged with: variables
has answer: http://stackoverflow.com/a/27204434
accepted answer: http://stackoverflow.com/a/27204331

http://stackoverflow.com/comment/69311986
score: 1
has text: Thanks! I think it should be: if (req.query.param) { queryBuilder.where('somecolumn', req.query.param); }
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/36064282

http://stackoverflow.com/a/27153094
score: 0
has body: $("table").attr("border", "0"); will do the trick
answers question: http://stackoverflow.com/q/27152935
type: Answer
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/43805699
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27239233
has text: I think, I implemented exactly this, but my template is not displayd. I use it like this: views: { 'invitations': { template: ' My Contacts ' } } --- but the div is empty: --- any idea or a plunkr to a working solution?

http://stackoverflow.com/a/27308908
answers question: http://stackoverflow.com/q/27296586
accepted answer of: http://stackoverflow.com/q/27296586
score: 2
type: AcceptedAnswer
has body: Finally I found the solution. There is a scale transformation available for SVG. var svgStr = $(data.svg); svgStr.removeAttr("height"); svgStr.removeAttr("width"); $(svgStr.find("g")[0]).attr("transform", "scale(0.09)"); where "g" is the top group tag.
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/q/27188834
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/27200916
type: Question
tagged with: spring-mvc
tagged with: java
linked to: http://stackoverflow.com/q/25109945
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27200916
favorite count: 0
tagged with: angularjs
has title: how to send empty value for MultipartFile
has body: I'm using angularJs and spring 4.0, My Controller code: @RequestMapping(value = "/endpoint/add", method = RequestMethod.POST) public @ResponseBody GenericFormResponse execute( WebRequest wreq, @RequestParam("epName") String epName, @RequestParam("ipAddr") String ipAddr, @RequestParam("useDefault") String useDefault, @RequestParam("certFile") MultipartFile certFile) throws Exception { ..................... } my js(angualrJs) code: var formData = new FormData(); formData.append("epName", $scope.epName); formData.append("ipAddr", $scope.ipAddr); formData.append("useDefault",$scope.defaultCert); if(!$scope.defaultCert){ formData.append("certFile", upFile); } $http({ method: "POST", url: "./service/endpoint/add", data: formData, transformRequest: angular.identity, headers: {'Content-Type': undefined } }).success(svcSuccessHandler) .error(svcErrorHandler); My problem is $scope.defaultCert=false the POST request is working fine, $scope.defaultCert = true i'm getting Bad request(400). i tried below thing also, if(!$scope.defaultCert){ formData.append("certFile", upFile); }else{ formData.append("certFile", null); } How do i sent empty MultipartFile. Thanks.
has answer: http://stackoverflow.com/a/27221898
accepted answer: http://stackoverflow.com/a/27221898

http://stackoverflow.com/a/27261966
score: 2
has comment: http://stackoverflow.com/comment/42997487
downvote count: 0
has comment: http://stackoverflow.com/comment/42997291
upvote count: 2
answers question: http://stackoverflow.com/q/27261722
has body: You can use .filter() to select the element that has a desired tabIndex and then use .focus() like so: $('*').filter(function() { return this.tabIndex == currentTabIndex + 1; }).focus(); Set focus to any element and then press the down arrow in the following demo: DEMO UPDATE And here is how you would prevent tabbing if the active element accepts text input and either the Left Arrow or Right Arrow is pressed. The following is the complete code: $(document).on("keyup", function(e) { var code = e.which, elm = document.activeElement, //capture the current element for later currentTabIndex = elm.tabIndex, nextTabIndex = code == 40 || code == 39 ? currentTabIndex + 1 : code == 38 || code == 37 ? currentTabIndex - 1 : null, //calculate next tab index isHoriz = code == 39 || code == 37; //Left or right arrow pressed $('[tabindex]').filter(function() { if( !$(elm).is(':text,textarea') || !isHoriz ) { //Exclude left/right arrow for text inputs return this.tabIndex == nextTabIndex; } }) .focus(); }); DEMO
has comment: http://stackoverflow.com/comment/42997210
type: Answer

http://stackoverflow.com/q/27255868
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27258078
favorite count: 0
has body: how can we get the nearest records for implementing next and previous record view in sailsjs? is there any built in method for this? e.g. if i have retrieved a single record with id=10, how to get the neighbouring records like record with id=9 and id=11. Regards
score: -2
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27263740
accepted answer: http://stackoverflow.com/a/27258078
downvote count: 2
possible better answer: http://stackoverflow.com/a/27263740
type: Question
tagged with: sails.js
has title: how to get near records in sails.js
tagged with: javascript

http://stackoverflow.com/comment/43060063
comment on: http://stackoverflow.com/q/27297824
score: 1
has text: JavaScript does not allow unescaped newlines inside quotes.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27199204
type: Question
answer count: 2
has body: I want call a PHP function using Javascript(No Jquery) MY php function is &lt;?php function helloworld() { echo 'Hello Ashish Srivastava'; } ?&gt; in hello.php file and my JavaScript is &lt;script type="text/javascript"&gt; function getRoute() { var hr = new XMLHttpRequest(); var url = "hello.php"; hr.open("helloworld", url, true) hr.setRequestHeader("Content-type", "application/x-www-from-urlencoded"); hr.onreadystatechange = function() { if (hr.readyState === 4 &amp;&amp; hr.status === 200) { var return_data = hr.responseText; alert(return_data); } } hr.send(); } &lt;/script&gt; and HTMl is &lt;input type="button" value="Hello" onclick="getRoute()"/&gt; bt when i am calling this function i get nothing from server plz help
possible better answer: http://stackoverflow.com/a/27199229
tagged with: javascript
has comment: http://stackoverflow.com/comment/42882642
has answer: http://stackoverflow.com/a/27199229
tagged with: ajax
upvote count: 1
has answer: http://stackoverflow.com/a/27199271
accepted answer: http://stackoverflow.com/a/27199271
has title: Call PHP function using javascript ajax
favorite count: 0
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/42848275
has text: Don't scrape websites. Use their API. If they don't have an API they probably don't want you using their service in an automated way.
score: 1
comment on: http://stackoverflow.com/q/27179811
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42872182
type: Comment
type: QuestionComment
has text: @A.Wolff ok cool i will give a fiddle when i make it to home. ;) on the train now
score: 0
comment on: http://stackoverflow.com/q/27192223

http://stackoverflow.com/comment/43035723
type: AnswerComment
comment on: http://stackoverflow.com/a/27283683
type: Comment
has text: So the user is the programmer in that case, right? The programmer must be aware of the fact that a function call will cause all the arguments to be evaluated first. That's a basic concept applied by most of the scripting and programming languages. Is it really that much work to put the input between two quotes?
score: 1

http://stackoverflow.com/comment/43015811
comment on: http://stackoverflow.com/q/27272730
type: Comment
type: QuestionComment
score: 0
has text: A question from a user who cannot yet comment: "Can you tell me you are working on windows or linux and also tell me on live server or localhost?".

http://stackoverflow.com/q/27160093
has answer: http://stackoverflow.com/a/27160149
possible better answer: http://stackoverflow.com/a/27165079
has answer: http://stackoverflow.com/a/27165079
type: Question
tagged with: javascript
tagged with: sharepoint
answer count: 2
accepted answer: http://stackoverflow.com/a/27160149
downvote count: 0
favorite count: 0
tagged with: visual-studio-2013
upvote count: 1
tagged with: windows-store-apps
tagged with: tfs
has title: Need Ping Request from TFS/Sharepoint
type: AnsweredQuestion
score: 1
has body: I will make a "Store APP for Windows 8.1 " with Visual Studio 2013 and I need to check if the tfs-server is online/offline at https://tfs.xxx-xxx.de:8090/xxx/xxx/xxx (not my server but got the url and I have a acoount to create and test some tables with Sharepoint) I use HTML/Javascript and the user should see if the server is reachable. What I need is to ping with Javscript or something else (ajax?). I'd also like some information on how long the ping was and some header information. I created some Buttons for testing, I will delete them later. HTML Green Yellow Red Ping Response Server State <circle id="server_ok" cx="25" cy="25" r="20" stroke="green" stroke-width="2" fill="#FFFFFF" /> <circle id="server_slow" cx="25" cy="25" r="20" stroke="yellow" stroke-width="2" fill="#FFFFFF" /> <circle id="server_offline" cx="25" cy="25" r="20" stroke="red" stroke-width="2" fill="#FFFFFF" /> JavaScript (function () { "use strict"; var app = WinJS.Application; var activation = Windows.ApplicationModel.Activation; app.onactivated = function (args) { if (args.detail.kind === activation.ActivationKind.launch) { if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) { // TODO: Diese Anwendung wurde neu gestartet. Die Anwendung // hier initialisieren. } else { // TODO: Diese Anwendung war angehalten und wurde reaktiviert. // Anwendungszustand hier wiederherstellen. } args.setPromise(WinJS.UI.processAll().then(function completed() { var ok = document.getElementById("button_server_ok"); ok.addEventListener("click", server_ok, false); var slow = document.getElementById("button_server_slow"); slow.addEventListener("click", server_slow, false); var off = document.getElementById("button_server_offline"); off.addEventListener("click", server_offline, false); var ping= document.getElementById("button_ping"); ping.addEventListener("click", ping, false); })); } }; app.oncheckpoint = function (args) { // TODO: Diese Anwendung wird gleich angehalten. Jeden …

http://stackoverflow.com/comment/42805355
type: QuestionComment
comment on: http://stackoverflow.com/q/27155036
score: 0
has text: Err, you lost me. Notepad++ is an editor, not a JavaScript execution environment. What you just said sounds to me like "I wrote all the notes, but when I hold the paper to my ear I don't hear any music". It is your web browser that understands `sessionStorage`, along with the rest of JavaScript.
type: Comment

http://stackoverflow.com/comment/42988099
type: Comment
comment on: http://stackoverflow.com/a/27255900
has text: Here's the jsfiddle with your css as well, it seems to be working correctly. http://jsfiddle.net/c66L9j08/
type: AnswerComment
score: 0

http://stackoverflow.com/q/27312073
has comment: http://stackoverflow.com/comment/43084703
has answer: http://stackoverflow.com/a/27312233
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43084956
answer count: 2
has answer: http://stackoverflow.com/a/27312129
tagged with: javascript
has comment: http://stackoverflow.com/comment/43084760
score: 0
has title: transform every 3rd letter to uppercase
has body: how to transform every 3rd character to uppercase. for example this string pifedvcbtauzkwgnxyjrhmq converted into piFedVcbTauKkwGnxYjrHmq. here is what i've done so far function up3rdletter(str){ var i, result = ''; for(i = 0; i &lt; str.length; i++){ if(i &gt; 0 &amp;&amp; i % 3 == 0){ result += str[i].toUpperCase(); }else{ result += str[i]; } } return result; } the script above return pifEdvCbtAuzKwgNxyJrhMq, it start converting from 4th letter. if I change the modulo number to 2 it become piFeDvCbTaUzKwGnXyJrHmQ
favorite count: 0
accepted answer: http://stackoverflow.com/a/27312233
upvote count: 2
downvote count: 2
possible better answer: http://stackoverflow.com/a/27312129

http://stackoverflow.com/comment/42875669
comment on: http://stackoverflow.com/q/27195216
has text: You could host your script file in some server an then bookmarked that script in the browser, then you only need to click the bookmark when you are in the desire site.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27214968
has comment: http://stackoverflow.com/comment/42909972
downvote count: 2
has title: Javascript set array as attribute of another array element
linked to: http://stackoverflow.com/q/184710
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42909975
score: 0
has answer: http://stackoverflow.com/a/27215021
has answer: http://stackoverflow.com/a/27215185
linked to: http://stackoverflow.com/q/122102
favorite count: 0
upvote count: 2
has body: I want to make an array of parent and another array of children, and later set an array of children to each parent. Here is the code: var parent = []; var child = []; // Set kids for (a = 0; a &lt;= 5; a++) { child[a] = []; child[a].name = "kid " + a; } // Set parents and their kids for (b = 0; b &lt; 2; b++) { parent[b] = []; parent[b].name = "parent " + b; parent[b].kids = child; } // One parent has kid name anna parent[0].kids[2].name = "anna"; // Output for (a = 0; a &lt; 2; a++) { console.log(""); for (b = 0; b &lt; 5; b++) { console.log(b + " -&gt; " + parent[a].name + " " + parent[a].kids[b].name); } } First parent 0 -> parent 0 kid 0 1 -> parent 0 kid 1 2 -> parent 0 anna 3 -> parent 0 kid 3 4 -> parent 0 kid 4 Second parent 0 -> parent 1 kid 0 1 -> parent 1 kid 1 2 -> parent 1 anna 3 -> parent 1 kid 3 4 -> parent 1 kid 4 Why do both parent have the same children only first one should have the kid name anna, and more important How can I make it to work properly?
type: UnansweredQuestion

http://stackoverflow.com/q/27213827
has answer: http://stackoverflow.com/a/27214080
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/27213919
has comment: http://stackoverflow.com/comment/42908077
tagged with: children
tagged with: javascript
has comment: http://stackoverflow.com/comment/42908004
has comment: http://stackoverflow.com/comment/42907921
answer count: 3
upvote count: 0
tagged with: jquery
has title: Jquery grab attr from automatically generated div
favorite count: 0
tagged with: attr
has body: I create a search engine and I have a problem. '+this.name+' TAP TO UNLOCK how to get the name value by clicking on the div? They have all the same classes
type: UnansweredQuestion
score: -3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42907963
has answer: http://stackoverflow.com/a/27214007

http://stackoverflow.com/a/27272898
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: One tweak I'd make is to avoid repeating the selectors and val calls, too easy to add a field and forget to update one half of the if/else or the other: function parseInfo(data) { var valid = data &amp;&amp; data.id &gt; 0; $('#txtaction').val(valid ? 'update' : ''); $('#txtbook_id').val(valid ? data.id : ''); } Side note: Doing this manually is fine for very small projects, but for anything of any size, you might look into any of the various MVC and MVVC tools or frameworks. There are many.
type: Answer
answers question: http://stackoverflow.com/q/27272797
accepted answer of: http://stackoverflow.com/q/27272797

http://stackoverflow.com/comment/42877870
type: QuestionComment
has text: @duskwuff: just need to test for local purpose, after certain interval should check, it can be ajax call also,but anchor button must change
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27196139

http://stackoverflow.com/q/27217397
tagged with: asp.net-web-api
tagged with: javascript
has comment: http://stackoverflow.com/comment/42914541
tagged with: angularjs
has answer: http://stackoverflow.com/a/27217721
type: Question
has answer: http://stackoverflow.com/a/27217942
has answer: http://stackoverflow.com/a/27218739
has answer: http://stackoverflow.com/a/27218754
answer count: 6
possible better answer: http://stackoverflow.com/a/27217754
score: 0
has comment: http://stackoverflow.com/comment/42914647
has answer: http://stackoverflow.com/a/27217754
has comment: http://stackoverflow.com/comment/42914734
tagged with: http://stackoverflow.com/tag/json
has body: I have an html template where the conditionals in the ng-ifs and ng-shows are getting a bit too complex to belong in the UI. For example, this is to determine if payment controls should be displayed: &lt;div ng-show="ticket.status == 0 &amp;&amp; ((ticket.orgTicketId === '' &amp;&amp; ticketControl.balance &gt; 0 ) || (ticket.orgTicketId !== '' &amp;&amp; ticketControl.balance &lt; 0))"&gt; I would like to simplify this to something like this: &lt;div ng-show="ticket.paymentsAllowed"&gt; I would prefer to not move the logic into the controller, since I am trying to keep it as clean as possible as well. In C#, which is where I come from, I would just add a property to the Ticket class called PaymentsAllowed and move the logic there. I am fairly new to Javascript and AngularJs and I am looking for advice on how to accomplish something similar here, so that I can clean up the html templates and make them more legible. The Angular app gets JSON from a WebAPI backend, which I simply assign to the $scope; this is all working well. Here is a simplified example of retrieving a ticket. The ticketService reads the ticket view model from the backend: function getTicket(ticketId) { var deferred = common.$q.defer(); common.$http.get("api/tickets/" + ticketId) .success(function (ticket) { deferred.resolve(ticket); })); return deferred.promise; } The controller uses the ticketService to retrieve ticket and assign to $scope.ticket: ticketService.getTicket(123).then( function (ticket) { $scope.ticket = ticket; }); I like the simplicity of just retrieving view models in the form of JSON data from the WebAPI and binding it straight to the proper scope, but what is a simple, clean way to add some simple business logic to these javascript objects?
accepted answer: http://stackoverflow.com/a/27218754
has comment: http://stackoverflow.com/comment/42914632
has title: AngularJs, reducing logic in html templates
has answer: http://stackoverflow.com/a/27217582
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42914587

http://stackoverflow.com/q/27233445
favorite count: 0
tagged with: timer
has comment: http://stackoverflow.com/comment/42944357
answer count: 3
has title: Javascript Countdown for every 3 Seconds
has answer: http://stackoverflow.com/a/27233549
has comment: http://stackoverflow.com/comment/42943721
has comment: http://stackoverflow.com/comment/42943571
has answer: http://stackoverflow.com/a/27233544
type: UnansweredQuestion
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27233553
has comment: http://stackoverflow.com/comment/42943596
has body: This is my first post on this forum, I shearched all around the web for a javascript countdown that change every 3 ( and not 1 second ) Exemple : script show "30" after 3 second the script will show "29" Can you help me on this ? Thanks :D
score: -1
type: Question
has comment: http://stackoverflow.com/comment/42944112
tagged with: javascript
tagged with: countdown

http://stackoverflow.com/comment/42907022
type: Comment
has text: nope... ReferenceError: res is not defined at Request.getStatus (C:\xxxxxx\routes\login.js:25:13) at Request.self.callback (C:\xxxxx\node_modules\request\request.js:373:22)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27213254

http://stackoverflow.com/a/27245977
has body: JavaScript doesn't have compile stage that produces a .class file. The JS code is interpreted by the browser at runtime. Adding a dynamic function is so easy that it's very hard to remember/find how many functions are available on an object. For example, there is an object globalObj in the globe scope. In file a.js: globalObj.a = function () { console.log('from a.js'.); } In file b.js: globalObj.b = function () { console.log('from b.js'.); } In a project with hundreds of JS files, you may easily get lost. IDEs are also facing the same problem.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27245624

http://stackoverflow.com/a/27268997
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43009198
has body: try this: function isElementInViewport(el) { var top = el.offsetTop; var left = el.offsetLeft; var width = el.offsetWidth; var height = el.offsetHeight; while(el.offsetParent) { el = el.offsetParent; top += el.offsetTop; left += el.offsetLeft; } return ( top &lt; (window.pageYOffset + window.innerHeight) &amp;&amp; left &lt; (window.pageXOffset + window.innerWidth) &amp;&amp; (top + height) &gt; window.pageYOffset &amp;&amp; (left + width) &gt; window.pageXOffset ); } var listOfPanels = $('#item2, #item2, #item3, #item4, #item5'); $(window).scroll(function(event) { if (listOfPanels.length){ listOfPanels.each(function(){ if (isElementInViewport($(this)[0])) { console.log($(this).attr('id') + ' in viewport'); } }); } }); (isElementInViewport js method brought from: How to tell if a DOM element is visible in the current viewport?) hope that helps.
upvote count: 1
has comment: http://stackoverflow.com/comment/43009986
score: 1
has comment: http://stackoverflow.com/comment/43021412
answers question: http://stackoverflow.com/q/27268855

http://stackoverflow.com/q/27277629
has comment: http://stackoverflow.com/comment/43028047
score: 1
type: Question
tagged with: javascript
has title: Another way to create random dynamic url in javascript/stop wpengine from caching
has answer: http://stackoverflow.com/a/27784378
tagged with: bigcommerce
answer count: 2
upvote count: 1
downvote count: 0
tagged with: variables
favorite count: 0
type: UnansweredQuestion
has body: I'm including a PHP file in a bigcommerce (formally interspire). The PHP file is from a wpengine site. Including the file looks like this: %%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3%% And a howto is right here: http://www.interspire.com/support/kb/questions/209/How+do+I+Include+a+php,+html,+asp+or+any+other+type+of+file+in+an+Interspire+Knowledge+Manager+template+%3F So, everything works fine, however, the file being included includes a clock that gets updated every minute, but the wpengine site is delivered via their own cdn, and so the clock is only updated every 20 minutes or so. If I change the url in any way, the cache resets. I can reset the cache by saving the url as %%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3&amp;variable=123456789%% and again as %%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3&amp;variable=987654321%% But if I try to make it dynamic by adding a js variable: &lt;script&gt; variable = Math.floor(Math.random() * 1000) + 1; document.write("%%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3&amp;variable=" + variable + "%%"); &lt;/script&gt; It doesn't work, and I'm not really sure what's happening. The correct file and store_id are included, but the variable doesn't seem to be changing anything. Any other ideas on how to include a dynamic variable or another way to keep the cdn from caching that page?
has answer: http://stackoverflow.com/a/41350900

http://stackoverflow.com/q/27251382
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27251407
accepted answer: http://stackoverflow.com/a/27251407
tagged with: keypress
tagged with: firebug
downvote count: 1
favorite count: 0
upvote count: 4
possible better answer: http://stackoverflow.com/a/27251421
has body: On project exists next js-function function LoginKeyPressCheck() { $('#txtusername, #txtpassword').keypress(function (evt) { var charCode = (evt.which) ? evt.which : event.keyCode; // here get error $('#Errormsg').html(''); $('#Err_ValidateUser').html(''); if (charCode === 13) { evt.preventDefault(); $('#Err_ValidateUser').html(''); if ($.trim($('#txtusername').val()).length === 0) { $('#Err_ValidateUser').html('Validation Error: Value is required'); } else { loginProcess(); } } }); When click button TAB get error "ReferenceError: event is not defined". Try to debug this function in FireBug but from line var charCode = (evt.which)... cursor moves in else block. I can't get where is problem. Thanks.
has answer: http://stackoverflow.com/a/27251421
type: AnsweredQuestion
score: 3
type: Question
answer count: 2
has title: Get error "ReferenceError: event is not defined"

http://stackoverflow.com/a/40888862
has comment: http://stackoverflow.com/comment/114057119
upvote count: 21
answers question: http://stackoverflow.com/q/27267411
has comment: http://stackoverflow.com/comment/72315493
score: 21
has body: without using jQuery, marker._icon.classList.add("className");
has comment: http://stackoverflow.com/comment/95209997
downvote count: 0
type: Answer

http://stackoverflow.com/a/27302813
score: 0
has body: You can preload the image, then once it's loaded insert it somewhere in your page: var image = new Image(); image.onload = function() { document.body.appendChild(image); }; image.src = 'image.gif'; JSFiddle
type: Answer
answers question: http://stackoverflow.com/q/27299907

http://stackoverflow.com/q/27206186
tagged with: php
accepted answer: http://stackoverflow.com/a/27206211
type: AnsweredQuestion
score: 0
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27206211
has title: Calling form from another website
answer count: 1
favorite count: 0
has body: I currently have a form which lets the user input 4 fields. What i'd like to know is if it possible to fill and submit a form on a totally separate website with the data that the user previously submitted using the form. If so, how can i do it?
has comment: http://stackoverflow.com/comment/42894929
has comment: http://stackoverflow.com/comment/42894813
upvote count: 1

http://stackoverflow.com/comment/42870741
comment on: http://stackoverflow.com/a/27192312
score: 0
type: AnswerComment
has text: The downside is the support of IE<9 where capturing phase isn't handled
type: Comment

http://stackoverflow.com/a/27242405
accepted answer of: http://stackoverflow.com/q/27241501
type: AcceptedAnswer
score: 4
type: Answer
upvote count: 4
downvote count: 0
has body: You need to state that your "reg" module is to be loaded as text and not as a JavaScript module. See the following for details: https://github.com/requirejs/text Your specific code should read: define('ng_start',["angular","jquery","text!reg"],function(An,$,template){ .... }) note: the addition of text! in the module definition requirements for reg.
answers question: http://stackoverflow.com/q/27241501

http://stackoverflow.com/comment/42963365
comment on: http://stackoverflow.com/q/27243624
score: 0
type: Comment
type: QuestionComment
has text: It's the same issue, but I was looking for the why instead of the how.

http://stackoverflow.com/comment/42913288
has text: Hi Rohit thanks for your answer but I tried adding "sSwfPath": "assets/swf/copy_csv_xls_pdf.swf" but it was giving error. can you please brief it using the same code which I have mentioned in my question that would be helpful
comment on: http://stackoverflow.com/a/27216115
score: 0
type: AnswerComment
type: Comment

internet-explorer
tags question: http://stackoverflow.com/q/27273051
tags question: http://stackoverflow.com/q/27307635
tags question: http://stackoverflow.com/q/27257336
tags question: http://stackoverflow.com/q/27306573
tags question: http://stackoverflow.com/q/27251427
tags question: http://stackoverflow.com/q/27243320
tags question: http://stackoverflow.com/q/27168147
tags question: http://stackoverflow.com/q/27184381
tags question: http://stackoverflow.com/q/27311349
tag name: internet-explorer
tags question: http://stackoverflow.com/q/27225421
tags question: http://stackoverflow.com/q/27295529
tags question: http://stackoverflow.com/q/27154692
tags question: http://stackoverflow.com/q/27247104
tags question: http://stackoverflow.com/q/27172345
tags question: http://stackoverflow.com/q/27227627
tags question: http://stackoverflow.com/q/27263614
tags question: http://stackoverflow.com/q/27298389
tags question: http://stackoverflow.com/q/27283887
tags question: http://stackoverflow.com/q/27289154
tags question: http://stackoverflow.com/q/27218525
tags question: http://stackoverflow.com/q/27272999
tags question: http://stackoverflow.com/q/27286673
tags question: http://stackoverflow.com/q/27242256
tags question: http://stackoverflow.com/q/27169181
tags question: http://stackoverflow.com/q/27231572
tags question: http://stackoverflow.com/q/27187613
tags question: http://stackoverflow.com/q/27266402
tags question: http://stackoverflow.com/q/27228826
tags question: http://stackoverflow.com/q/27300733
tags question: http://stackoverflow.com/q/27244942
type: Tag
tags question: http://stackoverflow.com/q/27168954
tags question: http://stackoverflow.com/q/27300739
tags question: http://stackoverflow.com/q/27296745
tags question: http://stackoverflow.com/q/27276156
tags question: http://stackoverflow.com/q/27266923
tags question: http://stackoverflow.com/q/27168993
tags question: http://stackoverflow.com/q/27175561
tags question: http://stackoverflow.com/q/27154606

http://stackoverflow.com/comment/43237409
has text: well thats the thing, its not an iframe. Its a div right below the body and ends just before the closing tag of the body. Attaching extjs to the body will only allow it to use the initial window size (so without scrolling), and this div allows my windows to use the whole page.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27291972

http://stackoverflow.com/q/27193320
has answer: http://stackoverflow.com/a/27193868
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: php
tagged with: laravel
has body: Laravel 4 Input file return empty after post .. why? html code in blade file <?php $image = asset("images/controls/previewbird.png"); ?> and my jquery in the same file and in my controller file public function postGetTemp(){ return Input::file('image_1')->getClientOriginalName(); } Why this code return empty data? and data return 0 when change controller code to public function postGetTemp(){ return 0; } so why does Input::file('image_1') not return data?
has title: Laravel 4 Input file return empty after post .. why?
type: Question
linked to: http://stackoverflow.com/q/166221
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/27224293
has comment: http://stackoverflow.com/comment/42935823
has comment: http://stackoverflow.com/comment/42964079
has body: It depends on the library. If the lib is using browser specific functions then not. I had a quick test with date.js and it seems to work. (Like this) #include "date.js" var d = Date.today().is().friday(); $.writeln (d);
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42949696
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27218859
score: 1
has comment: http://stackoverflow.com/comment/42941284
has comment: http://stackoverflow.com/comment/43174350
answers question: http://stackoverflow.com/q/27218859
has comment: http://stackoverflow.com/comment/43181823

http://stackoverflow.com/a/27167924
has body: You can create the element immediately after the &lt;script&gt; (document.write) and find the .content relative to it. (function(){ var id = 'id' + (new Date().getTime()); document.write('&lt;div id="'+id+'"&gt;&lt;/div&gt;'); var elem = document.getElementById(id); var content = elem.previousElementSibling.previousElementSibling; content.innerHTML = 'NEW CONTENT'; })(); Example jsbin
answers question: http://stackoverflow.com/q/27166069
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/27296078
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27296215
has answer: http://stackoverflow.com/a/27296235
type: Question
score: -2
tagged with: javascript
downvote count: 6
favorite count: 0
has comment: http://stackoverflow.com/comment/43056586
answer count: 3
possible better answer: http://stackoverflow.com/a/27296235
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
tagged with: css
has title: Make a button always visible on scroll
accepted answer: http://stackoverflow.com/a/27296215
has comment: http://stackoverflow.com/comment/43056590
has body: I have a form of many fields(long page), and each time I want to submit I have to scroll to the buttom to click on submit. I want a trick in which I can always see the submit button, without going to the bottom of the page. (liek making the submit button float on the page for instance)
has answer: http://stackoverflow.com/a/27296246

http://stackoverflow.com/comment/42996655
has text: Also if you use "this[itemData.id] = createItem(i+1, itemData)" inside the forEach, you can remove itemsMap object and directly call "item_1".
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27259969
type: Comment

http://stackoverflow.com/q/27242438
upvote count: 1
has comment: http://stackoverflow.com/comment/42960934
downvote count: 1
has answer: http://stackoverflow.com/a/27242500
has comment: http://stackoverflow.com/comment/42960930
has title: How to modify html string using jQuery
has comment: http://stackoverflow.com/comment/42960940
possible better answer: http://stackoverflow.com/a/27242527
has answer: http://stackoverflow.com/a/27242527
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27242500
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I try to use jQuery to modify the HTML template. For example: var d = ' '; var html = $(d).find(".b").html("BBBBB"); console.log(d); // I want to get the new html In above, I want to get ' BBBBB ' How can implement the case？ Please suggest.
has comment: http://stackoverflow.com/comment/42961044
score: 0
answer count: 2

http://stackoverflow.com/comment/42999245
score: 0
type: AnswerComment
has text: The Spec does not mention the GLSL optimization or how the mapping is "implementation specific".
type: Comment
comment on: http://stackoverflow.com/a/27217523

http://stackoverflow.com/q/27186526
type: AnsweredQuestion
has title: Call super constructor (closure compiler and library)
upvote count: 2
tagged with: google-closure-compiler
answer count: 1
tagged with: javascript
tagged with: google-closure-library
accepted answer: http://stackoverflow.com/a/27196347
favorite count: 0
score: 2
downvote count: 0
has body: Using the Google closure compiler and library for inheritance I found two different calls of super constructor in a lot of closure based libraries (forgot where I found it). Not sure if I got it wrong at all. What is the difference and what is the correct one to use? // Xhrio extends EventTarget goog.events.EventTarget.call(this); goog.net.XhrIo.base(this, 'constructor');
tagged with: google-closure
has answer: http://stackoverflow.com/a/27196347
type: Question

http://stackoverflow.com/a/27266979
upvote count: 1
answers question: http://stackoverflow.com/q/27266923
downvote count: 0
has comment: http://stackoverflow.com/comment/43005127
has body: This is due to a bug with IE7 and IE8's change events. Instead, you can use the onclick event listener: &lt;input type="checkbox" style="cursor: pointer;" id="number" onclick="number_fn()" value="TICK" /&gt; Source.
type: Answer
has comment: http://stackoverflow.com/comment/43005461
score: 1

http://stackoverflow.com/comment/42893117
comment on: http://stackoverflow.com/q/27205230
score: 0
type: Comment
type: QuestionComment
has text: Is it the background images that are still waiting to load? Or all images? Is there any content loaded via AJAX requests?

http://stackoverflow.com/q/27261902
has comment: http://stackoverflow.com/comment/42996938
answer count: 0
has comment: http://stackoverflow.com/comment/42997302
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has comment: http://stackoverflow.com/comment/42996654
type: Question
has comment: http://stackoverflow.com/comment/42996724
has body: I would like to build an electronic device using a Micro-Controller that will do something such as light up an LED light or display information on an LED screen when I have new un-read emails from a user that is in my short-list or VIP list of user mails. These are clients that I need to be able to respond to their emails ASAP and I would like to build a device to alert me when an email from them exist without having to constantly check my email in a browser or application on the computer. So I know this is sounding like a hardware question but for the time being I am asking for help or direction on how to do the software side of it only. My electronic device will likely be able to connect to the internet so I am thinking I should be able to build a simple application in PHP or JavaScript, the main languages I use daily for work. So I am asking if it's even possible right now to for example... Connect and check my Gmail account Then check to see if there is NEW UN-READ email that is from a list of "VIP/Client" emails or even better if it's possible to check if the un-read email has a certain "Label" applied to it? If I can get the PHP script to do this then I can build a simple device with one of these which can then call the script... Raspberry Pi - http://www.raspberrypi.org/ (computer running Linux) Arduino - http://www.arduino.cc/ (8bit micro controller) Tessel.io - https://tessel.io/ (Runs JavaScript + NodeJS + WiFi built-in) Also I am open to any other ideas to accomplish my end goal of creating some sort of Alert System for new emails from important clients...solutions that do not use a Smart Phone?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42996770
favorite count: 0
has title: Is it possible to check a GMail account for unread email with a certain Label attached to it?
has comment: http://stackoverflow.com/comment/42996741

http://stackoverflow.com/q/27229857
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27229923
upvote count: 3
tagged with: fullcalendar
type: Question
has title: Select every day slot on jquery full calendar ver 2.x
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27229923
tagged with: css
has body: the following code is a piece of the code generated by fullcalendrar jquery plugin ver 2. It has changed a bit since ver 1.x in the classes it uses. 07:00 table tbody tr").children.eq(1) Is the above jquery correct?
favorite count: 0

http://stackoverflow.com/comment/43081743
has text: It works for me in Win7.
comment on: http://stackoverflow.com/q/27225421
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42993397
score: 1
comment on: http://stackoverflow.com/q/27259760
type: Comment
type: QuestionComment
has text: @Andrei Ok I see what you mean. You can't http://stackoverflow.com/questions/276660/how-can-i-override-the-onbeforeunload-dialog-and-replace-it-with-my-own

http://stackoverflow.com/a/27272055
has comment: http://stackoverflow.com/comment/43013849
answers question: http://stackoverflow.com/q/27271927
downvote count: 0
has body: When I call this function, it works fine, I get the server's answer but I get the full promises object Sounds like you are doing something like this: var data = service.myFunction(); Above would be fine in synchronous world, however in case of asynchronous operations this is not correct usage of the promises. Instead you should use returned promise then/success methods: service.myFunction().then(function(data) { console.log(data); });
has comment: http://stackoverflow.com/comment/43014118
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43013813

http://stackoverflow.com/q/27262616
accepted answer: http://stackoverflow.com/a/27262653
possible better answer: http://stackoverflow.com/a/27262859
has answer: http://stackoverflow.com/a/27262859
type: Question
has title: Chained array creator
answer count: 2
tagged with: arrays
tagged with: javascript
tagged with: functional-programming
has answer: http://stackoverflow.com/a/27262653
has body: Just for fun, I'm looking for a way to create a function, array, with the following behavior: array() // [] array(2) // ugly function thing array(2)() // [2] array(2)(3)() // [2,3] etc The closest I can come is function array(x) { if (x == null) return [] return function() { // same as above?! // I don't want some inelegant solution involving a lot of additional parameters } } Is there a way to do this in ECMA5? If not, prove that the syntax can't accomodate such a function.
score: 0
type: AnsweredQuestion

http://stackoverflow.com/q/27220297
has body: Background: The application that I am working on is supposed to work offline. I should encrypt some text data using a password as a key at the java server side. The encrypted data is passed to the HTML5 page and at the client side using crypto-js library the server encrypted data should be decrypted. My issue: In order to encrypt my message in such a way that the client can decrypt it with crypt-js (using a user entered password), I need to know the exact steps that crypto-js expects while encrypting a message. What I need to know: I have the following encryption code which does the encryption of a message at the client side using crypto-js. var message = "my message text"; var password = "user password"; var encrypted = CryptoJS.AES.encrypt( message ,password ); console.log(encrypted.toString()); I need to know the AES parameters used by CryptoJS while encrypting a message(Not sure what they are, but it sounds like: key size (256), padding (pkcs5), mode (CBC), PBE algorithm (PBKDF2), salt (random), iteration count (100)) . It would be a great help if some one could confirm it...I been trying to solve this mystery for the last few days?. I need to know the different steps performed by CryptoJS while AES encrypting a message
tagged with: javascript
favorite count: 0
tagged with: security
upvote count: 3
has comment: http://stackoverflow.com/comment/42971644
linked to: http://stackoverflow.com/q/27677236
tagged with: cryptojs
linked to: http://stackoverflow.com/q/140131
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/27250883
tagged with: encryption
has answer: http://stackoverflow.com/a/27231514
has title: What are the AES parameters used and steps performed internally by crypto-js while encrypting a message with a password?
linked to: http://stackoverflow.com/q/27248644
linked to: http://stackoverflow.com/q/36762098
type: Question
score: 3
has answer: http://stackoverflow.com/a/52598588
has answer: http://stackoverflow.com/a/27250883
possible better answer: http://stackoverflow.com/a/52598588
answer count: 3

http://stackoverflow.com/comment/42992654
type: Comment
comment on: http://stackoverflow.com/a/27240944
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/66068/discussion-between-rafael-and-annablabber).
score: 0
type: AnswerComment

http://stackoverflow.com/q/27161178
linked to: http://stackoverflow.com/q/6348494
type: UnansweredQuestion
has body: Result not like I'm expect var clicks = 0; $("*").click(function(event){ if(clicks == 0){ // first click a=parseFloat(event.pageY-pageYOffset); ++clicks; }else{ // second clik b=parseFloat(event.pageY-pageYOffset); $("#lable7").text(b-a); //heppen in first click, why? clicks=0; } } ); I want to count distance between first and second click, and do it many times on page. I tried some tips but $('*').one('click',function(){ }).click(function(){ alert("heppen in first click"); }); What I'm doing wrong?
has comment: http://stackoverflow.com/comment/134012702
has title: first click, result not like I'm expect
type: Question
has comment: http://stackoverflow.com/comment/42816069
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27161237

http://stackoverflow.com/comment/43062783
comment on: http://stackoverflow.com/q/27299353
has text: You should do a URL rewrite in your `.htacess` file.
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/27293180
has title: How do you manage expensive derived calculations in a "flux" application
possible better answer: http://stackoverflow.com/a/27295776
favorite count: 0
has answer: http://stackoverflow.com/a/27301721
upvote count: 2
has body: I am currently working on a prototype application using the flux pattern commonly associated with ReactJS. In the Facebook flux/chat example, there are two stores, ThreadStore and UnreadThreadStore. The latter presents a getAll method which reads the content of the former synchronously. We have encountered a problem in that operations in our derived store would be too expensive to perform synchronously, and would ideally be delegated to an asynchronous process (web worker, server trip), and we are wondering how to go about solving this. My co-worker suggests returning a promise from the getter i.e. # MyView componentDidMount: function () { defaultState = { results: [] }; this.setState(defaultState); DerivedStore.doExpensiveThing() .then(this.setState); } I'm not entirely comfortable with this. It feels like a break with the pattern, as the view is the primary recipient of change, not the store. Here's an alternative avenue we've been exploring - in which the view mounting event dispatches a desire for the derived data to be refreshed (if required). # DerivedStore # ========================================================= state: { derivedResults: [] status: empty &lt;fresh|pending|empty&gt; }, handleViewAction: function (payload) { if (payload.type === "refreshDerivedData") { this.state.status = "pending"; # assume an async action has started } if (payload.type === "derivedDataIsRefreshed") { this.state.status = "fresh"; # the async action has completed } this.state.derivedResults = payload.results || [] this.notify(); } # MyAction # ========================================================= MyAction = function (dispatcher) { dispatcher.register(function (payload) { switch (payload) { case "refreshDerivedData": doExpensiveCalculation() .then(function(res) { dispatcher.dispatch({ type: "derivedDataIsRefreshed", results: res }) }) ); } }); }; # MyView # ========================================================= MyView = React.createClass({ componentDidMount: function ()…
answer count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27294925
has answer: http://stackoverflow.com/a/27301433
accepted answer: http://stackoverflow.com/a/27301721
type: Question
tagged with: reactjs
downvote count: 0
tagged with: javascript
tagged with: reactjs-flux
has answer: http://stackoverflow.com/a/27295776

http://stackoverflow.com/q/27186964
tagged with: javascript
tagged with: windows-media-player
favorite count: 0
has answer: http://stackoverflow.com/a/27223808
tagged with: jscript
score: 2
downvote count: 0
type: AnsweredQuestion
tagged with: video
has title: JScript Windows Media Player API
has body: in Internet Explorer 8 &amp; 9 I am using this API to control embedded videos in HTML with JavaScript (JScript) (e.g. play, stop, jump to position, ...): http://msdn.microsoft.com/en-us/library/windows/desktop/dd564034%28v=vs.85%29.aspx Now I want to make sure the browser compatibility of this API. It seems that it is a Internet Explorer (JScript) API especially for Windows Media Player 7.0 or higher. Unfortunately I didn't found out the name of the API. Does anybody know something more about it?
accepted answer: http://stackoverflow.com/a/27223808
type: Question
upvote count: 2
answer count: 1

http://stackoverflow.com/q/27187289
answer count: 1
has title: JQuery UI Autocomplete Multiple Textbox on ASP MVC Razor
tagged with: jquery-ui
tagged with: asp.net-mvc
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has body: I return a class object but only XRCFOR textbox is populate correctly. Select events seems no work. Through a WebServe I return object items. Select event on a row however is only populated the XRCFOR textbox. Here is the Html/razor/Jquery code. Thanks. &lt;td&gt; @Html.EditorFor(model =&gt; model.XRUDBF, Functions.GetAdditionalViewData(ViewData["PageStatus"].ToString(), ViewData["PageReadonly"].ToString(), "form-control")) @Html.EditorFor(model =&gt; model.XRCFOR, Functions.GetAdditionalViewData(ViewData["PageStatus"].ToString(), ViewData["PageReadonly"].ToString(), "form-control")) @Html.EditorFor(model =&gt; model.XRCFORDescription, new {htmlAttributes= new { @class = "form-control", @readonly = "readonly" }}) &lt;script type="text/javascript"&gt; $("#XRCFOR").autocomplete({ source: function (request, response) { $.ajax({ url: "/Zoom/GetFOR/", type: "POST", dataType: "json", data: { term: request.term }, success: function (data) { response($.map(data, function (item) { return { label: item.B5CFOR + " - " + item.B5RGS1, value: item.B5CFOR }; })) } }) }, select: function (event, ui) { $("#XRUDBF").val(ui.item.B5CUDB); $("#XRCFOR").val(ui.item.B5CFOR); $("#XRCFORDescription").val(ui.item.B5RGS1); }, //messages: { // noResults: '', // results: function () { } //}, minLength: 1 }); &lt;/script&gt; &lt;/td&gt;
type: Question
has answer: http://stackoverflow.com/a/27187612
accepted answer: http://stackoverflow.com/a/27187612
score: 0
tagged with: razor

http://stackoverflow.com/q/27264699
has comment: http://stackoverflow.com/comment/43001278
has comment: http://stackoverflow.com/comment/43001503
tagged with: javascript
has answer: http://stackoverflow.com/a/27264992
score: 0
answer count: 1
tagged with: data-binding
has body: I have a polymer element which is my parent element for my entire app. It performs ajax calls routinely and sets values according to the AJAX calls. Within the polymer element I have a child element that needs to display one of these values dynamically. Here is the child code: Robot is in {{ auto ? "AUTO" : "MANUAL T1" }} mode. It is used in the parent as such: And {{statusAuto}} is confirmed to change (between true and false). This change does not get reflected in the child element. I have similarly tried binding to global variables using the monostate pattern suggested on polymer's website, and I still have no success. How can this be achieved?
has comment: http://stackoverflow.com/comment/43001571
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43001484
has comment: http://stackoverflow.com/comment/43001345
has title: Polymer.js databindings inside nested components
has comment: http://stackoverflow.com/comment/43001188
has comment: http://stackoverflow.com/comment/43001411
type: Question
tagged with: polymer

http://stackoverflow.com/a/27202114
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/27193355
has body: Thanks every one for trying to help me, what I found, is that the button I was working on, has some work in the background, I'm using a template that help me with functionnalities, what Ive done is that I let it and created another button, work with it : $(".supprimer_bl").live("click", function() { var idBl = $(this).parent().parent().parent().get(0); console.log('the class of the element is : ', idBl); idBl.remove(); // $('.'+classCont).remove(); // $(this).closest('div [class*="form_lignefacturefournisseur"]').contents().remove(); blCount--; });
accepted answer of: http://stackoverflow.com/q/27193355
type: Answer

checkbox
tags question: http://stackoverflow.com/q/27249722
tags question: http://stackoverflow.com/q/27280273
tag name: checkbox
tags question: http://stackoverflow.com/q/27265398
tags question: http://stackoverflow.com/q/27265308
tags question: http://stackoverflow.com/q/27311850
tags question: http://stackoverflow.com/q/27232786
tags question: http://stackoverflow.com/q/27272448
tags question: http://stackoverflow.com/q/27264504
tags question: http://stackoverflow.com/q/27243397
tags question: http://stackoverflow.com/q/27248330
tags question: http://stackoverflow.com/q/27198837
tags question: http://stackoverflow.com/q/27245179
tags question: http://stackoverflow.com/q/27310657
tags question: http://stackoverflow.com/q/27159669
tags question: http://stackoverflow.com/q/27157803
tags question: http://stackoverflow.com/q/27173610
tags question: http://stackoverflow.com/q/27195538
tags question: http://stackoverflow.com/q/27258292
tags question: http://stackoverflow.com/q/27202840
tags question: http://stackoverflow.com/q/27172288
tags question: http://stackoverflow.com/q/27270073
type: Tag
tags question: http://stackoverflow.com/q/27308931
tags question: http://stackoverflow.com/q/27200871
tags question: http://stackoverflow.com/q/27257732
tags question: http://stackoverflow.com/q/27281713
tags question: http://stackoverflow.com/q/27161165

http://stackoverflow.com/comment/42843745
score: 0
type: Comment
type: QuestionComment
has text: As I said above it doesn't look like the library will adjust. Otherwise for example if you had one block it would stretch it to fill the entire screen.
comment on: http://stackoverflow.com/q/27162217

http://stackoverflow.com/comment/42840386
has text: Don't use regexps to parse Roman numerals. Just write a little mini-parser.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27174130

http://stackoverflow.com/q/27226888
answer count: 5
has comment: http://stackoverflow.com/comment/42931335
has answer: http://stackoverflow.com/a/27227012
has answer: http://stackoverflow.com/a/27226947
upvote count: 3
has answer: http://stackoverflow.com/a/27226937
accepted answer: http://stackoverflow.com/a/27227216
downvote count: 2
has title: Javascript / JQuery Conditional replace
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42931346
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27226938
has answer: http://stackoverflow.com/a/27227216
has body: I have a variable in javascript: var myvar = "0711111111"; I bascially need to do a condition saying: if (myvar's first character = '0') or (myvar's first character = '+') { then ... replace the first character with 'somethingelse'; }
favorite count: 0
has answer: http://stackoverflow.com/a/27226938

http://stackoverflow.com/comment/42958745
type: AnswerComment
has text: Well, looking at the Demo, this is a very concise way of doing it, especially since some of the pages I'm using this on have quite a few links. I've tried it, but I'm not getting any results. As embarrassing as it is, I think I might be linking to the external Javascript file incorrectly.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27240977

http://stackoverflow.com/comment/42903208
has text: I don't want to invest time in coding entire angularjs from where problems are getting triggered. For now I have implemented error interceptor and looking for error exactly like `TypeError: Cannot read property 'charAt' of undefined` and prompting user to uninstall the addons, but thats just the hack. I am sure there are many web developers who are frustrated with these addons, so is there any proper way to do it.
comment on: http://stackoverflow.com/a/27210835
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27193909
has title: Show hide bubble div jquery click function
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27194109
accepted answer: http://stackoverflow.com/a/27194109
score: 0
has body: I have one question about my script. I have created this DEMO from codepen.io I'm trying to make a bubble pop-up clicked on the link. My onclick function is working now. My question is, if you click my DEMO page then you see there are two image and when you hover over that image then you see black color div. So if you click this div then you see .bubble will open but if you mouse live on this div bubble will still stay open. Ok it should be stay opening but the black div automatically getting display:none => I don't want it (How can i do this.) Also if you click right side black color div then you see left .bubble still stay open so i want when i click other black div then i want other bubble will automatically hide. Anyone can help me in this regard ? This is my jquery function : $(document).ready(function() { $('.nav-toggle').click(function(){ var collapse_content_selector = $(this).attr('href'); var toggle_switch = $(this); $(collapse_content_selector).toggle(function(){ if($(this).css('display')=='none'){ toggle_switch.html('x'); }else{ toggle_switch.html('x'); } }); }); });
has comment: http://stackoverflow.com/comment/42873620
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42873574
linked to: http://stackoverflow.com/q/15924751
type: AnsweredQuestion

http://stackoverflow.com/a/27210857
score: -1
answers question: http://stackoverflow.com/q/27210813
downvote count: 2
type: Answer
upvote count: 1
has body: I think you confused Javascript's this with jQuery's $(this). $() is the jQuery constructor function. this is a reference to the DOM element of invocation. Please find the working code below: $("li").click(function(){ $(this).toggleClass("selected"); $(".selected").each(function(){ $(".items").append($(this).text() + ", "); }); }); $(".selected").each(function(){ $(".items").append($(this).text() + ", "); }); .selected{ background-color: yellow; } Category Link 1 Link 2 Link 3 Link 4 Link 5 Link 6 Link 7 Selected Items Appear Here Read up on this: jQuery $(this) vs Javascript this

http://stackoverflow.com/a/27177103
has comment: http://stackoverflow.com/comment/42843907
upvote count: 1
has comment: http://stackoverflow.com/comment/42843709
type: Answer
answers question: http://stackoverflow.com/q/27176871
downvote count: 0
score: 1
has body: Since you tagged jQuery I made a jQuery answer. This is how I would do it: HTML Tab1 info 1 content Tab1 info 2 content Tab1 info 3 content Tab1 info 1 Tab1 info 2 Tab1 info 3 JavaScript $(function() { $(".tabClicker").click(function() { var tab = $(this).attr("data-tab"); $(".tabContent").hide(); $("#" + tab).show(); }); }); DEMO : JSFiddle
has comment: http://stackoverflow.com/comment/42843601

http://stackoverflow.com/comment/43006003
score: 1
comment on: http://stackoverflow.com/q/27267479
has text: I seriously doubt that Angular.js, created by Google, would be incompatible with Google Chrome; And I personally have never seen any issues. However, you are describing a 3rd party module, which certainly could have some issues. Although, a 404 error seems to be a different issue entirely.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43028936
type: QuestionComment
comment on: http://stackoverflow.com/q/27279564
has text: Yes, in general stealing the token would give anyone an access to web services. The same applies for authentication cookies and/or headers. To prevent the token from being stolen, all the traffic between the user and services should go via https. The origin is validated within the javascript engine in a browser, if a request is forged outside of a browser, the policy is not verified.
score: 1
type: Comment

twitter-bootstrap
tags question: http://stackoverflow.com/q/27162279
tags question: http://stackoverflow.com/q/27230698
tags question: http://stackoverflow.com/q/27204404
tags question: http://stackoverflow.com/q/27185817
tags question: http://stackoverflow.com/q/27172796
tags question: http://stackoverflow.com/q/27238444
tags question: http://stackoverflow.com/q/27209293
tags question: http://stackoverflow.com/q/27198837
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/27281387
tags question: http://stackoverflow.com/q/27166001
tags question: http://stackoverflow.com/q/27196139
tags question: http://stackoverflow.com/q/27291926
tags question: http://stackoverflow.com/q/27254726
tags question: http://stackoverflow.com/q/27172876
tags question: http://stackoverflow.com/q/27291214
tags question: http://stackoverflow.com/q/27235580
tags question: http://stackoverflow.com/q/27293326
tags question: http://stackoverflow.com/q/27250805
tags question: http://stackoverflow.com/q/27311714
tags question: http://stackoverflow.com/q/27270684
tags question: http://stackoverflow.com/q/27247680
tags question: http://stackoverflow.com/q/27166102
tags question: http://stackoverflow.com/q/27226868
tags question: http://stackoverflow.com/q/27188438
tags question: http://stackoverflow.com/q/27250816
tags question: http://stackoverflow.com/q/27184704
tags question: http://stackoverflow.com/q/27255657
tags question: http://stackoverflow.com/q/27231614
tags question: http://stackoverflow.com/q/27230137
tags question: http://stackoverflow.com/q/27172746
tags question: http://stackoverflow.com/q/27295343
tags question: http://stackoverflow.com/q/27238938
tags question: http://stackoverflow.com/q/27303630
tags question: http://stackoverflow.com/q/27232005
tags question: http://stackoverflow.com/q/27179276
tags question: http://stackoverflow.com/q/27299210
tags question: http://stackoverflow.com/q/27169537
tags question: http://stackoverflow.com/q/27302054
tags question: http://stackoverflow.com/q/27275736
tags question: http://stackoverflow.com/q/27312202
tags question: http://stackoverflow.com/q/27247548
tags question: http://stackoverflow.com/q/27261993
tags question: http://stackoverflow.com/q/27233166
tags question: http://stackoverflow.com/q/27184627
tags question: http://stackoverflow.com/q/27231250
tags question: http://stackoverflow.com/q/27313460
tags question: http://stackoverflow.com/q/27210691
tags question: http://stackoverflow.com/q/27175047
tags question: http://stackoverflow.com/q/27311411
type: Tag
tags question: http://stackoverflow.com/q/27281420
tags question: http://stackoverflow.com/q/27233431
tags question: http://stackoverflow.com/q/27247432
tags question: http://stackoverflow.com/q/27303402
tags question: http://stackoverflow.com/q/27184412
tags question: http://stackoverflow.com/q/27292668
tags question: http://stackoverflow.com/q/27185462
tags question: http://stackoverflow.com/q/27181222
tags question: http://stackoverflow.com/q/27289527
tags question: http://stackoverflow.com/q/27313754
tags question: http://stackoverflow.com/q/27238510
tags question: http://stackoverflow.com/q/27266879
tags question: http://stackoverflow.com/q/27213732
tags question: http://stackoverflow.com/q/27259257
tags question: http://stackoverflow.com/q/27234375
tags question: http://stackoverflow.com/q/27279728
tags question: http://stackoverflow.com/q/27188659
tags question: http://stackoverflow.com/q/27238018
tags question: http://stackoverflow.com/q/27168678
tags question: http://stackoverflow.com/q/27282436
tags question: http://stackoverflow.com/q/27275979
tags question: http://stackoverflow.com/q/27215861
tags question: http://stackoverflow.com/q/27250607
tags question: http://stackoverflow.com/q/27278440
tags question: http://stackoverflow.com/q/27226754
tags question: http://stackoverflow.com/q/27198929
tags question: http://stackoverflow.com/q/27226328
tags question: http://stackoverflow.com/q/27172953
tags question: http://stackoverflow.com/q/27184202

http://stackoverflow.com/comment/42930969
type: Comment
comment on: http://stackoverflow.com/a/27226621
type: AnswerComment
has text: I tied doing this too but on the java side I got errors because there were [] brackets in it!
score: 0

http://stackoverflow.com/q/27199336
accepted answer: http://stackoverflow.com/a/27208701
answer count: 2
has comment: http://stackoverflow.com/comment/42882848
tagged with: yii
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/11649866
possible better answer: http://stackoverflow.com/a/27199378
has answer: http://stackoverflow.com/a/27199378
has comment: http://stackoverflow.com/comment/42882838
tagged with: php
has comment: http://stackoverflow.com/comment/42882873
has body: Is there any PHP function to convert an integer to Lakh and Crore? 900800 -&gt; 9,00,800 500800 -&gt; 5,00,800
type: AnsweredQuestion
score: 0
has title: Is there any PHP function to convert number to currency with thousands separators?
type: Question
has answer: http://stackoverflow.com/a/27208701
has comment: http://stackoverflow.com/comment/42882817

http://stackoverflow.com/comment/42913101
type: Comment
has text: There are too many unknowns here for us to be sure what is wrong. For example we don't know what `numposts` is.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27181604

http://stackoverflow.com/comment/42906556
type: Comment
comment on: http://stackoverflow.com/a/27212400
type: AnswerComment
has text: My pleasure :) It's off the front page of the addon-sdk hub page you'll probably like this: https://developer.mozilla.org/en-US/Add-ons/SDK :)
score: 0

http://stackoverflow.com/comment/42937695
type: Comment
has text: Yes you can use jquery in your script - just try it and see!
score: 1
comment on: http://stackoverflow.com/q/27230360
type: QuestionComment

http://stackoverflow.com/comment/44765515
score: 0
type: Comment
type: QuestionComment
has text: Have you found anything on this by chance?
comment on: http://stackoverflow.com/q/27311035

http://stackoverflow.com/comment/42896805
comment on: http://stackoverflow.com/q/27160950
score: 0
type: Comment
has text: Show us your async code, are you using angular-aware async (e.g. $http)?
type: QuestionComment

http://stackoverflow.com/a/27167837
answers question: http://stackoverflow.com/q/27167717
type: Answer
has body: You can simply do it this way as said by @nhahtdh $('body').attr('class', function(_, cls){ return cls.split(/\s+/).filter(function(x){ // split return x.indexOf("demo-") !== 0; // filter out unwanted values }).join(" "); // join the array and return it }); If you want regex solution, you could do $('body').attr('class', function(_, cls){ return cls.replace(/\bdemo-\S+/g,""); });
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42827951

http://stackoverflow.com/comment/42970963
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27247223
score: 0
has text: no still not working...have to change everywhere the listElement.text to firstname...is there a way to reference the text of the li element?

http://stackoverflow.com/q/27255187
tagged with: ajax
type: UnansweredQuestion
tagged with: mime-types
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27257251
type: Question
tagged with: javascript
has title: Add mime Content-ID to request payload (AJAX)
tagged with: multipartform-data
answer count: 1
downvote count: 0
has body: I need to add "&lt;message&gt;" as a Content-ID to my ajax request for my multipart form. I have a pretty simple request using Backbone's save: var data = new FormData(); data.append('message', new Blob([JSON.stringify(message.attributes)],{type: "application/json"}),'message'); data.append(document.getElementById('fileInput').files[0].name,document.getElementById('fileInput').files[0]); message.save({},{ contentType: 'multipart/form-data', data: data }); The first part of the form, "message," should have a Content-ID header. Any idea on how to achieve this?
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/comment/43016695
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27273415
type: QuestionComment
has text: jsfiddle.net/rubbpdqv it works like this. Maybe there is something wrong in your mark up

http://stackoverflow.com/comment/42999175
comment on: http://stackoverflow.com/a/27263360
has text: Umm. Ok. I'm going to trust you on that because of your high rep :)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42932370
comment on: http://stackoverflow.com/a/27227322
type: Comment
has text: You need some form of user interaction. Which can be a click or a keypress.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27290355
has comment: http://stackoverflow.com/comment/43046849
has comment: http://stackoverflow.com/comment/43046782
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43047345
upvote count: 0
has comment: http://stackoverflow.com/comment/43046837
score: -5
has answer: http://stackoverflow.com/a/27290647
has title: How to add new input box when user want to input more data
downvote count: 5
tagged with: javascript
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/43046971
answer count: 2
has body: my database have 2 table college course college only store background of college like id, name, address and so on. course have id from college and course1, course2 and ...... when college register to my system. they need to add their course.. EXAMPLE so how im gonna add this course if college AAA have 10 course. College BBB have 3 course and college CCC have 15 course to add.. like AAA it chef building design BBB it chef
tagged with: php
has answer: http://stackoverflow.com/a/27290752

http://stackoverflow.com/comment/43080205
comment on: http://stackoverflow.com/q/27299669
has text: Try adding this : `android:configChanges="orientation|screenSize|keyboardHidden"`
score: 0
type: QuestionComment
type: Comment

html-lists
tags question: http://stackoverflow.com/q/27300820
type: Tag
tags question: http://stackoverflow.com/q/27247146
tag name: html-lists

http://stackoverflow.com/comment/42878712
type: Comment
score: 0
type: AnswerComment
has text: @Mr.Lavalamp - in general, geometry properties that depend upon proper layout to be accurate will trigger a pending layout if that layout is required in order to accurately report the property. For example `.offsetHeight` is one such property. But, absolutely positioned objects have a known position without recomputing layout (since their position is not dependent upon layout).
comment on: http://stackoverflow.com/a/27196836

http://stackoverflow.com/comment/42821468
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27160520
has text: @ymz would you need the whole multipart body? The certificate I gonna provide base64 encoded.
score: 0

http://stackoverflow.com/a/27214015
score: 0
type: AcceptedAnswer
has body: You will get a better slider animation effect by temporarily detaching the scroll handler and scrolling the slider directly, with the same animationTime as for the main animation. To do this, you also need to : namespace the scroll event .nav, to allow safe use of .off() stop() the slider animation in the "if the user does something" block I've also included a few efficiency savings in the way contentTop and #slider are set up but these are not actually necessary. $(document).ready(function() { var topRange = 200, // measure from the top of the viewport to X pixels down edgeMargin = 20, // margin above the top or margin from the end of the page animationTime = 600, // time in milliseconds contentTop, //array of sidebar links navLinkWrapper = $("nav ul li a").eq(0).parent(); var $slider = $("&lt;div id=\"slider\" /&gt;").css({ 'height': navLinkWrapper.outerHeight(), 'left': navLinkWrapper.position().left, 'top': navLinkWrapper.position().top, 'width': '100%' }).appendTo($('nav ul')); // Stop animated scroll if the user does something $('html,body').on('scroll mousedown DOMMouseScroll mousewheel keyup', function(e) { if (e.which &gt; 0 || e.type == 'mousedown' || e.type == 'mousewheel') { $('html,body').stop(); $slider.stop(); //&lt;&lt;&lt;&lt;&lt;&lt;&lt; } }); // Set up content an array of locations contentTop = $('#sidebar a').map(function() { return $($(this).attr('href')).offset().top; }); // Animate menu scroll to content $('#sidebar a').on('click', function(e) { e.preventDefault(); $(window).off('scroll.nav', scroller); //&lt;&lt;&lt;&lt;&lt;&lt;&lt; $slider.stop().animate({ //&lt;&lt;&lt;&lt;&lt;&lt;&lt; top: ($(this).closest("li").position().top) //&lt;&lt;&lt;&lt;&lt;&lt;&lt; }, animationTime); //&lt;&lt;&lt;&lt;&lt;&lt;&lt; var sel = this, newTop = Math.min(contentTop[$('#sidebar a').index($(this))], $(document).height() - $(window).height()); // get content top or top position if at the document bottom $('html,body').stop().animate({ 'scrollTop': newTop }…
answers question: http://stackoverflow.com/q/27213239
has comment: http://stackoverflow.com/comment/42908666
type: Answer
has comment: http://stackoverflow.com/comment/42910818
has comment: http://stackoverflow.com/comment/42910859
has comment: http://stackoverflow.com/comment/42908557
accepted answer of: http://stackoverflow.com/q/27213239
has comment: http://stackoverflow.com/comment/42910773
has comment: http://stackoverflow.com/comment/42909397

http://stackoverflow.com/comment/43031995
type: AnswerComment
score: 0
has text: Thanks Scott - exactly what I'm searching for.
type: Comment
comment on: http://stackoverflow.com/a/27281618

http://stackoverflow.com/comment/42880095
comment on: http://stackoverflow.com/a/27197607
type: Comment
has text: Yeah I'm seeing the output in the console right now. Changing the port doesn't seem to fix it.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43002884
comment on: http://stackoverflow.com/q/27265542
type: QuestionComment
type: Comment
has text: We have tried it but didn't get success.
score: 0

http://stackoverflow.com/q/27215497
score: 0
answer count: 2
tagged with: web-component
has answer: http://stackoverflow.com/a/27217442
has answer: http://stackoverflow.com/a/27220120
has body: I would like to create a client app for my RESTful service. I really like the idea of Polymer, but I am not able to find some complex example how to write a Polymer rest service handler. I am new to Polymer so any help is appreciated
type: UnansweredQuestion
type: Question
has title: REST based Polymer app
tagged with: polymer
has comment: http://stackoverflow.com/comment/42916979
tagged with: javascript

http://stackoverflow.com/q/27289236
type: AnsweredQuestion
tagged with: asp.net-mvc
has body: I have requirement, I am showing a Menu on the right side of the partial view in MVC. I do have edit mode and view mode, in the view. When I am in edit mode, I want to ask a confirmation message to navigate or not, on the click of the menu links. Somebody please help me on this.
linked to: http://stackoverflow.com/q/560084
has answer: http://stackoverflow.com/a/27289321
score: -1
type: Question
tagged with: javascript
has title: Custom handling menu clicks
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43044818
answer count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/15234881
upvote count: 0
has comment: http://stackoverflow.com/comment/43045144
accepted answer: http://stackoverflow.com/a/27289321

http://stackoverflow.com/comment/42861078
type: AnswerComment
has text: This works, thank you. I had to modified my array to fit your solution, but now it works great.
comment on: http://stackoverflow.com/a/27186101
score: 0
type: Comment

http://stackoverflow.com/comment/43083072
type: Comment
has text: @HbV2: Such URL is not real URL which will be used in production. Nevertherless you can paste such URL in web browser and see how it will be fixed. Fr example you will see `file://servername/foldername/name.pdf` in Chrome. So you can just use fixed syntax of the URL depend on the web browser which you use.
comment on: http://stackoverflow.com/a/27309874
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43056044
comment on: http://stackoverflow.com/q/27294551
has text: No one has any ideas what could be causing this ?..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42853295
type: QuestionComment
has text: checking if url is set first (console.log) shows correct url? Scope of url var is ok? in generated code - what do you see as href=""?
score: 0
comment on: http://stackoverflow.com/q/27182714
type: Comment

http://stackoverflow.com/a/27205888
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27158744
type: Answer
has body: You are almost right about the "I need something like this" part - the issue with your attempt at $(document).on('fileupload', '#upload', function () { is that 'fileupload' is not an event which is what .on() is expecting and that's why it worked for you with the 'click' case and not here. You should include the assets/js/script.js to your page after the $('#upload') element is dynamically loaded so that all the content the script needs exists before it is executed. For that take a look at jQuery.getScript() or a simple dom approach and use it after the code which gets your elements added to the dom.

http://stackoverflow.com/comment/43103925
type: Comment
type: QuestionComment
has text: what exactly didn't work? i meant something like http://plnkr.co/edit/g3Z2opgXRGhp89tK3as5?p=preview
comment on: http://stackoverflow.com/q/27245959
score: 0

http://stackoverflow.com/q/27211191
has answer: http://stackoverflow.com/a/27211331
tagged with: gwt
type: AnsweredQuestion
has title: How can I use the same Event Handlers Performing same functions on multiple Objects of the same Kind in GWT (or Java AWT Swing)
tagged with: java
type: Question
has body: I just started working on Gwt2.0. I have two textbox here. Both perform the same event operation. Using addFocusListener() What I have now is. areaBox.addFocusListener(new FocusListener(){ @Override @Deprecated public void onFocus(Widget arg0) { // TODO Auto-generated method stub areaBox.setTitle("Area"); } @Override public void onLostFocus(Widget arg0) { if(areaBox.getText().length() &gt;= 4 ) { areaBox.setStyleName("gwt-TextBox-Success"); } else { areaBox.setStyleName("gwt-TextBox-Error"); cityBox.setText("Enter Area Name "); areaBox.addFocusListener(new FocusListener(){ @Override @Deprecated public void onFocus(Widget arg0) { areaBox.setText(null); areaBox.setStyleName("gwt-TextBox-AE"); } @Override @Deprecated public void onLostFocus(Widget arg0) { } }); } } }); cityBox.addFocusListener(new FocusListener(){ @Override @Deprecated public void onFocus(Widget arg0) { cityBox.setTitle("City"); } @Override public void onLostFocus(Widget arg0) { if(cityBox.getText().length() &gt;= 4 ) { cityBox.setStyleName("gwt-TextBox-Success"); } else { cityBox.setStyleName("gwt-TextBox-Error"); cityBox.setText("Enter City Name "); cityBox.addFocusListener(new FocusListener(){ @Override @Deprecated public void onFocus(Widget arg0) { cityBox.setText(null); cityBox.setStyleName("gwt-TextBox-AE"); } @Override @Deprecated public void onLostFocus(Widget arg0) { // TODO Auto-generated method stub } }); } } }); What the code does is. When Focused on Area TextBox, a tooltip appears, showing what to enter. When Focus on it is lost or comes to next textbox i.e City TextBox, it checks whether the entered string is greater than 4 characters. if yes then SUCCESS css style is applied to the box, if not ERROR css style is applied. So, when clicked on it(AreaBox) again, The text is cleared and css style is reset. The above is a sample between 2 textbox. Please help me, I have nearly 10 such fields, I want to minimize the code. I am thinking of using collections or custom widgets. But don't know whe…
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27211331
answer count: 1
tagged with: events

http://stackoverflow.com/comment/42924524
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27217170
type: Comment
has text: Can you please upvote my question http://stackoverflow.com/questions/27216987/jquery-readonly-strange-behavior/27217016#27217016 ? It has received -1 but I think it can be useful to other people

http://stackoverflow.com/comment/43069532
comment on: http://stackoverflow.com/q/27303075
type: Comment
type: QuestionComment
score: 1
has text: Then do that in your ajax call, either in the success or in .done()...

http://stackoverflow.com/q/27222223
tagged with: unit-testing
linked to: http://stackoverflow.com/q/1068834
downvote count: 0
has comment: http://stackoverflow.com/comment/42923076
has body: I'm trying to learn about unit testing and I found this overview by Ben Alman. On slide 23, he shows how a variable named actual containing an object {a: 1} is not equal to just the object itself. What does that mean? Aren't they the same value? How can the objects be different? test("deepEqual", 7, function() { var actual = {a: 1}; equal( actual, {a: 1}, "fails because objects are different"); deepEqual(actual, {a: 1}, "passes because objects are equivalent"); deepEqual(actual, {a: "1"}, "fails because '1' !== 1"); var a = $("body &gt; *"); var b = $("body").children(); equal( a, b, "fails because jQuery objects are different"); deepEqual(a, b, "fails because jQuery objects are not equivalent"); equal( a.get(), b.get(), "fails because element arrays are different"); deepEqual(a.get(), b.get(), "passes because element arrays are equivalent"); });
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42923793
score: 1
tagged with: qunit
favorite count: 0
has comment: http://stackoverflow.com/comment/42923894
type: Question
has answer: http://stackoverflow.com/a/27222531
has title: Why does this QUnit test fail?
answer count: 1
has comment: http://stackoverflow.com/comment/42923767
linked to: http://stackoverflow.com/q/201183
upvote count: 1

http://stackoverflow.com/a/27269856
answers question: http://stackoverflow.com/q/27269406
type: Answer
has body: You can use window.postMessage() to pass data values from your parent window to iframe window. So you can pass your css values with this method. Mode details for window.postMessage() is available here
score: 0

http://stackoverflow.com/comment/42986668
comment on: http://stackoverflow.com/a/27254464
type: Comment
score: 0
type: AnswerComment
has text: He has already given you all the information you should need to produce the code yourself

http://stackoverflow.com/a/27233347
accepted answer of: http://stackoverflow.com/q/27233183
downvote count: 0
answers question: http://stackoverflow.com/q/27233183
has comment: http://stackoverflow.com/comment/42943930
has body: If you want custom comparison you can implement Object.prototype.valueOf(). This is used when coercing the object to a primitive when the &lt;, >, + etc. operators are used. Example var Time = function (x) { this.x = x; }; Time.prototype.valueOf = function () { console.log("valueOf() called"); return this.x; } var a = new Time(1); var b = new Time(2); console.log(a &gt; b); // false console.log(a &lt; b); // true console.log(a + b); // 3 console.log(a &lt;&lt; 10); // 1024 console.log(a / b); // 0.5
score: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42943985
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42946377

http://stackoverflow.com/comment/42812970
type: Comment
score: 0
type: QuestionComment
has text: @Xan I think this is definitely the issue here. Any ideas how I might circumvent this? Is there a way to access the offending DOM parts (e.g., ) without a page refresh? Also, why would a website not want some of the metadata to be relevant in the DOM?
comment on: http://stackoverflow.com/q/27158087

http://stackoverflow.com/a/27206288
type: Answer
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/27205398
downvote count: 1
has body: if you are using jquery you can do that like this: google test1 test2 test3

http://stackoverflow.com/comment/43002266
type: Comment
type: QuestionComment
has text: You can't think sequential way when dealing with asynchronous function. I will suggest return a promise instead of some value. Show how you need to call the function. People can suggest you how should it be done
comment on: http://stackoverflow.com/q/27262307
score: 0

http://stackoverflow.com/comment/42904197
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27207951
has text: Good question (see https://www.polymer-project.org/docs/polymer/layout-attrs.html#flexible-children). `fit` uses absolute positioning, I guess `flex` uses flexbox. I don't know what the advantages/disadvantages are.
type: Comment

http://stackoverflow.com/comment/43062278
has text: Yes, because ng-model is binding to undefined.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27298802

http://stackoverflow.com/q/27180487
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42851308
has comment: http://stackoverflow.com/comment/42855763
type: Question
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27419692
upvote count: 1
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27419692
has body: I've created a util for my app - batch-checkbox-util.js and would like to test it now. I've written test, that is at the same link, but for some reason during test run, it fails and says, that controller isn't available. Controller, that is used by child directvie from parent directive.
tagged with: javascript
has title: How to test directive, that has parent directive defined
favorite count: 0

http://stackoverflow.com/comment/42964804
has text: @swapnilnax....sorry but i will not provide you full fledge working code...as per your question this answer is more than enough...just try to use this code along with your skills and your problem will solve....
comment on: http://stackoverflow.com/a/27244532
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42958067
type: AnswerComment
has text: There is a restriction in his question he set a range of 0 - 360 degrees, and I get negative angles with your solution.
type: Comment
comment on: http://stackoverflow.com/a/27240719
score: 0

http://stackoverflow.com/comment/42861218
type: Comment
has text: The above line of code is bit buggy. Try this one $('#replace-div').html($(data).find("#replace-div").html());
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27183468

rtmp
tag name: rtmp
tags question: http://stackoverflow.com/q/27199000
type: Tag

port
tags question: http://stackoverflow.com/q/27216742
type: Tag
tag name: port

http://stackoverflow.com/comment/43081282
has text: @Bergi I actually didn't downvote the answer - just because it is biased doesn't mean it *isn't a good answer*. There is an upvote :)
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/27309455
type: Comment

http://stackoverflow.com/q/27162250
type: Question
tagged with: javascript
score: 0
has body: I want to check the enum value set in the managed bean from a java script in JSF. How can I do this? My JSF has something like below. &lt;script language="javascript"&gt; function displayMsg() { setwindowOverlayPos('popup_window', - 100, - 150); } window.onload = function () { // this is the enum value I want to check. if the value is cust1 , I call the popup window. var cust1= '#{myBean.customerType.custType == "cust1"}'; if(cust1){ displayMsg(); } } &lt;/script&gt; I have enum for customer types public enum CustomerTypeEnum { CUST1("CUST1"), CUST2("CUST2"); private String custType; private CustomerTypeEnum(String s) { custType = s; } /** * @return customer type */ public String CustomerTypeEnum() { return custType; } } And my Managed bean having @ManagedBean(name = "home") @ViewScoped public class HomeBean extends BaseOrderStepBean { private CustomerTypeEnum customerType; public void method1(){ customerType = CustomerTypeEnum.CUST1; } }
answer count: 1
has comment: http://stackoverflow.com/comment/42825866
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27186096
has title: Use Enum value set in the bean from Java Script
tagged with: enums
tagged with: jsf
tagged with: java

internet-explorer-8
tags question: http://stackoverflow.com/q/27220410
tags question: http://stackoverflow.com/q/27311349
tags question: http://stackoverflow.com/q/27296745
tags question: http://stackoverflow.com/q/27271373
type: Tag
tags question: http://stackoverflow.com/q/27248470
tags question: http://stackoverflow.com/q/27281713
tag name: internet-explorer-8
tags question: http://stackoverflow.com/q/27305191
tags question: http://stackoverflow.com/q/27276005
tags question: http://stackoverflow.com/q/27263614
tags question: http://stackoverflow.com/q/27241524
tags question: http://stackoverflow.com/q/27252880
tags question: http://stackoverflow.com/q/27243572
tags question: http://stackoverflow.com/q/27271260
tags question: http://stackoverflow.com/q/27305403

http://stackoverflow.com/q/27289138
has answer: http://stackoverflow.com/a/27289810
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27289246
score: 1
has title: client side onkeyup in aspx control
type: Question
tagged with: c#
has body: I'm trying to make a javascript call in a text box as shown bellow &lt;asp:TextBox ID='Textbox1' runat='server'&gt;&lt;/asp:TextBox&gt; I need to make the user input in such a way that user cannot put more than 9 digit before point and 9 digits after point. For example 123456789.123456789 this is the maximum length that a user can enter. I need to do it in keypress or keyup event. Please help me how to do it.
tagged with: javascript
linked to: http://stackoverflow.com/q/995183
answer count: 3
has answer: http://stackoverflow.com/a/27290481
downvote count: 0
tagged with: asp.net
favorite count: 0

http://stackoverflow.com/comment/42976555
comment on: http://stackoverflow.com/q/27251236
score: 0
has text: You need CSS to do that. No need to use SBG to do a pulsating circle, it's overkill IMO.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43838696
score: 0
type: AnswerComment
type: Comment
has text: To be honest replacing internal urls with global urls using regex is kind of a hack. There should be a way to actually perform this routing on a deeper level - look at what Angular does in `ui-router`.
comment on: http://stackoverflow.com/a/27660188

http://stackoverflow.com/a/27240719
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42958145
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27240547
has body: If coordinate system have 0 degrees pointing up/north x comes first for the atan2 function: var x = x2 - x1; var y = y2 - y1; var angleDegrees = Math.atan2(x, y) * 180 / Math.PI; if (angleDegrees &lt; 0) angleDegrees += 360; // force positive value
answers question: http://stackoverflow.com/q/27240547
has comment: http://stackoverflow.com/comment/42958067

http://stackoverflow.com/comment/43043726
type: Comment
has text: Hi thank you very much really , actually I'm stuck here from last days so i was feel very tired now this will help me so thanx bro...
type: AnswerComment
comment on: http://stackoverflow.com/a/27288196
score: 0

http://stackoverflow.com/q/27242366
has comment: http://stackoverflow.com/comment/42960848
favorite count: 0
answer count: 5
score: -4
has comment: http://stackoverflow.com/comment/42960821
has answer: http://stackoverflow.com/a/27242465
has answer: http://stackoverflow.com/a/27242521
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27242441
has answer: http://stackoverflow.com/a/27242432
has body: Ok, so im a beginner, working with javascript. Im making a small game to impress my friends, and for some reason, this code isnt working. This is only part of my code, the part that has to deal with my it isnt working. When I run it, it doesn't go to the ELSE command, even if you dont type STAY, will someone tell me why? Here it is: var qestionOne = prompt("An old man emerges from the shadows of the forest that you are currently standing in. Farther ahead, you can see that the forest breaks up, and the trees become less and less thick. If you squint, you can even see a small town. * Do you chose to either, STAY, and talk to the old man, or LEAVE, and continue down the path that you are following, and go to the town? *"); if (questionOne = "STAY") { alert("The old man approaches you, and speaks. 'I must warn you, there is a trap at the end of this forest. Were the undergrowth thins,there is a horrable and evil sludge monster. Please, go around' The old man rasped. Thankfull for the information, you proceed your journey, and avoid a big portion of the forest ahead."); } else { alert("You travel ahead, down the path. You suddenlly become very hungry. You notice that the trees around you have very juicy looking fruit on the branches.You have never seen this type of food before, however, you are a..Fruit-toligist...and know that poiseness fruit have yellow and black stripes. You pluck one off of a nearby tree and hungrily munch into the foreign food. A loud screeching sound interupts your thoughts on filling your stomache, and directs your eyes behind you."); }
tagged with: if-statement
has answer: http://stackoverflow.com/a/27242441
has answer: http://stackoverflow.com/a/27242463
type: Question
downvote count: 4
upvote count: 0
tagged with: javascript
has title: A small code to impress friends is int working
linked to: http://stackoverflow.com/q/359494
accepted answer: http://stackoverflow.com/a/27242463

http://stackoverflow.com/comment/43022227
comment on: http://stackoverflow.com/q/27276660
has text: Can you post the full code (the other functions)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42932920
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27227075
has text: @sanki I just have one div with id "pil" :-|

storage
tag name: storage
tags question: http://stackoverflow.com/q/27178124
type: Tag

google-closure-library
tags question: http://stackoverflow.com/q/27186526
type: Tag
tag name: google-closure-library
tags question: http://stackoverflow.com/q/27301007

http://stackoverflow.com/comment/42937717
type: QuestionComment
comment on: http://stackoverflow.com/q/27230304
has text: One that quickly comes to mind is *table2CSV*.
score: 0
type: Comment

http://stackoverflow.com/a/44513257
score: 1
upvote count: 1
has body: If your desire is just to view it in desktop mode / full site for testing (that's what it sounds like to me) and not permanently disable mobile view, than a number of browsers support Desktop view: Android Chrome -> tap on the top right three dots, select 'Request desktop site'.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27199474

http://stackoverflow.com/a/27221415
score: 4
has body: Example link at the bottom for ng-repeat artApp.controller('TodoCtrl', function($scope, $http) { $http.get('/home/user/artist_names.json') .then(function(result){ $scope.artists = result.data; }); }); In html &lt;ul&gt; &lt;li ng-repeat="artist in artists"&gt; {{artist.name}} &lt;/li&gt; &lt;/ul&gt; IN YOUR JSON [{ "name":"Vincent van Gogh"}, { "name":"Leonardo da Vinci"}, { "name":"Pablo Picasso"}] http://plnkr.co/edit/Wuc6M7?p=preview From jaime I ran into this issue with a node server hosted in Azure and the fix was to ensure the mime type for JSON files was set properly. I was hosting in azure so that meant ensuring a web.config existed with the right settings, but I'm not sure what's required with Django. Without the proper mime type the server would report a 404 like you mentioned. From Sam Storie
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42922170
has comment: http://stackoverflow.com/comment/42922116
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42921786
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27221399
answers question: http://stackoverflow.com/q/27221399

http://stackoverflow.com/q/27299030
has title: Binding To An Array Within An Array with an Ng-Repeat
tagged with: angularjs-ng-repeat
tagged with: angularjs
has answer: http://stackoverflow.com/a/27299165
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27299269
type: Question
has body: I have an array within an array that I'm trying to bind to. I then want to use an ng-repeat to show all "Name" items of that second array in a blank div container. My code looks like this: $scope.workflows = [{ Id: 1, Name: "Name of first workflow(*don't want to repeat*)", Description: "Education focus area requests", Steps: [{ Id: 1, Name: "**Name I DO Want to Repeat**", Description: "The concept paper listed below", Action: "Get Approval From", Obj: "Program Officer - Group", AdditionalInfo: "n/a", }, { Id: 2, Name: "**Name I DO Want to Repeat**", Description: "Describe", Action: "Do things", Obj: "n/a", AdditionalInfo: "n/a", }, { Id: 3, Name: "**Name I DO Want to Repeat**", Description: "Describe", Action: "Do things", Obj: "n/a", AdditionalInfo: "Additional", }, ]}, This is HTML &lt;div class="commentContainer" style="width: 100%"&gt; &lt;div class="textBlue" ng-repeat="workflow in selectedWorkflow track by $index" style="width: 100%; margin-top: 7px; margin-bottom: 5px"&gt; {{selectedWorkflow.Name}} &lt;/div&gt; &lt;/div&gt; (This is where my selected workflow comes from) $scope.selectedWorkflow = {}; $scope.selectWF = function(wf) { $scope.selectedWorkflow = wf; console.log(wf); $scope.goAway = 1; } What code should I change in my ng-repeat and in my binding, to get to that "Name" object in my second array to repeat and not the "Name" object from the first array?
has answer: http://stackoverflow.com/a/27299269
answer count: 2
tagged with: arrays
accepted answer: http://stackoverflow.com/a/27299165
tagged with: javascript
score: 0
tagged with: binding

http://stackoverflow.com/a/27253547
has body: Your code looks OK. You can try this, though it's more of a tidy-up than a fix. jQuery(function($) { $(window).on('resize', function() { var height = $(window).height(); console.log(height); $('#foo').height(height).split({ orientation:'horizontal', limit:50 }); $('#b').height(height / 2); }).trigger('resize'); }); If it works initially but not after a resize, then you have to conclude that splitter can't be re-invoked. Maybe apply to the author for an improvement or find a way to destroy splitter before re-invoking.
score: 0
answers question: http://stackoverflow.com/q/27250673
type: Answer
has comment: http://stackoverflow.com/comment/43021518
has comment: http://stackoverflow.com/comment/43003369

http://stackoverflow.com/comment/43076827
score: 1
comment on: http://stackoverflow.com/q/27307269
type: Comment
type: QuestionComment
has text: Also, escape key seems to be tied to `this` ... is it inside some other code or did you want to tie to something like `"body"`?

http://stackoverflow.com/comment/42982697
has text: jVectorMap is very useful. I'm creating a multimap with drill-down functionality, but I was only able to modify the style of the main map. Can you tell me how to modify the style of the submap, please?
comment on: http://stackoverflow.com/a/27199630
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/a/27239385
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42957418
has body: see http://jsfiddle.net/alemarch/3k0x3c4L/1/ I have change font tag with a span and i centered the text in the div with a css #putTheTreeInHere{ text-align: center;} in loop function dont use document.write... function loop () { var index = 1; var row = '&lt;span style="color:green; font-weight:bold;"&gt;^&lt;/b&gt;&lt;/span&gt;'; var html = ""; var newRow= row; while ( index &lt;= 10 ) { html += newRow+"&lt;br&gt;" ; newRow = newRow + row; index += 1; } return html }
answers question: http://stackoverflow.com/q/27239022
has comment: http://stackoverflow.com/comment/42969343
accepted answer of: http://stackoverflow.com/q/27239022
score: 0

http://stackoverflow.com/q/27201073
type: Question
tagged with: for-loop
score: -2
has comment: http://stackoverflow.com/comment/42886847
tagged with: javascript
has title: Iterate through an array of objects in JavaScript
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/27201372
accepted answer: http://stackoverflow.com/a/27201372
linked to: http://stackoverflow.com/q/19529403
has answer: http://stackoverflow.com/a/27201297
favorite count: 0
possible better answer: http://stackoverflow.com/a/27201297
has comment: http://stackoverflow.com/comment/42886701
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42926263
has body: I have an array of objects that looks like this: var model = ([{ "MKT_BRAND_NAME": "LUX", "Brand_GRP": 783.52, "Category_GRP": 0.0, "SOV": 0.051, "MM": "10", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null }, { "MKT_BRAND_NAME": "LUX", "Brand_GRP": 356.12, "Category_GRP": 0.0, "SOV": 0.050, "MM": "11", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null }, { "MKT_BRAND_NAME": "LUX", "Brand_GRP": 935.27, "Category_GRP": 0.0, "SOV": 0.23, "MM": "7 ", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null}, { "MKT_BRAND_NAME": "LUX", "Brand_GRP": 3380.81, "Category_GRP": 0.0, "SOV": 0.15, "MM": "8 ", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null }, { "MKT_BRAND_NAME": "LUX", "Brand_GRP": 3536.21, "Category_GRP": 0.0, "SOV": 0.15, "MM": "9 ", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null} { "MKT_BRAND_NAME": "PEARS", "Brand_GRP": 3380.81, "Category_GRP": 0.0, "SOV": 0.18, "MM": "8 ", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null }, { "MKT_BRAND_NAME": "PEARS", "Brand_GRP": 3536.21, "Category_GRP": 0.0, "SOV": 0.17, "MM": "9 ", "QUARTER": "", "YYYY": "2014", "TargetGroupId": null}]); I want to display SOV and MM values for a particular MKT_BRAND_NAME. I want to assign MKT_BRAND_NAME to "key" and MM and SOV pair to "values".Something like this var model = [{ "key": "Lux", "values": [{MM:"10",SOV:0.015}, {MM:"11",SOV:0.050}, {MM:"7",SOV:0.23}, {MM:"8",SOV:0.15}, {MM:"9",SOV:0.15}] }, { "key": "Pears", "values": [{MM:"8",SOV:0.018}, {MM:"9",SOV:0.017}, }]; Can any one please tell me how to achieve this through for loop in JavaScript.
has comment: http://stackoverflow.com/comment/42886852

http://stackoverflow.com/q/27181459
has title: How to make decimal places include in the operation
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27181475
has answer: http://stackoverflow.com/a/27181479
has answer: http://stackoverflow.com/a/27181471
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42851208
tagged with: decimal
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/27181471
has body: I have problem here about my javascript. This javascript works well, but the problem is the operation that its run did not include the decimal places that user input. For example the user put 13.2-10. The answer should be 3.2 rite. But the output result is 3. It do not calculate the decimal places. So if there someone may help, that would really be appreciate. This are my javascript: $(window).load(function(){ function calcSubMTotal(p) { var minus = 0; var isFirst=true; var minus_total = $('#' + p + ''); $('.' + p + '').each(function (i) { if (!isNaN(this.value) &amp;&amp; this.value.length !== 0) { if(!isFirst) minus -= parseInt(this.value); else { minus=parseInt(this.value); isFirst=false; } } }); minus_total.val(minus); } $('input[type=text]').on('keyup', function () { calcSubMTotal("rr"); }); });
has answer: http://stackoverflow.com/a/27181475

http://stackoverflow.com/comment/43087089
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27310691
type: Comment
has text: advanced_bt is one of a visible list of buttons within . When clicked each expand their own list of submenu links.

http://stackoverflow.com/q/27254217
tagged with: mixitup
answer count: 0
has comment: http://stackoverflow.com/comment/42982443
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43004062
score: 0
has title: Uncaught Error: Syntax error, unrecognized expression: on code for mixitup 2
has comment: http://stackoverflow.com/comment/42982397
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: I have an application running with a filter using Mixitup 2, my filter works in the code for tablet and desktop but my code for mobile fails. I can't find why I get the error: Uncaught Error: Syntax error, unrecognized expression: ,.gemotoriseerd,.sportief" I am using jquery-1.11.1.js where the given error is from. The error is from this line of code. Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; I did not change anything in the main jquery file, the code beneath is from the filter. mobile code var p = document.getElementById("mobileRange"), res = document.getElementById("mobileOutput"); p.addEventListener("input", function () { $("#mobileOutput").html(p.value); var classes = ""; var minimal = 0; var maximal = p.value; $("input[type='range']#mobileRange").attr({'data-filter': "."+ maximal}); $("input[type=checkbox].mobileBudget").val('.'+maximal); $( ".active" ).each(function( index ) { var thisClass = $(this).attr("data-filter"); if (thisClass == '#mobileMix.activiteiten') { } else { if (thisClass != 'undefined') { classes += thisClass + ','; } } }); if (classes.length &gt; 0) { var classeslength = classes.length; var replaced = classes.replace('undefined', ''); var matching = 0; var arrClasses = replaced.split(",") } }, true); p.addEventListener("change", function() { var $show = $('#mobileFilterContainer').find('#mobileMix.activiteiten').filter(function(){ var price = Number($(this).attr('data-budget')); if (classes.length == 0) { return price &gt;= minimal &amp;&amp; price &lt;= maximal; } else { for (index = 0; index &lt; arrClasses.length; index++) { var thisValue = arrClasses[index].replace('.', ''); if ($(this).hasClass(thisValue) &amp;&amp; price &gt;= minimal &amp;&amp; price &lt;= maximal) { matching = 1; return (price &gt;= minimal &amp;&amp; price &lt;= maximal); } } } }); $('#mobileFilterContainer').mixItUp('filter', $show); }, true); // To keep our code clean and modular, all custom functionali…

http://stackoverflow.com/a/27195733
score: 3
has body: Not working: Since you use jQuery, you can check if any checkboxes are not checked: function rstSelfs() { var chkds = $("input[name='selfs']:checkbox"); if (chks.not(":checked").length &gt; 0) { return false; } else { ($('.CssSel').get(0).selectedIndex = 0) } } this worked but I had to rework it a bit! thank you! Tweaked, working: function rstSelfs() { var chkds = $("input[name='selfs']:checkbox"); if (chkds.is(":checked")) { return false; } else { ($('.CssSel').get(0).selectedIndex = 0) } }
accepted answer of: http://stackoverflow.com/q/27195538
has comment: http://stackoverflow.com/comment/42877446
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42876943
answers question: http://stackoverflow.com/q/27195538
type: Answer
upvote count: 3

http://stackoverflow.com/comment/42876999
comment on: http://stackoverflow.com/q/27178648
has text: @FunkDoc - that link doesn't address my question. I was trying a different implementation. Still wondering if it is possible to do it the way I suggested. Also, I may be wrong, but I think StackExchange recommends against responding by telling people to "Google it" or go somewhere else.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27287587
type: Answer
downvote count: 1
score: 1
has body: HTML: &lt;input type="checkbox" name="mycheckbox" value="checkme" /&gt; JavaScript: var checkbox = document.getElementsByName("mycheckbox")[0]; checkbox.addEventListener("mousedown", function(e){ if(!e){ e = window.event; } //Stop checkbox from being toggled on IE9 &amp; Other Browsers if(e.stopPropagation){ e.stopPropagation(); } //Stop checkbox from being toggled on IE8 and Lower else{ e.cancelBubble = true; } //Toggle the checkbox yourself instead checkbox.checked = (checkbox.checked) ? true : false; //And you can also change the value of the checkbox checkbox.value="newvalue"; });
has comment: http://stackoverflow.com/comment/87190626
answers question: http://stackoverflow.com/q/27287386
type: AcceptedAnswer
upvote count: 2
has comment: http://stackoverflow.com/comment/43042062
accepted answer of: http://stackoverflow.com/q/27287386

http://stackoverflow.com/a/27214389
answers question: http://stackoverflow.com/q/27214330
score: 9
has body: You have to iterate over them and set the style individually. function perfumes($id) { var elems = document.getElementsByClassName('perfumeDetails'); for (i = 0; i &lt; elems.length; i++) { elems[i].style.display = 'none'; elems[i].style.top = '100%'; } document.getElementById($id).style.display = 'block'; document.getElementById($id).style.top = '50%'; }
upvote count: 9
accepted answer of: http://stackoverflow.com/q/27214330
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/27219435
has body: So I typed up most of the pertinent information into the code itself I would love a explanation of whats happening and why, especially between the multiple outcomes of .text .html and not returning what i want <DOCTYPE! Html> This is a test html to trouble shoot the functionality of the script, the above script runs and does what it needs to in other aspects but when trying to add in the ability to edit a divs text based on the nav clicked on theres a error. when using ".text" in the script i get function (a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)} in my div,when i use ".html" in my script i get function (a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)} This is the text that should be placed in the div this text should be changed
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27219505
has answer: http://stackoverflow.com/a/27219601
upvote count: 1
possible better answer: http://stackoverflow.com/a/27219601
accepted answer: http://stackoverflow.com/a/27219505
has title: Failure to edit div on nav click event
type: AnsweredQuestion
tagged with: onclick
score: 1

http://stackoverflow.com/comment/134693459
type: Comment
has text: How does this scale for larger files?
comment on: http://stackoverflow.com/a/61624489
type: AnswerComment
score: 0

http://stackoverflow.com/q/27253312
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42980551
tagged with: javascript
has body: If you have to use var self=this for methods on the prototype object. Will you write var self=this inside each method? Is there any way to avoid writing var self =this inside all methods? function Test () { } Test.prototype.method1 = function () { var self = this; }; Test.prototype.method2 = function () { var self = this; };
has comment: http://stackoverflow.com/comment/42980776
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42980751
upvote count: 2
has comment: http://stackoverflow.com/comment/42980880
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42980842
has answer: http://stackoverflow.com/a/27253501
has title: var self=this multiple times in methods defined on the prototype?
score: 1
has comment: http://stackoverflow.com/comment/42980825

http://stackoverflow.com/q/27165582
has comment: http://stackoverflow.com/comment/42823398
has comment: http://stackoverflow.com/comment/42840647
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27166010
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42824412
type: UnansweredQuestion
has body: I'm trying to do a simple GET request with an acronym finder API but for some reason the JSON is not being returned. Here is the code: $.ajax('http://www.nactem.ac.uk/software/acromine/dictionary.py?sf=DOD', { crossDomain:true, dataType: "jsonp", success: function(data){ console.log(data); } }); If I visit the url directly in my browser, I can easily see the requested JSON, but my Chrome console only returns: Resource interpreted as Script but transferred with MIME type text/plain: "http://www.nactem.ac.uk/software/acromine/dictionary.py?sf=DOD&amp;callback=jQuery1111025898682116530836_1417074190743&amp;_=1417074190744". The Chrome Debugger network tab indicates that the correct file was downloaded but why isn't the JSON being logged to the console?
has comment: http://stackoverflow.com/comment/42842628
has comment: http://stackoverflow.com/comment/42823283
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27169643
has title: AJAX Not Loading JSON Object
type: Question
has comment: http://stackoverflow.com/comment/42842720
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript

http://stackoverflow.com/comment/75520511
type: AnswerComment
type: Comment
has text: Thanks mate! Helped me a lot!
comment on: http://stackoverflow.com/a/27439524
score: 0

http://stackoverflow.com/q/27228411
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27228800
has comment: http://stackoverflow.com/comment/42934199
has answer: http://stackoverflow.com/a/27228482
accepted answer: http://stackoverflow.com/a/27228482
has title: How to get time zone of the client
tagged with: java
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/27228800
has comment: http://stackoverflow.com/comment/42934029
tagged with: http://stackoverflow.com/tag/html
score: 2
has body: I want to access timezoneId of client. For this I had tried different approaches to get timezoneId information. Like: calculating timezone from offset &amp; daylight saving time, getting user location(i.e.longitude, latitude value) to know the timezoneId of that location I am getting the result but exact results (for all timezones) For example two countries having same offset value then I am unable to locate exact one based on their system timezone setting; like:for Arizona and Mountain Time(US &amp; Canada) both having offset value is UTC-7.00 Right now for both the value it is giving "MST" i.e. Mountain Standard Time as timezoneId. But I want what ever I will configure means if I will select Arizona then it will return Arizona and if I will select Mountain Time(US &amp; Canada) then it will give its corresponding timezoneId. Can you help me to get exact timezoneId ? Thanks,
downvote count: 0
type: Question

http://stackoverflow.com/a/27243199
has comment: http://stackoverflow.com/comment/42962165
type: Answer
has body: In advice you to put the current date often (like every 2 seconds). And when you load the page, you refer to this data for seeing how long you're been gone. http://www.w3schools.com/jsref/event_onload.asp
answers question: http://stackoverflow.com/q/27243120
score: 0
has comment: http://stackoverflow.com/comment/42962666

http://stackoverflow.com/a/27159259
type: Answer
answers question: http://stackoverflow.com/q/27158983
has comment: http://stackoverflow.com/comment/42812894
upvote count: 1
has body: You should use viewport percentage units that vary the size according to the container's size: vh 1/100th of the height of the viewport. vw 1/100th of the width of the viewport. vmin 1/100th of the minimum value between the height and the width of the viewport. vmax 1/100th of the maximum value between the height and the width of the viewport. This way, you don't let javascript handle a visual issue (which is heavy to set onresize events), and you can use in any element. see: http://jsfiddle.net/MYSVL/1064/
downvote count: 0
has comment: http://stackoverflow.com/comment/42813104
score: 1
has comment: http://stackoverflow.com/comment/42813040

http://stackoverflow.com/q/27284595
has comment: http://stackoverflow.com/comment/43037476
has answer: http://stackoverflow.com/a/27284677
accepted answer: http://stackoverflow.com/a/27284677
has title: Web page not displaying tinyMCE formated text
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43037170
downvote count: 1
type: Question
tagged with: javascript
score: -1
tagged with: tinymce-4
has body: Formatted text is stored in database properly with all tags and when I inspect element on my webpage for example it says something but it is not displayed as bold/strong. In my head tag I have the source being called and tinyMCE initialized, like so : What could it be?
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43037131
has comment: http://stackoverflow.com/comment/43037441
has comment: http://stackoverflow.com/comment/43037144
favorite count: 0
has comment: http://stackoverflow.com/comment/43037259
tagged with: mysqli
tagged with: php

http://stackoverflow.com/a/27201300
has body: Try parseInt(price.value) + ...
type: Answer
answers question: http://stackoverflow.com/q/27201263
score: 0

http://stackoverflow.com/comment/43072482
comment on: http://stackoverflow.com/a/27301002
type: AnswerComment
score: 0
type: Comment
has text: After I launched it in the browser, and then tried reloading a kendo window, I get this: SCRIPT5007: Unable to get property 'options' of undefined or null reference

http://stackoverflow.com/comment/43334486
has text: Even if you're on different domain, you can still use cookies. Just make sure the cookie is set and read on the same domain. A super widespread exemple of this is Google Analytics. On domain A, include a javascript hosted on domain B that sets a cookie. Domain B can access it if the visitor arrives on B. And any other javascript hosted on B but included on A can access it as well.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27184381

http://stackoverflow.com/a/27291430
score: 4
type: Answer
has body: As per doc: jQuery.delay() is best for delaying between queued jQuery effects and such, and is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases. long story short, .delay() works for queued functions. You should use setTimeout() instead. $('#ajax_message').html(data) setTimeout(function(){ $('#ajax_message').html(""); },5000);
answers question: http://stackoverflow.com/q/27291402
accepted answer of: http://stackoverflow.com/q/27291402
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27249628
has comment: http://stackoverflow.com/comment/42999177
accepted answer of: http://stackoverflow.com/q/27247806
has comment: http://stackoverflow.com/comment/42998897
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27247806
has comment: http://stackoverflow.com/comment/42999023
has comment: http://stackoverflow.com/comment/42999148
has body: Friends, At last I found the answer. This code will generate unique id for each device(in a browser) all the time. But this Id will also generate a new id if the application is opened in different browser but in same device. uid is the generated unique id. var navigator_info = window.navigator; var screen_info = window.screen; var uid = navigator_info.mimeTypes.length; uid += navigator_info.userAgent.replace(/\D+/g, ''); uid += navigator_info.plugins.length; uid += screen_info.height || ''; uid += screen_info.width || ''; uid += screen_info.pixelDepth || ''; console.log(uid); Thank you all for supporting me.
has comment: http://stackoverflow.com/comment/97159628
type: Answer
downvote count: 7
has comment: http://stackoverflow.com/comment/42999242
upvote count: 20
score: 13
has comment: http://stackoverflow.com/comment/91037608
has comment: http://stackoverflow.com/comment/42996397

http://stackoverflow.com/q/27280350
tagged with: angularjs
type: Question
possible better answer: http://stackoverflow.com/a/27280500
type: AnsweredQuestion
answer count: 2
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27280643
tagged with: jquery
has body: Using the following JSON as an example and assuming I have set this data equal to $scope.people: [ { "personId": 1, "name": "Thomas", "age": 39 "friends": [ { "friendId": 1, "nickName": "Lefty" }, { "friendId": 2, "nickName": "Morty" }, { "friendId": 3, "nickName": "Gomer" } ] }, { "personId": 2, "name": "George", "age": 27, "friends": [ { "friendId": 1, "nickName": "Tommy" }, { "friendId": 2, "nickName": "Bobby" }, { "friendId": 3, "nickName": "Joe" } ] } ] I'm dynamically creating buttons for each person. {{person.name}} What I'm trying to figure out is how to load the object data into Bootstrap panel (see HTML below) depending on the button clicked: {{person.name}}{{person.age}} {{$index + 1}} {{friend.nickName}} I was thinking that on my controller, I set a $scope variable = the friends array ($scope.friends), but I'm unsure how exactly to do that based on personId.
has answer: http://stackoverflow.com/a/27280500
score: 0
has answer: http://stackoverflow.com/a/27280643
has title: How to create a nested ng-repeat from nested JSON array data on button click

http://stackoverflow.com/q/27177661
has comment: http://stackoverflow.com/comment/42846605
has comment: http://stackoverflow.com/comment/42844603
has answer: http://stackoverflow.com/a/29462236
type: Question
has comment: http://stackoverflow.com/comment/125941673
has body: I know that client-side Javascript cannot write data to the local filesystem, for obvious security reasons. The only way to save data locally with Javascript seems to be with cookies, localStorage, or allow the user to download a file (with a "Save..." dialog box or to the browser's default Download folder). But is it possible, in the very specific case when the file is accessed locally with an URL like file:///D:/test/index.html (and not through internet) to write data locally ? (without any server language, and even without any server at all: just local browsing of a HTML file) For example, would it be possible, by clicking on SAVE here: Content editable - edit me and save! Save ...that such a HTML file (accessed through file:///D:/test/index.html) is overwritten with its new content ? (i.e. the local HTML file should be updated when SAVE is pressed). TL;DR: Is this possible to SAVE a file thanks to Javascript, when the HTML page is accessed locally? Note: I want to be able to silently save, not propose a Download/Save dialog box in which the user has to choose where to download, then "Are you sure to want to overwrite" etc. EDIT : Why this question? I'm doing an in-browser notepad that I can run locally without any server (no Apache, no PHP). I need to be able to save easily without having to deal with Dialog Box "Where do you want to download the file?" and having to always re-browse to the same folder to overwrite the currently-being-edited file. I would like a simple UX like in any notepad program: CTRL+S done, the current file is saved! (example: MS Word doesn't ask to browse where you want to save the file each time you do "Save": CTRL+S, done!)
linked to: http://stackoverflow.com/q/585234
has answer: http://stackoverflow.com/a/27337482
upvote count: 35
downvote count: 0
has comment: http://stackoverflow.com/comment/43007882
tagged with: javascript
has answer: http://stackoverflow.com/a/28823637
has comment: http://stackoverflow.com/comment/126059188
possible better answer: http://stackoverflow.com/a/29462236
answer count: 13
has comment: http://stackoverflow.com/comment/43124374
linked to: http://stackoverflow.com/q/65928613
has answer: http://stackoverflow.com/a/27210246
has comment: http://stackoverflow.com/comment/43016575
score: 35
has comment: http://stackoverflow.com/comment/126064945
has answer: http://stackoverflow.com/a/27334604
has comment: http://stackoverflow.com/comment/42899339
has answer: http://stackoverflow.com/a/55422496
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43029461
has answer: http://stackoverflow.com/a/27218938
accepted answer: http://stackoverflow.com/a/71270042
linked to: http://stackoverflow.com/q/15212240
favorite count: 0
has comment: http://stackoverflow.com/comment/43007935
tagged with: serialization
has title: Save HTML locally with Javascript
has comment: http://stackoverflow.com/comment/43112305
has comment: http://stackoverflow.com/comment/43124242
has comment: http://stackoverflow.com/comment/42999292
linked to: http://stackoverflow.com/q/16300218
linked to: http://stackoverflow.com/q/13405129
has comment: http://stackoverflow.com/comment/42847408
has answer: http://stackoverflow.com/a/71325548
has answer: http://stackoverflow.com/a/71276225
has answer: http://stackoverflow.com/a/27237681
has comment: http://stackoverflow.com/comment/43123903
has answer: http://stackoverflow.com/a/27218608
has comment: http://stackoverflow.com/comment/126072784
has comment: http://stackoverflow.com/comment/125942079
has comment: http://stackoverflow.com/comment/43130136
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2941411
has comment: http://stackoverflow.com/comment/43016608
linked to: http://stackoverflow.com/q/3749231
has answer: http://stackoverflow.com/a/27327044
has answer: http://stackoverflow.com/a/71270042
has comment: http://stackoverflow.com/comment/43124537

http://stackoverflow.com/comment/43039031
has text: The property name is [parentNode](https://developer.mozilla.org/en-US/docs/Web/API/Node.parentNode), not parentnode.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27285714

http://stackoverflow.com/comment/42922403
type: AnswerComment
score: 0
type: Comment
has text: No explanation of how to use this - you need to include info on where to place this code. It'll have to be in an event handling function tied to body load or document ready (if using jQuery), etc. the real problem is setting something in value doesn't evaluate it as a javascript statment.
comment on: http://stackoverflow.com/a/27221813

http://stackoverflow.com/a/27169109
accepted answer of: http://stackoverflow.com/q/27168168
answers question: http://stackoverflow.com/q/27168168
score: 0
has body: We solved the problem and The solution was weird because after doing all the possible solution as Xavier propose Here are different thinks to think about: international characters in Javascript in short: Meta must have UTF8, files must be saved as UTF8(important!) and your Webserver may need to have UTF8 The problem was not fixed so I make a clean.. and clean Tomcat Work Directory in my tomcat server and I restart it. I refresh the page In chrome but I still got wrong character So I try with Mozilla and the problem was finally solved also i open a new window in Chrome using ctrl+shift+n. This will open a new incognito window and the character display good. So for normal chrome it works after i closed the tab and i open it again. So i think it's a cache problem in apache tomcat or in browsers cache so to avoid this problem you have to try all this solution ;)
has comment: http://stackoverflow.com/comment/42832487
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42831073
type: Answer

http://stackoverflow.com/q/27184456
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27184868
answer count: 4
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42856183
has answer: http://stackoverflow.com/a/27184763
accepted answer: http://stackoverflow.com/a/27184800
upvote count: 2
has body: I have a form with fields changing every time, but javascript function don't work. What's the problem in my javascript code? my form is made by code below: <? if (/*statement*/){ ?> city <?}?> <? if (/*statement*/){ ?> color <?}?> <? if (/*statement*/){ ?> animal <?}?> submit and my javascript.js is like below function validateForm() { var x = document.forms["Form"]["city"].value; var y = document.forms["Form"]["color"].value; var z = document.forms["Form"]["animal"].value; if (x == null || x == "") { alert("need city"); return false; } if (y == null || y == "") { alert("need color"); return false; } if (z == null || z == "") { alert("need animal"); return false; } } The javascript function works only if my form shows "city","color",and "animal" fields. The javascript function don't work in the other cases, for example: my form shows "color" and "animal", or only shows "animal", etc.
type: Question
possible better answer: http://stackoverflow.com/a/27184649
has answer: http://stackoverflow.com/a/27184649
tagged with: forms
has title: javascript validate form when fields changing every time
has answer: http://stackoverflow.com/a/27184800

http://stackoverflow.com/comment/42951876
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27237525
score: 0
has text: @FelixKling I have the `hello world.html` part. Is there a way to add the whole HTML document into the Blob instead?

http://stackoverflow.com/comment/43018193
type: QuestionComment
has text: i haven't got an answer to your question but the first thing i'm spotting is that you're setting the coordinates for type point in your schema to number type. coordinates are always an array, or an array of arrays. that's where your error is coming from.
comment on: http://stackoverflow.com/q/27274125
score: 0
type: Comment

http://stackoverflow.com/comment/42943756
type: QuestionComment
type: Comment
has text: Avoid to use it. But.. http://stackoverflow.com/questions/5905492/dynamic-function-name-in-javascript
comment on: http://stackoverflow.com/q/27233488
score: 0

http://stackoverflow.com/a/27201704
has body: Your code is a little verbose. How about count = str ? str.split (',').length : 0; or shorter but a little more more obscure : count = +(str &amp;&amp; str.split(',').length); or even count = str.length &amp;&amp; str.split (',').length; which can be shortened to count = (str &amp;&amp; str.split (',')).length; Off topic : If your strings are coming from user input I would recommend allowing spaces by splitting using the regular expression /\s*,\s*/
answers question: http://stackoverflow.com/q/27201516
has comment: http://stackoverflow.com/comment/42886935
accepted answer of: http://stackoverflow.com/q/27201516
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42964716
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/27164371
has comment: http://stackoverflow.com/comment/42821470
type: Question
has body: I have list that looks like this: &lt;select&gt; &lt;option value="All" selected="selected"&gt;- Any -&lt;/option&gt; &lt;option value="16"&gt;Africa&lt;/option&gt; &lt;option value="17"&gt;Asia&lt;/option&gt; &lt;option value="56"&gt;-China&lt;/option&gt; &lt;option value="57"&gt;-Japan&lt;/option&gt; &lt;option value="19"&gt;Canada&lt;/option&gt; &lt;option value="20"&gt;-Alberta&lt;/option&gt; &lt;option value="21"&gt;-British Columbia&lt;/option&gt; &lt;option value="22"&gt;-Manitoba&lt;/option&gt; &lt;option value="23"&gt;-New Brunswick&lt;/option&gt; &lt;option value="24"&gt;-Newfoundland &amp;amp; Labrador&lt;/option&gt; &lt;option value="25"&gt;-Northwest Territories&lt;/option&gt; &lt;option value="26"&gt;-Nova Scotia&lt;/option&gt; &lt;option value="27"&gt;-Nunavut&lt;/option&gt; &lt;option value="28"&gt;-Ontario&lt;/option&gt; &lt;option value="29"&gt;-Prince Edward Island&lt;/option&gt; &lt;option value="30"&gt;-Quebec&lt;/option&gt; &lt;option value="31"&gt;-Saskatchewan&lt;/option&gt; &lt;option value="32"&gt;-Yukon&lt;/option&gt; &lt;option value="33"&gt;Central &amp;amp; South America&lt;/option&gt; &lt;option value="34"&gt;Europe&lt;/option&gt; &lt;option value="35"&gt;Republic of Ireland&lt;/option&gt; &lt;option value="36"&gt;United Arab Emirates&lt;/option&gt; &lt;option value="37"&gt;United Kingdom&lt;/option&gt; &lt;option value="38"&gt;-England&lt;/option&gt; &lt;option value="39"&gt;-Northern Ireland&lt;/option&gt; &lt;option value="40"&gt;-Scotland&lt;/option&gt; &lt;option value="41"&gt;-Wales&lt;/option&gt; &lt;/select&gt; I can't change the HTML, but need to split the select into two selects by jQuery first the show the top level choices then for example if Canada was chosen show a second drop down with the provinces. This has to be dynamic as the underlying list might change with the time. I understand that it would be much easier if there would be optgroups but unfortunately this is out of my control. So basicly i need to convert this s…
tagged with: javascript
score: 0
has title: Jquery function to split option list into hierarchical select
has answer: http://stackoverflow.com/a/27164587
answer count: 1
has comment: http://stackoverflow.com/comment/42821543
tagged with: jquery
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27164587
tagged with: select

http://stackoverflow.com/comment/42856017
comment on: http://stackoverflow.com/q/27184324
score: 0
type: Comment
type: QuestionComment
has text: For a DOM element, you have to specify `checked="checked"` but in javascript the property `checked` is a Boolean (see [MDN](https://developer.mozilla.org/fr/docs/Web/API/HTMLInputElement))

http://stackoverflow.com/a/27300971
downvote count: 0
score: 1
has body: FabricJS will convert, decompose &amp; recompose an existing single SVG URL/string into a Fabric.PathGroup. Then you can use mySvgGroup.getObjects() to fetch the individual tooth paths which you can manipulate as desired. http://fabricjs.com/fabric-intro-part-3/#deserialization KineticJS will accept an individual SVG tooth's path data and display it on canvas. http://kineticjs.com/docs/Kinetic.Path.html Still, it's probably more flexible to create individual SVG paths for each tooth and feed those individual SVGs into either KineticJS or FabricJS. Then you can manipulate them by id's as you desire: Place each individual tooth using [x,y] coordinates, Resize without pixelization, Put each tooth in a Group and make annotations/drawings onto the tooth,
answers question: http://stackoverflow.com/q/27291499
upvote count: 1
type: Answer

http://stackoverflow.com/q/27259751
type: Question
answer count: 1
tagged with: javascript
has title: Using Javascript in rails
has body: I never used javascript in rails, and i have pretty basic questions about this matter. This is what i want to implement in my application: "In my application, when a user is being created, s/he can select their birthdate by choosing a year, a month, and a day in three different drop-downs. Presently, the user is able to choose a future date as his birth date. I'm in need a way to check if the user is selecting a valid date and warn them in the event the date is invalid." I would like to know what am i doing wrong. Thanks anyway! In view (form): &lt;div class="control-group"&gt; &lt;%= f.label "Date of Birth (YYYY-MM-DD)", :class =&gt; 'control-label' %&gt; &lt;div class="controls"&gt; &lt;%= f.select :year_Of_Birth , options_for_select((Time.now.year - 100)..(Time.zone.now.year )), :include_blank =&gt; true, :id =&gt; "year",:onchange =&gt; 'validDate()'%&gt; &lt;%= f.select :month_Of_Birth, 1..12 , :include_blank=&gt; true, :onchange =&gt; 'validDate()', :id =&gt; "month" %&gt; &lt;%= f.select :day_Of_Birth, 1..31 , :include_blank =&gt; true, :onchange =&gt; 'validDate()', :id =&gt; "day" %&gt; &lt;/div&gt; &lt;/div&gt; In my application.js: function validDate(){ var y = document.getElementById("year").value; var m = document.getElementById("month").value; var d = document.getElementById("day").value; if(m==2 &amp;&amp; leapYear(y)==false &amp;&amp; d&gt;28) document.write("Invalid Date."); if(m==2 &amp;&amp; leapYear(y)==true&amp;&amp; d&gt;29) document.write("Invalid Date."); if(m==4 &amp;&amp; d&gt;30) document.write("Invalid Date."); if(m==6 &amp;&amp; d&gt;30) document.write("Invalid Date."); if(m==8 &amp;&amp; d&gt;30) document.write("Invalid Date."); if(m==9 &amp;&amp; d&gt;30) document.write("Invalid Date."); if(m==11 &amp;&amp; d&gt;30) document.write("Invalid Date."); } function leapYear(year) { return ((year % 4 == 0) &amp;&amp; (year % 100 != 0)) || (year % 400 == 0); }
type: UnansweredQuestion
tagged with: ruby-on-rails
score: 0
has answer: http://stackoverflow.com/a/27260468

http://stackoverflow.com/a/27194420
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27194358
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27194358
has comment: http://stackoverflow.com/comment/42874452
has comment: http://stackoverflow.com/comment/42874429
has comment: http://stackoverflow.com/comment/42875819
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42874392
has body: JavaScript already has a native method to replace chars in a string: var txt = 'old text'; console.log(txt.replace('old', 'new')); Note that this method will only replace the first match of your text, anyway you can make a 'replace all' using regex. Check out the documentation here. [Update] function replace(str){ return str.replace(/a/g, '@').replace(/\(\)/g, 'e').replace(/h/g, '+'); } The 'g' char at the end of the regex is used to say that the method should replace all occurrences.
has comment: http://stackoverflow.com/comment/42874475
has comment: http://stackoverflow.com/comment/42875671
type: Answer

http://stackoverflow.com/comment/42836792
type: AnswerComment
comment on: http://stackoverflow.com/a/27165512
type: Comment
has text: Is the postsdiv actually on the page? Not in the showposts.php page but on the same page as the showposts function is? Please post where you have placed the ` `
score: 0

http://stackoverflow.com/a/27233861
accepted answer of: http://stackoverflow.com/q/27233789
has body: You can use the sort function of the Array to implement your sorting by scored_goals and also by lost_goals like: var arr = [ {'scored_goals':500,'lost_goals': 520,'team':'team A'}, {'scored_goals':490,'lost_goals': 530,'team':'team B'}, {'scored_goals':500,'lost_goals': 510,'team':'team C'}, {'scored_goals':490,'lost_goals': 500,'team':'team D'} ]; arr.sort(function (a,b) { return a.scored_goals&gt;b.scored_goals &amp;&amp; (a.lost_goals&gt;b.lost_goals ); }); You can read more about it here: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27233789
upvote count: 2

http://stackoverflow.com/comment/43069393
has text: I believe you just need to decrement x when you remove a camera.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27302998

http://stackoverflow.com/comment/42908845
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27214088
score: 0
has text: Thanks! just curious, why would it work if the request is coming from the same domain? @A.Wolff

http://stackoverflow.com/q/27220036
has comment: http://stackoverflow.com/comment/42925424
tagged with: node.js
has comment: http://stackoverflow.com/comment/42939260
accepted answer: http://stackoverflow.com/a/27256606
type: AnsweredQuestion
tagged with: dot.js
tagged with: express-4
has comment: http://stackoverflow.com/comment/42921359
has comment: http://stackoverflow.com/comment/42946859
type: Question
has comment: http://stackoverflow.com/comment/42930909
has body: I am trying out doT.js for the first time and have written a very basic server setup: 'use strict'; var express = require('express'); var app = express(); var doT = require('express-dot'); var pub = __dirname+'/public'; var vws = __dirname+'/views'; app.set('views', vws); app.set('view engine', 'dot'); app.engine('html', doT.__express); app.use('/css',express.static(pub + '/css')); app.use('/img',express.static(pub + '/imgs')); app.use('/js',express.static(pub + '/js')); app.get('/', function(req, res){ res.render(vws + '/index.html', { title: 'dynamic title' }); }); app.listen(8080); console.log('Server running on port 8080'); When I run the server and goto myaddress:8080 I get the following error: Error: ENOENT, open '/home/myproject/views/layout.html' If I try calling index.html with res.sendFile it works (although of course I can't pass variables that way) res.sendFile(vws + '/index.html') Where am I going wrong? Why am i getting an error which seems to relate to a failed attempt at opening "layout.html" when no example I have seen mentions such a file? I need to use res.render in order to pass variables to the template, but all the examples I have found do it the same way I tried in my first attempt.
has comment: http://stackoverflow.com/comment/42930758
tagged with: javascript
tagged with: express
score: 0
has comment: http://stackoverflow.com/comment/42927634
has answer: http://stackoverflow.com/a/27256606
answer count: 1
has title: why do I get Error: ENOENT open error when trying to render a doT.js view

http://stackoverflow.com/comment/42803368
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27154151
type: Comment
has text: You'll have to edit the library to save the selected tab to a cookie, and on reload read the cookie and select the correct tab again...

http://stackoverflow.com/a/27285032
has comment: http://stackoverflow.com/comment/43037955
has comment: http://stackoverflow.com/comment/43038222
has comment: http://stackoverflow.com/comment/43037948
has comment: http://stackoverflow.com/comment/43037939
answers question: http://stackoverflow.com/q/27284948
upvote count: 15
accepted answer of: http://stackoverflow.com/q/27284948
type: AcceptedAnswer
downvote count: 0
has body: Your root problem here is that isNaN() tests to see if the value is NaN. It does not test to see if a string is a proper number. It has some coercion rules to try to deal with strings, but that really isn't what it is designed for. You can see ways to test if something can be parsed into a valid number here: Validate decimal numbers in JavaScript - IsNumeric() It's worth reading the detail in the good answers there, but it boils down to something like this which is a bit more than you need, but is general purpose: function isNumber(n) { return !isNaN(parseFloat(n)) &amp;&amp; isFinite(n); } And, then there's no reason to use exceptions in your code, so you can just do this: if (!isNumber(errorhandle3) || !(isNumber(errorhandle2)) { alert("Error! You must enter a number into the qty and cost fields!"); } Also, in your code, some .Value properties look like maybe they should be .value (lowercase).
score: 15
type: Answer
has comment: http://stackoverflow.com/comment/43037911
has comment: http://stackoverflow.com/comment/43037973

http://stackoverflow.com/comment/42977988
score: 0
has text: Can you please share any example's link? And how about writing to file and reading from there? Does javascript allows that? I was trying to create file but it wasn't creating any
type: Comment
comment on: http://stackoverflow.com/a/27251929
type: AnswerComment

http://stackoverflow.com/comment/42990850
has text: still don't understand the inprog $digest error ... the AngularJS documentation says that error means that an operation is already in progress
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27255632

http://stackoverflow.com/q/27299004
upvote count: 1
answer count: 1
favorite count: 0
has body: I am trying to write a function that takes a flat data format which uses a id and a parentId to establish relationships. I know I need to use recursion but I need help understanding how to get it in a specific JSON model. Here is the flat source data, the id's are guids as you can see. {"id":"e6168d55-1974-e411-80e0-005056971214","parentId":"","label":"OGC File List"} {"id":"17168d55-1974-e411-80e0-005056971214","parentId":"e6168d55-1974-e411-80e0-005056971214","label":"Accounting"} {"id":"h37s8d55-1974-e411-80e0-005056971214","parentId":"17168d55-1974-e411-80e0-005056971214","label":"Policy"} {"id":"f8ke6d55-1974-e411-80e0-005056971214","parentId":"17168d55-1974-e411-80e0-005056971214","label":"Policy"} Below is the model I need to create. I only need help with the properties id: inode: which indicates the node has children and the branch which is the array of child objects. Building the branches is what confounds me the most. I appreciate any assistance or direction in advance! [ { id: 'folder_1', label: 'This is Folder 1', inode: true, open: false, icon: 'folder' branch: [ { id: 'sub-item_x', label: 'This is File X', inode: false, icon: 'file' }, ... ] }, { id: 'file_1', label: 'This is File 1', inode: false, icon: 'file' }, ... ]
has answer: http://stackoverflow.com/a/27299595
tagged with: recursion
accepted answer: http://stackoverflow.com/a/27299595
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Recursion using JSON
tagged with: javascript

http://stackoverflow.com/q/27176123
answer count: 1
has answer: http://stackoverflow.com/a/27177070
tagged with: dom-events
has body: I'm trying to make a slider with translade3d and scale animation. I'm adding an event listener to animationend event with vendor prefixes, to make slides appear and disapear. It works great on Chrome, Safari and Opera, but it fails in Firefox. It seems to be triggering the event for all slides when the first slide triggers animationend. Here is the Javascript : function slideCallBack(selector,i,list){ var slide = this; slide.selector = selector; slide.nextSlide = list[i+1]; if ( i === list.length-1 ) { slide.nextSlide = list[0]; } slide.selector.style.display = "none"; if ( typeof(slide.nextSlide) !== 'undefined' ) { slide.nextSlide.style.display = "block"; slide.nextSlide.className = slide.nextSlide.className + " slide-effect-left"; } } function setUpSlider(classname){ this.elementList = document.getElementsByClassName(classname); var sliderConfig = this; for (var i=0;i&lt;sliderConfig.elementList.length;++i) { PrefixedEvent(sliderConfig.elementList[i], "AnimationEnd", i, sliderConfig.elementList); } sliderConfig.elementList[0].style.display = "block"; } var pfx = ["webkit", "MS", "o", "", "moz"]; function PrefixedEvent(element, type, iterator, list) { for (var p = 0; p &lt; pfx.length; p++) { if (!pfx[p]) type = type.toLowerCase(); element.addEventListener(pfx[p]+type, function() { slideCallBack(element,iterator,list) }, false); } } setUpSlider('slide'); Here are the Keyframes : @-webkit-keyframes slideLeft { 0% { -webkit-transform: translate3d(0px, 60px, 0px) scale(2,2); transform: translate3d(0, 60px, 0px) scale(2,2); } 15% { -webkit-transform: translate3d(30%, 30px, 0px) scale(1,1); transform: translate3d(30%, 30px, 0px) scale(1,1); } 80% { -webkit-transform: translate3d(70%, 30px, 0px) scale(1,1); transform: translate3d(70%, 30px, 0px) scale(1,1); } 100% { -webkit-transform: translate3d(150%, -200%, 500px) scale(2,2); transform:translate3d(150%, -200%, 500px) scale(2,2); } } @keyframes slideLeft { 0% { -webkit-transform: translate3d(0px, 60px, 0px) scale(2,2);…
tagged with: cross-browser
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27177070
has comment: http://stackoverflow.com/comment/42842655
type: Question
tagged with: firefox
tagged with: javascript
score: 0
has title: Javascript animationend event listener acting differently on Firefox

http://stackoverflow.com/comment/46689253
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27252942
has text: Try hands on pdf.js but you would probably need to convert ppt to pdf.
score: 0

http://stackoverflow.com/comment/43027446
score: 1
has text: A fiddle would be really helpful if you want some more specific help
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27279168

http://stackoverflow.com/q/27196186
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42877306
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27196298
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42877486
has comment: http://stackoverflow.com/comment/42878169
has comment: http://stackoverflow.com/comment/42877376
type: Question
has body: Hi im just learning jquery so basically im making a navigation with a drop down menu. my problem is that i have my navigation hover to make the background #222, but once i move my mouse down to the menu that has now dropped down, the hover effect goes away. here is the jquery $('.navi li ul').each(function() { $(this).hover( function() { $(this).parent('li').css({ 'background-color' : '#222', 'color' : '#FFFFFF'}); }, function() { $(this).parent('li').css({ 'background-color' : '', 'color' : '#0085ac' }); }); }); //end ul parrent hover the html is Home About Us Portfolio logos Business Cards Websites Services Contact as you can see i have my ul inside the li, basically i want the parent li to stay in its hoverd state while browsing the menu that has dropped down. bonus points if you can show me how to put a 250ms delay on the hover out before it changes back to normal state edit: just to clarify, the above jquery is not working to keep my parent li in its hoverd state
has comment: http://stackoverflow.com/comment/42878024
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27196298
has title: jquery .parent() to target parent li of ul
score: 0

http://stackoverflow.com/q/27295387
score: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27295847
has answer: http://stackoverflow.com/a/27295847
has body: I have four menu at the top such as Home, Projects, About Us and Contact Us, if i select any of the menu, then, the rest of the menus need to be hidden. For this case, I have managed with colors. when the menu activate, then, it should be in black, rest of them in white by updating css. It(this below code) works fine. But, i want to simplify this code as i think this seems large amount of code for that operation. How I can simplify this code to perform the same? Any help? $("li[name='AboutUs']").click(function(){ $(this).attr("class", "selectedtab"); $("li[name='Contact']").removeAttr( "class", "selectedtab"); $("li[name='Projects']").removeAttr( "class", "selectedtab"); $("li[name='Home']").removeAttr( "class", "selectedtab"); }); $("li[name='Projects']").click(function(){ $(this).attr("class", "selectedtab"); $("li[name='Contact']").removeAttr( "class", "selectedtab"); $("li[name='AboutUs']").removeAttr( "class", "selectedtab"); $("li[name='Home']").removeAttr( "class", "selectedtab"); }); $("li[name='Home']").click(function(){ $(this).attr("class", "selectedtab"); $("li[name='Contact']").removeAttr( "class", "selectedtab"); $("li[name='AboutUs']").removeAttr( "class", "selectedtab"); $("li[name='Projects']").removeAttr( "class", "selectedtab"); }); $("li[name='Contact']").click(function(){ $(this).attr("class", "selectedtab"); $("li[name='Home']").removeAttr( "class", "selectedtab"); $("li[name='AboutUs']").removeAttr( "class", "selectedtab"); $("li[name='Projects']").removeAttr( "class", "selectedtab"); });
accepted answer: http://stackoverflow.com/a/27295598
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27295589
type: Question
has title: Jquery: tabbed menu navigation, activation and deactivation based on the menu selected
has answer: http://stackoverflow.com/a/27295598
tagged with: javascript
has answer: http://stackoverflow.com/a/27295567

http://stackoverflow.com/comment/42999492
type: Comment
type: AnswerComment
has text: It work! Thank you so much. Can i ask another question? If there are many dropped div in the dropable area which is the same ID, how can i get all values in span?
score: 0
comment on: http://stackoverflow.com/a/27263554

http://stackoverflow.com/comment/42895905
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27206732
type: Comment
has text: You said it was the second argument. Did you do something like `parseInt(someNumber, "9000000000000000000000000999999999999999999999")?

http://stackoverflow.com/q/27310732
type: Question
tagged with: aggregation-framework
answer count: 1
tagged with: node.js
score: 0
has body: I had documents like the following need to aggregate latest rating last array element and average(3,1,3,1) it, here i am stuck up with double unwind unable to get the result { Name: name Content: [ { Rating:[1,2,3] } , { Rating:[3,2,1] } ] }, { Name: name Content: [ { Rating:[1,2,3] } , { Rating:[3,2,1] } ] }
has comment: http://stackoverflow.com/comment/43082411
has answer: http://stackoverflow.com/a/27311175
has comment: http://stackoverflow.com/comment/43082826
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43088096
has title: Unable to aggregate subdocument's array

http://stackoverflow.com/comment/43126694
comment on: http://stackoverflow.com/a/27302766
type: Comment
has text: I cannot insert the code, this is an example that comes close.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27279193
score: 0
answers question: http://stackoverflow.com/q/27279004
has body: you can simply assigning new url.try using this : aEl.href ="http://www.facebook.com/ShannonBaumGraphics/photos/";
type: Answer

http://stackoverflow.com/q/27178702
has title: Copy any selected with mouse page text if button is pressed
tagged with: php
linked to: http://stackoverflow.com/q/400212
has body: Ok, this is all I want to do: say that in my page I select some text and if I press a button, that selected text will be copied (don't know exactly, like ctrl+c, in pc memory) so that I could use that text anywhere later. Any ideas? enter code here &lt;input type="button" NAME="cpyButton" value="Copy" onClick="ctrl_c()"&gt; &lt;script type="text/javascript"&gt; ... &lt;/script&gt;
answer count: 0
has comment: http://stackoverflow.com/comment/42846368
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: copy
score: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
type: Question
upvote count: 2

http://stackoverflow.com/comment/43016405
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27273444
has text: Typo here `(""meta_description")` two quotes before item name.
score: 0

http://stackoverflow.com/comment/42963669
has text: @BenMuircroft add image of your in/out and desired output
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27239460

http://stackoverflow.com/comment/42926921
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27224285
has text: This just doesn't *add up* (pun intended). Its just a lot of work to re-create the input

http://stackoverflow.com/a/27226842
score: 0
has comment: http://stackoverflow.com/comment/42931222
type: Answer
answers question: http://stackoverflow.com/q/27226776
has body: &lt;a name="foo"&gt;&lt;/a&gt; (an "anchor") is a now obsolete method of jumping to a section of a webpage via the #foo fragment identifier section of a webpage. HTML4, in 1998, introduced the id="" attribute which can be used with any element to allow it to be addressed via fragment identifiers, so &lt;p id="foo"&gt; works just as well. However, if an element does not have an id="" attribute value (which must be unique, too) then it cannot be referenced by a fragment identifier. Your only other option is to use a "hashbang" address (that is #!something) where you'd have a JavaScript library parse something to select an element. This is a research task left-up to the reader. I suggest using the built-in querySelector or XPath functionality to address elements.

http://stackoverflow.com/q/27299491
score: 0
has comment: http://stackoverflow.com/comment/43063923
has comment: http://stackoverflow.com/comment/43062915
favorite count: 0
accepted answer: http://stackoverflow.com/a/27299589
has title: Javascript event not defined in Firefox
upvote count: 1
downvote count: 1
has body: This has been asked before but I'm still struggling to wrap my head around how to fix the error in my case. I'm new to learning Javascript/jQuery. Firefox gives an error "ReferenceError: getFirstArr is not defined". I have a simplified script of what I'm trying to do here JSFiddle (to make it work, select a year button first before a month button). The culprit seems to be the getFirstArr(videos[i]) line 28. I really don't even know what to try since my code seems correct. It works in Safari, Chrome and IE. Firefox is the odd man out. Here's a snippet of the on click event where the problem is. $('.campbutton').on('click', function () { camp = $(this).attr('id'); $('.campbutton').removeClass('green'); $(this).addClass('green'); $('#searcharea').html(' '); var campyear = camp + year; var count = 1; var noResultCount = 0; for (i = 0; i < videos.length; i++) { for (j = 0; j < 5; j++) { getFirstArr(videos[i]); // Firefox doesn't like this line function getFirstArr(video) { // prints the the array where a match is found The JSFiddle will have the whole code. So my question is, why is Firefox not accepting the function call, and what needs to be changed? Any help or hints are appreciated (btw, I'm still working on getting the correct table tags to format the output correctly so the videos don't just stack on top of themselves). Edit: The specific problem Firefox has is when the camp button is clicked, no videos load in the div. The other button events are fine. Here's the entire code in question: var videos = [ ["string1A", "string1B", "string1C"], ["string2A", "String2B", String2C"] ]; var camp = ""; var year = ""; $('#searcharea').html('select a year button first'); $('.yearbutton').on('click', function () { year = $(this).attr('id'); $('.yearbutton').removeClass('green'); $(this).addClass('green'); }); $('.campbutton').on('click', function () { camp = $(this).attr('id'); $('.campbutton').removeClass('green'); $(this).addClass('green'); $('#searcharea').html(' '); var ca…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43064031
has comment: http://stackoverflow.com/comment/43062992
has answer: http://stackoverflow.com/a/27299589
has comment: http://stackoverflow.com/comment/43063008
has comment: http://stackoverflow.com/comment/43064011
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27197695
has comment: http://stackoverflow.com/comment/42880320
type: AnsweredQuestion
tagged with: javascript-function-declaration
possible better answer: http://stackoverflow.com/a/27197724
tagged with: knockout.js
type: Question
answer count: 2
tagged with: javascript
tagged with: variables
has body: I recently search in the code of the library of knockout to find how observables are able to create dependencies with computed functions when we call it. In the source code, I found the function linked to observables creation: ko.observable = function (initialValue) { var _latestValue = initialValue; function observable() { if (arguments.length &gt; 0) { // Write // Ignore writes if the value hasn't changed if (observable.isDifferent(_latestValue, arguments[0])) { observable.valueWillMutate(); _latestValue = arguments[0]; if (DEBUG) observable._latestValue = _latestValue; observable.valueHasMutated(); } return this; // Permits chained assignments } else { // Read ko.dependencyDetection.registerDependency(observable); // The caller only needs to be notified of changes if they did a "read" operation return _latestValue; } } ko.subscribable.call(observable); ko.utils.setPrototypeOfOrExtend(observable, ko.observable['fn']); if (DEBUG) observable._latestValue = _latestValue; observable.peek = function() { return _latestValue }; observable.valueHasMutated = function () { observable["notifySubscribers"](_latestValue); } observable.valueWillMutate = function () { observable["notifySubscribers"](_latestValue, "beforeChange"); } ko.exportProperty(observable, 'peek', observable.peek); ko.exportProperty(observable, "valueHasMutated", observable.valueHasMutated); ko.exportProperty(observable, "valueWillMutate", observable.valueWillMutate); return observable; } What I think is very weird is the returns of 'observable' where I don't found any declaration of this variable. Sure that great men who created this library don't forget to declared it. How it is possible to use a variable without declared it and prevent it to be put in a global scope? My feeling is we can used a function declaration as a variable when this function declaration is declared inside another function but I'm really not sure about how it works. Edit: After searching on the web, I found this article. In this art…
score: 0
has comment: http://stackoverflow.com/comment/42880627
has answer: http://stackoverflow.com/a/27197724
has answer: http://stackoverflow.com/a/27197712
accepted answer: http://stackoverflow.com/a/27197712
has title: Function returning a variable without declared it

http://stackoverflow.com/q/27217761
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27217819
accepted answer: http://stackoverflow.com/a/27217819
has comment: http://stackoverflow.com/comment/42915082
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/27217894
type: AnsweredQuestion
has title: Why does my table get duplicated every time button is clicked?
has comment: http://stackoverflow.com/comment/42915460
type: Question
has comment: http://stackoverflow.com/comment/42915196
tagged with: javascript
has body: I've made a simple website, where you can choose a option. I did that with . When an option is chosen and the user clicks the button a single table should appear. But when I press the button many times, an additional table will appear for each time you click on the button. var prijsi = 19.99; var kwartaal = prijsi * 3; var jaar = prijsi * 12; var contract = prijsi * 24; var prijst = 30.99; var prijskw = prijst * 3; var prijsjaar = prijst * 12; var prijscontract = prijst * 24; var prijsa = 50.99; var prijsakw = prijsa * 3; var prijsajaar = prijsa * 12; var prijsacontract = prijsa * 24; var extratela = prijsa + 1; var extratelkw = (3*1) + prijsakw; var extrateljaar = (12*1) + prijsajaar; var extratelcontract = (24*1) + prijsacontract; var extratelt = prijst + 1; var extrateltj = (1*12) + prijsjaar; var extratkw = (3*1) + prijskw; var extratc = (24*1) + prijscontract; function kostenBerekenen(){ pakket = document.getElementById('pakket').value; if(pakket == ""){ document.getElementById('resultaat').innerHTML+=("Kies een pakket!"); } else if(pakket == 'internet') { document.getElementById('resultaat').innerHTML+=(" Kosten Kosten per maand: €" + prijsi + ' Kosten per kwartaal: ' +' €' + kwartaal + ' Kosten per jaar: ' + '€' + jaar + ' Kosten per contract (24 maanden): €' + contract + ' '); } else if(pakket == 'telefonie'){ document.getElementById('resultaat').innerHTML+=(" Kosten Kosten per maand: €" + prijst + ' Kosten per kwartaal: ' +' €' + prijskw + ' Kosten per jaar: ' + '€' + prijsjaar + ' Kosten per contract (24 maanden): €' + prijscontract + ' Kosten p/maand met extra telefoon: €' + extratelt + ' Kosten per kwartaal met extra telefoon: €' + extratkw + ' Kosten per jaar met extra telefoon: €' + extrateltj.toFixed(2) + ' Kosten per standaard contract(24maanden) met extra telefoon: €' + extratc + ' '); } else{ document.getElementById('resultaat').innerHTML+=(" Kosten Kosten per maand: €" + prijsa + ' Kosten per kwartaal: ' +' €' + prijsakw + ' Kosten per jaar: ' + '…
has answer: http://stackoverflow.com/a/27217894
has comment: http://stackoverflow.com/comment/42915543

http://stackoverflow.com/a/27177050
score: 0
answers question: http://stackoverflow.com/q/27176987
has body: Loops have to have a test condition in them. They loop through until that test condition is no longer true. So assuming your firstDiv selector has an array of div's var i = 0; while(firstDiv.length &gt; i){ console.log(firstDiv[i]); i++; }
has comment: http://stackoverflow.com/comment/42843241
type: Answer
has comment: http://stackoverflow.com/comment/42843279

http://stackoverflow.com/q/27291997
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43049608
type: Question
tagged with: reactjs
tagged with: javascript
upvote count: 2
has title: How do I use property in ?
answer count: 1
linked to: http://stackoverflow.com/q/11722400
favorite count: 0
has comment: http://stackoverflow.com/comment/43049712
has answer: http://stackoverflow.com/a/27293243
accepted answer: http://stackoverflow.com/a/27293243
has body: I have an image in my react class and want to achieve this: &lt;img src="images/status{this.props.status}.jpg"/&gt; How to do that?
type: AnsweredQuestion

http://stackoverflow.com/q/27221187
has title: Firebase / Angularfire 0.9 - Create new user and profile
answer count: 1
tagged with: angularfire
favorite count: 0
tagged with: angularjs
upvote count: 3
tagged with: firebase
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42923360
has body: To create a new user in Angularfire 0.9 I can use the $firebaseAuth service and the $createUser method. However from what I can tell this method does not return any of the new users credentials. So if I want to add profile to that user what is the best way to retrieve that users Auth Data, specifically the "uid", so I can save the profile data for my new user. Below is an example of what I am trying to do var FIREBASEURL = "https://&lt;my-firebase&gt;.firebaseio.com" var ref = new Firebase(FIREBASEURL); $rootScope.authObj = $firebaseAuth(ref); var newUser = { email: "email@email.com", password: "password", displayName: "Display Name", favFood: "Food" }; $rootScope.authObj.$createUser(newUser.email, newUser.password).then(function() { console.log("User created successfully!"); // Retrieve new Auth Data specifically uid var newAuthData = ?????????? // Remove password from object and create user profile delete newUser.password; newUser.timestamp = Firebase.ServerValue.TIMESTAMP; var userRef = new Firebase(FIREBASEURL + '/users/'); userRef.child( newAuthData.uid ).set(newUser); }).catch(function(error) { console.error("Error: ", error); });
has answer: http://stackoverflow.com/a/27238060
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27238060

http://stackoverflow.com/q/27250484
has comment: http://stackoverflow.com/comment/42977635
has comment: http://stackoverflow.com/comment/42975238
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How do I insert an image inside a tag widthout getting the height of the tag changed?
has comment: http://stackoverflow.com/comment/42975452
has answer: http://stackoverflow.com/a/27250863
type: Question
has body: I have this mobile menu: As you can see, the tags with the image make the bottom expand a little bit, while "Boxing" which doesn't have any image inside the tag doesn't. I tried "height: 27px" to the tag. worked perfect. the problem is that when clicking the image - a submenu opens inside the - when defining the height it doesn't expand. This is how the html list item looks like: NFL Superbowl // one without an image: Boxing and this is my css: .sports li{ list-style-image:none; list-style-type: none; border-bottom: 2px solid #eeeeee; margin-bottom: 0px; margin-left: 0px; padding-top: 15px; padding-bottom: 15px; padding-left: 10px; width:100%; font-family: arial; text-decoration: none; overflow: hidden; /*height: 27px;*/ z-index: 100; }
tagged with: javascript
has comment: http://stackoverflow.com/comment/42975147
has comment: http://stackoverflow.com/comment/42978024
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/27155476
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
tagged with: dynamic
tagged with: disabled-control
upvote count: 1
type: Question
has title: Angularjs forms dynamic validity states of elements
has body: Angularjs 1.3-beta.8 This is a table of inputs, which are embedded in a form that contains other form elements. This question is in regards to this table only. Here are a few things to keep in mind. There are no other nested forms, just one master form, which we will call masterForm and contains ALL form elements, not just this table. Rows are added dynamically to the form using a button you cannot see. Rows can also be deleted by the red circle on the left of the table. There may be hundreds of rows, or only one; but there must be at least one row. The only rows that are relevant are the ones that have a payment amount entered. Each input may have no validation or some validation (dynamically assigned from the server per input). This means that each individual input will differ and could be this $scope.masterForm.thisInput.$error = {required: true, format: true, somethingnew: true, etc...} or it could be nothing as seen in the table picture; only the 'Account Number' and 'Total Due' fields have validation errors. Question: How can I disregard the input validations in each row input, THAT HAS VALIDATION SET, and only when the 'Payment Amount' is filled in? The question is a little misleading, as I know how to trigger a state change in Angularjs, however everything I have tried does not change the form validation. Here is what I have tried - I did search SO, but did not find an answer that worked in this case. When the form is submitted, it flags all inputs that do not pass validation. I have hijacked the submit function to first run through the form object and $setValidity state of each "named" input, like so loop through $scope.masterForm and look for input name fields When you find the relevant fields of table inputs that have no payment amounts then run through each input.$error and then input.$setValidity of each $error (like required: true), set these to false (like required: false) - thanks This does set each input to valid - input.$valid (is true) input.$inva…
tagged with: validation
downvote count: 0

http://stackoverflow.com/q/27232586
has comment: http://stackoverflow.com/comment/42941910
has body: I have an animation that when finished produces a still image. I want this image to be displayed for around 5 seconds before changing to another still image. I have tried various implementations of setTimeout to fix this but it hasnt worked for me. Any help would be appreciated. Heres my code: (function drawFrame() { window.requestAnimationFrame(drawFrame, canvas); &lt;!--ctx.clearRect(0, 0, cw, ch); --&gt; image3 = new Image(); image3.src = "broken1.png"; ctx.drawImage(image3, 0, 0); setTimeout(function() { image4 = new Image(); image4.src = "broken.png"; ctx.drawImage(image4, 0, 0); }, 5000); }())
has title: Display an image after a time delay on html canvas
has comment: http://stackoverflow.com/comment/42942054
has comment: http://stackoverflow.com/comment/42942146
accepted answer: http://stackoverflow.com/a/27233191
has comment: http://stackoverflow.com/comment/42942709
type: Question
has comment: http://stackoverflow.com/comment/42942788
linked to: http://stackoverflow.com/q/27159682
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27233191
score: 0
has comment: http://stackoverflow.com/comment/42942449
tagged with: html5-canvas
tagged with: timedelay
has comment: http://stackoverflow.com/comment/42942245
has comment: http://stackoverflow.com/comment/42942129
type: AnsweredQuestion

http://stackoverflow.com/q/27290190
type: Question
has comment: http://stackoverflow.com/comment/43079715
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
tagged with: variables
has title: How can I embed the value obtained using innerHTML in Javascript to a variable?
favorite count: 0
has comment: http://stackoverflow.com/comment/43046529
has comment: http://stackoverflow.com/comment/43046975
has answer: http://stackoverflow.com/a/27290267
tagged with: innerhtml
type: UnansweredQuestion
downvote count: 2
has body: var payamount=document.getElementById("amount").value; var calamount=payamount*3; document.getElementById('calculate').innerHTML=calamount; In the Above code the calculated value is diplayed in the text box named calculate but the value is not stored.

http://stackoverflow.com/q/27247354
tagged with: javascript
has comment: http://stackoverflow.com/comment/42969743
score: 0
tagged with: haml
has body: I have a form in Ruby on Rails, that handles creation of a new comment asynchronous. I use format.js as a response and my code in the template looks something like this: create.js.haml - if (@comment.position) -# add the comment to the video -# do smthng if (window.Test == true){ -# do something else } -# do other stuff The problem is, that I get a Illegal nesting: nesting within plain text is illegal. Error for the line that contains //do something else. I know, I could simply remove the indention of this line, but I want to format my JS code as usual. Any ideas how I can do this correctly? Thanks a lot!
tagged with: ruby
type: UnansweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/42970787
answer count: 0
has comment: http://stackoverflow.com/comment/42972173
has title: Javascript generation as response on create request with haml and formatted code
type: Question
linked to: http://stackoverflow.com/q/9744169

http://stackoverflow.com/q/27218032
has comment: http://stackoverflow.com/comment/42916498
favorite count: 0
has comment: http://stackoverflow.com/comment/42916292
has comment: http://stackoverflow.com/comment/42915979
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42915617
has comment: http://stackoverflow.com/comment/42916398
has title: Bouncing Ball doesn't appear on page
has answer: http://stackoverflow.com/a/27218223
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42916103
tagged with: javascript
has comment: http://stackoverflow.com/comment/42916063
has body: I would like to point out that I'm a beginner at this. So please, I hope you don't mind me asking questions to your solutions. What I'm trying to construct here is a graphical animation of a ball falling to the ground from a height and then slowly, after several subsequent bounces, the ball just rolls on the base of the canvas. JavaScript examples I can't seem to detect the errors I made. Your ideas and solutions would be greatly appreciated. :)
score: 0
tagged with: canvas
has comment: http://stackoverflow.com/comment/42916233
answer count: 1

http://stackoverflow.com/comment/42881077
score: 0
comment on: http://stackoverflow.com/a/27198281
type: Comment
has text: I have used that plugin before but that is a very bloated plugin and it has quite a few bugs and because its provided For free, it has no support! So it is not a good plugin.
type: AnswerComment

http://stackoverflow.com/a/41814019
has comment: http://stackoverflow.com/comment/131921316
score: 51
type: Answer
answers question: http://stackoverflow.com/q/27170037
upvote count: 53
has body: Edit First time using node.js Although already answered, but just putting in my 2-cents, Normally, the first time users would trip over it, so am posting some screen shots, and that OP wants to try node -v, so making it a bit easier to follow. The Wrong !! The Correct !! or you can do .. Hope it helps someone.!
has comment: http://stackoverflow.com/comment/72639701
downvote count: 2
has comment: http://stackoverflow.com/comment/72624492

http://stackoverflow.com/a/27241562
has body: Use Jstl rather than scriptlets for further Explanation use EL - Expression Language (${variable}) to get the Value eg. ${welcome} &lt;c:out value="${some varibale that holds the data from database}"/&gt;
type: Answer
answers question: http://stackoverflow.com/q/27231579
score: 0

http://stackoverflow.com/a/48420772
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27240829
upvote count: 1
has body: for me it worked only after adding below code inside dragstart event handler e.dataTransfer.setData("text", "somedata");
downvote count: 0

http://stackoverflow.com/a/27305048
has comment: http://stackoverflow.com/comment/43073125
has comment: http://stackoverflow.com/comment/43073931
has comment: http://stackoverflow.com/comment/43081373
has comment: http://stackoverflow.com/comment/43075081
has comment: http://stackoverflow.com/comment/43081336
score: 0
has comment: http://stackoverflow.com/comment/43094058
type: Answer
has comment: http://stackoverflow.com/comment/43095161
has comment: http://stackoverflow.com/comment/43073248
has comment: http://stackoverflow.com/comment/43107501
has body: If you’d just set Rectangle.prototype to Shape.prototype, then both Rectangle and Shape would share the same object as prototype. That would mean, that everything you add to Rectangle.prototype would also be available on Shape.prototype – Rectangle would no longer inherit from Shape. Object.create(parent) creates a child object that inherits from the parent object passed in. This way, all properties of the parent are also available to the child, while properties on the child don’t affect the parent. To answer your question (“Why we need to define constructors in JavaScript?”) – we don’t need to. You could also just use plain objects: // Shape - superclass function Shape() { return { x: 0, y: 0, // superclass method move: function(x, y) { this.x += x; this.y += y; console.info('Shape moved.'); } }; } // Rectangle - subclass function Rectangle() { var rectangle = Shape(); // rectangle-specific things could be added here return rectangle; } var rect = Rectangle(); rect instanceof Rectangle; // false, instanceof does not work here rect instanceof Shape; // false rect.move(1, 1); // Outputs, 'Shape moved.'
answers question: http://stackoverflow.com/q/27304726
has comment: http://stackoverflow.com/comment/43075213
has comment: http://stackoverflow.com/comment/43074600

http://stackoverflow.com/q/27158186
tagged with: javascript
has comment: http://stackoverflow.com/comment/42810616
type: Question
has answer: http://stackoverflow.com/a/27164333
has comment: http://stackoverflow.com/comment/42811083
accepted answer: http://stackoverflow.com/a/27164333
score: 5
has body: I am new to both Ajax and Node.js + Express. At this point I am trying to figure out how to communicate with both the front and back end through buttons. I have a button on an HTML page which I would like to use to call a function from the backend and output text to the client. Here is what I've pieced together for what I need but I am looking for an example on how this could be done. This is all happening on /page index.hjs file Install // Client Side Ajax Script app.js file app.post('/page', function (req, res, next) { calling.aFunction(); res.write('A message!'); }); Are these all the parts that I need and what needs to be edited to get this functionality to work?
has comment: http://stackoverflow.com/comment/42811002
answer count: 1
has comment: http://stackoverflow.com/comment/42810979
favorite count: 0
tagged with: express
tagged with: ajax
tagged with: node.js
has comment: http://stackoverflow.com/comment/42810687
upvote count: 5
downvote count: 0
type: AnsweredQuestion
has title: Simple button click example with Ajax and Node.js?
has comment: http://stackoverflow.com/comment/42812442

http://stackoverflow.com/a/27309381
accepted answer of: http://stackoverflow.com/q/27309300
has comment: http://stackoverflow.com/comment/43080992
type: Answer
has comment: http://stackoverflow.com/comment/43080525
has comment: http://stackoverflow.com/comment/43080978
has comment: http://stackoverflow.com/comment/43084329
has comment: http://stackoverflow.com/comment/43080659
has comment: http://stackoverflow.com/comment/43081030
score: 0
type: AcceptedAnswer
has body: You can create a controller for your page and inject service there. $stateProvider.state('page2', { url: '/page2/:topicId', templateUrl: 'page2.html', controller: 'Page2Ctrl' }); Then your controller would look like app.controller('Page2Ctrl', ['$scope', 'getTopicContent', function($scope,getTopicContent){ getTopicContent.request().success(function(data){ $scope.myList = data; }); }]); if you want to try resolve, You can do something like this $stateProvider.state('page2', { url: '/page2/:topicId', templateUrl: 'page2.html', controller: 'Page2Ctrl', resolve: { content: getTopicContent.request().success(function(data){ return $scope.myList = data; }); } }); Then in your Page2Ctrl you can verify this content app.controller('Page2Ctrl', ['$scope', 'getTopicContent', function($scope, content){ if (content) { $scope.content = content; } }]);
answers question: http://stackoverflow.com/q/27309300

http://stackoverflow.com/comment/43003558
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27263807
has text: Yes. But i need it to be in table because i want to put checkboxes on every child rows

http://stackoverflow.com/a/27162118
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: If you want to do this using only Javascript, you could also simply use an interval to update the css every xx number of milliseconds, for 60fps you'd use 16. (This is not the best way) var i = parseInt($("#Table_Middle1").css("top")); var animationLoop = setInterval(function() { i += 10; $("#Table_Middle1").css("top", i + "px"); }, 16); A simpler way would be to use jQuery's animate api: http://api.jquery.com/animate/. (this is the most cross-browser friendly way) $('#Table_Middle1").animate({top: "-=200px"}, 1000); // take 1 second to move up 200px You could also use a CSS3 transition to accomplish the same thing, and reduce your JS to a simple class toggle (This is the most "modern" way) jQuery: $('#Table_Middle1").addClass("class-to-trigger-animation"); css: #Table_Middle1 { top: 500px; transition: top 1s ease; } #Table_Middle1.class-to-trigger-animation { top: 300px } If you want more complex animations, you could consider a library like Greensock.
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/27162002
answers question: http://stackoverflow.com/q/27162002

http://stackoverflow.com/a/27181344
downvote count: 1
answers question: http://stackoverflow.com/q/27181273
score: -1
upvote count: 0
has body: Similar question here : Setting HTML5 audio position You might have to ensure the browser is ready to play by listening to the 'canplay' event
type: Answer

http://stackoverflow.com/q/27193195
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: height
favorite count: 0
has comment: http://stackoverflow.com/comment/42872067
has answer: http://stackoverflow.com/a/27194482
has body: https://drive.google.com/file/d/0B_sa6Otnqx0LZl8zN182MjI2RWs/view?usp=sharing https://drive.google.com/file/d/0B_sa6Otnqx0LZFFyWks1ZXZZSGc/view?usp=sharing Above are the links to the html and javascript file for the webgame site i am working on. I am trying to restrict the size of the screen so the random object doesn't appear off screen where the person has to scroll to get to it. I have tried enclosing the randomized div in a parent div and setting that width and height to 100% (and i've tried auto) without any luck. The latest try was setting the body width and height to 100% as somehow suggested somewhere. I haven't had any luck with any of that. I was thinking i made need to restrict how far the div can move by way of javascript, but then I'm not sure how to get the value of the screen width and height without permanently setting it to one size. EDIT: other than the code i have now i have tried adding the folowing code to a parent div tag that enclosed the random div: #container{ width:100%(tried auto as well) height:100%(tried auto as well) } Thanks in advance
tagged with: css
type: AnsweredQuestion
has title: Having trouble restricting a randomized div to the current screen size
downvote count: 1
accepted answer: http://stackoverflow.com/a/27194482
type: Question
tagged with: width
upvote count: 0

http://stackoverflow.com/comment/43026791
has text: @lyas Didn't noticed those. I overlooked the code and only found that pattern. I will fix it now. I'm glad I could help you. This was actually an easy one.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27278740
type: Comment

http://stackoverflow.com/q/27265456
has body: How to allow only numbers to get filled into input ref with class name using javascript ? I test my code but not work , thank you for help.
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27265556
type: AnsweredQuestion
has title: How to allow only numbers to be filled into input ref with class name using javascript?
has comment: http://stackoverflow.com/comment/43002388
has comment: http://stackoverflow.com/comment/43002389
type: Question
has comment: http://stackoverflow.com/comment/43002464
has comment: http://stackoverflow.com/comment/43002437
linked to: http://stackoverflow.com/q/469357
has answer: http://stackoverflow.com/a/27265598
has comment: http://stackoverflow.com/comment/43002405
tagged with: javascript
has comment: http://stackoverflow.com/comment/43002674
has answer: http://stackoverflow.com/a/27265556
possible better answer: http://stackoverflow.com/a/27265598
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43002409
tagged with: validation
has comment: http://stackoverflow.com/comment/43002376
tagged with: jquery
has comment: http://stackoverflow.com/comment/43002483

http://stackoverflow.com/a/27249110
type: Answer
has body: Looks like the tags are being saved as their HTML entity equivalent. You'll have to convert them to their actual character if that's what you require.
score: 0
answers question: http://stackoverflow.com/q/27249040

http://stackoverflow.com/comment/43037950
has text: Thank you both for the quick reply. I'm in the process of changing those now.
type: Comment
comment on: http://stackoverflow.com/q/27284948
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42987228
score: 0
type: Comment
has text: @MattJohnson yes I noted that in the answer and said it is better to calculate that value server-side, which the OP seems to have the means to do.
type: AnswerComment
comment on: http://stackoverflow.com/a/27255019

http://stackoverflow.com/comment/42986612
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27256461
type: AnswerComment
has text: Well, I'm brand new to AngularJS, and this code is my first attempt to stitch something together from various code samples, so if you know of a better construction than what I'm using, I'm all ears. Seems like doing an http post() followed by a get() to refresh data should be pretty simple, though.

http://stackoverflow.com/a/27255916
type: Answer
accepted answer of: http://stackoverflow.com/q/27255726
score: 2
upvote count: 2
has body: The problem is beforeShow and afterShow are not default events. They would not work unless they were added to jQuery. For an example of that see this fiddle. Keep in mind that if you use that approach your .article elements will need to be hidden (display: none;) by default, and you will have to manually call .show on them. However, if you get to the point where you're manually calling show on these DOM elements then you've already got a perfectly good place to call whatever function you'd like before the show call.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27255726

http://stackoverflow.com/comment/43078530
has text: so what are you telling me....i do have an element with the id as 'square' + i + ', ' + j above that in another line of code
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27307915
type: Comment

http://stackoverflow.com/comment/43058839
score: 0
type: Comment
type: QuestionComment
has text: For rendering html into pdf [wkhtmltopdf command tool](http://wkhtmltopdf.org/) is best. Practically it renders the page using webkit engine and creates PDF for you. That means you can even use @font-face, scripts, etc. You can find some docs [here](http://wkhtmltopdf.org/usage/wkhtmltopdf.txt)
comment on: http://stackoverflow.com/q/27296493

http://stackoverflow.com/comment/43032813
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27280054
has text: `notify` in the loop and `resolve` when it's completed
score: 0

http://stackoverflow.com/a/27217299
has body: jQuery doesn't seem to support this but you can implement this yourself: function ajax(options) { var defer = $.Deferred(); $.ajax(options) .done(function(data, textStatus, jqXHR) { defer.resolve(data, textStatus, jqXHR, options); }) .fail(function(jqXHR, textStatus, errorThrown) { defer.reject(jqXHR, textStatus, errorThrown, options); }); return defer.promise(); } Usage var options = { endpoint: '/path/page' method : "POST", mode: 'abort', data : { value : $(this).val() }, headers : { 'X-Key' : 'value' } }; ajax($.extend(true, { url: endpoint, type: 'GET', cache: true, dataType: 'json', contentType: 'application/x-www-form-urlencoded; charset=UTF-8', headers : { 'X-Same-Domain':'1', }, async: true, data: data, timeout: 5000, }, options)).done(function(data, textStatus, jqXHR, ajaxOptions) { console.log("done", ajaxOptions); }).fail(function(jqXHR, textStatus, errorThrown, ajaxOptions) { console.log("fail", ajaxOptions); });
type: Answer
accepted answer of: http://stackoverflow.com/q/27217072
has comment: http://stackoverflow.com/comment/42916204
has comment: http://stackoverflow.com/comment/42936057
answers question: http://stackoverflow.com/q/27217072
downvote count: 0
has comment: http://stackoverflow.com/comment/42914511
score: 1
has comment: http://stackoverflow.com/comment/42925626
has comment: http://stackoverflow.com/comment/42916470
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42914565
has comment: http://stackoverflow.com/comment/42914755
has comment: http://stackoverflow.com/comment/42936934
upvote count: 1
has comment: http://stackoverflow.com/comment/42914527

http://stackoverflow.com/a/27193681
answers question: http://stackoverflow.com/q/27193552
has body: Try: Gender: Select a gender Male Female Fiddle: http://jsfiddle.net/55v9mboa/1/
score: 0
type: Answer

http://stackoverflow.com/q/27301702
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/46983640
score: 1
has answer: http://stackoverflow.com/a/27304679
tagged with: jquery
tagged with: rxjs
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/27304679
has title: How to setup Rx.Observable.fromEvent to work with jQuery filtered events
possible better answer: http://stackoverflow.com/a/37057146
has answer: http://stackoverflow.com/a/37057146
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/43071281
has body: There are lots of examples of Rx.Observable.fromEvent(element, eventName) using a jquery selection as the element to capture events from. However is it possible for Rx listen to only events from a filtered event setup with jQuery? //Bind the event on body but only respond to events that match the filter $('body').on('click', '.aClass div .something', function () {...}); //Bind to 'body' but only respond to events from the binding above Rx.Observable.fromEvent(/*something here?*/); I have come up with something effectively similar but it seems like it would be much more costly than the jquery filter. Rx.Observable.fromEvent($('body'), 'click') .filter(function (e) { return $(e.target).is('.aClass div .something'); }) .subscribe(function () {...}); Is there some way I could turn the jQuery binding into an emitter and use that event stream with Rx? What's the best approach?

http://stackoverflow.com/a/27189836
downvote count: 1
upvote count: 0
answers question: http://stackoverflow.com/q/27189777
type: Answer
has body: Here is one more alternative: function car(a,b,c){ return { a:a, b:b, c:c }; } var x = car(1,2,3); var y = car(4,5,6);
score: -1

http://stackoverflow.com/q/27281891
score: 0
type: Question
tagged with: google-apps-script
has title: How to drag a formula to the right in Google Spreadsheets using a script with an array?
has answer: http://stackoverflow.com/a/27283582
tagged with: javascript
answer count: 3
has body: Is there any fast way of dragging a formula to the 10 columns on the right using a script? I'm using: function copiaFormula(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; for (i=0;i&lt;10;i++){ var cell=sheet.getRange(5, i+1); cell.setFormulaR1C1("=SUM(R[-3]C[0]:R[-1]C[0])"); } } This writes the formulas correctly, but it would be faster if they were pushed to an array an then written. Thanks in advance for helping!﻿
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27283048
has answer: http://stackoverflow.com/a/27282677

http://stackoverflow.com/comment/43162158
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27353819
has text: Thanks for input. I have solved it using another way.
type: AnswerComment

http://stackoverflow.com/comment/42816602
score: 0
type: QuestionComment
type: Comment
has text: I presume that the unexpected end of file from server is a server-side error. I have pasted the errors at the end of my question.
comment on: http://stackoverflow.com/q/27161453

http://stackoverflow.com/comment/43019829
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27250881
has text: @Duster **why** do you want to avoid a loop? JavaScript does not have proper tail calls, so recursive functions like yours use memory for no good reason. There's nothing wrong with a loop.

http://stackoverflow.com/comment/42872861
comment on: http://stackoverflow.com/a/27193148
has text: It was an example of a field, I will rename it to something else
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43000552
score: 0
has text: the IE that link warns about is dead and gone (2009), along with most of the invisible problems. that leaves name conflicts. nothing is perfect, but i can assure that i personally have never encountered a problem storing well-named props. i do wish there was an allowed "tag" or "memo" property, but there's not, so you can abuse the html spec to store something under a rare attrib/prop, do something complicated with parallel arrays, limit yourself to Map()-supporting browsers, or tack on props. i'd go with props.If JQ has done it for years, it's workable.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27263713

http://stackoverflow.com/q/27305673
has comment: http://stackoverflow.com/comment/43074189
has comment: http://stackoverflow.com/comment/43074799
has answer: http://stackoverflow.com/a/27305858
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43074738
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43074142
possible better answer: http://stackoverflow.com/a/27305817
type: Question
has body: I have the following code: var golden_site = '&lt;div id="golden_site"&gt;&lt;/div&gt;'; $('.form_content').append(golden_site); var lookup = '&lt;input type="text" name="lookup" value="test"&gt;'; Why is this not working: $(golden_site).append(lookup); But accessing the node by id works: $('#golden_site').append(lookup);
has title: How to append to a variable in jquery?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27305701
upvote count: 1
has answer: http://stackoverflow.com/a/27305797
has answer: http://stackoverflow.com/a/27305817
has comment: http://stackoverflow.com/comment/43074401
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27305701

http://stackoverflow.com/a/27208127
answers question: http://stackoverflow.com/q/27207999
has comment: http://stackoverflow.com/comment/42898270
score: 0
has comment: http://stackoverflow.com/comment/42898190
type: Answer
upvote count: 1
has body: Simply split your string on /\s+/, then you don't need to perform this action anymore. var str='\nOh yeah, did we mention it’s free?\n'; var arr=str.split(/\s+/); Note: you might want to trim \s+ from the beginning and end of the string fist. (Older) Browsers that do not support trim() can use: arr=str.replace(/^\s+|\s+$/g, '').split(/\s+/); Strictly answering your question how to remove 'carriage returns' from strings in an array: // you have: var str= '\nOh yeah, did we mention it’s free?\n'; var arr= str.split(' '); // no function needed, a simple loop will suffice: for(var L=arr.length; L--; arr[L]=arr[L].replace(/[\n\r]/g, '')); Note that (as can already be seen in your example as array-item 0) you might end up with some empty strings (not undefined) in your array.
downvote count: 1
has comment: http://stackoverflow.com/comment/42898149
accepted answer of: http://stackoverflow.com/q/27207999
type: AcceptedAnswer

http://stackoverflow.com/comment/43086237
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27312742
score: 0
has text: Ok where is your html to know which parent and which children you have

http://stackoverflow.com/comment/42935070
has text: Yeah, I'm really curious at what happens in the brain of those reflex-downvoters at times... You're welcome, hope I helped you understand what was going on.
type: Comment
comment on: http://stackoverflow.com/a/27228979
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42926016
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27223756
type: Comment
has text: @LeoDeng this was quotation from [mdn](https://developer.mozilla.org/en-US/docs/Web/API/Element.tagName)

http://stackoverflow.com/comment/43027087
type: QuestionComment
has text: Can you shortly describe why you want to observe this? listening to window.resize events might be expensive, and if your layout is responsive what for is the detection? Mediaqueries might be a better solution for this.
comment on: http://stackoverflow.com/q/27278972
score: 0
type: Comment

http://stackoverflow.com/a/27179036
has body: you can use jquery to do it easily or if you want to avoid that, here is an alternate solution: http://blog.movalog.com/a/javascript-toggle-visibility/ Simply paste the above snippet of code underneath your tag and you call it by passing to it the ID of the element you wish to toggle the visibility of (this element can be anything that takes an id attribute). For example Click here to toggle visibility of element #foo This is foo or, in your case; include the function and: test Visit the Useful Tips Section
upvote count: 1
has comment: http://stackoverflow.com/comment/42847128
downvote count: 0
has comment: http://stackoverflow.com/comment/42847088
has comment: http://stackoverflow.com/comment/42847763
has comment: http://stackoverflow.com/comment/42847932
type: Answer
answers question: http://stackoverflow.com/q/27178957
has comment: http://stackoverflow.com/comment/42847788
score: 1

keystroke
type: Tag
tags question: http://stackoverflow.com/q/27244661
tag name: keystroke

http://stackoverflow.com/comment/43040121
comment on: http://stackoverflow.com/a/27285951
type: Comment
type: AnswerComment
has text: But, there is still content that is unselectable: the column headers
score: 0

http://stackoverflow.com/comment/43027837
type: Comment
has text: Thx! I also have a question. What is this line?
comment on: http://stackoverflow.com/a/27279232
score: 0
type: AnswerComment

http://stackoverflow.com/q/27258292
has answer: http://stackoverflow.com/a/27258479
accepted answer: http://stackoverflow.com/a/27258479
has comment: http://stackoverflow.com/comment/42990265
score: 0
possible better answer: http://stackoverflow.com/a/27258505
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
tagged with: nested-checkboxes
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42990350
has answer: http://stackoverflow.com/a/27258505
type: Question
answer count: 2
has title: Assigning checkbox values to variables
tagged with: javascript
has body: I've got a list of possible checkboxes and the user can select up to three options. What I'm struggling with is how to recognize which boxes are checked, and then assign them to variables (to send in a later ajax call). So far the code I've written seems to just take the first three checkbox values regardless of whether they are checked or not and use those in my ajax call. Please help me figure out where I've gone wrong. Here's my HTML: Alabama Birmingham, AL Huntsville, AL Alaska Anchorage, AK Fairbanks, AK Juneau, AK Here's my javascript/jquery: function clickHandler() { endLocDest1 = ""; endLocDest2 = ""; endLocDest3 = ""; for(i = 0; i < document.getElementsByClassName('destination').length; i++) { if (document.getElementsByClassName('destination')[i].checked) { endLocDest1 = document.getElementsByClassName('destination')[0].value; endLocDest2 = document.getElementsByClassName('destination')[1].value; endLocDest3 = document.getElementsByClassName('destination')[2].value; } alert(endLocDest1 + endLocDest2 + endLocDest3); }; } I've also put this code into a fiddle http://jsfiddle.net/6ywm1n6h/3/ (which currently doesn't return anything). Thanks in advance!
tagged with: jquery
has comment: http://stackoverflow.com/comment/42991449

http://stackoverflow.com/comment/43047695
type: QuestionComment
has text: @devnull69 You are absolutely right. Thanks for the feedback.
score: 0
comment on: http://stackoverflow.com/q/27288837
type: Comment

http://stackoverflow.com/q/27178349
has comment: http://stackoverflow.com/comment/42848118
has title: Can't split up JSON
has comment: http://stackoverflow.com/comment/42954391
has body: I am stuck with this annoying problem that I can't seem to figure out. I want to take a JSON file and only show that information I find relevant. But somehow I can only show the whole thing, and not choose, for example, {{post.title}}. Here is the JSON I want to use: http://www.omdbapi.com/?t=frozen&y=&plot=short&r=json This is my controller: .controller('View5Ctrl', function ($scope, $http, $timeout) $http({ method: 'GET', //url: '/test/allMovies/test' url: 'http://www.omdbapi.com/?t=frozen&y=&plot=short&r=json', dataType: 'json' }). success(function (data, status, headers, config) { $scope.posts = data; }). error(function (data, status, headers, config) { $scope.error = data; }); }); And this is my HTML file {{post.title}} By this, I only get a bunch of empty paragraphs. But if I remove the .title, I get the whole thing out. SOLUTION: Thanks for the answers! I will post the solution here for future viewers. {{posts.Title}}
answer count: 0
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42846602
has comment: http://stackoverflow.com/comment/42845839
tagged with: javascript
has comment: http://stackoverflow.com/comment/42846137
favorite count: 0
tagged with: scope
has comment: http://stackoverflow.com/comment/42845574
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42846431
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27246759
accepted answer: http://stackoverflow.com/a/27249479
has title: Can the default `window.top` ever be invalid as a reference?
answer count: 2
tagged with: window
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/78044104
favorite count: 0
tagged with: language-lawyer
possible better answer: http://stackoverflow.com/a/78044104
has answer: http://stackoverflow.com/a/27249479
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42969541
upvote count: 2
tagged with: http-redirect
has body: I want to redirect the user to an external page and simultaneously break out of a frameset. The outermost frameset is most likely within the same domain as the page doing the redirection, but there is the possibility that it will span domains. In development, the outermost frameset might not even exist at all. Ideally, I want to cover all those situations. The innermost page (the one that has the breakout code) is going to be served over HTTPS. The target URL may be HTTP or HTTPS. It is acceptable for the redirection to fail (there is a fallback link "click here to continue" to cover for that scenario) but the redirection should work in the majority of cases. Particularly for the purposes of this question, I'd hate for it to be more browser-dependent than necessary. The web application itself is ASP.NET. Because of the framesets, I can't simply use a HTTP redirect. So far I have this Javascript code, which is registered as a startup script from within a class subclassing Page, where ... represents the redirection target URL: ((window.top == null) ? (window) : (window.top)).location = '...'; What bothers me is what MDN has to say about window.top and window.parent, respectively. Particularly, the documentation for window.parent spells out explicitly that If a window does not have a parent, its parent property is a reference to itself. which means that I can assert window.parent != null. But there is nothing similar about the value of window.top. For the purposes of my question, you can assume that neither of these have been reassigned. All that to lead up to the actual question: Does window.top make guarantees similar to that of window.parent? (I'm a bit concerned about the conditional expression. In my so far limited testing it works, but that doesn't prove it correct.) As far as I can tell, at least MDN doesn't say for certain either way.
type: Question
has comment: http://stackoverflow.com/comment/42968561

http://stackoverflow.com/q/27309260
tagged with: javascript
has comment: http://stackoverflow.com/comment/43083236
score: 0
has answer: http://stackoverflow.com/a/27309928
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27309928
has title: Populating HTML5 Datepicker With Data Passed From A Model
has answer: http://stackoverflow.com/a/27310174
tagged with: razor
has comment: http://stackoverflow.com/comment/43083318
has comment: http://stackoverflow.com/comment/43080443
type: Question
type: AnsweredQuestion
tagged with: asp.net-mvc
has body: I'm working on making a basic scheduling application for a project. We've implemented a simple DateTime picker to ease the process of selecting a start and end time/date for our events. The source code for this is: &lt;input type="datetime-local" name="starttime" id="field1" /&gt; The ending time calendar is the same barring the name. This works perfectly fine for taking in dates and time for events and we're quite happy with it. The issue is that when going to edit an entry the calendar does not populate with data from the model as other elements in the view do. Other elements within the view are using HTML helpers generated by scaffolding the project, so no problems there. We'd use the default option for the DateTimes, but textbox inputs for this aren't considered user friendly enough to implement. I've done some looking around and it seems that the value of the calenders can be set using "value =". Razor syntax seems to be the likely choice, but I have no frame of reference due to other elements being handled by Html helpers. Can anyone clarify on how best to approach this issue? I've included our editing portion of the associated controller for reference. public ActionResult Edit(int? id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } Request request = db.Requests.Find(id); if (request == null) { return HttpNotFound(); } ViewBag.AccountId = new SelectList(db.Accounts, "Id", "FirstName", request.AccountId); ViewBag.RoomId = new SelectList(db.Rooms, "Id", "Id", request.RoomId); return View(request); }
answer count: 2
possible better answer: http://stackoverflow.com/a/27310174

http://stackoverflow.com/comment/43000954
type: QuestionComment
has text: setters behave differently than normal properties; they grab name-conflicting own props away from the instance.
comment on: http://stackoverflow.com/q/27264539
score: 0
type: Comment

http://stackoverflow.com/q/27313320
tagged with: jquery-ui
tagged with: autocomplete
has title: jQuery AutoComplete and Change interactions
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27314311
answer count: 1
has body: I am having trouble getting a form to behave as required - not sure if it's an error in coding or approach. I have a Name field that is set up with jQuery's autocomplete. When an option is selected, an ID field is also populated. This is fine. The issue I have is I need to clear the ID field id the name field changes as it will no longer be the correct ID. I tried using jQuery's change trigger, but it also fires after autocomplete - or at least, when the name field loses focus after autocomplete - so the ID is always removed. $('#MgrName').autocomplete({ source:'auto_name.php', delay: 100, minLength:3, select:function(evt, ui) { // when a name is selected populate fields this.form.MgrID.value = ui.item.empid; this.form.MgrName.value = ui.item.empname; } }); $('#MgrName').change(function(){ alert( "Handler for .change() called." ); $('#MgrID').val(''); }); I'm thinking I could store the contents of the name field in a variable and only clear the ID if the field no longer matches the variable. Is this the best way, or is there a more elegant solution I'm missing?
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/42882303
type: Comment
type: QuestionComment
has text: You can use parseInt()/parseFloat() if you want the value as a number type.
comment on: http://stackoverflow.com/q/27198976
score: 0

http://stackoverflow.com/q/27193595
score: 0
has comment: http://stackoverflow.com/comment/42873089
has body: How do I fix this error , using tree in jquery . I can get the specific button using ( form> .button ) used his class and only change the button with the "this" . however I can not change the attributes only of inputs in the form parent, I caught up with the $ (this ) .closest ( 'form' ) . attr ( 'id' ). <input type='text' name='nome' readonly id='nome' value='nome' <input type='text' name='nome1' id='nome1' readonly value='nome1'
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42873020
answer count: 0
type: Question
tagged with: tree
has title: remove readonly in inpput of form with tree Jquery
tagged with: javascript
has comment: http://stackoverflow.com/comment/42872944

http://stackoverflow.com/comment/42926960
comment on: http://stackoverflow.com/q/27222924
score: 0
type: Comment
type: QuestionComment
has text: what issues you are having with your current code ??

http://stackoverflow.com/comment/43030037
score: 0
has text: How about folders inside includes ... say `includes\js\`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27280669

http://stackoverflow.com/q/27179514
has body: I'm currently trying to wrap some indexedDB code into promises. I have a "load db" function as: db.load = new RSVP.Promise( function ( fulfill , reject ) { //... if (globaldb) { fulfill(globaldb); return; } //... request.onsuccess = function(e) { globaldb = e.target.result; fulfill(globaldb); } }); My intent is to load the db the on the first DB function called, saving the reference to it and reusing it on subsequent requests. db.query = function( objectStoreName , options ) { var queryPromise = new RSVP.Promise( function ( fulfill , reject ) { //... do some work transaction.oncomplete = function() { fulfill( anArray ); } }); return db.load.then(queryPromise); } Finally, trying to use the wrapper created above: db.query("tablename", ... ).then( function ( data ) { //do things, write to the screen, etcetera }); It ends up that data contains the value fulfilled by db.load, instead of the one fulfilled by db.query. How can I fix that? Is there a better way to achieve the same goal?
has title: RSVP Promises: then() chain returning the first value of the chain
tagged with: rsvp.js
type: Question
has answer: http://stackoverflow.com/a/27179802
tagged with: javascript
score: 0
answer count: 1
tagged with: promise
type: UnansweredQuestion

http://stackoverflow.com/a/27253450
has body: You might consider an alternate model, employing both SignalR and Web API. SignalR is for pushing data to the client, right? What if the client is no longer there? In that case, it does not make sense to push a large object from the server out into the void where it will not be picked up. An alternate approach is to use SignalR to push small pieces of information - e.g. a User ID - and then have the browser call back to a service (hence Web API) to get the larger payload when ready for it.
downvote count: 0
answers question: http://stackoverflow.com/q/27252788
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42982168

http://stackoverflow.com/q/27244944
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/36819852
tagged with: requirejs
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27247388
tagged with: amd
has title: Why does this cause "Mismatched anonymous define()" in requireJS?
type: Question
tagged with: browser
tagged with: classiejs
has body: I'm using a module called classie.js, whose codes can be viewed below: /*! * classie - class helper functions * from bonzo https://github.com/ded/bonzo * * classie.has( elem, 'my-class' ) -&gt; true/false * classie.add( elem, 'my-new-class' ) * classie.remove( elem, 'my-unwanted-class' ) * classie.toggle( elem, 'my-class' ) */ /*jshint browser: true, strict: true, undef: true */ /*global define: false */ ( function( window ) { 'use strict'; // class helper functions from bonzo https://github.com/ded/bonzo function classReg( className ) { return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); } // classList support for class management // altho to be fair, the api sucks because it won't accept multiple classes at once var hasClass, addClass, removeClass; if ( 'classList' in document.documentElement ) { hasClass = function( elem, c ) { return elem.classList.contains( c ); }; addClass = function( elem, c ) { elem.classList.add( c ); }; removeClass = function( elem, c ) { elem.classList.remove( c ); }; } else { hasClass = function( elem, c ) { return classReg( c ).test( elem.className ); }; addClass = function( elem, c ) { if ( !hasClass( elem, c ) ) { elem.className = elem.className + ' ' + c; } }; removeClass = function( elem, c ) { elem.className = elem.className.replace( classReg( c ), ' ' ); }; } function toggleClass( elem, c ) { var fn = hasClass( elem, c ) ? removeClass : addClass; fn( elem, c ); } var classie = { // full names hasClass: hasClass, addClass: addClass, removeClass: removeClass, toggleClass: toggleClass, // short names has: hasClass, add: addClass, remove: removeClass, toggle: toggleClass }; //transport if ( typeof define === 'function' &amp;&amp; define.amd ) { // AMD define( classie ); } else { //browser global window.classie = classie; } })( window ); And I wrote this in HTML: &lt;script data-main="js/main.js" src="bower_components/requirejs/require.js"&gt;&lt;/script&gt; &lt;script src="js/classie.js"&gt;&lt;/script&gt; Then the browser complai…
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/27247388
downvote count: 0
has answer: http://stackoverflow.com/a/36819852

http://stackoverflow.com/a/27236536
has body: Close the statment below ith an end quote "../adminpanel/pagecounters/totalviewsJanuari.txt ? showul look like this : "../adminpanel/pagecounters/totalviewsJanuari.txt ?"
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27236224

http://stackoverflow.com/q/27161581
tagged with: jquery
has answer: http://stackoverflow.com/a/27161711
tagged with: click
type: AnsweredQuestion
has title: Multiple click handlers for a single element
type: Question
possible better answer: http://stackoverflow.com/a/27161629
has answer: http://stackoverflow.com/a/27161629
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27161920
has body: I've written a few events to handle opening and closing of a snap js drawer. This code below works, but I feel it could be written more efficiently. Any suggestions? function openMobileMenu() { event.preventDefault(); snapper.open('left'); $('#btn-menu').off('click', openMobileMenu); $('#btn-menu').on('click', closeMobileMenu); } function closeMobileMenu() { event.preventDefault(); snapper.close('left'); $('#btn-menu').on('click', openMobileMenu); $('#btn-menu').off('click', closeMobileMenu); } $('#btn-menu').on('click', openMobileMenu);
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27161920

http://stackoverflow.com/comment/42821112
type: QuestionComment
has text: @Kartikeya: i am not wirting any code in document ready for open this,this div is in my html layout page
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27164145

http://stackoverflow.com/q/27222006
has answer: http://stackoverflow.com/a/27222421
tagged with: forms
type: Question
has title: Grade Calculator Javascript
tagged with: javascript
score: 0
has body: I have been trying to get this code to work, it is suppose to alert me of the letter grade I received, I have looked everywhere for help and I feel that I am just overlooking something. Please tell me what I am doing wrong. <TITLE>Javascript Grade Calculator <style=" color: black; font-family: Times New Roman" align="center">Grade Calculator Directions: To use this calculator just enter your points for each item in the input boxes, then press the "Calculate" button to see your total points. Lab #1(10 points): Lab #2(10 points): Lab #3(10 points): Lab #4(20 points): Lab #5(20 points): Lab #6(30 points): Test #1(100 points): Test #2(100 points): Test #3(100 points): Class participation(50 points): Total Points(450 points): The current time is:
accepted answer: http://stackoverflow.com/a/27222421
answer count: 1
tagged with: parsefloat
tagged with: addition
has comment: http://stackoverflow.com/comment/42923453
has comment: http://stackoverflow.com/comment/42922986
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42922813

http://stackoverflow.com/comment/42901762
comment on: http://stackoverflow.com/q/27209777
has text: what did you type in nugget? Install-Package jQuery?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27248297
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42971201
has title: Converting from JavaScript to Angular JS
type: Question
has comment: http://stackoverflow.com/comment/43094063
has answer: http://stackoverflow.com/a/27254900
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27254900
has comment: http://stackoverflow.com/comment/42971166
has comment: http://stackoverflow.com/comment/42971164
upvote count: 2
has body: I have a written a pretty sturdy script in JavaScript for password validation but want to move from regular JS to angular. is this easily done? will my code need much modifying in terms of all the if statements and so on? here is a snippet: function passwordValidation(){ var uname = document.getElementById("pword1").value; var pword = document.getElementById("cPassword").value; var matchCol = "#009900"; var noMatchCol = "#CC0000"; var noBg = "#FFFFFF"; var re = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\\\+\=\.,\[\]_£|\`¬':\;\~{}&lt;&gt;()#?!\@$\%^&amp;*-]).{8,20}$/; if (uname.length &lt; 1){ cPassword.style.backgroundColor = noBg; match = ""; }else{ if (uname == pword){ match = "Match!"; cPassword.style.backgroundColor = matchCol; cPassword.style.borderColor = matchCol; }else if(pword.length &lt; 1){ cPassword.style.backgroundColor = noBg; match = ""; } else { match = "No Match!"; cPassword.style.backgroundColor = noMatchCol; cPassword.style.borderColor = noMatchCol; } document.getElementById("combination").innerHTML = match; } } i've tried simply converting but obviously I need to bind everything.
answer count: 1
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/14994391

http://stackoverflow.com/q/27214534
has body: I am using GetSentry for JavaScript error monitoring and I have an error, that I cannot find or cannot reproduce. On many of my pages (for example here) I have an error: [object Event] The error occurs (according to GetSentry) only on Android devices. This error I cannot reproduce on my Android, or any other Androids here in the office. Please provide some advice.
tagged with: android
linked to: http://stackoverflow.com/q/12563814
has comment: http://stackoverflow.com/comment/50169946
favorite count: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/50209777
upvote count: 7
has title: JavaScript [object Event] error on Android in GetSentry
score: 7
type: Question
tagged with: mobile
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/52987698
tagged with: runtime-error
tagged with: sentry
has comment: http://stackoverflow.com/comment/50580245
has comment: http://stackoverflow.com/comment/52938002

http://stackoverflow.com/comment/42883229
score: 0
has text: get it.thank you.I have confused with function scope and object scope.:-)
type: Comment
comment on: http://stackoverflow.com/a/27199509
type: AnswerComment

http://stackoverflow.com/comment/43086166
type: Comment
comment on: http://stackoverflow.com/a/27312645
has text: Does your model contains the checkbox value?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27214681
has comment: http://stackoverflow.com/comment/42910696
has comment: http://stackoverflow.com/comment/42909436
answer count: 0
type: Question
has title: Google Map not showing smooth lines between map grid squares
has body: I have a question that may be somewhat strange. I have implemented Google Maps on different parts of my website, but in one part the map canvas is not showing smooth imaging. It is showing the distinctive grid squares. I have double checked the map api reference and it seems to be the right code. I have also checked against other parts of my site and the code is almost identical. Here is the code I have for the offending grid lines map (googlemap.js) var scriptTag = '&lt;' + 'script src="http://maps.google.com/maps/api/js?v=3&amp;amp;key={my-key}&amp;amp;sensor=false"&gt;'+'&lt;'+'/script&gt;'; document.write(scriptTag); var latlng = '0'; var imagename = ''; var GPSLatitude = '48.2099177267394'; var GPSLongitude = '16.37563705444336'; window.setTimeout('initGmaps();',1000); function initGmaps() { var myOptions = { zoom:4, center:new google.maps.LatLng(GPSLatitude,GPSLongitude), }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); marker = new google.maps.Marker({ map: map, position: new google.maps.LatLng(GPSLatitude,GPSLongitude) }); function placeMarker(location) { if (marker) { marker.setPosition(location); } else { marker = new google.maps.Marker({ position: location, map: map }); } } // google.maps.event.addDomListener(window, 'load', initialize); &lt;-- if I leave this in, it doesn't load the map for some strange reason Here is where I call the map (functions.php &lt;-- this sends the co-ords to the map) $google_map = " &lt;script type='text/javascript' src='googlemap.js'&gt;&lt;/script&gt; &lt;script type='text/javascript'&gt; GPSLatitude = '$GPSLatitude'; GPSLongitude = '$GPSLongitude'; imagename = '$image_name'; &lt;/script&gt; "; Here are a couple of screenshots of the issue Distinctive Grid Lines Smooth Image Just not quite sure where I am going wrong with this. Any help is greatly appreciated
linked to: http://stackoverflow.com/q/18945991
has comment: http://stackoverflow.com/comment/42909478
has comment: http://stackoverflow.com/comment/42910667
score: 0
has comment: http://stackoverflow.com/comment/42909459
linked to: http://stackoverflow.com/q/11397343
tagged with: google-maps
has comment: http://stackoverflow.com/comment/42909467
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20522471

http://stackoverflow.com/q/27161597
has answer: http://stackoverflow.com/a/27180169
tagged with: regex
favorite count: 0
tagged with: npm
accepted answer: http://stackoverflow.com/a/27180169
upvote count: 2
has title: Is there a way to use gulp to remove all instances of require.js define([...]) wrappers?
has comment: http://stackoverflow.com/comment/42816705
type: AnsweredQuestion
has body: I would like to test my app without require.js to see what the performance and file size would be like as a single concatenated file. I'm thinking of using gulp to grab all app *.js files, perform a gulp-replace to remove all instances of the the define([...], function (...) { }); wrapper in the script, and the concatenate into a single *.js file. Any idea if gulp-replace could handle that, and if so, what would the regex look like? Here's an example of a *.js file: 'use strict'; define(['file1', 'file2', 'file3'], function (param1, param2, param3) { //... //code that should remain after gulp-replace //... });
type: Question
score: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42848850
tagged with: javascript
tagged with: gulp

http://stackoverflow.com/a/27301835
type: Answer
answers question: http://stackoverflow.com/q/27169045
downvote count: 0
score: 1
has body: You can not disable addons but you can overwrite their functionality. as every javascript code runs under window context, you will get access to addons variable. You just need to do some RnD on those add ons and replace functions before your script loads.
upvote count: 1
has comment: http://stackoverflow.com/comment/43135355

http://stackoverflow.com/a/27201161
type: AcceptedAnswer
has body: add parents(). to addclass on li jQuery('.post').on('click', 'a.more', function(){ jQuery(this).parents('li').addClass('active'); }); jQuery('.post').on('click', 'a.less', function() { jQuery(this).parents('li').removeClass('active'); }); Try above code.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27201132
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42886007
score: 1
answers question: http://stackoverflow.com/q/27201132
has comment: http://stackoverflow.com/comment/42885831

http://stackoverflow.com/a/27199724
answers question: http://stackoverflow.com/q/27199669
has body: I suggest you to use reset button instead of JS. Example: <input type="hidden" name="depName" value="<?php echo $_GET['var'];?>"> FirstName :<input type="text" name="fname" class="in1" value="<?php echo $nombre;?>"> * <?php echo $nombreErr;?> LastName :<input type="text" name="lname" class="in2" value="<?php echo $apellido;?>"> * <?php echo $apellidoErr;?> 2LastName :<input type="text" name="Slname" class="in3" value="<?php echo $segundoAppellido; ?>"> <?php echo $segundoAppellidoErr; ?> Student Id :<input type="text" name="studentId" class="in4" value="<?php echo $idEstudiante;?>"> <?php echo $idEstudianteErr; ?>
type: Answer
score: 0

http://stackoverflow.com/comment/43090236
score: 0
type: Comment
has text: @HenricF : check updated answer this will definitely help you to solve your problem.
comment on: http://stackoverflow.com/a/27291750
type: AnswerComment

http://stackoverflow.com/q/27218814
accepted answer: http://stackoverflow.com/a/27218835
tagged with: javascript
has answer: http://stackoverflow.com/a/27220000
tagged with: http://stackoverflow.com/tag/html
tagged with: input
possible better answer: http://stackoverflow.com/a/27218831
has title: (beginner) HTML + JS change variables with input value
has answer: http://stackoverflow.com/a/27218831
has answer: http://stackoverflow.com/a/27218835
type: Question
type: AnsweredQuestion
score: 0
answer count: 3
has body: Hello Stackoverflow people, My question is how to change a variable I assigned with JavaScript using the value of an HTML input tag. my progress: &lt;script type="text/javascript"&gt; var x = 0; document.write(x); function addtox() { var addx = document.getElementById("plusx").value; x = x + addx; } &lt;/script&gt; &lt;input id="plusx" type="number"&gt; &lt;input type="button" onclick="addtox()" value="add"&gt; The result is that it literally adds the value of id="plusx" to the 0 that's already there. So if the input would be 50, it would return 050, and not 50. If I repeat the button it returns 05050 in stead of 100. How can I fix this? Also: how can I update text that is already writting to the screen? x is already written to the screenbefore the change and doesn't update after it is assigned a new value. p.s Sorry if I am a bit vague, not too familiar with coding questions like mine.

http://stackoverflow.com/q/27280616
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/17847131
score: 1
has body: I'm starting out with a flat JSON input as such (simple example): [ {id:1, value:'child1', parentId:2, sortOrder:1}, {id:2, value:'root1', parentId:null, sortOrder:1}, {id:3, value:'root2', parentId:null, sortOrder:2}, {id:4, value:'child2', parentId:1, sortOrder:2}, {id:5, value:'root3', parentId:null, sortOrder:3}, {id:6, value:'child1', parentId:2, sortOrder:1}, {id:7, value:'root4', parentId:null, sortOrder:4} ]; The input can be of arbitrary depth and length, and needs to reformatted to a collection of nested arrays based on the parent-child relationships, as well as sorted in ascending order at each nesting level. Either native JS or UnderscoreJS can be used to format the output. The output would be formatted as a json structure with a basic form: root1 child1 child2 root2 child1 child1 child2 child2 etc... Where each element is a JSON object. The nesting depth can be anything since the data is most likely coming from a db table with the above flat structure. Any thoughts?
tagged with: nested-lists
has comment: http://stackoverflow.com/comment/49373148
has comment: http://stackoverflow.com/comment/65329554
answer count: 2
has answer: http://stackoverflow.com/a/38989166
upvote count: 1
tagged with: recursion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/38988486
type: UnansweredQuestion
has title: Javascript: parsing and sorting a flat json structure into nested arrays?

http://stackoverflow.com/comment/43074413
comment on: http://stackoverflow.com/a/27246127
has text: The potential for variable conflicts is because I am committing a little programming sin by blowing away the values in my global variables each time I swap out these files. That's why I can't load all of my options at the beginning - I don't know ahead of time which values should survive and which would be the incorrect version.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42979589
score: 1
type: Comment
has text: Why `*10`? It should be `*$("#messages>p").length`, and you should use `$("#messages>p").eq(random).click()` to trigger the click.
type: QuestionComment
comment on: http://stackoverflow.com/q/27252785

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/27231626
tags question: http://stackoverflow.com/q/27161793
tags question: http://stackoverflow.com/q/27309713
type: Tag
tags question: http://stackoverflow.com/q/27196064
tags question: http://stackoverflow.com/q/27299721

http://stackoverflow.com/a/28837699
has body: For anyone stuck on this, heres how I did it for a option: Hello Everybody Got It In Selenium for NodeJS, you would grab the "It" : var webdriver = require('selenium-webdriver'); var driver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); driver.findElement(webdriver.By.id('mySelection')).sendKeys('3'); When you .sendKeys() for the option it has to equal the value='' In your case just grab the parent element then sendKeys() for the child element.
answers question: http://stackoverflow.com/q/27273262
score: 0
has comment: http://stackoverflow.com/comment/45962456
upvote count: 2
downvote count: 2
type: Answer

closures
tags question: http://stackoverflow.com/q/27297286
tags question: http://stackoverflow.com/q/27159919
tags question: http://stackoverflow.com/q/27242592
tags question: http://stackoverflow.com/q/27176616
tags question: http://stackoverflow.com/q/27287556
tag name: closures
tags question: http://stackoverflow.com/q/27222418
type: Tag

http://stackoverflow.com/comment/82839830
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27224422
has text: Have you not thought of something along the lines of 'Bootstrap', in order to help make your website responsive?
score: 0

http://stackoverflow.com/comment/42850328
type: AnswerComment
has text: I really like this approach - thank you very much. Unfortunately owing to strict deadlines I'm stuck with jQuery UI for now, but I'm making a note to move to Angular UI when possible.
comment on: http://stackoverflow.com/a/27180505
type: Comment
score: 0

http://stackoverflow.com/q/27169906
downvote count: 2
has comment: http://stackoverflow.com/comment/42831180
answer count: 1
tagged with: javascript
has title: Change the filepath to save the page content depending on the existence of a page element
has comment: http://stackoverflow.com/comment/42831145
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27170523
accepted answer: http://stackoverflow.com/a/27170523
has comment: http://stackoverflow.com/comment/42831626
type: AnsweredQuestion
tagged with: casperjs
upvote count: 0
has comment: http://stackoverflow.com/comment/42831482
linked to: http://stackoverflow.com/q/750486
type: Question
has body: I downloaded many pages html with casperjs, but I want separate them in 2 folders. some files contains id="trie" and others not. What can I do, please? this is my script casper.repeat(j , function(){ casper.open(arrdata[i]); // arrdata[i] : contains url of file to download casper.wait(5000, function(){ file = 'pages/road/r_' + i +'.html'; fs.write(file, casper.getHTML(), 'w'); }); i++; }); but i want do like this casper.repeat(j, function(){ casper.open(arrdata[i]); if ("id=trie" exists in contains of arrdata[i] ){ this file is put to pages/trie/...html } else { this file is put to pages/road/...html } i++; });
score: -2

http://stackoverflow.com/comment/55493639
comment on: http://stackoverflow.com/a/27466741
score: 0
type: AnswerComment
type: Comment
has text: Try restarting your computer. You may already have another selenium task running somewhere taking up port 4444.

http://stackoverflow.com/comment/42994672
score: 0
has text: X-Forms_Based_Auth_Required: https://MySharePointSite.sharepoint.com/_forms/default.aspx?ReturnUrl=/_layouts/15/error.aspx&Source=%2f_vti_bin%2fclient.svc%2fcontextinfo X-Forms_Based_Auth_Return_Url: https://MySharePointSite.sharepoint.com/_layouts/15/error.aspx X-MSDAVEXT_Error: 917656; Access+denied.
comment on: http://stackoverflow.com/q/27256811
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27280571
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27280527
has body: You're a bit off ... try ... document.getElementById("page").innerHTML += " " + AnotherVariable + " "; .. if you don't want the function to run. In particular, look here: " " UPDATE 1: "Variable is string." Then, here's the modification: document.getElementById("page").innerHTML += " " + AnotherVariable + " ";
type: Answer
has comment: http://stackoverflow.com/comment/43031503
upvote count: 3
has comment: http://stackoverflow.com/comment/43031611
has comment: http://stackoverflow.com/comment/43029903
accepted answer of: http://stackoverflow.com/q/27280527
score: 3
has comment: http://stackoverflow.com/comment/43032158

http://stackoverflow.com/comment/43026292
type: Comment
type: QuestionComment
score: 0
has text: Are you just trying to label the inputs and check their values?
comment on: http://stackoverflow.com/q/27278653

http://stackoverflow.com/comment/42967247
type: QuestionComment
has text: #toCopy: Thank you for noticing, it's indeed Constructor.prototype.toCopy. However, this mistake just happened in the example code. #utils.copyObj: This creates a deep copy of an object: utils.copyObj = function(source) { if(source === null || typeof(source) !== 'object') return source; var newObj = source.constructor(); for (var key in source) { if(source.hasOwnProperty(key)) { newObj[key] = utils.copyObj(source[key]); } } return newObj; }; #Module pattern: Investigated, don't think it helps, need to put fns into the prototype. Can you give me a concrete example?
score: 0
comment on: http://stackoverflow.com/q/27240585
type: Comment

http://stackoverflow.com/q/27222123
score: 4
upvote count: 4
answer count: 2
has body: I'm having some troubles trying to reach a solution for this problem: I have an ng-repeat of items, and those items need to be sorted by a dropdown of numbers (I don't need this to be done dinamically, I just need to assign a values to each item). First of all, I need to display a dropdown with values from 1 to items.length; &lt;div ng-repeat="item in items"&gt; &lt;span&gt;{{item.name}}&lt;/span&gt; &lt;span&gt;&lt;/span&gt; &lt;!-- Here I should display a dropdown with values from 1 to items.length --&gt; &lt;/div&gt; Besides that, it'd be great if I can make the dropdown values mutually exclusive between them. For example, if I choose "1" value for the dropdown in first item, "1" should not be an option in the all other dropdowns. Here there is a fiddle. Any help? Thanks!
favorite count: 0
has comment: http://stackoverflow.com/comment/42925071
tagged with: angularjs
has answer: http://stackoverflow.com/a/27236588
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27234873
has comment: http://stackoverflow.com/comment/42923590
type: Question
accepted answer: http://stackoverflow.com/a/27236588
has title: Dynamic mutually exclusive dropdown in ng-repeat of angularjs
possible better answer: http://stackoverflow.com/a/27234873
downvote count: 0
tagged with: javascript

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/27252703
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/27240975

http://stackoverflow.com/comment/42986455
type: AnswerComment
comment on: http://stackoverflow.com/a/27255935
has text: Does not work, only input text was cleared. But select lists does not with a attribute `selected`
type: Comment
score: 0

http://stackoverflow.com/q/27276545
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43022058
tagged with: forms
type: Question
has body: I want to have a form that asks the user their name, then welcomes them to the website with that name without redirecting to a different page or reloading. So basically replace a form with "Welcome NAME" after submit is clicked. My code: &lt;div id="welcomeText"&gt; &lt;form onsubmit="changeText()" method="post"&gt; Name: &lt;input type="text" name="fname"&gt; &lt;input type="submit"&gt; &lt;/form&gt; &lt;/div&gt; &lt;script&gt; function changeText() { var name = document.getElementById(welcomeForm).fname.value; var welcome = "Welcome, " + name; document.getElementById("welcomeText").innerHTML = welcome; } &lt;/script&gt;
has answer: http://stackoverflow.com/a/27276598
has answer: http://stackoverflow.com/a/27276659
tagged with: javascript
has answer: http://stackoverflow.com/a/27276725
accepted answer: http://stackoverflow.com/a/27276598
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Replace innerhtml on form submit with javascript
possible better answer: http://stackoverflow.com/a/27276642
answer count: 4
has answer: http://stackoverflow.com/a/27276642

http://stackoverflow.com/comment/42832877
has text: thanks for your reply. Your code is working only with the first element. But not in cloned element. I am adding this div to add more member. But remove is working only on the first. I have checked the class of cloned div. Is is the same as parent/first. Then why it's not working on other div except parents?!! I am really confused. Can you help please ??
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27170524
type: Comment

http://stackoverflow.com/comment/43063923
score: 0
type: Comment
type: QuestionComment
has text: @user3334871 Thanks. Defined outside of the loop before the call and it works.
comment on: http://stackoverflow.com/q/27299491

http://stackoverflow.com/a/27191790
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/42869556
score: -1
has comment: http://stackoverflow.com/comment/42869488
has body: .remove(0) isn't valid you can add this function to make it valid tho : Array.prototype.remove = function(index) { return this.splice(index, 1); // The second parameter is the number of elements to remove. }
downvote count: 1
answers question: http://stackoverflow.com/q/27191614
has comment: http://stackoverflow.com/comment/42869521

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/27248749
tags question: http://stackoverflow.com/q/27211289
tags question: http://stackoverflow.com/q/27310569
type: Tag

http://stackoverflow.com/comment/42879821
type: QuestionComment
has text: Or it would be better if anyone find me similar kind of script
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27197422

http://stackoverflow.com/comment/42808585
type: Comment
score: 1
has text: And what about `foo.__proto__ = proto;`?
comment on: http://stackoverflow.com/a/27157056
type: AnswerComment

http://stackoverflow.com/a/27285226
score: -11
has body: You can do it by checking if your query string is present and running a different query. router.get('/questions', function(req, res) { if (req.query.yourQueryString) { // Run your more specific select } else { knex('questions').select('question', 'correct', 'incorrect').limit(50).where( 'somecolumn', req.query.param) // &lt;-- only if param exists .then(function(results) { res.send(results); }); } } });
downvote count: 13
answers question: http://stackoverflow.com/q/27232415
type: Answer
upvote count: 2

http://stackoverflow.com/comment/42832086
has text: @Andreas: I just want to do with less code and smarter way. I always knew I can do with 2 for loops.
comment on: http://stackoverflow.com/q/27170380
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27253991
tagged with: each
has answer: http://stackoverflow.com/a/27254066
has title: Pass multiple elements to an each function
type: Question
accepted answer: http://stackoverflow.com/a/27254066
answer count: 2
possible better answer: http://stackoverflow.com/a/27254068
tagged with: javascript
tagged with: jquery
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27254068
has body: function generalShowPopup(click_element, show_elements) { click_element.on("click", function(event) { show_elements.each(function() { $(this).show(); }); event.preventDefault(); }); } With the above function I intend to show an element when a certain link is clicked. Calling the function like this (one second argument) works fine: generalShowPopup($(".popup_link"), $(".popup") ); But how could I pass two elements to the second argument, i.e show two elements when a certain link is clicked?
has comment: http://stackoverflow.com/comment/42982006

http://stackoverflow.com/comment/42894114
score: 0
has text: @DavidThomas: code updated
type: QuestionComment
comment on: http://stackoverflow.com/q/27205742
type: Comment

http://stackoverflow.com/a/27207489
type: Answer
has body: You don't have to call event handlers again and again. Just calling it once is enough.. var color; $(document).ready(function(){ $('body').on('mouseenter','.editable',function(){ console.log($(this)); $(this).wrap('&lt;span class="test"&gt;&lt;/span&gt;') $(this).css('border', '1px solid red'); }); $('body').on('mouseout','.editable',function(){ var orginal = $(this); $(this).css("border", "0px"); $(this).parent().replaceWith(orginal.parent().html()); }); });
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27207441
answers question: http://stackoverflow.com/q/27207441
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42999499
has text: Try replacing `"\n"` with `"\r\n"`. As far as I know, this comes from a long time ago when `\n` meant "next line", and `\r` meant "line return" or "move the cursor all the way too the left of the screen". For whatever, most Microsoft products still need the full `"\r\n"`.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27263614
type: QuestionComment

http://stackoverflow.com/a/27174195
answers question: http://stackoverflow.com/q/27161476
type: Answer
has body: Did you try removing comments here ? // uglify: { // dist: { // files: { // '&lt;%= config.dist %&gt;/scripts/main.js': [ // '&lt;%= config.dist %&gt;/scripts/main.js' // ] // } // } // }, // concat: { // dist: {} // }, also disabled here grunt.registerTask('build', [ 'clean:dist', 'wiredep', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'uncss', 'cssmin', //'concat', //'uglify', 'copy:dist', 'rev', 'usemin', 'htmlmin' ]);
score: 0

http://stackoverflow.com/comment/42855370
type: QuestionComment
type: Comment
has text: @Satpal you may click the link above this comment
score: 0
comment on: http://stackoverflow.com/q/27184053

http://stackoverflow.com/q/27255444
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: footer
favorite count: 0
tagged with: css
accepted answer: http://stackoverflow.com/a/27255846
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42985044
upvote count: 1
has title: jQuery : toggle footer, resize from #px to 100% width and back
has answer: http://stackoverflow.com/a/27255697
type: Question
has comment: http://stackoverflow.com/comment/42984963
has body: I'm working on a toggle footer, it is width:100%;. I set it to have max-width:670px, and I want it to expand to 100% width before the toggle animation. Here is my codepen: http://codepen.io/GCW/pen/ZYbvPO As you can see, it works. But I had to set maxWidth: '5000' to have it full width in mostly every kind of screen. In this way, my animation is not fluid, my footer goes back to 670px very fast. I played with animation time, but I'm sure there is a better way to do that. I guess that my code is too long for this simple action, too. I also tried with var window_width = $(window).width() and then .animate({ maxWidth: window_width }.. and it works well, just until I resize my window because it has a precise width value, and not a percentage, so it has some fixed width.
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27255697
answer count: 2
has answer: http://stackoverflow.com/a/27255846

http://stackoverflow.com/comment/42813104
has text: Oh,I see what you're saying. But if the text is too large, it will overflow the div and not shrink inside. http://jsfiddle.net/MYSVL/2667/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27159259
type: Comment

http://stackoverflow.com/q/27232155
answer count: 1
has comment: http://stackoverflow.com/comment/42941432
accepted answer: http://stackoverflow.com/a/27232412
has comment: http://stackoverflow.com/comment/42941229
has comment: http://stackoverflow.com/comment/42941416
has title: javaScript colourize each character in a string
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42941197
type: Question
has body: Hi I am using javascript and jquery and I am trying to concantenate the date methods such as d.getMonth() into a string so I can later go through each character and change the color with jquery. Today's Date is: This is my origional code. I tried appending them to the html document which works. Then I made a method that generates a random color. Now I want to change the color of each character. But changing each characgter to a different color is where I am failing.
has comment: http://stackoverflow.com/comment/42941330
has comment: http://stackoverflow.com/comment/42941153
has answer: http://stackoverflow.com/a/27232412
tagged with: javascript
has comment: http://stackoverflow.com/comment/42941135
score: 0

http://stackoverflow.com/a/27212758
type: Answer
has comment: http://stackoverflow.com/comment/42906142
score: 1
has comment: http://stackoverflow.com/comment/42906670
has comment: http://stackoverflow.com/comment/42906127
has body: Page91Ex6
upvote count: 1
has comment: http://stackoverflow.com/comment/42906152
downvote count: 0
answers question: http://stackoverflow.com/q/27212733

http://stackoverflow.com/comment/43080896
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27309561
has text: ;-), waiting for to taste

http://stackoverflow.com/comment/42817898
type: Comment
has text: Great answer! Thanks for taking the time to explain.
comment on: http://stackoverflow.com/a/27160924
score: 0
type: AnswerComment

http://stackoverflow.com/q/27311956
has comment: http://stackoverflow.com/comment/43084583
has body: I am trying to display a div message when the page loads using fadein and fadeout after 3 secs but my code does not seem to work, any help please? what am I doing wrong? HTML &lt;div id="message" class="jumbotron" style="display:none;"&gt; &lt;p&gt;&lt;?php echo $m; ?&gt;&lt;/p&gt; &lt;/div&gt; jQuery $(document).ready(function(){ $('div#message').fadeIn(3000).delay(3000).fadeOut(2000); });
has answer: http://stackoverflow.com/a/27312120
score: 1
has comment: http://stackoverflow.com/comment/43084623
has answer: http://stackoverflow.com/a/27312142
has comment: http://stackoverflow.com/comment/43084704
has comment: http://stackoverflow.com/comment/43084491
upvote count: 2
has comment: http://stackoverflow.com/comment/43084739
has answer: http://stackoverflow.com/a/27312932
has title: How to fade in a div message on page load with jQuery
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43084746
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/43084603
answer count: 4
has comment: http://stackoverflow.com/comment/43084517
has comment: http://stackoverflow.com/comment/43084772
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43084564
tagged with: php
has answer: http://stackoverflow.com/a/27312153
type: Question

http://stackoverflow.com/a/27206512
type: AcceptedAnswer
has body: There is no "crate" element in html: crate = document.createElement("crate"); should be crate = document.createElement("input");
has comment: http://stackoverflow.com/comment/42895295
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27206486
score: 1
has comment: http://stackoverflow.com/comment/42895651
accepted answer of: http://stackoverflow.com/q/27206486
has comment: http://stackoverflow.com/comment/42897756
upvote count: 1

http://stackoverflow.com/a/27189901
score: 1
has body: If I understand you well, you need to keep "place" where the point was? If yes, you can try to use point.update() function and set null value. Example: http://jsfiddle.net/gd4q4jo0/1/
upvote count: 1
answers question: http://stackoverflow.com/q/27189644
has comment: http://stackoverflow.com/comment/42866189
downvote count: 0
type: Answer

http://stackoverflow.com/q/27157101
has comment: http://stackoverflow.com/comment/42827073
tagged with: zurb-foundation
tagged with: abide
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42827902
answer count: 0
upvote count: 2
type: UnansweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42822765
score: 1
has comment: http://stackoverflow.com/comment/42827623
has title: Foundation Abide validation with jQuery.payment library
has comment: http://stackoverflow.com/comment/42827101
has body: I have the following script which works ok: http://jsfiddle.net/asWeb/cxk47qen/2/ if I click on submit when the form is empty I get the correct error messages if I type a correct card number (tested with a valid one) and then I click on submit again I shouldn't get the error message for card number input however I still do and that is my problem. Hopefully I am using the correct Foundation validation syntax: Card number formatting invalid Expiry formatting invalid CVC formatting invalid I am using this library too as I needed something more consistent to check card numbers (Foundation lacks in that a bit) but that shouldn't interfere with my issue. I have the same problem even if I remove this library.

http://stackoverflow.com/comment/43016813
has text: @Panos this is trick. once I also tried to stringify object before sending data, and finally found jQuery is handling that.
comment on: http://stackoverflow.com/a/27273337
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27155948
has body: It likely doesn't save the id on the local variable because the id is likely being created on your server. To retrieve the id of the object you could either alter the response object on the server to include the newly-created object's id or, after creating the object, you could post a GET request to retrieve the id of the object.
has comment: http://stackoverflow.com/comment/42806256
answers question: http://stackoverflow.com/q/27155844
type: Answer
has comment: http://stackoverflow.com/comment/42806176
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42806590
downvote count: 0

portlet
tags question: http://stackoverflow.com/q/27290300
type: Tag
tag name: portlet

http://stackoverflow.com/comment/43062666
has text: It allows me to return a promise (similar to making an $http call) so I could use the then function from the controller. But since its jsfiddle, $http wouldn't work -- which is why I used $q.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27299091

http://stackoverflow.com/q/27181021
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/27181059
has answer: http://stackoverflow.com/a/27181097
has title: How to pass multiple variables in a loop, into a ajax json data.
has answer: http://stackoverflow.com/a/27181059
has body: I have the following code, and I want to pass the value[i] into a data string in a json ajax post submit, Basically what I am trying to do is grab all the checked values in a form and put them into a existing json data string in ajax. code I have so far var values = $('input:checked').map(function () { return this.value; }).get(); // ["18", "55", "10"] //console.log(values); var length = values.length; for (i = 0; i &lt; length; i++){ console.log(values[i]); } $.ajax({ type:"POST" ,url : $(form).prop('action') ,data:{ name:getValue($('label.name input')) ,email:getValue($('label.email input')) ,phone:getValue($('label.phone input')) ,fax:getValue($('label.fax input')) ,state:getValue($('label.state input')) ,message:getValue($('label.message textarea')) ,owner_email:opt.ownerEmail||'#' ,stripHTML:opt.stripHTML }
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42850488
type: Question
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/27181097
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27232239
tagged with: asp.net
has title: Javascript in aspx to get variable path
score: 0
has answer: http://stackoverflow.com/a/27233001
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42941449
type: Question
has body: I am using jquery.mb.mini audio player and i got below code in my aspx page which works fine. Audio1 mp3 My question is that how can i change href path in above code to be a variable path according to two dropdowns selected values. Because i also got two dropdowns on aspx page and one of them got value "Folder 1" and other one got value "Audio1". I tried doing it by below code but its not working. Javascript in aspx page Audio1 mp3 Does anybody can help that how i can achieve this? Dropdown code in aspx page <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="AccessDataSource1" DataTextField="FldrName" DataValueField="FldrName" Height="25px" Width="250px"> </asp:DropDownList> <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/AD.mdb" SelectCommand="SELECT [FldrName] FROM [Folders]"> </asp:AccessDataSource> <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="AccessDataSource2" DataTextField="Audio" DataValueField="Audio" Height="25px" Width="250px"> </asp:DropDownList> <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/AD.mdb" SelectCommand="SELECT [Audio] FROM [Aduios] WHERE ([FldrName] = ?)"> <asp:ControlParameter ControlID="DropDownList1" Name="FldrName" PropertyName="SelectedValue" Type="String" /> </asp:AccessDataSource>
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42942686

http://stackoverflow.com/comment/42984500
type: QuestionComment
has text: Unfettered recursion will cause a stack overflow.
comment on: http://stackoverflow.com/q/27254947
score: 0
type: Comment

http://stackoverflow.com/comment/43002711
type: QuestionComment
has text: Yes. The problem seems to be that I'm sending json to the Django view. So django is seeing `{"csrfmiddlewaretoken": "token", "artist": "da vinci"}`
score: 0
comment on: http://stackoverflow.com/q/27265021
type: Comment

http://stackoverflow.com/q/27244799
has answer: http://stackoverflow.com/a/27246977
has body: I want to query object from Parse DB through javascript, that has only 1 of some specific relation object. How can this criteria be achieved? So I tried something like this, the equalTo() acts as a "contains" and it's not what I'm looking for, my code so far, which doesn't work: var query = new Parse.Query("Item"); query.equalTo("relatedItems", someItem); query.lessThan("relatedItems", 2);
upvote count: 1
has comment: http://stackoverflow.com/comment/42966312
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/71729120
tagged with: javascript
has comment: http://stackoverflow.com/comment/42966375
answer count: 2
accepted answer: http://stackoverflow.com/a/27246977
downvote count: 0
favorite count: 0
has title: Parse.com relations count
tagged with: parse-platform
possible better answer: http://stackoverflow.com/a/71729120

http://stackoverflow.com/q/27299466
has body: Isn't the literal object instantiation in javascript a singleton? Of course there is no "self" instantiation if the object is not found, but there is only one "copy" of the object kept around. what are your thoughts?
accepted answer: http://stackoverflow.com/a/27299575
upvote count: 5
has comment: http://stackoverflow.com/comment/43063045
downvote count: 0
tagged with: javascript
tagged with: ooad
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27299575
type: AnsweredQuestion
tagged with: oop
has title: Javascript literal object and singleton pattern
type: Question
linked to: http://stackoverflow.com/q/1479319
score: 5

http://stackoverflow.com/comment/42821655
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27158983
has text: What do you mean by "it has to work with html tags" ?
score: 0

http://stackoverflow.com/comment/42850699
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27181096
has text: @ Rizier123 - yes, but i not have correct answer
score: 0

http://stackoverflow.com/a/27300902
type: Answer
answers question: http://stackoverflow.com/q/27299716
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/27299716
has body: Inside the mouseover handler, this is the DOM element that triggered the event. So you can do something like .on("mouseover", function(d) { d3.select(this).attr('id');// presumes that &lt;rect&gt; has an id! }) To assign id to rect, you call .attr('id', 'some_id') on it. But if you're at a stage where you don't already have ids on the rects (despite what you titled your post), then consider using d3's data binding and the enter, update, (exit) selections in order to create your legend, and use d in the "mouseover" function to determine which legend element is being interacted with (instead of using ids on the DOM element).
has comment: http://stackoverflow.com/comment/43068440
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42942780
score: 0
has text: try generating the doanimation and blur code on doc ready. e.g $('.textfield').on('copy', function(){dothis()}); $(document).ready(function(){function dothis(){doAnimation(); this.blur();}});
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27233029

http://stackoverflow.com/comment/42957313
type: AnswerComment
has text: You nailed it. Still not sure this is the RIGHT way to do it though.
type: Comment
comment on: http://stackoverflow.com/a/27240401
score: 0

http://stackoverflow.com/q/27306706
score: 21
has body: I am trying to bind the src attribute of an HTML In my controller I have: $scope.sourceUrl = "https://<some url goes here>"; When running the page in the browser after the $scope.sourceUrl gets set there is no outgoing request to sourceUrl, so I am sure I am doing something wrong. Any ideas? I found several posts about src attribute of element, and ng-src should work as they say, but I guess is somehow different.
type: Question
has answer: http://stackoverflow.com/a/41871403
downvote count: 0
answer count: 7
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/37555507
has answer: http://stackoverflow.com/a/35059594
has comment: http://stackoverflow.com/comment/43076110
has title: How to bind element's src attribute in AngularJS
tagged with: angularjs
has answer: http://stackoverflow.com/a/27306744
accepted answer: http://stackoverflow.com/a/27306744
has comment: http://stackoverflow.com/comment/43075997
has answer: http://stackoverflow.com/a/37555507
has answer: http://stackoverflow.com/a/27310455
upvote count: 21
has answer: http://stackoverflow.com/a/49893241
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/59364970
has comment: http://stackoverflow.com/comment/43075815

http://stackoverflow.com/comment/43166139
score: 0
type: Comment
has text: sorry for late reply..that helped..thanx :)bbar config depends on d layout of parent container, so that was d problem..
type: AnswerComment
comment on: http://stackoverflow.com/a/27182404

http://stackoverflow.com/comment/42816443
type: Comment
type: QuestionComment
has text: Please post your code here, not as pastebin links.
score: 1
comment on: http://stackoverflow.com/q/27161453

http://stackoverflow.com/q/27208885
has body: So I'm trying to have a HTML element dragged around the page with my finger (or mouse, on desktop). The element is hidden at first, three other are shown, and when dragging one of them the hidden element reveals and moves with the finger - the initial element stays in place. When released, the dragged element disappears. So here is what I did : HTML : drag 1 drag 2 drag 3 dragged Controller : myApp.controller("playerCtrl", ["$stateParams", "$scope", function($stateParams, $scope) { $scope.player = $stateParams.playerId; $scope.doshadow = 0; $scope.draggedStyle = {}; $scope.onDrag = function(event) { //console.log('Reporting : drag'); console.log(event.target.className); $scope.doshadow = event.target.id.substr(8, 1); $scope.draggedStyle = { 'left': '30px', 'top': '50px' }; } $scope.onRelease = function(event) { //console.log(event.target); $scope.doshadow = 0; $scope.draggedStyle = {}; } }]); So this works perfectly... The only thing that I still need to do - and don't know how - is to fix the position according to the movement, and not fix it to 30px / 50px as it's currently done. So two things : - Am I doing things right ? - Can you help me figure out something with this mouse issue ? I'm a beginner with Angular, and getting to this took me 6 hours of work :D Thank you very much ahead !
upvote count: 7
accepted answer: http://stackoverflow.com/a/27209103
has answer: http://stackoverflow.com/a/27209059
tagged with: ionic-framework
downvote count: 0
tagged with: javascript
type: AnsweredQuestion
score: 7
favorite count: 0
has answer: http://stackoverflow.com/a/27209103
tagged with: angularjs
type: Question
answer count: 2
has title: Ionic and AngularJS - Drag element and move it around - how to get mouse position?
possible better answer: http://stackoverflow.com/a/27209059

http://stackoverflow.com/q/27190634
has body: Using a sprite sheet for at least each individual animation or even a single big one for all your sprites is generally a good idea because there will be less overhead, compression will be better, and the server won't be bombarded with as many requests. However these benefits all only affect the downloading of ones sprites from the webserver, what about rendering efficiency? In short: Is there any significant benefit in rendering individual frames directly off of the sprite sheet, rather than putting each frame on its individual canvas beforehand and rendering from there? What I'm planning to do is create an array of frames for each animation, so frame[0] would be an off-screen canvas element representing the first frame. I'm not super concerned about memory overhead (though it'd also be interesting to know), I'm mostly concerned about the efficiency of the rendering. If it's a significant performance hit I could consider instead making each "frame" something like an object with a reference to the respective sprite sheet, and x/y/w/h values for where to find the frame on the sheet. PS: I'm asking this with canvas in mind, would it be different for webGL?
type: Question
tagged with: html5-canvas
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27193141
favorite count: 0
has comment: http://stackoverflow.com/comment/42867550
tagged with: http://stackoverflow.com/tag/html
has title: Do sprite sheets provide any advantage during rendering?
has comment: http://stackoverflow.com/comment/42867773
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/27193141
tagged with: sprite
type: AnsweredQuestion

http://stackoverflow.com/comment/43027447
type: AnswerComment
comment on: http://stackoverflow.com/a/27278996
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/66148/discussion-between-richard-czechowski-and-raihan).

http://stackoverflow.com/comment/43074533
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27305747
type: QuestionComment
has text: By design `setTimeout()` has a minimum number of ms before it will be called, so it depends upon whether you want that feature of it or not. I doubt there are queue limits to be worried about as it's a relatively small amount of data to queue an event and many timer implementations share a single system timer among all timers which is possible because they aren't pre-emptive. If you want a micro-task to execute in 1-2ms, then `setTimeout()` is the wrong tool.

http://stackoverflow.com/comment/43006569
score: 1
has text: When an application has normalized data, that is when it doesn't duplicate data in two places (because that would be difficult to maintain), we often run into a situation where the data in Store A is needed in Store B. For example, an ImageStore vs. ThemeStore in an app that builds a greeting card. Each theme can contain a different maximum number of images. The ImageStore needs to know which theme is selected, so it knows how many it can mark as valid. When the action of type THEME_SELECTED is dispatched, ImageStore needs to waitFor ThemeStore, and then get the selected theme's max.
type: AnswerComment
comment on: http://stackoverflow.com/a/27267083
type: Comment

http://stackoverflow.com/a/27192595
upvote count: 1
has comment: http://stackoverflow.com/comment/42924347
has comment: http://stackoverflow.com/comment/42952945
answers question: http://stackoverflow.com/q/27182900
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27182900
has body: You cannot display any HTML above a windowed plugin. Period. There are no exceptions to that rule. Your options are to switch to windowless or to hide the plugin object (by setting width and height to 1px) when you're displaying the popup. Note: Do not hide the plugin using visibility: hidden or display: none, as this will cause it to lose its window on some browsers. width/height 0 can do the same thing sometimes, so I recommend 1x1
has comment: http://stackoverflow.com/comment/42882928
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/42896452

http://stackoverflow.com/a/27188368
type: Answer
accepted answer of: http://stackoverflow.com/q/27188278
answers question: http://stackoverflow.com/q/27188278
downvote count: 0
score: 1
has body: you cannot use expressions with ngSwitch reference so account.account is treat as just a string. use ng-if instead Cancel
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42858078
type: AnswerComment
has text: What's the value of `sensorNumber`? Can you try to add `alert(sensorNumber);` before the `if` block?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27185488

http://stackoverflow.com/comment/42804756
comment on: http://stackoverflow.com/q/27155167
type: QuestionComment
has text: You should be able to load the page and then just type `document.getElementsByName("checkered")` at the console prompt. If it returns an empty list, then that means the page doesn't contain the markup that you think it does, and you should explore the DOM (also with the developer tools) to see what it actually looks like.
type: Comment
score: 0

http://stackoverflow.com/a/27308864
score: 2
has body: You forgot to declare id for billing_zip. $(document).ready(function(){ $('#billing_zip').click(function () { alert('hi'); $('#zip').addClass('clicked'); }); }); #zip { color: #444; font-style: italic; position: absolute; top: 8px; left: 35px } .clicked { display: none; } Zip zip
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27308773
upvote count: 2

http://stackoverflow.com/a/27175765
downvote count: 0
score: 1
has body: Just store the circle value in global variable. var circle_latest = []; ... function try(circle, rect){ (...) circle[0] = .....; //x coordinates circle[1] = .....; //y coordinates circle_latest = circle; (...) } function callParam() { anotherCircleX = circle_latest[0] +200; anotherCircley = circle_latest[1] + 100; }
upvote count: 1
answers question: http://stackoverflow.com/q/27175591
type: Answer

http://stackoverflow.com/q/27272448
has answer: http://stackoverflow.com/a/27272502
has answer: http://stackoverflow.com/a/27273339
has answer: http://stackoverflow.com/a/27272576
score: 0
has answer: http://stackoverflow.com/a/27272556
linked to: http://stackoverflow.com/q/27294318
tagged with: javascript
tagged with: jquery
has title: Need count a value while on change function for checkbox check
has answer: http://stackoverflow.com/a/27273308
answer count: 5
has body: Hi all am trying add priority number using on change function for check box. While select the checkbox if it was checked need add it as 1.am having list of checkbox within a div I check any one checkbox need to mark it as one if select next means need to mark it as two by the way everything. Now the problem the event doesn't need to trigger while already marked checkbox here my working 1 2 3 4 my jquery $(function () { var count = 0; $('.span').on('change', function() { if(this.checked) { count ++; $('span').text(count); } }) }) please help the count will added only once for a checkbox FIDDLE
tagged with: checkbox
possible better answer: http://stackoverflow.com/a/27273339
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27272556

http://stackoverflow.com/q/27222709
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Replace no-phone symbols from phone in jquery with regexp
upvote count: 1
answer count: 1
has body: I got phone number in div with id=phoneNumber in format +7 (999) 999-9999 I need to replace symbols: '(',')',' ','-' in it. I'm trying to do it like this: phone=$('#phoneNumber').html(); phone=phone.replace('/[\s|\(|\)]/g',''); For some reason this doesn't replace anything. What's wrong? Are there better ways to implement it?
accepted answer: http://stackoverflow.com/a/27222733
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/27222733

http://stackoverflow.com/q/27199447
possible better answer: http://stackoverflow.com/a/27240290
has title: pass variables to a bootstrap modal
favorite count: 0
has answer: http://stackoverflow.com/a/27223734
accepted answer: http://stackoverflow.com/a/27287400
tagged with: twitter-bootstrap
type: AnsweredQuestion
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27240290
has answer: http://stackoverflow.com/a/27287400
tagged with: confirm
answer count: 3
tagged with: bootstrap-modal
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has body: I have a javascript confirm / cancel pop up box that dynamically unchecks a checkbox and also dynamically hides or shows a menu_entry that is part of a list that appears on the form, only when the user selects the ok button on the js confirm pop up box. I am now trying to change the js confirm to a bootstrap modal, but I am uncertain how to pass the variables to the bootstrap modal code and get the same functionality of the js confirm pop up box. Here is my working html code that has the call to the javascript confirm pop up box: {% for id, menu_entry, selected, item_count in menu_entries %} &lt;div class="available_resume_details_height"&gt; &lt;input type="checkbox" style="width:1.5em; height:1.5em;" name="selected_items" value="{{ id }}" {% if selected %}checked="checked"{% endif %} onclick="checkboxUpdated(this, {{ item_count }}, '{{ menu_entry.label }}', {{ id }});" /&gt; &lt;span style="cursor: pointer;" rel="popover" data-content="{{ menu_entry.tooltip }}" data-original-title="{{ menu_entry.label }}" {{ menu_entry.label }} &lt;/span&gt; &lt;/div&gt; {% endfor %} Here is my javascript code to display the confirm pop up and uncheck the checkbox and show/hide the list entry: function checkboxUpdated(checkbox, count, label, id) { if (checkbox.checked) { $('#menu_entry_' + id).show(); } else { if (count &gt; 0) { if (! confirm('{% trans "You have '+ count +' saved '+ label +'.\n\nAre you sure you want to delete your ' + count + ' saved ' + label +'?" %}')) { checkbox.checked = true; return; } } $('#menu_entry_' + id).hide(); } } Here is the new html code that has the call to the bootstrap modal. This does make the bootstrap modal appear: {% for id, menu_entry, selected, item_count in menu_entries %} &lt;div class="available_resume_details_height"&gt; &lt;input type="checkbox" style="width:1.5em; height:1.5em;" name="selected_items" value="{{ id }}" {% if selected %}checked="checked"{% endif %} {% if selected %} data-confirm="{% blocktrans with entry_label=menu_ent…

http://stackoverflow.com/q/27187659
has body: Bit of a complicated issue. I've been looking at ways of getting data into a PhoneGap App so the info in the App can be changed without having to update via the appstore on every change. After a lot of looking around I've found that Blogger.com has a JSON output that I THINK I can tap into and pull the data into the app. PhoneGap pages have to be .html so I cant use a .php or .net page to get data. Im told that if I can get JSON data I can use JS to get data out of the feed and use it... so...... Ive set up a test blog and using this url i can get a JSON feed: http://ironheartuk123.blogspot.com/feeds/posts/default?alt=json-in-script&amp;callback=myFunc This is what the feed outputs: // API callback myFunc({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$blogger":"http://schemas.google.com/blogger/2008","xmlns$georss":"http://www.georss.org/georss","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$thr":"http://purl.org/syndication/thread/1.0","id":{"$t":"tag:blogger.com,1999:blog-5655651846573938667"},"updated":{"$t":"2014-11-28T02:41:47.924-08:00"},"title":{"type":"text","$t":"test"},"subtitle":{"type":"html","$t":""},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"http:\/\/ironheartuk123.blogspot.com\/feeds\/posts\/default"},{"rel":"self","type":"application/atom+xml","href":"http:\/\/www.blogger.com\/feeds\/5655651846573938667\/posts\/default?alt=json-in-script"},{"rel":"alternate","type":"text/html","href":"http:\/\/ironheartuk123.blogspot.com\/"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"}],"author":[{"name":{"$t":"Mark Latham"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16519153095270236038"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"http:\/\/img2.blogblog.com\/img\/b16-rounded.gif"}}],"generator":{"version"…
type: Question
accepted answer: http://stackoverflow.com/a/27228585
tagged with: javascript
has comment: http://stackoverflow.com/comment/42862338
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42863636
favorite count: 0
score: -3
has answer: http://stackoverflow.com/a/27228585
type: AnsweredQuestion
has title: Get Blogger.com JSON data back into a html format?
tagged with: http://stackoverflow.com/tag/json
downvote count: 3

momentjs
tags question: http://stackoverflow.com/q/27278372
tags question: http://stackoverflow.com/q/27243282
tags question: http://stackoverflow.com/q/27245049
tags question: http://stackoverflow.com/q/27295479
tag name: momentjs
tags question: http://stackoverflow.com/q/27254799
tags question: http://stackoverflow.com/q/27247947
tags question: http://stackoverflow.com/q/27176135
type: Tag
tags question: http://stackoverflow.com/q/27217555

http://stackoverflow.com/a/27199750
score: 0
answers question: http://stackoverflow.com/q/27198060
has body: You code looks a bit odd. You are fetching asynchronously on the req.params._id but you are queuing up req.body.length potential worth of updates, but you send 'success' before you even get a response back from the updated results. If you wanted to filter on arrays, look at lodash, if you want to process multiple updates asynchronously and get those response use async modules.
type: Answer

http://stackoverflow.com/a/27311882
has comment: http://stackoverflow.com/comment/43099879
type: Answer
has comment: http://stackoverflow.com/comment/43089169
has body: You can draw a user image like this: On to this paper cup: With results like this: Using this example code: Modify this example to fit your needs. Good luck with your project! var faceCanvas = document.getElementById('face'); var faceCtx = faceCanvas.getContext('2d'); var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var cw, ch; $myslider = $('#myslider'); $myslider.val(50); var PI = Math.PI; var cupTop = 78; var cupBottom = 295; var dxx = 19; var dyy = 34; var l = { x0: 41, y0: cupTop, x1: 74, y1: cupBottom }; var r = { x0: 249, y0: cupTop, x1: 218, y1: cupBottom }; var t = { x0: l.x0, y0: l.y0, x1: l.x0 + dxx, y1: r.y0 + dyy, x2: r.x0 - dxx, y2: r.y0 + dyy, x3: r.x0, y3: r.y0 }; var b = { x0: l.x1, y0: l.y1, x1: l.x1 + dxx, y1: r.y1 + dyy, x2: r.x1 - dxx, y2: r.y1 + dyy, x3: r.x1, y3: r.y1 }; var topOffset = 40; var imgCount = 2; var cup = new Image(); cup.crossOrigin = 'anonymous'; cup.onload = start; var pic = new Image(); pic.crossOrigin = 'anonymous'; pic.onload = start; cup.src = 'https://image.ibb.co/iKJvyc/VENFv.png'; pic.src = 'https://image.ibb.co/dJHG4H/Pu7aY.jpg'; function start() { if (--imgCount &gt; 0) { return; } cw = canvas.width = faceCanvas.width = cup.width; ch = canvas.height = faceCanvas.height = cup.height; draw(); face(); $myslider.change(function() { var value = parseInt($(this).val()) / 100; topOffset = (l.y1 - l.y0 - pic.height) * value; draw(); face(); }); } function face() { // var lm = (l.y1 - l.y0) / (l.x1 - l.x0); var lb = l.y1 - (lm * l.x1); // var rm = (r.y1 - r.y0) / (r.x1 - r.x0); var rb = r.y1 - (rm * r.x1); faceCtx.clearRect(0, 0, faceCanvas.width, faceCanvas.height); for (var y = 0; y &lt; pic.height; y++) { var yy = cupTop + topOffset + y; var leftX = (yy - lb) / lm; var rightX = (yy - rb) / rm; var width = rightX - leftX; faceCtx.drawImage( pic, 0, y, pic.width, 1, leftX, yy, width, 1 ); } var yy = cupTop + topOffset; var p0 = { x: (yy - lb) / lm, y: cupTop + topOffset }; var p3 = { x: (yy - …
upvote count: 9
has comment: http://stackoverflow.com/comment/105563766
score: 9
answers question: http://stackoverflow.com/q/27275078
has comment: http://stackoverflow.com/comment/92100913
has comment: http://stackoverflow.com/comment/43103125
downvote count: 0

http://stackoverflow.com/q/27275458
tagged with: passport.js
favorite count: 0
has answer: http://stackoverflow.com/a/27275877
score: 0
tagged with: facebook
tagged with: node.js
type: AnsweredQuestion
has title: How get the facebook user image in PassportJS?
downvote count: 1
type: Question
has body: I'm using NodeJS with PassportJS. In the profile object there's only some personal info but not the user image. How to get the picture? What tools do I need? Thanks!!
accepted answer: http://stackoverflow.com/a/27275877
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/27296745
has comment: http://stackoverflow.com/comment/43058469
has body: I am dealing with Internet Explorer 8, I have the following code: this.scrolling = false; this.wrapper = $(wrapper); //this.scroller = this.wrapper.down('div.elscroller'); if (this.wrapper.querySelectorAll('div.elscroller') != null ) { this.scroller = this.wrapper.querySelectorAll('div.elscroller'); } this.sections = this.wrapper.getElementsBySelector('div.seccion'); This works fine in Chrome and Firefox, but IE throws: Object doesn't support this property or method in this line: this.sections = this.wrapper.getElementsBySelector('div.seccion'); the HTML code, is like this: &lt;div class="elscroller"&gt; &lt;div class="seccion" id="seccion1"&gt;&lt;/div&gt; &lt;div class="seccion" id="seccion..n"&gt;&lt;/div&gt; &lt;/div&gt; As you can see, there is a line commented, because it had the same problem, so I went into a primitive way of doing stuff, and put an if there. Only God knows how, but it has worked. I am really tired of coding especially for IE8. I hope some day people stop using this #%! browser.
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: -1
has title: getElementsBySelector failing in IE 8
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43058114
downvote count: 1
has answer: http://stackoverflow.com/a/27299906
tagged with: prototypejs
tagged with: internet-explorer
tagged with: internet-explorer-8
type: Question

http://stackoverflow.com/comment/42935463
type: Comment
has text: I didn't know about ray pointing etc... This is for sure the best way to do it. I will take a look at it. Thanks for your help.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27225371

http://stackoverflow.com/a/27196286
score: 0
answers question: http://stackoverflow.com/q/27195491
type: Answer
has body: I finally got it working, at the very end up of my php file: echo '&lt;script&gt;' . 'var zx =' . $total_need . '&lt;/script&gt;'; echo '&lt;script&gt;' . 'var zy =' . $total_pre . '&lt;/script&gt;'; echo '&lt;script&gt;' . 'var zz =' . $total_in . '&lt;/script&gt;'; The html section would then look like this: var doughnutData = [ { value: zx, color:"#941616", highlight: "#FF0000", label: "Needs Agreement" }, { value: zy, color: "#575757", highlight: "#777777", label: "Pre-Production" }, { value: zz, color: "#aaaaaa", highlight: "#cccccc", label: "In Production" } ];

http://stackoverflow.com/q/27153711
has comment: http://stackoverflow.com/comment/42801881
upvote count: 2
tagged with: maps
score: 2
type: AnsweredQuestion
tagged with: image
has answer: http://stackoverflow.com/a/29927650
type: Question
has title: pixels to meter conversion on browser image
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42821733
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29927650
has comment: http://stackoverflow.com/comment/42801745
has body: I have an image of indoor map on my browser and I could calculate the coordinates of random points on the image in pixels. I want to convert these coordinates to meters. For example, I want to convert (123, 246) in pixels to (10, 20) in meters. I have the width and height of the building in meters and also the size of the image in pixels. What would be the best way to calculate the pixels to meter ratio so that I can convert these back and forth? I am using mostly JavaScript to do all this.
favorite count: 0

http://stackoverflow.com/comment/42958038
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27195851
has text: OK. Feel like self-answering the question? Preferably with some code that shows how you solved the problem.

http://stackoverflow.com/a/27311790
type: Answer
has body: You could try something like: var indexOld = 0, indexNew; $( "#foo1 tbody" ).sortable({ start: function(e, ui) { indexOld = ui.item.index(); }, update: function(e, ui) { indexNew = ui.item.index(); if(indexOld &gt; indexNew) { $('#foo2 tr').eq(indexOld).insertBefore($('#foo2 tr').eq(indexNew)); } else { $('#foo2 tr').eq(indexOld).insertAfter($('#foo2 tr').eq(indexNew)); } } }); See this fiddle.
answers question: http://stackoverflow.com/q/27311393
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27311393

http://stackoverflow.com/comment/43006618
type: Comment
type: QuestionComment
score: 0
has text: @Barmar yes I'm displaying them without a problem . It begins when It reach $.ajax as I said .
comment on: http://stackoverflow.com/q/27267629

http://stackoverflow.com/comment/42947781
has text: Hi, sorry maybe i didn't make it clear but i would need the image to reposition from the centre when it is scaled. Your solution scales it from the top left.
comment on: http://stackoverflow.com/a/27234673
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42984128
has text: Yeah I found where was the problem I lastly modified an attribute in the formType class, changed the type of the field to money type giving it precision of two Zeros, thanks a lot for trying to help me, I apreciate it maan !!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27254386
score: 0

http://stackoverflow.com/comment/43016474
comment on: http://stackoverflow.com/a/27272835
type: Comment
has text: Thanks for the reply. The reason why I have a x0 and and x1 scale is because the x0 scale handles the spacing of each of the groupings on the x-axis (hence, when multiple players are compared, their respective graphs are split up based on "appearances", "goals" etc). The x1 scale handles the spacings of the bars within their respective groupings. Hence the final display should display multiple bars (in this instance two) per catagory on the x-axis. So the only thing missing now are the bars for the other player (Messi)
score: 0
type: AnswerComment

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/27272029
tags question: http://stackoverflow.com/q/27226223
tags question: http://stackoverflow.com/q/27158582
tags question: http://stackoverflow.com/q/27156478
tags question: http://stackoverflow.com/q/27165101
tags question: http://stackoverflow.com/q/27246397
tags question: http://stackoverflow.com/q/27223053
tags question: http://stackoverflow.com/q/27293537
tags question: http://stackoverflow.com/q/27244399
tags question: http://stackoverflow.com/q/27153827
tags question: http://stackoverflow.com/q/27253232
tags question: http://stackoverflow.com/q/27161821
tags question: http://stackoverflow.com/q/27292179
tags question: http://stackoverflow.com/q/27300863
tags question: http://stackoverflow.com/q/27277927
tags question: http://stackoverflow.com/q/27278835
tags question: http://stackoverflow.com/q/27192157
tags question: http://stackoverflow.com/q/27312700
tags question: http://stackoverflow.com/q/27182714
tags question: http://stackoverflow.com/q/27198819
tags question: http://stackoverflow.com/q/27269374
tags question: http://stackoverflow.com/q/27190074
tags question: http://stackoverflow.com/q/27158853
tags question: http://stackoverflow.com/q/27303332
tags question: http://stackoverflow.com/q/27305581
tags question: http://stackoverflow.com/q/27207291
tags question: http://stackoverflow.com/q/27271028
tags question: http://stackoverflow.com/q/27165099
tags question: http://stackoverflow.com/q/27293482
tags question: http://stackoverflow.com/q/27290222
tags question: http://stackoverflow.com/q/27202701
tags question: http://stackoverflow.com/q/27291434
tags question: http://stackoverflow.com/q/27164216
tags question: http://stackoverflow.com/q/27212957
tags question: http://stackoverflow.com/q/27199895
tags question: http://stackoverflow.com/q/27232060
tags question: http://stackoverflow.com/q/27250566
tags question: http://stackoverflow.com/q/27196224
tags question: http://stackoverflow.com/q/27188054
tags question: http://stackoverflow.com/q/27243812
tags question: http://stackoverflow.com/q/27176675
tags question: http://stackoverflow.com/q/27248151
tags question: http://stackoverflow.com/q/27172383
tags question: http://stackoverflow.com/q/27187341
tags question: http://stackoverflow.com/q/27203772
tags question: http://stackoverflow.com/q/27161578
tags question: http://stackoverflow.com/q/27289675
tags question: http://stackoverflow.com/q/27220725
tags question: http://stackoverflow.com/q/27245388
tags question: http://stackoverflow.com/q/27161167
tags question: http://stackoverflow.com/q/27220361
tags question: http://stackoverflow.com/q/27288100
tags question: http://stackoverflow.com/q/27276370
tags question: http://stackoverflow.com/q/27195590
type: Tag
tags question: http://stackoverflow.com/q/27287336
tags question: http://stackoverflow.com/q/27180203
tags question: http://stackoverflow.com/q/27184558
tags question: http://stackoverflow.com/q/27215641
tags question: http://stackoverflow.com/q/27281436
tags question: http://stackoverflow.com/q/27297879
tags question: http://stackoverflow.com/q/27250053
tags question: http://stackoverflow.com/q/27254995
tags question: http://stackoverflow.com/q/27249674
tags question: http://stackoverflow.com/q/27170374
tags question: http://stackoverflow.com/q/27203072
tags question: http://stackoverflow.com/q/27217397
tags question: http://stackoverflow.com/q/27279579
tags question: http://stackoverflow.com/q/27292776
tags question: http://stackoverflow.com/q/27287533
tags question: http://stackoverflow.com/q/27272228
tags question: http://stackoverflow.com/q/27266515
tags question: http://stackoverflow.com/q/27191915
tags question: http://stackoverflow.com/q/27191434
tags question: http://stackoverflow.com/q/27272977
tags question: http://stackoverflow.com/q/27254406
tags question: http://stackoverflow.com/q/27242092
tags question: http://stackoverflow.com/q/27256983
tags question: http://stackoverflow.com/q/27313750
tags question: http://stackoverflow.com/q/27253951

http://stackoverflow.com/q/27298627
answer count: 2
has comment: http://stackoverflow.com/comment/43061393
type: UnansweredQuestion
has body: Is there any way to access function on event handler which is inside a closures. fiddle (function(){ var val="balahhh" function a(){ alert(val) } })
score: 0
type: Question
has comment: http://stackoverflow.com/comment/43061369
has answer: http://stackoverflow.com/a/27298749
has answer: http://stackoverflow.com/a/27298682
tagged with: javascript
has title: Access function inside closures in javascript using event on html page?

http://stackoverflow.com/q/27205559
has title: angular- get ng-model name from scope var
score: 1
type: Question
upvote count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/15964278
has answer: http://stackoverflow.com/a/27205617
favorite count: 0
answer count: 3
has body: There is any way to do it? ng-model="{{att.myModel}}" I have an array named AllSmallText with items. I want to build form using ng-repeat on AllSmallText and put ng-model value to be myModel which is one of the item field. &lt;div ng-repeat="att in AllSmallText" class="col-xs-6 col-md-6"&gt; &lt;input class="form-control" name="firstname" placeholder="{{att.title}}" type="text" ng-model="{{att.myModel}}" required autofocus /&gt; &lt;/div&gt; thanks
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42894150
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34009937
has comment: http://stackoverflow.com/comment/42893756
has answer: http://stackoverflow.com/a/27207019
downvote count: 0

http://stackoverflow.com/q/27173256
possible better answer: http://stackoverflow.com/a/27174108
downvote count: 0
has answer: http://stackoverflow.com/a/27174108
favorite count: 0
has comment: http://stackoverflow.com/comment/42837279
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42837399
has answer: http://stackoverflow.com/a/27174175
tagged with: css
type: AnsweredQuestion
has title: Different colors for radio buttons
score: 1
accepted answer: http://stackoverflow.com/a/27174175
upvote count: 1
type: Question
tagged with: javascript
answer count: 2
has body: I want to style radion buttons this way: The code I have right now looks like this: input[type=radio] { display:none; } input[type=radio]:checked +label:before { background:green; width: 15px; height: 15px; border: 0; border-radius: 50%; } label { color:black; font-family:arial; font-size:12px; position:relative; padding-left:20px; } label:hover { color:green; } label:hover:before { border:1px solid green; border-radius: 50%; } label:before { content:''; height:13px; width:13px; border:1px solid lightgray; border-radius: 50%; display:inline-block; position:absolute; top:0; left:0; } and the HTML-code: Volle Subvention Subventionen um die Hälfte kürzen Keine Subventionen mehr Is it possible to add different classes for input[type=radio] and how can I fill a radio button only half? Here is a jsfiddle: http://jsfiddle.net/x5d4tyq7/
tagged with: radio-button

webgl
tags question: http://stackoverflow.com/q/27253995
tags question: http://stackoverflow.com/q/27267894
tags question: http://stackoverflow.com/q/27281065
tags question: http://stackoverflow.com/q/27264467
tags question: http://stackoverflow.com/q/27226067
tag name: webgl
type: Tag
tags question: http://stackoverflow.com/q/27217285
tags question: http://stackoverflow.com/q/27300900
tags question: http://stackoverflow.com/q/27220569
tags question: http://stackoverflow.com/q/27208715

http://stackoverflow.com/comment/44199203
type: QuestionComment
has text: https://www.exness.com/ now tag manager is off
type: Comment
comment on: http://stackoverflow.com/q/27294452
score: 0

http://stackoverflow.com/a/27915735
has body: this can be achieved by iterating over a list &lt;% HttpSession sec = request.getSession(); List&lt;String&gt; columnsList=(List&lt;String&gt;)sec.getAttribute("columnsList"); %&gt; &lt;script type="text/javascript"&gt; var jsArray = [&lt;%for (int i = 0; i &lt; columnsList.size(); i++) {%&gt;"&lt;%=columnsList.get(i)%&gt;"&lt;%=i + 1 &lt; columnsList.size() ? ",":""%&gt;&lt;%}%&gt;]; var fields={}; var arrayLength = jsArray.length; for(var i=0;i&lt;arrayLength;i++) { fields[jsArray[i]] = { title: jsArray[i], width: '40%', }; } $(document).ready(function() { $('#PersonTableContainer').jtable({ title : 'Table of people', paging : true, //Enable paging sorting: true, //Enable sorting defaultSorting: 'Name ASC', //Set default sorting pageSize : 10, //Set page size (default: 10) actions : { listAction : 'DATA?action=list' }, fields : fields }); //Load all records when page is first shown $('#PersonTableContainer').jtable('load'); }); &lt;/script&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/27170374
answers question: http://stackoverflow.com/q/27170374
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/27194109
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42873819
has comment: http://stackoverflow.com/comment/42874512
has comment: http://stackoverflow.com/comment/42874329
accepted answer of: http://stackoverflow.com/q/27193909
has comment: http://stackoverflow.com/comment/42874582
answers question: http://stackoverflow.com/q/27193909
has comment: http://stackoverflow.com/comment/42874111
has comment: http://stackoverflow.com/comment/42873726
has body: You could just modify this piece of css : .imgar:hover .delete, .imgar.selected .delete{ display: block; } Notice, I added the class selected so when you do the js event click add the class event to imgar like so : $('.imgar').addClass('selected'); And don't forget to remove the class when he click back to the element : $('.imgar').removeClass('selected'); EDIT JS $(document).ready(function() { $('.nav-toggle').click(function(){ var collapse_content_selector = $(this).attr('href'); var toggle_switch = $(this); $('.imgar').removeClass('selected'); // Remove the X before openning a second if($(collapse_content_selector).css('display')=='none'){ $('.bubble').hide(); } $(collapse_content_selector).toggle(function(){ if($(this).css('display')=='none'){ toggle_switch.parent().parent().removeClass('selected'); toggle_switch.html('x'); }else{ toggle_switch.parent().parent().addClass('selected'); toggle_switch.html('x'); } }); }); }); CSS .imgar:hover .delete, .imgar.selected .delete{ display: block; } Codepen http://codepen.io/SebastienBeaulieu/pen/RNPzzL
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42873897

http://stackoverflow.com/q/27257879
has answer: http://stackoverflow.com/a/27258933
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27258637
has body: I really like the way the DIVs fold/unfold from the top to the bottom then left to right when users click on the menu items (about, services, my tools, etc) on this website. Seems that it has been developed by a very talented person. Any idea how to achieve something like that? I was expecting this to be done via complex CSS animation, but looking at the CSS sheet that doesn't seem to be the case. Many thank
downvote count: 0
has comment: http://stackoverflow.com/comment/42989409
type: Question
accepted answer: http://stackoverflow.com/a/27257976
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27257976
upvote count: 2
has comment: http://stackoverflow.com/comment/42989513
has title: How to fold/unfold a DIV like on this website
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/27258933
tagged with: css

http://stackoverflow.com/comment/42943038
comment on: http://stackoverflow.com/q/27233171
score: 0
type: QuestionComment
type: Comment
has text: There's no such thing as `img.innerHTML`?

http://stackoverflow.com/q/27265542
has title: Wants to show the html tags as a string on the rails view with javascript
has comment: http://stackoverflow.com/comment/43002884
tagged with: javascript
tagged with: jquery
tagged with: ruby-on-rails-3
has comment: http://stackoverflow.com/comment/43004399
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43003007
has body: I am trying to display html tags as a string in google Map Marker click event, But it shows output as html tag convert into user controls. Ex- my_string = "< input type=text >Test String" Then it will display text field and then Test String. my_string = "< input type=text >Test String" for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { var s = unescape(escape(my_string)); infowindow.setContent(""+locations[i][0]+""+" " +"Title : "+s+" " +"Currency : "+locations[i][6]+" " +"Trade Amount : "+locations[i][7]+" " +"List Created by : "+locations[i][8]+"" ); infowindow.open(map, marker); } })(marker, i)); }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27268140
has comment: http://stackoverflow.com/comment/43002640
has comment: http://stackoverflow.com/comment/43003295
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/43003730
has answer: http://stackoverflow.com/a/27267381
type: Question
has comment: http://stackoverflow.com/comment/43004237
has comment: http://stackoverflow.com/comment/43003333
score: 0
answer count: 2

http://stackoverflow.com/q/27165948
favorite count: 0
has comment: http://stackoverflow.com/comment/42824569
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10240110
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/42837209
linked to: http://stackoverflow.com/q/476679
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27284345
has title: How to wait for images loaded with javascript?
type: Question
has answer: http://stackoverflow.com/a/27166127
has answer: http://stackoverflow.com/a/27169136
has answer: http://stackoverflow.com/a/27166035
score: 1
tagged with: image
linked to: http://stackoverflow.com/q/4774746
linked to: http://stackoverflow.com/q/8450068
has body: I have a div in which I am appending imgs. Images are loading with AJAX by 20 items. They are showing with jQuery animation. A problem that animation is retarding. I think that there are 2 problems: Images for showing are not downloaded and i want to display them now When I set css display: block to img, I get delay when browser painting image So the question is how to wait for pack of images (20 items) is downloaded and how to dispose of the painting delay? P/S. If I show empty divs (just set them background-color) or 1 image for all img-tags the animation works quickly.
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/8264528

http://stackoverflow.com/comment/42837359
has text: I got error of Cannot set property 'sound' of undefined in the last statment...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27173578
score: 0

http://stackoverflow.com/q/27267371
has comment: http://stackoverflow.com/comment/43052159
type: Question
has title: Problems in Safari using .css jQuery
has comment: http://stackoverflow.com/comment/43006129
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I've a problem when I try to change some color text with jQuery (only happend in Safari). My code is: $("#myDiv").css("color","#004a93"); $("#myDiv2").css("color","#004a93"); $("#myDiv3").css("color","#004a93"); This works in others like Chrome, Firefox, IE...but not in Safari. It's strange because his console not give me any error in JavaScript. Why can be the error? Edit: This is all my function code function changeBack(){ if ((id=="") || (isNaN(id))){ id='01'; } var nombre = "tarjeton-mediano-"; var ruta = "/imagenes/tarjetones/tarjeton-mediano-"+id+".png"; var codTarjeta = ""; var colorTexto = ""; $("#muestra-tarjeton-escogido").css("background-image","url('"+ruta+"')"); switch(id){ case '01': case '02': if (id=='01'){ codTarjeta="clasico"; colorTexto="rgb(126,106,63)"; }else{ codTarjeta="floral"; colorTexto="rgb(0,74,147)"; } $("#textomensaje").css({width:'500px',height:'120px',marginLeft:'25px',marginTop:'110px'}); $("#destinatariomsj").css("color","#004a93"); $("#textomsj").css("color","#004a93"); $("#nombremsj").css("color","#004a93"); break; case '03': $("#textomensaje").css({width:'320px',height:'140px',marginLeft:'25px',marginTop:'90px'}); break; case '04': case '05': $("#textomensaje").css({width:'500px',height:'120px',marginLeft:'25px',marginTop:'160px'}); break; } }
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/43005794
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43033183
has answer: http://stackoverflow.com/a/27293703
tagged with: safari
has comment: http://stackoverflow.com/comment/43005911
has comment: http://stackoverflow.com/comment/43005829

http://stackoverflow.com/q/27257762
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27258061
upvote count: 2
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27258061
has body: Right now I have a column chart that takes an array as data like [ ['name1', 23], ['name2', 46] ]. This works fine and the xAxis renders properly as long as you set xAxis: { type: 'category' }. But when I run chart.series.setData() (http://api.highcharts.com/highcharts#Series.setData) to change the dataset that I use, it doesn't take in the new xAxis values. It sets the xAxis from 0-x depending on how large the dataset is. I want it to be just like the first example, name1, name2 etc. You can see the problem in the fiddle when you click the "button" button. The axis doesn't change in this case even though the new dataset gets applied. http://jsfiddle.net/dkarkar/d555ak3v/ How do I use setData and also update the xAxis category names?
type: Question
tagged with: highcharts
downvote count: 0
tagged with: javascript
has title: Highcharts update xAxis category when calling series.setData

http://stackoverflow.com/comment/43057113
comment on: http://stackoverflow.com/a/27292315
type: AnswerComment
type: Comment
has text: http://stackoverflow.com/questions/20196442/parse-xmlhttprequest-responsetext-with-jquery
score: 0

http://stackoverflow.com/a/27551174
has body: Following the pull request sent by @hankduan, here is how have I used getMultiCapabilities() to combine different capabilities where one of them is a promise (needed for firefox-profile to be set): "use strict"; var FirefoxProfile = require("firefox-profile"); var q = require("q"); exports.config = { seleniumAddress: "http://127.0.0.1:4444/wd/hub", getMultiCapabilities: function() { var deferred = q.defer(); var multiCapabilities = [ { browserName: "chrome", specs: [ "footer.disabledCookies.spec.js" ], chromeOptions: { prefs: { "profile.default_content_settings.cookies": 2 } } }, { browserName: "chrome", specs: [ "*.spec.js" ], exclude: [ "footer.disabledCookies.spec.js", "footer.disabledJavascript.spec.js", "footer.disabledFlash.spec.js" ] }, { browserName: "chrome", specs: [ "footer.disabledFlash.spec.js" ], chromeOptions: { args: [ "--disable-internal-flash", "--disable-bundled-ppapi-flash", "--disable-plugins-discovery" ] } } ]; // Wait for a server to be ready or get capabilities asynchronously. setTimeout(function() { var firefoxProfile = new FirefoxProfile(); firefoxProfile.setPreference("javascript.enabled", false); firefoxProfile.encoded(function (encodedProfile) { var capabilities = { "browserName": "firefox", "firefox_profile": encodedProfile, "specs": [ "footer.disabledJavascript.spec.js" ] }; multiCapabilities.push(capabilities); deferred.resolve(multiCapabilities); }); }, 1000); return deferred.promise; }, ... }; Hope this would help somebody in the future.
has comment: http://stackoverflow.com/comment/43594802
downvote count: 0
answers question: http://stackoverflow.com/q/27264146
has comment: http://stackoverflow.com/comment/43577148
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/43112305
type: Comment
type: QuestionComment
has text: @Basj: re: node-webkit, it produces something that runs without installing nore-webkit itself on the endpoint. HTA is ready to ship for windows, and you can use FSO to read/write files, as long as the file has an <APPLICATION> tag. there's also chrome packaged apps and firefox apps. and cordova.
score: 1
comment on: http://stackoverflow.com/q/27177661

http://stackoverflow.com/comment/42883718
comment on: http://stackoverflow.com/a/27184331
type: Comment
has text: great it works now. But it does remove that `text/about.txt` but it also leaves the new line. How can I remove the new line including `text/about.txt`?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27214392
upvote count: 0
answer count: 1
tagged with: button
favorite count: 0
has body: I am making an app with Phonegap. Now I got buttons on my screen but nothing happens when I click them and my javascript code says it should go to another page. This is my javascript code, can anyone tell me what's wrong with it or how to make it work? *function loadScript() { // Wait for device to be ready loading everything //document.addEventListener('deviceready', onDeviceReady, false); onDeviceReady(); }; // When device is ready function onDeviceReady() { document.getElementById('nav1').addEventListener('mousedown', nav1Down, false); document.getElementById('nav1').addEventListener('mouseup', page1Show, false); document.getElementById('nav2').addEventListener('mousedown', nav2Down, false); document.getElementById('nav2').addEventListener('mouseup', page2Show, false); document.getElementById('nav3').addEventListener('mousedown', nav3Down, false); document.getElementById('nav3').addEventListener('mouseup', page3Show, false); }; // Add some GUI to the touch events function nav1Down() { document.getElementById('nav1').className='down'; }; function nav2Down() { document.getElementById('nav2').className='down'; }; function nav3Down() { document.getElementById('nav3').className='down'; }; // Activate the tabs function page1Show() { document.getElementById('page1').className='show'; document.getElementById('page2').className='hide'; document.getElementById('page3').className='hide'; document.getElementById('nav1').className='up'; }; function page2Show() { document.getElementById('page1').className='hide'; document.getElementById('page2').className='show'; document.getElementById('page3').className='hide'; document.getElementById('nav2').className='up'; }; function page3Show() { document.getElementById('page1').className='hide'; document.getElementById('page2').className='hide'; document.getElementById('page3').className='show'; document.getElementById('nav3').className='up'; }; $( document ).ready(function() { };*
type: UnansweredQuestion
tagged with: android
score: -1
tagged with: cordova
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27214678
tagged with: javascript
has comment: http://stackoverflow.com/comment/42909023
has title: How to make clickable buttons for Phonegap?

http://stackoverflow.com/q/27220747
has comment: http://stackoverflow.com/comment/42959061
has comment: http://stackoverflow.com/comment/42920630
has title: jquery .unload() only triggering for first page accessed in iframe
has comment: http://stackoverflow.com/comment/42920866
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27221747
has comment: http://stackoverflow.com/comment/42921684
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27242450
favorite count: 0
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/42934577
has body: I have parent.html with iframe. Source of iframe is child1.html which links to child2.html which links back to child1.html parent.html This is the parent child1.html This is child page 1 Go to child page 2 child2.html This is child page 2 Go to child page 1 I want the .unload() and the .load() to be triggered every time you navigate between child1.html and child2.html but currently only the .load() is triggered every time. The .unload() is only triggered on the child1.html page and is not triggered again for all subsequent navigations. Could someone please explain why .unload() is only triggered on the child1.html page show how to get .unload() triggered every time you navigate between child1.html and child2.html

http://stackoverflow.com/comment/42812756
type: QuestionComment
score: 0
has text: @trasiva thanks, i posted it as an answer. but I am still not sure how you exactly solved it, since i got no idea about asp.net - maybe choose Scott's answer, if it solves your problem.
comment on: http://stackoverflow.com/q/27159203
type: Comment

http://stackoverflow.com/q/27291434
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43048804
has answer: http://stackoverflow.com/a/27291750
has comment: http://stackoverflow.com/comment/43052975
has comment: http://stackoverflow.com/comment/43050283
has comment: http://stackoverflow.com/comment/43049015
has comment: http://stackoverflow.com/comment/43050543
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43049247
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43058974
has comment: http://stackoverflow.com/comment/43048816
type: Question
has comment: http://stackoverflow.com/comment/43052969
has comment: http://stackoverflow.com/comment/43049841
has comment: http://stackoverflow.com/comment/43056686
has comment: http://stackoverflow.com/comment/43056722
has comment: http://stackoverflow.com/comment/43049471
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43050156
possible better answer: http://stackoverflow.com/a/27291750
has body: I am creating a page where users can order reports as PDF. I have tried to create it using Angular. When the user changes a report type, this is correctly updated in the debug information present on the page. However, the request for a report is sent as JSON and I would prefer if this JSON object was updated automatically as well. As it is now, I have to click on the "Create JSON" button for it to be updated. This example can be seen over at JSFiddle as well: http://jsfiddle.net/HenricF/wgvd7wLx/2/ IMPORTANT The JSON object will not only include the report type, but also a lot of other options not shown here. These options include accounts, languages and dates and the JSON object should preferably be updated whenever anyone of these are changed. I am sorry for not mentioning this initially. HTML Select report type Select language Include headlines Selected report Name: {{name}} Code: {{code}} Language: {{chosenLanguage.code}} Include headlines: {{includeHeadlines}} JSON data {{pdfData}} JS var reportTypes = [{ name: 'Report type 1', code: 1 }, { name: 'Report type 2', code: 2 }, { name: 'Report type 3', code: 3 }]; var languages = [{ name: 'Swedish', code: 1053 }, { name: 'English', code: 1033 }]; var app = angular.module('OrderPageApp', []); app.controller('ReportController', function ($scope) { $scope.reports = reportTypes; $scope.languages = languages; $scope.setAccountTypes = function (chosenReport) { $scope.name = chosenReport.name; $scope.code = chosenReport.code; }; $scope.showJson = function () { $scope.pdfData = angular.toJson(new CreatePdfData($scope.name, $scope.chosenLanguage, $scope.includeHeadlines)); }; function CreatePdfData(reportType, chosenLanguage, includeHeadlines) { this.reportType = reportType; this.chosenLanguage = chosenLanguage.code; this.includeHeadlines = includeHeadlines; }; })
has comment: http://stackoverflow.com/comment/43057708
has title: How can I update this JSON object automatically using AngularJS?
has comment: http://stackoverflow.com/comment/43058094
has comment: http://stackoverflow.com/comment/43052947
has answer: http://stackoverflow.com/a/27310702
has comment: http://stackoverflow.com/comment/43057898
accepted answer: http://stackoverflow.com/a/27310702

http://stackoverflow.com/comment/43039321
score: 0
comment on: http://stackoverflow.com/q/27285711
type: Comment
has text: What is the output of `print_r($_FILES);` ?
type: QuestionComment

http://stackoverflow.com/comment/42970732
type: AnswerComment
has text: Thanks for your valuable response.I tried this but not working.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27247967

http://stackoverflow.com/comment/43079362
has text: *"some people say is that it's irresponsible because you risk altering it"* I wonder who those people are. I think in this case it's quite difficult to "accidentally" assign a property if all you want is *call* it.
comment on: http://stackoverflow.com/a/27307485
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27183139
answer count: 2
downvote count: 0
tagged with: javascript
has title: How to cause an IFrame link to open into a new window?
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27183343
tagged with: iframe
has answer: http://stackoverflow.com/a/27183487
has body: I have a website which is built using WP and uses SSL. On one of the page on my website, I have added an iframe call to another http website. Here is my iframe call: &lt;div class="embed-responsive embed-responsive-16by9"&gt; &lt;iframe src="//childwebsite.com/" target="_blank"&gt;&lt;/iframe&gt; &lt;/div&gt; The iframe is displayed properly. Now when you click on anything inside the iframe, Chrome displays a message saying Mixed Content: The page at 'https://parentwebsite.com' was loaded over HTTPS, but requested an insecure resource 'http://childwebsite.com'. This request has been blocked; the content must be served over HTTPS. What I am looking for is when a user clicks inside an iframe, open a new tab in the browser and let the user be redirected to a particular on the childwebsite. I tried adding target="_blank" to the iframe but it did not work. I added the following JS also but it did not work //pass the iframe to this iframe getting function function iframeRef( frameRef ) { return frameRef.contentWindow ? frameRef.contentWindow.document : frameRef.contentDocument } //Get Iframe var inside = iframeRef( document.getElementById('smugmugGallery') ); //Get all links var links = inside.getElementsByTagName('input'); //Loop throught links and set their attributes for (var i = 0 ; i&lt;links.length ; i++){ links[i].setAttribute('target','_blank'); } Any help will be appreciated.
score: 1
tagged with: wordpress
upvote count: 1
type: Question

http://stackoverflow.com/comment/42865440
type: Comment
type: QuestionComment
has text: show us the factory, and how you're accessing the factory in your directive
comment on: http://stackoverflow.com/q/27189440
score: 0

http://stackoverflow.com/comment/42839632
type: Comment
has text: Thanks again. var results was coming in as a string. going between my code and jsfiddle was excellent. I had my code wrapped in try/catch and "actual" data was a bit longer and didn't catch the fact that the incoming data has rowcount higher than actual elements in data. So try catch would fail out with my list never populated making me think the error was on element 1 when it was actually once it went outside of array bounds so to speak. USER ERROR Thanks again!
comment on: http://stackoverflow.com/a/27172965
score: 0
type: AnswerComment

http://stackoverflow.com/a/27249927
has body: you can still do it as per javascript aka. Super.prototype.foo.apply(this, args); So in a small example var Foo = new Class({ name: 'Foo', foo: function(){ console.log(this.name, '=&gt;foo'); }, baz: function(){ console.log('baz'); } }); var Bar = new Class({ Extends: Foo, name: 'Bar', foo: function(){ console.log(this.name, '=&gt;foo own'); this.parent(); }, bar: function(){ console.log(this.name, '=&gt;bar'); // less DRY and knowledge, apply to my instance this.$constructor.parent.prototype.foo.call(this); // without applying to my instance... as static: this.$constructor.parent.prototype.foo(); Foo.prototype.foo.apply(this); // normal JS way } }); var b = new Bar(); b.bar(); Not very nice. Unfortunately, it sucks. you can make this a mixin to call any method from upstream proto only rather than relying on proto chain... http://jsfiddle.net/dimitar/oraa1mgb/1/ var Super = new Class({ Super: function(method){ var superMethod = this.$constructor.parent.prototype[method], args = Array.prototype.slice.call(arguments, 1); if (!superMethod){ console.log('No ' + method + ' found or no parent proto'); return this; } else { return superMethod.apply(this, args); } } }); via Implements: [Super] and then this.Super('foo', arg1, arg2). you can make it return this[method](args) if it can't find it on the parent. this may not scale for multiple extended classes, it has no way of knowing which parent you really mean - resolution flow should be natural. also, if you extend a class and override a method but still need the original from other methods, perhaps you are doing the wrong thing whilst creating a possible violation of LSP. I'd refactor to indicate the difference between my.bar vs parent.bar, eg, my.barClub vs my.bar or parent.bar, has semantic meaning that is clear to understand and maintain. your local methods will know of the existance of bar and barClub whereas the parent will only care about a "normal" bar. you can determine which to call via conditions from within you…
accepted answer of: http://stackoverflow.com/q/27248406
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42975950
answers question: http://stackoverflow.com/q/27248406

http://stackoverflow.com/comment/42877260
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27196064
has text: Joshua, SO is not a code outsourcing site nor is it a "I don't know what I am doing so just tell me site". Instead you should learn the basics through research, classes, or peers and then share with us your existing code and where in that code you are stuck.
score: 0

http://stackoverflow.com/comment/42843704
comment on: http://stackoverflow.com/q/27177095
has text: I think the related answer was on the right track. You could modify it slightly so it's something like `if (this.tagName !== "A" && this.nodeType === 3) { $(this).wrap(' ') };` and see if that helps. Also the example was missing a closing brace, not sure if that affects anything. A gist or fiddle also helps if all else fails
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42888255
type: Comment
has text: @user783322 My answer works, which if you "Run code snippet", you will see that it does what you expect it to do. [Here is your working fiddle](http://jsfiddle.net/t1nm4Lf2/5/) which *also* works once I updated it to use the correct script source for qtip.
comment on: http://stackoverflow.com/a/27196379
type: AnswerComment
score: 0

http://stackoverflow.com/q/27222398
has body: How do you access the key-value of a key value pair in javascript? The function ruleList is suppose to create an array that stores the string values for each localizedRuleNames in ruleResults? I can create an array that contains localizedRuleNames. But how do I get the string value associated with localizedRuleNames? // Iterate through the localizedRuleNames in ruleResults and // return an array of their strings. function ruleList(results) { // Your code goes here! ruleArray = []; for (var i in psinsights.formattedResults.ruleResults){ //console.log(i); for (var j in psinsights.formattedResults.ruleResults[i]){ // console.log(j); ruleArray.push(j); } } console.log(ruleArray); return ruleArray; } // Iterate through pageStats in the ps` iResults object and // return the total number of bytes to load the website. function totalBytes(results) { // Your code goes here! } // Below, you'll find a sample PS Insights JSON // and two console.log statements to help you test your code! psinsights = { "kind": "pagespeedonline#result", "id": "/speed/pagespeed", "responseCode": 200, "title": "PageSpeed Home", "score": 90, "pageStats": { "numberResources": 22, "numberHosts": 7, "totalRequestBytes": "2761", "numberStaticResources": 16, "htmlResponseBytes": "91981", "cssResponseBytes": "37728", "imageResponseBytes": "13909", "javascriptResponseBytes": "247214", "otherResponseBytes": "8804", "numberJsResources": 6, "numberCssResources": 2 }, "formattedResults": { "locale": "en_US", "ruleResults": { "AvoidBadRequests": { "localizedRuleName": "Avoid bad requests", "ruleImpact": 0.0 }, "MinifyJavaScript": { "localizedRuleName": "Minify JavaScript", "ruleImpact": 0.1417, "urlBlocks": [ { "header": { "format": "Minifying the following JavaScript resources could reduce their size by $1 ($2% reduction).", "args": [ { "type": "BYTES", "value": "1.3KiB" }, { "type": "INT_LITERAL", "value": "0" } ] }, "urls": [ { "result": { "format": "Minifying $1 could save $2 ($3% reduction).", "args": [ { "…
type: Question
has title: Accessing Key in Key/Value pair Javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/27222554
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42923599
has comment: http://stackoverflow.com/comment/42923544
possible better answer: http://stackoverflow.com/a/36993984
accepted answer: http://stackoverflow.com/a/27222554
has answer: http://stackoverflow.com/a/36993984
type: AnsweredQuestion

http://stackoverflow.com/comment/43170679
has text: @MarkusHallcyon - We can chat further here: https://chat.stackoverflow.com/rooms/66405/howards-invite-only-programming-discussions I don't have discussions outside of StackOverflow.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27304031

http://stackoverflow.com/a/27261454
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42995911
has comment: http://stackoverflow.com/comment/42995956
downvote count: 0
has comment: http://stackoverflow.com/comment/42995915
has body: Use a number field. &lt;input type="number" min="1" max="15" step="1"&gt;
answers question: http://stackoverflow.com/q/27261252

http://stackoverflow.com/q/27187043
tagged with: istanbul
tagged with: javascript
has answer: http://stackoverflow.com/a/27461056
has title: Jasmine + Istanbul coverage not working
has answer: http://stackoverflow.com/a/27188948
type: AnsweredQuestion
tagged with: jasmine
has body: I'm working on lite javascript framework and my coverage statements can't reach up to 10% even though I'm sure when I'm doing my specs almost all of my functions are called. If someone has an idea on what I'm doing wrong, I will be glad to hear it. My project build: https://travis-ci.org/devoralive/doa My project repository: https://github.com/devoralive/doa My specs with jasmine: https://github.com/devoralive/doa/tree/master/specs/doa And the sources: https://github.com/devoralive/doa/tree/master/src/doa
possible better answer: http://stackoverflow.com/a/27188948
type: Question
accepted answer: http://stackoverflow.com/a/27461056
tagged with: code-coverage
score: 0
answer count: 2

http://stackoverflow.com/a/27294401
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27294291
has body: As per my understanding you want to render output on front side.. if you have small data to show on front side then you can render all data at once on front and you can do show hide data based on user selection. so it will be fast for user experience. But if you have large data to render on front, then it will be good if you pull particular data based on user selection at same time..(innerhtml)..
answers question: http://stackoverflow.com/q/27294291
score: 1

http://stackoverflow.com/q/27269708
tagged with: jquery
has answer: http://stackoverflow.com/a/27270031
has answer: http://stackoverflow.com/a/27269992
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43009825
accepted answer: http://stackoverflow.com/a/27269937
score: 0
upvote count: 1
downvote count: 1
tagged with: javascript
answer count: 5
possible better answer: http://stackoverflow.com/a/27269945
has answer: http://stackoverflow.com/a/27269945
has answer: http://stackoverflow.com/a/27270091
type: AnsweredQuestion
has title: How to enable textbox in a particular row?
has answer: http://stackoverflow.com/a/27269937
has body: i am trying to enable a textbox by clicking on the corresponding button but i click any button it always enables the first textbox , i dont want to use 'id' here <%@page contentType="text/html" pageEncoding="UTF-8"%> is there any method where i could use the row index function ?
tagged with: jsp

http://stackoverflow.com/a/27301436
has comment: http://stackoverflow.com/comment/43066524
has comment: http://stackoverflow.com/comment/43066626
has comment: http://stackoverflow.com/comment/43066681
has comment: http://stackoverflow.com/comment/43066539
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27301357
has comment: http://stackoverflow.com/comment/43066465
type: Answer
has body: You are trying to bind your event to an element that doesn't exist. You can either use event delegation on a parent element of the nav button using event delegation syntax: $('parent-element').on('click','#mobile-nav-button', function(){ .... Or you have to bind your events after you have added those elements to the DOM.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27301357
score: 2

http://stackoverflow.com/comment/43036018
type: Comment
comment on: http://stackoverflow.com/q/27283896
has text: @ochi I was about to say the same thing. It's difficult to provide better guidance based on the code that's currently posted.
score: 0
type: QuestionComment

http://stackoverflow.com/a/27185652
has comment: http://stackoverflow.com/comment/42858534
has comment: http://stackoverflow.com/comment/42858471
has comment: http://stackoverflow.com/comment/42859349
has comment: http://stackoverflow.com/comment/42866459
has comment: http://stackoverflow.com/comment/42858447
has comment: http://stackoverflow.com/comment/42864669
has comment: http://stackoverflow.com/comment/42859921
type: AcceptedAnswer
has body: You have given the ahref link to calsswall.php page that's why you goes to other page. change echo "DELETE POST&nbsp&nbsp&nbsp"; to echo "DELETE POST&nbsp&nbsp&nbsp";
score: 0
has comment: http://stackoverflow.com/comment/42858898
accepted answer of: http://stackoverflow.com/q/27185595
has comment: http://stackoverflow.com/comment/42858849
has comment: http://stackoverflow.com/comment/42869236
answers question: http://stackoverflow.com/q/27185595
has comment: http://stackoverflow.com/comment/42858375
type: Answer

http://stackoverflow.com/a/27284090
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27282436
answers question: http://stackoverflow.com/q/27282436
has body: Please find enclosed a working demo of a popover that will be updated with the response from an ajax request. I've removed your request parameters just for the demo to be able to do the request with mocky.io. The trick was to use .attr('value', text) instead of .val(text). I'm not exactly sure what's going on here. Maybe someone can explain why that's different. But with attr it changes the popover and it works. Another thing that is required is to recreate the popover. I also wanted to destroy the first popover but that doesn't work. So I created the same popover again. You can also find the same code here at jsFiddle. There is a bug in the code here at SO. If you get the data from the server and then close the popover, the data will be reset to initial value. Don't know what's wrong, because it works at jsFiddle with-out that bug. Update 04.12.2014: I've improved the code a bit. Now there is a close button in the popover and the data is stored so the data from server is still available when the popover is re-opened. The bug mentioned above was probably not a SO issue, it was because the data from server was not properly stored. That is also fixed now. I've also removed some not needed script tags in the demo because tooltip and popover are already included in bootstrap 3. Update 05.12.2014: I have another improvement to the code. The line $(this).parent().find('.close').click(...) is not working like I wanted it. I wanted to add the handler only to the close button of the current popover. But it adds it to all elements with class .close. Because $(this).parent() is the body element. I think it is better to do it like this: var current_popover = '#' + $(e.target).attr('aria-describedby'); var $cur_pop = $(current_popover); $cur_pop.find('.close').click({}); With aria-describedby you'll get the id of the current popover and then you can find the close button of that popover. $(function () { var editData = 'new value'; var doPopover = function (item, text) { $('#name…

http://stackoverflow.com/q/27245040
tagged with: javascript
tagged with: dom-events
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/27245195
accepted answer: http://stackoverflow.com/a/27245195
has body: I want to pass over parameters in the click function. var albums = document.getElementsByClassName("album"); for(var i = 0; i<albums.length; i++){ document.getElementById(albums[i].id).addEventListener("click", goAlbum(albums[i].id), false); } However, the function goAlbum gets executed when it is created, and then the function won't execute anymore. What am I doing wrong?
downvote count: 0
type: Question
type: AnsweredQuestion
has title: addEventListener click executed before clicked
score: 5
tagged with: addeventlistener
answer count: 1

http://stackoverflow.com/q/27305647
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43074183
type: UnansweredQuestion
tagged with: php
has title: How to disable all form fields except buttons using javascript
has answer: http://stackoverflow.com/a/27305781
has body: I am new to web designing using PHP and java script. I have "Clear", "View", "Edit", "Save" buttons in my form in addition to 50 input fields. On giving the key fields value and clicking "View" I want to retrieve that record from DB and display it and make all fields "Display only". On clicking "Edit", all fields can be made Editable. Kindly help me with suggestions for this. I used the below function on the Onclick event of the "View" button function DisableFields() { var form = document.getElementById(form id); var elements = form.elements; for (var i = 0, len = elements.length; i &lt; len; ++i) { if (elements[i].type != 'submit') { elements[i].disabled = true; } } } What is happening is, the fields are getting non editable and immediately changes back to Editable fields. If I disable all the buttons as well, then it is fully being disabled.
type: Question
score: 0

http://stackoverflow.com/comment/42832717
comment on: http://stackoverflow.com/a/27169697
score: 1
has text: There are two versions. One's an OSGi plugin, like the Extension Library. You will need to enable the library in Xsp Properties though, because there isn't a component to drop onto the page. The other is files to go into each NSF. Personally, I'd recommend the former - it's best practice. The documentation should be clear enough, but if not, let me know.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27276981
has comment: http://stackoverflow.com/comment/43023003
has answer: http://stackoverflow.com/a/27277020
has body: I know I can do something like: $(function() { $( ".className" ).draggable(); }); If I want to make the class className draggable, but how about making all elements inside the page draggable ?
has answer: http://stackoverflow.com/a/27277026
tagged with: dom
has answer: http://stackoverflow.com/a/27277016
type: Question
tagged with: javascript
tagged with: jquery
has title: Make all dom elements movable
score: 0
answer count: 3
tagged with: jquery-ui-draggable
has comment: http://stackoverflow.com/comment/43022876
has comment: http://stackoverflow.com/comment/43023131
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43022949

http://stackoverflow.com/q/27294526
linked to: http://stackoverflow.com/q/5972958
answer count: 0
has comment: http://stackoverflow.com/comment/43055108
type: Question
has comment: http://stackoverflow.com/comment/43054080
has body: I have seen your this quetion. http://stackoverflow.com/questions/5972958/implementing-jquery-ui-autocomplete-to-show-suggestions-when-you-type and see answers comment but I want to modify the display of selected element. If I want to set remove button means cross mark on selected Item then from where I have to change code? like if by mistake I select "PHP" then want cross icon on each selected elemt. I have seen this example : http://jsfiddle.net/5xbhY/ please reply me @Andrew Whitaker your answer and help are awesome... thanks in advance.
tagged with: autocomplete
has title: modification in @mention autocomplete
tagged with: javascript
score: 0
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/42979195
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27252603
has text: It didn't worked for me, I'm already tried that. This is not a good approach for my code. I won't be able to use them in functions etc.. So that's why I'm refactoring my code.
type: AnswerComment

http://stackoverflow.com/a/27274624
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43020867
has comment: http://stackoverflow.com/comment/43021765
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27273587
has body: A quick implemenation could be the following: ko.obsgroup = function() { var groupManager = {}; var observables = []; var throttle = 0; var throttleTimeout; for(var i = 0; i &lt; arguments.length; i++) { observables.push(arguments[i]); } groupManager.throttle = function(duration) { throttle = duration; return groupManager; }; groupManager.subscribe = function(handler) { function throttledHandler(val) { if(throttle &gt; 0) { if(!throttleTimeout) { throttleTimeout = setTimeout(function() { throttleTimeout = undefined; handler(val); }, throttle); } } else { handler(val); } } for(var i = 0; i &lt; arguments.length; i++) { observables[i].subscribe(throttledHandler); } return groupManager; }; return groupManager; }; Usage: var vm = { v1: ko.observable(0), v2: ko.observable(0), v3: ko.observable(0), log: ko.observable(0) }; ko.obsgroup(vm.v1, vm.v2, vm.v3) .throttle(1000) .subscribe(function(val) { vm.log('changed: ' + Date.now()); }); ko.applyBindings(vm); # Demo: JSFiddle
answers question: http://stackoverflow.com/q/27273587

http://stackoverflow.com/q/27292068
has body: Whenever I am trying to use the Google Maps API places library it gives me this error in the console of my browser: TypeError: autocomplete is undefined If I'm not mistaken, that means the places library couldn't load. As for the code, I had my own code but I also copypasted the code from the Places API tutorial(https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform). In my header I have these two lines included: I also made sure Placis API, Google Maps JavaScript API v3 and Google Maps Geolocation API are all switched on in my Google APIs console. I am not really sure what the problem is, besides the places library not loading. I should note I am working on a hidden subdomain, could that be the problem? Thanks in Advance.
tagged with: javascript
tagged with: google-maps-api-3
answer count: 1
tagged with: google-places-api
type: UnansweredQuestion
has title: Google Maps Places API: TypeError: autocomplete is undefined
has comment: http://stackoverflow.com/comment/43057828
score: 0
has answer: http://stackoverflow.com/a/27294423
type: Question
tagged with: google-maps

http://stackoverflow.com/q/27258989
downvote count: 0
has answer: http://stackoverflow.com/a/45804084
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27259101
favorite count: 0
has answer: http://stackoverflow.com/a/27259137
has comment: http://stackoverflow.com/comment/42991537
tagged with: http://stackoverflow.com/tag/html
has title: Passing a PHP variable as a parameter using HTML onClick
answer count: 4
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1947263
tagged with: onclick
upvote count: 2
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/27259020
has answer: http://stackoverflow.com/a/27259101
accepted answer: http://stackoverflow.com/a/27259020
has comment: http://stackoverflow.com/comment/42991406
has body: I looked through many similar examples, but I could not make this work. So, I have this: echo(' Track It! '); That code is inside a for, so the variable $name will be different depending where I am at. I am not trying to make things complicates, so first, I am just trying to pass that parameter to the function trackIt (I actually need to pass 2 of them.) Then, I have a simple script (just to see if it will work): However, it does not work. If my onClick function is just onClick="trackIt()", then it works fine and I can alert "Hi!" by removing the parameter. Thanks for the help! =]

http://stackoverflow.com/q/27291607
downvote count: 0
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/27291780
has body: I've read several posts similar questions as this one, but none of them worked for me. There are two divs, one is the parent of the other: "Son" has event handlers for mousedown, mousemove and mouseup. "Parent" has an event handler for click. "Parent" is bigger than "son". Requirements: One has to be able to mousedown-mousemove-mouseup inside "son". [OK] One has to be able to click "parent". [OK] But, if somebody drags the mouse out of "son" and releases it, "parent"'s click handler fires. Is there any way to avoid it? Should I change my layout? http://jsfiddle.net/g3qzkz74/17/ (Please, pure JavaScript!)
tagged with: javascript
upvote count: 2
answer count: 1
tagged with: dom-events
favorite count: 0
has title: Cancel click on parent when mousedown on child
accepted answer: http://stackoverflow.com/a/27291780
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/27155220
score: 0
answers question: http://stackoverflow.com/q/27155138
type: Answer
has body: randomnumber == 1 | 5 is not the same as randomnumber == 1 || randomnumber == 5 | is a bitwise operator and so your expession is evaluating to something like false | 5 which is cast to 0 | 5 which is just 5 which is truthy and so it enters that first if block.

http://stackoverflow.com/comment/43077365
has text: Hi guys where should i add the above code? there seems to be no link href specified in the original source the code that i'm trying to copy and paste into was from simple-fade-slideshow.source.html the slide won't start up
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27292454

setinterval
tags question: http://stackoverflow.com/q/27285766
tags question: http://stackoverflow.com/q/27160501
tag name: setinterval
tags question: http://stackoverflow.com/q/27240524
type: Tag
tags question: http://stackoverflow.com/q/27237115

http://stackoverflow.com/q/27173227
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42837838
has answer: http://stackoverflow.com/a/27173637
has comment: http://stackoverflow.com/comment/42836951
accepted answer: http://stackoverflow.com/a/27173729
has comment: http://stackoverflow.com/comment/42836684
downvote count: 1
type: Question
upvote count: 4
has body: I'm trying to figure out, how to create a javascript array of names of ie. last 7 days starting from today. I know getDay() will return a number of the day, which I can then use as an index to access an element of an array containing days of the week. This will give me the name of today, but I need to go back chronologically to create an array of last few days I couldn't find anything similar to this problem on web. Any elegant solution for this? jQuery perhaps?
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27173972
linked to: http://stackoverflow.com/q/9501596
answer count: 3
has comment: http://stackoverflow.com/comment/42836660
possible better answer: http://stackoverflow.com/a/27173972
has comment: http://stackoverflow.com/comment/42836622
favorite count: 0
has answer: http://stackoverflow.com/a/27173729
has title: Create an Array of names of last 7 days starting from today - javascript

http://stackoverflow.com/comment/42949928
type: QuestionComment
type: Comment
score: 1
has text: I didn't even know that existed! That will be much more efficient than storing a reference to the object in every module. Thanks for teaching *me* something today :)
comment on: http://stackoverflow.com/q/27236542

http://stackoverflow.com/q/27290090
score: 2
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jwplayer6
has title: Jwplayer I cant play vast tags in my desktop
favorite count: 0
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/43061513
has body: Was trying to implement vast tag in my JWplayer. Have checked the vast tag in online validator its workign fine. But I cant able to view the ads in my video. Have given the code please help me.. Have I missed anything. or Is I need to buy any licence to play ad tags in Jwplayer. jwplayer("player").setup({ file: "rtmp://stream.metamorphosis.tv:1935/videos/_definst_/mp4:octv.mp4", width:"100%", aspectratio: "4:3", image: "http://cdn.metamorphosis.tv/osp/hls/OCTVNewsWaterfrontRestaurantHyattRegencyTrinidad/poster/poster.jpg", primary: 'flash', advertising: { client: "vast", tag: "http://demo.tremorvideo.com/proddev/vast/vast2RegularLinear.xml" } });

http://stackoverflow.com/a/27280086
answers question: http://stackoverflow.com/q/27279758
has body: You should simply remove the zero index from the filtered result; var obj = array.filter(function ( obj ) { return obj.name === name; }); //now obj has all the filtered items "The filter() method creates a new array with all elements that pass the test implemented by the provided function." MDN Docs But if you want to append/concatenate filetered results to another existing array then you are looking for the .concat function obj.concat(array.filter(function ( obj ) { return obj.name === name; })); //obj is an existing array
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27279758
downvote count: 0

http://stackoverflow.com/q/27289851
has title: How can I give my arrow direction and arrow color in asp.net coolgrid based on information from database?
has answer: http://stackoverflow.com/a/27290685
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/43046671
score: -4
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/43046489
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27290685
has body: The arrow colour is given in the database field - "OverallStatusCd" and the arrow background colour is given in the database field- "OverallTrendCd". CSS is written for arrows and background colour. We can access these things using the code below by changing 'up', 'down', 'right', 'left' and colour is changed by changing 'green', 'red' span id="sptrend" runat="server" class="arrow arrow-up-icon arrowgreen">/span How can I use this dynamically based on the information from the database? "OverallTrendCd" is giving 'R' for RED, 'Y' for YELLOW "OverallStatusCd" is giving values 'Up', 'Down', etc...
answer count: 1
downvote count: 5
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27171929
has comment: http://stackoverflow.com/comment/42834477
has comment: http://stackoverflow.com/comment/42834739
answers question: http://stackoverflow.com/q/27171562
score: 0
type: Answer
has body: I'm not sure exactly how your slider works but what I would do is when the image you want to magnify is active/under the 'magnifying glass' then add a CSS class to it to scale it using CSS. i.e. .image { transition: all .2s ease-in-out; } .image-active { transform: scale(1.5); }

datetimepicker
type: Tag
tag name: datetimepicker
tags question: http://stackoverflow.com/q/27252458

facebook-graph-api
tags question: http://stackoverflow.com/q/27259471
tag name: facebook-graph-api
tags question: http://stackoverflow.com/q/27297519
tags question: http://stackoverflow.com/q/27189029
tags question: http://stackoverflow.com/q/27288201
tags question: http://stackoverflow.com/q/27275337
tags question: http://stackoverflow.com/q/27163195
tags question: http://stackoverflow.com/q/27232629
tags question: http://stackoverflow.com/q/27156701
tags question: http://stackoverflow.com/q/27237110
tags question: http://stackoverflow.com/q/27204336
tags question: http://stackoverflow.com/q/27253564
type: Tag

http://stackoverflow.com/comment/43083309
type: QuestionComment
comment on: http://stackoverflow.com/q/27311221
type: Comment
has text: What is :%f means ? I know about %L...
score: 1

http://stackoverflow.com/a/27220271
downvote count: 0
score: 1
upvote count: 1
type: Answer
has body: To expand on what user2943490 correctly pointed out, if you wanted that alert() to work, simply move it into the success callback.
answers question: http://stackoverflow.com/q/27186990

http://stackoverflow.com/comment/102981164
score: 1
comment on: http://stackoverflow.com/a/54856004
type: AnswerComment
type: Comment
has text: Great solution. But don't mind to move creating `AudioContext` and `play` action inside `onclick` (famous Apple policy). Otherwise you get silence. Checked on iOS 12.4.1 / iphone7 / chrome77.

linker-errors
tags question: http://stackoverflow.com/q/27300163
type: Tag
tag name: linker-errors

http://stackoverflow.com/q/27288818
has answer: http://stackoverflow.com/a/39497830
score: 0
has comment: http://stackoverflow.com/comment/43127613
has body: I have developed Java web application with javascripts, jsp/servlets which works well with IE8 but when tested on IE11 many of the functionalities not working for eg:- &lt;input type="submit" value="Login" onclick="javascript:return foo()"&gt; is not passing the Button value to next page which I'm submitting through another javascript method. Lot other problems. Do we have any process to change the code to make it compatible with IE11 other than, Adding the host name in IE11 'Compatibility View Setting'. Please help.
type: UnansweredQuestion
has title: Web Application migration from IE8 to IE11
has comment: http://stackoverflow.com/comment/43044254
has comment: http://stackoverflow.com/comment/43068909
tagged with: internet-explorer-11
has comment: http://stackoverflow.com/comment/43044448
type: Question
answer count: 1
tagged with: jsp
tagged with: javascript

http://stackoverflow.com/comment/42959669
comment on: http://stackoverflow.com/a/27241669
type: AnswerComment
has text: Despite my views on the homework screaming issue, your answer is incomplete. It answers 1/3 of the questions. That's my reason.
score: 0
type: Comment

http://stackoverflow.com/q/27222681
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42924092
has title: Image transition (?) in CSS/HTML
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42924374
tagged with: css
has body: I am trying to get my image to grow, fade and have text come up from the bottom. Is there any way to do this? I have tried variations of ".grow:hover" but it is not working for me. I have been trying to get my images (which are in the bottom-sidebar divider) to do it. An example I found but have not been able to duplicate can be found here Here's my HTML and CSS. /* =========================== ======= Body style ======== =========================== */ body { background-image: url('images/image.png'); color: #000305; font-size: 87.5%; /* Base font size: 14px */ font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; line-height: 1.429; margin: 0; padding: 0; text-align: left; } .body { clear: both; margin: 0 auto; width: 70%; } /* =========================== ========= Headings ======== =========================== */ h1 { font-size: 2.5em } h2 { font-size: 1.571em } /* 22px */ h3 { font-size: 1.429em } /* 20px */ h4 { font-size: 1.286em } /* 18px */ h5 { font-size: 1.143em } /* 16px */ h6 { font-size: 0.95em } /* 14px */ h1, h2, h3, h4, h5, h6 { font-weight: 400; line-height: 1.1; margin-bottom: .8em; } /* =========================== ======= Anchor style ====== =========================== */ body { background-image: url('images/image.png'); color: #000305; font-size: 87.5%; /* Base font size: 14px */ font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; line-height: 1.429; margin: 0; padding: 0; text-align: left; } a { outline: 0; } a img { border: 0px; text-decoration: none; } a:link, a:visited { color: #CF5C3F; padding: 0 1px; text-decoration: none; } .mainHeader nav { background: #666; font-size: 1.143em; height: 40px; line-height: 30px; margin: 0 auto; text-align: center; border-radius: 20px; margin-left: -40px; } .mainHeader nav ul { list-style: none; margin: 0 auto; width: 430px; } .mainHeader nav ul li { display: inline-block; vertical-align: to…
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42924430
has comment: http://stackoverflow.com/comment/42924488
has answer: http://stackoverflow.com/a/27223263
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27223263
type: Question
tagged with: css-animations
has comment: http://stackoverflow.com/comment/42924188

d3.js
tags question: http://stackoverflow.com/q/27306809
tags question: http://stackoverflow.com/q/27295889
tags question: http://stackoverflow.com/q/27200897
tags question: http://stackoverflow.com/q/27306092
tags question: http://stackoverflow.com/q/27206462
tags question: http://stackoverflow.com/q/27241216
tags question: http://stackoverflow.com/q/27222594
tags question: http://stackoverflow.com/q/27227976
tags question: http://stackoverflow.com/q/27223452
tags question: http://stackoverflow.com/q/27204907
tags question: http://stackoverflow.com/q/27283610
tags question: http://stackoverflow.com/q/27159678
tags question: http://stackoverflow.com/q/27177755
tags question: http://stackoverflow.com/q/27223096
tags question: http://stackoverflow.com/q/27177193
tags question: http://stackoverflow.com/q/27226719
tags question: http://stackoverflow.com/q/27170752
tags question: http://stackoverflow.com/q/27299716
tags question: http://stackoverflow.com/q/27303427
tags question: http://stackoverflow.com/q/27273391
tags question: http://stackoverflow.com/q/27239811
tags question: http://stackoverflow.com/q/27208589
tags question: http://stackoverflow.com/q/27220235
tags question: http://stackoverflow.com/q/27309503
tags question: http://stackoverflow.com/q/27281117
tags question: http://stackoverflow.com/q/27307664
tags question: http://stackoverflow.com/q/27235768
tags question: http://stackoverflow.com/q/27169656
tags question: http://stackoverflow.com/q/27153015
tags question: http://stackoverflow.com/q/27187909
tags question: http://stackoverflow.com/q/27203129
tags question: http://stackoverflow.com/q/27158094
tags question: http://stackoverflow.com/q/27262839
tags question: http://stackoverflow.com/q/27168875
type: Tag
tags question: http://stackoverflow.com/q/27154653
tags question: http://stackoverflow.com/q/27239737
tags question: http://stackoverflow.com/q/27187641
tags question: http://stackoverflow.com/q/27177348
tags question: http://stackoverflow.com/q/27278558
tags question: http://stackoverflow.com/q/27160061
tags question: http://stackoverflow.com/q/27173986
tags question: http://stackoverflow.com/q/27284421
tags question: http://stackoverflow.com/q/27220361
tags question: http://stackoverflow.com/q/27302381
tags question: http://stackoverflow.com/q/27218537
tags question: http://stackoverflow.com/q/27257905
tags question: http://stackoverflow.com/q/27291447
tags question: http://stackoverflow.com/q/27219341
tags question: http://stackoverflow.com/q/27307635
tags question: http://stackoverflow.com/q/27250053
tags question: http://stackoverflow.com/q/27191465
tags question: http://stackoverflow.com/q/27234667
tags question: http://stackoverflow.com/q/27154503
tags question: http://stackoverflow.com/q/27250799
tags question: http://stackoverflow.com/q/27263831
tags question: http://stackoverflow.com/q/27169375
tags question: http://stackoverflow.com/q/27313345
tags question: http://stackoverflow.com/q/27228656
tag name: d3.js
tags question: http://stackoverflow.com/q/27221675
tags question: http://stackoverflow.com/q/27209369
tags question: http://stackoverflow.com/q/27302889
tags question: http://stackoverflow.com/q/27184654
tags question: http://stackoverflow.com/q/27215394
tags question: http://stackoverflow.com/q/27177942
tags question: http://stackoverflow.com/q/27232971
tags question: http://stackoverflow.com/q/27192439
tags question: http://stackoverflow.com/q/27263330
tags question: http://stackoverflow.com/q/27226204
tags question: http://stackoverflow.com/q/27251020
tags question: http://stackoverflow.com/q/27290587
tags question: http://stackoverflow.com/q/27254995
tags question: http://stackoverflow.com/q/27161441
tags question: http://stackoverflow.com/q/27210475
tags question: http://stackoverflow.com/q/27274694
tags question: http://stackoverflow.com/q/27239669
tags question: http://stackoverflow.com/q/27299086
tags question: http://stackoverflow.com/q/27220816

http://stackoverflow.com/comment/42833767
score: 1
has text: Pass event object as a parameter to handler function. It will allow you to determine which element triggered the event and then apply switch behaviour only to clicked one.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27171494

http://stackoverflow.com/comment/42853127
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27182642
has text: For simple routes its already working. I want to make it work for complex and sub routes.

http://stackoverflow.com/q/27258767
score: 0
has title: Javascript-Generated Submit Button Not POSTing in Firefox
tagged with: firefox
answer count: 1
has answer: http://stackoverflow.com/a/27258819
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42991300
tagged with: http://stackoverflow.com/tag/html
has body: I have seen similar posts related to this question but none have proven useful. I have a several javascript-generated submit buttons for a form. PHP sets certain parameters for functions depending on which button is pushed. The problem is that the submit buttons do not get added to the POST array AT ALL if they are generated by javascript; If I put submit buttons directly into the view they work just fine. This is only a problem in Firefox NOTE: this is not a problem with the form actually submitting - just that the name=>value of the submit button is not being passed to POST. $('#my-total-dial').highcharts(Highcharts.merge(gaugeOptions, { yAxis: { min: 0, max: myTotalRecords, title: { text: 'All Time' } }, credits: { enabled: false }, series: [{ name: 'All', data: [myTotalRecords], dataLabels: { format: ' {y} ' + ' ' }, tooltip: { valueSuffix: ' records' } }] })); In Chrome, this is what is spit out by POST: array(3) { ["_token"]=> string(40) "XB16S144KnTue3ER6x4H8mdQO1rwxGP6BmAciYvK" ["my-total-records-view"]=> string(6) "Submit" ["user_name"]=> string(1) "1" } And this is what I get in Firefox array(2) { ["_token"]=> string(40) "UTKWISXMNvUfGjfFxxya8ojYXSgGc8dS5kUS5Hck" ["user_name"]=> string(1) "1" }
tagged with: php
has comment: http://stackoverflow.com/comment/42992233
type: Question
has comment: http://stackoverflow.com/comment/42993419
tagged with: javascript
tagged with: forms

http://stackoverflow.com/a/27257895
answers question: http://stackoverflow.com/q/27255901
type: Answer
downvote count: 1
has body: It depends. If you have truly asynchronous communications between functions then events are something to consider. "Truly" means that the thread of execution of a called function is interrupted with setInterval, nextTick or syncIO (just using callback is not necessarily asynchronous). If this is not the case, you cannot use events as they will be emitted before your calling function can set a listener on it. Events require more work in the called function - you need to create an instance of EventEmitter and pass it back, on which a callee will set a listener. Then your called function emits event(s). If your relationship between functions is one-to-one (request/reply) and the outcome is success/failure than it is easier to just have a callback. If your asynchronously called function can emit events multiple times or there are more than a couple of outcomes, then events are a good fit. As for arguments, please look at the doc: http://nodejs.org/api/events.html emitter.emit(event, [arg1], [arg2], [...])
has comment: http://stackoverflow.com/comment/43020270
upvote count: 5
score: 4
has comment: http://stackoverflow.com/comment/43005523

http://stackoverflow.com/comment/96080519
comment on: http://stackoverflow.com/a/35244490
score: 0
type: Comment
has text: OTP (one-time password) fields another important use-case for password fields that should never be saved. Using a normal text field with -webkit-text-security to hide the characters using CSS is not enough, since it does not solve the problem where screen readers blab out blind users' OTPs.
type: AnswerComment

http://stackoverflow.com/comment/42814001
has text: What about using WebSQL (that i'm already using)? Should be faster, or am i wrong?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27157518
type: Comment

http://stackoverflow.com/q/27261688
accepted answer: http://stackoverflow.com/a/27261714
tagged with: javascript
has answer: http://stackoverflow.com/a/50386484
answer count: 3
has answer: http://stackoverflow.com/a/27261704
tagged with: page-refresh
possible better answer: http://stackoverflow.com/a/27261704
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27261714
type: Question
has title: window.open() Second time refresh (Don't open another window)
has body: Click Link (ex: onclick="javascript:window.open().location.href='URL') Open New Window(or New tab) First time only open new window(tab) but Second time refresh same window.(Don't open another window) How can this be possible? (Problem solved) function newWindow(url,target) { if(localStorage.getItem(target)) { window.open(url,target); }else { localStorage.setItem(target,true); window.open(url,target); } }

http://stackoverflow.com/q/27244227
has answer: http://stackoverflow.com/a/27244303
has answer: http://stackoverflow.com/a/27244833
answer count: 3
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27244287
has title: Using jquery to run code when django document is ready
favorite count: 0
possible better answer: http://stackoverflow.com/a/27244833
tagged with: http://stackoverflow.com/tag/html
tagged with: events
has comment: http://stackoverflow.com/comment/42963839
tagged with: django
has body: I am building a django admin site and am using javascript and jquery (2.0.3) to add some extra functionality to the forms. I am importing the scripts into my page like this: At first I placed the following code at the end of project.js: function tryCustomiseForm() { // ... } $(document).ready(tryCustomiseForm); Unfortunately this results in an Uncaught TypeError: undefined is not a function exception on the last line. I then tried the alternative syntaxes of ready() without any more luck. Lastly I explored the change_form.html template and found this inline javascript: I was able to modify it to suit my needs and now my project.js ends with: (function($) { $(document).ready(function() { tryCustomiseForm(); }); })(django.jQuery); While this results in the correct behaviour I don't understand it. This leads to my question: Why did my first approach fail? And what is the second approach doing?
type: Question
has answer: http://stackoverflow.com/a/27244287
type: AnsweredQuestion
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/comment/43037939
type: AnswerComment
has text: @Fishbones - also maybe `.Value` should be `.value`.
comment on: http://stackoverflow.com/a/27285032
score: 0
type: Comment

http://stackoverflow.com/comment/42804538
has text: See http://stackoverflow.com/questions/9163341/multiple-inheritance-prototypes-in-javascript.
comment on: http://stackoverflow.com/q/27154991
type: Comment
type: QuestionComment
score: 0

object
tags question: http://stackoverflow.com/q/27277819
tags question: http://stackoverflow.com/q/27178681
tags question: http://stackoverflow.com/q/27300863
tag name: object
tags question: http://stackoverflow.com/q/27265848
tags question: http://stackoverflow.com/q/27210955
tags question: http://stackoverflow.com/q/27228048
tags question: http://stackoverflow.com/q/27203073
tags question: http://stackoverflow.com/q/27182095
tags question: http://stackoverflow.com/q/27266901
tags question: http://stackoverflow.com/q/27176292
tags question: http://stackoverflow.com/q/27233789
tags question: http://stackoverflow.com/q/27168356
tags question: http://stackoverflow.com/q/27204104
tags question: http://stackoverflow.com/q/27204283
tags question: http://stackoverflow.com/q/27233943
tags question: http://stackoverflow.com/q/27301458
tags question: http://stackoverflow.com/q/27178124
tags question: http://stackoverflow.com/q/27299194
tags question: http://stackoverflow.com/q/27224847
tags question: http://stackoverflow.com/q/27301179
tags question: http://stackoverflow.com/q/27189440
tags question: http://stackoverflow.com/q/27237986
tags question: http://stackoverflow.com/q/27253877
tags question: http://stackoverflow.com/q/27194960
tags question: http://stackoverflow.com/q/27230412
tags question: http://stackoverflow.com/q/27188289
type: Tag
tags question: http://stackoverflow.com/q/27236015
tags question: http://stackoverflow.com/q/27312720

http://stackoverflow.com/comment/42925276
type: QuestionComment
comment on: http://stackoverflow.com/q/27215496
score: 0
has text: Then you'll have to send it to a content script using `port.emit`. [See docs](https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/using_port)
type: Comment

http://stackoverflow.com/comment/43410483
comment on: http://stackoverflow.com/a/27484667
has text: Strong ideas. I will take a deeper look regarding posting to the REST call with logic to add the desired title
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27239591
answers question: http://stackoverflow.com/q/27239211
has body: Try function parse(str) { var str = str.replace(/&lt;br&gt;/gi); console.log(str); var arr = str.split('|'); var obj = {}; for (var i=0; i&lt;arr.length; i=i+4) { var key = arr[i] || ''; var val_1 = arr[i+1] || ''; var val_2 = arr[i+2] || ''; if(key) { obj[key] = val_1 + ':' + val_2; //or similar } } return obj; } DEMO This will work on the particular data string in the question. It will also work on other data string of the same general format, but relies on : &lt;br&gt; being discardable before parsing every record being a group of 4 string elements delineated by | (pipe) first element of each record is the key second and third elements combine to form the value fourth element is discardable.
score: 0
type: Answer

http://stackoverflow.com/q/27174605
type: AnsweredQuestion
has body: I have to test some code that contains the following comparison: (I have tried to simplify the original code) if (app.base.premiums[0].code === ‘1’) and have created a test ‘app’ object app = { base : { premiums: ['first'] } } Which I have then tried to add a property to the first element in the array app.base.premiums[0].code = '1'; But this does not return any value when I type app.base.premiums[0].code into the browser console. How should I go about this?
accepted answer: http://stackoverflow.com/a/27174653
has comment: http://stackoverflow.com/comment/42838832
has comment: http://stackoverflow.com/comment/42839652
type: Question
has comment: http://stackoverflow.com/comment/42838871
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27174721
score: 0
has answer: http://stackoverflow.com/a/27174636
has answer: http://stackoverflow.com/a/27174721
has answer: http://stackoverflow.com/a/27174669
has answer: http://stackoverflow.com/a/27174653
has comment: http://stackoverflow.com/comment/42838802
has title: Add a property to javascript array element
answer count: 4
has comment: http://stackoverflow.com/comment/42839477

http://stackoverflow.com/comment/42943654
type: QuestionComment
has text: The code is before. It is at the top of my file
score: 0
comment on: http://stackoverflow.com/q/27233048
type: Comment

http://stackoverflow.com/comment/42944956
comment on: http://stackoverflow.com/q/27234087
has text: You know that 10 is milliseconds and not seconds, right?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43082620
has text: If a field is auto-incremented, you should not be setting it, but let the database engine set it. IDs/Primary Keys should generally not be set as a part of user input.
comment on: http://stackoverflow.com/q/27310861
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27232093
possible better answer: http://stackoverflow.com/a/27232148
has answer: http://stackoverflow.com/a/27232148
score: 2
downvote count: 0
favorite count: 0
tagged with: promise
accepted answer: http://stackoverflow.com/a/27232158
has body: I'm struggling with jQuery's promises and animations. This is a simplified case: var title = $('#intro h2'); title.fadeOut(2000).promise() .then(function () { title.fadeIn(4000); } ) .then(function () { title.css( {'background-color':'red'} ); } ); I would expect the heading ($('#intro h2')) to fade out, then fade in, and then for its background colour to change to red. Instead, the background changes to red before the heading fades back in. What's going on? How can I use promises to ensure the right sequence of events?
has title: Chained jQuery promises execute early
upvote count: 2
tagged with: animation
has comment: http://stackoverflow.com/comment/42941112
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27232158
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/68552226
has text: This problem appears when you have a `document.write()` call during the ajax request.
score: 0
comment on: http://stackoverflow.com/q/27277151
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28643491
has body: You could use Cheerio - module.exports = { "login": function (browser) { var cheerio = require("cheerio") browser .url("http://www.wikipedia.org") .waitForElementVisible('body', 1000) .waitForElementVisible('select#searchLanguage', 1000) .source(function(result) { // .source() dump the page source in the variable $ = cheerio.load(result.value) var num_languages = $('select#searchLanguage option').length console.log('Wikipedia.org Languages: ' + num_languages); }) .end(); } }; See this other question for the same.
downvote count: 3
upvote count: 0
score: -3
type: Answer
answers question: http://stackoverflow.com/q/27273262

http://stackoverflow.com/a/27267867
score: 2
has comment: http://stackoverflow.com/comment/43007522
downvote count: 0
has comment: http://stackoverflow.com/comment/43007603
accepted answer of: http://stackoverflow.com/q/27267629
has body: Instead of using inline JS, you can actually store data you want to pass to your function in HTML5 data- attributes instead: &lt;div class="tagfav price" data-annonce-immo-id="&lt;?php echo $row_all_ad['skopeo_annonce_immo_id']; ?&gt;" data-user-id="&lt;?php echo $_SESSION['user']['id'];?&gt;"&gt;&lt;/div&gt; After that, listen to the click event on .tagfav.price. If the element is dynamically added you might want to consider listening to the click event bubbling to the document object instead. The values stored in HTML5 data attribute can be accessed via .attr() or .data(), but I personally prefer the former as the latter does not work well for dynamically changing data- attributes — this might not be the case in your application, but it's a good thing to note. .data() fetches the HTML5 data attribute on runtime and does not update the object if the DOM changes. For the AJAX call, we can troubleshoot it by using deferred objects and promises, like .fail(), .done() and etc to see what is actually happening. The .fail() function that receives 3 arguments: jqXHR, textStatus and errorThrown. In the code below, your AJAX call will log an error message in the console if something went wrong. $('.tagfav.price').click(function() { // Construct data object var formData = { 'skopeo_user_id': $(this).attr('data-user-id'), 'skopeo_annonce_immo_id': $(this).attr('data-annonce-immo-id') }; // Make AJAX call var $fav = $.ajax({ url: 'assets/test.php', data: formData, dataType: 'JSON', // Optional, jQuery intelligently guesses but good to have type: 'POST' }); // Check AJAX status using deferred objects and promises $fav.done(function(data, html) { console.log('added to favourite'); }).fail(function(jqXHR, textStatus, errorThrown) { console.log(textStatus + ': ' + errorThrown); }); }); Also, some helpful pointers to check: Is your PHP script, assets/test.php, set to receive data by $_POST? You might want to check that. Is the same script echoing a JSON-encoded string that will be …
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27267629
upvote count: 2
type: Answer

http://stackoverflow.com/comment/43219434
comment on: http://stackoverflow.com/q/27295529
score: 0
has text: Seems interesting, but probably I was too tired to understand. I picked the other way to solve the problem : unbinding 'beforeunload' and binding it again as follows `function EscapePrompt() { $(window).unbind('beforeunload'); setInterval(function () { BindBeforeUnload() }, 1000); }`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/73505261
has text: or just ` ` which avoids such problems and always gets you the latest version
comment on: http://stackoverflow.com/a/27246822
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43050299
has text: (instead of using an object containing arrays, I'd prefer to use a 100% object :))
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27292184
type: Comment

http://stackoverflow.com/comment/43080477
has text: thanks for clearing the concept in such a simple terms. one more thing,can you please tell me why secong args that is radic can take values from 2 to 36?
type: AnswerComment
comment on: http://stackoverflow.com/a/27276837
type: Comment
score: 0

http://stackoverflow.com/q/27292249
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43050282
has body: I need to bind status message to variable. If it's empty I need to hide div. If it's not empty show div and message. At the moment when I update $scope.statusMessage.msgin controller the {{statusMessage.msg}} is not being updated. How to fix it? {{statusMessage.msg}} $scope.statusButtonAction = function(action){ $scope.statusMessage.msg = 'Validation Error'; } UPDATE 1 Validation Error UPDATE 2 declaration of : $scope.statusMessage = { msg: '', status: null }; UPDATE 3 http://jsbin.com/jaquc/2/ UPDATE 4 I use https://github.com/angular-ui/ui-router . and my config is : prototypeApplication.config(function ($stateProvider, $urlRouterProvider) { $stateProvider.state('welcome', { url: '/', views: { '': { templateUrl: 'views/prototype/welcome.html', controller: 'welcomeController' }, 'header@welcome': { templateUrl: 'views/components/header.html' }, 'check-in@welcome': { templateUrl: 'views/prototype/welcome/check-in.html', controller: 'checkInController' }, 'status-buttons@welcome': { templateUrl: 'views/prototype/welcome/status-buttons.html', controller: 'checkInController' } } }) UPDATE 5 Strange enough, but when I switch from object oriented representation to plain variables all works: $scope.statusMessage = '123'; $scope.statusState = null; Does it mean I have to use some trick to make AngularJS read object's property's values?
has answer: http://stackoverflow.com/a/27546456
score: 1
possible better answer: http://stackoverflow.com/a/27292716
has comment: http://stackoverflow.com/comment/43051833
has answer: http://stackoverflow.com/a/27292716
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/27292722
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27546456
tagged with: angularjs
answer count: 3
has title: Model's attribute not getting updated on change
has comment: http://stackoverflow.com/comment/43050276
has comment: http://stackoverflow.com/comment/43050031
upvote count: 1

http://stackoverflow.com/q/27247462
has answer: http://stackoverflow.com/a/27247568
downvote count: 3
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -3
upvote count: 0
has body: Following options doesn't work - 1) window.close(); 2) window.open('','_self','');window.close();
tagged with: google-chrome
type: Question
tagged with: firefox
tagged with: javascript
has title: How can I close a window using Javascript in google Chrome (v38 and above) /firefox (v33 and above)?

http://stackoverflow.com/comment/43007257
score: 0
comment on: http://stackoverflow.com/a/27254373
type: AnswerComment
type: Comment
has text: Thanks, this has certainly worked for the 'final' slide (slide 4) so I can use the same logic for the first.

http://stackoverflow.com/comment/42909491
has text: I did it in this way, but the upload-Button has still no function.
type: AnswerComment
comment on: http://stackoverflow.com/a/27213212
type: Comment
score: 0

http://stackoverflow.com/comment/43060565
type: Comment
comment on: http://stackoverflow.com/a/27294545
has text: @Asik To illustrate, while being still wrong, if you add in the 'home' views `threadContent: { templateUrl: 'home.html' }` you'll see home template when hitting 'Back'.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42984544
has text: Without explanation, that was mystery.
type: AnswerComment
comment on: http://stackoverflow.com/a/27255151
score: 0
type: Comment

http://stackoverflow.com/q/27270089
score: 1
upvote count: 3
tagged with: java
downvote count: 2
linked to: http://stackoverflow.com/q/15977637
has answer: http://stackoverflow.com/a/27270864
type: Question
has title: Parse an ISO-8601 duration in Java / JavaScript
has comment: http://stackoverflow.com/comment/43011003
tagged with: javascript
has comment: http://stackoverflow.com/comment/43013527
has comment: http://stackoverflow.com/comment/43011601
has comment: http://stackoverflow.com/comment/43011181
has comment: http://stackoverflow.com/comment/43013524
has comment: http://stackoverflow.com/comment/43010370
answer count: 1
has comment: http://stackoverflow.com/comment/43011980
accepted answer: http://stackoverflow.com/a/27270864
has comment: http://stackoverflow.com/comment/43011605
favorite count: 0
linked to: http://stackoverflow.com/q/14934089
has comment: http://stackoverflow.com/comment/43013222
has comment: http://stackoverflow.com/comment/43013182
has comment: http://stackoverflow.com/comment/43010690
has comment: http://stackoverflow.com/comment/43013678
has comment: http://stackoverflow.com/comment/43011791
has comment: http://stackoverflow.com/comment/43011427
has body: I need to convert an ISO-8601 duration into a date using JavaScript or Java. For example ISO-8601 like P0000-00-60T00:00:00 and current date like 2014-11-30 means, i want to get output like 2015-01-29
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/2201925

jsp
tags question: http://stackoverflow.com/q/27269708
tags question: http://stackoverflow.com/q/27295431
tags question: http://stackoverflow.com/q/27209259
tags question: http://stackoverflow.com/q/27222522
tags question: http://stackoverflow.com/q/27202123
tags question: http://stackoverflow.com/q/27199788
tags question: http://stackoverflow.com/q/27248639
tags question: http://stackoverflow.com/q/27174889
tags question: http://stackoverflow.com/q/27204447
tags question: http://stackoverflow.com/q/27236173
type: Tag
tags question: http://stackoverflow.com/q/27285443
tags question: http://stackoverflow.com/q/27254424
tags question: http://stackoverflow.com/q/27288180
tag name: jsp
tags question: http://stackoverflow.com/q/27296061
tags question: http://stackoverflow.com/q/27292442
tags question: http://stackoverflow.com/q/27249674
tags question: http://stackoverflow.com/q/27170374
tags question: http://stackoverflow.com/q/27206585
tags question: http://stackoverflow.com/q/27231579
tags question: http://stackoverflow.com/q/27228656
tags question: http://stackoverflow.com/q/27226789
tags question: http://stackoverflow.com/q/27265596
tags question: http://stackoverflow.com/q/27221675
tags question: http://stackoverflow.com/q/27279885
tags question: http://stackoverflow.com/q/27185588
tags question: http://stackoverflow.com/q/27305824
tags question: http://stackoverflow.com/q/27287551
tags question: http://stackoverflow.com/q/27239959
tags question: http://stackoverflow.com/q/27230771
tags question: http://stackoverflow.com/q/27272760
tags question: http://stackoverflow.com/q/27288818
tags question: http://stackoverflow.com/q/27164175
tags question: http://stackoverflow.com/q/27279579

http://stackoverflow.com/a/27185206
has body: This might be the security issue with chrome. I am asking the user to disable that and check. It is working fine in my machine. I have windows 7 with chrome. It might be some issues with your Mac OS. It might be security issues. Please disable the security settings in chrome using the below command and just try chrome --disable-web-security
has comment: http://stackoverflow.com/comment/42880579
downvote count: 2
score: -2
has comment: http://stackoverflow.com/comment/42894765
upvote count: 0
answers question: http://stackoverflow.com/q/27170770
has comment: http://stackoverflow.com/comment/42885132
type: Answer

http://stackoverflow.com/q/27192489
type: AnsweredQuestion
has body: I'm in the process of learning javascript, I'm trying to find useful ways of obtaining data, that is already displayed on a page (lets say its wrapped up in a div or a span), what would be the best way to go about collecting that data and storing in javascript? Is there any good reading materials to help get started with javascript?
has title: Javascript selecting data from div or span
type: Question
has comment: http://stackoverflow.com/comment/42870642
tagged with: javascript
has answer: http://stackoverflow.com/a/27192607
has comment: http://stackoverflow.com/comment/42870676
score: 0
accepted answer: http://stackoverflow.com/a/27192607
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42870769

http://stackoverflow.com/comment/43523660
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27282729
has text: Yes, we are using an exchange server.
type: AnswerComment

http://stackoverflow.com/q/27265024
type: Question
linked to: http://stackoverflow.com/q/26087296
has comment: http://stackoverflow.com/comment/43001709
tagged with: javascript
has title: How Can I count the clicking URL by User?
score: 0
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27265232
answer count: 1
has body: while($rows=mysql_fetch_assoc($run)) { $title=$rows['title']; $desc=$rows['description']; $url=$rows['url']; //include 'index.php'; echo "$title $url" "; } In this part different $url will be shown in the screen to the user and user can click any url to show the data.I want to count which url clicked how many times to give the page ranking??
favorite count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/26087296
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/a/27214946
has comment: http://stackoverflow.com/comment/42910739
answers question: http://stackoverflow.com/q/27214581
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42913061
has body: When using turbolinks you should use the page:change event, instead of the document ready. So in your case: $(window).bind 'page:change', () -&gt; console.log $('.data-table').dataTable I generally prefer the one big application.js file, because after first load it will be cached in your clients browser. Also in production it will be minified and compressed.

http://stackoverflow.com/comment/42959670
has text: The client-side socket.io library doesn't listen for incoming connections and, if it did, incoming connections would be blocked by whatever firewall the browser is behind. The whole principle of WebSockets is that the client connects outbound to the server and that's how you deal with the firewall. The server (or another client) can't connect to the a client.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27241132
type: QuestionComment

http://stackoverflow.com/a/35088319
type: Answer
answers question: http://stackoverflow.com/q/27264467
score: 2
downvote count: 0
has body: i'm using Crosswalk + Cordova and its looking good Crosswalk Project
upvote count: 2

http://stackoverflow.com/a/27220923
has body: You could just test the values against the same RegExp. var myArr=["test1.nameA", "test1.nameB", "test2.nameC", "test2.nameA"]; var pattern = /^test1\./; // begins with test1 followed by a dot for(var i = 0; i &lt; myArr.length; i++) { if(pattern.test(myArr[i])) { console.log(myArr[i]); } } Working example: http://jsbin.com/qilinohora/1/edit?js,console
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27220876

http://stackoverflow.com/comment/43102835
score: 1
comment on: http://stackoverflow.com/q/27250053
type: Comment
type: QuestionComment
has text: What is your expected result? It depends on how you want it. But this would be simple if you use `for` loop to iterate through the object. For example `for(child in parent){ console.log(parent[child])}` would print out every `child` nodes of a `parent` object. And then you can just apply recursion with it.

http://stackoverflow.com/comment/42970979
type: AnswerComment
type: Comment
score: 0
has text: The problem is not that the server is taking too long to respond. The server provides the average response in 50ms. In server logs there are requests from iPad, but appear all that from other browsers.
comment on: http://stackoverflow.com/a/27247650

http://stackoverflow.com/comment/42973551
comment on: http://stackoverflow.com/q/27249094
has text: And how can we do that?? I mean how can we make sure that it is present, I mean i have posted the whole code, where i am going wrong
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/43425571
has body: change you angular version to 1.2, I did it and it worked. here it is: https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js
downvote count: 1
answers question: http://stackoverflow.com/q/27274288
type: Answer
upvote count: 0
score: -1

http://stackoverflow.com/comment/43084012
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27311436
has text: @Anuket simply move to the right (into the second function argument) all the selectors you add to the page dynamically to make it work.
type: AnswerComment

http://stackoverflow.com/q/27187152
has comment: http://stackoverflow.com/comment/42861009
score: 0
has comment: http://stackoverflow.com/comment/42860905
accepted answer: http://stackoverflow.com/a/27188403
has body: Let's say I have two classes in a object orientated paradigm : libraries and books. They have respectively the libraryName and bookName properties. Each library contain an array of books (of unfixed size). From one book, I would like to obtain the name of its libray, and from a library the name of all the books it contains. What is the best way implement this in Javascript (preferably with object oriented Javascript) ? For example, my code could start like this: function library(libraryName){ this.LibraryName=libraryName; this.books = new Array(); }
has comment: http://stackoverflow.com/comment/42860916
possible better answer: http://stackoverflow.com/a/27187326
has answer: http://stackoverflow.com/a/27187326
type: AnsweredQuestion
type: Question
answer count: 2
has title: Javascript data structure: Object oriented or array?
tagged with: javascript
has answer: http://stackoverflow.com/a/27188403

http://stackoverflow.com/comment/42846833
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27177611
has text: Verbosity is not always synonymous of lack of maintainability, this is false syllogism. It is not unreadable, unless you don't understand jquery or javascript, if you worry about abstraction leaks between Javascript and jQuery you would not be using jquery because it is not supposed to work without JS knowledge. If team maintainability is a must, one or two unit tests could make it more stable.

http://stackoverflow.com/q/27306268
tagged with: javascript
has body: I made object of window by javascript. And I want to add some functions to the windows object. But .onclick, .setattribute, and .addEventListener do not work with my object. Even mouse cursor also can not be changed when I give value of css or javascript. It is on 499 line of my source. Could you tell me why these do not work? Should I change language? Is it bug? function seSizeValue(theNumOfWins,outlayerId){ var seSizeValue; var seSizeValueId; seSizeValueId = "seSizeValueId" + theNumOfWins; seSizeValue = document.createElement("div"); document.getElementById(outlayerId).appendChild(seSizeValue); seSizeValue.setAttribute("id",seSizeValueId); document.getElementById(seSizeValueId).setAttribute("class","seSizeValueCSS"); document.getElementById(seSizeValueId).onclick = function(event) {seSizeChange();}; return seSizeValueId; } """document.getElementById(seSizeValueId).onclick = function(event) {seSizeChange();};""" This line does not work. I already tried to change '.setattribute', and '.addEventListener'. There was no error. But it does not work. https://drive.google.com/file/d/0B4p8lZSEMXcqN0FzQTkyVW8wRGc/view this is my full source. It does not work on my source. Should I use jQuery?
score: 0
tagged with: events
answer count: 4
has answer: http://stackoverflow.com/a/27306553
has answer: http://stackoverflow.com/a/27306475
has answer: http://stackoverflow.com/a/27306340
type: UnansweredQuestion
tagged with: mouse
tagged with: onclick
has answer: http://stackoverflow.com/a/27306352
type: Question
has title: How can I use onclick method?

http://stackoverflow.com/q/27162952
type: Question
accepted answer: http://stackoverflow.com/a/27162972
has answer: http://stackoverflow.com/a/27163123
has comment: http://stackoverflow.com/comment/42819215
tagged with: javascript
has title: regular expression for a url
score: 0
answer count: 3
tagged with: regex
has comment: http://stackoverflow.com/comment/42818898
has comment: http://stackoverflow.com/comment/42819020
has comment: http://stackoverflow.com/comment/42819252
has answer: http://stackoverflow.com/a/27162972
has body: I want that form submit when user enter their domain without https:// or http:// or / at the end.what is the regular expression for this. https://google.com wrong http://google.com wrong google.com correct subdomain.google.com correct google.com/ wrong Please tell me what is the regular expression for this
possible better answer: http://stackoverflow.com/a/27163039
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11809631
has answer: http://stackoverflow.com/a/27163039

http://stackoverflow.com/a/27299982
score: 1
has comment: http://stackoverflow.com/comment/43066500
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43065138
has comment: http://stackoverflow.com/comment/43064575
type: Answer
accepted answer of: http://stackoverflow.com/q/27298419
has body: The relevant HTML from your view is this: Editing {{ editedProvider.title }} Submit Cancel The relevant code is this: $scope.updateProvider = function(name) { console.log('updateProvider: '+name); providersRef.child(name).update({ title: snapshotVal.title }); }; I added that console.log statement, because it shows you easily what is going wrong. The output is: updateProvider: undefined So from that you can see that you're not passing in the provider's name correctly. With this knowledge, you can go back to the HTML and see that you're refering to provider.name in there, where the rest of that form refers to editedProvider. So the fix is: Submit Update With the name-passing problem solved, the next error message is: ReferenceError: snapshotVal is not defined Which is also quite clear: your updateProvider code looks copy/pasted from one of the Firebase listeners and is referencing a non-existant snapshotVal. Instead, it should be getting the new title from the Angular scope: $scope.updateProvider = function(name) { providersRef.child(name).update({ title: $scope.editedProvider.title }); };
answers question: http://stackoverflow.com/q/27298419
has comment: http://stackoverflow.com/comment/43064415
has comment: http://stackoverflow.com/comment/43066118
upvote count: 1
has comment: http://stackoverflow.com/comment/43064762

http://stackoverflow.com/a/27270061
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You have to inject the dependencies: .run ( ['editableOptions', 'editableThemes', function(editableOptions, editableThemes) Similarly to controllers, services, etc (remember to add a ] to before the ) of the run. This is due to the fact that the minimizer such as uglify, change the variables names. In the way above, the minified code would be: .run( ['editableOptions', 'editableThemes', function(n,t){ And n and t would be references to those dependencies.
upvote count: 6
score: 6
accepted answer of: http://stackoverflow.com/q/27269954
answers question: http://stackoverflow.com/q/27269954

http://stackoverflow.com/comment/42845077
type: AnswerComment
type: Comment
has text: Thanks, yes, I also feel it takes too long :) Well, dev env is default 6.2. EE + one theme + few "lightweight" portlets I am working with. Those do not add weight because I remember default, out of box env took about the same, maybe 5-10% less... Measuring time - I just run start.bat (Win ;)) and wait for INFO: Server startup in 416811 ms (yes, this one took 416s). As front-end oriented and new to JAVA (worked with PHP before) I was really frustrated with all the deployments (also taking about a min) until I learned about developer mode (that allows "refresh based developement" :))
comment on: http://stackoverflow.com/a/27175172
score: 0

http://stackoverflow.com/comment/42891398
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27201682
has text: fascinating idea! if you don't want to go the canvas route, and are willing to use JQuery, check out [`$(el).position()`](http://devdocs.io/jquery/position)

http://stackoverflow.com/q/27209211
has comment: http://stackoverflow.com/comment/42900344
score: 0
has comment: http://stackoverflow.com/comment/42900359
answer count: 1
tagged with: external
has comment: http://stackoverflow.com/comment/42900420
has answer: http://stackoverflow.com/a/27209688
has body: I downloaded a webpage template pack from w3layouts.com. Its a collection of index.html pages (web and mobile versions), css and js files and a .php file that loads the appropriate version of the page depending on device. The file can be found here: http://w3layouts.com/vetae-single-page-multipurpose-flat-bootstrap-responsive-web-template/ a demo of what the page should look like is here: http://w3layouts.com/preview/?l=/vetae-single-page-multipurpose-flat-bootstrap-responsive-web-template/ I opened up the site in my wysiwyg editor, Kompozer. When I click "browse" to preview the site in the web browser, only the html loads. No css styling is being applied to the html in the browser preview, and there doesn't seem to be any js either. the site folder is in my Downloads folder on my mac, and the href links are formatted like "web/css/bootstrap.css", etc. They're placed in the header section. Any idea why this is happening? Any troubleshooting ideas? Any help is REALLY appreciated! Thanks! Please let me know if more info is needed.
linked to: http://stackoverflow.com/q/7378814
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42900463
has comment: http://stackoverflow.com/comment/42900437
type: Question
tagged with: href
has comment: http://stackoverflow.com/comment/42900397
has title: Browser preview only displays html, no css or javascript (w3layouts.com website template)
tagged with: javascript
has comment: http://stackoverflow.com/comment/42900404
has comment: http://stackoverflow.com/comment/42900289
has comment: http://stackoverflow.com/comment/42900364

http://stackoverflow.com/q/27229162
answer count: 2
has answer: http://stackoverflow.com/a/27229249
downvote count: 0
has answer: http://stackoverflow.com/a/27229283
tagged with: jquery
favorite count: 0
has title: show and hide popup in specific situations
tagged with: php
linked to: http://stackoverflow.com/q/452003
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42935398
tagged with: popup
has body: I have a textbox in my php form in which user can insert a movie title, or an actor/actress name and then by clicking a search button, a new window (movielist.php) will be opened showing list of movies containing that title or movies by that actor/actress. Question: Since sometimes the query takes a long time (for example if user only type "home", to see all movies contain this word, or if he insert "tom" to see all movies by all actors contain "tom" in their names, it will take a few minutes), I would like to show a message to user if he/she would like to wait more or maybe he prefer to change the search term. Here is what I tried till now: &lt;body&gt; &lt;div id="message" div align="center"&gt;&lt;img id="loading" src="http://schools.nyc.gov/ui/cms/sites/commoncore/images/loadingAnimation.gif" width="350" height="350"&gt; &lt;br /&gt; Please wait while data is being loaded. &lt;/div&gt; &lt;div id= "field"&gt; &lt;/div&gt; &lt;?php $pagenumber = '1'; if(!empty($_GET['page'])) { $pagenumber = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT); if(false === $pagenumber) { $pagenumber = '1'; } } ?&gt; &lt;script type="text/javascript"&gt; (function(){ setTimeout(showpopup, 10000) })(); function showpopup(){ alert("It may take some time to browse data..Please change your search keywords if you don't want to wait longer"); } $('#message').show(); var searchType = parent.window.opener.searchType; var textbox = parent.window.opener.textbox; var pagenumber = "&lt;?php echo $pagenumber; ?&gt;"; $.ajax({ url: 'searchfilm.php', //where I have DB Queries datatype: "json", data:{q:textbox, t:searchType, page:pagenumber}, success: function(response) { $("#field").html(response); $("#message").hide(); } }); &lt;/script&gt; &lt;/body&gt; With the above code, when user insert a term in the textbox and click search, it shows the loading image in the page and opens the pop-up after 10 seconds. Problem: It shows pop-up in any case, even when query is fast and it shows results (mov…
possible better answer: http://stackoverflow.com/a/27229283
type: Question
has comment: http://stackoverflow.com/comment/42935326
accepted answer: http://stackoverflow.com/a/27229249
tagged with: javascript
upvote count: 2

http://stackoverflow.com/a/58910628
answers question: http://stackoverflow.com/q/27268476
has body: Use allowInputToggle : true; Default: false If true, the picker will show on textbox focus and icon click when used in a button group.
score: 0
type: Answer

http://stackoverflow.com/comment/43043533
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27288183
has text: why not using a filter for this?
score: 0

http://stackoverflow.com/comment/42904899
score: 0
type: Comment
type: QuestionComment
has text: Can't see any changes in your example. Id #replynext is still written multiple times in your html code but used as a single selector in your JavaScript. Replies are sorted strange (shouldn't it be by time)? Happy Coding/ Debugging for you.
comment on: http://stackoverflow.com/q/27211439

http://stackoverflow.com/comment/42828381
comment on: http://stackoverflow.com/q/27167567
score: 0
type: QuestionComment
type: Comment
has text: Added. Notice that app is configured with `$httpProvider.defaults.withCredentials=true`

http://stackoverflow.com/comment/42837838
type: QuestionComment
has text: @twain - this is not very useful to me mate
comment on: http://stackoverflow.com/q/27173227
score: 0
type: Comment

http://stackoverflow.com/a/27263329
type: Answer
accepted answer of: http://stackoverflow.com/q/27263018
answers question: http://stackoverflow.com/q/27263018
type: AcceptedAnswer
score: 0
has body: Change event fires on input fields when it loses focus, you should be using keyup and detect the keyCode and respond accordingly $(document).ready -&gt; skipKeys = [37, 38, 39, 40] # Arrow keys $('#edit_item_title').keyup (e)-&gt; if (skipKeys.indexOf(e.keyCode) == -1) # To skip keys alert('ok')

http://stackoverflow.com/a/27163954
has comment: http://stackoverflow.com/comment/43216305
has body: Set your API Store URLs in The CORS Configurations and restart the server. Add OPTIONS HTTP verb into your API resources with 'None' Authentication Type. Try-it your API in chrome browser. If your backend supports OPTIONS method, then this should work. If it didn't work check if there is any errors in the browser. Main errors can be, API not supporting OPTIONS method for currently trying resource with 'None' Authentication Type. Backend not supporting OPTIONS method. API Store address which you are currently trying swagger is not included in the CORS configuration. Browser blocking.
score: 0
has comment: http://stackoverflow.com/comment/43216031
answers question: http://stackoverflow.com/q/27156508
type: Answer

http://stackoverflow.com/comment/42850012
comment on: http://stackoverflow.com/a/27180561
type: AnswerComment
score: 0
type: Comment
has text: Thanks for your help. I really appreciate it. But it says: formData is not defined. I tried to succees using: var formData = new.FormData(); but that will give the following result: "undefined". Any idea?

http://stackoverflow.com/a/27304886
type: Answer
has body: Why doesn't var htmlcontent = CKEDITOR.instances.id.getData(); work? The reason is that id is a variable holding the exact id stored previously in the line var id = $(this).parent().attr("id"); This id variable holds something like "myElementId" in it. In order for you to use that string, you need to access the instances object using "bracket notation" (Related: Working with Objects MDN) if you do not specifically know the name of "myElementId" in advance. As a result, this will work var htmlcontent = CKEDITOR.instances[id].getData(); And would be similar to CKEDITOR.instances.myElementId.getData() if "myElementId" was the id of the parent element previously stored.
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27304777
answers question: http://stackoverflow.com/q/27304777
has comment: http://stackoverflow.com/comment/43072606

http://stackoverflow.com/a/27243356
has body: Avoid using the dot notation for named elements "...." or for id values "..." (I think also that an id attribute value with a . or other special character in it does not validate.) document.forms[0].searchObj.Key.value; returns undefined document.forms[0]["searchObj.Key"].value;
answers question: http://stackoverflow.com/q/27231572
has comment: http://stackoverflow.com/comment/42962428
score: 0
type: Answer

http://stackoverflow.com/q/27256811
has comment: http://stackoverflow.com/comment/42988228
has answer: http://stackoverflow.com/a/27298107
has body: I have an MVC application deployed to Azure which was created as a SharePoint App Part (Provider-Hosted) for a SharePoint Online site. All Client ID and Secret ID are set correctly within SharePoint site and the Azure web Application. The App does spin up from the SharePoint site but the JSOM logic is throwing a No 'Access-Control-Allow-Origin' header exception when it runs this simple JS logic... &lt;script type="text/javascript"&gt; var hostweburl; // Load the required SharePoint libraries. $(document).ready(function () { // Get the URI decoded URLs. hostweburl = decodeURIComponent( getQueryStringParameter("SPHostUrl") ); // The js files are in a URL in the form: // web_url/_layouts/15/resource_file var scriptbase = hostweburl + "/_layouts/15/"; // Load the js files and continue to // the execOperation function. $.getScript(scriptbase + "SP.Runtime.js", function () { $.getScript(scriptbase + "SP.js", execOperation); } ); }); // Function to execute basic operations. function execOperation() { // Continue your program flow here. hostweburl = decodeURIComponent( getQueryStringParameter("SPHostUrl") ); retrieveWebSite(hostweburl); } // Function to retrieve a query string value. // For production purposes you may want to use // a library to handle the query string. function getQueryStringParameter(paramToRetrieve) { var params = document.URL.split("?")[1].split("&amp;"); var strParams = ""; for (var i = 0; i &lt; params.length; i = i + 1) { var singleParam = params[i].split("="); if (singleParam[0] == paramToRetrieve) return singleParam[1]; } } function retrieveWebSite(siteUrl) { var clientContext = new SP.ClientContext(siteUrl); this.oWebsite = clientContext.get_web(); clientContext.load(this.oWebsite); clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed) ); } function onQuerySucceeded(sender, args) { alert('Title: ' + this.oWebsite.get_title() + ' Description: ' + this.oWebsite.get_de…
answer count: 1
has comment: http://stackoverflow.com/comment/42994688
tagged with: csom
score: 4
has title: No 'Access-Control-Allow-Origin' header
upvote count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27298107
downvote count: 0
tagged with: javascript
tagged with: sharepoint
has comment: http://stackoverflow.com/comment/42988163
has comment: http://stackoverflow.com/comment/42987393
type: Question
tagged with: azure
has comment: http://stackoverflow.com/comment/42987768
has comment: http://stackoverflow.com/comment/42994672
tagged with: xmlhttprequest
favorite count: 0
has comment: http://stackoverflow.com/comment/42987581

http://stackoverflow.com/a/27287787
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27287715
has body: It is because you have only 1 &lt;form&gt; object in your html page. The array is zero based.
downvote count: 0

http://stackoverflow.com/a/27252527
answers question: http://stackoverflow.com/q/27248164
score: 0
type: Answer
has body: af:codeEditor has its limitiations. You can not customize it much on top of what comes out of the box.
accepted answer of: http://stackoverflow.com/q/27248164
type: AcceptedAnswer

http://stackoverflow.com/comment/43101704
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27303144
type: Comment
has text: Well yeah, because I handled fields with numbers as numeric, so was sorting the items by 1,2,3,4,5. Added a function to overwrite that putting a `data-type='string'` in the header : http://jsfiddle.net/juvian/a4fcxzra/4/

http://stackoverflow.com/comment/42825438
has text: What do you mean by slightly delay? I didn't get the question, can you please describe the purpose?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27165736

http://stackoverflow.com/comment/42963455
type: QuestionComment
comment on: http://stackoverflow.com/q/27240752
has text: @RobG Deleted. Shouldn't have shouted, but only did so when the OP ignored my initial comment without bothering to look up what the word actually meant.
score: 0
type: Comment

http://stackoverflow.com/comment/43033990
type: QuestionComment
comment on: http://stackoverflow.com/q/27282596
has text: this is run in the php side (server side) not client side, so you CANT performance a try catch there, you should create the try and catch in the client side, javascript
score: 0
type: Comment

http://stackoverflow.com/comment/43046679
score: 0
comment on: http://stackoverflow.com/q/27290147
has text: seems to be a Chrome issue, no flickering in FF on Ubuntu.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27188999
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27189038
type: Question
upvote count: 5
has body: I'm using the following regex; ((?:_missing_:|_exists_:)[a-z0-9]+)|(([a-z0-9]+)(?=:)) To match a lucene query string; _missing_:title age:(&gt;=10 AND &lt; 20) AND age:123 AND _exists_:title123 The first non-capture group is not respected and returns _missing_:title and not title. Using a positive lookahead makes the entire regex fail to match anything. It should return the following array; ['title', 'age', 'age', 'title123']
answer count: 2
score: 5
accepted answer: http://stackoverflow.com/a/27189038
tagged with: regex-lookarounds
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/73169425
has title: Why doesn't positive lookahead work as first capture group?
has answer: http://stackoverflow.com/a/73169425

http://stackoverflow.com/q/27154360
has comment: http://stackoverflow.com/comment/42803685
has comment: http://stackoverflow.com/comment/42803617
accepted answer: http://stackoverflow.com/a/27154501
has comment: http://stackoverflow.com/comment/42803046
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/42803472
type: AnsweredQuestion
upvote count: 0
score: -5
has answer: http://stackoverflow.com/a/27154787
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42803512
has comment: http://stackoverflow.com/comment/42803219
possible better answer: http://stackoverflow.com/a/27154787
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: i have used below code but it not work in firefox for focus textbox in .blur() event using JQuery $("#txtfname").focus(function () { if ($("#txtfname").val() == "" &amp;&amp; $("#txtfname").val().length &gt;= 2) { $("#fnamemsg").hide(); } }); $("#txtfname").blur(function () { if ($("#txtfname").val() != "" &amp;&amp; $("#txtfname").val().length &lt; 2) { $("#fnamemsg").show(); $("#fnamemsg").html("Minimum 5 character"); $("#txtfname").focus(); } else { $("#fnamemsg").hide(); } });
has answer: http://stackoverflow.com/a/27154501
has comment: http://stackoverflow.com/comment/42803363
answer count: 2
has title: JQuery .focus() not work in .blur() event in Firefox

http://stackoverflow.com/a/35244490
has comment: http://stackoverflow.com/comment/128222442
has comment: http://stackoverflow.com/comment/121246687
has comment: http://stackoverflow.com/comment/80718627
has comment: http://stackoverflow.com/comment/121246776
has comment: http://stackoverflow.com/comment/96097402
downvote count: 14
has comment: http://stackoverflow.com/comment/128220481
has comment: http://stackoverflow.com/comment/121678264
has comment: http://stackoverflow.com/comment/121815537
has comment: http://stackoverflow.com/comment/121246813
has comment: http://stackoverflow.com/comment/58203966
upvote count: 22
has comment: http://stackoverflow.com/comment/96080519
has comment: http://stackoverflow.com/comment/96210815
has comment: http://stackoverflow.com/comment/96118673
has comment: http://stackoverflow.com/comment/80744387
has comment: http://stackoverflow.com/comment/128220384
has comment: http://stackoverflow.com/comment/80824827
has comment: http://stackoverflow.com/comment/58204950
has comment: http://stackoverflow.com/comment/58210743
has comment: http://stackoverflow.com/comment/80842272
has comment: http://stackoverflow.com/comment/58204919
has comment: http://stackoverflow.com/comment/63331599
has comment: http://stackoverflow.com/comment/121722962
has comment: http://stackoverflow.com/comment/96138828
has comment: http://stackoverflow.com/comment/128220153
type: Answer
has comment: http://stackoverflow.com/comment/121734710
has comment: http://stackoverflow.com/comment/80763582
has comment: http://stackoverflow.com/comment/121723444
score: 8
has comment: http://stackoverflow.com/comment/80816442
has comment: http://stackoverflow.com/comment/58204973
has comment: http://stackoverflow.com/comment/121768783
has comment: http://stackoverflow.com/comment/80865056
answers question: http://stackoverflow.com/q/27280461
has comment: http://stackoverflow.com/comment/80771633
has comment: http://stackoverflow.com/comment/121669796
has body: The reason browsers are ignoring autocomplete=off is because there have been some web-sites that tried to disable auto-completing of passwords. That is wrong. And in July 2014, Firefox was the last major browser to finally implement the change to ignore any web-site that tries to turn off autocompleting of passwords. Bugzilla Bug 956906 - ignore autocomplete="off" when offering to save passwords via the password manager (archive.is) Reddit discussion (archive.is) Chrome's announcement when they began ignoring autocomplete=off (archive.is) IE11 fixed the bug of not being able to auto-complete passwords (archive.is) Any attempt by any web-site to circumvent the browser's preference is wrong; that is why browsers ignore it. There is no reason known why a web-site should try to disable saving of passwords. Chrome ignores it Safari ignores it IE ignores it Edge ignores it Firefox ignores it Microsoft even had to explain before IE11 that it wasn't a bug in the browser - that the web-site was broken: Why Won’t IE Remember My Login Info? (archive.is) What if I'm a special snowflake? There are people who bring up a good use-case: I have a shared, public area, kiosk style computer. We don't want someone to (accidentally or intentionally) save their password so they next user could use it. That does not violate the statement: Any attempt by any web-site to circumvent the browser's preference is wrong That is because in the case of a shared kiosk: it is not the web-server that has the oddball policy it is the client user-agent that has the oddball policy The browser (the shared computer) is the one that has the requirement that it not try to save passwords. The correct way to prevent the browser from saving passwords is to configure the browser to not save passwords. Since you have locked down and control this kiosk computer: you control the settings. That includes the option of saving passwords. In Chrome and Internet Explorer, you configure those options using Group Policies …
has comment: http://stackoverflow.com/comment/96158374

http://stackoverflow.com/q/27166697
answer count: 1
has answer: http://stackoverflow.com/a/27166759
downvote count: 0
has comment: http://stackoverflow.com/comment/42825300
tagged with: jquery
favorite count: 0
has title: Not able to get serialized Array of Kendo UI Form
tagged with: ajax
tagged with: kendo-ui
has comment: http://stackoverflow.com/comment/42826119
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27166759
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42825279
type: Question
has comment: http://stackoverflow.com/comment/42825462
tagged with: javascript
has comment: http://stackoverflow.com/comment/42825351
has body: I have a simple form, where I have a form element with one input type and button. When I am click button, I am trying to get form data using var fData = $("#test").serializeArray(); However for some reason, I am not able to get any values of form. What could be the reason for this? JSFiddle Demo

http://stackoverflow.com/comment/43018349
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27267731
type: Comment
has text: ok sorry but I just can do the step with the php something like `code`<?php $datum = date("d.m.Y - H:i"); echo $datum; ?> `code` but I have no idea to handle the rest

http://stackoverflow.com/comment/42986265
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27255900
has text: What's the initial position of the div?

http://stackoverflow.com/comment/42883703
comment on: http://stackoverflow.com/q/27176423
score: 0
has text: Thank you @PhilH, I edited the question to make it explicit that I've done the work and just sharing it.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42982260
has text: Your syntax is correct for your Object, are you sure you are declaring every thing properly? Try to declare `params.params = [];` and `var $scope = {};` as well as `$scope.linkParams = {};`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27253877
score: 1

http://stackoverflow.com/comment/42804328
has text: Wrapping it all up in a View has the same result: http://jsfiddle.net/scucLw0h/2/
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27154456

http://stackoverflow.com/a/27302190
answers question: http://stackoverflow.com/q/27281686
type: Answer
has body: I found the answer. I could not apply the 'state' data during 'initialize'. I simply added the _.extend prior to the collection fetch. I also found that I can manipulate the state in the same way. Updated Code: class Entities.UserModel extends Backbone.Model class Entities.UserCollection extends Backbone.PageableCollection model: Entities.UserModel url: '/api/ra/users' state: firstPage: 1 currentPage: 1 queryParams: currentPage: "current_page" pageSize: "page_size" offset: () -&gt; (@state.currentPage-1) * @state.pageSize API = getUsers: (state, searchCriteriaModel) -&gt; items = new Entities.UserCollection _.extend items.state, state _.extend items.queryParams, searchCriteriaModel items.fetch async: false reset: true success: (collection, response, options) -&gt; console.log "success:", collection error: (collection, response, options) -&gt; console.log "error:", collection items
score: 0

http://stackoverflow.com/a/27205209
has comment: http://stackoverflow.com/comment/42893365
has comment: http://stackoverflow.com/comment/42893091
has body: I managed fix this problem only by using function instead of variable. function myObject () { this.parents = []; this.setParents = function(parents){ if(parents instanceof Array){ for(i=0;i&lt;parents.length;i++){ this.parents.push(parents[i]); } } }; this.call = function(fun,args) { return this[fun].apply(this,args); }; } var obj0 = new myObject(); obj0.func = function(arg) { return "func0: " + arg; }; var obj2 = new myObject(); obj2.func = function(arg) { return "func2: " + arg; }; var result = obj0.call("func", ["hello"]); alert(result);
has comment: http://stackoverflow.com/comment/42892989
score: 0
answers question: http://stackoverflow.com/q/27204673
has comment: http://stackoverflow.com/comment/42893102
type: Answer

http://stackoverflow.com/comment/43048583
comment on: http://stackoverflow.com/a/27291237
score: 0
type: AnswerComment
type: Comment
has text: I will, I need to wait 3 more minutes though :P

http://stackoverflow.com/comment/43000271
comment on: http://stackoverflow.com/q/27253648
score: 0
has text: @sander the AssignValues function is working fine without parameters. But on passing arrays as parameter to this function it shows nothing.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27275575
possible better answer: http://stackoverflow.com/a/27275638
has answer: http://stackoverflow.com/a/27275638
has body: I have a two forms which conflicts with each other i want to change the form id in "var form = $('form');" such as "var form = $('myForm');" please let me know if i change id form as myForm, in that case in below code how i can incorporate: $(document).ready(function(){ var form = $('form'); var submit = $('#submit'); form.on('submit', function(e) { // prevent default action e.preventDefault(); // send ajax request $.ajax({ url: 'ajax_comment.php', type: 'POST', cache: false, data: form.serialize(), //form serizlize data beforeSend: function(){ // change submit button value text and disabled it submit.val('Submitting...').attr('disabled', 'disabled'); }, success: function(data){ // Append with fadeIn see http://stackoverflow.com/a/978731 var item = $(data).hide().fadeIn(800); $('.comment-block').append(item); // reset form and button form.trigger('reset'); submit.val('Submit Comment').removeAttr('disabled'); }, error: function(e){ alert(e); } }); }); }); HTML code: <input type="hidden" name="filmId" value="<?php echo $row['filmId']?>"> Name * Email * Comment *
type: Question
tagged with: javascript
tagged with: forms
score: 0
has answer: http://stackoverflow.com/a/27275649
answer count: 2
has comment: http://stackoverflow.com/comment/43020338
has title: Conflict two HTML forms
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27275649
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/978708

http://stackoverflow.com/a/27216516
has body: Just var idOfSecondOption = document.getElementById('dropDownId').options[1].id
accepted answer of: http://stackoverflow.com/q/27216448
type: Answer
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42913354
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27216448

http://stackoverflow.com/comment/42851548
comment on: http://stackoverflow.com/q/27181648
has text: Its nothing public and will only be used for text to scroll so i can read it, its all local on my laptop. What else would you recommend me using? The marquee seams to be working exactly how i was wanting so far. I just want to be able to pause and play using a keyboard spacebar (or any other button).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43054185
type: Comment
comment on: http://stackoverflow.com/a/27289215
has text: Yes, i check it. It is the same link. Only difference the first one is a url with "https:// ... /" (absolute) and the url in the javascript is without (relative). But it is always the same.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27237127
tagged with: javascript
type: UnansweredQuestion
tagged with: angularjs
has answer: http://stackoverflow.com/a/27237784
type: Question
has title: Listening to AngularJS controller initialization event externally
answer count: 1
score: 0
has body: I have a controller (say main controller) which controls the main page and also maintains all event listeners, like $locationChangeSuccess, etc. I have a few more controllers that are referenced in partials which get included to the main page using ng-include. This is wrapped around with some custom routing logic that allows me to decide which partial to load. This also changes the url accordingly. I can listen to location changes using $locationChangeSuccess event. However, that does not guarantee that the controller corresponding to the partial which got loaded through ng-include has been initialized. I know we can use $viewContentLoaded on $scope of partial's controller for this. However, I necessarily need to avoid putting any event listeners outside of the main controller. Is there a way this can be achieved?

http://stackoverflow.com/comment/42864333
score: 0
type: Comment
type: QuestionComment
has text: That HTML code is telling you there are errors!
comment on: http://stackoverflow.com/q/27189053

http://stackoverflow.com/a/32389625
upvote count: 2
has body: Something like this should work. app.factory('PartnerInvoiceServiceRestangular', ['PartnerServiceRestangular', function(PartnerServiceRestangular) { return { getService: function(partnerId) { PartnerServiceRestangular.one('partner', partnerId).service('invoice'); } } }]); var getInvoices = function(partnerId, startDate, stopDate) { PartnerInvoiceServiceRestangular.getService(partnerId) .getList({ startDate: startDate, stopDate: stopDate }).then(function(invoices) { $scope.partner.invoices = invoices; } }; However I'm not a fan of your factory service implementation. Why not just use: $scope.partnerChange = function(partner) { $scope.partner = partner; partner.getList('invoice', { startDate: startDate, stopDate: stopDate }).then(function(invoices) { $scope.partner.invoices = invoices; }); };
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27245906
score: 2

http://stackoverflow.com/q/27242977
has answer: http://stackoverflow.com/a/35307656
favorite count: 0
score: 5
has comment: http://stackoverflow.com/comment/62436267
type: UnansweredQuestion
has body: I have a problem with encodeURIComponent() as it seems to behave differently than browsers (tested with Chrome and Firefox): encodeURIComponent('ä') returns %C3%A4 escape('ä') returns %E4 Chrome/Firefox encodes ä in x-www-form-urlencoded forms as %E4 So, why does encodeURIComponent behave differently than all the others (mainly browsers)? This actually causes problems as some websites don't understand what I'm trying to feed them. The website in question is http://verkkopalvelu.vrk.fi/Nimipalvelu/default.asp?L=1 (click "Etunimihaku" as it is iframe based). Is encodeURIComponent broken and how should this situation be corrected? What would be the correct way to encode characters like ä ö å? escape() seems to encode the same as those browsers, but escape() is deprecated. I tested the browsers with Fiddler and also the Console/Network tab shows the encoding as %E4 when I submit a form. Also a test link here: A http://jsfiddle.net/tcyfktvg/1/
type: Question
upvote count: 5
has title: encodeURIComponent() difference with browsers and [ä ö å] characters
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27211751
has title: Prototype and obj some clarification
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27211775
has comment: http://stackoverflow.com/comment/42904524
tagged with: jquery
has comment: http://stackoverflow.com/comment/42904579
has comment: http://stackoverflow.com/comment/42904456
score: 0
has comment: http://stackoverflow.com/comment/42905485
has comment: http://stackoverflow.com/comment/42904552
answer count: 1
has body: Im starting to learn some JS and I want to understand how should I create class with inheritance,after I read some articles and post in SO Im little bit confuse about how to implement it in the right... i've created the following very simple example to understand it better but Im not sure that this is the right way therefore I write this post. 1. since Im coming from OOP language this is the right way to create class with two different object that using the same functionality ? http://plnkr.co/edit/NCJs9jdKP5o0mwp6SuBD?p=info 2. In some JS files I saw the regular way to create function which I understand function fnName(){ console.log("test"); } and in some files I saw function like following say:function(){ console.log("say something") } what are the difference between those two ways to define function? I tried sometimes to use it and I got error function name is missing,any idea when I can use this and when not ?
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/27211775
linked to: http://stackoverflow.com/q/16063394
type: AnsweredQuestion

http://stackoverflow.com/a/27204582
has comment: http://stackoverflow.com/comment/42891932
has comment: http://stackoverflow.com/comment/42891947
has body: OK, at the risk of getting shot down for answering not the question, but the underlying motivation... I would not do it that way. The button click handler is just a UI interface, quasi-controller, to launch business logic, which is uploading files. Instead, I would isolate the logic into sepaarte functions, and have each click handler invoke its function, and the upload-all invoke them all. Sort of like this: data.context = $('&lt;button name=uploadFile/&gt;').text('Start Individual Upload') .appendTo(document.body) .click(createClickHandler(fileName)); // assuming filename is the name of the file to upload Where createClickHandler is: var allfiles = []; var createClickHandler = function(filename) { var fileupload = function() { // upload file logic referencing "filename" var }, handler = function() { // click handler logic fileupload(); }; allfiles.push(fileupload); return(handler); }; And now when someone clicks the load all: .click(function() { $.each(allfiles,function(f) { f(); }); });
score: 0
answers question: http://stackoverflow.com/q/27204523
type: Answer

http://stackoverflow.com/comment/43035847
comment on: http://stackoverflow.com/q/27283742
type: QuestionComment
score: 0
has text: Are you looking to scale down just the dimensions of the image to fit on screen or are you wanting to reduce the file size and create a low-res version of the image?
type: Comment

http://stackoverflow.com/comment/42966063
type: AnswerComment
comment on: http://stackoverflow.com/a/27245223
score: 0
type: Comment
has text: My idea is not storing user information on client. You can access user information in view like [this](http://stackoverflow.com/questions/263486/how-to-get-current-user-in-asp-net-mvc). Also in most cases asp.net web api is used with asp.net mvc

http://stackoverflow.com/a/27203509
has body: Presumably, the reason you're memoizing the image model in the shop is to maintain listeners and keep a single instance of that model around. Collection#set takes a parse option that tells it to call parse on all the models that were set on the collection. Model#set is the method called immediately after calling parse using the attributes returned from parse. In this case, we want to call #set on the associated shop model using the parsed attributes. So first lets call parse. It should look something like this: SpendYourSavings.Models.Listing = Backbone.Model.extend({ urlRoot: "api/listings", images: function() { this._images = this._images || new SpendYourSavings.Collections.Images([], { listing: this }); return this._images; }, reviews: function() { this._reviews = this._reviews || new SpendYourSavings.Collections.Reviews([], { listing: this }); return this._reviews; }, shop: function() { // Notice the first argument is an object when initializing models. this._shop = this._shop || new SpendYourSavings.Models.Shop({}, { listing: this }); return this._shop; }, parse: function(data) { if(data.images) { this.images().set(data.images, { parse: true }); delete data.images; } if(data.reviews) { this.reviews().set(data.reviews, { parse: true }); delete data.reviews; } if(data.shop) { var shopParams = this.shop().parse(data.shop); this.shop().set(shopParams); delete data.shop; } return data; } } });
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27197702
answers question: http://stackoverflow.com/q/27197702
type: Answer

http://stackoverflow.com/a/27178495
answers question: http://stackoverflow.com/q/27178451
score: 0
has body: You can simply isolate the $(this) inside a variable like so : $('.input [type="number"]').on('blur', function(){ var number = Math.round($(this).val() * 100) / 100; var number = Math.round($(this).val() * 100) / 100; var text = number.toFixed().toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); var this$ = $(this); if (number &lt; 0) { this$.prev().addClass('negative'); text = "("+text.replace(/-/g,"")+")"; } [...]
type: Answer

http://stackoverflow.com/comment/43113302
type: Comment
comment on: http://stackoverflow.com/q/27297256
type: QuestionComment
score: 1
has text: Hm. Are you sure you are using stock Ext.window.MessageBox? I'm looking in the source and it looks totally different from what you have posted here.

http://stackoverflow.com/comment/42925269
type: QuestionComment
has text: http://jsfiddle.net/parthi04/rcfjuk1t/ check ..whether i got your points?
comment on: http://stackoverflow.com/q/27223252
score: 0
type: Comment

http://stackoverflow.com/comment/85707577
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/33227005
has text: @Victoria no the element with id `foo` must be appended in the serialized ` ` itself. Not in an other element, not externally. <img< that will be used in next step won't fetch anything outside of the serialized doc.

http://stackoverflow.com/comment/43038466
type: Comment
has text: @roullie Just tried that and no luck. Thanks for your suggestion though!
score: 0
comment on: http://stackoverflow.com/q/27285366
type: QuestionComment

http://stackoverflow.com/a/27289215
has comment: http://stackoverflow.com/comment/43054185
type: Answer
has comment: http://stackoverflow.com/comment/43078917
has body: Did you check the link of data.html? If the data.html in window.location="data.html"; is the same location of data.html in curl_setopt($ch, CURLOPT_URL, 'https:// ... /data.html'); try to double curl_exec($ch) so may be it needs to access two times. Or if it different, just simple change your link.
has comment: http://stackoverflow.com/comment/43062960
has comment: http://stackoverflow.com/comment/43084098
has comment: http://stackoverflow.com/comment/43087447
answers question: http://stackoverflow.com/q/27288756
has comment: http://stackoverflow.com/comment/43065783
score: 0

http://stackoverflow.com/comment/42986610
type: QuestionComment
score: 6
has text: You need to use time intervals `setInterval(function, delay)`
comment on: http://stackoverflow.com/q/27256486
type: Comment

http://stackoverflow.com/comment/43018173
score: 0
type: Comment
has text: Ok just saw your Fiddle link. So that seems to me to be building HTML or HTML concatenation through a function. I was thinking of that originally but most posts said to use the DOM instead which may not be possible in my scenario. Thank you, I will wait for some other comments but if I do not see any other DOM solutions I will mark your as the answer.
comment on: http://stackoverflow.com/a/27263461
type: AnswerComment

http://stackoverflow.com/a/27252604
has comment: http://stackoverflow.com/comment/42981464
score: 4
answers question: http://stackoverflow.com/q/27238010
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42983624
has body: In order to use websockets, you must use the Google Managed VM with custom runtime. https://cloud.google.com/appengine/docs/managed-vms/custom-runtimes Once that is running, you will need to access that server directly by ip or cname. You cannot go through the appspot.com domain.
downvote count: 0

http://stackoverflow.com/comment/102201479
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27179382
score: 0
has text: @Mehul Kabaria may I ask why you proposed the change of LODing (Level of Detail) to LOADing? There was a reason why it was LODing and not loding…

http://stackoverflow.com/a/27310222
has body: Refer this jsfiddle. It has submit handler which serializes your data and sends it to the server. $('#form-validate').on('submit', function (e) { //prevent the default submithandling e.preventDefault(); alert($(this).serialize()) //send the data of 'this' (the matched form) to yourURL $.post('yourSubmitUrl.php', $(this).serialize()); });
score: 0
answers question: http://stackoverflow.com/q/27309224
accepted answer of: http://stackoverflow.com/q/27309224
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43081706

http://stackoverflow.com/comment/43030982
comment on: http://stackoverflow.com/a/27279645
type: AnswerComment
has text: @jfriend00 the way you talk about single threaded makes it seem like a normal synchronous program. If Node is waiting on database I/O will it pop other ready tasks off the event queue or is it stuck in the currently executing block? Let's say I have a route to / and it accesses the file system as the first move. Can Node get out of that block and handle other connections while waiting for the file system to finish retrieving the file?
score: 0
type: Comment

http://stackoverflow.com/a/27271647
answers question: http://stackoverflow.com/q/27271399
score: 0
type: Answer
has body: Usually it's configured something like this: ... to include script into index.html. Then during build process some grunt/gulp (grunt-usemin, for example) plugins can replace the entire section between comments with minified version of the files.

http://stackoverflow.com/comment/61693107
comment on: http://stackoverflow.com/a/27194360
type: Comment
has text: @SoaperGEM - I am Canadian and I forgot that one. Shame on me! I edited the uncountables.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42812349
has text: I tried an older version, and for some reason, that one is having the same issue now. Bizarre. I realized a relevant detail is that I'm using AngularJS and the checkboxes are inside of an ng-repeat, so they are being populated via Angular... Not that it should matter, I think, since they are already loaded by the time the function is used.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27155167

http://stackoverflow.com/q/27215945
answer count: 2
has answer: http://stackoverflow.com/a/27215994
downvote count: 0
has comment: http://stackoverflow.com/comment/42911859
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27217838
favorite count: 0
has comment: http://stackoverflow.com/comment/42913385
upvote count: 2
has title: Fade-in pictures on page load with jQuery
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27217838
has body: I'm currently using this jQuery snippet to produce the effect of picture fading-in one-by-one when the page is loading: jQuery(document).ready(function($) { animatePictures('img'); }); function animatePictures(selection) { elementsToAnimate = jQuery(selection); elementsToAnimate.hide().each(function(i) { jQuery(this).delay(i * 500).fadeIn(5000); }); } This roughly does the trick, but as you can see, the assets are first loaded, then they are hidden when the DOM is ready and then faded-in in 500ms intervals. I was wondering if you could tell me how I can make it properly so that pictures really fade-in as the site is loading, and are not first hidden and then faded-in. I will appreciate all suggestions. Thanks!
type: Question
possible better answer: http://stackoverflow.com/a/27215994

http://stackoverflow.com/comment/42854078
type: QuestionComment
comment on: http://stackoverflow.com/q/27182889
score: 0
type: Comment
has text: How it is insecure? there is no maximum character limit actually. It is to stop user entering passwords like 111@aaa.AAA

http://stackoverflow.com/comment/44681049
type: AnswerComment
score: 0
type: Comment
has text: you can make `z ` equivalent to half of your 'y' axis rotated box width. `z-index` is unrelated to z-axis. `z-index` is the stacking order of your elements (like layers), whereas `z` has to do with the 3D position on the z-axis (depth). see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_transforms
comment on: http://stackoverflow.com/a/28114132

http://stackoverflow.com/comment/42821614
has text: @sanDecruz I am using jquery1.11.0.min.js
comment on: http://stackoverflow.com/q/27164175
score: 0
type: Comment
type: QuestionComment

dom
tags question: http://stackoverflow.com/q/27207441
tags question: http://stackoverflow.com/q/27222418
type: Tag
tags question: http://stackoverflow.com/q/27276981
tags question: http://stackoverflow.com/q/27221604
tags question: http://stackoverflow.com/q/27252018
tags question: http://stackoverflow.com/q/27312862
tags question: http://stackoverflow.com/q/27243874
tags question: http://stackoverflow.com/q/27240268
tags question: http://stackoverflow.com/q/27216116
tags question: http://stackoverflow.com/q/27155081
tags question: http://stackoverflow.com/q/27310768
tags question: http://stackoverflow.com/q/27157361
tags question: http://stackoverflow.com/q/27221971
tags question: http://stackoverflow.com/q/27233222
tags question: http://stackoverflow.com/q/27186069
tags question: http://stackoverflow.com/q/27236431
tags question: http://stackoverflow.com/q/27236625
tags question: http://stackoverflow.com/q/27186172
tags question: http://stackoverflow.com/q/27170043
tags question: http://stackoverflow.com/q/27210890
tags question: http://stackoverflow.com/q/27168451
tags question: http://stackoverflow.com/q/27158744
tags question: http://stackoverflow.com/q/27193301
tags question: http://stackoverflow.com/q/27310666
tags question: http://stackoverflow.com/q/27179783
tags question: http://stackoverflow.com/q/27259800
tags question: http://stackoverflow.com/q/27181183
tags question: http://stackoverflow.com/q/27156306
tags question: http://stackoverflow.com/q/27265282
tags question: http://stackoverflow.com/q/27303156
tags question: http://stackoverflow.com/q/27266901
tags question: http://stackoverflow.com/q/27247771
tags question: http://stackoverflow.com/q/27188228
tags question: http://stackoverflow.com/q/27167497
tags question: http://stackoverflow.com/q/27216301
tags question: http://stackoverflow.com/q/27302978
tags question: http://stackoverflow.com/q/27245273
tags question: http://stackoverflow.com/q/27175115
tags question: http://stackoverflow.com/q/27298389
tags question: http://stackoverflow.com/q/27301458
tags question: http://stackoverflow.com/q/27295740
tags question: http://stackoverflow.com/q/27159967
tags question: http://stackoverflow.com/q/27266885
tags question: http://stackoverflow.com/q/27229275
tag name: dom
tags question: http://stackoverflow.com/q/27183408
tags question: http://stackoverflow.com/q/27307269
tags question: http://stackoverflow.com/q/27298150
tags question: http://stackoverflow.com/q/27170752
tags question: http://stackoverflow.com/q/27224863
tags question: http://stackoverflow.com/q/27196753

http://stackoverflow.com/comment/42819314
comment on: http://stackoverflow.com/q/27163211
score: 0
type: Comment
type: QuestionComment
has text: But it might be on-topic for Code Reviews.

http://stackoverflow.com/comment/42958047
type: AnswerComment
comment on: http://stackoverflow.com/a/27221212
type: Comment
score: 0
has text: I see. I'm glad you were able to get it to work. The reason that I could loop is because queryAllSelector() returns an array.

http://stackoverflow.com/q/27294144
favorite count: 0
possible better answer: http://stackoverflow.com/a/27299431
has body: How can I hide the ticks on the y-axis? I currently achieve it by editing tick.format, as can be seen in this JSFiddle http://jsfiddle.net/DanielApt/bq17Lp02/1/ I'm not happy with this solution, as the y-axis label is being cut off So how can I hide ticks without having y-axis label being cut off? Thank you for your help in advance!
tagged with: c3.js
has answer: http://stackoverflow.com/a/27299431
upvote count: 7
type: Question
has answer: http://stackoverflow.com/a/49052863
type: AnsweredQuestion
has title: C3js: How to hide ticks on y-axis? Y-Axis label is cut off
accepted answer: http://stackoverflow.com/a/27359802
score: 7
downvote count: 0
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/27359802

http://stackoverflow.com/comment/43028000
type: Comment
comment on: http://stackoverflow.com/a/27201960
type: AnswerComment
has text: I have created a [fiddle](http://jsfiddle.net/73vzD/191/) for it. Look into it. If still you have some issues, ask me.
score: 0

http://stackoverflow.com/comment/42950178
has text: Please include your code in the question, or create a demo on a site like http://jsfiddle.net No one is gonna download that mediafire link.
comment on: http://stackoverflow.com/q/27236731
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/27184049
has answer: http://stackoverflow.com/a/27185236
has comment: http://stackoverflow.com/comment/42855627
has comment: http://stackoverflow.com/comment/42855716
type: Question
has answer: http://stackoverflow.com/a/27184244
has title: Minimize the use of "Many repeated if statement"
has comment: http://stackoverflow.com/comment/42855415
has comment: http://stackoverflow.com/comment/42855862
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27184244
has comment: http://stackoverflow.com/comment/42855449
score: 0
accepted answer: http://stackoverflow.com/a/27185236
has answer: http://stackoverflow.com/a/27184320
favorite count: 0
has comment: http://stackoverflow.com/comment/42855427
has body: I got a script using TONS of if statement to do a task... But.... Most of them repeated like: if (parent.getObject()=='apple') { if (datatype('fruit')){ //do a parent.setObjectType('fruit'); } else if (datatype('beverage')){ //do a parent.setObjectType('beverage'); } } else if (parent.getObject()=='banana') { if (datatype('fruit')){ //do a parent.setObjectType('fruit'); } else if (datatype('beverage')){ //do a parent.setObjectType('beverage'); } } else if (parent.getObject()=='coconut') { if (datatype('fruit')){ //do a parent.setObjectType('fruit'); } else if (datatype('beverage')){ //do a parent.setObjectType('beverage'); } } else if (parent.getObject()=='Dewberry') { if (datatype('fruit')){ //do a parent.setObjectType('fruit'); } else if (datatype('beverage')){ //do a parent.setObjectType('beverage'); } } Is it possible for me to minimize the use of those repeated codes? I don't want to use up all the spaces only with lines of if else statement...
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42855907
has comment: http://stackoverflow.com/comment/42855438
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27184272

http://stackoverflow.com/q/27256877
linked to: http://stackoverflow.com/q/1164213
has comment: http://stackoverflow.com/comment/42989249
has comment: http://stackoverflow.com/comment/42987664
has comment: http://stackoverflow.com/comment/42989264
has comment: http://stackoverflow.com/comment/42987628
downvote count: 0
has comment: http://stackoverflow.com/comment/73329747
has comment: http://stackoverflow.com/comment/42989218
has title: Stop Propagation on Input Click
type: Question
has comment: http://stackoverflow.com/comment/42989967
score: 5
answer count: 1
has comment: http://stackoverflow.com/comment/42988570
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42990155
tagged with: stoppropagation
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27258378
has comment: http://stackoverflow.com/comment/42987524
has comment: http://stackoverflow.com/comment/42987611
has body: I have an html table, and when a user clicks a table row, the row's checkbox is checked, and some other functionality occurs. When a user clicks on a select or input, I would like to stop the propagation so the checkbox does not change. I have demonstrated the functionality I am looking for in this JSFiddle: http://jsfiddle.net/ehf7pc3f/6/ On my development site, when a user clicks a select, the checkbox is changed (as intended), but if a user clicks an input, the checkbox does not change. I have this code to stop the checkbox from changing: $("select").click(function (e) { e.stopPropagation(); }); $("input").click(function (e) { e.stopPropagation(); }); Does anyone have an idea as to why the select click works, but the input click does not? Update* JSFiddle: http://jsfiddle.net/ehf7pc3f/8/ I have added a new JSFiddle that fires an alert when the input is clicked and an alert when a row is clicked. In the fiddle, if I click the input, only the input alert fires. If I do this same test on my development site, only the row alert fires. Here's the actual code on my development site: Owner Owner Applicant Contractor Owner Michael Douglas
upvote count: 5
type: UnansweredQuestion

http://stackoverflow.com/a/27279823
type: Answer
answers question: http://stackoverflow.com/q/27279596
has body: I think it's more common to see something like this, where you attach things to an injected $scope instead of this, and then you don't have to put a namespace qualifier on the references in the HTML. Sign In Name Name is required. Must be at least 3 characters. Sign in app.controller('LoginCtrl', ['$scope', '$log',function($scope, $log){ $scope.submit = function(){ console.log($scope.myForm); if($scope.myForm.$valid){ console.log('the form is valid'); } }; }]);
has comment: http://stackoverflow.com/comment/43030890
has comment: http://stackoverflow.com/comment/43028472
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27279596

http://stackoverflow.com/comment/43063133
type: Comment
comment on: http://stackoverflow.com/a/27298685
has text: wait a minute, i'm not trying to acess the iframe, I'm just saying that errors are from the iframe. The real issue is the fadeToggle and slideToggle its not working... animate, alert, .css, .click its working, fade and slide in the .cont-1 and .cont-2 div is not :/
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42878028
score: 0
has text: You're checking the width as the animation starts, and at that point the elements have no width. Why aren't you just using the `level` variable, as you already have the number you want there ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27196557

http://stackoverflow.com/comment/42837157
type: AnswerComment
score: 0
type: Comment
has text: The problem is that there are several id I use a php loop.
comment on: http://stackoverflow.com/a/27173518

http://stackoverflow.com/a/37054156
type: Answer
answers question: http://stackoverflow.com/q/27169820
score: 0
has body: var node = $tree.jstree().get_node(id), formatted_name = $tree.jstree().get_text(node); $.each(node.parents, function(key, parentId) { if ( parentId !== "#" ) { var parent = $tree.jstree().get_node(parentId); formatted_name = $tree.jstree().get_text(parent) + "-&gt;" + formatted_name; } }); console.log(formatted_name);

http://stackoverflow.com/comment/42964889
score: 0
has text: Here i'll update the code with a jsfiddle one moment
type: Comment
comment on: http://stackoverflow.com/q/27244704
type: QuestionComment

http://stackoverflow.com/a/27253062
has comment: http://stackoverflow.com/comment/42984821
has comment: http://stackoverflow.com/comment/42984622
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27252660
type: Answer
answers question: http://stackoverflow.com/q/27252660
has body: You can detach the parent from DOM then reinsert it into the modal dialog - it doesn't duplicate the video, but you can always use a placeholder in the background while in modal, and when closing modal window move it back. A simple example: var hasMoved = false; $("#move").on("click", function() { var parent = $("#parent"); var player = $("#player"); // get reference to add and to keep alive if (hasMoved) { $("#modal").remove("#player"); // remove from modal container parent.append(player); $("#video")[0].play(); // video will stop, continue to play hasMoved = false; } else { parent.remove("#player"); // remove player container and all controls inside $("#modal").append(player); // append to new container $("#video")[0].play(); // video will stop, continue to play hasMoved = true; } }); #parent {border:1px solid blue} #modal {border:1px solid red} &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="parent"&gt; &lt;div id="player"&gt; &lt;video id="video" width="500" height="280" preload="auto" autoplay&gt; &lt;source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" type="video/mp4"&gt; &lt;source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm" type="video/webm"&gt; &lt;source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv" type="video/ogg"&gt; &lt;/video&gt; &lt;button&gt;Play&lt;/button&gt;&lt;button&gt;Stop&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;button id="move"&gt;Move --&amp;gt;&lt;/button&gt; &lt;div id="modal"&gt;&lt;/div&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/42984438
score: 1

http://stackoverflow.com/a/27258176
has body: You can use this structure to do this: &lt;div class="container"&gt; &lt;div class="image-container"&gt;&lt;/div&gt; &lt;img src="coolimage.png"&gt; &lt;/div&gt; The image-container has a background-color and border-radius of 50% so that it remains as a circle (you may have to change the height/width to do this). Then during a click event on the image, you raise the z-index of the elements and you transform: scale() the image-container so that it fills the larger container (needs overflow:hidden). During this, you also move the image to wherever you want it. Make sure you apply a easeOut transition as the Material Design specifies.
answers question: http://stackoverflow.com/q/27171559
score: 0
type: Answer

http://stackoverflow.com/q/27244572
score: 0
has answer: http://stackoverflow.com/a/27253922
answer count: 1
has body: I've created a form page using Jade and it is being validated using the jQuery Validation plugin. I would like to style my error messages, using Bootstrap. I would like to use the .has-error class and the .has-success class. These have to be used on the parent div with class .form-group. More details here. I have been playing around with the errorClass, errorElement, errorContainer, ... options, but I can't seem to find the right combination. What am I missing here? This is my form: form#signupForm.form-horizontal(method='post', action='') .form-group label.col-sm-2.control-label(for='firstName') | First Name: .col-sm-10 input#firstName.form-control(type='text', placeholder='John',name='firstName') .form-group label.col-sm-2.control-label(for='lastName') | Last Name: .col-sm-10 input#lastName.form-control(type='text', placeholder='Doe', name='lastName') .form-group .col-sm-2.control-label button.btn.btn-default(type='submit') | Submit I tried this in my validation code: errorElement: 'div', errorClass: 'has-error',
tagged with: jquery
has comment: http://stackoverflow.com/comment/42964920
has comment: http://stackoverflow.com/comment/42965213
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27253922
has title: Styling jQuery Validation error messages
has comment: http://stackoverflow.com/comment/42992528
tagged with: javascript
tagged with: jquery-validate
type: Question

http://stackoverflow.com/comment/43014264
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27272029
score: 1
has text: I don't use ST, but I quickly googled for "sublime text structural search" and the first hit was [grasp](http://www.graspjs.com/blog/2013/12/17/grasp-0.2.0-released/) which seems to do what you're looking for (and much more).

http://stackoverflow.com/q/27239959
answer count: 1
tagged with: jsp
has comment: http://stackoverflow.com/comment/42957263
tagged with: jquery
has comment: http://stackoverflow.com/comment/42957189
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42957201
has comment: http://stackoverflow.com/comment/42957164
has comment: http://stackoverflow.com/comment/42957133
type: Question
has answer: http://stackoverflow.com/a/27240401
has title: Passing data from jsp to javascript
has body: I have an AJAX call that returns html, so I just call $("#my-div").html(data) in my javascript. However, I am using twbsPagination which requires setting up the element through javascript. The html element is defined as &lt;input type="hidden" name="totalPageCount" id="totalPageCount" value="${totalPageCount}"/&gt; &lt;ul id="pagination" class="pagination-sm"&gt;&lt;/ul&gt; and the javascript is: callingFunction() { data = doAjaxCall().done(myFunction); } myFunction(data) { $('#pagination').twbsPagination({ totalPages: $("#totalPageCount").val(), visiblePages: 5, onPageClick: function (event, page) { ... } }); $("#my-div").html(data); } Even though I have confirmed that the hidden field totalPageCount has the right value, $("#totalPageCount").val() returns the empty string. I'm guessing this is because it's looking for this element that only exists inside the html of data, not as part of what jquery is looking at. What is the standard way to pass this kind of data?
tagged with: pagination
tagged with: javascript
score: 0

http://stackoverflow.com/comment/43073871
has text: i dont think so, but Thank you for your code who work perfectly...i'll try to put the code in the footer perhaps will work in my website. Thanks again.
comment on: http://stackoverflow.com/a/27301925
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27246039
answers question: http://stackoverflow.com/q/27245652
type: Answer
has body: var bind = function() { var fns = Array.prototype.slice.call(arguments).reverse(); return function(value) { for (var key in fns) { var fn = fns[key]; console.log(fn); value = fn(value); } return value; } } function plusTomato(value) { return value + "tomato"; } function plusPear(value) { return value + "pear"; } var plus = bind(plusTomato, plusPear); var y = plus("pancake"); //pankaketomatopear console.log(y); var x = plusTomato(plusPear("pancake")); //pankaketomatopear console.log(x);
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42970956
score: 0

http://stackoverflow.com/comment/43118235
type: Comment
comment on: http://stackoverflow.com/a/27330018
has text: So, I did type page id `#pageResult` into this `$(document).on('pagebeforeshow', "#pageResult", function () { ...}) `. That doesn't select just that one `.ui-content` in `#pageHome` of the form.html?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43011401
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27270538
has text: In this [fiddle](http://jsfiddle.net/j8tk2wko/) the function itself is working, but the easing seems to be missing. With a linear-easing it all works fine

http://stackoverflow.com/comment/42957716
comment on: http://stackoverflow.com/q/27240623
score: 0
has text: I think it is good to know that there is good reason why the tables need different IDs to work — non-unique IDs are not semantically valid in HTML, and browser behavior is technically undefined when encountering non-unique IDs, although they tend to simply select the first occurrence.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42972423
has text: @Paulie_D consider it as (selected numbers !), it's not matter the name of class
comment on: http://stackoverflow.com/q/27248912
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43032629
type: AnswerComment
has text: Got it to work using `students.scan([], ".concat").onValue(...)`, now I'm one step closer to my personal modular Meteor C:
comment on: http://stackoverflow.com/a/27261877
type: Comment
score: 1

http://stackoverflow.com/comment/123366650
type: Comment
has text: How to make this in python? I'm using folium
comment on: http://stackoverflow.com/a/27272673
score: 0
type: AnswerComment

http://stackoverflow.com/q/27205243
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27206583
has comment: http://stackoverflow.com/comment/42893222
tagged with: javascript
has answer: http://stackoverflow.com/a/32758366
tagged with: angularjs
has body: I am Working on VF page in which i have used Angular js. What I am doing is bring data from custom object using query inside controller anf then serializing its using json.serialisation.using that string on VFPage . Now I am displaying that on page. I have copied code from a blog what it does is display record with pagination and does the sorting of the record on particular. What I want is it should do sorting for the whole data. below is the code.. lodata is the serialized data that I am bringing from controller var myapp = angular.module('hello', []); var sortingOrder = ''; var sortingOrderWO = 'createdDateWO'; //var $scope; var new_sorting_order = null; //this.$scope = $scope; //this.$filter =$filter; $scope.sortingOrder = sortingOrder; $scope.reverse = false; $scope.filteredItems = []; $scope.groupedItems = []; $scope.itemsPerPage = 15; $scope.pagedItems = []; $scope.currentPage = 0; $scope.items = lodata; var searchMatch = function (haystack, needle) { if (!needle) { return true; } return haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1; }; //Initialize the Search Filters $scope.search = function () { $scope.filteredItems = $filter('filter')($scope.items, function (item) { for (var attr in item) { if (searchMatch(item[attr], $scope.query)) return true; } return false; }); // Define Sorting Order if ($scope.sortingOrder !== '') { $scope.filteredItems = $filter('orderBy')($scope.filteredItems, $scope.sortingOrder, !$scope.reverse); } $scope.currentPage = 0; // console.log(JSON.stringify($scope.filteredItems)); // Group by pages $scope.groupToPages(); }; $scope.groupToPages = function () { $scope.pagedItems = []; for (var i = 0; i &lt; $scope.filteredItems.length; i++) { if (i % $scope.itemsPerPage === 0) { $scope.pagedItems[Math.floor(i / $scope.itemsPerPage)] = [$scope.filteredItems[i]]; } else { $scope.pagedItems[Math.floor(i / $scope.itemsPerPage)].push($scope.filteredItems[i]); } } }; $scope.range = function (start, end) { var ret = []; if (!end) {…
has comment: http://stackoverflow.com/comment/42893372
has comment: http://stackoverflow.com/comment/42893566
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27206583
type: Question
has title: Sorting on Page
accepted answer: http://stackoverflow.com/a/32758366

http://stackoverflow.com/a/27301512
has comment: http://stackoverflow.com/comment/43066693
has body: Try first removing any prior listeners and such that DataTable may have already attached to the table (especially since you're identifying it via a Class, rather than an ID). Then, initialize the table. So, replace this... $('.dat').DataTable(); With this... $('.dat').DataTable().destroy(); $('.dat').DataTable();
score: 0
has comment: http://stackoverflow.com/comment/43068029
has comment: http://stackoverflow.com/comment/43068579
type: Answer
has comment: http://stackoverflow.com/comment/43066861
has comment: http://stackoverflow.com/comment/43067185
has comment: http://stackoverflow.com/comment/43066651
answers question: http://stackoverflow.com/q/27301080

http://stackoverflow.com/a/27248263
upvote count: 1
has body: You did not include jquery in your project. change this line to this line or any other version in https://code.jquery.com/
downvote count: 0
answers question: http://stackoverflow.com/q/27248183
type: Answer
score: 1

http://stackoverflow.com/q/27244578
has comment: http://stackoverflow.com/comment/42964756
has title: Display div on mouse hover
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42964424
has answer: http://stackoverflow.com/a/27246407
has answer: http://stackoverflow.com/a/27244997
tagged with: javascript
has answer: http://stackoverflow.com/a/27244622
tagged with: jquery
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has body: I have a link id="show" in header and a div id="display" in footer. I want to display div id="display" when mouse hover on id="show" that is in header area and div is in footer area. HTML CODE: Show Div <---- Other Content --> --- Content ---
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/42964416
score: 0

http://stackoverflow.com/comment/43480988
score: 0
comment on: http://stackoverflow.com/a/27299649
type: Comment
has text: @Iwang135 : hey Buddy, thanks it did. Sorry i had no chance to check it any sooner. But i did check it lately and it did work. Thanks buddy ;)
type: AnswerComment

http://stackoverflow.com/a/27311439
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27311411
upvote count: 1
has comment: http://stackoverflow.com/comment/43083687
has body: Selector > means that you are interested only in direct child element, it helps to define deph of your selector. $('#ecoTableTotal').on('click', 'tbody &gt; tr &gt; td:first' , function (event) { console.log('click'); });
has comment: http://stackoverflow.com/comment/43083589
has comment: http://stackoverflow.com/comment/43083723
has comment: http://stackoverflow.com/comment/43083552

http://stackoverflow.com/a/30685106
has body: angularjs will always execute controllers when ever page is get redirected from one page to another page if you written controller as page specific. If your application is SPA then you can rewrite by specifying a controller before declaring ng-view (its not a good practice).as &lt;div ng-controller="controller as cont"&gt; &lt;div ng-view&gt; &lt;/div&gt; &lt;/div&gt; now it will hold all your data until the application get closed.but, you should aware of cache.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27268630
downvote count: 0
type: Answer

http://stackoverflow.com/a/27346243
accepted answer of: http://stackoverflow.com/q/27281995
score: 1
type: AcceptedAnswer
has body: You wanna create a Building out of thousands of objects? If I get it correctly: - Create the Building in Blender and import it, or - Create the Building out of ONE Geometry with thousands of vertices and faces Can you upload an example Code in jsfiddle?
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27281995
has comment: http://stackoverflow.com/comment/43183028
upvote count: 1

http://stackoverflow.com/comment/42956490
type: AnswerComment
type: Comment
has text: The core team are discouraging the use of `needs` for any use case now because controllers will likely be phased out in Ember 2.0 and replaced with routable components.
comment on: http://stackoverflow.com/a/27200154
score: 0

http://stackoverflow.com/a/27238642
has comment: http://stackoverflow.com/comment/42954491
answers question: http://stackoverflow.com/q/27238614
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27238614
score: -1
upvote count: 0
type: AcceptedAnswer
type: Answer
has body: Try using window.load as below: $( window ).load(function() { // Run code }); This will guarantee that the page is fully loaded first Further to your comment. You can't assign load event to a single element just like that. You need to wait for all elements to be loaded(whole page) if you want to use the window.load event. However, what I could suggest you is something like : function checkStatus() { var check = $(#yourELEMENT NAME) if (check == null) { //Change the time to whatever you like setTimeout("checkStatus()", 100); } else { ... } } In this case you will wait some time until the element loads which should be enough for it to be set and then you can manipulate it as you like. And lastly, please accept the answer if it works for you.

http://stackoverflow.com/comment/42960993
has text: @TomášZato gCS always calculates in pixels, in fact, everything in the browser is eventually ending up in pixels as this is the only unit the screen understands. So when using arbitrary units such as pt, em etc. these are converted to pixels internally before displaying anything which again becomes the basis for gCS when you request a dimension.
comment on: http://stackoverflow.com/a/27204448
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42970163
type: Comment
has text: see this:http://stackoverflow.com/questions/4631928/convert-utc-epoch-to-local-date-with-javascript
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27247683

http://stackoverflow.com/a/27280368
has comment: http://stackoverflow.com/comment/43030937
upvote count: 2
has comment: http://stackoverflow.com/comment/43029428
has comment: http://stackoverflow.com/comment/43029811
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43029399
has comment: http://stackoverflow.com/comment/43030165
has body: because ajax is executed ansynchronous. if you want text like that to appear, you need to use callbacks in your ajax functions. update: since you are using async: false this behaviour seems really strange, but I don't know how javascript and jquery exactly handle synchronous calls in your case. one hotfix-suggestion would be to still add callbacks to your functions. (note: this is a very messy workaround and should just help you hotfixing your problem.) function YourTeamFirst(YourTeam, TeamValue, callback) { /* ... */ $.ajax({ /* ... */ success: function (resp) { /* ... */ callback(); } }); } then in your function calls add anonymous functions as callback-parameter. in the body of these functions always add the .html() for the next function to be executed. $("#updates").html("Collecting your team names."); YourTeamFirst(YourTeam, TeamValue, function () { $("#updates").html("Collecting their team names."); }); TheirTeamNext(TheirTeam, TeamValue, function () { $("#updates").html("Gathering ID's."); }); /* ... */
type: Answer
has comment: http://stackoverflow.com/comment/43029326
accepted answer of: http://stackoverflow.com/q/27280335
has comment: http://stackoverflow.com/comment/43030364
answers question: http://stackoverflow.com/q/27280335
has comment: http://stackoverflow.com/comment/43030506
has comment: http://stackoverflow.com/comment/43030873
has comment: http://stackoverflow.com/comment/43029379
has comment: http://stackoverflow.com/comment/43029496
score: 2
has comment: http://stackoverflow.com/comment/43031129
downvote count: 0
has comment: http://stackoverflow.com/comment/43029960
has comment: http://stackoverflow.com/comment/43031077

http://stackoverflow.com/comment/42813405
comment on: http://stackoverflow.com/a/27159327
type: Comment
has text: I have to admit I acted out of laziness which I shouldn't have. I am fairly new to Stackoverflow and I really appreciate all feedback (specially wrong practices) in my answers. Thanks.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27311024
has body: Note that the popstate event is fired only when an actual browser action is taken; calling history.pushState does not fire the event. That said, if you take the history handler out of the event listener and into a standalone function, you can call it manually on page load (to be safe; some browsers fire a popstate event on pageload, and some do not) and after you push history. Example: $(document).ready(function() { // add a hash to the URL when the user clicks on a tab $('a[data-toggle="tab"]').on('click', function(e) { history.pushState(null, null, $(this).attr('href')); updateTabs(); }); function updateTabs() { var activeTab = $('[href=' + location.hash + ']'); if (activeTab.length) { activeTab.tab('show'); $(window).scrollTop(0); } else { $('.nav-pills a:first').tab('show'); } } // navigate to a tab when the history changes window.addEventListener("popstate", updateTabs); // make sure the correct tab is set on pageload updateTabs(); });
accepted answer of: http://stackoverflow.com/q/27303630
type: Answer
answers question: http://stackoverflow.com/q/27303630
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27229135
score: 0
answer count: 1
tagged with: websocket
has comment: http://stackoverflow.com/comment/42977784
has comment: http://stackoverflow.com/comment/42950266
has comment: http://stackoverflow.com/comment/42958842
has body: I'm sending some data to my WebSocket server which is sometimes giving me some strange characters usually caused by the last '" (could be a co-incidence that it's always the last one). Putting a space between these characters solves the problem. I'd rather get it right however than rely on my clients implementing this space (just in case there are other combos that could result in undesired data). An example of the JSON string I am sending in my websocket connection is: { "action": "query", "tag": "test", "sql": "SELECT * FROM settings WHERE param = 'test'" } The websocket server receives: { "action": "query", "tag": "test", "sql": "SELECT * FROM settings WHERE param = 'test'"b} I've tried sending as single line data too which doesn't solve the issue. One of the clients is written in JavaScript and the other in C++, both have this same issue. Depending on what is in the single quotes I get a different result. The code for my test JavaScript client is as follows: var socket = new WebSocket("ws://localhost:3399"); socket.onmessage = function (e) { console.log(e.data); document.querySelector("#response").innerHTML = e.data; }; function sendMessage() { var ws_message = document.querySelector("#ws_message").value; socket.send(ws_message); } And the Node.js websocket server: connections[connection_id].on('message', function (message) { if (message.type === 'utf8') { // accept only text try { var args = JSON.parse(message.utf8Data); handleActions(args, connection_id); } catch (e) { serverLog(connection_id, "Message not formatted correctly"); } } }); Any help would be much appreciated! EDIT: It changes every time I send it... { "action": "query", "tag": "test", "sql": "SELECT * FROM settings WHERE param = 'fullscreen'" R { "action": "query", "tag": "test", "sql": "SELECT * FROM settings WHERE param = 'fullscreen'" 5 EDIT 2: Even creating an array of the data on the client and using JSON.stringify causes the same issue. Server Log: [1/12/2014 13:57:39] (conn: 1) Received Mes…
has comment: http://stackoverflow.com/comment/42951485
accepted answer: http://stackoverflow.com/a/27251425
has title: JavaScript WebSocket character encoding issue (text)
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42948570
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27251425
has comment: http://stackoverflow.com/comment/42959793
has comment: http://stackoverflow.com/comment/42951923
has comment: http://stackoverflow.com/comment/42976720
has comment: http://stackoverflow.com/comment/42964235

http://stackoverflow.com/comment/43073571
type: AnswerComment
score: 0
type: Comment
has text: I want this template to appear every time I hit a button, so essentially I could have multiple buttons. Can I connect this to a js function so it generates a new template each time?
comment on: http://stackoverflow.com/a/27305472

http://stackoverflow.com/comment/46873397
comment on: http://stackoverflow.com/q/27178614
type: QuestionComment
type: Comment
has text: For reference this helped me https://parse.com/questions/cloudcode-adding-user-to-role-on-beforesave I had multiple actions within one function, and could not get this to work. The issue was the response.success was being called someplace else in the function so my role set up wasnt getting time to complete. Wasted 3 hrs on it... damm javascript !!
score: 0

http://stackoverflow.com/a/27169925
type: Answer
has body: Assuming that you want to get the selected option value of all &lt;select&gt; tags inside all &lt;td&gt; tags inside the clicked row, the following script will work $('#info tbody').on('click', 'tr', function() { $(this).children('td').each(function() { $(this).children('select').each(function() { alert($(this).val()); }); }); }); Working demo: http://jsfiddle.net/rjvurqdz/2/ If you want to get the value of all elements inside all &lt;td&gt; tags inside the clicked row, use this script $('#info tbody').on('click', 'tr', function() { $(this).children('td').each(function() { $(this).children().each(function() { alert($(this).val()); }); }); }); Working demo: http://jsfiddle.net/rjvurqdz/6/
has comment: http://stackoverflow.com/comment/42831097
answers question: http://stackoverflow.com/q/27169730
has comment: http://stackoverflow.com/comment/42831728
downvote count: 0
has comment: http://stackoverflow.com/comment/42831365
has comment: http://stackoverflow.com/comment/42830953
accepted answer of: http://stackoverflow.com/q/27169730
has comment: http://stackoverflow.com/comment/42831556
score: 1
has comment: http://stackoverflow.com/comment/42831645
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42831283

http://stackoverflow.com/a/27182887
accepted answer of: http://stackoverflow.com/q/27171512
answers question: http://stackoverflow.com/q/27171512
upvote count: 1
has body: Well I figured it out now. var str = "document.write('&lt;script&gt;document.write(\"&lt;script&gt;document.write(\"Hello World\");&lt;\/script&gt;\");&lt;\/script&gt;')"; var aStr, scriptEle = document.createElement('script'); aStr = str.replace(/["']/g, '"'); aStr = aStr.replace(/"&lt;script&gt;document.write/g, ""); aStr = aStr.replace(/;&lt;\/script\&gt;"/g, ""); scriptEle.innerHTML = aStr; // console.log(aStr); document.body.appendChild(scriptEle); This also handles n level of nesting.
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42834910
type: Comment
comment on: http://stackoverflow.com/a/27170707
type: AnswerComment
score: 0
has text: I meant command line, I don't think you would be able to do that... You should write a service you could call from your javascript that would run phantomjs on the server and somehow return or leave in a known place the resulting pdf.

http://stackoverflow.com/a/27190815
has body: this seems to do it '&lt;%# "chng(\"" + Container.DataItemIndex + "\")" %&gt;'
type: Answer
accepted answer of: http://stackoverflow.com/q/27188512
answers question: http://stackoverflow.com/q/27188512
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27299719
tagged with: string
has body: I have this small javascript to validate form input. function validateFormOnSubmit(theForm) { var reason = ""; reason += validateEmail(theForm.courriel); if (reason != "") { alert("Some fields need correction:\n" + reason); return false; } return true; } function trim(s) { return s.replace(/^\s+|\s+$/, ''); } I'm tryin to figure out how to get the "alert" message as a string to show it later on the page instead of popping this ridiculous box. Looks simple to me but i'm a big zero in js. Any help appreciated, Thanks !
has answer: http://stackoverflow.com/a/27299797
has answer: http://stackoverflow.com/a/27299783
tagged with: alert
has answer: http://stackoverflow.com/a/27299838
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 0
answer count: 3
has title: Javascript convert alert to string

http://stackoverflow.com/a/27312932
has body: $('div#message').fadeIn(3000,function() { $(this).delay(3000); $(this).fadeOut(200); }); Hope this will work for you.
score: 0
answers question: http://stackoverflow.com/q/27311956
type: Answer

http://stackoverflow.com/a/27210914
upvote count: 2
downvote count: 1
type: Answer
score: 1
has body: Yeah, do something like this. var functionA = function(length) { // do something }, functionB = function(length) { functionA(1); } module.exports = {functionA: functionA, functionB: functionB}; Now you can call each from outside using require('utilityfunctions').functionA or require('utilityfunctions').functionB and call each from inside.
answers question: http://stackoverflow.com/q/27210871

http://stackoverflow.com/q/27217708
favorite count: 0
has comment: http://stackoverflow.com/comment/42915121
accepted answer: http://stackoverflow.com/a/27217941
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42915134
has title: Make script works for both input, is possible?
has body: I'm working on this script that takes this as input: { "success":true, "entities":[ { "pais":{ "id":2, "nombre":"Bolivia" } }, { "pais":{ "id":5, "nombre":"Colombia" } }, { "pais":{ "id":6, "nombre":"Costa Rica" } } ], "idToUpdate":"1" } And outputs this: Bolivia, Colombia, Costa Rica. Taking the input example I provide earlier this is how I call the function: showList('#distTd-' + data.idToUpdate, paisesFromEntity, data.entities); That's fine but I now I'm getting this input also: { "success":true, "entities":{ "id":5, "nombre":"dgdfgdfg", "direccion":"5654645", "telefono":"656546", "pais":[ { "id":1, "nombre":"Argentina" }, { "id":2, "nombre":"Bolivia" } ] } } Which differs a bit from the first input so script on this case is not working because the pais key is missing. Can any help me to get ride of this? I can't change the server side that returns the new JSON. var fullList = []; $(document).ready(function(){ var uniq = function (arr) { var ids = {}; arr.forEach(function(obj) { objPais = obj.pais.id === "undefined" ? obj.id : obj.pais.id; ids[objPais] = obj; }); return Object.keys(ids).map(function(id) { return ids[id]; }); }; function showList(selector) { var items = [].slice.call(arguments, 1).filter(function(item) { return item; }), arr = fullList.concat.apply(fullList, items), list = uniq(arr), spans = list.map(function(val, i) { return '&lt;span id="' + val.pais.id +'"&gt;' + val.pais.nombre + '&lt;/span&gt;'; }); if ($(selector).text().length &gt;0) { $(selector).append(', '); } $(selector).append(spans.join(', ')); } $("#btn1").on("click", function(){ var arr1 = [{"pais":{"id":1,"nombre":"Country1"}},{"pais":{"id":2,"nombre":"Country2"}}], arr2 = [{"pais":{"id":1,"nombre":"Country1"}},{"pais":{"id":3,"nombre":"Country3"}},{"pais":{"id":4,"nombre":"Country4"}}], arr3 =[{"pais":[{"id":1,"nombre":"Argentina"},{"id":2,"nombre":"Bolivia"}]}]; showList('#update', arr1, undefined, arr2, arr3); }); $("#btn2").on("click", function(){ var arr3 = [{"pais":{"id":5,"n…
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27217941
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27259735
has comment: http://stackoverflow.com/comment/42992956
has comment: http://stackoverflow.com/comment/42992940
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42992949
type: Question
has title: Javascript load content into div
tagged with: javascript
has comment: http://stackoverflow.com/comment/42992922
has comment: http://stackoverflow.com/comment/42992924
has comment: http://stackoverflow.com/comment/43007084
score: 0
has comment: http://stackoverflow.com/comment/43003786
has comment: http://stackoverflow.com/comment/42992847
has comment: http://stackoverflow.com/comment/42993013
has body: I'm trying to make a page that loads custom content into a div based on a click in an image map. This is just some of the code, but the problem is that the content in the div with ID piece does not change when I click the link with ID dec. I have tried normal links and many other techniques, but can't seem to get it working. Appreciate all help! Content here
answer count: 0

http://stackoverflow.com/comment/43005400
comment on: http://stackoverflow.com/q/27267013
has text: Is there a reason that you cannot use the id? In other words, do you want to (but its not working), or are you checking for alternatives?
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27306757
has comment: http://stackoverflow.com/comment/43075918
has comment: http://stackoverflow.com/comment/43076100
tagged with: javascript
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27306820
has answer: http://stackoverflow.com/a/27306830
tagged with: css
has body: I have a 2 radio buttons and a checkbox as shown in below code and fiddle.. &lt;body&gt; &lt;input type = "radio"/&gt; Love &lt;input type = "radio"/&gt; Hate &lt;input type = "Checkbox"/&gt; Just do it! &lt;/body&gt; http://jsfiddle.net/jjaleel/3n1ngwy0/ When the checkbox is checked, I want the radio button 'Love' to be automatically selected. The simplest Javascript or CSS code code is what I need. Thanks.
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27306830
has title: Enable html radio buttom when checkbox selected (basic JS or CSS)
type: Question
has answer: http://stackoverflow.com/a/27306820

http://stackoverflow.com/comment/42842176
type: QuestionComment
has text: Does it send ajax request twice in firebug?
score: 0
comment on: http://stackoverflow.com/q/27176465
type: Comment

http://stackoverflow.com/a/28326413
type: Answer
answers question: http://stackoverflow.com/q/27215626
has body: Crypto is a library you would normally load on your page. The error means the function has not been defined; i guess the $.getScript is not working as you intend it to. note: you should never-ever expose publicly you AWS secret key. You can't encrypt on client side.
score: 0

http://stackoverflow.com/comment/42958691
type: Comment
has text: It logs the data that I want to store into a variable.
type: QuestionComment
comment on: http://stackoverflow.com/q/27241108
score: 0

http://stackoverflow.com/comment/42956292
comment on: http://stackoverflow.com/a/27204195
score: 0
type: AnswerComment
type: Comment
has text: Hi, LcLk! :) This is CLOSE. It's at least showing SOME wireframe after I realized that when "pushing", the 2 mats must be called in the EXACT same order as it is in the original code, otherwise, the basic material will overlap the lambert material. Anyway, for some reason this is still showing only white colored black wireframed mesh. It should be blue... I have uploaded a new pastebin of the function, here: http://pastebin.com/Tudhx2E4 Thank you! :)

http://stackoverflow.com/q/27236200
tagged with: jquery
favorite count: 0
has title: JQuery.get Syntax Error
linked to: http://stackoverflow.com/q/6266872
tagged with: php
has comment: http://stackoverflow.com/comment/42949008
score: -1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27236226
has body: I have been going crazy trying to figure this out. I have a PHP script that returns true/false with the header set to Content-Type: text/plain. When I use a simple .get like this: $.get("ip.php"); I can see the call and the data loaded in firebug. However when I try to add more complexity I get "SyntaxError: syntaxerror". This is the jquery I am using: var hello; $.get('ip.php', function(data){ hello = data; console.log(hello); }); if (hello == "false") { $( "#status").removeclass("working").addClass("notworking"); $(".stat").html(" STATUS: NOT WORKING "); } else { $(".stat").html(" STATUS: WORKING "); } What am I doing wrong? Thanks in advance for your help.
possible better answer: http://stackoverflow.com/a/27236306
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27236306
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27236226
answer count: 2
upvote count: 0

http://stackoverflow.com/a/27197080
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27196905
has body: I suggest that you check out jQuery. jQuery together with jQueryRotate which has a rotate method and an animateTo property that may be what you need. Here's a simple script to illustrate that when you click on the image it rotates 180 degrees and when you double click on it, it returns to its original position: - demo Here's a working example: http://jsfiddle.net/j7gfwfc3/3/

http://stackoverflow.com/a/27310248
has body: Thanks for all your answer. This question has solved, i just import CSS from domino : \data\domino\java\xsp\theme\oneuiv2.1 Then i selected the field and chosen field hidden Done, now the field value able to transfer from context Thanks All :)
answers question: http://stackoverflow.com/q/27167469
score: 0
type: Answer

http://stackoverflow.com/comment/42975560
type: Comment
has text: Ah, you're absolutely correct that's what I meant :D
comment on: http://stackoverflow.com/a/27250735
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43046579
score: 0
type: AnswerComment
has text: @DIGAMBARTOPE, you are welcome! But if it was helpful for you, you can accept this answer as right ;)
type: Comment
comment on: http://stackoverflow.com/a/27269282

highcharts
tags question: http://stackoverflow.com/q/27222202
tags question: http://stackoverflow.com/q/27301583
tags question: http://stackoverflow.com/q/27155891
tags question: http://stackoverflow.com/q/27290834
tags question: http://stackoverflow.com/q/27189644
tags question: http://stackoverflow.com/q/27307493
tags question: http://stackoverflow.com/q/27292947
tags question: http://stackoverflow.com/q/27224254
tags question: http://stackoverflow.com/q/27237476
tags question: http://stackoverflow.com/q/27289796
tags question: http://stackoverflow.com/q/27311035
tags question: http://stackoverflow.com/q/27203772
tags question: http://stackoverflow.com/q/27207349
tags question: http://stackoverflow.com/q/27242770
tags question: http://stackoverflow.com/q/27312265
tags question: http://stackoverflow.com/q/27245388
tags question: http://stackoverflow.com/q/27226748
tags question: http://stackoverflow.com/q/27277378
tags question: http://stackoverflow.com/q/27271814
tags question: http://stackoverflow.com/q/27227408
tags question: http://stackoverflow.com/q/27176158
tags question: http://stackoverflow.com/q/27272977
tags question: http://stackoverflow.com/q/27311552
tags question: http://stackoverflow.com/q/27153016
tags question: http://stackoverflow.com/q/27225600
tags question: http://stackoverflow.com/q/27302978
tags question: http://stackoverflow.com/q/27257762
tags question: http://stackoverflow.com/q/27171337
tags question: http://stackoverflow.com/q/27232326
tags question: http://stackoverflow.com/q/27185649
tags question: http://stackoverflow.com/q/27260420
tags question: http://stackoverflow.com/q/27210274
tags question: http://stackoverflow.com/q/27156335
tags question: http://stackoverflow.com/q/27308762
tags question: http://stackoverflow.com/q/27293716
tags question: http://stackoverflow.com/q/27249245
tags question: http://stackoverflow.com/q/27192224
tags question: http://stackoverflow.com/q/27227832
tags question: http://stackoverflow.com/q/27311221
tags question: http://stackoverflow.com/q/27280078
type: Tag
tags question: http://stackoverflow.com/q/27313369
tags question: http://stackoverflow.com/q/27194016
tag name: highcharts

http://stackoverflow.com/q/27152935
has comment: http://stackoverflow.com/comment/42800496
has comment: http://stackoverflow.com/comment/42800411
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42800469
has comment: http://stackoverflow.com/comment/42800478
has comment: http://stackoverflow.com/comment/42800434
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42807962
has title: Removing `border` attribute from table doesn't remove the border
possible better answer: http://stackoverflow.com/a/27153367
tagged with: css
has comment: http://stackoverflow.com/comment/42805358
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27153086
accepted answer: http://stackoverflow.com/a/27153086
has comment: http://stackoverflow.com/comment/42800619
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42804821
type: Question
has comment: http://stackoverflow.com/comment/42800547
score: 18
has answer: http://stackoverflow.com/a/27153367
tagged with: javascript
has answer: http://stackoverflow.com/a/27153157
upvote count: 18
has comment: http://stackoverflow.com/comment/42800391
has comment: http://stackoverflow.com/comment/42800507
has comment: http://stackoverflow.com/comment/42800572
has body: Why when doing removeAttr("border") the border is not removed (the attribute is removed, but the style remains)? Demo $("#button1").on("click", function() { $("table").removeAttr("border"); }); Hello World Not Initially Bordered I reproduced this on Chrome and Chromium.
has comment: http://stackoverflow.com/comment/42807544
has answer: http://stackoverflow.com/a/27153094
has comment: http://stackoverflow.com/comment/42800580
downvote count: 0

http://stackoverflow.com/a/27392580
upvote count: 14
score: 14
accepted answer of: http://stackoverflow.com/q/27224008
has body: I have no idea if or when the browsers will support this but have a look at the "ICE candidate policy" in section 4.1.1 of draft-ietf-rtcweb-jsep-08, you can see how setting the policy to "relay" will do what you want. In the current W3C API draft this is set using an RTCIceTransportPolicy value of "relay" for the iceTranportPolicy field in the configuration. Search for RTCIceTransportPolicy in https://w3c.github.io/webrtc-pc/ relay: The ICE Agent uses only media relay candidates such as candidates passing through a TURN server.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27224008
type: Answer

http://stackoverflow.com/q/27312993
tagged with: java
has answer: http://stackoverflow.com/a/27319263
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27317147
type: UnansweredQuestion
has body: 1)I need to find out the user timezone and time. For that I use Calendar currentdate1 = Calendar.getInstance(); TimeZone tz = Calendar.getInstance().getTimeZone(); System.out.println("time zone"+tz); System.out.println(tz.getDisplayName()); // (Now India Standard Time) System.out.println(tz.getID()); // (Now . Asia/Kolkata) By using this I need to find out the current time of that user1 at corresponding timezone. 2)One user2 upload video on there date. I convert that into millisecond and store it database. User1 want to see the uploading time of user2 as user1 date and time corresponding to his timezone.How can I do this.
has title: java convert milliseconds date corresponding timezone date in java
tagged with: jakarta-ee

http://stackoverflow.com/q/27277927
has body: I have this code: $.post(Routing.generate('parMarcaModelo'), { "marcaId": currBranch, "modeloId": currModel, "marcaNombre": currBranchName, "modeloNombre": currModelName }, 'json').done(function (data, textStatus, jqXHR) { // do something here }).fail(function (jqXHR, textStatus, errorThrown) { // Catch error from server and logs to console var err = eval("(" + jqXHR.responseText + ")"); colose.log('Error', err.Message, 20000); return false; }); The server side returns a JSON like this one: { "success":false, "error":"El par Marca2-Modelo1 ya existe. Por favor escoja otra combinaci\u00f3n.", } But also returns a 400 code so Ajax call will go through .fail() callback insted of .done(). Having this information, how I can catch the error key from the JSON in the .fail() to show to users? I have found this code: $.get('http://localhost/api').then(function(res) { var filter $.Deferred() if (res.success) { filter.resolve(res.data) } else { filter.reject(res.error) } return filter.promise() }).done(function(data) { console.log('Name:', data.name) // Outputs: Foo }).fail(function(error) { console.log('Error:', error) // Outputs: Something bad happened. }) On this topic at SO but does not know if is right and also if will affect my code in someway. Any help or advice?
has comment: http://stackoverflow.com/comment/43024828
has answer: http://stackoverflow.com/a/27278089
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43025044
has title: How to read a property from a JSON response when the HTTP response has a failure code?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43025912
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43025827
tagged with: javascript
linked to: http://stackoverflow.com/q/6265814
accepted answer: http://stackoverflow.com/a/27278089
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43025931
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: jqxhr
has comment: http://stackoverflow.com/comment/43024954

http://stackoverflow.com/q/27231338
tagged with: javascript
has answer: http://stackoverflow.com/a/27764951
downvote count: 0
answer count: 1
has title: Element.prop('scrollHeight') returns the same value for different list items in Angular.js
tagged with: jquery
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42975789
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
upvote count: 2
has body: I am trying to get the heights and widths of the list items. I have checked out various ways of getting height and width of an item, but none of them returned the actual scrollHeight provided by the element. When I checked the scrollHeight through console, I get [div.class-name, context: ...] 0: div.className.className2 accessKey: "" .... scrollHeight: 176 scrollWidth: 276 .... So I printed them out using code below: angular.module('app').directive('temp', function () { return { restrict: 'E', templateUrl: 'link/to/template', replace: 'true', link: function(scope, element) { console.log(element); console.log(element.prop('scrollHeight')); console.log(element.prop('scrollWidth')); } }; }); it returns 112 (height) 304 (width) And this set of values is returned for EVERY list item in the unordered list. None of the list items have such height/width (even considering that some margin/padding values are not applied) I need those values in order to update css. Is there any other way around it? Or Could you give me a hint on what I am doing wrong?
type: Question

http://stackoverflow.com/q/27176616
has title: Can't run function in closure
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27176690
accepted answer: http://stackoverflow.com/a/27176690
tagged with: methods
type: Question
tagged with: closures
tagged with: javascript
score: 0
has body: I am just starting to get my head around closure. Having private variables and methods that are private. The problem I have is when calling the methods, the developer console is telling me "undefined is not a function". Javascript: var shop = (function() { var items = []; return { Item: function(data) { this.id = data[0]; this.item = data[1]; this.description = data[2]; this.price = data[3]; this.count = data[4]; }, addItem: function(id, item, description, price) { items.push(this.Item(id, item, description, price)); }, print: function() { var itemCon = document.getElementById('items'), html = ""; items.forEach(function(item) { html += ' '; for(prop in item) { if(prop != "id") { if(prop != "count") { if(prop === "price") { html += ' ' + prop + ': £' + item[prop] + ' '; } else { html += ' ' + prop + ': ' + item[prop] + ' '; }; }; }; }; html += ' Add to Basket ' html += ' '; }); itemCon.innerHTML += html; } }; }); function init() { shop.addItem("0", "coat", "Warm yes!", 24.99); shop.print; }; window.onload = init;
answer count: 1

http://stackoverflow.com/comment/64979860
comment on: http://stackoverflow.com/a/27305735
type: AnswerComment
has text: Really cool solution but It's not working in Mobile devices (Phonegap Hybrid App). Can anybody plz suggest something? (May be because $window is browser based service, it may not work in Mobile apps. If I am correct then what could be the answer for Mobile devices)
score: 0
type: Comment

http://stackoverflow.com/a/27278089
has comment: http://stackoverflow.com/comment/43025987
has comment: http://stackoverflow.com/comment/43031882
answers question: http://stackoverflow.com/q/27277927
has comment: http://stackoverflow.com/comment/43025937
score: 0
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27277927
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/43025652
has comment: http://stackoverflow.com/comment/43025897
has comment: http://stackoverflow.com/comment/43025122
has comment: http://stackoverflow.com/comment/43037607
has body: You are sending in 'json' as the success callback function to $.post(). This is the correct function signature: jQuery.post( url [, data ] [, success ] [, dataType ] ) Clarification This code will work, since it passes in an empty function in place of the 'success'. $.post('rest.php', {data : 'data'}, function(){},'json').done( function (data, textStatus, jqXHR) { // do something here }).fail(function (jqXHR, textStatus, errorThrown) { // Catch error from server and logs to console console.log('Error', jqXHR.responseJSON, 20000); return false; }); However, this code will not: $.post('rest.php', {data : 'data'}, 'json').done( function (data, textStatus, jqXHR) { // do something here }).fail(function (jqXHR, textStatus, errorThrown) { // Catch error from server and logs to console console.log('Error', jqXHR.responseJSON, 20000); return false; }); For proof, look at line 781-798 in the jQuery source code. If the data parameter is a function, e.g. the success callback, the items will get shifted. However, since this is not the case, every parameter will be put in by the position they appear in the function. In the second version, Ajax.succees will be set to the string 'json' and the Ajax.dataType is set to undefined. The jqXHR.responseJSON of that version will return a undefined, since it's not parsed as JSON. The first version, however, returns a JSON object. Also, you wrote colose.log instead of console.log in your code. That might be why couldn't get the data.

http://stackoverflow.com/a/27269475
accepted answer of: http://stackoverflow.com/q/27269273
answers question: http://stackoverflow.com/q/27269273
upvote count: 3
has body: Because it's not always that simple. If you only need to check for window.history you don't need modernizr. But if you have to check for other futures, you should use modernizr because it has implemented the best and lightweight methods to detect this futures. Take a look at the source code, for example the hashchange detection: isEventSupported = (function() { var TAGNAMES = { 'select': 'input', 'change': 'input', 'submit': 'form', 'reset': 'form', 'error': 'img', 'load': 'img', 'abort': 'img' }; function isEventSupported( eventName, element ) { element = element || document.createElement(TAGNAMES[eventName] || 'div'); eventName = 'on' + eventName; var isSupported = eventName in element; if ( !isSupported ) { if ( !element.setAttribute ) { element = document.createElement('div'); } if ( element.setAttribute &amp;&amp; element.removeAttribute ) { element.setAttribute(eventName, ''); isSupported = is(element[eventName], 'function'); if ( !is(element[eventName], 'undefined') ) { element[eventName] = undefined; } element.removeAttribute(eventName); } } element = null; return isSupported; } return isEventSupported; })(), Why would you implement this by your own when modernizr does it for you in a proved and fast way?
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/43009329

http://stackoverflow.com/comment/42823682
has text: ui.bootstrap 0.12.0 @user2992420
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27160950

http://stackoverflow.com/comment/42808698
comment on: http://stackoverflow.com/q/27156748
has text: I doubt that Lodash is a factor at all in your problem. If `$scope.statistics` is set to a correct value upon reloading, the probable issue is how you are using Angular.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/65590014
score: 0
has body: Change from <a href="#myModal" onclick="<?php $coverid = $row['coverid'] ?>" role="button" data-toggle="modal"> to <a href="#myModal" class="trash" data-id="<?php echo $row['coverid']; ?>" role="button" data-toggle="modal"> In your modal, you will get the id like this (for example): Add: $(document).ready(function () { $('body').on('click', '.trash',function(){ document.getElementById("feed_id").value = $(this).attr('data-id'); console.log($(this).attr('data-id')); }); }); } https://torbjornzetterlund.com/passing-data-list-bootstrap-modal/
answers question: http://stackoverflow.com/q/27279241
type: Answer

http://stackoverflow.com/q/27223755
tagged with: html-table
answer count: 2
has answer: http://stackoverflow.com/a/27223990
has title: Apply style to div inside the nth in the Table
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: Here is my Fiddle Here i need to apply the style to the value "Test" which is under the nth child of given div. Note i should not use class as i am using flexigrid. How can i do this ? Here is my Style table, td, th { border: 1px solid green; } th { background-color: green; color: white; } th:nth-child(2) { background : red !important; }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27223944
has comment: http://stackoverflow.com/comment/42925717
has comment: http://stackoverflow.com/comment/42925722
type: Question

http://stackoverflow.com/q/27230983
has title: jquery mobile pagecontainershow events binding correct way
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42938845
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29768484
type: Question
tagged with: jquery-mobile
tagged with: javascript
has body: i have two pages in one file like so: Event Example This is page 1click here Event Example This is page2 basically i want a pagecontainershow event to fire on secondpage show what i want to do is that when the "secondpage" loads i want to perform run some initialization code. the problem i face is that the second page isnt active in the dom it is fetched by ajax so how do i bind events on the show of the second page what i did is this $( document ).on( "pagecontainershow", function ( event, ui ) { var activePage = $.mobile.pageContainer.pagecontainer( "getActivePage" ); if(activePage[0].id=="secondpage"){ //do the initialization for second page } }); the pagecontainershow show event is what i want but it fires for every page how can i bind it to fire on secondpage show only
score: 0

http://stackoverflow.com/a/27681993
answers question: http://stackoverflow.com/q/27303271
has comment: http://stackoverflow.com/comment/43813208
has comment: http://stackoverflow.com/comment/43810498
has body: Yes, it is very possible. Your problem is caused by the conflicts between the main window and the iframe window. Please refer to this link: https://github.com/phonegap/phonegap/wiki/iFrame-Usage I have successfully implemented this using cordova plugin contact android. To make it possible, you need to do these: Create the communication between parent window and the child/iframe using postMessage. Parent and child listen each other. Send/trigger the message from child/iframe to parent to call the cordova plugin. Call the cordova plugin from parent window. Create the global function in parent window to be called from the cordova code/side (Java in android). Find out the java file in cordova that (call the callback function and parse the result back). Clue: callbackContext.success(parameter);. From here, we need to call the global function created in parent window. Call the global function created in parent window from the java file of cordova. Here is the snippet of calling js code from java code: your_web_view.loadUrl("javascript:function_name(parameter_result_from_cordova)"); Send back the message gotten in parent to the iframe/child using postMessage. This should work. Let me know if you find any issue.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43805542
type: Answer
has comment: http://stackoverflow.com/comment/43804565
score: 3
accepted answer of: http://stackoverflow.com/q/27303271
upvote count: 3

http://stackoverflow.com/comment/42911318
type: AnswerComment
comment on: http://stackoverflow.com/a/27215637
has text: ok, it loads the code in the url, but I need to open the menu automatically: http://www.schillmania.com/projects/soundmanager2/demo/bar-ui/
type: Comment
score: 0

http://stackoverflow.com/a/27217781
score: 0
type: AcceptedAnswer
type: Answer
has body: The anonymous function which is created and assigned as a handler will be having access to the variables which are defined in the context where it was created. So, what you have shown in the example above is correct and I see no problem with it. EDIT I have NOT tested the following, but you may want to try this var t = toggle; var n = navigation; $(window).resize({ x : t , y : n }, function (e) { var msg = $(e.data.x).val(); if($(e.data.x).is(":hidden")) { $(e.data.y).show(); }; if($(e.data.x).is(":visible")) { $(e.data.y).hide(); }; });
has comment: http://stackoverflow.com/comment/42915503
accepted answer of: http://stackoverflow.com/q/27217633
answers question: http://stackoverflow.com/q/27217633

http://stackoverflow.com/comment/42972008
type: AnswerComment
has text: Thank you for your answer. Your code is working well, and uses best practices. But Ahmad's answer explains why my snippet was working with previous versions of AngularJS and is not working anymore.
type: Comment
comment on: http://stackoverflow.com/a/27248348
score: 0

http://stackoverflow.com/q/27235548
has answer: http://stackoverflow.com/a/27235612
tagged with: split
accepted answer: http://stackoverflow.com/a/27235612
tagged with: javascript
has comment: http://stackoverflow.com/comment/42947836
linked to: http://stackoverflow.com/q/31044
answer count: 3
tagged with: for-loop
has answer: http://stackoverflow.com/a/27235715
upvote count: 1
possible better answer: http://stackoverflow.com/a/27235670
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/42947647
has comment: http://stackoverflow.com/comment/42947890
has answer: http://stackoverflow.com/a/27235670
favorite count: 0
has body: I have a function that checks for a div, and if it exists it fills it with the matching data from a JSON array. The Div and the data have the same id &amp; key, so I want to be able to put those in a string for a more elegant solution. However, the final element of trying to apply the string element to the data key doesn't seem to be working. I get "Cannot read property '0' of undefined" Original code: $.getJSON('myDataUrl', function(data) { if ($("#title").length){document.getElementById("title").innerHTML=data.title}; if ($("#noun").length){document.getElementById("noun").innerHTML=data.noun}; if ($("#_id").length){document.getElementById("_id").innerHTML=data._id}; if ($("#owner_id").length){document.getElementById("owner_id").innerHTML=data.owner_id}; }); The more 'elegant' solution I'm trying to reach: $.getJSON('myDataUrl', function(data) { var contentString = "name,noun,_id,owner_id"; var splitContent; splitContent = contentString.split(","); for(i = 0; i &lt; splitContent.length; i++) {if ($("#" + splitContent[i]).length){ document.getElementById(splitContent[i]).innerHTML=data.splitContent[i]; }; }
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Passing string element to data key
type: Question

http://stackoverflow.com/comment/43039382
score: 1
comment on: http://stackoverflow.com/q/27285981
has text: `ng-style="{ 'font-size' : parentSize.width }"`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27255409
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42990625
tagged with: ajax
has answer: http://stackoverflow.com/a/27259327
has comment: http://stackoverflow.com/comment/42984983
score: 2
downvote count: 0
has body: There is a small web page that requests an XML file from a web server. The web server updates this file twice a second with new data to be displayed on the web page. After the page is left running for a while, it will slow down the entire browser whenever it gets the new data from the server (twice a second). The problem is intermittent - sometimes it lasts a few seconds, sometimes it lasts longer. The problem exists in Firefox. function getData() { var dataVal = parseFloat($("#data").html().substring(0, 100)); doSomethingWithVal(XTEval); // seemingly irrelevant, as it lags without this function too } t = 0.5; function process_xml() { var xmlhttp = GetXmlHttpObject(); if (xmlhttp === null) { alert("Your browser does not support AJAX!"); return; } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState === 4) { document.getElementById("data").innerHTML = xmlhttp.responseText; getData(); setTimeout('process_xml()', t * 1000); // moved from end of function to here based on a suggestion } }; xmlhttp.open("GET", "data.shtml", true); xmlhttp.send(""); } function GetXmlHttpObject() { if (window.XMLHttpRequest) return new XMLHttpRequest(); if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP"); return null; } data.shtml simply contains: &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt; &lt;!--#echo var="someVal.val" --&gt; Perhaps there is a different/better approach than using AJAX?
type: UnansweredQuestion
tagged with: ssi
has comment: http://stackoverflow.com/comment/42991704
has comment: http://stackoverflow.com/comment/42992236
has title: Repeated AJAX requests slow browser
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42984745
answer count: 1

http://stackoverflow.com/q/27261155
tagged with: javascript
has title: How to capture a website url in the shopify contact form
answer count: 2
linked to: http://stackoverflow.com/q/6768793
favorite count: 0
has body: We like to show the website url, from the contactform in the email. We use the shopify form template &lt;div class="contactform"&gt; &lt;input type="text" name="contact[name]" value="" size="22" tabindex="1" placeholder="Vor- und Nachname"&gt; &lt;input type="email" name="contact[email]" value="" size="22" tabindex="1" required="required" placeholder="Mailadresse"&gt; &lt;input type="text" name="contact[firma]" value="" size="22" tabindex="1" placeholder="Firma"&gt; &lt;input type="text" name="contact[auflage]" value="" size="22" tabindex="1" placeholder="Auflage"&gt; &lt;textarea rows="8" cols="75" name="contact[nachricht]" placeholder="Nachricht"&gt;&lt;/textarea&gt; &lt;input type="submit" id="contactFormSubmit" value="Angebot anfragen" /&gt; &lt;/div&gt;
has answer: http://stackoverflow.com/a/27261193
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/6768793
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27261195
has comment: http://stackoverflow.com/comment/54460115
upvote count: 2
score: 1
downvote count: 1
type: Question
tagged with: shopify

http://stackoverflow.com/comment/42885487
has text: I know everything isn't perfect yet, it's probably bad code. I just did it, and tend to fix it later. But it is working to a degree
comment on: http://stackoverflow.com/q/27200887
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27241341
answer count: 2
has title: Timing in JavaScript: Finding a way to make setInterval alternate time
tagged with: jquery
has body: I am building a web page for a class project, and specifically, an "about us" page that iterates through pictures and descriptions of the team members. On the view, I have this: setInterval(function() { $("#about-img").attr('src', img_src[i]); $("#name").html(names[i]); $("#description").html(descriptions[i]); i = (i + 1) % img_src.length; }, 8000); This effectively iterates, however, sometimes descriptions are longer than others. Is there any way to wait longer, the longer the description is? Something simple would be waits(descriptions[i].length * 50); Right in the setInterval function, but javascript has no way of doing that. What can I do? setTimeout is asynchronous, and I cannot influence the second parameter of setInterval from the scope of the first.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27241468
tagged with: javascript
has answer: http://stackoverflow.com/a/27241399
type: Question
score: 0

http://stackoverflow.com/a/27157207
score: 0
answers question: http://stackoverflow.com/q/27157092
type: AcceptedAnswer
type: Answer
has body: If your goal is to show the second image on hover and hide it on mouseout, showing the first, then you can use hover method like in below example. Note, that the second image is initially hidden with CSS. $('.change-hover').hover(function () { $(this).find('img').hide().last().fadeIn(); }, function () { $(this).find('img').hide().first().fadeIn(); }); .change-hover img { display: none; } .change-hover img:first-of-type { display: inherit; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;a href="#" class="change-hover"&gt; &lt;img src="http://lorempixel.com/100/100/food/1" alt=""/&gt; &lt;img src="http://lorempixel.com/100/100/food/2" alt=""/&gt; &lt;/a&gt; &lt;a href="#" class="change-hover"&gt; &lt;img src="http://lorempixel.com/100/100/food/3" alt=""/&gt; &lt;img src="http://lorempixel.com/100/100/food/4" alt=""/&gt; &lt;/a&gt;
has comment: http://stackoverflow.com/comment/42809149
accepted answer of: http://stackoverflow.com/q/27157092

http://stackoverflow.com/comment/42920668
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27209067
has text: @Axel feedback please.

http://stackoverflow.com/a/45246087
upvote count: 12
downvote count: 0
has body: I have been building out a feature that requires nested contenteditable elements. When debugging I noticed that baseNode and extentNode are NOT just aliases. I am trying to find documentation on them since they are not in MDN. But based on this screenshot I wouldn't assume they are just aliases (in Chrome):
answers question: http://stackoverflow.com/q/27241281
score: 12
type: Answer
has comment: http://stackoverflow.com/comment/130975350

http://stackoverflow.com/q/27256983
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42987779
has comment: http://stackoverflow.com/comment/42989756
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42987630
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42988959
has answer: http://stackoverflow.com/a/30291708
type: Question
has body: My web application is trying to access the information from another server belonging to a different domain. Since it is a cross domain ajax call, i have used "dataType" as "JSONP" instead of JSON. Now in the WebInspector-> Network Tab, I see the request is successful and the response is populated. But the success() function is never called. It always calls the error function with status = 200. Since it is a JSONP request, jQuery appends "callback=?" to the end of the URL and the callback method was never called, even after getting the valid response. Not sure what went wrong? $(document).ready(function() { // When you click the Get Instances button: $('#getInstances').click(function(){ $.ajax({ type: "GET", url: "http://178.28.167.221:8080/us-east-1/instance/list.json", contentType: "application/json; charset=utf-8", accept: "application/json", crossDomain: "true", headers: {'Access-Control-Allow-Origin','*'}, dataType: "jsonp", success: function(msg) { result = JSON.stringify(msg); var obj = $.parseJSON(result); console.log(obj); $('#instancesTable').append(' ' + obj.autoScalingGroupName + ' ' + obj.amiId + ' ' + obj.instanceId + ' ' + obj.instanceType +' '); }, error: function(xhr, ajaxOptions, thrownError, textStatus, responseText) { console.log(name + ' environment failed with error: ' + xhr.status + " " + thrownError); var errorMessage = "Error"; if (xhr.status == 0) { errorMessage = "Can't Connect"; } } }); }); }); I also verified by including the below in my ajax request: jsonp: 'callback', jsonpCallback: 'jsonpCallback' and defining the callback function as below: function jsonpCallback(data){ alert("jsonpCallback"); } jsonCallback was never called, even if the request is successful and response is available from the server (shown in Network Tab of WebInspector). The response from the server is an Array of JSON objects. [{JSON1}, {JSON2} ..] Note : I tried to change the contentType as "application/javascript" since the response was an array of JSON objects. …
tagged with: javascript
has comment: http://stackoverflow.com/comment/42989710
has comment: http://stackoverflow.com/comment/42988750
has comment: http://stackoverflow.com/comment/42989698
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: jQuery $.ajax call for cross domain with JSONP, returns status 200, but error function is being called instead of success
has comment: http://stackoverflow.com/comment/42990516

http://stackoverflow.com/q/27310286
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43084312
tagged with: jquery-ui-datepicker
tagged with: jquery-plugins
type: Question
has comment: http://stackoverflow.com/comment/43082854
has body: I have a multi-select datepicker that working properly in first attempt but after the post-back datepicker are not showing. Can anyone help me with this? I tried searching for a solution but so far no one come up with my issue. CSS CODE .ui-datepicker { width: 14em; display: none; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position: absolute; top: 1px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev { left: 2px; background: url('../images/prev.png')right no-repeat; background-size: 12px; text-indent: -999px; z-index: 1; } .ui-datepicker .ui-datepicker-prev:hover { background: url('../images/prev.png')right no-repeat; background-size: 15px; } .ui-datepicker .ui-datepicker-next { right: 2px; background: url('../images/next.png') left no-repeat; background-size: 12px; text-indent: 999px; z-index: 1; } .ui-datepicker .ui-datepicker-next:hover { background: url('../images/next.png') left no-repeat; background-size: 15px; } .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; border-radius: 10px; } .ui-datepicker .ui-datepicker-title select { font-size: 1px; margin: 1px 0; } .ui-datepicker select.ui-datepicker-month-year { width: 90%; } .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%; } .ui-datepicker table { width: 100%; font-size: .7em; border-collapse: ; margin: 0 0 .4em; background: #fff; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } .ui-datepicker td { border: 0; padding: 1px; } .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .5em; text-align: right; text-decoration: none; } .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width: auto; overflow: visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float: left; } /* RTL support */.ui-datepicker-r…
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has answer: http://stackoverflow.com/a/27351827
score: 0
has comment: http://stackoverflow.com/comment/43081741
linked to: http://stackoverflow.com/q/497802
has comment: http://stackoverflow.com/comment/43088220
has comment: http://stackoverflow.com/comment/43081657
has comment: http://stackoverflow.com/comment/43081649
accepted answer: http://stackoverflow.com/a/27351827
has comment: http://stackoverflow.com/comment/43081776
has title: Multi Datepicker not working after postback

http://stackoverflow.com/q/27170013
tagged with: node.js
type: AnsweredQuestion
tagged with: mysql
upvote count: 1
has body: I'm creating a form using Sails.js. The form has multiple pages, and each time the user navigates to the next page, the data they've inputted to the form for the current page is submitted to a MySQL database. On one page of the form, there are two radio buttons, one with a value 'Yes' and one with a value of 'No'. The value of whichever button is checked is submitted to the database, to the 'author1Corresponding' column. From my understanding of radio buttons, if one is checked, the specified value, i.e. 'Yes' or 'No' should be submitted to the database. However, when either one is checked, author1Corresponding gets the value 'false'. If neither button is checked, author1Corresponding gets the value 'null'. Here is my code in the html form for the two buttons: Is this Author the Corresponding Author? Yes No The class radio is just being used to style both buttons as having display: inline. Why isn't the defined value being submitted to the database, and how can I fix this?
tagged with: waterline
downvote count: 1
has comment: http://stackoverflow.com/comment/43485967
has comment: http://stackoverflow.com/comment/43478730
type: Question
tagged with: sails.js
tagged with: javascript
has answer: http://stackoverflow.com/a/27528722
has comment: http://stackoverflow.com/comment/44848117
has comment: http://stackoverflow.com/comment/42830942
has comment: http://stackoverflow.com/comment/42953070
score: 0
accepted answer: http://stackoverflow.com/a/27528722
answer count: 1
favorite count: 0
has title: Radio buttons always returning value of false to MySQL Database, regardless of specified value?

http://stackoverflow.com/q/27194497
linked to: http://stackoverflow.com/q/9804777
answer count: 2
has comment: http://stackoverflow.com/comment/42875241
has body: I'm trying to check if a string is in a JSON object with javascript. I don't know if it is possible or I have to convert something. Here is the part of the code with the if statement in which I want to check if data.userName (the string) is in users (the JSON object) function validation() { var userName_login = document.getElementById("username").value; var password_login = document.getElementById("password").value; var data = { userName: userName_login, password: password_login }; doJSONRequest("GET", "/users/", null, data, function(users) { if (data.userName) { } }) } And the doJSONRequest function is: function doJSONRequest(method, url, headers, data, callback) { if (arguments.length != 5) { throw new Error('Illegal argument count'); } doRequestChecks(method, true, data); var r = new XMLHttpRequest(); r.open(method, url, true); doRequestSetHeaders(r, method, headers); r.onreadystatechange = function() { if (r.readyState != 4 || (r.status != 200 &amp;&amp; r.status != 201 &amp;&amp; r.status != 204)) { return; } else { if (isJSON(r.responseText)) callback(JSON.parse(r.responseText)); else callback(); } }; var dataToSend = null; if (!("undefined" == typeof data) &amp;&amp; !(data === null)) dataToSend = JSON.stringify(data); r.send(dataToSend); }
tagged with: javascript
has comment: http://stackoverflow.com/comment/42874291
has comment: http://stackoverflow.com/comment/42874307
score: 0
has answer: http://stackoverflow.com/a/27194548
has comment: http://stackoverflow.com/comment/42874285
has answer: http://stackoverflow.com/a/27194520
type: Question
accepted answer: http://stackoverflow.com/a/27194548
has comment: http://stackoverflow.com/comment/42875632
linked to: http://stackoverflow.com/q/18363618
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27194520
has title: Check if a string is in a json object
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27174215
answers question: http://stackoverflow.com/q/27173445
type: Answer
has body: I'm sorry the reply is not more complete, but I don't fully know your backend technology. Basically, your Angular app is making a preflighted request to your server, because of CORS, meaning that first it is doing an HTTP.OPTIONS request on that URL and after a successful response from the server it will make the HTTP.xxx request (in this case a POST). Because you haven't configured your webservice to respond to HTTP.OPTIONS and I believe that's what is causing your error. The solution is to configure your webservice to reply to HTTP.OPTIONS requests with the following headers: response: 200, "ok" header 'Access-Control-Allow-Origin': http://yoursite.com header 'Access-Control-Allow-Methods': 'POST, OPTIONS' Please see more about the CORS specification here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests
score: 1
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/42807990
comment on: http://stackoverflow.com/a/27155933
has text: May I ask why did you put the link function inside compiler and not as sibling?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43021230
has text: Sorry, copy-paste mistake, corrected it. If this does not triggers the data reload, check the js console for errors, or check the URL monitor if the URL is correct or if the server returns correct response code (200 or similar).
type: Comment
comment on: http://stackoverflow.com/a/27269582
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42890903
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27204104
score: 0
has text: Why voting down. Did I post something wrong

http://stackoverflow.com/q/27204336
has answer: http://stackoverflow.com/a/27204906
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42891463
tagged with: facebook-graph-api
favorite count: 0
has comment: http://stackoverflow.com/comment/42891735
tagged with: node.js
possible better answer: http://stackoverflow.com/a/27204906
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/27204689
accepted answer: http://stackoverflow.com/a/27204689
has title: How to get all pages from facebook account
tagged with: javascript
has body: I have tried to get all facebook pages list. But I got an error. Error is : request is not defined Code : var url = 'https://graph.facebook.com/me/accounts'; var accessToken = req.user.facebookAccessToken; var params = { access_token: accessToken, }; request.get({ url: url, qs: params}, function(err, resp, pages) { // console.log(resp); pages = JSON.parse(pages); })
has comment: http://stackoverflow.com/comment/42891553

http://stackoverflow.com/a/27229868
type: Answer
has body: Try this demo: http://jsfiddle.net/dn69d14L/1/ Leer más Leer más Leer más Leer más asd1 asd2 asd3 asd4 and of course, use the JQuery library.
score: 0
answers question: http://stackoverflow.com/q/27229722

http://stackoverflow.com/comment/42993149
has text: I changed your profile image, @BarnabásNagy; that one wasn't really appropriate here. Thanks!
comment on: http://stackoverflow.com/q/27258880
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27170654
tagged with: angularjs-scope
type: Question
has comment: http://stackoverflow.com/comment/42832870
tagged with: angularjs-directive
has title: Is it recommended to use jQuery method in AngularJS controller?
tagged with: javascript
linked to: http://stackoverflow.com/q/14994391
has answer: http://stackoverflow.com/a/27171032
score: 0
accepted answer: http://stackoverflow.com/a/27170824
possible better answer: http://stackoverflow.com/a/27171032
has body: Is it recommended to use jQuery method in AngularJS controller? If not, how should i convert to AngularJS below? I know I can use directive but I need a clean and simple way. $scope.onEnabled = function (id, enabled) { if (enabled) { jQuery('#policyRuleTitle-' + id).removeClass('collapsed'); jQuery('#policyRule-' + id).addClass('in'); jQuery('#policyRule-' + id).css("height", ""); } else { jQuery('#policyRuleTitle-' + id).addClass('collapsed'); jQuery('#policyRule-' + id).removeClass('in'); } };
has comment: http://stackoverflow.com/comment/42832205
has answer: http://stackoverflow.com/a/27171147
tagged with: angularjs
tagged with: css
has answer: http://stackoverflow.com/a/27170926
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27170824
has comment: http://stackoverflow.com/comment/42832161

http://stackoverflow.com/q/27176575
possible better answer: http://stackoverflow.com/a/27176701
tagged with: angularjs
has answer: http://stackoverflow.com/a/27176701
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/3354367
upvote count: 1
accepted answer: http://stackoverflow.com/a/27450705
type: AnsweredQuestion
has body: I have a select and a function bound to on change (ng-change), the thing is I want this function to work when the user clicks the already selected element, so they can easily reuse the already selected action. This is my html (with Slim) select ng-model="selectedAction" ng-options="action.label for action in Actions" ng-change="chooseAction()" option ng-selected="users.items.length == 0" value="" Select an Action Is this possible or I'll have to add a button to make it work? Already saw this and this, looking for another solution.
score: 1
type: Question
has title: How to detect when user clicks on an element already selected from a select?
answer count: 2
linked to: http://stackoverflow.com/q/5964362
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27450705

http://stackoverflow.com/comment/42954410
score: 0
type: Comment
has text: try subscribing to a change event on the element, chances are if it's a decent plugin it triggers a change event manually when the value/text gets updated
type: QuestionComment
comment on: http://stackoverflow.com/q/27238614

http://stackoverflow.com/q/27179463
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: string
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27179939
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42847712
type: UnansweredQuestion
has body: I have a data file that contains JSON objects to load data on my site. I would like to know if there's a way to use Javascript to find and strip out any tags that may be within paragraph content. Edit: i'm using handlebars locally. Example: { 'foodType': 'breakfast bar', 'title': 'granola Bar', 'ingredients': 'oats, sesame seeds, sulphites, almonds , cashews, soy, stabilisers. May contain traces of peanuts, milk and other gluten cereals.' }, I'm displaying the content like this: for (var j=0; j<ingredientsList.length; j++){ var ingredients = $(' '); ingredients.append(ingredientsList[j]); $('.ingredients-sentences').append(ingredients); } How can I find the tag in my content and remove it before I build my ingredients paragraph? I've tried the following but feel like i'm going around in circles now: if (ingredientsList.indexOf(' ') > 0) { var start = ingredientsList.indexOf(' '); var end = ingredientsList.indexOf('</s'); ingredientsList.slice(start, end); } Any advice?
linked to: http://stackoverflow.com/q/24816
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42847693
has comment: http://stackoverflow.com/comment/42847737
type: Question
has title: Escape/remove tags in JSON data parsed to HTML
answer count: 1

android
tags question: http://stackoverflow.com/q/27247254
tags question: http://stackoverflow.com/q/27214392
tags question: http://stackoverflow.com/q/27200318
tags question: http://stackoverflow.com/q/27295328
tags question: http://stackoverflow.com/q/27218268
tags question: http://stackoverflow.com/q/27243022
tags question: http://stackoverflow.com/q/27254523
tags question: http://stackoverflow.com/q/27292085
tags question: http://stackoverflow.com/q/27300583
tags question: http://stackoverflow.com/q/27164715
tags question: http://stackoverflow.com/q/27204967
tags question: http://stackoverflow.com/q/27221084
tags question: http://stackoverflow.com/q/27304352
tags question: http://stackoverflow.com/q/27230078
tags question: http://stackoverflow.com/q/27212943
tags question: http://stackoverflow.com/q/27255757
tags question: http://stackoverflow.com/q/27246533
tags question: http://stackoverflow.com/q/27153152
tags question: http://stackoverflow.com/q/27243874
tags question: http://stackoverflow.com/q/27263530
tags question: http://stackoverflow.com/q/27214534
tags question: http://stackoverflow.com/q/27225103
tags question: http://stackoverflow.com/q/27187097
tags question: http://stackoverflow.com/q/27272838
tags question: http://stackoverflow.com/q/27182295
tags question: http://stackoverflow.com/q/27298214
tags question: http://stackoverflow.com/q/27169292
tags question: http://stackoverflow.com/q/27216412
tags question: http://stackoverflow.com/q/27303391
tags question: http://stackoverflow.com/q/27292155
tags question: http://stackoverflow.com/q/27303271
tags question: http://stackoverflow.com/q/27305574
tags question: http://stackoverflow.com/q/27229890
tags question: http://stackoverflow.com/q/27228943
tags question: http://stackoverflow.com/q/27311097
tags question: http://stackoverflow.com/q/27239222
tags question: http://stackoverflow.com/q/27177601
tags question: http://stackoverflow.com/q/27212020
tags question: http://stackoverflow.com/q/27246251
tags question: http://stackoverflow.com/q/27255340
tags question: http://stackoverflow.com/q/27232830
tags question: http://stackoverflow.com/q/27153613
tags question: http://stackoverflow.com/q/27155863
tags question: http://stackoverflow.com/q/27166462
tags question: http://stackoverflow.com/q/27162449
tags question: http://stackoverflow.com/q/27299669
tag name: android
tags question: http://stackoverflow.com/q/27245546
tags question: http://stackoverflow.com/q/27241784
tags question: http://stackoverflow.com/q/27188810
type: Tag
tags question: http://stackoverflow.com/q/27169776
tags question: http://stackoverflow.com/q/27202321
tags question: http://stackoverflow.com/q/27304224

http://stackoverflow.com/a/27272627
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27265898
has body: just add the reference of jquery in the header tag this is a link for you to get started with jquery library

http://stackoverflow.com/a/31865507
type: Answer
has body: finally I successfully use microphone with Chrome extension in a tricky way and with some error message but the Twilio functions still work(callout &amp; recieve call). Here is my experience, due to the Twilio js library will load external library which chrome extension not allowed, so I download the two library manually Twilio.js from https://static.twilio.com/libs/twiliojs/1.2/twilio.js second lib from https://static.twilio.com/libs/twiliojs/refs/3716fe1/twilio.js (I named it as twilio-lib.js) save these two js file to your project and load it in manifest by contentscript: "content_scripts": [ { **** "js": [...,"lib/twilio.js","lib/twilio-lib.js",...], *** } ], then edit the first twilio.js; comment the line62, line66 which intend to load a lib(the second, twilio-lib.js, we already include it, so it's useless) then you can use Twilio.Device object in chrome extension, it will show many .mp3 not found message but doesn't block you use Twilio client functions and I also try to load the js in background page, but the microphone always shutdown even I get the permission.
answers question: http://stackoverflow.com/q/27310569
has comment: http://stackoverflow.com/comment/58084369
score: 0

http://stackoverflow.com/q/27248164
tagged with: autocomplete
accepted answer: http://stackoverflow.com/a/27252527
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27252527
answer count: 1
has body: I am using jDeveloper 12.1.2. I am not using ADF BC, ADF DC, ADF AM. I am trying to create a Code Editor for XML using ADF-Faces that should have functionality like autocomplete closing tag as soon as codeEditor is edited it should be marked as Changed. right click options for code editor(specific to the functionality of code). I am unable to fetch Caret position for adding autocomplete of closing tag. ValueChangeListener are getting triggered once the user tabs out the codeEditor or clicks outside codeEditor. I want to call valueChangeListener as soon as editing begins so that I can mark editor as dirty. I tried adding context menu. I am getting an error : ShowPopupBehavior is not a valid child of af:codeEditor. Also, I want to add some javascript code in codeEditor but I am getting an error : af:clientListener is not a valid child of af:codeEditor. Thanks in advance.
tagged with: oracle-adf
type: AnsweredQuestion
has title: How to add context menu, autoComplete, onChange Event in ADF CodeEditor?
type: Question
tagged with: valuechangelistener

http://stackoverflow.com/comment/43097610
score: 0
type: AnswerComment
has text: Try it. The spans are useless anyway because label has all their properties already, unless you have css specifically for span.
type: Comment
comment on: http://stackoverflow.com/a/27307982

http://stackoverflow.com/a/27311344
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27310990
answers question: http://stackoverflow.com/q/27310990
type: Answer
has body: Try this code $("#billing_zip").on("focusout keypress click",function(){ var value = $.trim($("#billing_zip").val()); alert(value.length); if (value.length == 0) { $('#billing_zip').addClass('empty'); $('#zip').addClass('empty'); } else { $('#billing_zip').addClass('else'); $('#zip').addClass('else'); } });

http://stackoverflow.com/a/27193980
answers question: http://stackoverflow.com/q/27193722
score: 14
type: AcceptedAnswer
downvote count: 0
has body: You need two components: Comments and Comment. Comment = React.createClass({ render: function(){ var comment = this.props.comment; return &lt;div&gt; &lt;p&gt;{comment.author} says {comment.comment_text}&lt;/p&gt; &lt;Comments comments={comment.children} /&gt; &lt;/div&gt; } }); Comments = React.createClass({ render: function(){ return &lt;div&gt; {this.props.comments.map(function(comment){ return &lt;Comment key={comment.id} comment={comment} /&gt; }) &lt;/div&gt; } }); The Comment renders Comments, which in turn can render Comment nodes, etc. This recursively builds the comment structure.
type: Answer
upvote count: 14
accepted answer of: http://stackoverflow.com/q/27193722

http://stackoverflow.com/a/27274871
has comment: http://stackoverflow.com/comment/43020088
answers question: http://stackoverflow.com/q/27274506
has body: here is your html code(just added jquery cdn and external JS file) Hello World Title 1 Title 2 Title 3 and your external javascript code jack.js $(document).ready(function(){ $("input:radio[name=title_format]").click(function() { var idVal = $(this).attr("id"); var value = $("label[for='"+idVal+"']").text(); $('input[name=doc-title]').val(value); }); });
has comment: http://stackoverflow.com/comment/43019673
type: Answer
has comment: http://stackoverflow.com/comment/43019759
score: 0

http://stackoverflow.com/comment/42836223
comment on: http://stackoverflow.com/q/27161070
has text: possible duplicate of [Storing Objects in HTML5 localStorage](http://stackoverflow.com/questions/2010892/storing-objects-in-html5-localstorage)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42936021
type: Comment
comment on: http://stackoverflow.com/a/27208673
score: 0
type: AnswerComment
has text: test.join("-") converts the array test to the string ",postContent-,All-,true..." then .replace(",","") will replace commas in the string with empty character so the string will be "postContent-All-true..." and finally .split("-") will convert the last string to the array ["postContent", "All", "true", ...]

http://stackoverflow.com/q/27253793
has title: preventDefault function: What is the real utility?
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27253861
answer count: 4
has answer: http://stackoverflow.com/a/27253850
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/27253844
has body: I'm newbie in jquery and saw a piece of code with something strange given the functionality of a method, the "preventDefault". Well, to test, i created a test page and made two functions with "preventDefault" inside of it. I have two questions on the same subject, i hope you can answer me. $(document).ready( function( ) { $('a').click( function( event ) {//Func 1 event.preventDefault( ); }); $("#ok").click( function( event ) {//Func 2 event.preventDefault( ); alert("Wut"); //... }); }); 1- Why, in the second function, the "alert( )" runs even if i comment "event.preventDefault( );" and the first function does not happen the same? If i comment "event.preventDefault();" in the first function, the link doesn't work! I found it strange because regardless of the method "event.preventDefault();" whether or not commented in the second function, the "alert" works the same way. I think even what comes after "alert" would run. 2- What is the real utility of this method, "event.preventDefault ();"? Why, in the second function, it seems to be useless. Can you give me some example of when it might be useful? Thanks!
type: Question
has answer: http://stackoverflow.com/a/27253879

http://stackoverflow.com/comment/43024299
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27274026
score: 0
has text: You can't update fields of the `user` object, as the docs say. Afaik this has changed from v1.0 to v2.0, but the old v1.0 docs are no longer online

http://stackoverflow.com/q/27300583
answer count: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: android
has body: I have Cordova and Ionic based mobile application. On the default page which is loaded after the start of the application is need to work with SQLLite plugin. https://github.com/brodysoft/Cordova-SQLitePlugin Problem is that view contains ng-init="setData()" Which is calling the controller method where is worked with SQL Lite plugin. And because of the the method is called before the deviceready event is not initialized (plugin can be initialized only after deviceready event). So I tried this workaround: .run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) if(window.cordova &amp;&amp; window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); db = window.sqlitePlugin.openDatabase({name:"callplanner"}); } But this not working for me. So i tried second solution: .factory('cordova', function () { return { test: function(){ document.addEventListener("deviceready", this.ready, false); }, ready: function(){ alert("Ready"); db = window.sqlitePlugin.openDatabase({name:"callplanner"}); } } }) and in controller init i tried: cordova.test(); But this is not working to (devicereadfy is fired after ng-init). After that i found this article: http://java.dzone.com/articles/ionic-and-cordovas-deviceready But i did not understand how to put "splash screen" before app is ready and how to set timeout. Have somebody idea how can I solve this problem? Many Thanks for any advice or help.
type: AnsweredQuestion
tagged with: cordova
type: Question
has answer: http://stackoverflow.com/a/27305166
upvote count: 9
possible better answer: http://stackoverflow.com/a/36160701
tagged with: javascript
has answer: http://stackoverflow.com/a/36160701
linked to: http://stackoverflow.com/q/22081180
accepted answer: http://stackoverflow.com/a/27305166
has title: How to Deviceready in right way in Ionic application?
tagged with: ionic-framework
linked to: http://stackoverflow.com/q/21556090
score: 9
has comment: http://stackoverflow.com/comment/43068061

http://stackoverflow.com/q/27266625
has comment: http://stackoverflow.com/comment/43005378
has comment: http://stackoverflow.com/comment/43005389
has comment: http://stackoverflow.com/comment/43005612
tagged with: facebook
type: AnsweredQuestion
has title: Facebook API won't load Phots
has comment: http://stackoverflow.com/comment/43005354
has comment: http://stackoverflow.com/comment/43004938
accepted answer: http://stackoverflow.com/a/27269044
has comment: http://stackoverflow.com/comment/43007145
has comment: http://stackoverflow.com/comment/43004745
type: Question
has comment: http://stackoverflow.com/comment/43008582
tagged with: api
has body: I have been trying to get Facebook API to load my photos. I just keep getting array[0]. I am very new to Facebook Developer, so any help would be great. Thanks My code: if(response.status == "connected"){ FB.api("/me/", function(resp2){ console.log(resp2); $("#userinfo").append("&lt;br/&gt;Welcome "+resp2.name+"!"); // store info in object userinfo.name = resp2.name; //userinfo.gender = resp2.name; //userinfo.id = resp2.id; //alert(resp2.id) }); FB.api("/me/picture", function(pic_resp){ console.log(pic_resp); $("#userinfo").append("&lt;img src='"+pic_resp.data.url+"' /&gt;"); // store info in object userinfo.pic = pic_resp.data.url; }); FB.api("/me/photos", function(photos_resp){ console.log(photos_resp); }); } else{ FB.login(function(response){ },{scope: 'user_photos'}); }
has comment: http://stackoverflow.com/comment/43006686
has comment: http://stackoverflow.com/comment/43006479
tagged with: javascript
has answer: http://stackoverflow.com/a/27266804
score: 0
answer count: 2
tagged with: sdk
has comment: http://stackoverflow.com/comment/43008629
has comment: http://stackoverflow.com/comment/43007094
possible better answer: http://stackoverflow.com/a/27266804
has answer: http://stackoverflow.com/a/27269044

http://stackoverflow.com/q/27267376
has comment: http://stackoverflow.com/comment/43006414
has body: I have the following string in a JS variable: 1sPos1234sArticle33342sQuantity2sPos4321sArtikcle24333sQuantity As you can see, I have a separator for each Position called sPos, for each Article called sArticle and for each Quantity called sQuantity. Now I want to search for all Positions (in this string case: 1,2 and 3) via my separator sPos. Id like to get the string before the sPos seperator. The same thing I want to do with sArticle and sQuantity. Hopefully someone can help me out. Cheers!
has comment: http://stackoverflow.com/comment/43006573
type: Question
tagged with: search
tagged with: arrays
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43006032
answer count: 1
has comment: http://stackoverflow.com/comment/43005871
has comment: http://stackoverflow.com/comment/43005944
has answer: http://stackoverflow.com/a/27281738
has comment: http://stackoverflow.com/comment/43005751
type: UnansweredQuestion
has title: JavaScript searching for a string in a string with an exact separator

http://stackoverflow.com/q/27168424
answer count: 4
has body: I am calculating the number of days between the 'from' and 'to' date. For example, if the from date is mm/dd/yyyy and the to date is mm/dd/yyyy. How do I get the result using JavaScript? from date is like:11/25/2014 to date is like :11/27/2014 I need result as 2 by using javascript>
has answer: http://stackoverflow.com/a/27168819
score: 0
has comment: http://stackoverflow.com/comment/42828286
possible better answer: http://stackoverflow.com/a/27168627
linked to: http://stackoverflow.com/q/3224834
tagged with: javascript
has answer: http://stackoverflow.com/a/27168627
has answer: http://stackoverflow.com/a/27168634
accepted answer: http://stackoverflow.com/a/27168819
duplicate of: http://stackoverflow.com/q/3224834
has answer: http://stackoverflow.com/a/27168783
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42828948
has title: how to get difference between two dates using javascript
tagged with: jquery
type: Question

http://stackoverflow.com/comment/43002429
has text: Im glad to help you. But stil, nothingnecessary gave you really great answer. Too bad I am working on one web right now, so I had no time to play with it. Anyway, enjoy and when youll have fully working page, send me the link. Ill gladly play couple games.
type: Comment
comment on: http://stackoverflow.com/a/27264380
score: 1
type: AnswerComment

http://stackoverflow.com/q/27181341
upvote count: 2
has title: ng-repeat does not recognize update to model
has body: I am not able to iterate over the values of a model I am updating. I have the following controller app.controller('VariantsController', ['$http', function($http){ var ctrl = this; this.cars = []; // I get the cars eventually ... this.selected_car = null; this.selectCar = function(car){ ctrl.selected_car = car; } When the user clicks on a "car" on the webpage, I update the controller's selected_car. The page updates appropriately to show the name of the selected car, but ng-repeat does not iterate over the selected_car's properties. The following is the relevant html (variants is the alias of the controller): {{variants.selected_car.name}} {{key}} {{val}} I looked into this: AngularJS: ng-repeat list is not updated when a model element is spliced from the model array but the accepted answer states "Whenever you do some form of operation outside of angularjs ...". In this case, I am updating the model from within the controller so it should not have been a problem. Also, how would I use $apply in this case when I'm not explicitly using $scope? selected_car.specs is an object with a lot of keys: { ... mileage: 13.53, mileage_city: 23, mileage_highway: 32, power: 220, ... } Plunker (courtesy @Phil): http://plnkr.co/edit/ULSr2Tk5D7phTYW0t7Ys?p=preview
has comment: http://stackoverflow.com/comment/42850982
favorite count: 0
has comment: http://stackoverflow.com/comment/42851604
has comment: http://stackoverflow.com/comment/42851132
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42851022
accepted answer: http://stackoverflow.com/a/27181831
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/42850993
downvote count: 0
linked to: http://stackoverflow.com/q/15475601
has answer: http://stackoverflow.com/a/27181388
type: Question
has answer: http://stackoverflow.com/a/27181831
answer count: 2
has comment: http://stackoverflow.com/comment/42851147
possible better answer: http://stackoverflow.com/a/27181388
has comment: http://stackoverflow.com/comment/42851001
has comment: http://stackoverflow.com/comment/42851277
tagged with: javascript
has comment: http://stackoverflow.com/comment/42851348

http://stackoverflow.com/comment/42966095
comment on: http://stackoverflow.com/q/27244321
score: 0
has text: I want the elements to remain in the dom after render. Currently they itemViews render then disappear.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42946467
type: QuestionComment
has text: Can you just generate the proper javascript server-side? I don't see what you are using in your tags? ASP, MVC, PHP, something like that?
score: 0
comment on: http://stackoverflow.com/q/27234852
type: Comment

http://stackoverflow.com/q/27270076
favorite count: 0
has title: How to get a LOW framerate when an iframe is in the viewport?
type: UnansweredQuestion
tagged with: iframe
score: 2
type: Question
upvote count: 2
downvote count: 0
has body: I need to get a LOW framerate when a cross-domain iframe is scrolled into the viewport. This is needed because I want to use requestAnimationFrame() to understand the position of it, from within the cross-domain iframe. For example, var last_time = 0; var lst_diff = []; var avg = 0; function frame_check(current_time){ var diff = current_time - last_time; last_time = current_time; if (lst_diff.length &gt; 5){ lst_diff.shift(); } lst_diff.push(diff); var sum = 0; lst_diff.forEach(function(val){ sum += val; }); avg = sum / lst_diff.length; // if (avg &lt; some threshold ) // indicates it is in the viewport // do something requestAnimationFrame(frame_check); } requestAnimationFrame(frame_check); When it is in the viewport, what can I do in the iframe to make it efficient, in terms of taking little space and drops the framerate significantly? I tried to Draw something in the canvas but the browser keeps doing it even out of the viewport; Apply heavy CSS styles like multiple text-shadow and change the position of the div but it didn't work well. I cannot even tell if the framerate was dropping. Thanks!
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27270341
answer count: 1

http://stackoverflow.com/comment/42870336
type: Comment
has text: this looks good. does this also work for new elements which are created _after_ dom ready?
type: AnswerComment
comment on: http://stackoverflow.com/a/27192312
score: 0

http://stackoverflow.com/comment/42879513
comment on: http://stackoverflow.com/a/27181803
type: AnswerComment
has text: I don't know enough about Mocha to help you, but if you think your code is working right, then the problem is that the test is checking the `':visible'` state of the element before the animation has had a chance to make it visible. You need to figure out how to delay the check until after the animation has started.
type: Comment
score: 0

http://stackoverflow.com/comment/43002116
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27264565
score: 0
has text: Oh man, you gave me the jackpot. Not only am I looking over your code and thinking about how much harder I can make things at time, but I'm super appreciative of how you break it down for me. The CSS was totally unnecessary but greatly appreciated. You really went above and beyond, thank you a ton!

search-engine
type: Tag
tag name: search-engine
tags question: http://stackoverflow.com/q/27154361

escaping
tags question: http://stackoverflow.com/q/27228275
type: Tag
tags question: http://stackoverflow.com/q/27253232
tag name: escaping
tags question: http://stackoverflow.com/q/27256458
tags question: http://stackoverflow.com/q/27190304
tags question: http://stackoverflow.com/q/27176696
tags question: http://stackoverflow.com/q/27168651

http://stackoverflow.com/q/27290098
tagged with: http://stackoverflow.com/tag/csv
answer count: 1
has answer: http://stackoverflow.com/a/27913732
score: 0
has body: I m trying to modify the example of Google store locator which can be found here : https://googlemaps.github.io/js-store-locator/examples/panel.html. However whatever I try it seems that it can't parse the CSV. I have read this question here Google Maps Store Locator - modify default example , but my CSV is not modified at all. I didn't even open it, to edit it. Just to be clear I didn't modify-change any file of the example, I m just trying to see how it works. What could be my problem?. I have tried so far: Downloading unzipping and running panel.html Downloading running without unzipping Downloading to different PC (without excel installation) Running it from xampp uploading to a web server what else can I try? I really need it working so I can modify it and build a part of my project on it. Thanks in advance
has title: Google maps store locator is not parsing CSV
linked to: http://stackoverflow.com/q/14940224
tagged with: google-maps
linked to: http://stackoverflow.com/q/1293147
tagged with: javascript
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/42970155
type: QuestionComment
comment on: http://stackoverflow.com/q/27243383
has text: It _sounds_ like you want a [Writable Computed](http://knockoutjs.com/documentation/computed-writable.html), but yes - as @Tanner says, more info would be useful.
score: 0
type: Comment

http://stackoverflow.com/comment/61440516
type: AnswerComment
has text: Please add a description to explain your answer.
type: Comment
comment on: http://stackoverflow.com/a/36940471
score: 1

http://stackoverflow.com/comment/42996364
comment on: http://stackoverflow.com/q/27256261
type: QuestionComment
has text: Functions can be used as constructors. this.something is an instance specific member and members on the constructor prototype are shared among instances. Members declared as var could be available in closures to simulate private members. All explained here: http://stackoverflow.com/questions/16063394/prototypical-inheritance-writing-up/16063711#16063711
score: 0
type: Comment

http://stackoverflow.com/comment/43004846
has text: mustache (or some other templater) is what you need https://github.com/janl/mustache.js
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27266901
score: 0

http://stackoverflow.com/q/27161821
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42817153
score: 3
has title: Preserve property attributes (writeable, configurable) after JSON.parse()
has comment: http://stackoverflow.com/comment/42817197
has comment: http://stackoverflow.com/comment/42817213
upvote count: 3
has answer: http://stackoverflow.com/a/27162167
has comment: http://stackoverflow.com/comment/42817425
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/42817229
has comment: http://stackoverflow.com/comment/42817237
has body: Lets say that I'm creating an object in somewhere else and passing it somehow to my module. Maybe it was created on the server in node.js, maybe it was created in a different module and for whatever reason I'm JSON.stringify()ing it and passing the serialized version (especially if its coming from the server). But I want this particular property to be immutable: var foo = {}; Object.defineProperty(foo, 'bar', { value: 'bar', writeable: false, enumerable: true }); console.log(foo.bar); //bar foo.bar = 'foo'; //fails, throws err in strict console.log(foo.bar); //still bar var fii = JSON.parse(JSON.stringify(foo)); console.log(fii.bar); //still bar fii.bar = 'foo'; //succeeds console.log(fii.bar); //now foo Is there any way of preserving this meta-data so that the bar property is immutable without sending it separately?
accepted answer: http://stackoverflow.com/a/27162167
answer count: 1

http://stackoverflow.com/q/27264627
score: 1
favorite count: 0
tagged with: parse-platform
type: Question
tagged with: squarespace
upvote count: 1
tagged with: firefox
tagged with: javascript
type: UnansweredQuestion
has body: I'm new to parse and javascript. i'm going through a very simple tutorial at Parse.com (https://parse.com/apps/quickstart#parse_data/web/new) and created the following block of code. It works on chrome and IE but not safari or firefox. I got the cross-origin request blocked error on firefox. Could you please help? Firefox Error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.parse.com/1/classes/things. This can be fixed by moving the resource to the same domain or enabling CORS. My Code: var PARSE_APP = "XXX"; var PARSE_JS = "XXX"; $(document).ready(function () { Parse.initialize(PARSE_APP, PARSE_JS); $("#FinishQuiz").click(function () { var ShoulderStrap = ""; if ($("#ShoulderStrap1").prop("checked")) { ShoulderStrap = "1" } if ($("#ShoulderStrap2").prop("checked")) { ShoulderStrap = "2" } if ($("#ShoulderStrap3").prop("checked")) { ShoulderStrap = "3" } NoteObject = Parse.Object.extend("things"); var object = new NoteObject(); object.save({ ShoulderStrap: ShoulderStrap }).then(function (object) { alert("yay! it worked"); }); });
tagged with: cross-domain
answer count: 0
downvote count: 0
has title: Parse.com - Cross-Origin Request Blocked

http://stackoverflow.com/comment/42957480
score: 2
has text: Browsers kill http requests when it exits. It is a race.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27240477

http://stackoverflow.com/q/27250675
tagged with: javascript
has answer: http://stackoverflow.com/a/27250735
type: AnsweredQuestion
downvote count: 0
has title: Awaiting nested asynchronous tasks using Promises
score: 1
tagged with: asynchronous
favorite count: 0
tagged with: promise
type: Question
has body: I have code that looks similar to this: // Get the data via an AJAX call fetchAjaxData() .then(function(data) { // Update or insert the data - cannot use a merge data.forEach(function(item) { updateTable(item) .then(function(result)) { // If no rows were updated, insert the item if (result.rowsAffected == 0) { insertIntoTable(item); .then(function(result)) { console.log("item added"); }); } }); }); return data.length; }).then(function(l) { useInsertedItems(l); }); The problem is when useInsertedItems runs, the data might not have yet been inserted or updated yet. How can I ensure that the data is fully updated or inserted before this point?
accepted answer: http://stackoverflow.com/a/27250735
possible better answer: http://stackoverflow.com/a/27250729
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27250729

http://stackoverflow.com/a/71276225
answers question: http://stackoverflow.com/q/27177661
downvote count: 0
type: Answer
has body: This is an example for those who want to know how to use the localStorage. Content editable - edit me and save! Save Load It is written in pure javascript with no dependencies.
upvote count: 1
score: 1

http://stackoverflow.com/a/27217523
downvote count: 0
has comment: http://stackoverflow.com/comment/43009884
has body: The GL will assign locations for each attribute, no matter if you query them or not. However, you only have one active attribute, since asdf has no effect whatsoever and will be optimized away. So it is very likely (but not guaranteed) that pos ends up as attribute 0. Even if asdf were used, there still would be the chance that it ends up as 0, as the mapping between attribute names and locations is totally implementation-specific. The recommendation is of course: don't do that. Either, assign the locations yourself via glBindAttribLocation (before linking the program), or query what the GL has assigned, otherwise the behavior will vary with each implementation.
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27217285
has comment: http://stackoverflow.com/comment/42941881
has comment: http://stackoverflow.com/comment/42947756
has comment: http://stackoverflow.com/comment/42999245

http://stackoverflow.com/comment/42942730
has text: Try to add `parseInt` like `parseInt(arguments[i])` and `var answer=0;`
comment on: http://stackoverflow.com/q/27232984
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27168426
has body: You should use bracket notation for this. Using it you can target property of the object with the name stored in variable: $scope[name] = '';
has comment: http://stackoverflow.com/comment/42828760
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42829149
type: Answer
has comment: http://stackoverflow.com/comment/42828402
has comment: http://stackoverflow.com/comment/42828539
has comment: http://stackoverflow.com/comment/42828649
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27168331
has comment: http://stackoverflow.com/comment/42828472
answers question: http://stackoverflow.com/q/27168331
score: 2

http://stackoverflow.com/q/27166520
tagged with: angularfire
has body: Unless I am accessing a firebase user in an auth callback, the object has $$conf added to it which prevents me from creating a copy of a user profile to move to a new location. Is there any way around that? //any variation of this doesn't seem to work except for in an auth callback var teamRef = new Firebase('https://demo.firebaseio.com/teams/' + teamName); var teamList = $firebase(teamRef.child('profiles')); teamList.$set(user.uid, user); The user object logs out to this: e {$$conf: Object, $id: "simplelogin:107", $priority: null, email: "andrey@dsrp.tv", md5_hash: "7130dfaebedd9ac16f5e5d73822b160c"…}$$conf: Object$id: "simplelogin:107"$priority: null Even if I just grab the user.uid value I still get the error: Error: Firebase.set failed: First argument contains an invalid key ($$conf). Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]" This has stopped me dead in my tracks. I'm currently trying to think of a way to do what I need to do from an auth callback instead of in a different location. Any ideas would be much appreciated.
has title: When working with a copy of a user in firebase $$conf is added to the object so I can't copy the user to a new location?
type: UnansweredQuestion
type: Question
tagged with: firebase
has answer: http://stackoverflow.com/a/27303174
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43069224
tagged with: javascript

http://stackoverflow.com/comment/43222514
has text: Looks right--the schedulePromise* methods are pre-built completed handlers that you insert into the arg for a .then and then chain, which is what you've done.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27303078
type: AnswerComment

http://stackoverflow.com/comment/43050404
comment on: http://stackoverflow.com/q/27292508
type: Comment
type: QuestionComment
has text: jquery animations only work on numeric values, you cannot use it for background color
score: 0

http://stackoverflow.com/q/27298304
type: Question
has comment: http://stackoverflow.com/comment/43061368
score: 4
upvote count: 4
has body: The Mozilla javascript documentation on the arguments object contains the following warning: You should not slice on arguments because it prevents optimizations in JavaScript engines (V8 for example). First what does it mean by slicing "on" arguments. I presume it means: var args = Array.prototype.slice.call(arguments); Which is the example they give for creating an array representing the arguments object. But it seems odd to provide the code to do it and then immediately warn "you should not do that". What sort of optimizations does this prevent? Does it just affect the performance of the method, or does it cause some kind of rippling effect that degrades the application? Will it really matter anyway in a typical application? I wish they hadn't put that warning in as I suspect I would be perfectly happy not knowing.
linked to: http://stackoverflow.com/q/23509312
downvote count: 0
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/23509312
has comment: http://stackoverflow.com/comment/43060960
has comment: http://stackoverflow.com/comment/43061228
has title: Why should I not not slice on the arguments object in javascript?
answer count: 0
has comment: http://stackoverflow.com/comment/43061144
type: UnansweredQuestion

http://stackoverflow.com/a/27158623
has body: I've spent a lot of time comparing Javascript charting frameworks and would recommend HighCharts. It's the most complete JS charting library out there.
has comment: http://stackoverflow.com/comment/43183141
has comment: http://stackoverflow.com/comment/42812275
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42878571
score: 1
has comment: http://stackoverflow.com/comment/42818249
has comment: http://stackoverflow.com/comment/42877011
type: Answer
answers question: http://stackoverflow.com/q/27158465
has comment: http://stackoverflow.com/comment/42816885
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27158465

http://stackoverflow.com/comment/48905317
type: QuestionComment
has text: Hi, i'm also learning these stuff. from where i can find full example of file writing in Hybrid Apps using visual studio?
type: Comment
comment on: http://stackoverflow.com/q/27295328
score: 0

http://stackoverflow.com/comment/42970085
has text: By the time you want to express more than one concern in a URL, I would opt for query strings.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27247489

http://stackoverflow.com/comment/43040631
type: QuestionComment
comment on: http://stackoverflow.com/q/27286706
score: 2
has text: You are missing `()`.
type: Comment

http://stackoverflow.com/comment/43065406
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27288004
has text: I edited and updated the revision, but the click does not work yet as `Error: $ionicModal is undefined`
score: 0

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/27250566
tag name: google-fusion-tables

http://stackoverflow.com/comment/43058131
type: Comment
type: QuestionComment
score: 4
has text: Can you tidy up your code (ie close the tags etc so it's complete) and explain what doesn't work about it?
comment on: http://stackoverflow.com/q/27296876

http://stackoverflow.com/comment/43043662
type: Comment
type: QuestionComment
has text: Have you checked https://github.com/bassjobsen/Bootstrap-3-Typeahead?
comment on: http://stackoverflow.com/q/27288634
score: 0

http://stackoverflow.com/a/37301238
has comment: http://stackoverflow.com/comment/64067401
type: Answer
accepted answer of: http://stackoverflow.com/q/27182829
answers question: http://stackoverflow.com/q/27182829
has comment: http://stackoverflow.com/comment/64064554
has comment: http://stackoverflow.com/comment/64071671
has comment: http://stackoverflow.com/comment/64073655
type: AcceptedAnswer
downvote count: 0
score: 110
has body: The following applies to Chart.js 2.*. If you only have one x-axis, whether the vertical grid lines (that are related to this x-axis) are displayed or not, is specified by the boolean value of options.scales.xAxes[0].gridLines.display. To be more precise, the following chart options disable the display of vertical grid lines for the single x-axis case. options : { scales : { xAxes : [ { gridLines : { display : false } } ] } }
upvote count: 110

http://stackoverflow.com/q/27179040
has body: I have a problem regarding 'offsetHeight' property does not get updated after updating font size. Bellow is the code. function shrink_toolbar_text() { var toolbar = document.getElementById("toolbar"); var icons = document.getElementsByClassName("icon-alone"); var icon_size = 64; var icon_height = icons[0].offsetHeight ; while( icon_height &gt; toolbar.offsetHeight) { // textSpan.style.fontSize = parseInt(textSpan.style.fontSize) - 1; icon_size = icon_size -1; for ( i=0; i&lt; icons.length ;i++){ icons[i].style.fontSize = icon_size ; } icon_height = icons[0].offsetHeight ; console.log( icon_height); console.log( icon_size); // console.log( parseInt(icon_size)); } console.log("shrink_toolbar_text() "); } any workaround on this situation ? I've tried following things so far. 1. Try to redraw each and every icons using show and hide. 2. Tried 'getComputedStyle()' but it don't return a value called 'offsetHeight' at all. Any idea why code is not working?
tagged with: css
has title: new offsetHeight does not calculated after updating font size
tagged with: dynamic
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27179274
score: 0
answer count: 1
tagged with: user-interface
type: UnansweredQuestion

http://stackoverflow.com/a/27300894
accepted answer of: http://stackoverflow.com/q/27300820
type: Answer
has comment: http://stackoverflow.com/comment/43065566
score: 3
has comment: http://stackoverflow.com/comment/43065619
downvote count: 0
has body: Simply like this : $(document).ready(function () { $('.menu-navigation-container ul li[class*=current]').addClass('active'); });
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27300820

http://stackoverflow.com/a/27192368
answers question: http://stackoverflow.com/q/27192230
has comment: http://stackoverflow.com/comment/42871045
has body: This is invalid code: var obj2 = { Prototype : obj1, name : 'Bhojendra' }; You're using spec language that's not part of actual language syntax. There's currently no (standard) way to set the prototype object within an object literal, but it is coming in ECMAScript 6. At that point, you'll be able to do this in browser environments and other environments that decide to support the syntax: var obj2 = { __proto__ : obj1, name : 'Bhojendra' }; This does currently work in some browsers, but isn't an official syntax until ECMAScript 6 is finalized with its inclusion. So what the language spec is doing by referring to Prototype is it's making a generic reference to the next object in the prototype chain. For example, let's say I have a constructor like this: function Foo() { this.x = 123; } And we create an object from that constructor like this: var foo = new Foo(); Now the foo object's prototype chain looks like this: foo --&gt; Foo.prototype --&gt; Object.prototype --&gt; null The Prototype of the foo object is the object located at Foo.prototype. And so when you look for a property on your foo object, if it can't find it, it'll continue the search at the Foo.prototype object. It continues down the chain until it either finds your property or runs out of objects to search, and returns undefined. So a conceptual, high level model of what prototypal inheritance is would go something like this: The prototype chain is just a chain of objects. Let's say you want to have an object where if you can't find a property on it, it automatically looks for the property on another object. And let's say that other object is set up to look for it on yet another object. That's the prototype chain. my_obj -&gt; other_obj -&gt; another_obj If you can't find a property on the my_obj, it'll automatically search for it on the next object in the chain and so on until it either finds it or returns undefined. JavaScript uses "constructor" functions to set this up in a somewhat weird…
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/42870507
has comment: http://stackoverflow.com/comment/42871129
accepted answer of: http://stackoverflow.com/q/27192230
has comment: http://stackoverflow.com/comment/42870603

http://stackoverflow.com/comment/42829467
comment on: http://stackoverflow.com/q/27168194
type: Comment
type: QuestionComment
score: 0
has text: Sorry, I meant percentage. Check my answer I have tried to solve it.

http://stackoverflow.com/comment/42961838
has text: why can't you use jQuery event handlers
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27242998
type: QuestionComment

http://stackoverflow.com/comment/42813087
score: 0
type: AnswerComment
has text: it gives me an error in the console.. **Expected identifier** after function() ?
type: Comment
comment on: http://stackoverflow.com/a/27159411

http://stackoverflow.com/comment/42832911
has text: Thanks for the answer, but why is it like that? I can not see why they should behave differently. Especially $timeout and $http?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27171163

http://stackoverflow.com/a/27239495
type: Answer
accepted answer of: http://stackoverflow.com/q/27231738
upvote count: 9
answers question: http://stackoverflow.com/q/27231738
has comment: http://stackoverflow.com/comment/42980129
has comment: http://stackoverflow.com/comment/42979946
downvote count: 0
score: 9
type: AcceptedAnswer
has body: Using the jQuery Validation plugin, these are the standard events that will trigger validation on a particular element (the last one is a bit different)... typing in a box selecting from a list clicking a checkbox or radio button losing focus of the input element clicking the submit button (entire form is validated) Since none of those things are triggered when a hidden element changes value, you'll need to trigger it yourself by using the .valid() method to validate the element. You've shown us no code whatsoever, let alone the code that changes the value of the hidden element, so I can only give you something generic. You could place the .valid() code within whatever function you use to change the value... change the value of the hidden element call .valid() to validate the hidden element $(document).ready(function() { $('#myform').validate({ // initialize plugin // your options }); $('#some_button').on('click', function() { // some imaginary button that changes the hidden value $('input[name="myHiddenElement"]').val('newvalue'); // &lt;- change the hidden value $('input[name="myHiddenElement"]').valid(); // &lt;- triggers validation on the hidden element }); }); You will likely need to use other plugin options like the errorPlacement option to properly place the error message label within your layout, otherwise it will float someplace after the hidden element.

http://stackoverflow.com/comment/42974774
type: AnswerComment
has text: It is purely my opinion and of course it depends on the project, but I would say that if you want to pass data from one page to another - consider some server-side programming, and if you want to do everything with JavaScript - consider making it a "one-page" application
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27232931

http://stackoverflow.com/comment/42965527
comment on: http://stackoverflow.com/a/27245051
score: 0
type: AnswerComment
type: Comment
has text: may i know how to call function using html

http://stackoverflow.com/a/27182432
type: Answer
accepted answer of: http://stackoverflow.com/q/27182095
score: 1
upvote count: 1
has body: Yes, you can use filterFilter service. For example app.controller('ExampleCtrl', ['$scope','filterFilter', function($scope, filterFilter) { $scope.dropdownOptions = [{value: "0", name: 'No'}, {value: "1", name: 'Yes'}]; $scope.getDropdownDisplayValue = function(_key) { var objs = filterFilter($scope.dropdownOptions , {value: _key}); if( objs.lenght &gt; 0) { return objs[0].name; } else { return 'n/a'; } }; }]); Hope this help.
has comment: http://stackoverflow.com/comment/42856156
answers question: http://stackoverflow.com/q/27182095
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27262307
tagged with: promise
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42997345
has comment: http://stackoverflow.com/comment/42997305
has comment: http://stackoverflow.com/comment/42997296
answer count: 0
has body: I have a basic helper that gets the user by username except there are instances where the promise isn't resolved yet, so getting the user by username returns null. The following example is in Angular using coffeescript: angular.module('test') .service('UserHelper', ['User', (User) -&gt; users = null User.getAll().$promise.then((data) -&gt; users = data.users ) getUserByUsername = (user) -&gt; username = user.username index = _.findLastIndex(users, (user) -&gt; user.username == username ) return users[index] return { getUserByUsername: (user) -&gt; return getUserByUsername(user) } ]) So when I call this.getUserByUsername, I would expect to get the user object. I don't know the proper design pattern to achieve what I want and still have it wait for the promise to be resolved before running this line return getUserByUsername(user).
tagged with: design-patterns
type: Question
has comment: http://stackoverflow.com/comment/42997428
has comment: http://stackoverflow.com/comment/42997272
tagged with: javascript
has comment: http://stackoverflow.com/comment/43002266
has title: How do I wait for a promise to resolve? or am I doing it wrong?
score: 0

http://stackoverflow.com/a/27181089
has comment: http://stackoverflow.com/comment/42850584
has comment: http://stackoverflow.com/comment/42861684
upvote count: 9
answers question: http://stackoverflow.com/q/27180914
type: Answer
accepted answer of: http://stackoverflow.com/q/27180914
has body: Why not simplify things function cryptoRandom() { return window.crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000; } What's going on here? Assume window.crypto.getRandomValues will giving us truely random bits Ask for 32 bits (unsigned integer i) The minium value of i is 0x00000000 (or 0) The maximum value of i is 0xFFFFFFFF (or 4294967295) Transform these points onto the range you want; (i - min) / (max + 1)
has comment: http://stackoverflow.com/comment/42850550
score: 9
has comment: http://stackoverflow.com/comment/42850614
has comment: http://stackoverflow.com/comment/42850629
has comment: http://stackoverflow.com/comment/42868469
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27299066
tagged with: javascript
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/43062223
has answer: http://stackoverflow.com/a/27299320
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27299149
type: UnansweredQuestion
score: 2
has title: Is it possible to split JavaScript across multiple files and access functions from each other
downvote count: 0
has body: What I would like to do is have a JavaScript file which would contain jQuery functions that are used across multiple sites (all hosted on the same CMS - eTouches, so there is no cross domain scripting issue) and then have a site specific JavaScript file for each site which utilised the functions, making it easy to change the central function file as needed. I am getting errors when trying to do this though, with functions not being defined when the second script it trying to execute things. Is this a possible and have I missed something basic or is it something that is not possible. I don't think it is possible to include files as you do in PHP etc, but if I call the functions file before the site specific one I thought this should work? Thanks in advance for any help. Code from function document $.noConflict(); jQuery(document).ready(function ($) { $('&lt;a href="#" class="mobile-menu-toggle-link"&gt;&amp;#9776; Menu&lt;/a&gt;').insertBefore($('.ehtm')); if ($('#right_sidebar_section').length) { } else { $('#main_section').css('width','100%') $('#main_section').css('marginLeft','0') } var mobileMenu = function (menuParent, prevSibling, menuIdentifier) { if ($('#mobileMenu').length == 0) { var $select = $('&lt;div&gt;', { 'class': 'mobile-menu', 'id': menuIdentifier }).insertBefore(prevSibling); $('.ehtm &gt; ul').prependTo($('#mobileMenu')); } if ($('.expandContract').length==0) { $('.mobile-menu &gt; ul &gt; li &gt; a').each(function(){ $(this).css("width", "120px"); $('&lt;a href="#" class="expandContract"&gt;+&lt;span&gt;&lt;/span&gt;&lt;/a&gt;').insertBefore($(this)); }) } $('.expandContract').click(function (evt) { evt.preventDefault(); $(this).text($(this).text() == '+' ? '-' : '+'); $(this).parent().find("ul").slideToggle(); evt.stopImmediatePropagation(); }) }; var menuReset = function () { $('.mobile-menu &gt; ul').prependTo($('.ehtm')); $('#mobileMenu').remove(); if (parseInt($('#outer_table').css('margin-left')) &gt; 0) { $('#outer_table').animate({ marg…
type: Question

http://stackoverflow.com/a/27164482
has body: If itemRef is an Angular service, all you need is to add the object to the items array: $scope.items.push( response ); If itemRef uses some non-Angular asynchronous service to get its response, you will need to tell Angular that things have updated: $scope.$apply( function() { $scope.items.push( response ); }); If you are having problems with $scope, it's always a good idea to use a $scope variable with a dot in, for example use $scope.data.items rather than $scope.items. See http://jimhoskins.com/2012/12/14/nested-scopes-in-angularjs.html for a great discussion on why.
has comment: http://stackoverflow.com/comment/42821726
answers question: http://stackoverflow.com/q/27163873
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/27238464
score: 1
upvote count: 1
has body: Did you hook up a click handler to your button? I updated your fiddle with this: $('#refreshBtn').on('click', function () { alert('hello world'); }); and I get the alert.
type: Answer
has comment: http://stackoverflow.com/comment/42953553
downvote count: 0
answers question: http://stackoverflow.com/q/27233856

http://stackoverflow.com/a/27250352
score: 0
has comment: http://stackoverflow.com/comment/46186144
type: Answer
has body: It's just a more-or-less obvious typo: @.children = @.populateCildren() # ^ should be @.children = @.populateChildren() but notice that omitting the dot is more idiomatic: @children = @populateChildren()
answers question: http://stackoverflow.com/q/27250213

http://stackoverflow.com/q/27310861
has comment: http://stackoverflow.com/comment/43082620
has body: I am working on a phonegap application which adds 20 user under a certain super-user . As there are only 20 id's available under one super-user , i have used the auto-increment in id field . Now i am given the following scenario - 1) User1 enters his id as 1 2) User1 then edits his id as 4 as he likes that number 3) User2 registers and the default number comes as 5 4) User2 edits his id as 20 This is where my problem lies , how do i re-check and assign the numbers that have been assigned and then later on edited . As you can see , in the above scenario numbers from 1-4 and from 4-20 would go unused . Following is the code that i have done till now - var db = window.sqlitePlugin.openDatabase("Database", "1.0", "Application", -1); var Id = window.localStorage["user_id"]; var Number = ''; db.transaction(function(txaf) { db.transaction(function(tx) { //store data for local storage //var Number = GenerateRandom(); //var Number; tx.executeSql( "SELECT id,number FROM range WHERE superuser_id = '" + SuperuserId + "' ORDER BY id ASC Limit 1 ;", [], function(tx, result) { //if user id found then just update data for that user //alert(result.rows.item(0).id); Number = result.rows.item(0).number; var UpdateId = result.rows.item(0).id; var Data = JSON.parse(window.localStorage[ "data"]); Data.number = Number; var DataJson = JSON.stringify(Data); window.localStorage["data"] = DataJson; tx.executeSql( "UPDATE range SET is_used = '1' WHERE id = '" + UpdateId + "'", '', function(tx, resUpdate) {}, function(e) { //console.log("ERROR at update: " + e.message); }); }); }, function(e) { //console.log("ERROR: " + e.message); });
has title: Setting and checking the id field manually
downvote count: 0
score: 1
tagged with: mysql
type: Question
tagged with: javascript
tagged with: phonegap-plugins
has answer: http://stackoverflow.com/a/27311027
upvote count: 1
has comment: http://stackoverflow.com/comment/43082709
answer count: 1
has comment: http://stackoverflow.com/comment/43082655
favorite count: 0
tagged with: cordova
type: UnansweredQuestion

http://stackoverflow.com/a/27255556
has comment: http://stackoverflow.com/comment/42999281
type: Answer
accepted answer of: http://stackoverflow.com/q/27255427
answers question: http://stackoverflow.com/q/27255427
has comment: http://stackoverflow.com/comment/43039614
score: 3
has body: This functionality is not available in the browsers due to security reasons. Checkout this explanation: https://stackoverflow.com/a/15201258/586051 Only Firefox browser allows it. Refer the following example in Firefox. EDIT: You can get the file name of the selected file this way: EDIT2: The following code snippet demonstrates the styling of file upload button. Here we are actually faking it but the end user wouldnt know about it. ;) EDIT3: Added value of fullPath in the comment. EDIT4: Added wrapper in HTML document.getElementById("customButton").addEventListener("click", function(){ document.getElementById("fileUpload").click(); // trigger the click of actual file upload button }); document.getElementById("fileUpload").addEventListener("change", function(){ var fullPath = this.value; // fetched value = C:\fakepath\fileName.extension var fileName = fullPath.split(/(\\|\/)/g).pop(); // fetch the file name document.getElementById("fileName").innerHTML = fileName; // display the file name }, false); #fileUpload{ display: none; /* do not display the actual file upload button */ } #customButton{ /* style the fake upload button */ background: yellow; border: 1px solid red; } My Custom Button
has comment: http://stackoverflow.com/comment/42988661
upvote count: 3
has comment: http://stackoverflow.com/comment/43052507
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43050939
has comment: http://stackoverflow.com/comment/43032528
has comment: http://stackoverflow.com/comment/43052275

http://stackoverflow.com/q/27169045
has answer: http://stackoverflow.com/a/27331691
accepted answer: http://stackoverflow.com/a/27331691
has comment: http://stackoverflow.com/comment/43037220
type: Question
has comment: http://stackoverflow.com/comment/43016691
has title: Javascript stop browser advertisement add ons
has answer: http://stackoverflow.com/a/27301835
linked to: http://stackoverflow.com/q/14319967
possible better answer: http://stackoverflow.com/a/27210835
tagged with: javascript
has comment: http://stackoverflow.com/comment/42903257
has comment: http://stackoverflow.com/comment/42902821
tagged with: browser-addons
has comment: http://stackoverflow.com/comment/42902919
has comment: http://stackoverflow.com/comment/43122242
downvote count: 3
has answer: http://stackoverflow.com/a/27324846
has comment: http://stackoverflow.com/comment/43111128
upvote count: 10
answer count: 4
has body: Is there any way to stop browser add-ons from injecting HTML code? I am having a website built in angularjs but because of some browser add-ons my route is getting messed up, this is the HTML snippet which is causing some errors in my angularjs: Because of this my URL which was: www.domain.com/app/#/users changes to www.domain.com/users And I am getting URL related errors: TypeError: Cannot read property 'charAt' of undefined If I run my website on a browser without any add-ons it works like a charm, but with the above add-ons I am getting errors. One of our websites user's is facing this issue. Is there any solution to get rid of this?
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42902940
has answer: http://stackoverflow.com/a/27210835
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43136610
score: 7
has comment: http://stackoverflow.com/comment/43112348

http://stackoverflow.com/comment/42879088
has text: Just... Wow. That works. Thank you, this is something new to me. Could you explain a little bit?
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27197079
type: AnswerComment

http://stackoverflow.com/comment/42917684
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27219197
type: Comment
has text: @FelixKling yes this is what i am thinking to do if there is no other choice. Thanks.

abide
type: Tag
tags question: http://stackoverflow.com/q/27169612
tags question: http://stackoverflow.com/q/27157101
tag name: abide

http://stackoverflow.com/comment/44707044
type: Comment
has text: Thanks. I did solve it, but it had more to do with a directive that was accessing the model directly in the directive link function, and so was bypassing the formatting parsing pipeline. :p
comment on: http://stackoverflow.com/a/28142922
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42825308
type: QuestionComment
comment on: http://stackoverflow.com/q/27154503
score: 0
has text: thanks Lars, will have a look when I can and get back to you
type: Comment

http://stackoverflow.com/comment/42942245
score: 0
comment on: http://stackoverflow.com/q/27232586
type: Comment
type: QuestionComment
has text: Yes perhaps. If the timeout function is removed from the code then it just skips image 3 and goes straight to image 4. Would simply window.onload() be a possible solution then?

http://stackoverflow.com/q/27174472
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27174501
has body: I am trying to get the name's value from an input HTML element using jQuery but it doesn't works. HTML code: &lt;p class="myclass"&gt;&lt;input type="text" name="thisismyname1" value="123"&gt;&lt;/p&gt; &lt;p class="myclass"&gt;&lt;input type="text" name="thisismyname2" value="456"&gt;&lt;/p&gt; &lt;p class="myclass"&gt;&lt;input type="text" name="thisismyname3" value="789"&gt;&lt;/p&gt; I am trying to get all the name values using this peace of code in jQuery: $(.myclass).each(function(value){ alert('input name='+ $(this).attr('name') +'='+$(this).val()); }); This $(this).attr('name') seems not to be working.
has answer: http://stackoverflow.com/a/27174584
possible better answer: http://stackoverflow.com/a/27174501
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27174584
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: How to get the name's value from a input in jquery

http://stackoverflow.com/a/27202862
has comment: http://stackoverflow.com/comment/42888850
score: 0
answers question: http://stackoverflow.com/q/27202749
has body: EDITED you simply need to do this: function slideit(){ //if browser does not support the image object, exit. if (!document.images) return document.getElementById('slide').src = slideimages[step].src document.getElementById('slide').className = "img-responsive"; whichimage = step if (step&lt;2) step++ else step=0 //call function "slideit()" every 2.5 seconds setTimeout("slideit()",2500) }
has comment: http://stackoverflow.com/comment/42889191
type: Answer

http://stackoverflow.com/a/27157871
has comment: http://stackoverflow.com/comment/61384741
score: 6
upvote count: 8
has body: You can't output HTML from the ngOptions AngularJS directive. But you can customize the option content using a function to label the elements, like so (notice that the HTML is escaped): var app = angular.module('app', []); app.controller('Test', function($scope) { $scope.selected = null; $scope.items = [{ name: 'a', value: 1, something: "xyz" }, { name: 'b', value: 2, something: "xyz" }, { name: 'c', value: 3, something: "xyz" }] $scope.show = function() { alert("selectec " + $scope.selected.name + ' with value ' + $scope.selected.value); } $scope.format = function(i) { return i.name + 'Some nice data'; }; }); press
has comment: http://stackoverflow.com/comment/42834035
downvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42834570
answers question: http://stackoverflow.com/q/27157554

http://stackoverflow.com/a/27305953
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27305786
upvote count: 1
type: Answer
has body: The main issue, apart from a number of spelling mistakes, is you don't need to return from your onclick function. However, I would suggest you use event listeners in this case to avoid confusion. function total_Cost() { var x = document.getElementById('1'); var y = document.getElementById('2'); var z = document.getElementById('3'); var s = document.getElementById('cost'); s.value = (x.value * 3.49) + (y.value * 3.60) + (z.value * 4.49); } &lt;body&gt; &lt;h2&gt;Coffee Order Form&lt;/h2&gt; &lt;form method='get'&gt; &lt;table border="1" cellpadding='0px' cellspacing='0px'&gt; &lt;tr&gt;&lt;th&gt;Product Name &lt;/th&gt;&lt;th&gt;Price&lt;/th&gt;&lt;th&gt;Quantity&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;French Vanilla (1 lb)&lt;/td&gt;&lt;td&gt;$3.49&lt;/td&gt;&lt;td&gt;&lt;input type = "text" size='5'id='1' value=''&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Hazelnut Cream (1 lb)&lt;/td&gt;&lt;td&gt;$3.60&lt;/td&gt;&lt;td&gt;&lt;input type = "text" size='5'id='2' value=''&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td align='centre'&gt;Colombian (1 lb)&lt;/td&gt;&lt;td&gt;$4.49&lt;/td&gt;&lt;td&gt;&lt;input type = "text" size='5' id='3' value=''&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;br&gt; &lt;input type='button' Value='Total Cost' id='total' onclick='total_Cost();'&gt; &amp;nbsp;&lt;input type = "text" size='10' id='cost' value=''&gt; &lt;br&gt; &lt;br&gt; &lt;input type='submit' Value='Submit Order'&gt; &amp;nbsp; &lt;input type='submit' Value='Clear Order Form'&gt; &lt;/form&gt; &lt;/body&gt;

http://stackoverflow.com/a/27269768
accepted answer of: http://stackoverflow.com/q/27269454
answers question: http://stackoverflow.com/q/27269454
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Angular has nothing to do with this. It is the express server which takes care of the paths. Take a look at server/config.js. You will see staticUrl: '/static' mentioned there. Now open server/server.js (server.js is the script which runs before anything else runs in the app so all the configuration is done within this file) and on line 21 you will see require('./lib/routes/static').addRoutes(app, config);. This requires the static.js file which instructs the app to use /static (mentioned in the config.js file) as the path for static files such as CSS and javascript files.
downvote count: 0
score: 1

http://stackoverflow.com/comment/42940342
type: Comment
comment on: http://stackoverflow.com/q/27231754
has text: `$scope.friends = ['C', 'B', 'Z', 'S'].sort();` is probably easiest
score: 2
type: QuestionComment

http://stackoverflow.com/comment/43030413
type: Comment
comment on: http://stackoverflow.com/q/27280732
has text: Is their a better way then using an iframe? I really just want to show/hide the chat window
score: 0
type: QuestionComment

http://stackoverflow.com/a/27174781
type: Answer
score: 0
has body: angular.module('App', []) .controller('MainCtrl', function ($scope) { this.patterns = ['[A-Z]', '[0-9]']; this.pattern = this.patterns[0]; });
answers question: http://stackoverflow.com/q/27174487

http://stackoverflow.com/comment/42820730
score: 0
comment on: http://stackoverflow.com/q/27164012
type: Comment
type: QuestionComment
has text: basically i have problem with length, if i remove **{0,16}** then it works.

http://stackoverflow.com/comment/42955172
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27239065
type: Comment
has text: thanks @JuanMendes - I think groupBy will solve my problem. The JSON I posted above was an over simplified version of what I have so I am trying to put the pieces together. I will update here either way to inform if it works or not. Thanks again - everyone - for the help.

http://stackoverflow.com/q/27187919
tagged with: mysql
type: Question
has title: Unable to login on first attempt
tagged with: javascript
score: 0
has body: I had built a register and a login page. When I register and try to login immediately, it works. But if I try it again after restarting my XAMPP, it won't log in. Any suggestions? Here is my login code: <?php session_start(); if ($_SESSION["logging"] && $_SESSION["logged"]) { print_secure_content(); } else { if (!$_SESSION["logging"]) { $_SESSION["logging"] = true; loginform(); } else if ($_SESSION["logging"]) { $number_of_rows = checkpass(); if ($number_of_rows == 1) { $_SESSION[user] = $_GET[userlogin]; $_SESSION[logged] = true; print " you have loged in successfully "; print_secure_content(); } else { print "wrong pawssword or username, please try again"; loginform(); } } } function loginform() { print "please enter your login information to proceed with our site"; print(" username password "); print " "; print " register now! "; } function checkpass() { $servername = "localhost"; $username = "root"; $conn = mysql_connect($servername, $username) or die(mysql_error()); mysql_select_db("konjam_disc", $conn); $sql = "select * from users where name='$_GET[userlogin]' and password='$_GET[password]'"; $result = mysql_query($sql, $conn) or die(mysql_error()); return mysql_num_rows($result); } ****** EDIT ****** This is the error that I'm receiving when I go to the login page: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/demo/admin/new/index.php:8) in /Applications/XAMPP/xamppfiles/htdocs/demo/admin/new/index.php on line 9 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/demo/admin/new/index.php:8) in /Applications/XAMPP/xamppfiles/htdocs/demo/admin/new/index.php on line 9
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27188044
has comment: http://stackoverflow.com/comment/42862469
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27188044

http://stackoverflow.com/q/27231334
has body: gulp.task("compile-vendor-js", function() { return gulp.src("./bower_components/*/*.js") .pipe(concat("vendor.js")) .pipe(gulp.dest("./build")) }); This gulp task will compile bower solved dependencies. The problem is, it will consider all JS files, including the minified ones, making my build file have duplicated code. I know that one solution for this is having a variable array containing all file paths, but this isn't good.
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27239248
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42941555
tagged with: gulp
favorite count: 0
has title: Gulp: running through all dependencies without duplicating?
type: UnansweredQuestion

http://stackoverflow.com/a/27279813
has comment: http://stackoverflow.com/comment/43044779
score: 1
has body: Transcluded content will always use the scope in which the directive element resides, i.e. your controller scope. That's why if you want the result argument of selectResult function to get it's value from isolated scope, then you need to establish two way binding between isolated scope's and controller scope's result properties. After setting the result property to desired value in isolated scope the controller's scope result property will be updated to the same value. So , transcluded content will use controller's result which is in sync with isolated scope's result. 1) add resultAttr='result' attribute to directive element. &lt;search resultAttr='result'&gt; &lt;div class="someStyle" ng-click="selectResult(result)"&gt;{{result.Name}}&lt;/div&gt; &lt;/search&gt; 2) establish two-way binding for result property when you define isolated scope in directive: scope: { result: "=resultAttr" } 3) set result to some value in directive
upvote count: 1
has comment: http://stackoverflow.com/comment/43028411
answers question: http://stackoverflow.com/q/27279123
has comment: http://stackoverflow.com/comment/43029479
downvote count: 0
has comment: http://stackoverflow.com/comment/43029282
type: Answer
has comment: http://stackoverflow.com/comment/43030594

http://stackoverflow.com/comment/42850834
has text: That should be fine, I used that in the Example I posted above.
comment on: http://stackoverflow.com/a/27181057
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27201132
has title: jQuery addClass to when is clicked
tagged with: addclass
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/27201278
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/27201161
possible better answer: http://stackoverflow.com/a/27201173
downvote count: 1
has answer: http://stackoverflow.com/a/27201173
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27201161
has comment: http://stackoverflow.com/comment/42885753
score: 1
has body: I'm trying to add a class to the li when the a.more is clicked. But it isn't working. 12/12/2013 The Title The excerpt will show read more.. The full content close jQuery: jQuery(function () { jQuery('.post').on('click', 'a.more', function(){ jQuery(this).addClass('active'); }); jQuery('.post').on('click', 'a.less', function() { jQuery(this).removeClass('active'); }); });
has comment: http://stackoverflow.com/comment/42885719
type: Question

http://stackoverflow.com/q/27257166
has body: I'm new to ajax and found a problem that i can't solve. I have a form on index.html with a input "ID" and a getdata.php that will use the ID to complete an url and use XPath to extract content of that url. I want use ajax for that to avoid the page refresh (maybe this is not the best approach, I am open to other suggestions if this is the case) but nothing is showing when I hit the submit button, if I use the form without ajax it works fine. My code is: Ajax form ID List Submit
tagged with: ajax
score: 0
answer count: 0
has comment: http://stackoverflow.com/comment/42988940
type: UnansweredQuestion
tagged with: php
has title: ajax submit dont showing data
has comment: http://stackoverflow.com/comment/42988092
has comment: http://stackoverflow.com/comment/42988521
has comment: http://stackoverflow.com/comment/42988343
has comment: http://stackoverflow.com/comment/42988269
has comment: http://stackoverflow.com/comment/42988624
has comment: http://stackoverflow.com/comment/42988267
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27191883
has comment: http://stackoverflow.com/comment/42869606
has body: You need to register the full script, i believe have you seen the example here? http://msdn.microsoft.com/it-it/library/bahh2fef%28v=vs.110%29.aspx
type: Answer
answers question: http://stackoverflow.com/q/27191829
has comment: http://stackoverflow.com/comment/42891716
has comment: http://stackoverflow.com/comment/42869660
score: 0

http://stackoverflow.com/q/27282757
has comment: http://stackoverflow.com/comment/43034717
has comment: http://stackoverflow.com/comment/43072771
tagged with: image-processing
type: Question
has comment: http://stackoverflow.com/comment/43034167
has comment: http://stackoverflow.com/comment/43035183
has comment: http://stackoverflow.com/comment/43035128
has comment: http://stackoverflow.com/comment/43035389
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27284346
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43036412
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/27284346
has comment: http://stackoverflow.com/comment/43034925
has body: Undefined values in array after promises: I'm using Q to manage Promises with Node.js and I'm using easyImage to process images. This block of code work fine, it load, save, cut images from tmp folder and paste it in the user folder. The only problem I have is to save the final data to the DB. I get undefined values within array... exports.postAccountImages = function(req, res, next) { User.findById(req.user.id, function(err, user) { var path = __dirname + '/../public/images/u/' + user._id + '/'; var max = 800; fs.exists(path, function(exists) { if (!exists) fs.mkdirSync(path); }); var promises = []; for (var key in req.files) { if (req.files.hasOwnProperty(key)) { (function(file) { q().then(function() { return promises.push(easyimg.info(file.path).then(function(image) { easyimg.resize({ src: file.path, dst: path + file.name, width: (image.width &gt;= max) ? max : image.width, height: (image.height &gt;= max) ? max : image.height, quality: 80 }).then(function(image) { fs.remove('./tmp-uploads/' + image.name); return { src: image.name, main: false }; }); })); }); })(req.files[key]); } } q.all(promises).then(function(result) { console.log(result); // [undefined, undefined, undefined, ...] // Here I should push result to the DB }); }); };
has title: Promise not return Object
has comment: http://stackoverflow.com/comment/43034092
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/42896422
type: Comment
has text: @Yax, and what exactly is your question? You asked why the timeago did not update, I explained why. The way described it will initialize it for all elements with the class .post_time (which has to have a iso-date in title attribute) - updated fiddle: http://jsfiddle.net/vwd4snnd/1/
comment on: http://stackoverflow.com/a/27205452
type: AnswerComment
score: 0

http://stackoverflow.com/q/27273907
type: AnsweredQuestion
has body: I have problem with JavaScript and HTML; I have a table with one row and I want use JavaScript to add an extra row. My script works fine, but my problem is that I want different ID for any textbox. I am not familiar with JavaScript. at the end I want to insert my textbox data into MSSQL. My code: and my html: <asp:Label ID="Label1" runat="server" Font-Size="Small" ForeColor="Red"></asp:Label> <asp:TextBox ID="TextBoxFam_name" runat="server"></asp:TextBox> <asp:TextBox ID="TextBoxFam_relation" runat="server"></asp:TextBox> <asp:TextBox ID="TextBoxFam_age" runat="server"></asp:TextBox> <asp:TextBox ID="TextBoxFam_education" runat="server"></asp:TextBox> <asp:TextBox ID="TextBoxFam_statuse" runat="server"></asp:TextBox> I appreciate suggestions on other scripts or other solutions.
has answer: http://stackoverflow.com/a/27274061
accepted answer: http://stackoverflow.com/a/27274061
type: Question
upvote count: 2
tagged with: c#
has title: JavaScript for generate table row
answer count: 1
tagged with: javascript
tagged with: sql-server
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: asp.net
favorite count: 0
score: 2

http://stackoverflow.com/q/27294926
has comment: http://stackoverflow.com/comment/43055577
type: UnansweredQuestion
has body: Ive read earlier that we cannot close the current tab using jQuery or Javascript. My question is, Is it possible to use the ASCII codes for "ctrl+w" (that is 23) and calling it in jquery/JS to close the current tab? I tried this code: &lt;script&gt; function closethis(){ $(document).keypress(function(e) { if(e.which == 23) { alert('Are you sure you want to close?'); } }); } &lt;/script&gt; but doesnt work.. any leads??
has title: Closing a tab using ascii codes
has answer: http://stackoverflow.com/a/27295116
type: Question
tagged with: ascii
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/1299452
has comment: http://stackoverflow.com/comment/43067223

http://stackoverflow.com/a/29040342
downvote count: 0
has body: See https://github.com/facebook/react/issues/3389#issuecomment-79236067. It looks like Perf.start() only works if it is called outside of the component lifecycle. So, call it before you start your application, or call it directly from the browser's console before you trigger the event you're trying to monitor.
has comment: http://stackoverflow.com/comment/70343947
type: Answer
answers question: http://stackoverflow.com/q/27279488
has comment: http://stackoverflow.com/comment/46321931
accepted answer of: http://stackoverflow.com/q/27279488
upvote count: 10
score: 10
type: AcceptedAnswer

http://stackoverflow.com/q/27230137
has comment: http://stackoverflow.com/comment/42937320
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42937839
upvote count: 3
downvote count: 1
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27230414
type: Question
has comment: http://stackoverflow.com/comment/42937925
possible better answer: http://stackoverflow.com/a/27230248
has answer: http://stackoverflow.com/a/27230248
tagged with: javascript
tagged with: jquery
has body: I have a website using twitter bootstrap. When developing sometimes the internet is not working so jquery won't be loaded and my site will not work. This is why I have a local copy of jquery in my js folder. I edited bootstrap files so if jquery is not detected the browser will change the location of jquery from cdn to my local file. I tried to do that but it is not working:Here is my code: if (!window.jQuery) { document.getElementById('jq').src='../../js/jquery.js'; console.log("You are using a backup file of jquery provided by our website"); } else{ console.log("jQuery has been succesfully loaded by kounelios13"); } html: This is placed inside bootstrap's js file. Any ideas???
has comment: http://stackoverflow.com/comment/42937539
answer count: 3
has answer: http://stackoverflow.com/a/27230414
has answer: http://stackoverflow.com/a/27230338
has title: document.getElementById('foo').src='' is not working
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42937577
has comment: http://stackoverflow.com/comment/42937639
favorite count: 0

http://stackoverflow.com/a/35635458
upvote count: 2
has body: Change you order of script includes to this below: the reason that your code may malfunction angular has it's own version of jqlite and strips certain namespaces and attributes... but if you change the order angular has a function that recognize if jquery calls supercede the angular versions.
answers question: http://stackoverflow.com/q/27216148
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/27233852
has comment: http://stackoverflow.com/comment/42944386
linked to: http://stackoverflow.com/q/799981
has comment: http://stackoverflow.com/comment/42944412
has answer: http://stackoverflow.com/a/27233964
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42945024
score: 0
linked to: http://stackoverflow.com/q/2304941
has title: Convert show/hide element jQuery code to JavaScript
has comment: http://stackoverflow.com/comment/43020108
type: Question
possible better answer: http://stackoverflow.com/a/27233982
answer count: 2
has comment: http://stackoverflow.com/comment/42987486
has answer: http://stackoverflow.com/a/27233982
has body: I have the following bit of code that works with jQuery, which is causing a jQuery conflict that I simply can not resolve, because of the limitations of the ystsem I am working with. &lt;script type="text/javascript"&gt; $(document).ready(function() { if (&lt;?php echo $totalpage?&gt; &gt; 14) { $('#fpointer').show(); } }); &lt;/script&gt;; So my questions is can I convert this code to JavaScript which can run without jQuery? I think I can figure out most of it but the part I'm not sure about is the $(document).ready(function() and how that translates.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42959509
accepted answer: http://stackoverflow.com/a/27233964
tagged with: jquery

http://stackoverflow.com/a/27274498
has comment: http://stackoverflow.com/comment/43018594
upvote count: 2
type: AcceptedAnswer
has body: You have an error in console. Wordpress using jQuery.noConflict(); so $ will be undefined. Use like this: jQuery(document).ready(function($) { $('.rotator').slick({ infinite: true, slidesToShow: 3, slidesToScroll: 1 }); });
accepted answer of: http://stackoverflow.com/q/27274324
answers question: http://stackoverflow.com/q/27274324
downvote count: 0
has comment: http://stackoverflow.com/comment/43018369
type: Answer
score: 2

http://stackoverflow.com/a/27184811
type: Answer
has body: Your player should be static, only one instance should exist and play all sounds. function Podcast() {}; Podcast.FILE_EXTENSION = 'mp3'; Podcast.download = function(podcast) { console.log('Downloading ' + podcast + ' ...'); }; Here we created a constructor function named Podcast with a static property called FILE_EXTENSION and a static method named download. http://elegantcode.com/2011/01/19/basic-javascript-part-7-static-properties-and-methods/
answers question: http://stackoverflow.com/q/27184759
score: 0

http://stackoverflow.com/q/27262879
has body: So I'm trying to understand paste and copy API in Google Chrome. I don't understand either. As of copy, you'll probably want to use javascript to add something in clipboard. I'm working with images (strings work well actually1): //Get DataTransferItemList var files = items.items; if(files) { console.log(files); //Create blob from canvas var blob = Blob.fromDataURL(_this.editor.selection.getSelectedImage().toDataURL("image/png")); var file; try { //Try to create file from blob, which may fail file = new File([blob], "image.png", {type:"image/png"}); } catch(e) { return false; } if(file) { //I think this should clear previous data from clipboard files.clear(); //Add a file as image/png files.add(file, "image/png"); } //console.log(files.add(file)); } The problem is, that I don't really know how does that add method work. I found this "documentation" for DataTransferItemList which says: add(any data, optional DOMString type) What's any data? (how can anybody even write this in documentation?) While something is added to clipboard, I don't know what it is. I can't paste it anywhere - except Chrome. If I inspect paste event with my copied file, this is in DataTransferItemList: It can be converted to File, but if I try to turn it back to &lt;img&gt;: ImageEditorKeyboard.prototype.processFile = function(file) { //File reader converts files to something else var reader = new FileReader(); //Refference to this class var _this = this; //happens when the file is loaded reader.onload = function(event) { var img = new Image; img.onload = function() { _this.processImage(this); }; img.src = event.target.result; }; // data url! //Read file reader.readAsDataURL(file); } I get the error2: If I log the value of event.target.result it turns out that the data was empty: console.error("String '", event.target.result, "' ain't a valid URL!"); Q: What is the exact specification of DataTransferItemList, it's methods and properties, especially the .add method? 1: To add string to clipboard (…
downvote count: 0
linked to: http://stackoverflow.com/q/27262428
favorite count: 0
type: Question
has title: What's DataTransferItemList and what is DataTransferItemList.add doing?
score: 5
answer count: 0
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42999740
upvote count: 5
has comment: http://stackoverflow.com/comment/42999663
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/43039498
type: Comment
comment on: http://stackoverflow.com/q/27267794
score: 0
has text: About time someone answered this... :)
type: QuestionComment

http://stackoverflow.com/comment/43009588
has text: @AndrewCounts is right; angular does not play with these paths. It cannot, since the browser is using this path to *load* angular. Your server has to have it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27269454

http://stackoverflow.com/a/59903800
type: Answer
downvote count: 1
score: -1
upvote count: 0
has body: You can use this simple and lightweight Ajax module with the following syntax: import {ajax} from '/path/to/ajax.min.js'; ajax('https://api_url.com') .data('key-1','Value-1') .data('key-2','Value-2') .send() .then((data) =&gt; { console.log ('success', data) }) .catch((status) =&gt; { console.log ('failed', status)} );
answers question: http://stackoverflow.com/q/27296673

http://stackoverflow.com/comment/42818111
type: Comment
type: QuestionComment
has text: is the url: yoursite.com/login and then it takes you to yoursite.com/user/user?... ? What are the actual URL's before and after you login?
score: 0
comment on: http://stackoverflow.com/q/27159880

http://stackoverflow.com/a/27241398
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27236480
score: 2
answers question: http://stackoverflow.com/q/27236480
has body: I decided to go with the "hack" solution that I mentioned in the question. I was able to design it exactly as described, but if your selected portion of the video does not include the controls then you will have to make custom controls and design them to fit in the the selected portion. I did this with video.js. Untitled Document It works well enough, but it seems that at least FF and Chrome will download the video once for each element, even though they call the exact same source file? This means in a setup where one page uses the same source video in two video separate elements, that source video will be downloaded twice. Clearly two temp files would be a waste of bandwidth. This might be cause to scrap this solution and come up with something else.
upvote count: 2

http://stackoverflow.com/comment/43044627
comment on: http://stackoverflow.com/q/27288837
score: 0
type: Comment
type: QuestionComment
has text: @Xan By "it doesn't work" I mean I don't get the alert. Placing an alert(http.responseText) just before the if(http.readyState == 4 && http.status == 200) statement, I get an empty alert. I tried the "Inspect popup" thing but nothing shows up in the console.

http://stackoverflow.com/q/27306458
type: Question
has comment: http://stackoverflow.com/comment/43080439
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: maya
has comment: http://stackoverflow.com/comment/43076008
has title: Distorted UVs on a single object in my Three.js scene
favorite count: 0
has body: I've been putting together a 3d model of a house and right now I'm stuck with yet another aggravating roadblock like those three.js has gotten me accustomed to. I'm creating my scene in Maya and using the OBJ exporter to write obj and mtl files that I then import into three.js. I have about 9 objects in my scene, ungrouped, children only to the world, history deleted, and with texture maps that have ambient occlusion and lighting baked into them assigned to them via shadingMaps. I've actually had little luck actually using the mtl file, so I just copied my texture maps and loaded them separately and created materials out of them in three.js. Now, all of these objects look just fine in the browser, except for the simplest one, the walls and floor object. This is what the object looks like in Maya: As you can see, a rather simple mesh with minimal polys looking beautiful in Maya. I've learned that when I export objects into obj files, only one UV channel is supported, so I copy my UVs into the default channel and delete all other UV channels before exporting. This is the UV map: But when I assign this material in the browser, I get a strange texture distortion like so: It's like the UVs are all over the place. I would seriously doubt that my approach is anywhere close to being on target if it weren't for those 8 other (more complex, mind you) objects which all display fine. , including part of the wall that I've cut out of the problematic piece, which is part of the bathroom. Does anyone have a clue as to how I can troubleshoot this? I've tried exporting straight to js from Maya, but I'm having even more problems with that approach. I've tried converting the obj file into js using the packaged browser-based converter. I've spent days on this and am not making any progress. Here's some relevant code. scene = new THREE.Scene(); renderer = new THREE.WebGLRenderer({antialias: true} ); var wallTexture = THREE.ImageUtils.loadTexture("obj/final_walls.jpg"); var wallMaterial …
type: UnansweredQuestion
tagged with: three.js
score: 1
has answer: http://stackoverflow.com/a/27329353
upvote count: 1
has comment: http://stackoverflow.com/comment/43080540

http://stackoverflow.com/q/27293339
has body: I'm building an app using Atom Shell, and I'm trying to open an iframe which would load a PDF file, and then, once the PDF file is fully loaded, run some JS from the scope of that iframe (I'm willing to run Browser-&gt;Print (https://github.com/atom/atom-shell/blob/master/docs/api/browser-window.md#browserwindowprintoptions). Is that possible? If so, how?
tagged with: javascript
score: 0
tagged with: printing
has answer: http://stackoverflow.com/a/29202428
answer count: 1
tagged with: electron
accepted answer: http://stackoverflow.com/a/29202428
has title: Open an iframe with a URL and then run some JS
type: AnsweredQuestion
tagged with: iframe
type: Question

http://stackoverflow.com/a/27246883
downvote count: 1
has comment: http://stackoverflow.com/comment/42968679
has comment: http://stackoverflow.com/comment/42968623
score: 0
has body: This is called a self calling anonymous function or IIFE (Immediately Invoked Function Expression). Although there is some slight syntax problems that I'm gonna attribute to a faulty copy paste into the site. Please see other answers that address this issue. Basically what is happening here is that you are defining the entire function as an expression when it is wrapped in parenthesis; Similar to the expression: var a = ( 3 == 5 ) This will populate the variable a with the value false. In a similar way, after the function is wrapped with parenthesis, the function is actually being called (). So basically this function is called as soon as it is defined.
type: Answer
answers question: http://stackoverflow.com/q/27246828
upvote count: 1

http://stackoverflow.com/a/27269527
upvote count: 1
downvote count: 0
has body: Imperative programming languages make a distinction between statements and expressions, which roughly correspond to sentences and groups in a natural language like English. This: a = 1, b = 1; is one statement consisting of two expressions separated by comma. In English, this sounds like A cat has a bat, a pig has a wig. On the other side, this a = 1; b = 1; is two statements, and would be two sentences in English: A cat has a bat. A pig has a wig. In this simple example the difference is negligible, but usually you're supposed to express yourself in sentences and not to clump all stuff together in one comma-separated sentence. At some point it will get really silly: The artist is the creator of beautiful things, to reveal art and conceal the artist is art's aim, the critic is he who can translate into another manner or a new material his impression of beautiful things, the highest, as the lowest, form of criticism is a mode of autobiography, those who find ugly meanings in beautiful things are corrupt without being charming, this is a fault.
answers question: http://stackoverflow.com/q/27268752
type: Answer
score: 1

http://stackoverflow.com/comment/76521362
type: AnswerComment
comment on: http://stackoverflow.com/a/44327872
score: 0
type: Comment
has text: I experience this today. Really threw me off. Broke a function in my library.

http://stackoverflow.com/a/27239483
has comment: http://stackoverflow.com/comment/42955969
downvote count: 0
has comment: http://stackoverflow.com/comment/42955736
has comment: http://stackoverflow.com/comment/42956377
score: 1
has comment: http://stackoverflow.com/comment/42956140
has body: another option is to set the first element to the "current" class and use it to start the navigation between the slides. *on prev control click, if there is no element before this one so nothing will happen and vice versa, so that's ok but if you want it to change direction after the last/first element got the "current" class so tell me and i will update the code... Here it is: HTML: left right Jquery: $(document).ready(function(){ $(".left-arrow").click(function(){ $('.current').prev().addClass('current'); $('.current:first').next().removeClass('current'); }); $(".right-arrow").click(function(){ $('.current').next().addClass('current'); $('.current:last').prev().removeClass('current'); }); }); live example: http://jsfiddle.net/spvLpjct (i've put some CSS to help you understand it).
has comment: http://stackoverflow.com/comment/42956052
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27239302
answers question: http://stackoverflow.com/q/27239302
upvote count: 1
type: Answer

http://stackoverflow.com/comment/42958940
comment on: http://stackoverflow.com/q/27240975
has text: I have no idea about C# but due to the fact how inline event handlers work, you can't use `submit` as function name if the button is inside a form.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43174622
comment on: http://stackoverflow.com/q/27283771
has text: please create a scenario demo. Adding some classes to your elements would likely resolve your problem.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27188382
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42863498
has comment: http://stackoverflow.com/comment/42863111
answers question: http://stackoverflow.com/q/27188228
type: Answer
has comment: http://stackoverflow.com/comment/42863144
has comment: http://stackoverflow.com/comment/42863204
has comment: http://stackoverflow.com/comment/42863284
accepted answer of: http://stackoverflow.com/q/27188228
has comment: http://stackoverflow.com/comment/42863253
has comment: http://stackoverflow.com/comment/42863170
upvote count: 1
has comment: http://stackoverflow.com/comment/42864375
score: 1
has body: You are trying to query your button before inserting it into the DOM (upgrade_button). But you already have the button in your local scope (a). Simply add the click property during button creation. Instead of: a = $('&lt;a&gt;',{ text: i, href: '#', id: i }); var upgrade_button = $('#' + i); upgrade_button.click(function(){upgrade(i);return false;}); Try: var a = $('&lt;a&gt;',{ text: i, href: '#', id: i, click: function(){upgrade(i);return false;} }); UPDATE As TrueBlueAussie states in the comments, you cannot use i in your click closure because it will assume the final value of your for loop at the point in time when click is actually called. New version: var a = $('&lt;a&gt;',{ text: i, href: '#', id: i, click: function(){ upgrade(this.id); return false; } });

http://stackoverflow.com/q/27299770
type: Question
has comment: http://stackoverflow.com/comment/43067731
tagged with: javascript
has comment: http://stackoverflow.com/comment/43254264
has comment: http://stackoverflow.com/comment/43065523
score: 0
tagged with: filter
has title: Angular filter behaviour when updating lists
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43067948
answer count: 0
has comment: http://stackoverflow.com/comment/43110111
has body: I have a couple of ng-repeat, where the selected item in the first list filters the second list, by a property which is an object. And then there is the possibility to add items to both lists. Here illustrates the structure: {{class.name}} Add {{item.name}} Add And the javascript: .controller('controller', function () { $scope.classList = [ { 'name': 'Class 1' }, { 'name': 'Class 2' }, { 'name': 'Class 3' } ]; $scope.itemsList = [ { 'name': 'Item 1', 'class': $scope.classList[0] }, { 'name': 'Item 2', 'class': $scope.classList[1] }, { 'name': 'Item 3', 'class': $scope.classList[2] } ]; $scope.activeClass = {}; $scope.setActiveClass = function (newActiveClass) { $scope.activeClass = newActiveClass; }; $scope.addNewClass = function () { var nl = $scope.classList.push({ 'name': $scope.newClassName }); $scope.activeClass = $scope.classList[nl-1]; }; $scope.addNewItem = function () { $scope.itemsList.push({ 'name': $scope.newItemName, 'class': $scope.activeClass }); }; }); The problem is, when the new class item is added, the second list shows all the items, like if there were no filter. If I select any class other than the new, the filter works as expected, but on the new one, the filter shows all elements in the array. What could be happening?
has comment: http://stackoverflow.com/comment/43063689
has comment: http://stackoverflow.com/comment/43072357
has comment: http://stackoverflow.com/comment/43064040

http://stackoverflow.com/comment/43045041
comment on: http://stackoverflow.com/a/27289108
score: 0
type: Comment
has text: so how can i implement a customerized interface so that client can only upload their files diectly to ftp server?
type: AnswerComment

http://stackoverflow.com/comment/42845418
type: Comment
type: AnswerComment
has text: i puted your code after: $("#objects").append(" "); but it didn't work!! :-(
comment on: http://stackoverflow.com/a/27178004
score: 0

http://stackoverflow.com/q/27271883
tagged with: css
has title: Show (toastr) notification history in a scrollable widget
upvote count: 3
tagged with: toastr
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: notifications
score: 3
downvote count: 0
favorite count: 0
type: Question
has body: I'm rather new to Javascript and web-side programming as a whole. However I would like to know how to create a widget that keeps a list of the X (e.g. 10,50,100, ...) most recent incoming toastr notifications. I found out how to display the notifications, keep them from disappearing etc. Of course, the widget doesn't automatically create a scroll bar when the list of notifications grows larger than the widget size (see image). My actual question is twofold: 1) I'd like to find a way to have a scrollbar in the widget that allows a user to see the full list of notifications, even those that don't appear on screen. 2) Does anybody know if it is possible to keep only a specified amount of most recent notifications in this widget (i.e. a list of size X that can be appended with the most recent notif and where the least recent notif can be popped from and removed from the screen?) As said I am working with toastr for notifications, so a related solution would be great, but I appreciate any flow of new ideas. edit. the toastr notifications are contained within an iFrame. I've tried changing the iframe so that it would show a scrollbar whenever the notifs would go out of the frame. style="overflow: scroll;" but this doesn't work.

http://stackoverflow.com/q/27202539
has body: &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt; $(function () { $("[id*=btnaddrecords]").bind("click", function () { var user = {}; user.invoice_no = $("[id*=txtinvoice]").val(); user.sale_description = $("[id*=txtsale]").val(); user.transdate = $("[id*=txttdate]").val(); user.transtype = $("[id*=ddtransaction]").val(); $.ajax({ type: "POST", url: "Default.aspx/SaveUser", data: '{user: ' + JSON.stringify(user) + '}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { alert("User has been added successfully."); window.location.reload(); } }); return false; }); }); &lt;/script&gt;
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42888119
downvote count: 2
has answer: http://stackoverflow.com/a/27202584
answer count: 1
has title: how to save textbox data in database using javascript json
has comment: http://stackoverflow.com/comment/42888074
favorite count: 0
type: UnansweredQuestion
upvote count: 0

http://stackoverflow.com/comment/43063328
type: QuestionComment
has text: @AaronDufour I did bring it up with him, but he says it doesn't seem like he is able to directly allow OPTIONS requests. Is this something I should call him out on? Or is there something specific he needs to do?
comment on: http://stackoverflow.com/q/27299441
score: 0
type: Comment

http://stackoverflow.com/comment/42844417
score: 1
comment on: http://stackoverflow.com/q/27177744
type: Comment
has text: its a class of a div,that toggles settings for privacy,like audience :D
type: QuestionComment

http://stackoverflow.com/a/27241234
has comment: http://stackoverflow.com/comment/42960078
has comment: http://stackoverflow.com/comment/42958899
type: Answer
has comment: http://stackoverflow.com/comment/42959032
has comment: http://stackoverflow.com/comment/42959594
has comment: http://stackoverflow.com/comment/42958957
has comment: http://stackoverflow.com/comment/42959472
answers question: http://stackoverflow.com/q/27241186
score: 0
has body: CSS is called after DOM elements are populated. This is why in the days of dial up internet, the page would load all funky looking, and then all of a sudden start to develop into the desired page bit by bit. I would suggest using Jquery instead, where you could use the following code to be able to ensure the document is fully loaded and the CSS is already implemented $document.ready(function() { //Insert Code here } Hope that helps
has comment: http://stackoverflow.com/comment/42958989

http://stackoverflow.com/comment/42861564
has text: You need to provide more information. Where are you getting that error? What is the source code? It will obviously be at some Dependency Injection point, but what is the code calling it? And what is the unknown provider?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27186960

http://stackoverflow.com/comment/42937531
type: QuestionComment
comment on: http://stackoverflow.com/q/27230250
score: 0
type: Comment
has text: Yes, both the Java application and the JavaScript are running on the client.

http://stackoverflow.com/comment/43007708
type: AnswerComment
score: 0
type: Comment
has text: you're right. `echo json_encode($rows);` .This is from my other code, remained after copying. need to delete that part
comment on: http://stackoverflow.com/a/27224797

http://stackoverflow.com/q/27214788
has answer: http://stackoverflow.com/a/27214876
has answer: http://stackoverflow.com/a/27215470
has comment: http://stackoverflow.com/comment/42909635
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27214876
type: Question
has title: Grab a text from DIV in jQuery
has answer: http://stackoverflow.com/a/27214910
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27214910
has body: I have a DIV of the following kind: &lt;div class='entry'&gt; &lt;p class='entry-text'&gt;собаки играют вместе &lt;a title="Search private" class="app-context-link" href="/contexts/private"&gt;@private&lt;/a&gt;&lt;/p&gt; &lt;p class='entry-date'&gt;14172869383540000&lt;/p&gt; &lt;p class='entry-menu'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a class="app-link-menu" href="#"&gt;show filtered&lt;/a&gt;&lt;/p&gt; &lt;div class='separator'&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; I have a code that takes out the contents of the DIV which looks like this below, but how do I change it so it takes out the text that's inside 'entry-text' class only? $(".entry").on('dblclick', function(e) { e.preventDefault(); // Get the statement into the edit box at the top $("#statement").val(e.currentTarget.innerText); } Thanks!
has comment: http://stackoverflow.com/comment/42909672
has comment: http://stackoverflow.com/comment/42909800

http://stackoverflow.com/comment/42846605
has text: @JacobEwing and without sever-side processing? I mean *local* browsing of the HTML file, i.e. the browser opens c:\myproject\index.html with no Apache server / no PHP server
comment on: http://stackoverflow.com/q/27177661
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/42995418
score: 1
has text: I think I get it now, and no, you can't do that, the function `bar` has no idea it's being called in any way related to the function `foo` the way you're doing it.
comment on: http://stackoverflow.com/q/27261182
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43064727
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27300489
has text: Have you tried anything?
score: 0

http://stackoverflow.com/comment/42875850
type: Comment
type: QuestionComment
has text: You're calling the function yourself: `next.onkeypress = addAnother(event);`
score: 3
comment on: http://stackoverflow.com/q/27195350

http://stackoverflow.com/q/27240325
has answer: http://stackoverflow.com/a/27240370
accepted answer: http://stackoverflow.com/a/27240387
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42957169
has body: I'm having an array of dates: var ticks = []; ticks = [Tue Jan 01 2013 00:00:00 GMT-0800 (PST), Fri Feb 01 2013 00:00:00 GMT-0800 (PST), Fri Mar 01 2013 00:00:00 GMT-0800 (PST), Mon Apr 01 2013 00:00:00 GMT-0700 (PDT), Wed May 01 2013 00:00:00 GMT-0700 (PDT), Sat Jun 01 2013 00:00:00 GMT-0700 (PDT), Mon Jul 01 2013 00:00:00 GMT-0700 (PDT), Thu Aug 01 2013 00:00:00 GMT-0700 (PDT), Sun Sep 01 2013 00:00:00 GMT-0700 (PDT)]. How can I convert the above array of dates into millisecond format: something like below: [1390000000000, 1395000000000, 1400000000000, 1405000000000, 1410000000000, 1415000000000] (PS: I need this format as I have a function that takes this format to display the x-axis) Any ideas on how this can be achieved? Thanks!!!!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27240387
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: How to convert an array of UTC dates into milliseconds using JS/Jquery
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/27240370
score: 1

http://stackoverflow.com/q/27289509
type: UnansweredQuestion
has body: I have a javascript object as below . i'm using bootstrap 3 for modal object. the problem is i cannot access the real modal object inside the 'displayModal' method var modalHandler = { modal: $(".modal"), modalBody: $(".modal").find(".modal-body"), displayModal: function(){ this.modalBody.text("bla bla"); } } modalHandler.displayModal();
tagged with: properties
has comment: http://stackoverflow.com/comment/43046049
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43045928
has comment: http://stackoverflow.com/comment/43045640
score: 0
has comment: http://stackoverflow.com/comment/43046101
has answer: http://stackoverflow.com/a/27289550
has title: Add jQuery selector to javascript object

http://stackoverflow.com/a/27159424
has body: The HTML attribute is not called visibility. In CSS the corresponding attribute for .show() / .hide() is display.
accepted answer of: http://stackoverflow.com/q/27159203
answers question: http://stackoverflow.com/q/27159203
has comment: http://stackoverflow.com/comment/42812937
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/42812820
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42812897
has comment: http://stackoverflow.com/comment/42812739
score: 3

http://stackoverflow.com/a/27243929
has body: var val = $("a").attr("href"); var myString = val.substr(val.indexOf("#") + 1) alert(myString); Try this
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27243773

http://stackoverflow.com/comment/43072193
type: AnswerComment
comment on: http://stackoverflow.com/a/27304638
has text: So how Google does it then? It is a web app running from browser. Thanks for the links though.
type: Comment
score: 0

http://stackoverflow.com/a/29927650
answers question: http://stackoverflow.com/q/27153711
accepted answer of: http://stackoverflow.com/q/27153711
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: If you know the width of the building in pixel and meters, the ratio meters:pixels is simply widthInMeters / widthInPixels. Your question suggests you have the width of the image, but not that of the building, but also that you are able to calculate the location of random points in pixels. Therefore all you have to do is measure the width of the building in pixels as it is represented in the image, then divide the actual width by this number. You should note that a pixel is not a continuous measure like a meter, so the precision is going to be limited by your scale (e.g. 6.3 pixels looks the same as 6 pixels). Also, if the image has not been accurately drawn or encoded, the ratio horizontally could be different to the one vertically.
type: Answer

sitemap
type: Tag
tag name: sitemap
tags question: http://stackoverflow.com/q/27162617

http://stackoverflow.com/a/27231874
downvote count: 0
has comment: http://stackoverflow.com/comment/42940629
has body: The best value candidate for a number is 0, so that the typed is predefined, but the value unknown. This is because JavaScript has internal types, even though it seems weakly typed at our level. More generally for different types: String: '' Object: null Array: null RegExp: null As a side note, it is totally legit to leave it undefined as said in Shomz's answer of your question. It is up to you from here :)
has comment: http://stackoverflow.com/comment/42940694
has comment: http://stackoverflow.com/comment/42940687
type: Answer
has comment: http://stackoverflow.com/comment/42940689
has comment: http://stackoverflow.com/comment/130759647
upvote count: 3
has comment: http://stackoverflow.com/comment/42940564
has comment: http://stackoverflow.com/comment/42940748
answers question: http://stackoverflow.com/q/27231806
score: 3
has comment: http://stackoverflow.com/comment/42940630

http://stackoverflow.com/comment/42958815
comment on: http://stackoverflow.com/q/27240970
score: 0
type: QuestionComment
has text: it's not bad at all, DI is a good pattern. i should mention though that if you make "videoId" a property of player, you could use the player's method on the track, so you could just write your last code as Track.prototype.playVideo = player.playVideo; instead of using an extra wrapper. i like recycling.
type: Comment

http://stackoverflow.com/comment/42809326
comment on: http://stackoverflow.com/q/27157361
has text: The attempted misuse of `td` as child of `div` does *not* work. You cannot style the `td` elements or access them in a script, simply because they do not exist—the ` ` and ` ` tags are just ignored.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27244896
has comment: http://stackoverflow.com/comment/42965473
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27245769
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/12693947
score: 4
accepted answer: http://stackoverflow.com/a/27245769
has title: Get Multiple dropdowns value of a form and send as a query string in jquery
possible better answer: http://stackoverflow.com/a/27244996
has answer: http://stackoverflow.com/a/27245048
has answer: http://stackoverflow.com/a/27244996
has answer: http://stackoverflow.com/a/27245229
has answer: http://stackoverflow.com/a/27245255
has body: I have a form that have dropdowns that have multiple properties .Now on click of button i want to create array of values on the key name as the dropdown name.But i am unable to do this. And i have to send the data of each dropdown in a query string with ajax HTML A B C D E B D E B D E On button Click i am doing this to get the values : $('form#add').find('select, input:text').each(function() { var inputName = $(this).attr("name"); var inputValue = $(this).val(); formData +='&'+inputName+'='+inputValue; }); I want the values in the formdata as : list = ['21','22','23','24','2'] list1 = ['23','24','2'] list2 = ['22','24','2']
answer count: 5
upvote count: 4

http://stackoverflow.com/comment/42907508
score: 0
type: Comment
has text: Ahh it's so frustrating I can't seem to plot anything from the data :'(
comment on: http://stackoverflow.com/a/27198224
type: AnswerComment

http://stackoverflow.com/a/27203812
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42890768
answers question: http://stackoverflow.com/q/27202910
accepted answer of: http://stackoverflow.com/q/27202910
has body: You need to remove the = from the &lt;%= @users.each ...: &lt;% @users.each do |user| %&gt; &lt;% publish_to "/user/#{user.id}" do %&gt; $("#messages").prepend("&lt;%= j render(@message) %&gt;"); &lt;% end %&gt; &lt;% end %&gt; var url = "/posts/&lt;%= j @post.id %&gt;"; $(location).attr('href',url); otherwise it will render the return value of the each, which is the array itself (@users)
type: AcceptedAnswer

http://stackoverflow.com/comment/42812484
comment on: http://stackoverflow.com/q/27158963
score: 0
type: Comment
type: QuestionComment
has text: @developerwjk well, not at the same time. but he could do a POST with callback and then submit the form.

http://stackoverflow.com/a/27260988
has body: The file:// scheme is required in your path.
score: 0
has comment: http://stackoverflow.com/comment/42995240
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27260926
has comment: http://stackoverflow.com/comment/42995065
type: Answer
accepted answer of: http://stackoverflow.com/q/27260926
has comment: http://stackoverflow.com/comment/42995209
has comment: http://stackoverflow.com/comment/42995128

http://stackoverflow.com/comment/43136229
type: QuestionComment
has text: That's fixing it on Windows so far!!!
comment on: http://stackoverflow.com/q/27283505
score: 0
type: Comment

http://stackoverflow.com/comment/42849137
has text: Sorry, I understand _why_ it's not updating, what my question is asking is if there is a way to manually trigger an update?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27179850
type: Comment

http://stackoverflow.com/a/27183611
has body: I have dabbled on your link. If you put a width and height (same width and height of image) on the that is wrapping the image it will keep the space there, instead of moving the next image in its place. ul li label{ width: 100px; height: 102px; }
has comment: http://stackoverflow.com/comment/42858249
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27183367
downvote count: 0
answers question: http://stackoverflow.com/q/27183367
has comment: http://stackoverflow.com/comment/42855769
type: AcceptedAnswer

http://stackoverflow.com/a/27192100
answers question: http://stackoverflow.com/q/27191966
has body: You are using some Kind of non-Jquery, asynchronous (which is completely unnecessary if you already have jQuery) function- as asynchronous operations run on a separate thread the caller will finish nigh-instantly. If you really want to ensure sequential execution you may simply use a proper jQuery UI method (like animate : http://api.jquery.com/animate/) and add a complete-handler, as documented in the link
score: 0
type: Answer

http://stackoverflow.com/q/27180846
tagged with: javascript
tagged with: express
favorite count: 0
has comment: http://stackoverflow.com/comment/42850197
accepted answer: http://stackoverflow.com/a/27180937
tagged with: node.js
type: AnsweredQuestion
has body: The problem Context &amp; intent I'm using a Node backend to (1) request API data from the Feedly Cloud, (2) output that data in JSON format and then (3) retrieve it from within a JS frontend. This question relates to phase (2) only. Initial issue Whilst trying to print the data for the front-end to retrieve, I noticed that Node cut off mid-stream, leaving malformed JSON. Attempted solution I tried setting response headers for Content-Length before writing the content of the response, to force it to print the whole thing. That worked, around twice. But then it started fussing: Ongoing failure Now the app crashes on function run, claiming that I'm setting HTTP headers AFTER writing the content, or outputting to page, when as far as I'm aware I am not. The code var http = require('http') , authCode = 'xyz'; var FeedlyController = { api: function(req, res) { http.get({ host : "cloud.feedly.com", path : "/v3/"+req.params.resource, headers: { Authorization: "OAuth "+authCode } }, function(response) { response.on('data', function(json){ res.writeHead(200, { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(json, 'utf8') }); res.write(json, 'UTF-8'); res.end(); }); }); } } module.exports = FeedlyController; The error _http_outgoing.js:331 throw new Error('Can\'t set headers after they are sent.'); ^ Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:331:11) at ServerResponse.res.setHeader (/Users/jan/Sites/proxenos/node_modules/sails/node_modules/express/node_modules/connect/lib/patch.js:63:22) at ServerResponse.&lt;anonymous&gt; (/Users/jan/Sites/proxenos/node_modules/sails/node_modules/express/node_modules/connect/lib/patch.js:80:14) at Array.forEach (native) at ServerResponse.res.writeHead (/Users/jan/Sites/proxenos/node_modules/sails/node_modules/express/node_modules/connect/lib/patch.js:79:28) at IncomingMessage.&lt;anonymous&gt; (/Users/jan/Sites/proxenos/api/controllers/FeedlyController.…
upvote count: 3
tagged with: http
type: Question
score: 3
has title: Node JSON output malforms, unable to set HTTP Header: Content-Length to fix
tagged with: sails.js
has answer: http://stackoverflow.com/a/27180937
has comment: http://stackoverflow.com/comment/42850185
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42857717

http://stackoverflow.com/comment/43083892
type: Comment
type: QuestionComment
has text: I tried using innerHTML but it is not working
comment on: http://stackoverflow.com/q/27311256
score: 0

http://stackoverflow.com/q/27196139
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42877798
has body: Web page Jquery Code which check the internet/network is there or not(mobile/PC/Tablet).Itscheck system internet/network. It's static page. Page contain button(buttons created with anchor tag) If connection is on then button is get enable. If connection is off then button is disable Like this:- http://html5-demos.appspot.com/static/navigator.onLine.html
has comment: http://stackoverflow.com/comment/42884995
answer count: 0
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/27205742
type: Question
duplicate of: http://stackoverflow.com/q/27205742
has title: Jquery Code which check the internet/network is available or not (mobile/PC/Tablet)
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42877870
favorite count: 0
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/53341182
score: 0
type: Comment
has text: Did you ever figure this out? I'm running something similar which I think stems from the same rendering problem.
type: QuestionComment
comment on: http://stackoverflow.com/q/27296555

http://stackoverflow.com/comment/118109560
type: Comment
has text: The speed should be a number and not a string
comment on: http://stackoverflow.com/a/27185237
score: 3
type: AnswerComment

http://stackoverflow.com/comment/42853261
comment on: http://stackoverflow.com/a/27182664
type: Comment
has text: Uncaught TypeError: Cannot read property 'trim' of undefined .there is such an error why?
type: AnswerComment
score: 0

http://stackoverflow.com/a/27265885
type: Answer
has comment: http://stackoverflow.com/comment/43044595
accepted answer of: http://stackoverflow.com/q/27265532
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27265532
has body: Use fetch as googlebot in webmaster tools to check the crawling and rendering of your pages. Third-party tools are not googlebot. Your site is being indexed : https://www.google.co.uk/search?q=site%3Avamartinc.com and searching for a word on your site brings up the relevant page : https://www.google.co.uk/search?q=site%3Avamartinc.com#q=site:vamartinc.com+Thennezhuthu

http://stackoverflow.com/a/27277016
downvote count: 0
has body: Against all good sense you could do this: $('body *').draggable(); Note that it's likely to severely tax most systems, though.
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27276981

http://stackoverflow.com/a/69295998
answers question: http://stackoverflow.com/q/27311226
has comment: http://stackoverflow.com/comment/131845672
downvote count: 1
has comment: http://stackoverflow.com/comment/122479486
has body: content var templateHtml = ('#template').html() // this will return the template container div var template = $(templateHtml); var content = template.find('.content'); console.log(content);
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/123876303
type: Answer

http://stackoverflow.com/comment/42848663
has text: So you mean you need to find something that's loaded with Javascript? There's no safe and consistent way to do that, but you can hack it by looking for an ajax url or something.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27179811

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/27254488
tags question: http://stackoverflow.com/q/27204382
tags question: http://stackoverflow.com/q/27159242
tag name: google-oauth

http://stackoverflow.com/a/27227199
has body: Try this Sign-Up in your case $parent does not have method signup
type: Answer
accepted answer of: http://stackoverflow.com/q/27227184
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27227184

http://stackoverflow.com/q/27265473
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27265553
has title: Want to remove a class along with adding slideUp in siblings tags
type: Question
tagged with: javascript
tagged with: jquery
has body: I am working with side-nav which comprises of ul and li tags. Looks like: &lt;li&gt; &lt;a href="javascript:;"&gt;Mobile&lt;/a&gt; &lt;/li&gt; &lt;li class="uk-nav-header"&gt; PLATFORM SPECIFIC GUIDES &lt;/li&gt; &lt;li class="uk-active uk-magento" data-toggle="collapse" data-target="#demo" aria-expanded="true" aria-controls="demo"&gt; &lt;a href="/docs/magento"&gt;Magento Extension&lt;/a&gt; &lt;ul class="uk-nav-sub uk-nav-parent-mag hidden" &gt; &lt;li&gt;&lt;a href="#step1"&gt;1.Install Magento Extension&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#step2"&gt;2.Configure extension&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#step3"&gt;3.Launch Widgets&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#faq"&gt;&amp;nbsp;&amp;nbsp;Frequently Asked Questions&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; Here I want to click on heading "Magento Extension" which should usually slidesup is siblings subheading. But now when I click on heading it refreshes page and subheading arent slideup. Code I am using is: $(".uk-magento").click(function(e) { e.preventDefault(); $(this).parent().siblings().hasClass('.uk-nav-parent-mag').removeClass("hidden", 400, "easeInBack"); });
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27266358

http://stackoverflow.com/q/27266029
type: Question
has comment: http://stackoverflow.com/comment/43003965
has comment: http://stackoverflow.com/comment/43004226
has answer: http://stackoverflow.com/a/27266344
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/27266091
linked to: http://stackoverflow.com/q/26052722
has body: What i Need I Need to fetch whole json data and append in div. jquery code $.ajax({ type: "GET", contentType: 'application/json; charset=utf-8', url: "http://local.10times.com/app.php/ajax?for=speakers&amp;id="+id, dataType: 'json', async: true, cache: false, success: function(html) { var i=0; $.each(html, function(i, obj) { //use obj.id and obj.name here, for example: console.log(obj[0].metadata.summary); var obj1=obj[i].metadata.summary; i++; alert(obj1);// undefined $(".speakers").append(obj[0].metadata.summary); i++; }); } }); output 0: Objectmetadata: Objectsummary: "Raj is the founder of GSF Accelerator, India’s first multi-city Tech Accelerator, backed by 20 iconic Digital founders and 5 leading venture funds frversaw (as President, Reliance E". json string data: [ { metadata: { summary: "Rajesh is the founder of GSF Accelerator, India’s first multi-city Tech Accelerator, backed by 20 iconic Digital founders and 5 leading venture funds from across the world. Rajesh is also the founder of GSF Superangels network and curator of the Global Superangels Forum. He is the co-host and curator of Founders Forum India. Rajesh has made over 15 investments as an active and engaged angel investor.His journey has been a continuum of re-invention waves. In the first wave, he brought private radio (Times FM) to India in early nineties, and redefined Indian youth culture. In his second wave, he was at the cusp of early Internet culture in India and built Indiatimes.com, the most valuable Internet business in India in 2005 (funded by Sequoia). In the third wave, Rajesh was at the centre of a massive transformation of the Indian film industry, where he oversaw (as President, Reliance Entertainment) the corporatization of mom and pop Bollywood businesses into multi-billion dollar enterprise. At Reliance, Rajesh found himself at the centre of cross-border investment and alignment between Hollywood and Indian Film Industry and one of the biggest investment deals (DreamWorks) in Ho…
downvote count: 1
has answer: http://stackoverflow.com/a/27266201
answer count: 4
has comment: http://stackoverflow.com/comment/43004239
favorite count: 0
has answer: http://stackoverflow.com/a/27266362
type: UnansweredQuestion
has title: How to Acces Json Data using foreach loop
upvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43003351

http://stackoverflow.com/a/27183880
has comment: http://stackoverflow.com/comment/42855986
has comment: http://stackoverflow.com/comment/42855178
has comment: http://stackoverflow.com/comment/42855140
answers question: http://stackoverflow.com/q/27183689
has comment: http://stackoverflow.com/comment/42855816
has comment: http://stackoverflow.com/comment/42856121
downvote count: 0
has body: There are three parts to a multiplayer game displayed in a browser: client-side display, server-side data management, client-server communication. If you're already set on your display technology (jQuery), then you're probably going to use $.ajax() for client-server communication. However, technologies used for server-side data management are completely up to you and they don't necessarily have any connection to the technologies used for display and communication (meaning the traditional communication initiated by client). Basically, use any kind of server technology stack you like. Node.js might do just fine but there are many other viable alternatives. They just need to support communication with the client. So, to be absolutely clear, your question doesn't really make sense. You might use jQuery in the client and Node.js on the server, but they will never really "work together". They will manage completely separate parts of your application and connect through protocols not specific to either of them. As for the animation, the animation itself is solely a client-side problem. If you want to "synchronize the animation" across multiple clients, you can let the clients communicate with the server, but they only ever need to send/receive plain data. Then you adjust the client-side animation based on the received data. As another poster points out, websockets are a better fit for this than regular client-initiated HTTP requests. Not because of "the animation", but because you want all the clients to receive the information about the start of betting at the same time.
type: Answer
has comment: http://stackoverflow.com/comment/42855332
has comment: http://stackoverflow.com/comment/42855788
score: 1
has comment: http://stackoverflow.com/comment/42855321
has comment: http://stackoverflow.com/comment/42855243
upvote count: 1

http://stackoverflow.com/comment/42922421
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27221816
has text: i tried autocomplete="off" but if clears the field at the time of page loading but when i click on input field it gives me list of previous login users
type: Comment

http://stackoverflow.com/comment/42922763
score: 0
type: Comment
has text: I have no experience with [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver), but it does look promising. In the absence of a "set-it-and-forget-it" solution like defineProperty(), this might be the best option.
type: AnswerComment
comment on: http://stackoverflow.com/a/27221694

http://stackoverflow.com/comment/42968595
comment on: http://stackoverflow.com/q/27246322
score: 0
type: Comment
type: QuestionComment
has text: give a look to this https://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request

http://stackoverflow.com/comment/42960372
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27241706
type: Comment
has text: actually i am not trying to disabling the draging or dropping feature....instead i want to drag and drop the events at the place where no other events is allocated

http://stackoverflow.com/comment/42985015
score: 0
comment on: http://stackoverflow.com/q/27232964
type: Comment
type: QuestionComment
has text: @Jasen It is not validating the date entered by the user. For ex: 11/13/2014 as 13th month does not exist. Expected output : "Please enter a valid date" - as a error message which must be added to validation rules. Should I use data annotation?

http://stackoverflow.com/q/27221733
type: Question
has answer: http://stackoverflow.com/a/27223032
tagged with: http://stackoverflow.com/tag/html
tagged with: menu
score: 0
answer count: 3
tagged with: animation
accepted answer: http://stackoverflow.com/a/27223032
possible better answer: http://stackoverflow.com/a/27222366
has answer: http://stackoverflow.com/a/27222366
has title: Page 'jumps' when menu goes from relative to fixed with fadein/out - jquery
has answer: http://stackoverflow.com/a/27222695
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has body: I'm losing lot of time trying to make a scroll event to get my header/nav detached and fixed on top of the page when the scroll reaches it. The menu with fadeOut() goes "display: none", and my page goes up the height of the nav. How can I get a smooth movement? $(window).scroll(function(){ if($(this).scrollTop() &gt; pos.top+menu.offset().top-menu.height() &amp;&amp; menu.hasClass('menudefault')){ menu.fadeOut('500', function(){ $(this).addClass('menufixed').removeClass('menudefault').fadeIn('500'); }); } here is my codepen: http://codepen.io/GCW/pen/WbQxrZ

http://stackoverflow.com/q/27181096
answer count: 1
has comment: http://stackoverflow.com/comment/42850699
linked to: http://stackoverflow.com/q/27175733
favorite count: 0
has comment: http://stackoverflow.com/comment/42850641
has body: How to pass var to include file (test.php) and then use this var in include file (test.php) ? First i want to declare var in main.php and then i want to pass this var to test.php and use this var in test.php (EG: echo , if..else) I try with php and javascript but not work both , Could you please give me some advice ? using PHP main.php &lt;?php include('test.php'); $number = '555'; test($number); ?&gt; test.php &lt;?php function test($numeric) { return $sample = $numeric; } echo test($number); ?&gt; Using JS main.php &lt;?php include('test.php'); $number = '555'; ?&gt; &lt;script type="text/javascript"&gt; doCallAjax(); &lt;/script&gt; test.php &lt;script type="text/javascript"&gt; function doCallAjax() { var number = "&lt;?PHP echo $number; ?&gt;"; alert(number); } &lt;/script&gt;
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42850593
downvote count: 1
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/27181167
has comment: http://stackoverflow.com/comment/42850674
tagged with: javascript
tagged with: jquery
score: -1
has title: How to pass var to include file and then use this var in include file using php , javascript?
has comment: http://stackoverflow.com/comment/42850606
has comment: http://stackoverflow.com/comment/42850719

http://stackoverflow.com/comment/42891880
type: QuestionComment
comment on: http://stackoverflow.com/q/27204198
has text: Can you explain what steps you take to recreate the error? Is it still the same [ng:areq] error or has it changed? I'm not able to recreate it - http://plnkr.co/edit/KIHWNIrIzPwVpZ0MGteB?p=preview
score: 0
type: Comment

http://stackoverflow.com/a/27202913
has comment: http://stackoverflow.com/comment/42888661
type: Answer
has comment: http://stackoverflow.com/comment/42888898
score: 0
has body: Would be something like this: corrected code: <?php $pages = array('aeyrt.php','nviorf.php','vyutkd.php','oiuybd.php','poiuuy.php'); $current_file = basename(__FILE__); if(($current_id = array_search($current_file,$pages))){ if($current_id == count($pages) - 1){ echo "previous"; }else{ echo "previous next"; } }else{ echo "next"; } ?> But... I would personally put those links into database and use rewrite rules.
answers question: http://stackoverflow.com/q/27202823

http://stackoverflow.com/q/27292759
type: AnsweredQuestion
tagged with: datatables
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27294560
favorite count: 0
type: Question
has title: Tabletools export buttons are duplicated
upvote count: 1
has body: Edit** This question was about other problem i already solved. But now i'm with this new problem. I'm trying to move the tabletools button outside the table, inside a custom div. I already did it with the following code: ... ... $('.tab-display').DataTable({ dom: '<"bottom"i>rt<"bottom"lp>T<"clear">', fnInitComplete: function ( oSettings ) { var otb = $(".DTTT_container") $(".show-export").append(otb); } }); But what happen is, the buttons are getting duplicated because i have multiple tables in one page. If i only have a single table, it works fine, but not with multiple tables. img with the problem: Also, if i give the following jquery code to show/hide the div, the buttons doesn't work. $(".show-export").hide(); $(".bt-export").change(function(tablef) { var toShow = this.checked; $(this).closest(".wrap-export").find(".show-export")[toShow ? "show" : "hide"](500); }); I know it's something to do with the fnResizeButtons. But i only found solutions to use with tabs instead of hide/show jquery functions. Can anyone help me?
answer count: 1
tagged with: tabletools
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27294560

traversal
tags question: http://stackoverflow.com/q/27154394
tag name: traversal
type: Tag

http://stackoverflow.com/comment/42980107
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27251427
has text: Hi @JLRishe I tried but it did not work out.

http://stackoverflow.com/q/27181708
has title: Using jQuery's .focus() to set focus in Firefox on a Mac
favorite count: 0
linked to: http://stackoverflow.com/q/10278139
linked to: http://stackoverflow.com/q/7046798
type: UnansweredQuestion
has body: I am trying to get .focus() to work in Firefox (version 33.1.1) on a Mac. Some similar questions mentioned solutions that had the effect of .focus() without the visuals; with each of the tests below, I wasn't even able to accomplish that. The various tests listed out below all work in Chrome but not in Firefox. The HTML used was: &lt;input type="text" id="test" tabindex="1"&gt; Setting tabindex was based on this suggestion, but it didn't seem to have any effect. I also considered using autofocus, but that won't work because I need to manipulate the focus of multiple fields as the user uses the webpage, not just for a single field on load. Update: Rhumborl suggested below that the issue might have to do Firefox's treatment of focus events when using iframes, and sure enough that seems to be the issue. Each of the following tests works when you take it out of JSFiddle's iframe "Edit fiddle" window and instead view the output full screen. Below I've added links to the working full-screen version of each. A. .focus() $("#test").focus(); Fiddle (update: this works in full screen). B. setTimeout with .focus() setTimeout(function(){ $("#test").focus(); },100); Fiddle (update: this works in full screen). As suggested here, here, and here. C. .trigger('focus') $("#test").trigger('focus'); Fiddle (update: this works in full screen). As suggested here. D. setTimeout with .trigger('focus') setTimeout(function(){ $("#test").trigger('focus'); },100); Fiddle (update: this works in full screen). As suggested here. E. Plain JavaScript document.getElementById("test").focus(); Fiddle (update: this works in full screen). F. setTimeout with plain JavaScript setTimeout('document.getElementById("test").focus();',100) Fiddle (update: this works in full screen). As suggested here. G. .select() $("#test").select(); Fiddle (update: this works in full screen). As suggested here. H. setTimeout with .select() setTimeout(function(){ $("#test").select(); },100); Fiddle (update: this works in full …
has answer: http://stackoverflow.com/a/27181772
downvote count: 0
score: 1
type: Question
linked to: http://stackoverflow.com/q/10946767
tagged with: firefox
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42857901
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42877188

http://stackoverflow.com/a/27198224
has comment: http://stackoverflow.com/comment/42885599
upvote count: 3
has comment: http://stackoverflow.com/comment/42919547
has comment: http://stackoverflow.com/comment/42881281
has comment: http://stackoverflow.com/comment/42934246
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42920021
has comment: http://stackoverflow.com/comment/42907508
type: Answer
answers question: http://stackoverflow.com/q/27197296
has body: Canvas cannot use logarithmic scale out of the box, you'll have to provide a function for your points to scale them yourselves. I would suggest following procedure: Have a function taking value of one axis and its max. Normalize inside the function Then apply logarithmic function to the value and return Use the normalized value with canvas width/height to plot the point Use the same function for drawing the graph container as well as the points/lines etc. As an example, with a "pseudo" (as in no particular purpose) log function: var ctx = canvas.getContext('2d'), w = canvas.width, h = canvas.height - 10, // give room for point/text maxHeight = 1000, axisStep = 100; function myLog(v, max) { var n = v / max; // normalize return n * n * n; // some log formula } // draw scale per axis step for(var i = 0; i &lt; maxHeight; i += axisStep) { // get normalized value, multiply with canvas height and reverse axis var y = h - myLog(i, maxHeight) * h; // show axis mark each 100 ctx.moveTo(0, y); ctx.lineTo(20, y); } ctx.lineWidth=2; ctx.stroke(); ctx.fillStyle = "red"; // some random points between 0 and max height for(var x = 30; x &lt; w; x += 30) { var v = Math.random() * maxHeight, // some value y = h - myLog(v, maxHeight) * h; // convert to y in canvas ctx.fillRect(x, y, 7, 7); ctx.fillText(v.toFixed(0), x + 9, y +7); } &lt;canvas id=canvas width=500 height=500&gt;&lt;/canvas&gt; The same applies to the x value. Just replace the log function here with one appropriate for your purpose. Hope this helps!
has comment: http://stackoverflow.com/comment/42934973

http://stackoverflow.com/comment/43020071
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27275365
has text: It's been a while with javascript, but `if(currentsec = 3){` ... looks odd to me. Should be `==` even in javascript, no?

http://stackoverflow.com/q/27270291
upvote count: 2
tagged with: touch
answer count: 3
tagged with: events
has answer: http://stackoverflow.com/a/28329781
favorite count: 0
possible better answer: http://stackoverflow.com/a/27270525
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/27305790
downvote count: 0
tagged with: mobile-safari
type: Question
has answer: http://stackoverflow.com/a/27270525
has answer: http://stackoverflow.com/a/27305790
has body: I have a and a Something <option... ... The select box is hidden with visibility:hidden, so it's not visible. (It's actually behind the button) So when I click the button, I want the native select box to open up with the different possibilities to choose from. The possibilities will be visible, but the selectbox itself is still hidden. It works on desktop with this code: $('#sf').on('touchend click', function() { var e = document.createEvent("MouseEvents"); e.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); $('#rsf')[0].dispatchEvent(e); }); I tried a similar approach with document.createTouch and everything that follows with it like e.initTouchEvent and so on... but without any luck.... Does anyone have a solution? The reason I want it this way, is because I want to trigger the native selectbox UI in iOS. (or any other OS for that matter on mobile).
tagged with: javascript
tagged with: dom-events
has title: Simulate/trigger select box in iOS Safari (perhaps with a touchend)

http://stackoverflow.com/q/27207854
has answer: http://stackoverflow.com/a/27207865
downvote count: 0
has answer: http://stackoverflow.com/a/67900132
answer count: 4
favorite count: 0
has title: How to show/hide a span using javascript
type: UnansweredQuestion
has body: Can someone show a way to show/hide a span using javascript document.getElementById("test").style.display= 'visible'; document.getElementById("test").style.display= 'block'; In the HTML Code &lt;span id='test' .. How can I overcome this problem. Is there any thing that I should think about? UPDATE I have a class like this one, I want to force mouse hovering on it. &lt;div id="test" class="tooltip effect"&gt; &lt;div id="second" href="#"&gt; .. &lt;/div&gt; On css: tooltip{..} effect{..} effect:hover{..} Another option I tried besides your code is document.getElementById("test").onmouseover = test.hover; Should I re-write the hover class to another name-class, or should I tweak your code?
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42897637
has answer: http://stackoverflow.com/a/27208513
has comment: http://stackoverflow.com/comment/42897616
has answer: http://stackoverflow.com/a/27207866
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43046370
has text: thanks for your answer. That doesn't work either though. All I get in the (node) cmd window is "...", and in the browser I get "This page cannot be displayed."
comment on: http://stackoverflow.com/a/27290067
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27268660
answers question: http://stackoverflow.com/q/27268396
type: Answer
downvote count: 1
score: -1
upvote count: 0
has body: To do that you need to generate the script from the CGI program. &lt;script src="/cgi-bin/example.js.cgi"&gt;&lt;/script&gt; Of course, that will be a different CGI program so getting the variables in the right state may be problematic. Usually you would solve the problem using a different approach: include the data in the document (either in the script element or in an element such as a &lt;meta&gt; element, a hidden input or a data-* attribute on something relevant and then have a static script read the data from the DOM.

http://stackoverflow.com/q/27198938
tagged with: php
score: 2
answer count: 0
downvote count: 0
has title: Populating entity field type in dynamic form Symfony2
type: Question
has body: I have an entity Lexeme, which contains Language and Phoneme entities. In my Form Type, I want the Phoneme choices to be different depending on the Language entity chosen for the Lexeme. The problem is when I dynamically update the form, the correct Phonemes are displayed, but they are not populated from the database: i.e. those Phonemes which belong to the Lexeme in the database do not appear as checked in the dynamically loaded form. The Lexeme Controller: public function editAction(Request $request, $id) { $lexeme = $this-&gt;getDoctrine() -&gt;getRepository('Aleph2OmegaTranscriptionBundle:Lexeme') -&gt;find($id); $query = $this-&gt;getDoctrine() -&gt;getRepository('Aleph2OmegaTranscriptionBundle:Lexeme') -&gt;createQueryBuilder('l') -&gt;where('l.id &gt; :thisId') -&gt;setParameter('thisId', $id) -&gt;setMaxResults(1) -&gt;getQuery(); $nextLexeme = $query-&gt;getResult(); $query = $this-&gt;getDoctrine() -&gt;getRepository('Aleph2OmegaTranscriptionBundle:Lexeme') -&gt;createQueryBuilder('l') -&gt;where('l.id &lt; :thisId') -&gt;setParameter('thisId', $id) -&gt;setMaxResults(1) -&gt;getQuery(); $previousLexeme = $query-&gt;getResult(); if ( count($nextLexeme) &lt; 1 ) { $query = $this-&gt;getDoctrine() -&gt;getRepository('Aleph2OmegaTranscriptionBundle:Lexeme') -&gt;createQueryBuilder('l') -&gt;orderBy('l.id', 'asc') -&gt;setMaxResults(1) -&gt;getQuery(); $nextLexeme = $query-&gt;getResult(); } if ( count($previousLexeme) &lt; 1 ) { $query = $this-&gt;getDoctrine() -&gt;getRepository('Aleph2OmegaTranscriptionBundle:Lexeme') -&gt;createQueryBuilder('l') -&gt;orderBy('l.id', 'desc') -&gt;setMaxResults(1) -&gt;getQuery(); $previousLexeme = $query-&gt;getResult(); } if (!$lexeme) { $lexeme = new Lexeme(); } $form = $this-&gt;createForm(new EditLexemeType(), $lexeme); $form-&gt;handleRequest($request); if ($form-&gt;isValid()) { $em = $this-&gt;getDoctrine()-&gt;getManager(); $em-&gt;persist($lexeme); $em-&gt;flush(); return $this-&gt;redirect($this-&gt;generateUrl('a…
tagged with: javascript
tagged with: forms
upvote count: 2
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: symfony

http://stackoverflow.com/comment/43108789
score: 0
type: AnswerComment
has text: Is it possible to resize the graphs I meant the pie chart in the PDF? Thank you so much for your kind help.You made my day :)
comment on: http://stackoverflow.com/a/27271790
type: Comment

http://stackoverflow.com/comment/42840273
has text: Well, there's an example here that seems to address that: https://developers.google.com/maps/documentation/javascript/events
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27175254

http://stackoverflow.com/q/27243673
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27243788
tagged with: javascript
score: 0
answer count: 2
favorite count: 0
possible better answer: http://stackoverflow.com/a/27243788
has title: Trouble understanding Javascript nested function/closure
has body: I'm attempting to port the following JavaScript code to ruby: https://github.com/iguigova/snippets_js/blob/master/pokerIn4Hours/pokerIn4Hours.js I think I have most of it sorted, the function that is giving me grief is: var kickers = function(idx){ // http://en.wikipedia.org/wiki/Kicker_(poker) idx = idx || -15; var notplayed = Math.max(input.length - 1/*player input*/ - 5, 0); return function(all, cardinality, rank) { return (all || 0) + (((cardinality == 1) &amp;&amp; (notplayed-- &lt;= 0)) ? rank * Math.pow(10, ++idx) : 0); }; }(); And it is called further down like so: k = kickers(k, cardsofrank[i], i); I was wondering if someone could explain how this works in JavaScript. The fact that the inner function has 3 parameters and the outer only has 1 is confusing, especially given that it is called with 3 parameters. I would like to understand what it's trying to accomplish, so that I can port the code with confidence.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27243878
accepted answer: http://stackoverflow.com/a/27243878

http://stackoverflow.com/comment/42934444
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27226189
has text: If you include `jQuery.jqGrid.dynamicLink.js` file it defines `$.fn.fmatter.dynamicLink` function. `$.fn.fmatter` will be defined by jqGrid. Look in [the part](https://github.com/tonytomov/jqGrid/blob/master/js/jquery.fmatter.js) of the source code and search for `$.fn.fmatter`. You will see that `$.fn.fmatter` are defined in jqGrid and all standard formatters are methods of `$.fn.fmatter`. Could you provide a demo which reproduces the problem?
score: 0

http://stackoverflow.com/a/27227812
has comment: http://stackoverflow.com/comment/42934830
has comment: http://stackoverflow.com/comment/42934522
score: 3
has comment: http://stackoverflow.com/comment/42965485
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42965341
type: Answer
has comment: http://stackoverflow.com/comment/42933745
answers question: http://stackoverflow.com/q/27226839
has body: If you want to handle the authorization inside your mixin without adding logic to your component you are doing it the right way. BUT: Every component implementing this mixin should then be aware of what happens within this mixin. If the result you expect is, that nothing is rendered, then you are perfectly right with what you are doing. So if your way is resulting in simplicity it is the React-Way. And in my Opinion this is the case. In the componentWillMount lifecycle event you will capture the moment right before rendering - which is a great time to prevent rendering. So I really dont see anything speaking against your code. EDIT: aproach of defining: "react way" Once you have the same input resulting in the same output every time your code becomes predictable. With your code being predictable you achieve simplicity. These are terms used by Pete Hunt to describe the intentions of React. So therefor if you stay predictable and in result achieving simplicity you are doing it the react way. In case of the above mixin both these rules apply and is therefor the "react way" in the definition I have provided above.
accepted answer of: http://stackoverflow.com/q/27226839
upvote count: 3
has comment: http://stackoverflow.com/comment/42934103

http://stackoverflow.com/q/27251441
score: 0
has comment: http://stackoverflow.com/comment/42977666
has body: I receive an object collection via Ajax: // Var available in the template this.list = []; // This function refresh the list var self = this; this.refreshList = function () { ChannelService.get({}, function (result) { self.list = result.objects; }); }; // Initial refresh of the list this.refreshList(); This collection is used to populate a select: &lt;option ng-repeat="channel in ChanListCtrl.list" value="channel.id"&gt; {{ channel.description }} &lt;/option&gt; Problem: After the rendering of the view, I would like to use a jQuery plugin called "Multiselect" to improve the look&amp;feel of my select. The plugin is used like this: element.multiSelect() I tried this solution: AngularJS and jQuery plugin after render This widget is correctly displayed but AngularJS doesn't replace the variables ({{ channel.description }}) I tried to broadcast an event when the Ajax is done but it doesn't work... I also tried to call an update function with ng-init on my html tag but without success. Here is a plunker to illustrate: http://plnkr.co/edit/EMOjy1TbSkQvCjbxZlFX?p=preview
has comment: http://stackoverflow.com/comment/42980279
has comment: http://stackoverflow.com/comment/42977000
answer count: 1
has comment: http://stackoverflow.com/comment/42977488
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/27252995
has comment: http://stackoverflow.com/comment/42976941
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42978598
has title: Execute a Jquery plugin after AngularJS has been rendered
accepted answer: http://stackoverflow.com/a/27252995
type: Question
linked to: http://stackoverflow.com/q/15635405

http://stackoverflow.com/comment/42953192
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27236811
has text: @Jordonias I updated my question with the example in an easier-to-read format (hopefully, that is)
type: AnswerComment

http://stackoverflow.com/comment/43033670
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27281736
has text: Well, I started writing up some code, but I just don't have the time right now. Basically, I would take out the `onchange` and `onclick` properties in your html and put them in your Javascript. Then you can more easily watch your client console for any errors and specific line numbers to help you track down the issue. I'd also put all of your options into a 3-dimensional array. I will post that part in my answer here in a second.
type: AnswerComment

http://stackoverflow.com/comment/42875289
has text: But the question has already been answered in the duplicate
comment on: http://stackoverflow.com/q/27194931
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43077439
comment on: http://stackoverflow.com/q/27305191
has text: @NarayananRamsubramanyam You want it to download, via scripting, without first prompting the user to accept the download?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/43012254
has text: ok, there may be something missing, bootstrap datetime picker javascript loading ?
comment on: http://stackoverflow.com/a/27265588
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27176690
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27176616
has body: You're not invoking the IIFE, so it isn't returning the object you want. var shop = (function() { var items = []; return { // your code }; })(); // &lt;-- Invoke it! The way you had it, you were just assigning the anonymous function to the shop variable, and the function object doesn't have an addItem() method.
answers question: http://stackoverflow.com/q/27176616
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/27274324
tagged with: php
type: AnsweredQuestion
has body: I can't seem to get nivo slider and the slick carousel (http://kenwheeler.github.io/slick/) to work together on my site. I think it's an issue with when/how the jquery script is pulled but since my javascript knowledge is pretty slim, I have no idea how to fix it. Originally I had the jquery script at the end of the document as you can see <?php wp_footer(); ?> but as it turned out having the jquery down here was causing the nivo slider not to work. I can't seem to figure out which PHP file in my theme does pull the jquery script, but i know it is being pulled somewhere, since the nivo slider is working and this shows up in the source code: I know that the issue isn't how i implemented the slick carousel on the page itself, since it was working up until the time I commented out the lines in the first code block above. Any help here would be appreciated.
tagged with: wordpress
tagged with: nivo-slider
has comment: http://stackoverflow.com/comment/43018580
has comment: http://stackoverflow.com/comment/43018182
type: Question
possible better answer: http://stackoverflow.com/a/27274703
has answer: http://stackoverflow.com/a/27274703
tagged with: javascript
has answer: http://stackoverflow.com/a/27274498
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27274498
has title: Issue with nivo slider and slick carousel not working together -- jquery
tagged with: jquery

http://stackoverflow.com/comment/48742405
has text: @sphanley - NPAPI support (required by Shockwave, a plugin we use) has been removed from 64bit chrome, and disabled in 32 bit chrome. So if we know someone is in 32 bit chrome we can say "You can enable Shockwave by doing the following..." and if we know they are in 64 bit chrome we can say "You can't use Shockwave in chrome any more - please use a different browser". This is until september when it's removed from 32 bit chrome too. We are converting resources to be non-shockwave, but we're in a difficult transition period in the mean time, and need to give the most useful advice to users.
comment on: http://stackoverflow.com/q/27188292
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42905514
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27212352
has text: I would highly recommend using one of the libraries that simplifies ajax calls. However, in this case: are you doing jsonp? CORS? How are you getting to a different server? Or is `it-ebook-api.info` your server?
score: 0

http://stackoverflow.com/q/27156392
has body: I'm trying to write a jQuery widget that wraps an Asp.NET control from a framework I didn't write in order to add some client-side functionality and beautify it with Bootstrap classes. The widget is defined in $.fn.arenaPicker. I've added a class to my .NET Control, arena-picker, then, in $(document).ready(), called $(".arena-picker").arenaPicker(). I have exactly one .arena-picker object on my page. For some reason, my widget is being called twice. The first time, it's being called correctly on my .arena-picker-classed object. The second time, it's being called on $(document) during jQuery's completed() call. I've double-checked that my call to .arenaPicker() is only in my page code once, so I am not directly calling $(document).arenaPicker() or anything, and the stack trace ends at completed() which is bound, in jQuery.js (lines 3424-2428 in v2.1.1): // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); My widget code (bootstrap.arena.extensions.js): $.fn.arenaPicker = function () { 'use strict'; return $(this).map(function () { // // Used for Pickers of all kinds // AttachmentPicker // DocumentPicker // ImagePicker // LookupPicker // PagePicker // PersonPicker // ProfilePicker // ReportPicker // var Picker = (function () { // input[type='text'] element of class .arena-picker generated by <Arena:*Picker /> var picker = function (pickerElement) { // bind all methods for (var fn in this) { if (fn == "bind") { continue; } this.bind(fn); } attachToDom(this, pickerElement); this.init(); }; var ...; picker.prototype = { bind: function (method) { ... }, init: function () { ... }, updateText: function () { .... }, }; var attachToDom = function (picker, pickerElement) { ... }; return picker; })(); return new Picker(this); }); }; Where I call the widget, MyPage.ascx: var ppPickerBehalfOf; ... $(document).ready(function () { …
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery widget being called twice
has answer: http://stackoverflow.com/a/27156579
type: UnansweredQuestion
score: 0
type: Question

http://stackoverflow.com/a/27293148
score: 0
has body: Use relative if you do not want it to be static/absolute/fixed like, $('.myClass').css("position", "relative");// remember myClass is not a variable in your case //^^-------^ // here myClass is not a variable
type: Answer
answers question: http://stackoverflow.com/q/27293089

http://stackoverflow.com/comment/42956433
has text: Again many thanks @jfriend00 ! I tried to vote it up, but it wouldn't let me.
score: 0
comment on: http://stackoverflow.com/a/27224120
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/43054926
has text: I would certainly agree with that ... I'm not 100% sure they don't mix technically, but it is definitely a bad practice at best.
type: Comment
comment on: http://stackoverflow.com/a/27295123
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43381616
comment on: http://stackoverflow.com/q/27306745
score: 0
type: Comment
type: QuestionComment
has text: Yes it was indeed a back-end error which I have fixed today thanks Terry :).

http://stackoverflow.com/comment/42816907
type: Comment
comment on: http://stackoverflow.com/a/27155904
type: AnswerComment
has text: please accept the answer if you think it was sufficient!
score: 0

http://stackoverflow.com/a/27285827
score: -2
answers question: http://stackoverflow.com/q/27285696
upvote count: 0
has body: if((x1 &gt;= 300 &amp;&amp; x1 &lt;= 800) &amp;&amp; (y1 &gt;= 10 &amp;&amp; y1 &lt;= 30)) { //do your stuff here } You could write a between function yourself function between(x, min, max) { return x &gt;= min &amp;&amp; x &lt;= max; } // ... if (between(x, 300, 800)) { // something }
has comment: http://stackoverflow.com/comment/43039691
type: Answer
downvote count: 2
has comment: http://stackoverflow.com/comment/43040943

http://stackoverflow.com/comment/43064952
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27300618
has text: need to sort at least a copy of the array, without changing the unsorted array

http://stackoverflow.com/q/27206268
type: Question
has answer: http://stackoverflow.com/a/27248064
tagged with: w3c
score: 1
has title: How should I, according to W3C, put a canvas in clipboard?
has body: Copy operation can be handled using paste event: div.addEventListener("copy", function() { ... }); The event is cancelable and along with other event information provides DataTransfer object: var items = event.clipboardData; This object has a .setData method that should allow you to add data in clipboard. Unfortunatelly, I can't seem to figure out how does it work. Documentation is broken (if you click on setData it navigates you on the wrong page). I tried things like this: function copy(event) { var items = (event.clipboardData || event.originalEvent.clipboardData); items.setData("image/png", _this.editor.selection.getSelectedImage()); event.preventDefault(); event.cancelBubble = true; return false; } But according to MDN, the second parameter should be string too. How can I put data in clipboard according to the specification (no browser specific functions)?
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: dom-events
accepted answer: http://stackoverflow.com/a/27248064
favorite count: 0
type: AnsweredQuestion
tagged with: clipboard
upvote count: 1

leaflet
tags question: http://stackoverflow.com/q/27282601
type: Tag
tags question: http://stackoverflow.com/q/27267411
tags question: http://stackoverflow.com/q/27207390
tags question: http://stackoverflow.com/q/27233856
tags question: http://stackoverflow.com/q/27267857
tags question: http://stackoverflow.com/q/27277908
tags question: http://stackoverflow.com/q/27194302
tags question: http://stackoverflow.com/q/27271994
tags question: http://stackoverflow.com/q/27168628
tags question: http://stackoverflow.com/q/27186167
tag name: leaflet

http://stackoverflow.com/q/27164956
has title: Regular Expression for checking at least one alphabet or number
answer count: 1
has answer: http://stackoverflow.com/a/27165008
tagged with: regex
upvote count: 2
type: UnansweredQuestion
score: -4
downvote count: 6
type: Question
has body: I want a regular expression that checks if a string contains only the allowed characters. The allowed characters are alphanumeric and the special characters (),#\/\-. I used this expression, and it is working fine. /^([A-Za-z0-9 .(),#\/\-]*)+$/ Now I don't want the string to start with space or any disallowed characters, but it can have space in the middle. Also, the string may not consist of only special characters; it should have at least one alphanumeric character. Can someone help me understand how to adapt the regex I am using to check these additional constraints?
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/27237816
has comment: http://stackoverflow.com/comment/42952417
has comment: http://stackoverflow.com/comment/42952331
has answer: http://stackoverflow.com/a/27237889
has body: I have an if statement in javascript that is if(prop &lt; 0 || trans &lt; 0 || queue &lt; 0 || proc &lt; 0 || prop &gt; 1 || trans &gt; 1 || queue &gt; 1 || proc &gt; 1 || prop == "" || trans == "" || queue == "" || proc == ""){ Is there a way to condense this? For prop, trans, queue, and proc. I want to create an if statement if the values do not fall to be between 0 and 1 or if it has an empty string value
has answer: http://stackoverflow.com/a/27237953
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27237889
has answer: http://stackoverflow.com/a/27238238
has comment: http://stackoverflow.com/comment/42952266
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42952347
type: Question
has comment: http://stackoverflow.com/comment/42952314
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27237953
score: 0
answer count: 3
has title: Javascript condense if statement
favorite count: 0

http://stackoverflow.com/q/27195704
linked to: http://stackoverflow.com/q/4773966
accepted answer: http://stackoverflow.com/a/27196067
type: Question
has title: Let user input image URL and draw this on the html5 canvas
tagged with: canvas
answer count: 1
has comment: http://stackoverflow.com/comment/42877104
tagged with: url
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27196067
has body: I want to have a textbox which a user can paste an image URL into and an enter button which, upon clicking, will draw the image on the canvas. This is my canvas and textbox/enter button. &lt;body&gt; &lt;input type="text" id="input"/&gt;&lt;input type="button" value="Enter" onclick="useImage()"&gt; &lt;canvas id="canvas" width="600" height="400" style="border:1px solid grey;"&gt; &lt;/body&gt; Then I know I should have a function in my javascript which allows this and references the canvas: &lt;script&gt; function useImage(){ var c = document.getElementById("canvas"); var ctx = c.getContext("2d"); //WHAT GOES IN HERE? ctx.drawImage(img,0,0,600,400); &lt;/script&gt; But I'm not sure how to make my function work, can anybody help please? I want the image to fill the whole canvas which is 600x400.
type: AnsweredQuestion

http://stackoverflow.com/q/27297879
has comment: http://stackoverflow.com/comment/43099949
has comment: http://stackoverflow.com/comment/50153357
favorite count: 0
tagged with: angularjs
has body: I have to write a controller in my project using servlets. I've done it before but I've never worked with AngularJS, so I did it via request.setAttribute() and request.getParameter() and put Java code inside of a JSP page. But now frontend developer used AngularJS and I have to return him a JSON object. And I have no idea how to do it. Here's the code of abTestCtrl.js: app.controller("abTestCtrl", function($scope, $location, $http) { $scope.title = "no title"; $scope.description = "no description"; $scope.getParam = $location.search()['id']; if($scope.getParam === undefined)$scope.getParam = 0; //$scope.getParam=2; //path: localhost8080/UIUM.../servlet-name.java //with two ids //web.xml: serverlet mapping for the path if($scope.getParam==='0'||$scope.getParam === 0){ var saveButton = document.getElementById("saveButton"); saveButton.classList.remove("hidden"); } else{ $http.get('http://localhost:8080/UIUM_IMT4003/ABTestController', {command:'getTestCaseInfo', testcaseID:$scope.getParam}). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available console.log('request succesful'); console.log(data); console.log(status); console.log(headers); console.log(config); }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. console.log('request not succesful'); }); } and my processRequest() code from the servlet: protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, ClassNotFoundException { response.setStatus(HttpServletResponse.SC_OK); response.setContentType("application/json; charset=UTF-8"); //PrintWriter printout = response.getWriter(); JSONObject jObject = null; RequestDispatcher view = null; TestcaseRepository testcaseRepo = new TestcaseRepository(); String command = request.getParameter("command"); if(command == null) { …
has comment: http://stackoverflow.com/comment/43060717
has answer: http://stackoverflow.com/a/27299122
has comment: http://stackoverflow.com/comment/43060839
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: java
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/27299122
tagged with: javascript
tagged with: servlets
has title: How to return JSON object to AngularJS using Java Servlet
has comment: http://stackoverflow.com/comment/51204940
downvote count: 0
answer count: 1

http://stackoverflow.com/a/28598518
type: Answer
score: 2
has body: I ran into this problem myself last week and figured I'd leave an answer for all you googlers out there. Though I don't have the poster's code at hand I have a pretty good guess. .... .cloud1 { background-image: url('...'); position: absolute; top: 300px; left: 300px; } The layer element is set to 0,0 by parallax.js as you noted, you need to instead define objects within each layer.
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27284644

http://stackoverflow.com/comment/43076000
type: QuestionComment
has text: on the playercards.php do print_r($_POST). make the name of the select field an array.
comment on: http://stackoverflow.com/q/27306768
score: 0
type: Comment

http://stackoverflow.com/a/27279680
type: Answer
has comment: http://stackoverflow.com/comment/43055540
downvote count: 0
has comment: http://stackoverflow.com/comment/43056277
has body: I took the time to write a few utility javascript functions you may find useful. They require the use of the jQuery library however. The best way to create bent gradients is to use offset radial gradients. This combined with border radius makes for a really nice effect. Now it is up to you to use the right function at the right times (the naming convention of the functions is sideA_To_sideB so rightToUp means going right will eventually find sideA and going up will eventually find sideB - sides being the head or the tail) make it cross browser (if you are into that sort of thing) rounding the head and tail would be a nice touch (ideally this rounding would only occur on vertical and horizontal parts) Feel free to change the size variable to suit your needs. EDIT - based on the image you just added I created this : jsfiddle http://jsfiddle.net/Lbydhhkh/. This was done using rotated linear gradients. I still think using my original approach looks better and makes more sense. This should be enough to send you in the right direction though. The pseudocode can still be used for this new code. var size = 40; function aToB(gradient) { return $("&lt;div&gt;").css({ width: size, height: size, background: gradient, position: "absolute" }); } function radialOut(x, y, corner) { var css = {}; css["border-" + corner + "-radius"] = size / 2; return aToB([ "radial-gradient(", size, "px at ", x, "px ", y, "px, red, blue)"].join("")).css(css); } function radialIn(x, y, corner) { var css = {}; css["border-" + corner + "-radius"] = size / 2; return aToB([ "radial-gradient(", size, "px at ", x, "px ", y, "px, blue, red)"].join("")).css(css); } function downToUp() { return aToB("linear-gradient(to left, red, blue)"); } function rightToLeft() { return aToB("linear-gradient(to bottom, red, blue)"); } function upToDown() { return aToB("linear-gradient(to right, red, blue)"); } function leftToRight() { return aToB("linear-gradient(to top, red, blue)"); } function upToRight() { return radialI…
upvote count: 6
answers question: http://stackoverflow.com/q/27276485
has comment: http://stackoverflow.com/comment/43055121
accepted answer of: http://stackoverflow.com/q/27276485
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43056207
score: 6

http://stackoverflow.com/comment/42943341
type: QuestionComment
comment on: http://stackoverflow.com/q/27231137
score: 0
has text: @powel How would I integrate this to properly pull from a database?
type: Comment

http://stackoverflow.com/comment/113518718
has text: @jib ah neat, I wasn't aware of `stats.get()` I always found it weird you had to iterate over the object to get a key haha. Also thanks for the headsup on sctp being null. I'm only using data channels (no media at all) so this value has never been null for me.
comment on: http://stackoverflow.com/a/64172130
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43085981
type: QuestionComment
comment on: http://stackoverflow.com/q/27312700
has text: Why not? You've created an object to pass to SerializeObject. Why can't you create one to pass to Prop2 too?
score: 0
type: Comment

http://stackoverflow.com/comment/43027340
comment on: http://stackoverflow.com/a/27274034
has text: @JasePellerin i have a feeling that the `document` variable is not what you expect, I'm thinking whatever `document` is it doesnt have `querySelector` so make sure that `document` is really the document.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29383150
has body: Part 1 If you are generating the js at runtime, bundling isn't possible (at least not efficiently). You would have to create a new bundle for every request which isn't terribly quick. Plus, you wouldn't be able to cache the regular, constant script bundle. EDIT: While bundling server-generated js isn't practical, rendering the values into a script tag in the page can achieve the same benefit of bundling, fewer HTTP calls. See the edit in Part 3 for more. Minifying the server generated js however, is totally possible. This question should have the answer you're looking for. However, I'd recommend you cache this on the server if possible, as the minification process itself could take longer than simply sending down the extra bits. Part 2 In most minifiers, global variables (those accessible on the window object) are skipped during the name mangling. With the same respect, variables that are accessed in other files that are not defined within that file are not renamed. For example, if you have the following file... // outside of a closure, so globally accessible var foo = 1; function bar() { // within a closure, and defined with `var`, not globally accessible var bar; // reference to variable declared in another file baz = null; } it would be minified as follows (with whitespace included for readability var foo = 1; function bar() { var b; baz = null; } This is one reason it is important to always declare your variables using the var keyword, otherwise they are assumed to be references to global variables and will not be minified. Also, JSON (not Javascript object literals!!!) will never be distorted by minifiers, because it consists of string literals for all keys, and all values that aren't of another literal type. Part 3 Not a bad way, and at my job we do use this approach. For small files though, or simple config values, we have transitioned to rendering server values in a script tag using ASP.NET in the actual view. i.e. Default.aspx &lt;script&gt; window.globals …
score: 1
accepted answer of: http://stackoverflow.com/q/27181896
answers question: http://stackoverflow.com/q/27181896
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47091063
has comment: http://stackoverflow.com/comment/47093455
type: Answer
upvote count: 1

http://stackoverflow.com/q/27227184
type: AnsweredQuestion
has body: I am new in AngularJS, I want to call signup method on button ng-click, but it never gets called. Sign-Up Angular Script
score: 1
has answer: http://stackoverflow.com/a/27227199
type: Question
downvote count: 0
answer count: 1
has title: controller method never called?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42931856
favorite count: 0
accepted answer: http://stackoverflow.com/a/27227199
tagged with: angularjs
upvote count: 1

http://stackoverflow.com/a/27161690
accepted answer of: http://stackoverflow.com/q/27161578
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27161578
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42816938
has body: If I understand your question correctly, you can't use dot notation to access the variable you want. You need: var crit = { 'webshopId': webshopId, 'type': 'product'} }; crit['sku.regularPrice'] = { $gte : parameters.minPrice}; Which would result in: { webshopId: 'rawDemo', type: 'product', 'sku.regularPrice': { '$gte': '3' } }
upvote count: 3

http://stackoverflow.com/a/27282471
answers question: http://stackoverflow.com/q/27281585
score: 0
type: Answer
has body: although this is not the complete answer, you might want to have a look at it: http://jsfiddle.net/7qoxh0sw/ html: 1 "user details" 2 "user details" 3 "user details" 4 "user details" 5 "user details" 6 "user details" 7 "user details" css .box{ /*important css*/ height: 150px; width: 100px; display: inline-block; transition: margin 1s; position: relative; margin: 10px; /*useless css - used only for visuals*/ background: #aaa; color: white; text-align: center; } .box div{ /*important css*/ display: block; height: 0px; position: absolute; top: 100%; transition: height 1s; width: 100%; /*useless css - used only for visuals*/ background: red; text-align: center; } .box:hover{ /*60px because 50px(from next css rule) + 10px(from margin in `.box` rules)*/ margin-bottom: 60px; } .box:hover div{ height: 50px; } This should give you a basic idea about the css that goes into achieving you desired effect. All you need to do is change your html to a similar format, wherein the user details is a child div to the div class="box", with absolute position. Rest is just css effects on hovering on box divs.

http://stackoverflow.com/comment/42886585
type: Comment
has text: But I need to get minLength in another place, where I doesn't have this "options" variable.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27201523

http://stackoverflow.com/q/27280809
has comment: http://stackoverflow.com/comment/43030691
type: UnansweredQuestion
has body: I have a Json string which I want to show in a Google Calendar Chart. This is the Json string I am using as sample data. [ { "Date": "2014-January-15", "Frequencies": 11 }, { "Date": "2014-January-8", "Frequencies": 22 }, ] Then I use this method to plot the graph. function drawCalendarChart(jsonObj) { var dataValues = eval(jsonObj) var data = new google.visualization.DataTable(dataValues); data.addColumn({ type: 'date', id: 'Date' }); data.addColumn({ type: 'number', id: 'Reports' }); for (var i = 0; i &lt; dataValues.length; i++) { var date = new Date(dataValues[i].Date); alert("This is the date " + date + "and frequency " + dataValues[i].Frequencies) // data.addRow([new Date(dataValues[i].Date), dataValues[i].Frequencies]); } var options = { title: "Calendar Chart", height: 350 }; var chart = new google.visualization.Calendar(document.getElementById('chart')); chart.draw(data, options); var table = new google.visualization.Table(document.getElementById('table')); table.draw(data, { showRowNumber: true }); } The alert is giving correct values for the frequencies but Invalid Date for the Dates. The Calendar Chart is showing only the title since the dates are invalid. The data table is showing correct values for the frequencies and NaN,NaN for the dates. I tried to format the date in several ways but I cannot get this work. Now I'm more confised since even the alert is not showing at least the data as it is in the file e.g. 2014-January-12. Thanks in advance.
has title: Json string to Google Calendar Chart
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27281444
type: Question
tagged with: c#
answer count: 2
tagged with: google-visualization
tagged with: .net
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27280869

http://stackoverflow.com/a/27167863
has body: According to your code I assume you are using jQueryUI. 1 $(".canvas") does not exist. Since your canvas has a classname can, you should use $("canvas") or $(".can"). 2 drag/drop only changes the element's visual behavior, not its DOM structure. If you want to do so, you should define a drop method, it is fired when you drop something on it: $("canvas").droppable({ drop: function(e, ui) { // anything here, e.g. manipulate the DOM // regarding this answer, you could fire canvas drawImage here }, out: function(e,ui){ $(ui.draggable).remove(); // regarding this answer, you may need to clear the canvas and repaint, to "visually" remove the picture } }); 3 Child nodes of a canvas is ONLY displayed when the browser doesn't support canvas, it is for fallback. So it doesn't really make sense to append an image to canvas. Ok, now we should be clear that you forget to inspect DOM structure in devtool, just focus on drawing canvas (I'm using native JS here). var img = document.querySelector("img"); // the image you are dragging var cvs = document.querySelector("canvas"); var ctx = cvs.getContext("2d"); // this will draw the image to canvas at its coordination (10, 10) ctx.drawImage(img, 10, 10); You already know the coordination information when you're dragging it, so you can draw it to exactly the same position where you drop on the canvas. Tips: you can even crop part of the image, scale it then draw to canvas. See this link for a full list of its parameters: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage Moreover, if you want to save canvas content as binary image file, you can use cvs.toDataURL to get base64 string of the image. var url = cvs.toDataURL('image/png'); Then you can do whatever you want, for example, generate a button that user can click and save the image to his hard disk. var save = document.createElement('a'); save.setAttribute('download', 'any_name.png'); save.setAttribute('href', url); document.appendChild(save);
has comment: http://stackoverflow.com/comment/42827567
answers question: http://stackoverflow.com/q/27167502
has comment: http://stackoverflow.com/comment/42827599
score: 0
has comment: http://stackoverflow.com/comment/42827857
has comment: http://stackoverflow.com/comment/42827362
type: Answer

http://stackoverflow.com/q/27168651
has comment: http://stackoverflow.com/comment/42829043
tagged with: javascript
type: UnansweredQuestion
has body: I have tried / to escape the double quotes in a string but i am not able to get the desired string. The code snippets are as follows in Node.js var queryString = "select * from courier where couriername LIKE '%"+filterName+"%'"; console.log(querystring); The output i am getting is like with double quotes included on console: select * from courier where couriername LIKE '%"a"%' But I want output like this select * from courier where couriername LIKE '%a%'; How to get this .. I have tried many things ...
has comment: http://stackoverflow.com/comment/42828869
has comment: http://stackoverflow.com/comment/42828829
has comment: http://stackoverflow.com/comment/42828778
has comment: http://stackoverflow.com/comment/42829143
has comment: http://stackoverflow.com/comment/42829061
has answer: http://stackoverflow.com/a/27169630
has comment: http://stackoverflow.com/comment/42829331
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/42828741
tagged with: node.js
tagged with: escaping
has comment: http://stackoverflow.com/comment/42828744
score: 0
upvote count: 1
answer count: 1
downvote count: 1
has title: How to escape double quotes in Node.js

http://stackoverflow.com/a/27255511
has comment: http://stackoverflow.com/comment/42986945
has comment: http://stackoverflow.com/comment/42985102
has body: If you want to make sure that each text_field is not empty you need to check the field not the div. You could just add a child selector to your javascript. So something like $('#id input').first().val() would get you the input under that div and then it's value. If all the fields are required for the form then you could just use a selector for all inputs then loop through them instead of looping through a static list of ID's.
has comment: http://stackoverflow.com/comment/42986894
has comment: http://stackoverflow.com/comment/43012922
answers question: http://stackoverflow.com/q/27252429
score: 0
type: Answer

http://stackoverflow.com/q/27160065
tagged with: popupwindow
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27161566
tagged with: forms
type: Question
has body: This is my code: &lt;form id="email" action="email_send.php" method="POST" onsubmit="target_popup(this)"&gt; &lt;input type="hidden" name="id" value="&lt;?php echo $row['id']; ?&gt;"&gt; &lt;input type="text" name="slastupdate" value="&lt;?php echo $row['slastupdate']; ?&gt;" /&gt; &lt;input type="text" name="saldo" size="25" value="&lt;?php echo $row['saldo']; ?&gt;" /&gt; &lt;!--This part of the code gets the form submitted by clicking on an image--!&gt; &lt;a href="javascript:{}" onclick="document.getElementById('email').submit(); return false;" target="_blank"&gt; &lt;img src="../img/enviar-mail.png"&gt;&lt;/a&gt; &lt;/form&gt; I have located this at the end of the body &lt;script type="text/javascript"&gt; function target_popup(form) { window.open('', 'formpopup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=300,left = 312,top = 234'); form.target = 'formpopup'; } &lt;/script&gt; So, basically, this works just fine to submit the form by clicking on an image and it would be very really awesome to keep it that way. But the target_popup(this) code should open a popup window after the form is submited, but instead the form gets sent to the same window. Sorry for the bad english (Hope to be wrong about that), I'm not native and I've possibly made some mistakes :P
has title: submit a form with an image, AND in a popup window
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42923778
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27222522
has text: You need to send the value to the server somehow. Possibly via Ajax.
score: 0

http://stackoverflow.com/comment/78660032
score: 0
type: Comment
type: QuestionComment
has text: I got a similar error because I was dealing with a sorted object from the original that was in the hierarchy of an event object. I forget that I've sorted it into another object and make a recursive function. That was my error, but it certainly can have something to do with the scope
comment on: http://stackoverflow.com/q/27159967

http://stackoverflow.com/comment/42898745
comment on: http://stackoverflow.com/q/27208403
has text: Actually, the text is already "selected". While an alert box is open, you should be able to hit whatever shortcut you use to copy and it'll copy the contents of the alert message to the clipboard, e.g. Ctrl + C or Cmd + C.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42836865
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27173288
score: 0
has text: Are you talking about node-webkit, some kind of ajaxy rpc magic, or usage of pure code? If you have code as string (BAD IDEA), that's what `eval` is for.

http://stackoverflow.com/a/27284179
accepted answer of: http://stackoverflow.com/q/27283887
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: There definitely does appear to be a difference between Internet Explorer and Chrome/Firefox. That being said, you can avoid this issue by explicitly setting the selectedIndex of the element itself: $( "select" ).prop( "selectedIndex", 0 ); I'll file an Interop bug internally on this to have our team look into the issue and make a determination as to what the appropriate behavior should be. Fiddle: http://jsfiddle.net/qtcs1kxe/1/ Feature Test: http://jsfiddle.net/jonathansampson/ub1yt4vv/show
score: 3
has comment: http://stackoverflow.com/comment/43037056
upvote count: 3
has comment: http://stackoverflow.com/comment/43037467
answers question: http://stackoverflow.com/q/27283887

http://stackoverflow.com/comment/42833043
has text: Artjom B. I am using windows 8.1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27170294
score: 0

http://stackoverflow.com/comment/43102598
has text: Thanks a lot for your answer and good explanation. However I could not apply this code due to not knowing which on which way to go. In addition to this there is no field to enter website that I listen. Do you mean to write mozilla plugin? Could you please clarify me a little bit more or give a demo with this solution? Thanks in advance.
type: AnswerComment
comment on: http://stackoverflow.com/a/27279211
score: 0
type: Comment

http://stackoverflow.com/q/27261322
has title: Using $routeProvider for dynamic routing and compiling angular code
tagged with: routes
has answer: http://stackoverflow.com/a/27282518
score: 0
has comment: http://stackoverflow.com/comment/43022136
answer count: 1
tagged with: javascript
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42997681
has body: this has been bugging me for days and i can't figure this out. i have a website that adds articles at certain points so i figured i shouldn't need to change the routing every time i add a page. so i added this to my project: $routeProvider.when ('/pages/:page', { templateUrl: 'page.html', controller: 'pageCtrl' }); then i use this for the pageCtrl: app.controller('pageCtrl', function ($scope, $http, $q, $routeParams, $sce, $location) { $http.get("partials/" + $routeParams.page + ".html") .then(function(ret) { $scope.content = $sce.trustAsHtml(ret.data); }, function(err) { $location.path("/404") }); }); then in the webpage i put a &lt;div ng-view ng-bind-html="content"&gt;{{content}}&lt;/div&gt; and all works well except when i put angular code in there. it seems that it will only parse regular html code but not the ng-stuff. i think i should put a $compile in there somewhere. but i tried all combinations i could think of but none work. things i tried: $scope.content = $compile($sce.trustAsHtml(ret.data))($scope); var e=angular.element($sce.trustAsHtml(ret.data)); c=$compile(e); $scope.content = c; c($scope); and several others that didnt do anything at all.. what's the right way to add content in a view and have angular directive work properly?
accepted answer: http://stackoverflow.com/a/27282518
type: AnsweredQuestion
tagged with: dynamic
type: Question
tagged with: compilation

http://stackoverflow.com/comment/44679020
type: AnswerComment
has text: It's working! Thanks! Is the z working like the usual z-index? Because I noticed that with z:50, some part of my text was still clipped (but it wasn't in the exact middle as I first had). So I tried to increase the value of z. But if the value is too high, the #text element is completely invisible. I managed to find a value that my text is no longer clipped and still visible but I'm trying to understand what's happening exactly. Thanks a lot for your answer! :D
type: Comment
comment on: http://stackoverflow.com/a/28114132
score: 0

http://stackoverflow.com/a/27190253
type: Answer
score: 2
downvote count: 3
answers question: http://stackoverflow.com/q/27189849
upvote count: 5
has comment: http://stackoverflow.com/comment/98841949
has comment: http://stackoverflow.com/comment/98842055
has body: FWIW you can do the same thing natively in node with: var http = require('http'), url = require('url'); var opts = url.parse('http://125.196.19.210:3030/widgets/test'), data = { title: 'Test' }; opts.headers = {}; opts.headers['Content-Type'] = 'application/json'; http.request(opts, function(res) { // do whatever you want with the response res.pipe(process.stdout); }).end(JSON.stringify(data));
has comment: http://stackoverflow.com/comment/98842140
has comment: http://stackoverflow.com/comment/127851957

http://stackoverflow.com/comment/42805151
type: Comment
has text: You'll either have to cache a lot of data locally, or request the data when the user starts typing. As soon as you have three characters your data set will be significantly smaller and should be retrievable over a slow connection - the trick is to start doing it in the background as soon as possible and hide the delay while the user is typing. Do the first request with three characters, then filter in javascript form that.
comment on: http://stackoverflow.com/q/27154361
score: 0
type: QuestionComment

http://stackoverflow.com/q/27246828
tagged with: javascript
has comment: http://stackoverflow.com/comment/42969251
has answer: http://stackoverflow.com/a/27246910
favorite count: 0
linked to: http://stackoverflow.com/q/3921922
has body: I want to ask if the following function is declared correctly and if this syntax is possible. (function(){ $(document).on("click", ".MyButton", function(event) { if ($(this).attr("id") == "ButtonAuftrag") { $.mobile.changePage("#pagetwo"); } } )(); THe function should be triggered on a button click. I googled and never found a syntax like this. The first line (function(){ and the closing of the function is confusing me.
duplicate of: http://stackoverflow.com/q/3921922
has comment: http://stackoverflow.com/comment/42969084
answer count: 4
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/27246866
upvote count: 1
has comment: http://stackoverflow.com/comment/42968589
has answer: http://stackoverflow.com/a/27246921
has answer: http://stackoverflow.com/a/27246883
tagged with: syntax
has comment: http://stackoverflow.com/comment/42968604
score: -1
type: Question
has title: Is this a legit javascript syntax?
tagged with: function

http://stackoverflow.com/comment/42916236
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27218244
has text: i just get an error alert popup every time i hit submit

http://stackoverflow.com/comment/43007881
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27268327
has text: This is what I have atm in toggle_visibility:

http://stackoverflow.com/comment/42934584
comment on: http://stackoverflow.com/a/27228551
score: 0
type: AnswerComment
type: Comment
has text: Without the OP telling you this, you should not assume to know his setup. With no programming skill, OP won't be able to use your answer as a solution as well..

http://stackoverflow.com/comment/42985959
has text: You have item in the calling function and use items below in a manner that would be inconsistent with the call.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27256094

http://stackoverflow.com/comment/43322027
comment on: http://stackoverflow.com/q/27304920
has text: Your site is full of errors. Review the javascript console using Chrome inspector or FireBug for Firefox. Once you solve them, then you can try to check you problem again. Meanwhile, I am sure the problem is not of fullPage.js.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42953928
has text: Oh, in that case you should just use the link I provided in the answer, it pretty much addresses your concerns: http://thaiat.github.io/blog/2014/03/10/extending-an-existing-directive-in-angularjs/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27237978
type: Comment

http://stackoverflow.com/q/27202037
tagged with: http://stackoverflow.com/tag/json
type: UnansweredQuestion
tagged with: api
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Using openexchangerates API for currency conversion using JS/JQuery
has answer: http://stackoverflow.com/a/27202792
upvote count: 1
answer count: 1
has body: I have managed to place JSON data into a form-control using JS which is this: $("#getRates").ready(function () { $.getJSON("http://openexchangerates.org/api/currencies.json?app_id="APP_ID", function (data) { console.log(data); for (var value in data) { if (data.hasOwnProperty(value)) { var text = document.createTextNode(value); var select = document.getElementsByClassName('form-control')[1]; select.appendChild(document.createElement('option')).appendChild(text); } } The current JSON file only contains the countries names but I wish to use the a different JSON file which is called Latest.JSON and contains the most recent rates, but it has these fields: "license": "timestamp": 1417258840, "base": "USD", "rates": { "AED": 3.672743, "AFN": 57.800375, How can I just use the append the "rates" to the form-function and use the rates for the conversion? As I have previously tried I just console.log and receive "License" "timestamp" "base" but no rates? Not after specific answer maybe just some direction towards where to look?

http://stackoverflow.com/q/27187546
has comment: http://stackoverflow.com/comment/42861670
has body: I read a lot about global variables as bad practice and I understand the reasons. Yet, in some cases it seems so much more easy. So this is my case and question. I have some functions that animate (actually I use query.transit plugIn by Rico St. Cruz) a bunch of elements together like: $element_1 = $("#element_1"); $element_2 = $("#element_2"); $element_3 = $("#element_3"); $element_4 = $("#element_4"); function animate_1() { // do something with every element $element_1.transition( {…}, 100, 'easeOutSine' ) $element_2.transition( {…}, 150, 'easeOutExpo' ) $element_3.transition( {…}, 100, 'easeOutSine' ) $element_4.transition( {…}, 200, 'easeOutBack' ) } function animate_2() { // do something with every element $element_1.transition( {…}, 100, 'easeOutSine' ) $element_2.transition( {…}, 150, 'easeOutExpo' ) $element_3.transition( {…}, 100, 'easeOutSine' ) $element_4.transition( {…}, 200, 'easeOutBack' ) } function animate_3() { // do something with every element $element_1.transition( {…}, 100, 'easeOutSine' ) $element_2.transition( {…}, 150, 'easeOutExpo' ) $element_3.transition( {…}, 100, 'easeOutSine' ) $element_4.transition( {…}, 200, 'easeOutBack' ) } This is my solution for now and it works fine, yet, it is using the elements as global variables and my .js file is imbedded after the end of my pages. If global variables are bad practice how would it be preferable to do? I know that I could define the selectors in each function thus repeating the identical declaration 4 times which seems silly to me. I am looking forward to your feedback on this generell issue.
has comment: http://stackoverflow.com/comment/43371908
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27187594
score: 0
has comment: http://stackoverflow.com/comment/42861678
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/4246284
has comment: http://stackoverflow.com/comment/42861706
tagged with: jquery-selectors
has answer: http://stackoverflow.com/a/27187594
answer count: 1
has title: Is storing query selectors globally always bad practice?
tagged with: global
tagged with: jquery
has comment: http://stackoverflow.com/comment/42861622

http://stackoverflow.com/comment/42905553
comment on: http://stackoverflow.com/a/27210246
score: 0
type: AnswerComment
has text: That depends on user's browser settings. If you are going to bypass it, so far as I know it's not possible.
type: Comment

http://stackoverflow.com/a/27299120
has comment: http://stackoverflow.com/comment/43063412
has comment: http://stackoverflow.com/comment/111925717
has comment: http://stackoverflow.com/comment/108875958
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/27298635
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27298635
type: Answer
has comment: http://stackoverflow.com/comment/43065380
has body: Fiddle working: http://jsfiddle.net/bbazcyc8/1/ var stickyOffset = $("#sticky").offset(); var $contentDivs = $(".content"); $(document).scroll(function() { $contentDivs.each(function(k) { var _thisOffset = $(this).offset(); var _actPosition = _thisOffset.top - $(window).scrollTop(); if (_actPosition < stickyOffset.top && _actPosition + $(this).height() > 0) { $("#current").html("Current div under sticky is: " + $(this).attr("class")); $("#sticky").removeClass("light dark").addClass($(this).hasClass("light") ? "light" : "dark"); return false; } }); }); Menu

http://stackoverflow.com/a/27291238
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27271220
score: 0
accepted answer of: http://stackoverflow.com/q/27271220
has body: I have found the way: var pdf = new jsPDF('p', 'pt', 'a4'); var source = $('#tabelagastos')[0]; var PDFFILE =''; var arquivo = prompt("Qual o nome do arquivo?"); pdf.specialElementHandlers = { '#bypassme': function (element, renderer) { return true; } }; pdf.fromHTML(source, 15, 15, {'width': 170}, function (dispose) { PDFFILE = pdf.output(); }); //NEXT SAVE IT TO THE DEVICE window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) { fileSystem.root.getFile(arquivo +".pdf", {create: true}, function(entry) { var fileEntry = entry; entry.createWriter(function(writer) { writer.onwrite = function(evt) { alert("Save (root folder)!"); }; writer.write( PDFFILE ); }, function(error) { alert(error); }); }, function(error){ alert(error); }); }, function(event){ alert( evt.target.error.code ); });
type: Answer

http://stackoverflow.com/q/27233048
has comment: http://stackoverflow.com/comment/42943005
has comment: http://stackoverflow.com/comment/42942879
type: Question
has comment: http://stackoverflow.com/comment/42943046
upvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42942928
favorite count: 0
has comment: http://stackoverflow.com/comment/42942984
has comment: http://stackoverflow.com/comment/42943003
has comment: http://stackoverflow.com/comment/42942803
has comment: http://stackoverflow.com/comment/42942945
has comment: http://stackoverflow.com/comment/42942792
score: -5
has comment: http://stackoverflow.com/comment/42943686
has answer: http://stackoverflow.com/a/27233598
has body: I have a small issue. I can't seam to pass a variable from PHP to JS. Here is my JS: var eName = '&lt;?php echo $eName; ?&gt;'; I know that $eName has a value. However in the JS section, I get nothing. no data seams to be present in the variable. when I echo in the PHP section, I get data. Can anyone help? Also tried: var eName = '&lt;?php echo json_encode($eName); ?&gt;'; This give me a null result Thanks for your help Here is how I get my PHP Variable populated: $sql="SELECT * FROM league WHERE id='". $lID ."' LIMIT 1"; $result = mysqli_query($db_conx, $sql); $numrows = mysqli_num_rows($result); if($numrows &lt; 1){ echo "league does not exist"; exit(); } while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $eName = $row["name"];
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42943568
has comment: http://stackoverflow.com/comment/42943282
has comment: http://stackoverflow.com/comment/42943076
has comment: http://stackoverflow.com/comment/42942743
linked to: http://stackoverflow.com/q/23740548
tagged with: php
has comment: http://stackoverflow.com/comment/42942773
has comment: http://stackoverflow.com/comment/42942742
has title: passing PHP var to JS var
duplicate of: http://stackoverflow.com/q/23740548
has comment: http://stackoverflow.com/comment/42943654
has comment: http://stackoverflow.com/comment/42942774
downvote count: 5

http://stackoverflow.com/a/27256858
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: I think you should watch for the error and disconnect callbacks. That way you'll get notified when it closes.
answers question: http://stackoverflow.com/q/27256432

http://stackoverflow.com/comment/42935326
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27229162
has text: Sidenote: If your query takes a long time to execute, chances are that your table isn't indexed.

http://stackoverflow.com/a/27303230
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43069711
has body: Be careful when using this : &lt;input type="number" step="0.01" id="cathetusA" onkeyup=calculate();&gt; If you are using the same id with every form things your code will not work. Id must be unique for every object
type: Answer
has comment: http://stackoverflow.com/comment/43069667
has comment: http://stackoverflow.com/comment/43070073
answers question: http://stackoverflow.com/q/27303156
has comment: http://stackoverflow.com/comment/43069830
score: 0

jquery-waypoints
tags question: http://stackoverflow.com/q/27186208
tag name: jquery-waypoints
type: Tag

http://stackoverflow.com/a/27193224
type: Answer
has body: The properties of Math are not enumerable, so Object.keys(Math) returns an empty array. However, you can use Object.getOwnPropertyNames(Math) It will produce something like ["toSource","abs","acos","asin","atan","atan2","ceil","clz32","cos","exp","floor","imul","fround","log","max","min","pow","random","round","sin","sqrt","tan","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","sign","cbrt","E","LOG2E","LOG10E","LN2","LN10","PI","SQRT2","SQRT1_2"]
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42871996
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27193177
answers question: http://stackoverflow.com/q/27193177

http://stackoverflow.com/comment/43037964
type: Comment
comment on: http://stackoverflow.com/a/27285012
has text: i mean to specify in the alert box which fields are left blank
score: 0
type: AnswerComment

http://stackoverflow.com/q/27188281
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27191639
has title: How to bind multiple JSON files in ng-repeat (AngularJS)?
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27188715
type: Question
tagged with: javascript
has body: I have multiple JSON files: main.json: { "MainRegister": [ { "name": "Name1", "url": "url1.json", }, { "name": "Name2", "url": "url2.json", }, ] } url1.json { "SubInformation": { "description": "Hello World 1", "identifier": "id1", } } url2.json { "SubInformation": { "description": "Hello World 2", "identifier": "id2", } } Now I want to create a ng-repeat div in my index.html such that it loads all the fields from the files, moreover I want to display the following output: Name1: Hello World 1 (id1) Name2: Hello World 2 (id2) How can I bind these files in a ng-repeat way? Or is there another way?
answer count: 2
linked to: http://stackoverflow.com/q/27221399
downvote count: 0
accepted answer: http://stackoverflow.com/a/27188715
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/27191639

http://stackoverflow.com/q/27264108
has body: I'm writing a quiz page to display in a browser, when the user clicks correctly an onclick gives a message for "correct" and else "no try again" and I would like to make the code simpler. function colorPurple9 () { var Morado = document.getElementById('C9').value; if (document.getElementById('C9').checked) { alert("Yes!") } else { alert("Sorry, You got the wrong answer.") } How do I list multiple functions (ex: functionOne, colorTwo, etc) into/onto a single set of rules so that I don't have to use soo many lines of code. In the form box I'm using radios with ID tags, in the above clipped code it's "C9" (and below "N2") and I want to know if I can also list more ID's, like in an array or something, to the function definition. The word for Two in spanish is: Cuatro Cinco Dos Diez And I don't know how to force their first choice to be permanent, or use a counter, but that's optional. PLEASE.
tagged with: http://stackoverflow.com/tag/html
has title: how to apply one ruleset to multiple functions
has comment: http://stackoverflow.com/comment/43000466
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43000550
type: Question
has answer: http://stackoverflow.com/a/27267213
tagged with: javascript
has answer: http://stackoverflow.com/a/27264189
score: 0
answer count: 2

http://stackoverflow.com/a/27156998
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27155136
answers question: http://stackoverflow.com/q/27155136
type: AcceptedAnswer
downvote count: 0
has body: I think differently. I solve this problem with html element attribute. With this way you can add a lot of input boxes to your page. But you must not forget two attribute class="amountBox" data-var="(this is price which you added to priceList object before)" then javascript calculates total value. Here jsfiddle : http://jsfiddle.net/5wbhnmwd/ By this way you get rid of the js manipulation for each element that you add to document. Cake Cost Estimator Round Cakes: 6" Round Cake (6-8): 8" Round Cake (12-15): 9" Round Cake (20-24): 10" Round Cake (26-30): 12" Round Cake (34-38): 14" Round Cake (46-50): Square Cakes: 6" Square Cake (8-10): 8" Square Cake (14-18): 9" Square Cake (22-26): 10" Square Cake (28-32): 12" Square Cake (38-40): 14" Square Cake (56-60): Sheet Cake: 1/4 Sheet (15-18): 1/2 Sheet (30-35): Full Sheet (65-70): Cupcakes: Basic Cupcake: Standard Cupcake: Premium: TOTAL: $ //Prices $(document).ready(function () { var priceList = { sixround : 39.95, eightround : 45.95, nineround : 52.95, tenround : 60.95, twelveround : 74.95, fourteenround : 89.95, sixsquare : 45.95, eightsquare : 52.95, ninesquare : 60.95, tensquare : 74.95, twelvesquare : 99.95, fourteensquare : 116.95, quarterSheet : 37.95, halfSheet : 62.94, fullSheet : 95.95, basicCupcake : 2.25, standardCupcake : 2.50, premiumCupcake : 2.75 }; $('.amountBox').on('change', function(){ var value = $(this).val(); var price = priceList[$(this).data('var')]; $(this).val((value*price).toFixed(2)); $('#total').val('0'); $('.amountBox').each(function(){ if(!isNaN(parseFloat($(this).val()))){ $('#total').val((parseFloat($('#total').val()) + parseFloat($(this).val())).toFixed(2)); } }); }); });
type: Answer
score: 2

http://stackoverflow.com/comment/42812929
type: Comment
comment on: http://stackoverflow.com/q/27159217
type: QuestionComment
score: 0
has text: @Alexandre Miguel try downloading the separate cookie plugin there is a link in my answer (second link) will take you to download it...

http://stackoverflow.com/q/27220028
upvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27220287
has answer: http://stackoverflow.com/a/27220093
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27220093
favorite count: 0
tagged with: css
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42919399
has title: How to detect if an object is moved to another division ?
has body: So basically I am making a todo list web app with RPG level up features. For the todo tasks you created, I use jQuery to allow you to drag the task across three divisions, essentially the idea is to allow you categorize those tasks, i.e. "Pending", "in Progress", "Completed". So for the RPG part, I want to let the user gain experience if, say, they move a task to the "completed" category. So the question is, how do I detect such a behavior in Javascript or in jQuery? (Moving an task object to a specific devision)
has answer: http://stackoverflow.com/a/27220287
has comment: http://stackoverflow.com/comment/42919442
score: -1
type: Question
answer count: 2

http://stackoverflow.com/comment/43084260
type: Comment
comment on: http://stackoverflow.com/a/27311476
score: 0
type: AnswerComment
has text: @Arvind in your example, using `('#ecoTableTotal').on('click', 'tr i:first-child' , function (event) {` will not target any more only the first `i` *`(c.)"inside this cell"`*, but also the *first `i`* inside every other cell.

http://stackoverflow.com/comment/43053407
has text: In your case, you dont need to naming the view for each template. Check this http://codepen.io/anon/pen/jEbomq ..it works!
comment on: http://stackoverflow.com/q/27294136
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42801534
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27153053
has text: Thanks, you don't have to, but if you want go ahead. Thanks for the tips ! :)
score: 0

http://stackoverflow.com/q/27292848
has comment: http://stackoverflow.com/comment/43050958
has answer: http://stackoverflow.com/a/27295067
possible better answer: http://stackoverflow.com/a/27292902
upvote count: 1
has title: How do I make a loop in jQuery so that theres a number added to the end of my divs?
tagged with: css
has comment: http://stackoverflow.com/comment/43075226
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27295067
has body: I want the numbers in the div id's and div classes to loop and be from 0 to however many divs I have.. How can I accomplish this? I've tried to put it in a for loop but it doesn't work for some reason.. $("#bokautbildning0").hide(); $(".boka_btn0").click(function(){ $("#bokautbildning0").slideToggle(); var scrollToId = $(this).attr('href'); $('html, body').animate({ scrollTop: $(scrollToId).offset().top - 270 }, 500); return false; }); $("#bokautbildning1").hide(); $(".boka_btn1").click(function(){ $("#bokautbildning1").slideToggle(); var scrollToId = $(this).attr('href'); $('html, body').animate({ scrollTop: $(scrollToId).offset().top - 270 }, 500); return false; }); $("#bokautbildning2").hide(); $(".boka_btn2").click(function(){ $("#bokautbildning2").slideToggle(); var scrollToId = $(this).attr('href'); $('html, body').animate({ scrollTop: $(scrollToId).offset().top - 270 }, 500); return false; }); Here's the code with the loop I tried: for ( var i = 0; i &lt; 5; i++ ) { $("#bokautbildning" + i).hide(); $(".boka_btn" + i).click(function(){ $("#bokautbildning" + i).slideToggle(); var scrollToId = $(this).attr('href'); $('html, body').animate({ scrollTop: $(scrollToId).offset().top - 270 }, 500); return false; }); }
has comment: http://stackoverflow.com/comment/43057656
has answer: http://stackoverflow.com/a/27295081
tagged with: loops
has comment: http://stackoverflow.com/comment/43078590
has comment: http://stackoverflow.com/comment/43057258
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43050937
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27292902
favorite count: 0
has comment: http://stackoverflow.com/comment/43050921

http://stackoverflow.com/a/27276720
has comment: http://stackoverflow.com/comment/43022356
has comment: http://stackoverflow.com/comment/43022652
type: Answer
has comment: http://stackoverflow.com/comment/43022273
has body: JavaScript will always be parsed as it gets to it in the page. In the case of the script you wrote, it is all going to be run as it is parsed. Having it in the &lt;head&gt; section of your HTML means that none of the DOM exists at the point that it is run. Put the &lt;script src="app.js"&gt;&lt;/script&gt; in the same spot as you have the &lt;script&gt; in the top sample, and it will work as it did before.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43022279
has comment: http://stackoverflow.com/comment/43022373
answers question: http://stackoverflow.com/q/27276633
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27276633

http://stackoverflow.com/comment/42836419
type: AnswerComment
has text: Can you add all of your code to a jsfiddle, or at least include it in the original question as a snippet? Not your entire project but the myFile.js, the file which loads it and the server which deals with the json request.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27172700

http://stackoverflow.com/a/27231274
type: Answer
has body: This is the normal array String representation in Java, consisting in: A number of [ based on the dimension Either a letter for the primitive type (i.e. I for int), or L[fully qualified class name] for Objects @ The array's hash code For one-dimensional arrays, use java.util.Arrays.toString(myArray). For multi-dimensional arrays, use java.util.Arrays.deepToString(myArray). Edit (adding previous comment to answer) You probably want to investigate JSON.parse to parse your Java array from JavaScript.
answers question: http://stackoverflow.com/q/27231194
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42939298
has comment: http://stackoverflow.com/comment/42939377

http://stackoverflow.com/a/27207750
downvote count: 0
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/27207694
has body: That's because the #main style has z-index: -1. That places it behind the container element.
accepted answer of: http://stackoverflow.com/q/27207694
score: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/42809082
type: Comment
has text: something like this? http://jsfiddle.net/0m4qq484/1/
type: QuestionComment
comment on: http://stackoverflow.com/q/27157476
score: 0

http://stackoverflow.com/q/27173043
tagged with: post
type: Question
has body: I am having trouble trying to hit one of my endpoints through postman. I'm new to Postman, so I don't know if my error is from improper Postman usage or my server logic. Here is the post route and the require of another module I made var Post = require('./models/post') app.post('/api/posts', function(req, res, next){ var post = new Post({ username: req.body.username, body: req.body.body }) post.save(function(err, post){ if(err) { return next(err) } res.json(201, post) }) }) Here is the post module var db = require('../db') var Post = db.model('Post', { username: { type: String, required: true}, body: { type: String, required: true}, date: { type: Date, required: true, default: Date.now} }) module.exports = Post the file structure is nodeServer/models with db.js, package.json, node_modules and server.js in nodeServer and post.js in models my Postman request and the error it returns look like this There is more error message beneath what's shown in the picture, but it's all path/morepath/path.js kind of stuff and includes some of my system information. Please help me solve this validation error!
answer count: 1
tagged with: javascript
tagged with: postman
accepted answer: http://stackoverflow.com/a/27175731
has comment: http://stackoverflow.com/comment/42839844
has comment: http://stackoverflow.com/comment/42839768
score: 0
has comment: http://stackoverflow.com/comment/42840056
has comment: http://stackoverflow.com/comment/42836904
has title: Error posting to Node server with Postman
tagged with: node.js
has comment: http://stackoverflow.com/comment/42836674
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27175731
has comment: http://stackoverflow.com/comment/42838094
has comment: http://stackoverflow.com/comment/42837155

http://stackoverflow.com/comment/42952679
score: 0
comment on: http://stackoverflow.com/a/27237889
type: AnswerComment
has text: @RocketHazmat no problem. He gives some of the best talks!
type: Comment

http://stackoverflow.com/a/27157062
has comment: http://stackoverflow.com/comment/42814469
has comment: http://stackoverflow.com/comment/42808329
answers question: http://stackoverflow.com/q/27156976
has comment: http://stackoverflow.com/comment/42808394
has comment: http://stackoverflow.com/comment/42808371
has comment: http://stackoverflow.com/comment/42808627
has comment: http://stackoverflow.com/comment/42808457
downvote count: 0
has comment: http://stackoverflow.com/comment/42808388
has comment: http://stackoverflow.com/comment/42808283
upvote count: 2
has comment: http://stackoverflow.com/comment/42813388
type: Answer
has body: In your first use, you're getting the __proto__ of a function, so you can simply use Function.prototype proto = _.extend(Function.prototype, proto); // underscore extend function Your second use is replacing the prototype on an object, so there's no alternative. ECMAScript 6 is standardizing __proto__, and will also have Object.setPrototypeOf(), so you'll be able to use them once implemented.
score: 2
has comment: http://stackoverflow.com/comment/42808437

http://stackoverflow.com/comment/42999363
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27263253
score: 0
has text: I just tried to follow the first suggestion by Nerixel, but I'm getting "ReferenceError: testing is not defined" in my console log.

http://stackoverflow.com/comment/42984497
score: 0
type: Comment
type: QuestionComment
has text: Ah ok. Any ideas on a solution? I need the two libraries as they both do different things. thanks
comment on: http://stackoverflow.com/q/27254810

http://stackoverflow.com/a/27184285
upvote count: 1
type: AcceptedAnswer
has body: You can get it either by document.getElementById var elem = document.getElementById('undercomune'); or if you're using jQuery elem = $('#undercomune')[0]; // the indexer returns native html element
has comment: http://stackoverflow.com/comment/42855916
has comment: http://stackoverflow.com/comment/42856088
type: Answer
answers question: http://stackoverflow.com/q/27184243
has comment: http://stackoverflow.com/comment/42855935
has comment: http://stackoverflow.com/comment/42856030
has comment: http://stackoverflow.com/comment/42856039
accepted answer of: http://stackoverflow.com/q/27184243
has comment: http://stackoverflow.com/comment/42855869
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42855813

http://stackoverflow.com/comment/139052769
has text: It works if it's not "display: none", it should be hidden in another way like "position: fixed; right: -200%; bottom: -200%;"
comment on: http://stackoverflow.com/a/28333757
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42952961
type: QuestionComment
has text: you should only have one element with a specific id. `getElementById` will return a single element, not an array like `getElementsByTagName` does - will you have multiple `cho`-type cells on your page?
score: 0
comment on: http://stackoverflow.com/q/27238100
type: Comment

http://stackoverflow.com/comment/42830547
type: Comment
type: QuestionComment
has text: @Ved I have updated to version 1.4.4
comment on: http://stackoverflow.com/q/27165641
score: 0

http://stackoverflow.com/comment/42985390
type: Comment
comment on: http://stackoverflow.com/a/27254464
type: AnswerComment
has text: i agree give me the tools
score: 0

http://stackoverflow.com/comment/43005527
score: 0
type: Comment
type: QuestionComment
has text: Did you forget ur jquery?
comment on: http://stackoverflow.com/q/27266696

http://stackoverflow.com/q/27215394
type: Question
answer count: 1
has body: I am following the datamaps docs and I am trying to set an onClick listener to the bubbles I am rendering on the svg. Now, the svg div has the following sub tags: &lt;svg&gt; &lt;g id class="datamaps-subunits"&gt;..&lt;/g&gt; &lt;g id class="bubbles"&gt;..&lt;/g&gt; &lt;/svg&gt; The docs say this should be done in the following way, for the countries listed on the map: done: function(datamap) { datamap.svg.selectAll('.datamaps-subunits').on('click', function() { alert("hello"); }); } And this works fine, while trying to click on particular regions on the map. Trying to attach the same listener to bubbles class does nothing.. done: function(datamap) { datamap.svg.selectAll('.bubbles').on('click', function() { alert("hello"); }); }
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42911749
has title: D3 DataMaps: OnClick Events on Bubbles
has comment: http://stackoverflow.com/comment/42910860
favorite count: 0
tagged with: datamaps
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
score: 6
upvote count: 6
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42910973
has answer: http://stackoverflow.com/a/27216119
accepted answer: http://stackoverflow.com/a/27216119

http://stackoverflow.com/q/27234785
linked to: http://stackoverflow.com/q/27278222
favorite count: 0
has answer: http://stackoverflow.com/a/27388698
has answer: http://stackoverflow.com/a/55240594
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/34316549
has comment: http://stackoverflow.com/comment/52838767
has title: How to handle basic authentication with protractor?
accepted answer: http://stackoverflow.com/a/27388698
type: Question
possible better answer: http://stackoverflow.com/a/32373965
has answer: http://stackoverflow.com/a/27274834
tagged with: protractor
linked to: http://stackoverflow.com/q/3649852
has body: I'm trying protractor to write a few tests in a non angular application. I have to login in a page trough basic authentication in google chrome, but i have no idea how. I already tried baseUrl: 'https://username:password@url' and capabilities: { 'browserName': 'chrome', 'chromeOptions' : { args: ['--login-user=foo', '--login-password=bar'] } } But none if these worked for me. Anyone knows how to do it? I'm having some hard time on it.
has answer: http://stackoverflow.com/a/32373965
tagged with: javascript
score: 22
upvote count: 22
downvote count: 0
answer count: 7
has answer: http://stackoverflow.com/a/59141343
tagged with: jasmine
has answer: http://stackoverflow.com/a/40239937

http://stackoverflow.com/a/27261716
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27261686
type: AcceptedAnswer
upvote count: 1
type: Answer
has body: why don't you just do it this way function fn() { var docname=""; while(docname==""){ docname = prompt("Please enter the file name:"); } return docname; } docname = fn();
accepted answer of: http://stackoverflow.com/q/27261686

http://stackoverflow.com/a/27224121
score: 0
has comment: http://stackoverflow.com/comment/42952220
has comment: http://stackoverflow.com/comment/42962408
type: Answer
has body: OPTION 1 (JSON) send.php <?php session_start(); if (!empty($_POST['contact'])) { $errors = array(); // verify form if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { $errors[] = "Please enter a valid email address."; } // ... etc.. if (empty($_POST['captcha']) || $_SESSION['digit'] != $_POST['captcha']) { $errors[] = "Invalid Verification Code."; } if (!empty($errors)) { $errorStr = "The current request did not complete successfully...\n\n"; $errorStr .= "- " . implode("\n- ", $errors); $res_arr = array('statusNum' => 2, 'message' => $errorStr); echo json_encode($res_arr); } else { // send email $res_arr = array('statusNum' => 1, 'message' => "Thank you!"); echo json_encode($res_arr); } exit; } ?> contact_form.php Hello Guest, Your Message: Name: Email: OPTION 2 (HTML) send.php <?php // never forget to start the session session_start(); $errors = ""; if(isset($_POST['submit'])) { if(empty($_SESSION['6_letters_code'] ) || strcasecmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0) { //Note: the captcha code is compared case insensitively. //if you want case sensitive match, update the check above to // strcmp() $errors .= "n The captcha code does not match!"; } if(empty($errors)) { //send the email $to = $your_email; $subject="Help Needed"; $from = $your_email; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; $body = "A user $name submitted the contact form: \n". "Name: $name \n". "Email: $email \n". "Message: $message \n". "$user_message \n"; $headers = "From: $from rn"; $headers .= "Reply-To: $visitor_email rn"; if (mail($to, $subject, $body, $headers)) { echo "ok"; } else { echo "Coudn't send email. Please try again."; } //header('Location: submitted.php'); } else { echo $errors; } exit; } ?> contact_form.php Hello Guest, Your Message: Name: Email:
has comment: http://stackoverflow.com/comment/42954387
answers question: http://stackoverflow.com/q/27220121

http://stackoverflow.com/comment/42991169
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27258366
has text: I set the editor component's key to the current UTC time and re-ran the above scenario. The child components are indeed trying to call the old editor component's `setState()` function.
score: 0

http://stackoverflow.com/q/27199011
has comment: http://stackoverflow.com/comment/42882339
tagged with: input
has title: How to change color of a input text field when you click on it using javascript?
score: -1
tagged with: onclick
downvote count: 2
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27199036
has body: I am new to JavaScript and I need some help with my project! I am trying to create a form for a company website that allows visitors to email the company directly. When the user clicks the input type=text field to write in their name, I want the background to change color to indicate that they are in that field. Right now I have something like this: &lt;input class="field" type="text" id = "input" onclick="changeMe()" name="name" placeholder="Name" required autofocus/&gt; &lt;script&gt; function changeMe() { document.getElementById("input").style.backgroundColor = "blue"; } &lt;/script&gt; I know it is easier to do in jquery but unfortunately my teacher only wants us to use javascript right now and mine doesn't seem to be working. I want the background to change colour as soon as the user clicks the input field even before they start typing. Does anyone know how to do this? Thank you!!!!!
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
tagged with: background-color
type: Question

http://stackoverflow.com/a/27209034
answers question: http://stackoverflow.com/q/27209016
has comment: http://stackoverflow.com/comment/136633745
accepted answer of: http://stackoverflow.com/q/27209016
score: 36
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/54437410
upvote count: 36
downvote count: 0
has body: Here's an example using spies. https://github.com/mochajs/mocha/wiki/Spies var sinon = require('sinon'); var EventEmitter = require('events').EventEmitter; describe('EventEmitter', function(){ describe('#emit()', function(){ it('should invoke the callback', function(){ var spy = sinon.spy(); var emitter = new EventEmitter; emitter.on('foo', spy); emitter.emit('foo'); spy.called.should.equal.true; }) it('should pass arguments to the callbacks', function(){ var spy = sinon.spy(); var emitter = new EventEmitter; emitter.on('foo', spy); emitter.emit('foo', 'bar', 'baz'); sinon.assert.calledOnce(spy); sinon.assert.calledWith(spy, 'bar', 'baz'); }) }) })

mysql
tags question: http://stackoverflow.com/q/27225936
tags question: http://stackoverflow.com/q/27261826
tags question: http://stackoverflow.com/q/27205923
tags question: http://stackoverflow.com/q/27310861
tag name: mysql
tags question: http://stackoverflow.com/q/27153254
tags question: http://stackoverflow.com/q/27242045
tags question: http://stackoverflow.com/q/27157093
tags question: http://stackoverflow.com/q/27277103
tags question: http://stackoverflow.com/q/27272645
tags question: http://stackoverflow.com/q/27206170
tags question: http://stackoverflow.com/q/27166712
tags question: http://stackoverflow.com/q/27296762
tags question: http://stackoverflow.com/q/27288485
tags question: http://stackoverflow.com/q/27222505
tags question: http://stackoverflow.com/q/27295967
tags question: http://stackoverflow.com/q/27276304
tags question: http://stackoverflow.com/q/27241995
tags question: http://stackoverflow.com/q/27155725
tags question: http://stackoverflow.com/q/27177960
tags question: http://stackoverflow.com/q/27165317
type: Tag
tags question: http://stackoverflow.com/q/27159489
tags question: http://stackoverflow.com/q/27311097
tags question: http://stackoverflow.com/q/27170013
tags question: http://stackoverflow.com/q/27212036
tags question: http://stackoverflow.com/q/27297005
tags question: http://stackoverflow.com/q/27227657
tags question: http://stackoverflow.com/q/27212188
tags question: http://stackoverflow.com/q/27240699
tags question: http://stackoverflow.com/q/27225205
tags question: http://stackoverflow.com/q/27231137
tags question: http://stackoverflow.com/q/27222924
tags question: http://stackoverflow.com/q/27309951
tags question: http://stackoverflow.com/q/27245082
tags question: http://stackoverflow.com/q/27241638
tags question: http://stackoverflow.com/q/27216676
tags question: http://stackoverflow.com/q/27185940
tags question: http://stackoverflow.com/q/27223938
tags question: http://stackoverflow.com/q/27238497
tags question: http://stackoverflow.com/q/27187919
tags question: http://stackoverflow.com/q/27242336
tags question: http://stackoverflow.com/q/27158082
tags question: http://stackoverflow.com/q/27210060
tags question: http://stackoverflow.com/q/27261817
tags question: http://stackoverflow.com/q/27280076

http://stackoverflow.com/q/27232241
answer count: 2
has answer: http://stackoverflow.com/a/27232508
tagged with: javascript
score: 0
tagged with: angularjs
has body: There is the following code: angular.module('app.posts.services', []).factory('Post', ['$resource', 'API_ENDPOINT', ($resource, API_ENDPOINT) -> $resource(API_ENDPOINT, { id: '@id' }, { update: { method: 'PUT' } }) ]).value('API_ENDPOINT', 'http://somedomainname.com/users/:user_id/posts/:id') But for the update method I want to change the URL format: "http://somedomainname.com/posts/:id". How can I do it?
type: UnansweredQuestion
has title: How can I change URL for some functions in $resource Angular?
type: Question
has answer: http://stackoverflow.com/a/27232339

http://stackoverflow.com/a/27310397
has body: So first off, it might be a good idea to move this to a WebService.asmx file. It is just best and common practice to do so. .ASPX pages respond with HTML/CSS/Javascript normally and .asmx responds with JSON or XML. Either way, whether the Ajax calls for flexigrid are to a WebService or a Web Forms page, when you add the attribute [WebMethod] to expose a method doing the first Ajax call can be a bit challenging. There is something a bit finicky about Ajax calls to public WebMethods. The finicky arises around the content-type of the request and if the request is JSON or XML and if the response is JSON or XML. So I am going to show you what I know works for a project I used Flexigrid: $('#gridTablegSearchProperty').flexigrid({ url: 'Services/WSgSearch.asmx/gridTablegSearchProperty', colModel: [... You will notice in the first code snippet I do not set the contentType or the dataType properties of Flexigrid. And now my WebMethod signature [WebMethod] public XmlDocument gridTablegSearchProperty() { System.Collections.Specialized.NameValueCollection nvc = HttpContext.Current.Request.Form; int pgNum = nvc.GetValueAsInteger("page").GetValueOrDefault(1); int pgSize = nvc.GetValueAsInteger("rp").GetValueOrDefault(20); string sortName = nvc.GetValueOrDefaultAsString("sortname", "key"); string sortOrder = nvc.GetValueOrDefaultAsString("sortorder", "desc"); string query = nvc.GetValueOrDefaultAsString("query", string.Empty); string qtype = nvc.GetValueOrDefaultAsString("qtype", string.Empty); My WebMethod is in a .asmx file, it will not matter if you keep yours in a code behind file but I would move to a WebService and drop the WebMethods.aspx this is poor naming convention and file use convention.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27309304

http://stackoverflow.com/q/27185967
has answer: http://stackoverflow.com/a/27186391
upvote count: 1
tagged with: factory
possible better answer: http://stackoverflow.com/a/27186348
type: AnsweredQuestion
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/27186391
has answer: http://stackoverflow.com/a/27186576
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/15666048
has title: Use Two Factories AngularJS
answer count: 3
has body: I would like to find out whether or not it is applicable to use two Factories in AngularJS and basically call one from the other. Consider this Scenario: I have a Factory returning an Array. This Factory is ought to verify whether or not Data to fill this Array is already in a local SQL Storage. If TRUE it returns this Data back to my Controller. If FALSE its supposed to call another Factory which consumes Data from a RESTful API. It then writes this Data to the WebSQL DB and finally returns this Data. Does this Design follow standard Software-Patterns? I'm having a hard time to apply AngularJS Techniques to my Project...
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27186348

http://stackoverflow.com/comment/43119134
has text: Yeah, the OP added that requirement in an edit. I agree, that for anyone other than the OP (i.e. an audiece of older people), this approach is impractical.
comment on: http://stackoverflow.com/a/27311935
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27181472
has answer: http://stackoverflow.com/a/27181508
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27181511
accepted answer: http://stackoverflow.com/a/27181508
tagged with: http://stackoverflow.com/tag/html
has title: Assign title atribute based on tag content
type: AnsweredQuestion
has body: That's it... Having a lot of p tags with a class (let's say .text), I need to add the title attribute with the text of the tag. So, if I have this: &lt;p&gt; Hello, world &lt;/p&gt; It'll give me this &lt;p title="Hello, world"&gt; Hello, world &lt;/p&gt;
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/27181754
type: Question
has answer: http://stackoverflow.com/a/27181754
has comment: http://stackoverflow.com/comment/42851223
score: 0
answer count: 3

http://stackoverflow.com/comment/43005389
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27266625
has text: this may help you: http://www.devils-heaven.com/facebook-javascript-sdk-login/
score: 0

http://stackoverflow.com/comment/43071146
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27303804
type: Comment
has text: @LiamBaker From where does `.bootstrapValidator()` come?

http://stackoverflow.com/a/27269528
upvote count: 2
type: Answer
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27269442
has body: The problem is with this line: var titleID = document.getElementById(main_title); it should be: var titleID = document.getElementById("main_title"); Take a look at HTML DOM getElementById() Method for more information.

http://stackoverflow.com/q/27239222
linked to: http://stackoverflow.com/q/9075520
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: jplayer
tagged with: android
has title: Jplayer does not start playing automatically on mobile device
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27239886
has body: JPlayer does not start playing automatically after setMedia() followed by play() on mobile device (Android), but works fine on chrome for PC and even internet explorer, what should i do to get it playing.
type: Question
has answer: http://stackoverflow.com/a/27239886

http://stackoverflow.com/a/27307476
answers question: http://stackoverflow.com/q/27307432
type: Answer
score: 0
has body: Google Maps LatLng constructor is designed for the arguement to have a comma between the numbers so it looks like this: pictureLocations[i] = new google.maps.LatLng(tempLat, tempLong);

http://stackoverflow.com/comment/43018553
comment on: http://stackoverflow.com/q/27266046
score: 0
type: Comment
type: QuestionComment
has text: Can you show a JSFiddle/JSBin/SO snippet that reproduces the original problem? I.e. where `setOptions` makes your toolbar disappear?

http://stackoverflow.com/comment/42887995
type: QuestionComment
has text: https://developers.google.com/web/fundamentals/media/images/images-in-markup
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27178555

http://stackoverflow.com/comment/43043201
type: Comment
comment on: http://stackoverflow.com/q/27287962
type: QuestionComment
has text: Any body implemented blueimp with zf2 successfully? can I have one sample code or any help? Please help me, I am straggling to get it done. Thank you
score: 0

http://stackoverflow.com/comment/42944723
has text: @Regent Yeah you are right. Thank your for the time and effort. Your fiddle did the trick :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27233578

http://stackoverflow.com/comment/43424529
has text: does the version of the selenium ide and the browser type (chrome, FF) affects the type of element to specify in the command column?
comment on: http://stackoverflow.com/a/27478151
type: AnswerComment
score: 0
type: Comment

marker
tag name: marker
tags question: http://stackoverflow.com/q/27271573
type: Tag

http://stackoverflow.com/comment/42869679
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27191898
has text: What is the result you are getting with your code? The columns params has invalid code. You have a comma and no closing `}`. Is something missing from here? https://datatables.net/reference/option/columns.orderable

http://stackoverflow.com/comment/67357957
type: Comment
comment on: http://stackoverflow.com/a/27232525
score: 3
type: AnswerComment
has text: @K3N How do you get `canvas` in `console.log(canvas.toDataURL());` ?

http://stackoverflow.com/comment/43087284
comment on: http://stackoverflow.com/q/27313458
score: 0
type: Comment
type: QuestionComment
has text: margin-top leaves a gap between 2 divs. I dont want that. My page consists of multiple divs in form of container of graphs.

http://stackoverflow.com/a/27298392
has comment: http://stackoverflow.com/comment/43061430
upvote count: 1
score: 1
downvote count: 0
has body: Use $("#div+" + Id).remove(). That being said, ids are unique, always. Or they should. So, there is no need to find within the parent. See 7.5.2 Element identifiers: the id and class attributes Attribute definitions id = name [CS] This attribute assigns a name to an element. This name must be unique in a document. See the refference Edit: Based on comments, it is right to say this does not work and this work $('#div\\+1').remove(); Again, that being said, see this question, although the plus sign is not forbidden to my understanding, jquery has issues with it. If possible, I would remove the plus sign, if not, then use the escaped version.
answers question: http://stackoverflow.com/q/27298211
type: Answer
has comment: http://stackoverflow.com/comment/43061381

http://stackoverflow.com/q/27256637
has answer: http://stackoverflow.com/a/27256678
accepted answer: http://stackoverflow.com/a/27256678
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/27256715
has answer: http://stackoverflow.com/a/27256715
has comment: http://stackoverflow.com/comment/42986956
tagged with: angularjs
has title: How to check input radio from a button - AngularJS
type: AnsweredQuestion
has body: I'm trying to make a work a simple task without lucky, I'm trying to check an input radio by clicking on a button. Each input radio as their button. How do you achieve that in angular way? How you can see I put the input inside the element button, if you have different thoughts please correct me.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42986907

http://stackoverflow.com/comment/123347999
score: 2
type: AnswerComment
has text: I know about `postMessage` (and mentioned it in my question), but it can only be used when there's a parent/child relationship between the pages - as in the text you quoted. I am considering two tabs opened independently.
comment on: http://stackoverflow.com/a/69079718
type: Comment

http://stackoverflow.com/q/27245123
score: 0
answer count: 1
tagged with: ios
has body: I have developed a web page and this page contains a label that gets updated every second (to display the time). And the same page also has a text box for taking the user input. The problem I am facing is, I am viewing this page in safari browser in iPad (with iOS version 8.0.2), and trying to paste some content into the text box. However, strangely the paste pop up disappears within a second. When I debugged, I got to know this pop up disappears when the time (on the label) is updated (and that happens once in a second). To confirm this, I delayed the time update (in turn updating the label) to once in a minute and I noticed, the paste pop up remained for a minute and disappeared as soon as the time is updated. I did the same experiment using iPad with iOS version 7.1.2, the above mentioned problem is not observed. I wanted to know why this happens, is it expected of iOS 8.0.2? Any information on this is helpful. I am also copying my code here for better understanding of what am I doing. HTML: Time: &lt;label id="time"&gt;&lt;/label&gt;&lt;br/&gt;&lt;br/&gt; Input the content: &lt;input type="text" value=""/&gt; Javascript: window.onload=function() { updateTime(); } function updateTime() { var d = new Date(); document.getElementById('time').innerHTML = d.toLocaleString(); setTimeout("updateTime()", 1000); }
tagged with: javascript
tagged with: ipad
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29132021
type: UnansweredQuestion
type: Question
has title: paste pop up disappears in safari (iPad with iOS 8.0.2) when a label in html is changed

http://stackoverflow.com/comment/43044662
has text: please answer my link http://stackoverflow.com/questions/27289097/click-on-link-to-show-data-on-div-and-link-disappear-is-not-working
type: Comment
comment on: http://stackoverflow.com/a/27270216
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42846349
type: Comment
comment on: http://stackoverflow.com/a/27177611
has text: I am genuinely shocked you feel this is a more maintainable solution. The final version is longer, almost unreadable (and adds a custom function to make it work) and has greater runtime overheads. K.I.S.S. is a sensible rule. Go figure :)
type: AnswerComment
score: 0

http://stackoverflow.com/a/27250905
upvote count: 1
has comment: http://stackoverflow.com/comment/43079860
score: 1
has comment: http://stackoverflow.com/comment/43079777
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43101084
has comment: http://stackoverflow.com/comment/43062608
type: Answer
has body: jQuery().checked() is not a valid event handler. You should use the jQuery.click() or jQuery.change() event instead. Inside the change event, you should check if the element is checked and then take appropriate action. jQuery(".chbd-ac-container input:nth-child(1)").click(function() { if (this.checked) { $('img.top').css({ opacity: 0 }); } else { $('img.top').css({ opacity: 1.0 }); } });
answers question: http://stackoverflow.com/q/27250406
accepted answer of: http://stackoverflow.com/q/27250406

http://stackoverflow.com/a/27160211
has comment: http://stackoverflow.com/comment/42832590
downvote count: 0
has comment: http://stackoverflow.com/comment/42814215
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27160077
has body: you required json is illegal because the brand field is repeated twice(??) i created a fix in jsFiddle for you: http://jsfiddle.net/ymzrocks/hzy9jxve/1/ var result = {}, i = 1; $.each( $('form[name=checkboxes]').serializeArray(), function() { result[this.name + i] = this.value ; i++; }); it basically turns the brand fields to brand1, brand2, ... etc i really think that you should use an array or rephrased your question
accepted answer of: http://stackoverflow.com/q/27160077
has comment: http://stackoverflow.com/comment/42814470
type: AcceptedAnswer

http://stackoverflow.com/comment/42877847
comment on: http://stackoverflow.com/a/27195979
has text: Is it possible to access 'user_data' directly (without reading it from local storage) in a JavaScript code inside query.php?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42846514
type: Comment
type: QuestionComment
has text: I'm not familiar with this API, but it seems weird that a cell would have a method to insert a row.
comment on: http://stackoverflow.com/q/27178796
score: 0

http://stackoverflow.com/q/27240907
has comment: http://stackoverflow.com/comment/42958480
has answer: http://stackoverflow.com/a/27240985
has answer: http://stackoverflow.com/a/27241322
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42958448
has comment: http://stackoverflow.com/comment/42958560
answer count: 5
type: UnansweredQuestion
has title: Filling a Div with Content
has answer: http://stackoverflow.com/a/27241435
has answer: http://stackoverflow.com/a/27240968
has comment: http://stackoverflow.com/comment/42958347
has answer: http://stackoverflow.com/a/27240977
type: Question
has body: I'm making a small page that has a div of defined size with all of its content set to not be displayed. Above the div is a list of p tags that act as "links" to change the content of the div when clicked. However, I just can't seem to get this to work. HTML Content 1 Content 2 Content 3 Title Content 1 Title Content 2 Title Content 3 CSS .subcontent{ box-sizing: border-box; border: solid 1px #DDD; height:300px; width: 70%; padding: 0px 15px; margin-left: 22%; margin-bottom: 10px; font-size: 90%; } .hide{ display: none; Any ideas on what is the best way to get Content 1 to appear if #link1 is clicked? Also, if content has been displayed with one click, how can I get it back to being hidden before the new content is displayed? I'm sorry if any of the ideas I've presented aren't clear - I'm still very new to all of this.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27249426
has body: At this address you can find a beautiful plugin: https://github.com/aterrien/jQuery-Knob You can configure it, indicating the background and the foreground color. I want to set a transparency on the background color. I've read something about "displayPrevious" parameter with should make this but it seems to not work correctly. Any ideas? Thanks
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27557800
type: AnsweredQuestion
score: -1
type: Question
downvote count: 2
has title: How to make the jQuery Knob background color transparent
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/27557800
tagged with: javascript
tagged with: jquery
tagged with: jquery-knob
favorite count: 0
tagged with: transparency

http://stackoverflow.com/comment/43052393
comment on: http://stackoverflow.com/a/27281575
score: 0
type: AnswerComment
has text: Splendid. As I said before, if you update your question I'll gladly tweak my answer to assist you further.
type: Comment

http://stackoverflow.com/q/27196234
tagged with: javascript
score: 0
answer count: 1
tagged with: meteor
has body: I am using this ShareJS package in my Meteor application. ShareJS uses the collections docs and ops. How can I access these collections from the server? Do I have to define them as collections as well?
has answer: http://stackoverflow.com/a/27197564
type: AnsweredQuestion
has title: Access native mongoDB collection in Meteor
type: Question
accepted answer: http://stackoverflow.com/a/27197564

http://stackoverflow.com/q/27303075
has comment: http://stackoverflow.com/comment/43069352
has comment: http://stackoverflow.com/comment/43069532
tagged with: yii
has comment: http://stackoverflow.com/comment/43069297
tagged with: javascript
has body: I am using HandlebarsJS with Yii and PHP to render a page. Below is a block of html/handlebars code from the page {{#if embed_link}} {{embed_link}} {{/if}} The above code only runs when embed_link is true. In my test case it is, and when it runs I need to use jQuery to get the text from "f_hidden_p" . So in the js file I have, $(document).ready(function(){ console.log($('.f_hidden_p').text()); console.log($('.f_hidden_p').val()); }); For some reason this returns an empty string or undefined. When I inspect element and check, I can see that the value of {{embed_link}} has a value that is not an empty string. After that I tried, giving the anchor tag an unique id "embed_link" and tried. $(document).ready(function(){ console.log($('#embed_link').text()); console.log($('#embed_link').val()); }); But that didn't work either. I tried that same syntax with different divs in the HTML that are also within a handlebars block and it worked perfectly. It just doesn't work for this block for some reason. NOTE : .f_hidden_p is hidden -> it's display is 'none' in CSS. But I am quite sure that shouldn't stop .text() or .val() from getting the text. Thanks for the help!
has comment: http://stackoverflow.com/comment/43069702
score: 0
has comment: http://stackoverflow.com/comment/43069237
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43069234
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43069366
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43069220
tagged with: css
has comment: http://stackoverflow.com/comment/43069279
has comment: http://stackoverflow.com/comment/43069299
has comment: http://stackoverflow.com/comment/43069605
type: Question
has answer: http://stackoverflow.com/a/27303445
has comment: http://stackoverflow.com/comment/43069715
has title: jQuery .val()/.text() not working for a specific block of html
has comment: http://stackoverflow.com/comment/43069563

http://stackoverflow.com/comment/43049935
comment on: http://stackoverflow.com/a/27291301
has text: That still just creates new log lines instead of a table. console.table() doesn't actually do anything in your example. That is because the console.log() directly outputs to the console and returns undefined. My current bet is that it is not possible and I have to use the console.log() instead
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27293108
accepted answer of: http://stackoverflow.com/q/27293078
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27293078
has body: You can use attribute starts with selector. you also need to remove id selector # from Element Selector a: $('a[id^="some_id"]').on ('click', function (e){ e.preventDefault(); console.log ("a click " + this.id); });
type: Answer

http://stackoverflow.com/comment/42881114
has text: To do drawing on the client, you need either canvas or svg. An alternative would be to make the image on the back end using php gd library or similar.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27198281
type: Comment

http://stackoverflow.com/q/27234375
score: 0
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/27235385
tagged with: angularjs
tagged with: twitter-bootstrap
has title: Ng-view on load event
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27235385
tagged with: javascript
has body: I am new to Angular js. I am trying to create SPA. Below is my index.html and i have a partial view and its controller myApp.controller('MainController', function ($scope, $http) { } And my partial view Add Field </accordion> Here comes the problem. IU want to apply an CSS to "employer" class. Like that i have many classes and i am using Bootstrap select. $('.employer').selectpicker({ style: 'btn-info', dropupAuto: false }); I want to use the above code in the partial view loading event. How can i do that ? Can anyone help me plz? Thanks,

http://stackoverflow.com/q/27175603
has answer: http://stackoverflow.com/a/29521254
tagged with: dojo
has comment: http://stackoverflow.com/comment/42840567
type: Question
has answer: http://stackoverflow.com/a/32538762
tagged with: javascript
has title: The XMLHttpRequest progress event property 'position' is deprecated. Please use 'loaded' instead
score: 4
answer count: 2
has comment: http://stackoverflow.com/comment/42840707
downvote count: 1
has comment: http://stackoverflow.com/comment/47005643
has comment: http://stackoverflow.com/comment/42840664
has comment: http://stackoverflow.com/comment/42848104
favorite count: 0
has body: Anyone has any idea what this means? Encountered after upgrading Dojo.
upvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/60347774

http://stackoverflow.com/comment/43049965
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27292264
has text: This will throw _Reference Errors_, I think you want _String_

http://stackoverflow.com/comment/43085914
has text: I need the value of Prop2 to be an object reference, not a string... does that clarify what I mean?
type: Comment
comment on: http://stackoverflow.com/q/27312700
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42838778
has text: was sorted 'default' from the oldest to the newest (i wanted to show posts from the newest to the oldest)
comment on: http://stackoverflow.com/a/27174220
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43102555
type: Comment
comment on: http://stackoverflow.com/q/27279885
score: 0
type: QuestionComment
has text: @SimplyCraig..as i am new to stackoverflow, i didnt know about how to add code and all..i will definitely keep that in mind for next time

http://stackoverflow.com/a/33227005
has comment: http://stackoverflow.com/comment/85691022
has comment: http://stackoverflow.com/comment/71147827
has comment: http://stackoverflow.com/comment/85690967
has comment: http://stackoverflow.com/comment/85713018
has comment: http://stackoverflow.com/comment/75456895
has comment: http://stackoverflow.com/comment/71160857
upvote count: 43
has comment: http://stackoverflow.com/comment/79953662
has comment: http://stackoverflow.com/comment/85704586
downvote count: 0
has comment: http://stackoverflow.com/comment/94811988
has comment: http://stackoverflow.com/comment/79932739
has comment: http://stackoverflow.com/comment/85711288
score: 43
has comment: http://stackoverflow.com/comment/71179918
has comment: http://stackoverflow.com/comment/85712941
has comment: http://stackoverflow.com/comment/85707577
type: Answer
has comment: http://stackoverflow.com/comment/85711241
has comment: http://stackoverflow.com/comment/75449902
has comment: http://stackoverflow.com/comment/55996407
has comment: http://stackoverflow.com/comment/56005361
has body: I come long after since some other question raised from this one because the accepted answer may produce undesirable behavior. @K3N solution is almost right, but I would go against the use of svgElement.outerHTML. Instead, one should prefer new XMLSerializer().serializeToString(svgElement). Also, the use of blob and of the URL API is not necessary and a simple dataURI has more compatibility accross browsers. So a complete version of this would be : function drawInlineSVG(svgElement, ctx, callback) { var svgURL = new XMLSerializer().serializeToString(svgElement); var img = new Image(); img.onload = function() { ctx.drawImage(this, 0, 0); callback(); } img.src = 'data:image/svg+xml; charset=utf8, ' + encodeURIComponent(svgURL); } // usage: drawInlineSVG(document.querySelector('svg'), ctxt, function() { console.log(canvas.toDataURL()) });
answers question: http://stackoverflow.com/q/27230293

http://stackoverflow.com/comment/42986875
type: AnswerComment
has text: so can u give any solution for me to get multiple created div that text box values to java using req.getParam...
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27256559

http://stackoverflow.com/comment/42882826
type: Comment
comment on: http://stackoverflow.com/a/27199338
type: AnswerComment
score: 0
has text: Thanks @RokoC.Buljan. `//` would work in a regular HTTP web environment, but when viewing a file locally it won't work because it's trying to use the `file://` protocol.

http://stackoverflow.com/comment/42969956
has text: @sanki different strokes for different folks i guess...
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27247489

http://stackoverflow.com/a/27312550
type: Answer
has comment: http://stackoverflow.com/comment/43086841
has comment: http://stackoverflow.com/comment/43085750
score: 2
upvote count: 2
has body: You could try something like this: var $badge = $('div.badge'), xOffset = $badge.offset(); $badge.appendTo('body').css({ top: xOffset.top, left: xOffset.left }); You probably need to add scrollTop() and the like too.
accepted answer of: http://stackoverflow.com/q/27312335
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27312335
has comment: http://stackoverflow.com/comment/43087159

http://stackoverflow.com/comment/42977479
type: AnswerComment
has text: Follow-up question. With the above solution implemented, why can't I do something like this: `var u1 = new User(); u1.username = 'a'; var u2 = new User(); u2.username = 'b';` This is essentially what I am trying to achieve; create distinct objects and assign different values to them.
type: Comment
comment on: http://stackoverflow.com/a/27178953
score: 0

http://stackoverflow.com/a/27254604
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27252500
has body: This event being global event broadcasted before a URL change you only need to define the handler once. How do I make this event logic reusable so I can use it in multiple controllers? That means this does not need to be defined in multiple controllers. Use module.run() for this. You may use $rootScope which seems appropriate for this kind of event you are dealing with. Module.run() is executed once "per page" as your application gets initialized. If you later make your app SPA you are still golden. If you follow TDD refer to the following link on ideas:- Testing event chains and module.run() in Angular + Jasmine Why not in Controllers ? Strictly their job should be to make the Model available to the View. Is a service or factory the way to go? Service, Factory etc should be to just objects that help your controllers, directives. They don't have access to the DOM scopes. Is it even better to use a directive and attach it as elements, attributes or classes in the relevant views. I suspect the directive option is a mild violation of separation of concerns. Directives are local. They enhance HTML elements. Event like URL change is global. What possible directive can be created for the browser's location field ?

http://stackoverflow.com/comment/42893270
has text: I'm trying to use the window load function, but I still get the same result. I don't even see the loader div, the container div just starts loading, the background images being last to load apparently. If I remove `$('#loading_screen').hide()` then the loader div appears along with the container.
score: 0
comment on: http://stackoverflow.com/a/27205308
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27219557
has comment: http://stackoverflow.com/comment/42918378
type: Question
linked to: http://stackoverflow.com/q/371875
has comment: http://stackoverflow.com/comment/42918346
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42918376
has comment: http://stackoverflow.com/comment/42918283
has comment: http://stackoverflow.com/comment/42918440
has comment: http://stackoverflow.com/comment/42918385
has comment: http://stackoverflow.com/comment/42918432
has comment: http://stackoverflow.com/comment/42918534
has comment: http://stackoverflow.com/comment/42918524
has comment: http://stackoverflow.com/comment/42918758
has comment: http://stackoverflow.com/comment/42918451
has comment: http://stackoverflow.com/comment/42918522
has comment: http://stackoverflow.com/comment/42918452
has title: How to read all files in a directory using JavaScript
tagged with: fileapi
answer count: 0
has comment: http://stackoverflow.com/comment/42918557
type: UnansweredQuestion
has body: I have some json (along with other files types) files in a directory which I need read (only json) from that directory. It should work like an iterator, iterates over and over until all the files are read. My Question is how can I iterate over all the files in a directory? How can I do so using JavaScript? I am using Unix system and need that thing to work for Firefox, Chrome, Safari. (My question is not basically how to read JSON files)
tagged with: file
upvote count: 1
has comment: http://stackoverflow.com/comment/42918398
has comment: http://stackoverflow.com/comment/42918407
has comment: http://stackoverflow.com/comment/42918804

http://stackoverflow.com/a/27243504
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27243406
has body: Try putting your function in global scope and add the relevant datatype: function refreshDiv() { $.ajax({ url: "refresh.php", datatype:"html", cache: true, success: function (html) { $(".refresh").html(html); } }); } $(document).ready(function () { $('.refresh').click(refreshDiv); $('.refresh').css({ color: "" }); }); Another suggestion is try replacing $ with your j which you have used for jQuery.noConflict() utility. A small demo could help you.

http://stackoverflow.com/comment/43030970
score: 0
type: Comment
has text: Hi @oleg - version is jqGrid 4.4.4 - 2008. When I use firebug the response `json` is what I posted above, also there are no syntax or servers errors
comment on: http://stackoverflow.com/a/27278087
type: AnswerComment

http://stackoverflow.com/q/27220717
tagged with: css
has comment: http://stackoverflow.com/comment/42920710
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27220880
has body: I am trying to get a banner slideshow. If image is blank then do not display. Only if it's available. However slideshow is display image1 and not sliding. SlideShow for OHR I am trying to create a banner slideshow with jquery cycle. We will have total 5 images, however, all 5 images will not available to display everyday. We need to display image if image is not blank and if image is blank then do not display.
score: 0
answer count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/1977871
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Remove image if it's not available in jquery slideshow

http://stackoverflow.com/q/27224661
has answer: http://stackoverflow.com/a/34333442
tagged with: validation
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29461079
favorite count: 0
tagged with: angularjs
has body: THE SITUATION: I have an angular app that send emails. There is a form with three fields: Address - Subject - Text. For the address field I am using angular ui-select. Everything is working fine, except the validation on the address field (on subject and text validation is working properly). EDIT: This bug has been fixed from version 0.16.1. as pointed out by @yishaiz. So this question and its relative solution regard ui-select versions &lt; 0.16.1. THE CODE: HTML: &lt;form name="emailForm" ng-submit="submitForm(emailForm.$valid)"&gt; &lt;div class="row form-group"&gt; &lt;label class="col-sm-2 control-label"&gt;To: &lt;/label&gt; &lt;div class="col-sm-10"&gt; &lt;ui-select multiple ng-model="database_people.selectedPeople" theme="select2" ng-disabled="disabled" style="width:100%"&gt; &lt;ui-select-match placeholder="Select person..."&gt;{{$item.name}} &amp;lt; {{$item.value}} &amp;gt;&lt;/ui-select-match&gt; &lt;ui-select-choices repeat="person2 in list_people | filter: {name: $select.search.name, value: $select.search.value, db_data_type_id: 5}"&gt; &lt;div ng-bind-html="person2.name | highlight: $select.search"&gt;&lt;/div&gt; &lt;small&gt; email: &lt;span ng-bind-html="''+person2.value | highlight: $select.search"&gt;&lt;/span&gt; &lt;/small&gt; &lt;/ui-select-choices&gt; &lt;/ui-select&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="col-sm-8"&gt; &lt;button type="submit" class="btn btn-primary"&gt;Send&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; ANGULARJS: $scope.submitForm = function(isValid) { if (isValid) { alert('valid'); } else { alert('not valid') } }; PLUNKER: http://plnkr.co/edit/MYW7SM9c9anH6RTomfRG?p=preview As you can see the ui-select is required but the form is parse as valid. QUESTION(s): How can i make the ui-select multiple required?
score: 5
possible better answer: http://stackoverflow.com/a/29461079
accepted answer: http://stackoverflow.com/a/27227883
answer count: 4
type: AnsweredQuestion
tagged with: select
type: Question
has title: Angularjs validation for ui-select multiple
has answer: http://stackoverflow.com/a/37652410
upvote count: 5
tagged with: ui-select
has answer: http://stackoverflow.com/a/27227883

http://stackoverflow.com/q/27304254
has comment: http://stackoverflow.com/comment/43071696
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27304552
has answer: http://stackoverflow.com/a/27304552
has comment: http://stackoverflow.com/comment/43071845
answer count: 3
accepted answer: http://stackoverflow.com/a/27304357
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to permanently remove an element from a jQuery object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27304665
upvote count: 3
has answer: http://stackoverflow.com/a/27304357
type: Question
score: 3
has body: here is the problem. I have code like this where I get all li elements into a jQuery collection and then I remove last item from DOM. But I don't know how to also remove an element from a jQuery collection? Now it's something like this: console.log(myList); ['li.item', 'li.item', 'li.item'] I need to pop last item and get something like this: console.log(myList); ['li.item', 'li.item'] var myList = $('.item'); console.log(myList); myList.last().remove(); console.log(myList); Item Item Item

http://stackoverflow.com/comment/43086846
has text: Surely, but you need to explain what's going on better. Why is `replace()` not an option? **Edit**: Ey..? You're not the OP - Maybe you should ask your own question ;)
score: 0
comment on: http://stackoverflow.com/a/27312492
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27252018
has comment: http://stackoverflow.com/comment/42978305
type: Question
has title: Why is DOM only being updated when debugging?
has body: I have built a wrapper around a function that display a loading progress bar and makes it disappear after the function executed. Now it does not display the progress bar, except when I set a breakpoint at the execution of the function foo. I had a bit of success with running it on the progress onload event, but then it does not execute the endLoading: function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i &lt; 1e7; i++) if ((new Date().getTime() - start) &gt; milliseconds) break; } var progress = document.createElement('progress'); var fillElement = document.body; function foo() { console.log('foo start'); sleep(2000); fillElement.innerHTML = 'Bar'; console.log('foo end'); } function startLoading() { console.log('start'); fillElement.innerHTML = ''; fillElement.appendChild(progress); } function endLoading() { console.log('end'); fillElement.removeChild(progress); } startLoading(); foo(); // if the debug point is set here i can see the progress bar endLoading();
tagged with: javascript
tagged with: dom
score: 0
has comment: http://stackoverflow.com/comment/42978027
accepted answer: http://stackoverflow.com/a/27252109
answer count: 1
has comment: http://stackoverflow.com/comment/42978120
has answer: http://stackoverflow.com/a/27252109
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42978313
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42978094

http://stackoverflow.com/comment/43026471
has text: `$('span:contains("PCI Date")').closest('table').attr('id')` ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27278705
score: 1

http://stackoverflow.com/a/27313851
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27313754
accepted answer of: http://stackoverflow.com/q/27313754
type: Answer
upvote count: 4
downvote count: 0
has body: The click() method takes only one parameter as its argument. You can use slideToggle() and toggleClass() $(document).ready(function () { $('.navbar-default .navbar-nav &gt; li.dropdown').click(function () { $('ul.dropdown-menu', this).stop(true, true).slideToggle('fast'); $(this).toggleClass('open'); }); });
score: 4

http://stackoverflow.com/comment/43062915
has text: Is it just that your function is defined after you use it? i.e. should it be `functionFirstArr(video){ ... }; getFirstArr(videos[i]);`. I mean, looking at it now, you shouldn't be defining a function in a loop anyway : )
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27299491

http://stackoverflow.com/q/27171394
tagged with: jquery
score: 0
has body: I am a very basic novice when it comes to jQuery. I can find my way through usually by searching for snippets and ammending to suit my needs. Here is one I cannot understand. I have a div, with 3 nested divs, then each nested div has a table, followed by a link. {headers} {some data} {some data} {headers} {some data} {some data} {headers} {some data} {some data} The links are to clone the second row of the table and ammend it to the bottom (plus some other stuff but the basic function here is odd). This is the jQuery that executes when the links are clicked: Now, this works for the first two divs, i.e. when clicked, an extra row gets added to the table in its section...but it does not work on the 3rd! I cannot understand why. I am doing this in Codeigniter so the divs are all produced in the same way identically. Hope someone can help. Thanks in advance.
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27172035
tagged with: codeigniter
has title: jQuery to Clone Table Rows - Only Half Working
type: Question
has comment: http://stackoverflow.com/comment/42833510
tagged with: javascript

http://stackoverflow.com/a/27220754
has comment: http://stackoverflow.com/comment/42920862
downvote count: 0
has body: Your code looks good. Because your alert is coming back 'undefined' leads me to believe something else is wrong. Is the path to your firebase correct?
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27220495

http://stackoverflow.com/comment/42861450
has text: Ok I can comment the code, give a few seconds, but for the moment you'll notice that in the inner setTimout I just concat to the src a new string, you see src + '/admin' ?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27187379

http://stackoverflow.com/comment/42837693
comment on: http://stackoverflow.com/q/27173204
has text: Please post your code!
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27167748
type: Question
tagged with: azure-mobile-services
tagged with: ios
tagged with: javascript
has comment: http://stackoverflow.com/comment/43108950
score: 0
has body: Im trying to use a script in the mobile services to push notifications to an ios mobile but I keep getting a script error in the logs although when adding a record from the mobile it is being added but the notification is not send,can someone help me with the error? this is my script in the mobile services tab in azure of ios: function insert(item, user, request) { request.execute(); // Set timeout to delay the notification, to provide time for the // app to be closed on the device to demonstrate toast notifications setTimeout(function() { push.apns.send(item.deviceToken, { alert: "Toast: " + item.text, payload: { inAppMessage: "Hey, a new item arrived: '" + item.text + "'" } }, function (error) { if (!error) { alert:"msg sent successfully" } }); }, 2500); }
has comment: http://stackoverflow.com/comment/43022648
answer count: 0
type: UnansweredQuestion
has title: can't push notifications to ios using windowsazure

http://stackoverflow.com/comment/42920514
has text: Can you give an example of what the deliveryData should look like?
comment on: http://stackoverflow.com/q/27220725
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27225936
downvote count: 2
has body: I have this code which displays time when refreshed, but I want to display how many times it has been refreshed. $(document).ready(function () { var j = jQuery.noConflict(); j('.refresh').click(refreshDiv); j('.refresh').css({ color: "" }); function refreshDiv() { j.ajax({ url: "refresh.php", cache: true, success: function (html) { j(".refresh").html(html); } }); } }); &lt;?php echo time(); ?&gt; This code displays time in secs when refreshed. I want to display the number of times the div has been refreshed, like "you have refreshed 9 times".
tagged with: php
has comment: http://stackoverflow.com/comment/42929766
has comment: http://stackoverflow.com/comment/42929609
score: -2
has title: How to display number of times a page has been refreshed?
tagged with: mysql
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27225995
has comment: http://stackoverflow.com/comment/42929673
type: UnansweredQuestion

http://stackoverflow.com/a/27211331
answers question: http://stackoverflow.com/q/27211191
has body: Here is how I would solve this problem: areaBox.addFocusListener(generateFocusListener("Area", "Enter Area Name ")); cityBox.addFocusListener(generateFocusListener("City", "Enter City Name ")); FocusListener generateFocusListener(final String title, final String text) { return new FocusListener(){ @Override @Deprecated public void onFocus(Widget widget) { // initial focus happens here TextBox box = (TextBox) widget; box.setTitle(title); } @Override public void onLostFocus(Widget widget) { // Focus is lost for the first time TextBox box = (TextBox) widget; if(box.getText().length() &gt;= 4 ) { box.setStyleName("gwt-TextBox-Success"); // Change focus listener so that now once pressed it resets box.addFocusListener(new FocusListener(){ @Override @Deprecated public void onFocus(Widget widget) { TextBox box = (TextBox) widget; box.setText(null); box.setStyleName("gwt-TextBox-AE"); } @Override @Deprecated public void onLostFocus(Widget widget) { TextBox box = (TextBox) widget; if(box.getText().length() &gt;= 4 ) { box.setStyleName("gwt-TextBox-Success"); } else { box.setStyleName("gwt-TextBox-Error"); box.setText(text); } } }); } else { box.setStyleName("gwt-TextBox-Error"); box.setText(text); } } }; }
has comment: http://stackoverflow.com/comment/42910700
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/42910407
type: Answer
accepted answer of: http://stackoverflow.com/q/27211191

http://stackoverflow.com/a/27257468
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/27257291
downvote count: 1
answers question: http://stackoverflow.com/q/27257291
type: AcceptedAnswer
has body: This is a pretty common way of handling these. Having a shorthand helper is not as useful, as it defeats the purpose of having a namespaced constant.
upvote count: 2

http://stackoverflow.com/comment/42942191
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27223096
score: 0
has text: Looks like you got some good explanations [on the user group](https://groups.google.com/forum/#!topic/dc-js-user-group/zBiRLM1yzEo). Let's continue there.

http://stackoverflow.com/a/27246784
has comment: http://stackoverflow.com/comment/42968923
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42969246
type: Answer
answers question: http://stackoverflow.com/q/27246596
has comment: http://stackoverflow.com/comment/42969076
has body: Check if the focus event of the whole window or document is triggered when computer comes back from sleep. If its triggered reset your timers from those handlers. if (/*@cc_on!@*/false) { // check for Internet Explorer document.onfocusin = onFocus; document.onfocusout = onBlur; } else { window.onfocus = onFocus; window.onblur = onBlur; }
upvote count: 1

http://stackoverflow.com/a/27293507
answers question: http://stackoverflow.com/q/27293037
type: Answer
score: 0
has body: You problem is the values are not being set for your javascript variables. Below is the test code I created to demonstrate the problem. You can change the values of the myCard2 and the myCard values and you will see the text change inside your div elements. If you are you using an on click event to gather your user input you will have to make sure it sets the javascript variables in order to make your code work. jsfiddle example : http://jsfiddle.net/larryjoelane/u8kf796z/5/ /* test code inserted below*/ //set myCard2 value var myCard2 = 9; //set myCard value var myCard = 8; //set playerChoice value var playerChoice = "higher"; /*end of test code*/ if ((playerChoice == "higher") &amp;&amp; (myCard2 &gt; myCard) || ( playerChoice == "lower") &amp;&amp; (myCard2 &lt; myCard) || ( playerChoice == "equal") &amp;&amp; (myCard2 == myCard)) { document.getElementById("Win").innerHTML = "You Win" } else { document.getElementById("Lost").innerHTML = "You Lose" }

http://stackoverflow.com/q/27170374
answer count: 1
tagged with: jsp
type: AnsweredQuestion
has title: getting jquery fields from a List
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: In the below jsp code the fields are hard code but can i get the fields by using loop from a list which may grow dynamically List list=[userid,firstname,lastname,email]; for every new request this list may grow or shrink dynamically depends on the columns of the table present in database ,so is there any way to get the field name without hard coding.. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
tagged with: jquery-pagination
tagged with: javascript
has answer: http://stackoverflow.com/a/27915735
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27915735
score: 0

http://stackoverflow.com/q/27280987
has title: Javascript show times to next 15 minute intervals
accepted answer: http://stackoverflow.com/a/27282203
tagged with: javascript
has answer: http://stackoverflow.com/a/27281629
score: 0
has answer: http://stackoverflow.com/a/27282203
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27281629
has body: I am displaying data and showing the times for a tasklist according to 15 minutes interval. actually want to show to the next 15, so that if the time now is 3.23 pm, I want the next time to show as 3.45pm not 3.38pm, then after 3.45 we would show 4.00pm <% var date = new Date(); for(var i=1 ;i<=4;i++) { var d2 = new Date ( date ); d2.setMinutes ( date.getMinutes() + 15*i ); var hour = d2.getHours() % 12; var min = d2.getMinutes(); var seprater=":"; %> <%=hour+seprater+min%> <% <!-- <%=hour+seprater+min+15%> <%=hour+seprater+min+15%> <%=hour+seprater+min+15%> -->
type: Question
answer count: 2

http://stackoverflow.com/a/31507074
answers question: http://stackoverflow.com/q/27183056
type: Answer
has body: This problem was solved by simply passing a hidden field.
score: 0

safari
tags question: http://stackoverflow.com/q/27159235
tags question: http://stackoverflow.com/q/27235902
tags question: http://stackoverflow.com/q/27299576
tags question: http://stackoverflow.com/q/27172528
tags question: http://stackoverflow.com/q/27239976
tags question: http://stackoverflow.com/q/27267371
tags question: http://stackoverflow.com/q/27184544
tags question: http://stackoverflow.com/q/27258851
type: Tag
tags question: http://stackoverflow.com/q/27269519
tags question: http://stackoverflow.com/q/27220569
tags question: http://stackoverflow.com/q/27299435
tags question: http://stackoverflow.com/q/27240969
tags question: http://stackoverflow.com/q/27204122
tags question: http://stackoverflow.com/q/27274485
tags question: http://stackoverflow.com/q/27251992
tag name: safari

bookmarklet
tags question: http://stackoverflow.com/q/27200536
type: Tag
tag name: bookmarklet

http://stackoverflow.com/comment/42861444
comment on: http://stackoverflow.com/q/27187097
type: QuestionComment
type: Comment
score: 1
has text: Best guess - make a sprite image containing all your icons and click states, onclick just modify position. In case this is not possible (because of responsive images) write all images directly, hide on state via CSS and modify this when clicking.

http://stackoverflow.com/a/27220477
accepted answer of: http://stackoverflow.com/q/27220433
has comment: http://stackoverflow.com/comment/42920214
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27220433
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/42920017
upvote count: 1
has body: Assuming that fn should be the file name. You need to replace: "files": {fn: {"content": content }}} with "files": files where var files = {}; files[filename] = {"content": content}; as keys in object literals can't be the value of a variable. In the old code the file name always ends up being fn. For clarification here is the whole code with the proposed changes: var fn = "textfile.txt"; function createGist(token,content,description,shopName,filename){ var files = {}; files[filename] = {"content": content}; $.ajax({ url: 'https://api.github.com/gists', type: 'POST', beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "token " + token); }, data: JSON.stringify({"description": description,"public": false,"files": files}) }).done(function(response) { console.log(response); GM_setValue(shopName,response.id); }); }
has comment: http://stackoverflow.com/comment/42920120

http://stackoverflow.com/a/27312991
upvote count: 2
answers question: http://stackoverflow.com/q/27312862
type: Answer
has body: One solution is to check if value is empty inside an iterator like: $("#findEmpty").on("click", function() { var count = 0; $(":file[name='archivos[]']").each(function() { if (this.value == "") { count++; } }); alert(count); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="file" name="archivos[]" /&gt; &lt;input type="file" name="archivos[]" /&gt; &lt;input type="file" name="archivos[]" /&gt; &lt;input type="file" name="archivos[]" /&gt; &lt;input type="file" name="archivos[]" /&gt; &lt;input type="file" name="archivos[]" /&gt; &lt;input type='button' value='Check Empty' id='findEmpty' /&gt;
score: 2
has comment: http://stackoverflow.com/comment/43086373
downvote count: 0
has comment: http://stackoverflow.com/comment/43086313

firefox-addon-sdk
tags question: http://stackoverflow.com/q/27202769
type: Tag
tags question: http://stackoverflow.com/q/27222217
tag name: firefox-addon-sdk
tags question: http://stackoverflow.com/q/27203970
tags question: http://stackoverflow.com/q/27196064
tags question: http://stackoverflow.com/q/27273984
tags question: http://stackoverflow.com/q/27215496
tags question: http://stackoverflow.com/q/27202170
tags question: http://stackoverflow.com/q/27310608
tags question: http://stackoverflow.com/q/27285354
tags question: http://stackoverflow.com/q/27236431
tags question: http://stackoverflow.com/q/27241400
tags question: http://stackoverflow.com/q/27262373

http://stackoverflow.com/a/27179577
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27178983
answers question: http://stackoverflow.com/q/27178983
score: 1
upvote count: 1
has body: According to the query you gave, I thought it could be rewrite as following: var notificationQuery = new Parse.Query('myBadges'); notificationQuery.equalTo('B_Notify', 'Unread'); notificationQuery.equalTo('SentTo', Parse.User.current()); notificationQuery.include(['SentTo', 'uploadedBy']); notificationQuery.find({ ...

http://stackoverflow.com/comment/42913359
type: Comment
comment on: http://stackoverflow.com/a/27216734
score: 0
type: AnswerComment
has text: No problem. Have fun coding!

http://stackoverflow.com/a/27210009
has comment: http://stackoverflow.com/comment/42901865
type: Answer
accepted answer of: http://stackoverflow.com/q/27209784
has comment: http://stackoverflow.com/comment/42901921
answers question: http://stackoverflow.com/q/27209784
upvote count: 5
has body: Your answer is close, but not quite right. replace doesn't change the original string; it creates a new one. So you need to create a variable to hold the new string, and call parseFloat on that. Here's the fixed code: function parseFloatIgnoreCommas(number) { var numberNoCommas = number.replace(/,/g, ''); return parseFloat(numberNoCommas); } I also renamed the function to parseFloatIgnoreCommas, which better describes what it does.
score: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42975387
score: 3
has text: `"I've copied/pasted accepted solutions"` - That's often not a very good way of writing software. `"and always come up with a parser error"` - And that error would be... what, exactly?
comment on: http://stackoverflow.com/q/27250655
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27263530
type: Question
tagged with: javascript
has body: I've taken on a project to retrieve as many photos from a given Android device (using Cordova) and make them available to my application. I'm using the following code with a few variations to find the most logical places for photos to reside: var path = "sdcard/DCIM/Camera"; function gotDir(directory) { var directoryReader = directory.createReader(); directoryReader.readEntries(function (entries) { var i; for (i = 0; i &lt; entries.length; i++) { console.log(entries[i].name); } }); }; function gotFS(fileSystem) { fileSystem.root.getDirectory(path, {}, gotDir, function(e){console.log(e)}) } window.requestFileSystem(0-9, 0, gotFS, function(e){console.log(e)}) Where most examples use LocalFileSystem.Persistent in place of where I have "0-9", I noticed that that just returns an int, so I started running this same code only changing the number to see what the root level paths were available in the entries object. I discovered that 6 and 9 were the most promising on Android, with caveats and many variables. On my Note 4, photos were available on FileSystem(9,...) for both internal and SD external storage at: storage/emulated/0/DCIM/Camera and storage/extSdCard/DCIM/Camera However running this in different simulators, the default simulator didn't have a FileSystem(9,...), only 6, and the Nexus 5 simulator had a FileSystem(9,...) but the path was DCIM/and100. It'd be great if someone could help this post by providing a definitive solution to retrieving a list of all photos on Android, regardless of device or manufacturer.
downvote count: 0
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
tagged with: android
answer count: 0
has title: Ultimate Guide for Retrieving ALL Photos and Videos on Android
score: 1
upvote count: 1

charts
tags question: http://stackoverflow.com/q/27229034
tags question: http://stackoverflow.com/q/27242770
tags question: http://stackoverflow.com/q/27284920
tags question: http://stackoverflow.com/q/27275576
tags question: http://stackoverflow.com/q/27309322
tags question: http://stackoverflow.com/q/27296823
tags question: http://stackoverflow.com/q/27270313
type: Tag
tags question: http://stackoverflow.com/q/27228750
tags question: http://stackoverflow.com/q/27223053
tags question: http://stackoverflow.com/q/27158465
tags question: http://stackoverflow.com/q/27275505
tag name: charts
tags question: http://stackoverflow.com/q/27171687
tags question: http://stackoverflow.com/q/27290587
tags question: http://stackoverflow.com/q/27216331
tags question: http://stackoverflow.com/q/27282731

http://stackoverflow.com/a/27214876
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27214788
has body: This should do it : $(".entry").on('dblclick', function(e) { e.preventDefault(); // Get the statement into the edit box at the top $("#statement").val($('.entry-text', e.currentTarget).text()); } $('.entry-text', e.currentTarget) selects all elements with entry-text class within e.currentTarget element and then calls .text() on it. Sources : .text() $(selector, context)
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27214788

http://stackoverflow.com/q/27243406
has answer: http://stackoverflow.com/a/27243502
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 3
has body: $(document).ready(function () { var j = jQuery.noConflict(); j('.refresh').click(refreshDiv); j('.refresh').css({ color: "" }); function refreshDiv() { j.ajax({ url: "refresh.php", cache: true, success: function (html) { j(".refresh").html(html); } }); } }); I have this code ,but I am confused how to display that div gets refreshed.Please provide me some code or links to refer.I am making site in which I want to update the score when I refresh the div using ajax.
has answer: http://stackoverflow.com/a/27243504
has answer: http://stackoverflow.com/a/27243430
type: UnansweredQuestion
score: 0
has title: when I click on the div that div should get refreshed and refreshed data should be displayed
tagged with: php

http://stackoverflow.com/q/27294168
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43166963
tagged with: post
type: Question
has body: How to send Post request with FormData() in IE 10.0.9200 ? Html Code: Submit Reset Javascript Code: Send Form Data for image upload and after submit post a image to server, please help me for how to handle formdata() and post request for IE 10.0.9200. var fd = new FormData($form.get(0)); deferred = $.ajax({ url: submit_url, type: $form.attr('method'), processData: false, contentType: false, dataType: 'json', data: fd, xhr: function() { var req = $.ajaxSettings.xhr(); if (req && req.upload) { req.upload.addEventListener('progress', function(e) { if(e.lengthComputable) { var done = e.loaded || e.position, total = e.total || e.totalSize; var percent = parseInt((done/total)*100) + '%'; //percentage of uploaded file } }, false); } return req; }, beforeSend : function() { }, success : function() { } })
linked to: http://stackoverflow.com/q/14948797
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/43053235
upvote count: 1
answer count: 1
tagged with: form-data
favorite count: 0
has comment: http://stackoverflow.com/comment/43169116
has comment: http://stackoverflow.com/comment/44034537
has answer: http://stackoverflow.com/a/60356528
accepted answer: http://stackoverflow.com/a/60356528
has title: How to send Post request in IE 10?

http://stackoverflow.com/q/27274288
has answer: http://stackoverflow.com/a/27274415
favorite count: 0
has answer: http://stackoverflow.com/a/27275719
has title: My "Hello World" Angular JS is not working
answer count: 9
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/43425571
score: 3
tagged with: hello.js
has answer: http://stackoverflow.com/a/27274344
downvote count: 1
has answer: http://stackoverflow.com/a/27274782
type: Question
has comment: http://stackoverflow.com/comment/43018775
has answer: http://stackoverflow.com/a/27887783
tagged with: javascript
has answer: http://stackoverflow.com/a/27274386
has body: I have been following a tutorial to learn Angular js, and i am using Web Storm 9.0.1. I have simply created a Html page and loaded the Angular.js file to the project. this is my simple code: Hello World {{helloMessage}} But all i get when i run the page is :{{helloMessage}} as a header 1 ! What should i do ? what i am missing here ?
has answer: http://stackoverflow.com/a/27274378
tagged with: webstorm
has comment: http://stackoverflow.com/comment/43017913
upvote count: 4
has answer: http://stackoverflow.com/a/27274350

http://stackoverflow.com/a/27293226
score: 0
has body: You can't compare strings like this. Use: $hour = dt.getHours(); and then: if ($hour &gt; 10) { .. } etc.
type: Answer
answers question: http://stackoverflow.com/q/27293107

http://stackoverflow.com/comment/42803492
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27154233
has text: @Martin - I've already demonstrated the ability to use getters and setters. See my notice. I didn't see anything about value implementation in your link
score: 0

http://stackoverflow.com/q/27302568
answer count: 2
has comment: http://stackoverflow.com/comment/45252055
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/56733213
has answer: http://stackoverflow.com/a/37196255
tagged with: cordova
downvote count: 0
type: UnansweredQuestion
score: 11
upvote count: 11
has body: I'm wondering which would be better practice. Polluting the global namespace with global variables for intra-session persistence or using localStorage instead? So in other words set a global variable on launch, change its value in a function when required and reference it in a third function, or use localStorage.setItem then localStorage.removeItem when the value is no longer needed? Will doing either one increase memory efficiency?
type: Question
has title: Global variables VS localStorage in web app and memory issues

http://stackoverflow.com/comment/42880610
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27197822
has text: Instead or writing such a long comment you could suggest few sites?
score: 0

http://stackoverflow.com/q/27221604
downvote count: 0
accepted answer: http://stackoverflow.com/a/27221694
has comment: http://stackoverflow.com/comment/44893582
has comment: http://stackoverflow.com/comment/44930932
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27221694
tagged with: dom
score: 9
has title: Is it possible to make HTML element attributes immutable?
has body: If I want to make a javascript object's properties immutable, I can use Object methods such as defineProperties(), defineProperty(), and freeze(). My question is, how can I do the same with HTML element attributes? I've already tried the aforementioned methods, and while they can be used to prevent an element's properties from being set directly (e.g. elem.id = 'foo';), as expected, the underlying attributes can still be changed via setAttribute(). An answer of "no, it's not possible" would be acceptable, but I haven't come across any definitive statement to that effect yet.
has comment: http://stackoverflow.com/comment/42934158
has comment: http://stackoverflow.com/comment/42936110
answer count: 1
has comment: http://stackoverflow.com/comment/42934453
tagged with: javascript
has comment: http://stackoverflow.com/comment/42922071
favorite count: 0
has comment: http://stackoverflow.com/comment/42922102
upvote count: 9
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42922979
tagged with: immutability
has comment: http://stackoverflow.com/comment/42922064

http://stackoverflow.com/comment/43019745
type: QuestionComment
comment on: http://stackoverflow.com/q/27275214
score: 0
has text: The output of the first should be `hello \& 100\%` (http://jsfiddle.net/251obLmx/) if you see \\ is it an artifact of the console trying to be helpful?
type: Comment

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/27157350
tag name: knockout-components

http://stackoverflow.com/a/27165082
has comment: http://stackoverflow.com/comment/42823155
upvote count: 22
downvote count: 0
has body: This issues is may due to the cordova whitelist permission issue. You can specify the access in your Config.xml file like &lt;access origin="tel:*" launch-external="yes" /&gt; In Cordova 3.6.3 update there are some security update. The security fixes involves creating a new whitelist for non http/s protocols. If your application uses other protocols besides http:// and https://, such as sms:, mailto:, geo:, etc., then you will need to make some configuration changes to add these protocols to the whitelist. &lt;access origin="tel:*" launch-external="yes"/&gt; &lt;access origin="geo:*" launch-external="yes"/&gt; &lt;access origin="mailto:*" launch-external="yes"/&gt; &lt;access origin="sms:*" launch-external="yes"/&gt; &lt;access origin="market:*" launch-external="yes"/&gt; add these following to your Config.xml Just read more Cordova-Android Security Update
accepted answer of: http://stackoverflow.com/q/27164715
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27164715
score: 22
type: Answer

http://stackoverflow.com/a/27264657
type: Answer
answers question: http://stackoverflow.com/q/27264519
has body: try to leave a generic, unnamed (anonymous) function.. setInterval(function () { alert("ok"); }, 500);
score: 0

column-chooser
type: Tag
tag name: column-chooser
tags question: http://stackoverflow.com/q/27189355

http://stackoverflow.com/comment/43003369
has text: Well thank you for trying to help, but it seems it doesn't make the spilliter move back to the middle when the screen is re-sizing
comment on: http://stackoverflow.com/a/27253547
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/27240442
has comment: http://stackoverflow.com/comment/42957533
type: Question
score: 1
has answer: http://stackoverflow.com/a/27240605
accepted answer: http://stackoverflow.com/a/27240605
upvote count: 1
has comment: http://stackoverflow.com/comment/42957449
answer count: 1
has comment: http://stackoverflow.com/comment/42957483
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: It may be obvious I'm very new to web development. Anyway, I'm trying to create a click event on a div and change its background color. But I want the background to change back to its original color after the click up. Here is what I have: jQuery: $('.details1').click(function() { $(this).toggleClass('on').delay(200).toggleClass('on'); }); css: div.on { background: #F78181; } I don't exactly want a millisecond delay, that's just for debugging. Just want to change background on click down and up. Thanks.
has title: jQuery: click indicator on div
linked to: http://stackoverflow.com/q/4544126
tagged with: css
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42957458
has comment: http://stackoverflow.com/comment/42957433

http://stackoverflow.com/q/27297741
answer count: 0
has comment: http://stackoverflow.com/comment/43079177
type: Question
tagged with: javascript
has body: I've been trying to do this for a project and i failed on every try. The image says it all. The idea is to create a script to: Select Start Point and Ending Point elements. Move "bee" between this 2 elements in a certain time when the function is called. I can't post images :/ here's the link http://i59.tinypic.com/swakav.png
score: 0
tagged with: curves
has comment: http://stackoverflow.com/comment/43059859
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
has title: Animate an element to move between 2 elements in a dynamically created curved path

http://stackoverflow.com/a/27254253
score: 0
has body: So, for my answer, I've done some major code-cleanup for you along with providing the additional event handlers necessary to make the table cells clickable (at the end of the JavaScript snippet). I hope that you use this code as a learning tool to improve your own JavaScript ability, and not just take it to use in this one project. // This is an unchanged function that was in the original CodePen provided, that I'm assuming was "borrowed" from elsewhere since you're not familiar with loops. function getRandom() { var nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]; var gen_nums = []; function in_array(array, el) { for (var i = 0 ; i < array.length; i++) if (array[i] == el) return true; return false; } function get_rand(array) { var rand = array[Math.floor(Math.random() * array.length)]; if (!in_array(gen_nums, rand)) { gen_nums.push(rand); return rand; } return get_rand(array); } for (var i = 0; i < 9; i++) { return (get_rand(nums)); } } // EDIT: This acts like a "Dictionary" for your words. Each array must contain exactly 9 words var words = [ { word: "Fruits A-B", array: ["Apple", "Apricot", "Avacado", "Banana", "Breadfruit", "Bilberry", "Blackberry", "Blackcurrant", "Blueberry"] }, { word: "Fruits B-C", array: ["Boysenberry", "Cantaloupe", "Currant", "Cherry", "Cherimoya", "Cloudberry", "Coconut", "Cranberry", "Cucumber"] }, { word: "Fruits D-G", array: ["Damson", "Date", "Dragonfruit", "Durian", "Eggplant", "Elderberry", "Feijoa", "Fig", "Goji berry"] }, { word: "Fruits G-K", array: ["Gooseberry", "Grape", "Grapefruit", "Guava", "Huckleberry", "Honeydew", "Jackfruit", "Jambul", "Kiwi fruit"] }, { word: "Fruits K-M", array: ["Kumquat", "Lemon", "Lime", "Loquat", "Lychee", "Mango", "Marion berry", "Melon", "Miracle fruit"] }, { word: "Fruits M-P", array: ["Mulberry", "Nectarine", "Nut", "Olive", "Orange", "Papaya", "Passionfruit", "Peach", "Pepper"] }, { word: "Fruits P-Q", array: ["Pear", "Persimmon", "Physalis", "Plum", "Pineapple", "Pomegranate", "Pomelo", "Purple Mangostee…
has comment: http://stackoverflow.com/comment/43031360
has comment: http://stackoverflow.com/comment/43031409
has comment: http://stackoverflow.com/comment/43030779
has comment: http://stackoverflow.com/comment/42988436
has comment: http://stackoverflow.com/comment/43027670
has comment: http://stackoverflow.com/comment/43027530
answers question: http://stackoverflow.com/q/27253037
has comment: http://stackoverflow.com/comment/43019073
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27253037
has comment: http://stackoverflow.com/comment/43019000
has comment: http://stackoverflow.com/comment/43024901
has comment: http://stackoverflow.com/comment/43031094
has comment: http://stackoverflow.com/comment/42988964
type: Answer
has comment: http://stackoverflow.com/comment/43025178
has comment: http://stackoverflow.com/comment/43022006

http://stackoverflow.com/comment/42991102
type: Comment
comment on: http://stackoverflow.com/a/27258549
has text: Still doesn't look good. This is the HTML that is generated:
score: 0
type: AnswerComment

http://stackoverflow.com/q/27308034
score: 3
upvote count: 3
tagged with: authentication
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43195191
has answer: http://stackoverflow.com/a/27433478
has comment: http://stackoverflow.com/comment/43312086
has comment: http://stackoverflow.com/comment/43192652
has body: Currently I'm implementing ng-token-auth into my Angular application, while this works great, I'm having some trouble with restricting access to certain pages. In some of my routes I have a couple of extra parameters: data: { title: 'Dashboard', restricted: true, // Only allow logged in users role: 2 // Only allow a specific role } I'm doing this checking login in $stateChangeStart, so before I switch routes, I can check if the user is allowed to that route. I followed the ng-token-auth suggestions about using a parent route with a resolve to check if a user is logged in or not: resolve: { auth: function($auth) { console.log('validate user'); return $auth.validateUser(); } } Now the problem comes when I first load up the application, obviously the $stateChangeStart event is fired before the $auth.validateUser() has been resolved, because of that the login inside the $stateChangeStart fails and the user is redirected to the login page. What would be the better way of implementing this "permissions logic", I don't want to do it per route, as that would add in a lot of extra work and code. Doing it in the $stateChangeStart also doesn't seem to be the best options as that doesn't work on first load.
has title: ng-token-auth and route permissions
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43192912
linked to: http://stackoverflow.com/q/22537311

http://stackoverflow.com/comment/118113623
type: AnswerComment
type: Comment
has text: Thank you for your answer but I can't see how this is solving the problem. Your ternary statement will always set "parentId" to "parentId".
comment on: http://stackoverflow.com/a/66817250
score: 0

http://stackoverflow.com/q/27207999
tagged with: html-parsing
type: Question
has answer: http://stackoverflow.com/a/27208127
has answer: http://stackoverflow.com/a/27208269
has body: I have array as shown below: ["↵", "Oh", "yeah,", "did", "we", "mention", "it’s", "free?↵"] Is there a way I can remove that ↵ from the string and from the array? I tried str.replace(/(\r\n|\n|\r)/gm,""); This didn't help.
tagged with: javascript
has title: Removing return carriage from an array - Javascript
has comment: http://stackoverflow.com/comment/42898033
has comment: http://stackoverflow.com/comment/42898062
answer count: 3
score: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/27208127
favorite count: 0
has comment: http://stackoverflow.com/comment/42898079
upvote count: 2
has comment: http://stackoverflow.com/comment/42898032
linked to: http://stackoverflow.com/q/7142890
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27208094
has answer: http://stackoverflow.com/a/27208094

http://stackoverflow.com/a/27230582
type: Answer
answers question: http://stackoverflow.com/q/27230543
has comment: http://stackoverflow.com/comment/42938695
has comment: http://stackoverflow.com/comment/42938385
score: 2
has body: Change this: var $changeicon= $("down"); to this: var $changeicon= $("#down"); You've just forget a # sign, and there will be nothing in $changeicon. Update: You have also a missing: }); to close the header ready section. So the jQuery should like this: $(function() { $("#header").ready(function() { $("#logo").hide(); $("#header").click(function() { $("#logo").slideToggle("slow"); }); }); $("#down").click(function() { var $changeicon = $("#down"); if ($changeicon.hasclass("glyphicon-chevron-down")) { $changeicon.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); } else { $changeicon.removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down"); } }); });
upvote count: 3
has comment: http://stackoverflow.com/comment/42939113
downvote count: 1
has comment: http://stackoverflow.com/comment/42939567
has comment: http://stackoverflow.com/comment/42938918

http://stackoverflow.com/a/27176500
score: 2
has body: Before the ajax query add this : $('idOfYourLoader').fadeIn(); In the end of success/error part of the ajax query add this : $('idOfYourLoader').fadeOut();
answers question: http://stackoverflow.com/q/27176476
downvote count: 0
has comment: http://stackoverflow.com/comment/42843480
upvote count: 2
type: Answer

http://stackoverflow.com/q/27160485
linked to: http://stackoverflow.com/q/14419651
possible better answer: http://stackoverflow.com/a/27176087
linked to: http://stackoverflow.com/q/27141439
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27176549
accepted answer: http://stackoverflow.com/a/27176549
tagged with: javascript
has comment: http://stackoverflow.com/comment/42841603
has body: is there a simple way to apply a filter to a input? i've found some examples, but all sounds like a Macgyver solution for me. My form is defined dynamically, and when the input type is date, i need to convert date value from 2000-01-01T02:00:00.000Z to mm/dd/yyyy. &lt;form role="form"&gt; &lt;div ng-repeat="fld in grid.columns"&gt; &lt;label&gt;{{fld.label}}&lt;/label&gt; &lt;input type="text" ng-model="grid.currentRecord[fld.name]"&gt; &lt;/div&gt; &lt;/form&gt; I could not use that suggestion in my case: (filters on ng-model in an input) anybody help me, plese?
has comment: http://stackoverflow.com/comment/42815728
has answer: http://stackoverflow.com/a/27176087
has title: angularjs - input filter
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/a/27312927
has body: check this please make position of #wrapper to relative .hidestuff { //display: none; } #wrapper { margin-left:auto; margin-right:auto; width: 445px; position:relative; } http://jsfiddle.net/rut2/cvp6eg0t/6/
score: 0
has comment: http://stackoverflow.com/comment/43089741
answers question: http://stackoverflow.com/q/27312208
type: Answer

http://stackoverflow.com/comment/42850115
comment on: http://stackoverflow.com/q/27180800
has text: Edit your question to add a snippet of what you tried.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43050075
type: Comment
comment on: http://stackoverflow.com/a/27292041
has text: Excellent, thanks for the code help, just what I needed :) Do you have any idea how to start the function again? My js knowledge isn't cutting it at the moment :(
type: AnswerComment
score: 0

http://stackoverflow.com/a/27213517
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42909785
has body: You aren't returning anything from query(). Try: app.factory('topicContent', ['$http', function($http){ var query = function() { // HERE!! return $http({ url: "http://www.corsproxy.com/daysof.me/lowyat/thread.php", method: "GET" }); } return { request : function(){ return query(); } } }]);
upvote count: 1
answers question: http://stackoverflow.com/q/27213468

http://stackoverflow.com/a/27221212
has comment: http://stackoverflow.com/comment/42958047
score: 0
answers question: http://stackoverflow.com/q/27221105
has comment: http://stackoverflow.com/comment/42921436
has comment: http://stackoverflow.com/comment/42921420
accepted answer of: http://stackoverflow.com/q/27221105
has comment: http://stackoverflow.com/comment/42921431
type: Answer
has comment: http://stackoverflow.com/comment/42922849
has comment: http://stackoverflow.com/comment/42921509
has body: Use document.querySelectorAll() to loop through all the occurences of a button with a name of "button" and addEventListener()s to them. The buttons can have different values, but it checks for the name only: var linkListener = document.querySelectorAll("button[name='button']"); for (i=0;i<linkListener.length;i++){ linkListener[i].addEventListener("click", linkFunction); } function linkFunction(){ alert("You clicked a button with a \"name\" of \"button\"."); } A button A button A button A button A button A button A button A button A button A button A button A button A button A button
type: AcceptedAnswer

http://stackoverflow.com/comment/42971896
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27248145
has text: After JavaScript rendered the code show this in html: "{{ Form::select("categoria_pai", Variaveis::where("categoria", "=", 1 )-&gt;lists("variavel", "id"), "", array("class" =&gt; "form-control")) }}" You can see the quotes at begin and end like a string and not a php code

http://stackoverflow.com/q/27222800
tagged with: angularjs-ng-include
tagged with: angularjs-ng-touch
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/43088138
has comment: http://stackoverflow.com/comment/43291817
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27428885
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43298849
downvote count: 0
score: 1
has title: How can I use $swipe.bind (ngTouch) on an element inside an ngInclude?
has answer: http://stackoverflow.com/a/27428885
type: Question
has body: I have an element that I use $swipe.bind (from ngTouch) on to connect some event handlers inside a controller constructor: $swipe.bind($(element_selector), {'move': dragMoveHandler}); I moved that element into an ngInclude, but now the controller constructor runs before the ngInclude is processed by Angular, so the $swipe.bind call fails as $(element_selector) is undefined when it executes. I looked into using $includeContentLoaded to detect when the ngInclude has been processed, but it isn't clear which ngInclude has been loaded each time it fires, so my code would need to count the number of includes that have loaded before knowing that it's safe to use $swipe.bind, which doesn't seem like a robust solution. How can I do this?
tagged with: javascript

http://stackoverflow.com/comment/42966074
score: 0
has text: please explain better what you are trying to achieve! I have read your question about 4-5 times and still don't understand what you are actually trying to do.
comment on: http://stackoverflow.com/q/27245152
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43055073
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27294701
has text: for me its not working
score: 0

http://stackoverflow.com/comment/43050745
type: Comment
score: 0
has text: Will work, but pretty heavy. He does not need it if he only create the table at document loading and not adding rows afterwards.
type: AnswerComment
comment on: http://stackoverflow.com/a/27292730

http://stackoverflow.com/q/27265066
score: 0
has answer: http://stackoverflow.com/a/27265190
has answer: http://stackoverflow.com/a/27265119
has answer: http://stackoverflow.com/a/27265599
has answer: http://stackoverflow.com/a/27265166
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27265105
accepted answer: http://stackoverflow.com/a/27265119
has answer: http://stackoverflow.com/a/27265105
type: AnsweredQuestion
has body: I have a working AJAX file that will execute the content in a PHP file. However, if the php is within the function(there are alot of php funtion in a PHP file), how do I call only the function that I want. My AJAX code: $(document).ready(function(){ // use ajax, call the PHP $.ajax({ url: 'postme.php', success: function(response){ $('.result_Postme').text(response); } }) }); one of the function in postme.php PHP file: &lt;?php function echo() { echo 'Text'; } ?&gt; Thanks. EDIT: @Amadan hi, i tried ur method but it doesn't seems to be outputting in the html. My AjAx code: $(document).ready(function(){ // use ajax, call the PHP $.ajax({ url: 'rank.php', data: { action: 'echo' }, success: function(response){ $('.rank_Alibaba').text(response); } }) }); PHP file switch($_REQUEST['action']) { case 'echo': echo "text"; break; } HTML: &lt;td class="rank_Alibaba"&gt;&lt;/td&gt;
tagged with: ajax
has answer: http://stackoverflow.com/a/27265177
type: Question
has title: AJAX function to access PHP function in a PHP file
tagged with: php
answer count: 6

http://stackoverflow.com/comment/42910220
has text: Not work, thank ` `
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27215095
type: AnswerComment

http://stackoverflow.com/comment/42969190
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27246910
has text: `IIFE` - never heard that acronym! +1

http://stackoverflow.com/q/27252750
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
tagged with: qtip2
tagged with: jquery
has answer: http://stackoverflow.com/a/27253622
score: 0
has body: Hi i have a flexigrid to display some data on my site. Each row has a hyperlink that when the user hovers over it brings up a tool tip containing more information. However this only works for the first page on the table, when i change pages the tool tips stop working. I know this is because i use the tool tips in document.ready but i am unsure on how to solved the problem. any help would be appreciated. I've included a fiddle for the tool tips however the table does not have pagination. See fiddle ive included the code below too. This is called in document.ready function tooltip(){ $('#tblOrder tr td a').on('mouseenter', function(event) { var id = $('#tblOrder tr[id*="row"]').attr('id').substr(3); $(this).qtip({ content: { text: 'Loading.....', ajax: { url: '&lt;%=Url.Action("Alarms") %&gt;', type: 'POST', data: {id: id}, success: function (data, status) { this.set('content.text', data); }, error: function (xhr) { console.log(xhr.responseText); } } }, show: { event: event.type, ready: true, effect: function () { $(this).slideDown(); } }, hide: { effect: function () { $(this).slideUp(); } } }, event); }); };
accepted answer: http://stackoverflow.com/a/27253622
has comment: http://stackoverflow.com/comment/42979728
tagged with: flexigrid
has title: tooltips only on first page of table

http://stackoverflow.com/a/27204579
upvote count: 2
has comment: http://stackoverflow.com/comment/42891953
downvote count: 0
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42893668
has body: how does one define a document? Generally speaking. You don't. JavaScript running in a browser, in a webpage will have a document object supplied by the environment. WebStorm is an IDE with for Node.JS, and you appear to be using the Node.js end of it to get your "document is not defined" result. There are implementations of DOM which would give you such an object there, but your code is clearly trying to run in a webpage, so that isn't a route you should be looking down. Your problem is that you are setting the foreground color, and you don't have any text to change the colour of. You should be looking at the backgroundColor property instead.
answers question: http://stackoverflow.com/q/27204553

http://stackoverflow.com/q/27218756
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27218769
has title: Resize image to fill div
score: 0
has body: I have the following function to resize an image to fill its container div without skewing the image. It uses css to fill by height and if the image is not wide enough to fill the div then the function uses width to fill the div and sets height to auto. The problem is the code only works with window.load, so if the user is paying attention they can see the image load, then after a second it changes. So how would I change the function to work with document.ready? function imageResize() { $(".square").each(function(){ if($("img",this).width() &lt; $(this).width()){ $("img",this).css("height", "auto"); $("img",this).css("width", "100%"); } }); } Edit: The problem with using document.ready with the current function is if the image is to big, the document is "ready" before the image has loaded. So my guess to fixing this is getting the length and width of the actual image from the file, before the image has to load on the page.
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/q/27172988
tagged with: asp.net
has title: the browser saved my javascript function name and buged my site
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42836383
tagged with: vb.net
type: Question
accepted answer: http://stackoverflow.com/a/27173367
tagged with: caching
has body: Hello guys today i spent half the day trying to figure out why my website went crazy , i finnaly managed to figure out and now i am wondering what can i do to prevent this in the future. Here is what happened : I got a simple JS file function standardAlert( ) { grid1.save() window.alert( "The information has been saved!" ) } Now today i been doing some changes on the site and i also added another function with a different name that shows a different window.alert From that moment on every time i clicked my save button i had this error on my error log : "Invalid postback or callback argument. Event validation is enabled using in configuration or &lt;%@ Page EnableEventValidation="true" %> in a page...." I been going crazy.. checking old backups changing back and forth the changes i made today. Eventully few minutes ago i finnaly found out the problem. The browser saved up the old function name and everytime i clicked the save button which had an onclientclick event assosiated with the old function name i got this error. Ofcourse i also uplodaed the different versions of the JS file as well but it didnt matter for the browser! So my question is how can i prevent such things in the future? P.S I also had this with pictures that didnt show up because the browser used the old 1 from his local storage. Forgot to mention that i solved this by clearing out my brows er cache! but what will happen in the future when ppl will be using the site and maybe i will have to change a JS function name again? or maybe a picture? I dont want to have to say to ppl that they need to clear their cache as a solution. I am sure there is something i am missing i am just still very new to this. I am using MS sql server 2000
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27173367
tagged with: javascript

http://stackoverflow.com/a/27263268
has comment: http://stackoverflow.com/comment/42999075
downvote count: 0
has comment: http://stackoverflow.com/comment/42998932
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27263071
has body: setImmediate will work better as explained in my blog post setTimeout and Friends as it will allow IO tasks to run before again locking up the main execution thread for a full run of compute. But as the other answers posted suggest, the way to think of this is not "nextTick doesn't work", but perhaps "oops I'm trying to do one of the only things you absolutely must not do in a node.js app and I'm getting the result I was warned about". You can't hog the execution thread in node as it is cooperative multitasking. Break computation into small chunks, use external process helpers, split something off into a supporting C++ library, etc.
has comment: http://stackoverflow.com/comment/42999335

http://stackoverflow.com/comment/42841422
has text: The HTML of the page would come in handy as placement of the first script block is important (as it is not in a DOM ready handler like the second script).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27175996

http://stackoverflow.com/q/27191614
linked to: http://stackoverflow.com/q/5767325
has comment: http://stackoverflow.com/comment/42870858
has comment: http://stackoverflow.com/comment/42869270
tagged with: angularjs
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42869263
has answer: http://stackoverflow.com/a/27191790
tagged with: javascript
has comment: http://stackoverflow.com/comment/42871204
has body: So, I'm trying to delete from an array if it's element value isn't equal to a value that I specified: Code: http://pastebin.com/hUc3mVLv $scope.enablePVR = function() { for (i = 0; i &lt; $scope.new_epg.length; i++) { start_time = convert_time($scope.new_epg[i].start); $scope.new_epg[i].title = $scope.new_epg[i].title.replace(/&lt;(?:.|\n)*?&gt;/gm, ''); $scope.new_epg[i].description = ""; $scope.new_epg[i].time = start_time; } archiveEPG = []; for(var i=0; i&lt;archiveEPG.length; i++) { var e = document.getElementById("dateSelect"); if($scope.new_epg[i].start.split(" ")[0] == e[e.selectedIndex].value) { archiveEPG[archiveEPG.length+1] = $scope.new_epg[i]; } } document.getElementById("dateSelect").remove(0); $scope.get_epg(null, true, archiveEPG); }
has comment: http://stackoverflow.com/comment/42869097
has comment: http://stackoverflow.com/comment/42869204
score: 0
has title: Deleting from an array doesn't work
has comment: http://stackoverflow.com/comment/42874955
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/q/27262373
has answer: http://stackoverflow.com/a/27262948
tagged with: asynchronous
tagged with: firefox-addon-sdk
favorite count: 0
tagged with: promise
tagged with: generator
has comment: http://stackoverflow.com/comment/43035372
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27262948
has title: Using generators + promises to do "simulated synchronous" communication in/with a Firefox SDK add-on
type: Question
score: 9
answer count: 2
upvote count: 9
downvote count: 0
has body: TL;DR: Is there any way to rewrite this callback-based JavaScript code to use promises and generators instead? Background I have a Firefox extension written using the Firefox Add-on SDK. As usual for the SDK, the code is split into an add-on script and a content script. The two scripts have different kinds of privileges: add-on scripts can do fancy things such as, for example, calling native code through the js-ctypes interface, while content scripts can interact with web pages. However, add-on scripts and content scripts can only interact with each other through an asynchronous message-passing interface. I want to be able to call extension code from a user script on an ordinary, unprivileged web page. This can be done using a mechanism called exportFunction that lets one, well, export a function from extension code to user code. So far, so good. However, one can only use exportFunction in a content script, not an add-on script. That would be fine, except that the function I need to export needs to use the aforementioned js-ctypes interface, which can only be done in an add-on script. (Edit: it turns out to not be the case that you can only use exportFunction in a content script. See the comment below.) To get around this, I wrote a "wrapper" function in the content script; this wrapper is the function I actually export via exportFunction. I then have the wrapper function call the "real" function, over in the add-on script, by passing a message to the add-on script. Here's what the content script looks like; it's exporting the function lengthInBytes: // content script function lengthInBytes(arg, callback) { self.port.emit("lengthInBytesCalled", arg); self.port.on("lengthInBytesReturned", function(result) { callback(result); }); } exportFunction(lengthInBytes, unsafeWindow, {defineAs: "lengthInBytes", allowCallbacks: true}); And here's the add-on script, where the "real" version of lengthInBytes is defined. The code here listens for the content script to send it a le…
has answer: http://stackoverflow.com/a/27263086
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27263086

http://stackoverflow.com/comment/42892055
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27204733
has text: Well, you can either set up maven or convert the function by hand (if you don't know JS, find someone who does, it doesn't really matter whether they know AS3, it's close enough that anyone who knows JS should be able to read it). The thing about Telerik is that converting between C# and VB is fairly trivial, since both are based on the .NET platform. When converting from AS3 to JavaScript, you have to deal with the fact that AS3 has a substantially different runtime library.
score: 0

http://stackoverflow.com/comment/42809849
score: 3
comment on: http://stackoverflow.com/q/27157878
type: Comment
has text: in your loops, you are not setting the variables, just adding 1 to them and doing nothing with the result. so you need `guess1 += 1;` et
type: QuestionComment

http://stackoverflow.com/comment/42853252
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27182664
has text: and instead of `.trim()` try using `$.trim()`

http://stackoverflow.com/comment/42923567
score: 0
comment on: http://stackoverflow.com/q/27222458
type: QuestionComment
has text: thanks for the reply, i am a newbie, could you please elaborate? much appreciated
type: Comment

http://stackoverflow.com/comment/42980615
type: QuestionComment
score: 0
has text: @apsillers I swear I already tried `str = str.replace(/&lt;!--(.*?)--&gt;/g, "");`. I guess I made a typo in it because this time around, it works! Thank you!
comment on: http://stackoverflow.com/q/27252880
type: Comment

http://stackoverflow.com/a/27287898
has body: Just a simple solution, by adding delay to your work to give time for all your css styling done before your work starts $(".blockstart").find("span").delay(1000).bigText();
answers question: http://stackoverflow.com/q/27286812
type: Answer
score: 0

http://stackoverflow.com/comment/42925410
type: AnswerComment
type: Comment
has text: Manish Jangir: your code is good and working fine when page get loaded and a option is selected from dropdown option. Same thing is working fine with my code too. My query is can we get the initial selected value defined in select option form on page's first time loading. As i define selected as A Grade
comment on: http://stackoverflow.com/a/27223075
score: 0

http://stackoverflow.com/a/27254417
type: Answer
downvote count: 1
has body: You should separate detection of directions (event.changedTouches[0].pageX, event.pageX) and moving of the object within the page. E.g. making a generic function which handles the moving: function move(x, y) {} and keep the event handler but without page interaction logic. Only detecting input positions and give them to the move(x, y) function.
accepted answer of: http://stackoverflow.com/q/27254249
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27254249
score: 0
upvote count: 1

http://stackoverflow.com/q/27295415
favorite count: 0
linked to: http://stackoverflow.com/q/20169665
answer count: 3
type: UnansweredQuestion
tagged with: raycasting
tagged with: three.js
upvote count: 5
linked to: http://stackoverflow.com/q/16396874
type: Question
has answer: http://stackoverflow.com/a/27305792
score: 5
has answer: http://stackoverflow.com/a/27312548
has body: Basically what i want to create: I have a 3D map with objects, i want to select all objects that are in the 2D box x1,y1 to x2,y2 on my screen. Any ideas how this has to be done, because i'm clueless on how to start. Thanks in advance! prevX and prevY is coordinate of mouse down: function onDocumentMouseUp(event) { event.preventDefault(); var x = (event.clientX / window.innerWidth) * 2 - 1; var y = -(event.clientY / window.innerHeight) * 2 + 1; var width = (x - prevX); //* window.innerWidth; var height = (y - prevY); //* window.innerHeight; var dx = prevX; //* window.innerWidth; var dy = prevY; //* window.innerHeight; console.log( dx + ',' + dy + "," + (dx + width) + "," + (dy + height) + ", width=" + width + ", height=" + height ); var topLeftCorner3D = new THREE.Vector3(dx, dy, 1).unproject( camera); var topRightCorner3D = new THREE.Vector3(dx + width, dy, 1) .unproject(camera); var bottomLeftCorner3D = new THREE.Vector3(dx, dy + height, 1).unproject(camera); var bottomRightCorner3D = new THREE.Vector3(dx + width, dy + height, 1).unproject(camera); var topPlane = new THREE.Plane(); var rightPlane = new THREE.Plane(); var bottomPlane = new THREE.Plane(); var leftPlane = new THREE.Plane(); topPlane.setFromCoplanarPoints(camera.position, topLeftCorner3D, topRightCorner3D); rightPlane.setFromCoplanarPoints(camera.position, topRightCorner3D, bottomRightCorner3D); bottomPlane.setFromCoplanarPoints(camera.position, bottomRightCorner3D, bottomLeftCorner3D); leftPlane.setFromCoplanarPoints(camera.position, bottomLeftCorner3D, topLeftCorner3D); //var frustum = new THREE.Frustum( topPlane, bottomPlane, leftPlane, rightPlane, nearPlane, farPlane); function isObjectInFrustum(object3D) { var sphere = object3D.geometry.boundingSphere; var center = sphere.center; var negRadius = -sphere.radius; if (topPlane.distanceToPoint(center) &lt; negRadius) { return false; } if (bottomPlane.distanceToPoint(center) &lt; negRadius) { return false; } if (rightPlane.distanceToPoint(center) &lt;…
tagged with: intersection
has answer: http://stackoverflow.com/a/37136190
downvote count: 0
tagged with: javascript
has title: Three.js: "select tool" How to detect the intersection of a 2D square and 3D objects

http://stackoverflow.com/q/27246598
upvote count: 2
has comment: http://stackoverflow.com/comment/42968159
answer count: 2
has comment: http://stackoverflow.com/comment/42968220
has title: How to call error function in $.ajax with c# MVC4?
tagged with: c#
has answer: http://stackoverflow.com/a/27246634
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27246737
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27246737
type: Question
accepted answer: http://stackoverflow.com/a/27246634
has body: I have a project in MVC4 with C#. In this project, one of my controllers has a method to be called by an Ajax function: [HttpPost] public string EditPackage(int id, string newPkgName) { try{ //do logic here return "OK"; }catch(Exception exc){ return "An error occurred, please try later! " + exc.Message; } } This method is called by the following Ajax functions, using jQuery: $.ajax({ url: $(this).data('url'), type: 'POST', contentType: 'application/json; charset=utf-8', traditional: true, data: JSON.stringify({ id: id, newPkgName: newPkgName}), success: function () { location.reload(true); successNotification("Package edited successfuly!"); }, error: function (message) { errorNotification(message); } }); The problem with this code, is that even if the server returns the return "An error occurred, please try later! " + exc.Message; message in the catch, the success function is the one always called. In order words, I never run the error function no matter what I do. To fix this I checked the official documentation: http://api.jquery.com/jQuery.ajax/ However, since I am failry new to this I can't understand any of the parameters, nor how to use them effectively. How can I create a good error message with all the possible information using Ajax, jQuery and my controller?
tagged with: asp.net-mvc-4

http://stackoverflow.com/q/27156306
score: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42807231
has answer: http://stackoverflow.com/a/27156608
has title: Finding a specific element tag in angularJS
has answer: http://stackoverflow.com/a/27156466
type: UnansweredQuestion
has body: I'm working with angularJS and would like to remove/modify the class of a specific child element (who's class/id is unknown because it is being added to the parent element dynamically). I understand that using angular you can say something like: angular.element('someknownParentClass').addClass('newClass'); However, I want to do something similar to: angular.element('.someknownParentClass').find('i').addClass('newClass'); The class 'someknownParentClass' is a class assigned to an 'a' tag, and inside this tag, I have an 'i' tag with a glyphicon icon class that I would like to change from inside a specific function. It seems like this method isn't working. I know angular's jqLite has a children() attribute, but i'm a little unsure of how to use this or if it would be useful in this case, or maybe using jQuery with angular would be my best option (from what I understand, that's different than jqLite). Any suggestions?
type: Question
tagged with: jqlite
tagged with: dom
answer count: 2
tagged with: javascript

http://stackoverflow.com/a/27237889
has comment: http://stackoverflow.com/comment/42952482
has body: var checkThese = [prop, trans, queue, proc]; var result = checkTruthinessOf(checkThese); function checkTruthinessOf(things) { var returnValue = false; [].forEach.call(things, function(thing){ if (thing &lt; 0 || thing &gt; 1 || thing == "") returnValue = true; }); return returnValue; };
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/42952383
downvote count: 0
answers question: http://stackoverflow.com/q/27237816
has comment: http://stackoverflow.com/comment/42952575
has comment: http://stackoverflow.com/comment/42952467
type: Answer
has comment: http://stackoverflow.com/comment/42952426
has comment: http://stackoverflow.com/comment/42952679
has comment: http://stackoverflow.com/comment/42952430

http://stackoverflow.com/a/76271473
score: 0
type: Answer
has body: Here's a way //Your string const string = "Hello World" //Splitting string's letters into an array const stringToArray = string.split("") //Creating an empty array where you are going to hold your upperCase indexes const upperCaseIndexes = [] stringToArray.map((letter,index) => { //Checking if the letter is capital and not an empty space if(letter === letter.toUpperCase() && letter != " ") { //Adding the upperCase's index into the array that hold the indexes upperCaseIndexes.push(index) } }) console.log(upperCaseIndexes) //You can use the this array to do something with the upperCase letter //Example let newString; upperCaseIndexes.forEach(e => { stringToArray.splice(e,1, string[e].toLowerCase()) newString = stringToArray.join('') })
has comment: http://stackoverflow.com/comment/134527843
answers question: http://stackoverflow.com/q/27152871

http://stackoverflow.com/a/27274782
score: 2
upvote count: 2
has body: Thanks all, Yes indeed the problem was with the missing ng-app directive. Note: the tutorial i was following missed this point! A working Code: Hello World <!--[if IE]> <![endif]--> {{helloMessage}}
downvote count: 0
answers question: http://stackoverflow.com/q/27274288
type: Answer

http://stackoverflow.com/comment/42940943
type: QuestionComment
comment on: http://stackoverflow.com/q/27231536
score: 0
has text: @victork you got that :) Thanks - You can write this as answer
type: Comment

http://stackoverflow.com/a/27231045
type: Answer
answers question: http://stackoverflow.com/q/27230629
has comment: http://stackoverflow.com/comment/42939304
score: 0
has body: The normal way to achieve this is using JavaScript to update the value in the input elements upon change of the radio buton value. To avoid any changes on the input boxes give them the attribute disabled="disabled". &lt;script type="text/javascript"&gt; function updateDate(newval) { document.getElementById('IDdateFrom').value = newval; &lt;/scirpt&gt; &lt;input type="radio" name="date_selected" value="1d" onchange="updateDate('DATE1d')" checked="checked"/&gt; &lt;input type="radio" name="date_selected" value="1w" onchange="updateDate('DATE1w')"/&gt; &lt;input type="radio" name="date_selected" value="1m" onchange="updateDate('DATE1m')"/&gt; &lt;input type="radio" name="date_selected" value="3m" onchange="updateDate('DATE3m')"/&gt; &lt;imput type="text" name="IDdateFrom" id="IDdateFrom" value="DATE1d" disabled="diabled"&gt;

http://stackoverflow.com/comment/43108959
comment on: http://stackoverflow.com/a/27271790
score: 0
has text: Can I ask you a favorite please please can you comment your code where you coded how to generate the PDF please.Thanks a million
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/43022665
has text: @Mark1ra: yeah, in JS when dealing with Arrays or Array-like objects, it's best to use `for`.
type: Comment
comment on: http://stackoverflow.com/a/27276767
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43083951
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27311436
has text: @Anuket jsBin has his own `Console`, click on the button to open it.

http://stackoverflow.com/comment/43016305
comment on: http://stackoverflow.com/q/27272760
score: 0
type: QuestionComment
type: Comment
has text: This is correct. Only issue is that when you load a CSS via JavaScript it might cause the browser to repaint the document (e.g. when stylesheet specifies a different font on the *body*).

recurly
type: Tag
tag name: recurly
tags question: http://stackoverflow.com/q/27223477

http://stackoverflow.com/a/27225372
answers question: http://stackoverflow.com/q/27225254
type: Answer
score: 0
has body: Once try this... function myFunction() { if(location.reload()) { document.getElementById('urlText').value=""; } } I don't know whether it works or not... But once give it a try... Sorry, if it didn't work...

http://stackoverflow.com/comment/42879259
has text: I've set this up - having bother trying to get it to work tho http://jsfiddle.net/gregsby15/pLg64jmq/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27196942
score: 0

http://stackoverflow.com/q/27220908
upvote count: 3
downvote count: 2
has title: How can I round a float such that there are only two trailing digits after the decimal point?
has answer: http://stackoverflow.com/a/37425022
tagged with: significant-digits
has answer: http://stackoverflow.com/a/27221144
has body: I have a float number like 137.57667565656 but I would like to round it such that there are only two trailing digits after the decimal point like the new float number will be 137.58. I tried this so far: (Math.round((value*100)/100)).toFixed(2).toString(); But unfortunately, it rounds my value to 137.00. It adds the decimals places as zeroes, why? How can I achieve the above?
favorite count: 0
has answer: http://stackoverflow.com/a/37397415
has comment: http://stackoverflow.com/comment/42923349
answer count: 4
type: AnsweredQuestion
score: 1
tagged with: floating-point
type: Question
has comment: http://stackoverflow.com/comment/62354922
possible better answer: http://stackoverflow.com/a/37397415
tagged with: rounding
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27221144
has answer: http://stackoverflow.com/a/27220964

http://stackoverflow.com/q/27261119
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42995321
has title: css transitions not working on firefox
has body: I have a similar issue as CSS Transition not firing when adding class to body (Firefox) but I can seem to find a way to solve it targeting the element in different ways or removing classes. Here is what I have: Markup: &lt;div class="ball b40 first"&gt; &lt;a class="ffx-fx" href="javascript:void(0)"&gt; &lt;/a&gt; &lt;/div&gt; css: .ffx-fx { -webkit-transition: all 1.5s ease-in-out; -moz-transition: all 1.5s ease-in-out; -o-transition: all 1.5s ease-in-out; -ms-transition: all 1.5s ease-in-out; transition: all 1.5s ease-in-out; } .b40 a { width:220px; height:220px; background: url(../images/temp/1_a.jpg) center center; background-size: 100% 100% !important; } .b40 .b40-rotated { width:220px; height:220px; background: url(../images/temp/1_b.jpg) center center !important; } js: window.setInterval(function() { $( ".b40 .ffx-fx" ).toggleClass( "b40-rotated" ); }, 5000);
tagged with: javascript
has answer: http://stackoverflow.com/a/27261467
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42995954
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/24370078
type: Question
tagged with: css

http://stackoverflow.com/a/27232442
score: 1
has body: role is an array not a function. Access the elements of role by using square brackets [] not parenthesis (). for(var j=0;j&lt;role.length;j++){ var ccRole = role[j]; }
upvote count: 1
answers question: http://stackoverflow.com/q/27232381
type: Answer
downvote count: 0

http://stackoverflow.com/q/27262331
tagged with: jquery
has title: jquery get one object in an array as an array
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27262346
has answer: http://stackoverflow.com/a/27262364
has body: With jQuery I can do $('#some_id').find('div').first() or $('#some_id').find('div').last() and get an answer like [ ​something ​] If I do $('#some_id').find('div')[3] I get answer like ​something How do I specify an index in array and get an array just with that object? I would love to do something like $('#some_id').find('div').somefunc(3) and get [ ​something ] I know there is slice(), but I feel like there is some simpler function that I have over looked in my hours of searching. I know there is :nth-child() but again, it feels like there is some other function that I can call the way I call first() or last(). I am trying to chain some functions together to have one line that does what I need. If there is not other ways, then I guess that is fine. I just wanted to make sure. Thanks!
possible better answer: http://stackoverflow.com/a/27262364
has comment: http://stackoverflow.com/comment/42997451
accepted answer: http://stackoverflow.com/a/27262346
type: AnsweredQuestion
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/a/27173570
answers question: http://stackoverflow.com/q/27173412
upvote count: 1
score: 1
downvote count: 0
type: Answer
has body: AngularJS is a framework that is written in and used through JavaScript. Although JavaScript has many object oriented features, it handles inheritance quite differently. This used to be confusing to me too until I read the excellent: JavaScript: The Good Parts by Douglas Crockford. I suggest you read this, it's quite a brief book and points out differences in approach in a very clear and concise manner.

http://stackoverflow.com/a/27155029
has comment: http://stackoverflow.com/comment/42829803
score: 0
type: Answer
has body: Try something like this using JQuery: $(".yes").click(function() { var parentSectionId = $(this).parent(".page").attr('id'); if(parentSectionID == "p1") { $("#p2").hide(); $("#p4").hide(); $("#p3").show(); } if(parentSectionID = "p2") { ... } and so on. Then you handle the no cases in a separate click function, just replacing yes with no.
answers question: http://stackoverflow.com/q/27154861

http://stackoverflow.com/comment/42933238
comment on: http://stackoverflow.com/a/27227726
type: AnswerComment
score: 0
type: Comment
has text: this is what confuses me. your answer seems correct. i walk through it and it seems like it should return results I want. yet when i refresh my page and type in various things to test it, nothing is happening. no green/red box. and JavaScript has no help function

http://stackoverflow.com/comment/42939215
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27231246
has text: + is not only for concatinating, its a mix and JavaScript interpreter decides wether to concatinate or do math operations depending on data-types. However if only one of the both variables is a string a math operation is impossible and it will use concat
type: AnswerComment

http://stackoverflow.com/q/27281645
tagged with: javascript
favorite count: 0
tagged with: meteor
has comment: http://stackoverflow.com/comment/43050554
has body: I've been using Collection2 and Autoform on my Meteor project, made things a lot easier! However, when I remove insecure, it no longer inserts (Autoform submit button). I expected this! However, I've searched and I cannot find the standard way of getting this to work? I have a schema defined in the lib folder, and my Autoform as a quick form in a template.i know I need to either allow client side inserting (which I'd rather not do) or transfer it to server side (perhaps with a method?) Any suggestions would be much appreciated! I'm looking for the standard way of implementing it.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27292800
upvote count: 7
has title: Insert using Autoform with insecure removed
tagged with: meteor-autoform
tagged with: schema
score: 7
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/a/27204805
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27181930
accepted answer of: http://stackoverflow.com/q/27181930
score: 1
upvote count: 1
has body: you need to import the source of bootstrap-table, the jsFiddle example: jsfiddle.net/e3nk137y/147/. Hope to help you.
type: AcceptedAnswer

http://stackoverflow.com/comment/42813179
type: QuestionComment
has text: Is this possible for you to share the HTML sourcecode of the page?
score: 0
comment on: http://stackoverflow.com/q/27155644
type: Comment

http://stackoverflow.com/comment/42992440
has text: IMO, I thought the last manner which has a count column keep updated should workaround, other methods are all inefficient. And also note that it's better to use `increment` operation instead of `set` with a specific count.
comment on: http://stackoverflow.com/q/27255089
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42806568
type: QuestionComment
score: 1
has text: Something tells me you can't, but why not just check `if ( event.clientX < 0 )` to see if it's negative, and if so just return.
comment on: http://stackoverflow.com/q/27156129
type: Comment

http://stackoverflow.com/comment/42885542
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27200121
type: Comment
has text: So you are saying you are getting two windows?Then, one is due to window.open() another is due to form.submit()

http://stackoverflow.com/comment/43044035
comment on: http://stackoverflow.com/a/27281960
score: 0
type: AnswerComment
type: Comment
has text: brilliant! :) Thanks for this. One more small query can I change the colour of bars. if not possible then is it possible for each graph (I mean right now its only one graph and suppose I'll add another graph just below it)

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/27245332

http://stackoverflow.com/comment/43053390
has text: You might be right. So he can use multiple ` `'s with id's. One for each row, and run a script to show them one after the other.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27293949
type: Comment

http://stackoverflow.com/q/27304749
accepted answer: http://stackoverflow.com/a/27307346
type: Question
tagged with: javascript
tagged with: image
score: 0
tagged with: google-maps
answer count: 1
tagged with: jquery
tagged with: asp.net
has body: I need to develop asp.net webApplication from scratch without using google map api, that set location on a map image when user selects any location, and set any image map locator on the current location that user has selected it. More clear, its like google map. I display a map for user and then user selects any location to build his/her house for example, then on mouse leave i set an selector image for that location "like the red arrow on google map", and save the selected image pixels, on Get process of user data i put that image selector on the location user has previously selected. I need any article that could help me on that and tools that can supports me, Thanks.
has title: Get / set a map image mouse location
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27307346

http://stackoverflow.com/q/27188553
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27189446
downvote count: 0
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/27189446
tagged with: reactjs
tagged with: autocomplete
answer count: 1
tagged with: javascript
favorite count: 0
has body: So when using facebook if you enter an @symbol it knows you want to link to a friend/page. Im putting together a UI that allows users to mark up text from ancient documents. What I would like to do is if a user highlights a word or puts an @ # ~ £ symbol before a word it pops up an autosuggest or options dropdown. So if I typed 'This is a document related to @name' when I typed @name it suggests names, or places etc, in fact I will need it to open another modal so you can enter more information about that user/place/item. Im wondering if this is something that can be achieved with ReactJS from the documentation I cant seem to find this functionality out of the box, any pointers greatfully received.
tagged with: php
has title: Autosuggest on input of specific character with ReactJS
score: 2

http://stackoverflow.com/comment/42982595
score: 0
type: Comment
has text: so after it clicks the #add-to-cart, is where i'm stuck, i want to send it to a new url.
type: QuestionComment
comment on: http://stackoverflow.com/q/27254192

http://stackoverflow.com/q/27166448
accepted answer: http://stackoverflow.com/a/27167768
possible better answer: http://stackoverflow.com/a/27166773
type: AnsweredQuestion
score: 0
has title: Saving data into JSON format through Post method
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42825112
type: Question
has body: I am using AngularJS. I want to post the data in a file in JSON format to the localhost server i.e. http://localhost:8080/out.json. How should the post method should be implement for this scenario ? OR Any other working example for the post method which are able to save the data in the json format is helpful. Thanks. Here is my code : var app = angular.module('myApp', []); app.config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.useXDomain = true; delete $httpProvider.defaults.headers.common['X-Requested-With']; } ]); app.controller('FormCtrl', function ($scope, $http) { $scope.data = { firstname: "default" }; $scope.submitForm=function($scope, $http) { $http.post('someurl', JSON.stringify(data)). success(function(data) { console.log(data); }). error(function(data) { console.log(data); }); }; }); First name: Submit
tagged with: javascript
has comment: http://stackoverflow.com/comment/42825091
answer count: 2
has answer: http://stackoverflow.com/a/27167768
has answer: http://stackoverflow.com/a/27166773
tagged with: angularjs

http://stackoverflow.com/comment/42970028
comment on: http://stackoverflow.com/q/27242770
score: 0
type: Comment
has text: OH! sorry,I am using export as like in the fiddle.
type: QuestionComment

http://stackoverflow.com/comment/42822292
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27162564
has text: I just tried reverting to my last commit, but it still doesn't work. I'm wondering if the Busboy library updated or something. I really don't know what to do from here.

http://stackoverflow.com/q/27154626
has answer: http://stackoverflow.com/a/27155420
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/22758599
has title: Replacing a title with position fixed, with another title position fixed
upvote count: 3
has comment: http://stackoverflow.com/comment/42804436
type: Question
score: 3
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27155420
possible better answer: http://stackoverflow.com/a/27157599
has answer: http://stackoverflow.com/a/27157599
answer count: 2
downvote count: 0
tagged with: jquery
has body: So I have a node.js app using express and trying to do the following: div(class="title") h1(class="h1_title") example_title My jQuery for this is as follows: jQuery(function($) { function fixDiv() { var $cache = $('.title'); if ($(window).scrollTop() &gt; 140) $cache.css({'position': 'fixed', 'top': '10px'}); else $cache.css({'position': 'relative', 'top': 'auto'}); } $(window).scroll(fixDiv); fixDiv(); }); So when I scroll the title will become fixed at the top of the page. Got this working, however! I have another title below this, the exact same code. But I'm trying to get my title to replace the previous one and become fixed. So As your scrolling down through content, the title is always fixed but its just being updated with the title relevant to the content your viewing. Can anyone help, I'd really appreciate it. I can't find anything which is what i'm exactly looking for and my knowledge is limited. Thank you!
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/27216412
has comment: http://stackoverflow.com/comment/42914591
type: Question
tagged with: javascript
upvote count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42912801
has body: I'm sending an email as following: Send e-mail to test@host.com I want that the email body will contain multiple lines. Im trying to send the body string as following: strValidStringWithHandlingSpechielChars = "hello" + "%0A" + "I like this."; but in the mail body the string displayed as:"hello" + "%0A" + "I like this." strValidStringWithHandlingSpechielChars = strValidStringWithHandlingSpechielChars.encodeURIComponent(strValidStringWithHandlingSpechielChars); the string displayed as:"hello" + "%0A" + "I like this." strValidStringWithHandlingSpechielChars = strValidStringWithHandlingSpechielChars.Replace("\n", "%0A"); the string displayed as:"hello" + "%0A" + "I like this." In chrome using android devices its not working as showing above, unlike using with safari, in safari each of the lines above works and we get the sentence in 2 separate lines... I need a generic solution for all these kind of chars like !@#$<>% How can i solve it in android too?
type: UnansweredQuestion
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has title: html5 sending an email with speciel charactes doesnt work in chrome from Android devices
answer count: 0
score: 1

http://stackoverflow.com/q/27273262
score: 4
has body: I have an requirement getting the all the options of a dropdown and I need to loop over those values and submit the form. So I need the list of dropdown values. following code in java matches my exact requirement, but i need the same code in Javascript + selenium + Nodejs Select select = new Select(driver.findElement(By.name("height"))); List list = select.getOptions(); Is this possible to do in nodejs + selenium + javascript
linked to: http://stackoverflow.com/q/26041791
has answer: http://stackoverflow.com/a/71522578
answer count: 3
favorite count: 0
type: UnansweredQuestion
has title: Getting dropdown values using selenium and nodejs
tagged with: node.js
tagged with: selenium
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/45585192
has answer: http://stackoverflow.com/a/28643491
has answer: http://stackoverflow.com/a/28837699
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/44794996
type: Comment
comment on: http://stackoverflow.com/a/27312588
has text: This only seems to work with 'GET'. When I try 'POST' is doesn't allow it due to CORS
score: 0
type: AnswerComment

http://stackoverflow.com/a/27261397
score: 0
type: Answer
has body: @rfornal's solution works okay, but it's hard to type single digit value unless you're really fast: http://jsfiddle.net/v6fhobr7/7/ So it's better to set a slight timeout before changing the value: var actual = $('.actual'); var tm; actual.on('keyup', function () { var t = $(this); if (tm) clearTimeout(tm); tm = setTimeout(function() { if (t.val() &lt; 1) t.val('1'); if (t.val() &gt; 15) t.val('15'); }, 250); }); JSFiddle demo: http://jsfiddle.net/v6fhobr7/10/
has comment: http://stackoverflow.com/comment/42995918
answers question: http://stackoverflow.com/q/27261252

http://stackoverflow.com/q/27207613
type: Question
has body: I asked a question yesterday and that got me going on the right path, but I'm absolutely stuck again. Outline: I have 3 tables; table 1 - expected data (#expected) table 2 - expected confirmed data (#scannedExp) table 3 - unexpected confirmed data (#scannedUnExp) So for a example.. if I was to enter "6666" in the input box it would reduce qty in the "#expected" table by 1 but create a column in the "#scannedExp" table with qty of 1 (with the i.e desc, cage grabbed from the #expected table). if we was to enter '6666' this time it would delete the "#expected" row, but increase the table "#scannedExp" if again we was to enter '6666' this time it would add a row to "#scannedUnExp" with just the code and qty (dont need the desc or cage) and if we was to enter say "1234" it would add a row in "#scannedUnExp" for some reason my codes not working in Jsfiddle as it works to some extent in my browser. http://jsfiddle.net/j3psmmo3/ Scanned Expected Code Desc Qty Cage Scanned Un Expected Code Qty Cage Data Expected Code Desc Qty Cage 4444 Car Door 3 S2222 5555 door handel 1 S2222 6666 headlight 2 S2222 7777 seat 5 S2222 my javascript $(window).load(function(){ $("#btnSubmit").on("click", function(){ numRows = $("#expected tr").length; //loop thought expected data for(var i=1 ; i<numRows ; i++){ var code = $("#expected tr:nth-child(" + i + ") td:nth-child(1)").html(); var desc = $("#expected tr:nth-child(" + i + ") td:nth-child(2)").html(); var qty = $("#expected tr:nth-child(" + i + ") td:nth-child(3)").html(); var cage = $("#expected tr:nth-child(" + i + ") td:nth-child(4)").html(); // if code is in expected data -1 from qty col if(code == $("#code").val()){ $("#expected tr:nth-child(" + i + ") td:nth-child(3)").html(parseInt(qty) - 1); //delete if last one in expected table if(qty ==1 ){$("#" + code).remove();} // loop thought scanned expected table numRowsB = $("#scannedExp tr").length; for(var ib=1 ; ib<numRows ; ib++){ var codeExp = $("#scannedExp tr:nth-child(" + ib + ") …
tagged with: javascript
tagged with: html-table
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27207784
type: UnansweredQuestion
tagged with: input
has title: jQuery transfer data between tables via textbox input

http://stackoverflow.com/q/27276005
has body: I am using jquery to post a form. Works fine on all browsers apart from IE, IE does not seem to be picking up the "prevent default" as the browser is directing to "beta.php". Here is my code $(document).ready(function(){ $("#betaform").submit(function(e){ event.preventDefault(); $.ajax({ url: "beta.php", type: "POST", data: $(this).serialize(), success: function(data){ content = " Thank you, data received "; $("#betaform").empty().append(content); } }); }); });
type: Question
has comment: http://stackoverflow.com/comment/43021146
has answer: http://stackoverflow.com/a/27276092
has title: JQuery Post Not Working With IE8 + 9
linked to: http://stackoverflow.com/q/1000597
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43021092
possible better answer: http://stackoverflow.com/a/27276153
has comment: http://stackoverflow.com/comment/43021176
has answer: http://stackoverflow.com/a/27276153
answer count: 3
linked to: http://stackoverflow.com/q/1357118
accepted answer: http://stackoverflow.com/a/27276092
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27276262
tagged with: internet-explorer-8

http://stackoverflow.com/comment/42944540
type: QuestionComment
score: 1
has text: where is #response? Also, what are you exactly trying to do? in your code you apparently are getting the content from a url and parsing it into a div (not shown in your code). What is your exact goal?
comment on: http://stackoverflow.com/q/27233903
type: Comment

http://stackoverflow.com/q/27306618
has answer: http://stackoverflow.com/a/27306976
possible better answer: http://stackoverflow.com/a/27306674
has answer: http://stackoverflow.com/a/27306674
type: AnsweredQuestion
has body: Basically I have a custom wordpress website. I have a custom wp-login.php login screen. But, the login screen leads to a sign-up page (enabled). The sign-up page basically loads 2 different fields dynamically within the same form id that allows users to sign-up. Everything is the same everywhere else. (Replaces first frame 'login' page) The problem.. is, the login page has my custom background image on html, body { background: I would like the user to see a unique background: image when they hit that form. (the 2nd form, SIGN-UP) Below is the URL that is generated once the user hits signup: /wp-login.php?action=register Is there a way I can simply replace the html, body { background: with a NEW one when the user reaches that URL?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27306976
answer count: 3
type: Question
tagged with: css
has answer: http://stackoverflow.com/a/27306652
score: 0
has title: different html, body background based on URL or URL string prefix
tagged with: wordpress
has comment: http://stackoverflow.com/comment/43075654
tagged with: php

http://stackoverflow.com/comment/42882343
type: AnswerComment
has text: nevermind. Found a broken link somewhere else, that prevented it fromw switching
type: Comment
comment on: http://stackoverflow.com/a/27198964
score: 0

http://stackoverflow.com/a/27181695
answers question: http://stackoverflow.com/q/27181637
type: Answer
score: 2
downvote count: 0
has body: You must include the jquery files and use it $("#mytextbox").on("keypress", function(event) { // Disallow anything not matching the regex pattern (A to Z uppercase, a to z lowercase and white space) // For more on JavaScript Regular Expressions, look here: https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions var englishAlphabetAndWhiteSpace = /[A-Za-z ]/g; // Retrieving the key from the char code passed in event.which // For more info on even.which, look here: http://stackoverflow.com/q/3050984/114029 var key = String.fromCharCode(event.which); //alert(event.keyCode); // For the keyCodes, look here: http://stackoverflow.com/a/3781360/114029 // keyCode == 8 is backspace // keyCode == 37 is left arrow // keyCode == 39 is right arrow // englishAlphabetAndWhiteSpace.test(key) does the matching, that is, test the key just typed against the regex pattern if (event.keyCode == 8 || event.keyCode == 37 || event.keyCode == 39 || englishAlphabetAndWhiteSpace.test(key)) { return true; } // If we got this far, just return false because a disallowed key was typed. return false; }); $('#mytextbox').on("paste",function(e) { e.preventDefault(); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input id="mytextbox" style="width:300px" placeholder="Only English letters are allowed here..."&gt;
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27181637

http://stackoverflow.com/a/27298360
type: AcceptedAnswer
has body: play is a function. So you should call it. var tween = new Kinetic.Tween({ node: pane, duration: 1, opacity: 0.8, easing: Kinetic.Easings.BackEaseOut, onFinish: function() { loadImages(arrayOfImages, index + 1 } }).play(); Also: when you are finding node with get function it returns Collection. So if you need just node use: var pane = layer2.get('#pane_' + index )[0];
type: Answer
answers question: http://stackoverflow.com/q/27275537
accepted answer of: http://stackoverflow.com/q/27275537
score: 0

http://stackoverflow.com/q/27179856
has answer: http://stackoverflow.com/a/27195942
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42869789
tagged with: http://stackoverflow.com/tag/html
upvote count: 2
accepted answer: http://stackoverflow.com/a/27195942
score: 1
has title: Jquery Dialog box scrolls to a link, how to keep it at the top
downvote count: 1
type: Question
type: AnsweredQuestion
has body: I have a dialogbox that shows the contents of an HTML file. In this file there is a href link at the bottom. Now everytime the dialog is shown, it automatically scrolls to that link and sets focus to it. How can I set the scroll position back to the top after the dialog shows? Here is the jquery code: &lt;script type="text/javascript"&gt; $(function() { $('#faq1_pnM').dialog( { title: 'Frequently asked questions', autoOpen: false, modal: true, show: 'puff', hide: 'puff', open: function() { var e1 = $(this); var scrollY = this.scrollHeight; e1.scrollTop(scrollY); e1.parent().queue(function(next) { e1.scrollTop(scrollY); next(); }); }, resizable: false, closeOnEscape: true, width: '650', height: '500', minWidth: '500', minHeight: '500' }).dialog('open'); }); &lt;/script&gt; As you can see, I tried with the open: function... stuff, but that doesn't do the trick. Did I miss something?
has comment: http://stackoverflow.com/comment/42849115
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/27265790
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: JavaScript: some unwanted text comes in the input box when the page loads
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43002982
has body: On this page, when the page on load, i reset the value of all the input boxes and make the focus on to the first input box such as user-name. But, here, somewhat unwanted text comes such as dwd on user-name box and as well as in the password field whenever the page loads. The placeholderis not coming whenever the page loads. what is the mistake here? Please see the image Bootstrap Example
type: Question
has comment: http://stackoverflow.com/comment/43003896

http://stackoverflow.com/comment/42963288
has text: @MunanshuMadaan - I have added the row to close the opened div and added a jsFiddle example too.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27227858
type: Comment

http://stackoverflow.com/a/27310898
score: 0
upvote count: 1
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27309832
has body: if variable dat holds your json object. Then you can try below code to access username in your json: dat.posts[0].username

http://stackoverflow.com/comment/42820970
type: AnswerComment
has text: Xminds in ur code if i select any li like india in the second dropdown also it is changing.
type: Comment
comment on: http://stackoverflow.com/a/27164134
score: 0

universal-analytics
tag name: universal-analytics
tags question: http://stackoverflow.com/q/27257833
type: Tag
tags question: http://stackoverflow.com/q/27210299

http://stackoverflow.com/comment/43072284
type: AnswerComment
score: 0
has text: This is essentially what I'm doing.
type: Comment
comment on: http://stackoverflow.com/a/27303408

http://stackoverflow.com/a/27257202
answers question: http://stackoverflow.com/q/27257129
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: When you define a javascript script, it's executed "in place" (The browser creates objects and executes codes in the order they are defined). When the browser executes: var coordenadax=document.getElementById('mosca').style.left; var coordenaday=document.getElementById('mosca').style.top; The object with id "mosca" has not been created yet (You create the object after the script), and it drops an error. (Check the developer's console, probably it's in there).
accepted answer of: http://stackoverflow.com/q/27257129
upvote count: 1
score: 1

http://stackoverflow.com/a/27250696
has comment: http://stackoverflow.com/comment/42975590
type: Answer
has comment: http://stackoverflow.com/comment/42975523
answers question: http://stackoverflow.com/q/27250540
has comment: http://stackoverflow.com/comment/42976183
score: 0
has body: &lt;?php echo $_SESSION['uploaded']; ?&gt; is preprocessed by PHP only once, just before this javascript is sent to client. That said, the javascript on client looks like: function countdown(seconds){ console.log(0); if(0==0){ setTimeout(function() { //uploading seconds--; countdown(seconds); }, 1000); } else{ //processing } } You should find other way (ajax?) to update information on the client side.
has comment: http://stackoverflow.com/comment/43001211

http://stackoverflow.com/comment/46083037
has text: This worked for me. The accepted answer suggests `connect-src: "'self' http://localhost:3000/*",`. however the wildcard modifier didn't work out as expected. Thanks! :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/28310838

http://stackoverflow.com/q/27272074
has comment: http://stackoverflow.com/comment/43027243
has comment: http://stackoverflow.com/comment/43013925
type: AnsweredQuestion
has body: I created a simple java script with a function. I'm named Create(X) that execute db.mycollect.insert x times inside in a for loop. When i executed load function on mongo shell it runs correct. Then when i execute Create(10) for example. It doesn't create the 10 new documents. My steps are: I create a simple script, like this: function Create(x) { db.runCommand("use mycollect"); for(i=i;i&lt;x;i++) { db.departaments.insert([{"id":i,"name":"IT","acces":"T"}]) } } I ran load("simple.js").It returns true And finally i ran Create(10). It seems corrects But when i ran db.departments.find().The collection is void. If the response could be in simple english or spanish i'll apreccite it. &lt;--Solution--&gt; The answer was on the script. It was an error as user jao said. Thanks for all answers.
has comment: http://stackoverflow.com/comment/43014019
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/27279541
accepted answer: http://stackoverflow.com/a/27279541
has comment: http://stackoverflow.com/comment/43201436
tagged with: javascript
has title: MongoDB:How to call an external function you load with load funcion?
score: 0
answer count: 1

http://stackoverflow.com/comment/42921411
comment on: http://stackoverflow.com/q/27220736
score: 0
type: Comment
type: QuestionComment
has text: Actually, it's responsive on chrome 38 for mac . . .

http://stackoverflow.com/comment/42808371
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27157062
has text: @FelixKling: The current draft has it.
score: 0

http://stackoverflow.com/comment/43022379
type: Comment
comment on: http://stackoverflow.com/a/27272640
has text: what if you do `$(function(){ Gmaps.buildMap() })`
type: AnswerComment
score: 0

http://stackoverflow.com/a/27298228
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43063704
has comment: http://stackoverflow.com/comment/43065371
has body: The link is not on the page when you attach the event. It is like trying to eat a pizza before you make it. You either need to attach the event when you click on it or you need to use event delegation. $(document).on("click", "a", function(){ alert("oi"); });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43065798
has comment: http://stackoverflow.com/comment/43065742
answers question: http://stackoverflow.com/q/27298150
has comment: http://stackoverflow.com/comment/43060800
has comment: http://stackoverflow.com/comment/43065975
accepted answer of: http://stackoverflow.com/q/27298150

http://stackoverflow.com/comment/43063704
has text: document.getElementsByTagName('a').addEventListener('click',function(){alert('oi');});
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27298228
type: Comment

http://stackoverflow.com/comment/42848448
type: AnswerComment
has text: I don't think you understand the question. I don't have a button, I have a input field and want to change the value. I included the click part just to show how it works on buttons created after the page loads.
type: Comment
comment on: http://stackoverflow.com/a/27179884
score: 0

http://stackoverflow.com/comment/42987949
type: AnswerComment
has text: To be precise, you want to accept commas only when followed by three digits, and that combination can happen any number of times: `\d{1,3}(,\d{3})*`. Use that in place of the `\d+` before the decimal.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27159132

http://stackoverflow.com/q/27220121
has body: I have a contact form for users to contact me if they need help with something. The thing is I can't get the captcha to work. contact_form.php: Contact Form Technologx Home Themes Blog Store Contact Us Contact Form Hello Guest, Your Message : Name: Email: captcha.php: <?PHP $image = @imagecreatetruecolor(160, 45) or die("Cannot Initialize new GD image stream"); $background = imagecolorallocate($image, 0x66, 0xCC, 0xFF); imagefill($image, 0, 0, $background); $linecolor = imagecolorallocate($image, 0x33, 0x99, 0xCC); $textcolor1 = imagecolorallocate($image, 0x00, 0x00, 0x00); $textcolor2 = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); for($i=0; $i < 8; $i++) { imagesetthickness($image, rand(1,3)); imageline($image, rand(0,160), 0, rand(0,160), 45, $linecolor); } session_start(); $fonts = array(); $fonts[] = "../fonts/Courier New.ttf"; $fonts[] = "../fonts/Courier New Italic.ttf"; $fonts[] = "../fonts/Courier New Bold.ttf"; $digit = ''; for($x = 10; $x <= 130; $x += 30) { $textcolor = (rand() % 2) ? $textcolor1 : $textcolor2; $digit .= ($num = rand(0, 9)); imagettftext($image, 20, rand(-30,30), $x, rand(20, 42), $textcolor, $fonts[array_rand($fonts)], $num); } $_SESSION['digit'] = $digit; header('Content-type: image/png'); imagepng($image); imagedestroy($image); ?> I want the captcha part to work because in the past when I had a contact forum I had people sending me nothing but nonsense that had nothing to do with the question they were being asked. This is to also stop spam bots. If you guy's would like to look at the live version to see what's going on you can do so here. All that's happening is I can enter information and press submit without even entering the captcha.
has comment: http://stackoverflow.com/comment/42919296
has comment: http://stackoverflow.com/comment/42921685
tagged with: forms
has comment: http://stackoverflow.com/comment/42919302
type: Question
has comment: http://stackoverflow.com/comment/42925318
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27224121
has comment: http://stackoverflow.com/comment/42952960
score: 2
answer count: 1
has comment: http://stackoverflow.com/comment/42919391
favorite count: 0
has comment: http://stackoverflow.com/comment/42921973
upvote count: 2
has comment: http://stackoverflow.com/comment/42921603
type: UnansweredQuestion
tagged with: php
has title: Enter Captcha before Contact Form Submission PHP & Javascript
tagged with: captcha
has comment: http://stackoverflow.com/comment/42919358

http://stackoverflow.com/a/27262532
type: Answer
has comment: http://stackoverflow.com/comment/86791118
score: 9
has body: Use setTimeout: function callNTimes(n, time, fn) { function callFn() { if (--n &lt; 0) return; fn(); setTimeout(callFn, time); } setTimeout(callFn, time); } Then you can use that function to set up your counted iteration: callNTimes(3, 10000, function() { /* whatever */ });
answers question: http://stackoverflow.com/q/27262503
downvote count: 0
has comment: http://stackoverflow.com/comment/86790168
upvote count: 9

http://stackoverflow.com/q/27295718
answer count: 1
has comment: http://stackoverflow.com/comment/43087568
has answer: http://stackoverflow.com/a/27356173
has comment: http://stackoverflow.com/comment/43100244
has title: Raphael JS Drag Path and maintain it in paper
has body: I'm new in Raphael JS and I test something about it. I have to create a path and drag it. Currently no problems. My real problem is that I have to limit the move into the paper. My path must be constraint to move into my raphael paper. (function() { var trans_x; var trans_y; var w = 300; var h = 300; var paper = Raphael('holder', w, h); var rectPath = paper.path("M0, 0L0, 90L90, 90L90, 0Z"); rectPath.attr({ fill: "green", cursor: "move" }); var bBox = rectPath.getBBox(); var startPath = function() { this.ox = this.attr("x"); this.oy = this.attr("y"); }, movePath = function(dx, dy) { trans_x = dx - this.ox; trans_y = dy - this.oy; this.translate(trans_x, trans_y); this.ox = dx; this.oy = dy; }, upPath = function() {}; rectPath.drag(movePath, startPath, upPath); })(); Here is my basic code in Fiddle: http://jsfiddle.net/Drzep/7s8rxhat/4/ I tryed a lot of thing with math.min and math.max but nothing works for path. I have found how to do this with a raphael circle and rect, but not with a path.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43080447
accepted answer: http://stackoverflow.com/a/27356173
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43083881
tagged with: raphael
score: 0

http://stackoverflow.com/q/27295175
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27295280
type: AnsweredQuestion
has title: How to pass a parameter through an angular controller to a service method?
has body: I am attempting to keep my code clean, and I am noticing that this is very difficult in JavaScript. That being said, I have an angular controller which calls a couple different services: surchargeIndex.controller('SurchargeIndexController', function ($scope, customerService, templateService) { $scope.customers = { Key: "", Value: "" }; $scope.templates = { Key: "", Carrier: "", Service: "", RateType: "", SurchargeName: "", AccountNumber: "", RateGroup: "", OriginCountryCode: "", DestinationCountryCode: "", DomesticOrInternational: "", Zone: "", FuelType: ""} customerService.getTest($scope); templateService.getTemplates($scope, customerKey); }); Services: surchargeIndex.service('customerService', [ '$http', function($http) { this.getTest = function($scope) { return $http({ method: "GET", url: "api/Customer/GetTest", }) .success(function(data) { $scope.customers = data; }) .error(function() { $scope.error = "Failed to load customers!"; }); }; } ]); surchargeIndex.service('templateService', [ '$http', function($http) { this.getTemplates = function ($scope, customerKey) { return $http({ method: "GET", url: "api/SurchargeTemplate/Get/" + customerKey }) .success(function (data) { $scope.templates = data; }) .error(function () { $scope.error = "Failed to load templates!"; }); }; } ]); The problem I am having is with customerKey. How do I pass that to the parameter on the click of a button: {{customer.Value}} Get Templates I want to pass the currently selected option to the method so that I can act upon it. I am getting the error that customerKey is not defined when I run this though. Any Suggestions?
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27295280

http://stackoverflow.com/a/65965505
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27267565
has body: This is an old question, but I wanted to resurrect it since this was the first result in my Google query and the accepted answer doesn't really answer the question well. So I'm providing a bit more information for others to stumble upon. There are several convenience methods in the Date object which may be of help to those trying to work around this little JavaScript quirk. It seems to me that there is no way to change a Date object timezone offset programmatically, and it must be done using String manipulation, which is truly undesirable, but there is no other way. The Date object constructor always uses the local machine timezone when interpreting dates, and this cannot be changed. As such, you must understand that when you create a Date which essentially ignores the timezone, the altered Date object will represent a different moment in time from the original Date. The new Date object will automatically adopt the local machine's timezone but it will use the (year, month, date, hour, min, sec, ms) which you designate in either the individual constructor parameters or string parameter of the Date class (of the two options below). I found two ways to work around this and produce a correct date from a type="date" input field. Please use the one you feel is more effective or appropriate for your solution. Personally, I prefer using OPTION B since it is more programatic than string manipulation and probably a bit more reliable as such. It's also a bit simpler. OPTION A: UTC date string manipulation getUTCDate - returns the day of the month (from 1 to 31) of the date object, according to universal time. The UTC methods calculate their date assuming that the date object is of local time and date. getUTCString - converts a Date object to a string, according to universal time. NOTE: The Date constructor reverts back to local timezone. Therefore, you cannot build a new Date with the getUTCString() value and expect to get the correct date from the input field. You can solve t…
type: Answer

http://stackoverflow.com/comment/43118272
type: QuestionComment
comment on: http://stackoverflow.com/q/27276289
has text: @rLyLmZ I know, it's tempting, but code formatting should be used for code only.
score: 0
type: Comment

http://stackoverflow.com/comment/42945916
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27234366
type: QuestionComment
has text: could you confirm the version of fancybox?

http://stackoverflow.com/a/27290799
answers question: http://stackoverflow.com/q/27290668
has body: Assuming that this object has a variable assigned: var jsonObj = { "nextPointer": 7, "tagName": "tech", "newsList": [{ "newsID": 43, "title": "This is a title", "description": "This is a demo description", "tagList": ["tech", "google", "all"] }, { "newsID": 42, "title": "This is a title no 2", "description": "This is a demo description no 2", "tagList": ["tech", "all"] }] }; var tagList = []; for(var i=0; i&lt;json.newsList.length; i++) { tagList.push(json[i].tagList); } Here you get an array which would look like: [["tech", "google", "all"],["tech", "all"]]
score: 0
type: Answer

http://stackoverflow.com/comment/42997114
score: 1
type: AnswerComment
has text: @IsmaelMiguel I didn't assume anything. This is how she said it would be.
comment on: http://stackoverflow.com/a/27240944
type: Comment

http://stackoverflow.com/comment/43003864
has text: Any particular reason why you don't simply use the global flag `/\[(ORG|PER|LOC)]\s[^\W_]+$/g`?
comment on: http://stackoverflow.com/q/27266320
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42898678
has text: It's not "simple" because it means you can't request random sites, you can only access servers you have control over. The protocol doesn't have to be _http:_, it could be _https:_ and hey if your browser permits it _file:_ or something else. The bit about the protocols is that you can't be on e.g. a _https_ resource and do an _XMLHttpRequest_ for a _http_ resource. Not sure about _CORS_ working if you try to change ports, either.
comment on: http://stackoverflow.com/q/27208251
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43019000
comment on: http://stackoverflow.com/a/27254253
type: AnswerComment
has text: Okay, so for the updated grabWord() function, it just makes it the A4W and then the number, right? I posted the code with that because it wasn't complete, and it would have to be setup so people that use the completed kit could change the grabWord() function and manually change the possible answers for each word. For example, if the word is 'Word 1', I would have to have the code setup so that I can make it not just 1 same word with a number after it, but manually be able to setup each word manually like it was before. Please, and thank you for condensing and organizing it! @HowardRenollet
type: Comment
score: 0

http://stackoverflow.com/a/27273422
downvote count: 0
has body: You have to remove .toggle() and use .text(). $('#viewdetail').click(function() { var div_text = $(this).find('.speakers').text(); if (div_text == 'Hide Details') { $(this).find('.speakers').text('view details'); } else { $(this).find('.speakers').text('Hide Details'); } }); view details
type: Answer
answers question: http://stackoverflow.com/q/27273118
score: 1
upvote count: 1

http://stackoverflow.com/comment/42890931
comment on: http://stackoverflow.com/q/27204125
type: Comment
type: QuestionComment
has text: @A.Wolff i used class but same result :(
score: 1

http://stackoverflow.com/comment/42915704
type: AnswerComment
comment on: http://stackoverflow.com/a/27214337
type: Comment
has text: but maybe it needs the most recent build. Hate to ask a stupid question, but is there a link to that anywhere?
score: 0

http://stackoverflow.com/comment/43052180
has text: I don't get it ... `onchange` of what? Do you happen to have an HTML input somewhere?
comment on: http://stackoverflow.com/q/27293610
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27242992
type: Question
tagged with: c#
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42961786
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42962250
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42962563
has comment: http://stackoverflow.com/comment/42962577
answer count: 0
has comment: http://stackoverflow.com/comment/42961818
has body: I am using VS2008. I have asp button where I am trying to call javascript function on "Onclientclick" event and .cs code in "onclick event". When I run the project it gets build successfully, but throws error "No Source code available for the current location". I also noticed that when I remove the javascript code, my project works properly. Please suggest.
has title: Getting error in VS2008 No source code available for the current location

http://stackoverflow.com/q/27154328
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27154459
has comment: http://stackoverflow.com/comment/42803182
score: 3
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/42808120
has body: I've begun with a regular expression for time validation, it should detect strings like: 5s 3h5m 5h3m02s 05:03:02 05:03 4 My current regex is valid for all of these but one: 05:03. It detects 05 as hours and 03 as seconds, but it should be 05 as minutes... and I don't know how to edit my code to do this. var reTime = /^(?:PT)?(?:(\d{1,2})[:.hH])?(?:(\d{1,4})[:.mM])?(?:(\d{1,6})[sS]?)?$/;
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42803436
upvote count: 3
has comment: http://stackoverflow.com/comment/42803490
has title: RegEx for Flexible Time Validation in JavaScript
has comment: http://stackoverflow.com/comment/42803211
tagged with: regex
favorite count: 0

http://stackoverflow.com/comment/43009303
score: 0
type: Comment
type: QuestionComment
has text: If i do that i get finalNumber is not defined?
comment on: http://stackoverflow.com/q/27269404

couchdb
tags question: http://stackoverflow.com/q/27193171
tags question: http://stackoverflow.com/q/27225198
tags question: http://stackoverflow.com/q/27188033
tag name: couchdb
type: Tag
tags question: http://stackoverflow.com/q/27198547

http://stackoverflow.com/a/27210880
score: 0
answers question: http://stackoverflow.com/q/27210855
has comment: http://stackoverflow.com/comment/42926779
type: Answer
has comment: http://stackoverflow.com/comment/42925649
accepted answer of: http://stackoverflow.com/q/27210855
type: AcceptedAnswer
has body: Just tested this in the JS console, you need to escape the slash in regular expressions. /([a-z])\/([a-z])/ Should do it for you.

http://stackoverflow.com/a/27271874
has body: I'm not very good in full calendar, but I found solution for your problem After deleting event, you must rerender all events: $(placeholder).fullCalendar('removeEvents', event.id); setTimeout(function(){ $(placeholder).fullCalendar("rerenderEvents"); },1); I use timeout for sure. It's testing for fullcalendar-2.2.3 fresh download. EDIT: be sure for your variables and if conditions.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27271028
has comment: http://stackoverflow.com/comment/43015855
downvote count: 0
has comment: http://stackoverflow.com/comment/43016348

http://stackoverflow.com/a/27250883
type: Answer
answers question: http://stackoverflow.com/q/27220297
score: 12
has comment: http://stackoverflow.com/comment/78240410
upvote count: 12
type: AcceptedAnswer
downvote count: 0
has body: CryptoJS uses the non-standardized OpenSSL KDF for key derivation (EvpKDF) with MD5 as the hashing algorithm and 1 iteration. The IV is also derived from the password which means that only the actual ciphertext, the password and the salt are needed to decrypt this on Java side. In other words, PBKDF2 is not used for key derivation in password mode of CryptoJS. By default AES-256 is used in CBC mode with PKCS5 padding (which is the same as PKCS7 padding). Keep in mind that you might need the JCE Unlimited Strength Jurisdiction Policy Files. See also Why there are limitations on using encryption with keys beyond certain length? The following code recreates the KDF in Java (keySize and ivSize are 8 respectively 4 for AES-256 and come from ). public static byte[] evpKDF(byte[] password, int keySize, int ivSize, byte[] salt, int iterations, String hashAlgorithm, byte[] resultKey, byte[] resultIv) throws NoSuchAlgorithmException { int targetKeySize = keySize + ivSize; byte[] derivedBytes = new byte[targetKeySize * 4]; int numberOfDerivedWords = 0; byte[] block = null; MessageDigest hasher = MessageDigest.getInstance(hashAlgorithm); while (numberOfDerivedWords &lt; targetKeySize) { if (block != null) { hasher.update(block); } hasher.update(password); block = hasher.digest(salt); hasher.reset(); // Iterations for (int i = 1; i &lt; iterations; i++) { block = hasher.digest(block); hasher.reset(); } System.arraycopy(block, 0, derivedBytes, numberOfDerivedWords * 4, Math.min(block.length, (targetKeySize - numberOfDerivedWords) * 4)); numberOfDerivedWords += block.length/4; } System.arraycopy(derivedBytes, 0, resultKey, 0, keySize * 4); System.arraycopy(derivedBytes, keySize * 4, resultIv, 0, ivSize * 4); return derivedBytes; // key + iv } Here is the complete class for reference: public class RecreateEVPkdfFromCryptoJS { public static void main(String[] args) throws UnsupportedEncodingException, GeneralSecurityException { String msg = "hello"; String password = "mypassword"; S…
accepted answer of: http://stackoverflow.com/q/27220297

http://stackoverflow.com/comment/42933315
comment on: http://stackoverflow.com/a/27190635
has text: I'm glad you find a solution. But if you look at the plunkr code you'll se that the order has effect when you define a function as an expression. This is not my opinion is a fact. You can check this answer too http://stackoverflow.com/questions/3887408/javascript-function-declaration-and-evaluation-order
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42836058
comment on: http://stackoverflow.com/q/27172443
type: Comment
type: QuestionComment
has text: That's entirely possible, but something only you can test :-) If disabling isn't an option (ie. your entire app would stop working), you could do some strategic `console.log()` calls to determine if that's the problem, and get an indication where the app hangs.
score: 0

http://stackoverflow.com/a/27217819
accepted answer of: http://stackoverflow.com/q/27217761
answers question: http://stackoverflow.com/q/27217761
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: You're appending the table each time the user clicks. Use this: document.getElementById('resultaat').innerHTML= ... Instead of this: document.getElementById('resultaat').innerHTML+= ...

http://stackoverflow.com/comment/42989647
comment on: http://stackoverflow.com/a/27257144
type: Comment
score: 0
has text: I'm pretty sure it returns an integer
type: AnswerComment

http://stackoverflow.com/comment/43069718
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27303351
type: QuestionComment
has text: What does the JSON look like?

http://stackoverflow.com/a/27276849
type: Answer
has comment: http://stackoverflow.com/comment/43032909
has body: The issue is that the filter is executing on every $digest (every ng-mouseenter, ng-click, etc). For a huge data set, this can obviously kill performance. (See this article http://www.bennadel.com/blog/2489-how-often-do-filters-execute-in-angularjs.htm) Instead, try a $watch on the age.selected value, then applying a filter only when that value actually changes. http://plnkr.co/edit/TIeKPAyrAQsGHwakqwEp?p=preview HTML &lt;!-- filtered list "ageMatches" --&gt; &lt;ul ng-show="age.selected"&gt; &lt;li ng-repeat="person in ageMatches"&gt;{{person.name}} - {{person.age}}&lt;/li&gt; &lt;/ul&gt; &lt;!-- default list of all "people" --&gt; &lt;ul ng-hide="age.selected"&gt; &lt;li ng-repeat="person in people"&gt;{{person.name}} - {{person.age}}&lt;/li&gt; &lt;/ul&gt; JS // add age to scope $scope.age = {}; // add age match placeholder $scope.ageMatches = []; // watch age.selected for changes, apply filter $scope.$watch('age.selected', function(newVal, oldVal){ if(newVal){ $scope.ageMatches = $filter('filter')($scope.people, {age: newVal}); } });
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/27234374
has comment: http://stackoverflow.com/comment/43061275
downvote count: 0
has comment: http://stackoverflow.com/comment/43062023
has comment: http://stackoverflow.com/comment/45811053

http://stackoverflow.com/a/27240605
downvote count: 0
type: Answer
has body: You have to use setTimeout() function for your problem instead of delay() $('.details1').click(function(){ setTimeout(function(){ $('#clrd').toggleClass('on'); }, 200); }); you can change the time (milliseconds) as per your need. In this case it is 200ms Check this Fiddle
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27240442
answers question: http://stackoverflow.com/q/27240442
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/42877111
has text: Uncaught TypeError: Cannot read property 'selfs' of undefined for (i=0; i<document.telusService.selfs.length;i++) {
comment on: http://stackoverflow.com/a/27195745
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27241345
tagged with: javascript
has body: I am currently trying to render a scene using three.js and WebGL in an isomorphic way. I came across some articles that mention the OrthographicCamera to achieve this. I added it and noticed some weird results. Part of the scene is now completely black and seems as if it is not being painted. See this JSBin: http://jsbin.com/vefohapido/3/edit?js,output When I change the camera to the perspective one, then the whole ground will be visible. Thank you for your help.
score: 0
has answer: http://stackoverflow.com/a/27281202
answer count: 1
accepted answer: http://stackoverflow.com/a/27281202
tagged with: three.js
type: AnsweredQuestion
type: Question
has title: OrhographicCamera fails to render the whole scene

http://stackoverflow.com/a/29027635
has body: This is because of .prepend('&lt;span class="selectable"&gt;$'+root.latex()+'$&lt;/span&gt;'); used in mathquill.js [line no. 1338- function: createRoot] It does this for non-editable textboxes.(Doesn't get why?) But to avoid this you can make text area editable and then revert it as: fiddle Please suggest if found any better way.
score: 0
answers question: http://stackoverflow.com/q/27273788
type: Answer

http://stackoverflow.com/q/27296268
type: Question
has answer: http://stackoverflow.com/a/27296581
tagged with: javascript
has body: (I'm working on a mobile responsive website) This is the list: html: NFL Superbowl MLB Baseball Playoff NBA Finals Playoff College Basketball March Madness Boxing College Football Golf British Open Masters PGA Championship US Open NHL Stanley Cup MMA UFC Soccer Tennis Horse Racing Belmont Stakes Kentucky Derby Preakness Stakes Other Sports and these few onClick jQuery lines: //first $('.sub-menu').click(function(){ //$('.sports2').slideToggle("slow"); $(this).parent().find('.sports2').slideToggle("slow"); }) //second $("li").click(function(){ document.location.href = $(this).attr('url'); }); "NfL" is a link by itself - but if you press the #sub-menu button you have more categories with links. works for all the in my html. If I comment the second jQuery part - it opens the second list (the sub categories .sports2). but the links don't work. If I comment the first jQuery code - I get the links working perfectly, but the submenus don't open. How do I blend both without getting things mixed? I tried uncommenting both of them - I get the links working fine, but when I click the #submenu button it expands for a second and immediately redirects to the link of the
score: 0
answer count: 2
has title: How do I use a "document.location.href" & in the same element have a button that doesn't activate it
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27296669

http://stackoverflow.com/q/27171432
favorite count: 0
tagged with: basecamp
tagged with: http://stackoverflow.com/tag/html
has body: Im using Basecamp, and when I click on the menu links, it just loads the inner body content alone, but still the URL changes, I wonder, Ive examined in network tab, and I see there for each link click it triggers an request and it only gets body part, no headers/footer are loading, amazed with the flow. Where as in other sites(even in stackoverflow) it loads the page from the beginning, but with cache or some other stuff it loads quickly but there is a lil flicker if we could examine clearly. Do you guys have any idea how it works, are there any frameworks that helps this way? because this really works extremely fast and no flicker at all in header menus, and specially while browsing in mobile it gives a feel like using an application(mobile app that loads just the content) Please let me if you have any idea how this flow works. Thanks in advance
tagged with: php
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/27238585
type: Question
has comment: http://stackoverflow.com/comment/42833716
has comment: http://stackoverflow.com/comment/45542733
score: -2
tagged with: javascript
has title: How to load only the content area, skip header and footer loading again in new pages over clicking links
upvote count: 0
accepted answer: http://stackoverflow.com/a/27238585
answer count: 1
tagged with: stack-overflow

http://stackoverflow.com/q/27294656
linked to: http://stackoverflow.com/q/27403944
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43063031
has comment: http://stackoverflow.com/comment/77115996
downvote count: 0
linked to: http://stackoverflow.com/q/24773177
has comment: http://stackoverflow.com/comment/43060659
has comment: http://stackoverflow.com/comment/43057851
type: Question
score: 3
tagged with: google-sheets
tagged with: javascript
has comment: http://stackoverflow.com/comment/43063816
has comment: http://stackoverflow.com/comment/43058419
tagged with: google-apps-script
has body: My spreadsheet has a sidebar, how can I hide it with a script? SpreadsheetApp.getUi().[method?] Thanks for any help!
upvote count: 3
has title: How to hide the Sidebar in a Google Spreadsheet using a script?
answer count: 2
has answer: http://stackoverflow.com/a/63844458
has answer: http://stackoverflow.com/a/27301896
favorite count: 0

http://stackoverflow.com/comment/42969958
type: QuestionComment
comment on: http://stackoverflow.com/q/27247432
has text: Could you include the structure of the array you want displayed?
score: 0
type: Comment

http://stackoverflow.com/a/27154273
has comment: http://stackoverflow.com/comment/42802843
answers question: http://stackoverflow.com/q/27154239
has comment: http://stackoverflow.com/comment/42802897
upvote count: 2
has body: JavaScript doesn't have multi-dimensional arrays. What you've done is define a nested array for the first index of svgArray. What you need to do is define one for each member. You can do that in the .each() loop. $('svg').each(function( index ) { if (!svgArray[index]) { svgArray[index] = new Array(2) }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42803409
has comment: http://stackoverflow.com/comment/42803637
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/27154239
downvote count: 0

http://stackoverflow.com/q/27294046
tagged with: datetime
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43053122
has body: I am passing this new Date into both Firefox and Chrome console (same computer, and time zone) and I am getting mixed results. Chrome is pushing the time forward to my time zone and Firefox is using the passed in time! So confusing... Firefox new Date("2014-02-27T17:00:00Z") // Passing in Console // Result: Date 2014-02-27T17:00:00.000Z Chrome / Safari new Date("2014-02-27T17:00:00Z") // Passing in Console // Result: Thu Feb 27 2014 18:00:00 GMT+0100 (CET) It is 1 hour in the difference off. Chrome says the time is 18:00:00 while FF says the time is 17:00:00 which is what I expected seen as I formatted to Zulu (UTC) time. Any help on how to get a consistent date on what is passed in to all browsers? Thanks
upvote count: 1
tagged with: google-chrome
answer count: 1
has answer: http://stackoverflow.com/a/27294217
tagged with: date
has title: new Date is formatting differently on Firefox and Chrome
tagged with: firefox
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/43079860
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27250905
has text: Regarding your second problem, I assume you are talking about the hover functionality on the package lights. If that's the case, the hover functionality is working correctly. The problem is hover is meant to turn the light on, but if the light is already on because of some package selected, so you see no change. You should use hover on an opaque light and you'll see that hover indeed works fine.

http://stackoverflow.com/comment/42968843
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27246472
has text: Each section only contains a few lines of text and an audio tag and/or a picture, so might be that i don't have enough content. Will try to add more and see if that works! thx @ArinCool

http://stackoverflow.com/comment/42829875
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27169279
has text: It's going in if now but not able to print the alert.
type: AnswerComment

http://stackoverflow.com/a/27282178
accepted answer of: http://stackoverflow.com/q/27214076
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27214076
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43374997
score: 1
upvote count: 1
has body: The solution was to remove meteor-polymer and meteor-polymer-elements package.

http://stackoverflow.com/comment/42939370
type: QuestionComment
comment on: http://stackoverflow.com/q/27231220
score: 0
type: Comment
has text: Then what's the problem?

http://stackoverflow.com/comment/42986897
type: Comment
comment on: http://stackoverflow.com/a/27256556
type: AnswerComment
has text: @Pietu1998 thanks for the edit- far more detailed :)
score: 0

http://stackoverflow.com/comment/43086351
comment on: http://stackoverflow.com/q/27312928
score: 0
has text: simple, separate it into 3 text blocks. *before* / *selected* / *after* and wrap each in its own ``, and apply styling to the span that holds the selected text.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27262730
tagged with: dynamic
linked to: http://stackoverflow.com/q/9814298
type: Question
linked to: http://stackoverflow.com/q/203198
tagged with: javascript
duplicate of: http://stackoverflow.com/q/203198
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42997974
tagged with: ajax
has comment: http://stackoverflow.com/comment/42997985
type: UnansweredQuestion
has body: I'm trying to process a form with AJAX, and then (after the response comes back through), make a popup that gives a user 2 buttons. The first AJAX request executes just fine, and the popup appears properly too. The issue is that one of the buttons in the popup does nothing when pressed. The button in question is addressed with the following code: $(".c").on("click", function(){ alert('dfgh'); }); The HTML of the popup (created by the original AJAX request) is: ….text…. ….hidden inputs…. XYZ Keep Current Codes //this is the button I'm asking about Weird thing is, that when I create a regular old button it works just fine. Only in the generated popup it doesn't. (Even though it's dynamically created, my understanding is that using ".on()" should make it work…)
has title: Button [ .on() ] Broken?
answer count: 0

http://stackoverflow.com/a/27175407
has body: 'famous/core/View' is just a module name, not a path as you would expect. It is defined in dist/famous.js:5009. They used the / convention probably as a namespace. For more info about defining a module with a name go to the requirejs docs. In short terms, one could do the following in a file named foo.js : define('foo/bar', function () { return { name: 'bar' } }); define('foo/baz', function () { return { name: 'baz' } }); And if that file foo.js is loaded at some point, one could require the following, without the need of having a folder/file structure foo/bar.js and foo/baz.js: require(['foo/bar', 'foo/baz', function (Bar, Baz) { console.log(Bar.name, Baz.name) }); p.s. i strongly suggest you read the docs, requirejs is just awesome
type: Answer
has comment: http://stackoverflow.com/comment/42849102
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27174581
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27174581

http://stackoverflow.com/q/27221105
accepted answer: http://stackoverflow.com/a/27221212
has body: EDITED FIXED AND WORKING: Jquery and bootstrap do not allow same ID - see the new UI and Jquery code below: Previously attempted to completely separate onclick events from UI as recommended by latest security practices. The use of repeat ID in Jquery and Javascript create bad mojo for onclick events even with use of 'this' - instead use chained class (empty class) behind Twitter bootstrap classes and tie onclick to new custom class. This eliminates in-line on-click event. UPDATED UI Code: //Grid Row 1 with record info preceeding //Grid Row 2 with record info preceeding JQUERY - $( document ).ready(function() { $('.cust_view').click(function() { var myRecord = $(this).attr('value'); $("#view_record_id").val(myRecord); $('form#frm_view_record').submit(); }); $('.cust_delete').click(function() { var myRecord = $(this).attr('value'); $('#delete_record_id').val(myRecord); }); });
has comment: http://stackoverflow.com/comment/42922206
tagged with: twitter-bootstrap-3
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42922319
has title: Event Listener for click event on multiple buttons of same name but different value
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27221212

http://stackoverflow.com/comment/42809882
score: 0
type: Comment
type: QuestionComment
has text: I've updated question with code!
comment on: http://stackoverflow.com/q/27157018

http://stackoverflow.com/comment/43081741
has text: @RohanKumar That's all what I have. Actually its a plugin. If its okay chick the links.. Thanks =)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27310286

http://stackoverflow.com/comment/42980110
type: Comment
type: QuestionComment
has text: @VDesign I am not binding a click event. I am calling event.
comment on: http://stackoverflow.com/q/27252989
score: 0

http://stackoverflow.com/comment/42906526
score: 0
has text: @Joe - Social ones can be a part of the technical ones as well. Coding etiquette is just as important at times as the actual technical explanations. It keeps things consistent for all developers instead of coding with quirks. There is more to programming then just the technical aspects and that goes for a lot of things in life. Food for thought.
type: Comment
comment on: http://stackoverflow.com/a/27207018
type: AnswerComment

http://stackoverflow.com/comment/43075668
type: QuestionComment
has text: So.. where is the code for changing the amount of hits?
comment on: http://stackoverflow.com/q/27306204
score: 0
type: Comment

http://stackoverflow.com/q/27281713
tagged with: jquery
has answer: http://stackoverflow.com/a/27281843
answer count: 1
favorite count: 0
has title: input (checkbox) not working in IE8 when configured with :checked
upvote count: 1
tagged with: checkbox
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43032123
accepted answer: http://stackoverflow.com/a/27281843
tagged with: internet-explorer-8
has body: For my checkbox (following), I used the JQuery condition (:checked) to check if the checkbox is clicked on. It works fine in all the browsers but just doesn't work in IE8. Any idea or assistance? &lt;input type="checkbox" id="chbx" name="samechbx" onchange="checkbox_changed(this)" /&gt; JS function checkbox_changed(el) { if ($('#chbx').is(":checked")) { //if checked, move in. } }
score: 1
linked to: http://stackoverflow.com/q/20679835
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27312635
score: 2
has body: you can use opacity #radio1 { opacity:.5; } &lt;input type="radio" id="radio1" onclick="return false" /&gt; &lt;input type="radio" id="radio2" disabled="disabled" /&gt; or just create your own style by adding any element label { display: inline-block; width: 25px; height: 25px; position: relative; } input[type="radio"] { position: absolute; visibility: hidden; } input[type="radio"] + label { border: 1px solid rgb(208, 208, 208); border-radius: 50%; } label:before { content: ''; border-radius: 50%; position: absolute; background: rgb(208, 208, 208); left: 0; top: 0; display: inline-block; width: 19px; height: 19px; margin: 3px 0 0 3px; } &lt;input type="radio" id="radio1" onclick="return false" /&gt; &lt;label for="radio1"&gt;&lt;/label&gt; &lt;input type="radio" id="radio2" disabled="disabled" /&gt; &lt;label for="radio2"&gt;&lt;/label&gt;
answers question: http://stackoverflow.com/q/27312124
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/a/27241775
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: Here is the code to display your ip address. $ip=$_SERVER['REMOTE_ADDR']; echo "IP address= $ip"; The above code will display this IP address= 122.166.115.75 $_SERVER is an array and it contains lot of information as supplied by server and one of the element is 'REMOTE_ADDR' which gives us the IP address. Here is another example of getting the server name using $_SERVER $_SERVER['SERVER_NAME'] = www.plus2net.com You can display all other elements of Array by using display elements of array. Here is a sample code. while (list ($key, $val) = each ($_SERVER)) { $key -&gt; $val } After collecting the IP address we can store in mysql table. Along with IP address we can store referrer , browser details etc. When visitors come to our website we can collect visitors IP address, referrer, browser details and others details and store them in a MySQL table. Here is the dump of the table track CREATE TABLE `track` ( `id` int(6) NOT NULL auto_increment, `tm` varchar(15) NOT NULL default '', `ref` varchar(250) NOT NULL default '', `agent` varchar(250) NOT NULL default '', `ip` varchar(20) NOT NULL default '', `ip_value` int(11) NOT NULL default '0', `domain` varchar(20) NOT NULL default '', `tracking_page_name` varchar(10) NOT NULL default '', UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; Note that the script already have mysql connection and here is the code to be used for logging visitor details to mysql table. We have used one sql insert query to add record to the table on each opening of the page. $tm=time(); $ref=@$HTTP_REFERER; $agent=@$HTTP_USER_AGENT; $ip=@$_SERVER['REMOTE_ADDR']; $strSQL = "INSERT INTO track(tm, ref, agent, ip, tracking_page_name) VALUES ('$tm','$ref','$agent','$ip','$tracking_page_name')"; $test=mysql_query($strSQL); The above code will insert the visitor details to the table name track in mysql database.
score: 1
answers question: http://stackoverflow.com/q/27241638
accepted answer of: http://stackoverflow.com/q/27241638

http://stackoverflow.com/comment/43058377
type: Comment
has text: @AbhinavMishra (updated comment) caching the values is faster over-all but it's not necessary needed in a scenario where frame rate controls the update. If you are on a tight performance budget it could matter - it's not much extra code so it depends on wanted flexibility (the cache needs to be updated if input parameters changes). The real cost is the polygon filling. You want to avoid too many fill operations, so first adding all rectangles to the path, then fill once is much faster.
comment on: http://stackoverflow.com/a/27288864
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42844528
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27177224
has text: @zerkms If that is true, then I will use the default session system. I'm happy to finally(!) get an answer that is conclusive. Now a stupid question. Is the PHPSESSID cookie not sensitive as well? I wondered just now, if they can get the accesstoken from my cookie, they can get the session id as well (even if it is temporary)?

http://stackoverflow.com/a/27186101
accepted answer of: http://stackoverflow.com/q/27185208
has comment: http://stackoverflow.com/comment/42861078
has body: Maybe this give you little idea on how to do it You can improve the code to make it more meaning full to your usage thanks
answers question: http://stackoverflow.com/q/27185208
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/comment/42823579
type: AnswerComment
has text: Thanx , this goes into the direction i was going... I think i'll be good from here on god bless you ^^
type: Comment
comment on: http://stackoverflow.com/a/27158332
score: 0

http://stackoverflow.com/comment/42954657
has text: Did you include angular-loading-bar js file in your index.html?
comment on: http://stackoverflow.com/q/27238904
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27256030
answer count: 1
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have a html table that some columns are contenteditable and some are not. My HTML Includes the File: https://github.com/mindmup/editable-table/blob/master/mindmup-editabletable.js If I Call Out: $('#detail').editableTableWidget(); It works great, I can move from cell to cell from the arrow keys and the cells highlight on select, But the only problem is that every column is contenteditable and I don't want that. If I call $('#detail').editableTableWidget().find('[contenteditable]'); The Movement of the arrow keys work but not the highlight, It doesn't seem to work. How can i call this only on my contenteditable columns? http://jsfiddle.net/2u3mhom8/ is a JSFiddle I Created to show my issue, Thank You for your help
upvote count: 1
has title: Can't Get Cell to Focus on ContentEditable Script
type: Question
has answer: http://stackoverflow.com/a/32787977
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42952922
score: 0
has text: I'm gonna post a more specific answer soon.. working on it
comment on: http://stackoverflow.com/q/27238043
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27260275
has body: My advice here would be to not use a mixin. The best way to clean up your component is to remove this logic from the component, and simply not render the component based on the result of checking Auth. The problem with this is that you have a component that is no longer consistent, because it depends on something other than its props. This doesn't really do much other than push the problem upwards, but it does allow you to have one more pure component. I can see why the mixin is attractive though, so here's a simpler way of doing what you need that doesn't involve dynamically swapping the render method: var PreventRenderUnlessAuthMixin = { componentWillMount: function () { var oldRender = this.render; this.render = function () { return Auth.check() ? this.render() : &lt;div /&gt; }.bind(this); } }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27226839

http://stackoverflow.com/comment/43087756
comment on: http://stackoverflow.com/q/27313204
has text: Seem to work in FF (looking in console). You could compare the first and last code using a diff to see what parts has changed. Also look for asynchronous issues (using a timer is a no-no with image loading).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27227792
possible better answer: http://stackoverflow.com/a/44522072
type: AnsweredQuestion
has body: I'm fairly new at react.js, so any help is greatly appreciated. I have this: https://jsfiddle.net/rzjyhf91/ Wherein I have made 2 components: an image and a button. The goal is to remove the image with a click of the button, I use unmountComponentAtNode for that, but it does not work: var App = React.createClass({ render: function() { return ( <MyImage /><RemoveImageButton /> ); } }); var MyImage = React.createClass({ render: function() { return ( ); } }); var RemoveImageButton = React.createClass ({ render: function() { return ( remove image ) }, handleClick: function(){ React.unmountComponentAtNode(document.getElementById('kitten')); } }); React.render(<App />, document.body); How can I remove a react component from another component?
has comment: http://stackoverflow.com/comment/42935015
type: Question
has title: react.js: removing a component
has comment: http://stackoverflow.com/comment/42937225
has answer: http://stackoverflow.com/a/27236097
tagged with: reactjs
answer count: 3
upvote count: 35
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/44522072
has answer: http://stackoverflow.com/a/51086914
score: 35
accepted answer: http://stackoverflow.com/a/27236097

http://stackoverflow.com/q/27241501
has title: When Loading html file with require.js error with extension
type: Question
answer count: 1
tagged with: javascript
upvote count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/27242405
accepted answer: http://stackoverflow.com/a/27242405
favorite count: 0
tagged with: requirejs
score: 2
type: AnsweredQuestion
has body: I have file reg.html Name: in require.config : requirejs.config({ paths: { reg:"/templates/reg.html" } }) When i try load template : define('ng_start',["angular","jquery","reg"],function(An,$,template){ .... }) GET /templates/registry.html.js?bust=1417489939824228.12310815788805 require.js:166 Uncaught Error: Script error for: registry http://requirejs.org/docs/errors.html#scripterror How deleted js extension from registry.html.js ?

strftime
type: Tag
tag name: strftime
tags question: http://stackoverflow.com/q/27311221

http://stackoverflow.com/comment/43000157
score: 1
has text: Create a fiddle for it .http://jsfiddle.net/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27264032

http://stackoverflow.com/q/27215557
tagged with: javascript
has answer: http://stackoverflow.com/a/27215637
score: 0
answer count: 2
type: UnansweredQuestion
has body: How can I autoload the #menu of the first two jsplayers so that it opens onload of the page? Tecnically I need to auto load this menu Thanks
has answer: http://stackoverflow.com/a/27215608
has title: autoload a href="#" with javascript
type: Question

http://stackoverflow.com/a/27155518
has comment: http://stackoverflow.com/comment/44548712
has body: You have quite a few syntax errors. Try to change: var currentTime() = new Date(); to var currentTime = new Date(); and setTimeout('renderTime()',1000); to setTimeout(renderTime,1000); You have some missing semicolons as well, but these 2 changes will make it work, as you can see in this fiddle.
type: Answer
answers question: http://stackoverflow.com/q/27154813
score: 0

http://stackoverflow.com/comment/42832663
type: Comment
type: QuestionComment
score: 1
has text: So far I've tried to make files upload-able with PHP but noticed files greater than 8,26MB can't be uploaded, then my boss came with a suggestion to use VIMEO's embed, and yes real-time is what I was going for, any change made in the admin section should effect the website emmediatly
comment on: http://stackoverflow.com/q/27170992

http://stackoverflow.com/comment/42925941
score: 0
comment on: http://stackoverflow.com/q/27220410
type: Comment
type: QuestionComment
has text: @JukkaK.Korpela can you give me links as this one I only heard from you sir, Im glad I heard this `The tabindex attribute was not valid for tr in HTML 4, and IE 8 might just follow that` but can you point me on article to get more details? thanks.

http://stackoverflow.com/comment/43194734
has text: I did as you suggested and called the compiler directly. I called Maven with the -X option and in Maven's logs I was able to spot the call it makes to the GWT compiler. Now I'm able to execute that call without invoking Maven which saves me about 5 seconds. Thanks a lot =)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27290233
type: AnswerComment

http://stackoverflow.com/a/27291604
type: Answer
has comment: http://stackoverflow.com/comment/43053535
has comment: http://stackoverflow.com/comment/43065768
has body: you should use return false after alert in validate condition, try this code function code(input){ if(input.length != "11"){ alert("Enter a Valid Phone Number"); return false; } } UPDATE If you want to accept only 11 number then try with RegEx function code(input){ if(input.match(/^[0-9]{11}$/)){ return true; } alert("Enter a Valid Phone Number"); return false; } submit button change Onclick to onClick with quote and use document.getElementById("Phone").value instead of getElementById("Phone").value &lt;input type=submit border=0 value=" " onClick='return code(document.getElementById("Phone").value)' /&gt;
has comment: http://stackoverflow.com/comment/43049031
upvote count: 3
answers question: http://stackoverflow.com/q/27291520
has comment: http://stackoverflow.com/comment/43054157
accepted answer of: http://stackoverflow.com/q/27291520
score: 3
has comment: http://stackoverflow.com/comment/43049588
has comment: http://stackoverflow.com/comment/43050465
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43050857
has comment: http://stackoverflow.com/comment/43087012
has comment: http://stackoverflow.com/comment/43053477
has comment: http://stackoverflow.com/comment/43050593
has comment: http://stackoverflow.com/comment/43053918
has comment: http://stackoverflow.com/comment/43104280

http://stackoverflow.com/comment/42939580
comment on: http://stackoverflow.com/q/27231410
has text: What is : document.getElementById("pword1") ? Paste some HTML please.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/48579115
comment on: http://stackoverflow.com/a/30219347
type: AnswerComment
score: 0
has text: WOW64 is the 32-bit mode on Windows.
type: Comment

http://stackoverflow.com/a/27155847
upvote count: 1
answers question: http://stackoverflow.com/q/27155746
has body: You could create a private method: controller-x.js var mongoose = require( 'mongoose' ), errorHandler = require( './errors' ), time = require( 'time' ), _ = require( 'lodash' ); var save = function( req, res ) { // save something }; exports.create = function( req, res ) { // create something save(); }; exports.save = save; exports.update = function( req, res ) { // update something };
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/27184759
tagged with: javascript
tagged with: scope
has body: I am using an audio-player package to play a sound locally when a node app triggers an event. When the event is triggered, a function is called with the specific file that needs to be opened as such: playSound(fileName); The separate function looks like this: player = new Player('someDirectory/' + fileName + '.mp3'); player.play(); This opens and begins playing the file perfectly well, however when events trigger in quick succession, both sounds will be simultaneously playing. While I initially thought to simply add a: player.stop(); before the 'new Player' definition, the previous instance is clearly out of scope, as the function has been called a second time. How can I stop all other instances of Player before starting playback anew?
accepted answer: http://stackoverflow.com/a/27184965
score: 3
tagged with: node.js
favorite count: 0
has title: Out of Scope Objects in NodeJS
upvote count: 3
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27184811
type: Question
possible better answer: http://stackoverflow.com/a/27184811
answer count: 2
has answer: http://stackoverflow.com/a/27184965
downvote count: 0

http://stackoverflow.com/q/27268744
has title: disable draggable on google maps in mobile
possible better answer: http://stackoverflow.com/a/27270111
has answer: http://stackoverflow.com/a/27269673
answer count: 4
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/27269673
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/35839653
has body: I want to disable dragging of maps in tablet and mobile var myOptions = { zoom: 5, scrollwheel: false, center: new google.maps.LatLng(lat_mycustom, long_mycustom), mapTypeId: google.maps.MapTypeId.ROADMAP, } map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); on pageload this is working fine.. but i want to be disabled for mobile devices. if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { alert(mobile); map.setOptions({ 'draggable': false }); } this is not working though..let me know
score: 1
has comment: http://stackoverflow.com/comment/43009023
type: Question
has answer: http://stackoverflow.com/a/27270111
has answer: http://stackoverflow.com/a/41546932
tagged with: google-maps
tagged with: mobile
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27238423
downvote count: 0
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/27244419
tagged with: assetic
has answer: http://stackoverflow.com/a/42060449
favorite count: 0
tagged with: symfony
possible better answer: http://stackoverflow.com/a/42060449
tagged with: php
type: AnsweredQuestion
has title: Symfony2 Assetic not working with multiple javascript file with the * sign
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27244419
type: Question
has body: I use Symfony2 and the assetic Bundle. (probleme when using the * sign to ask assetic to take all files) Form what I have read here and there assetic allow to use multiple javascript file. This work just fine when when I write all the file right before the &lt;'/html> tag: {% javascripts '@MySiteBlogBundle/Resources/public/js/test1.js' '@MySiteBlogBundle/Resources/public/js/test2.js' '@MySiteBlogBundle/Resources/public/js/test3.js' %} &lt;script type="text/javascript" src="{{ asset_url }}"&gt;&lt;/script&gt; {% endjavascripts %} but the same code, doesn't work if instead of listing the file, I use the * (just like this:) {% javascripts '@MySiteBlogBundle/Resources/public/js/*' %} &lt;script type="text/javascript" src="{{ asset_url }}"&gt;&lt;/script&gt; {% endjavascripts %} with the *, it works only depending on the pages which are displayed. I did all my javascipt test on class which are on my main twig template. And thoses class are displayed on all pages... So all test should be working. Anyone ever had such probleme when using this * sign with assetic? Thanks for any comment/help.

http://stackoverflow.com/a/27153086
has comment: http://stackoverflow.com/comment/42800594
answers question: http://stackoverflow.com/q/27152935
has comment: http://stackoverflow.com/comment/42800999
has comment: http://stackoverflow.com/comment/42800689
has comment: http://stackoverflow.com/comment/42802276
upvote count: 18
has comment: http://stackoverflow.com/comment/42801549
has comment: http://stackoverflow.com/comment/42800909
has comment: http://stackoverflow.com/comment/42800881
type: AcceptedAnswer
downvote count: 0
score: 18
has comment: http://stackoverflow.com/comment/42801500
has body: It's not just the border attribute on the element itself you have to worry about. Every browser comes with a 'default stylesheet` that will configure a base presentation for common HTML elements. Tables are one of those elements that need to have a style set by the site in order to override this "base style" from the browser. Browsers implement this to improve default readability on websites, but it also introduces a device which web developers must be aware of when generating their own stylesheets. Setting the following rules: table { border: none; border-spacing: 0; border-collapse: collapse; } Will solve this problem for you. jQuery can remove the attribute, but it won't trigger a redraw of the element when it's removed as opposed to updated. Since there is no overriding style element on the default CSS, the initial style is preserved. After setting the attribute, you could always clone and re-apply (or simply re-insert the element via something silly like $('table').appendTo($('table').parent()); to see the desired behavior as well. Edit: Congratulations, you found a Chrome bug The CSS renderer is still respecting the border attribute even after it's being removed. It shouldn't be. Other browsers, when running the fiddle supplied in the comments, will appropriately remove the border on the element. However! in Chrome you'll notice this little sucker hanging out on your table with a set border attribute: Note the table[Attributes Style] empty selector here Chrome is rendering this table as if it were written this way in your HTML: despite that not reflecting the information in the DOM. You should definitely submit this to the Chromium Issues List Check Ismael Miguel's comment below for further explanation, copied here What I can think of is that Chrome has a bug related to the handling of the border attribute (which is deprecated, unsupported in html5). This might happen because the border attribute isn't linked to the whole CSS style. One example is the value pr…
has comment: http://stackoverflow.com/comment/42800796
type: Answer
has comment: http://stackoverflow.com/comment/42802561
accepted answer of: http://stackoverflow.com/q/27152935

http://stackoverflow.com/a/27196596
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27196384
has comment: http://stackoverflow.com/comment/42878127
has comment: http://stackoverflow.com/comment/42879460
answers question: http://stackoverflow.com/q/27196384
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/42879255
has body: I put together a JSFiddle for you, and copied the JS code here. I tried to make it as beginner friendly as possible... $("#btnSubmit").on("click", function(){ numRows = $("tr").length; for(var i=1 ; i<numRows ; i++){ var code = $("tr:nth-child(" + i + ") td:nth-child(2)").html(); var qty = $("tr:nth-child(" + i + ") td:nth-child(3)").html(); if(code == $("#code").val()){ $("tr:nth-child(" + i + ") td:nth-child(3)").html(parseInt(qty) + 1); return true; } } $("tbody").append(" " + numRows + " " + $("#code").val() + " 1 "); return true; });
has comment: http://stackoverflow.com/comment/42879521
has comment: http://stackoverflow.com/comment/42879204
score: 2

http://stackoverflow.com/comment/42903580
comment on: http://stackoverflow.com/q/27209800
has text: @NicholasJohn16, something liks this: ``http://localhost:5984/blog-app/_local/duG9i1y5jhCLiLl6bo4_jw==?_nonce=zOBXiThr154aotPr``, where the format is ``http://localhost:5984/blog-app/_local/{id}``
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27193484
has title: How to prevent click event if click starts on child div and ends on parent (Chrome bug)
tagged with: javascript
tagged with: jquery-events
answer count: 2
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27193559
has body: I am trying to prevent click event from firing on parent if user starts click on child , then moves mouse out of child but not leaving parent while still holding it down, and then releases on parent. Both parent and child have jQuery click events assigned with event.stopPropagation(). What is expected is that there is no click event fired at all if I release mouse outside the I initially pressed mouse down. At least this is how it works on Firefox and Safari works but not on Chrome. Buttons work as they should, divs don't. Maybe there's some magic I could copy from buttons and apply to the div? http://jsfiddle.net/zd7L68b2 $('.outer').click(function(e){ console.log('Clicked outer'); }); $('.outer').moused(function(e){ console.log('Clicked outer'); }); $('.inner').click(function(e){ e.stopPropagation(); console.log('Clicked inner'); });
score: 1
upvote count: 3
downvote count: 2
tagged with: google-chrome
has answer: http://stackoverflow.com/a/71667750
type: Question

http://stackoverflow.com/comment/42921440
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27206433
has text: Thanks for the responses, folks, never seen that before.

http://stackoverflow.com/q/27170294
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Been searching for a solution to printscreen or export my amCharts. I have never used phantomJS but looking into it, I think it will help me acheive my goals. I am struggling to understand how to get started with it though, It downloads as an executable - would I run the executable as a link along with the function I would like i.e rasterize.js. It is very new to me and I would appreciate the help.
has title: How do I get started with phantomJS?
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42833043
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/42832008
score: 1
has comment: http://stackoverflow.com/comment/42831486
has answer: http://stackoverflow.com/a/27170707
type: Question
has comment: http://stackoverflow.com/comment/42831662

http://stackoverflow.com/a/27185596
score: 0
has comment: http://stackoverflow.com/comment/42882560
type: Answer
has comment: http://stackoverflow.com/comment/42884815
answers question: http://stackoverflow.com/q/27185459
has body: I don't see their definition in source code It's right in front of you... parameter of the function: function isCompatible(ua) and its default value: ua = navigator.userAgent;

http://stackoverflow.com/comment/43018825
comment on: http://stackoverflow.com/a/27274713
has text: awesome all I had left to do is start with .hide() lol!! thanks
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27208151
has body: It seems you can't just change one column value; you can change options globally with the setOptions method but you need to define all of the columns' details. function ButtonClick() { var TestGridDetails = $("#TestGrid").data("kendoGrid"), columnsConfig = TestGridDetails.options.columns; columnsConfig[6].filterable = false; TestGridDetails.setOptions({columns: columnsConfig}); }
answers question: http://stackoverflow.com/q/27185196
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/27185196
upvote count: 3

http://stackoverflow.com/a/27245178
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27245049
answers question: http://stackoverflow.com/q/27245049
score: 9
has body: You can try this: moment('2010/12/01', 'YYYY/MM/DD').format('DD/MM/YYYY')
type: AcceptedAnswer
upvote count: 9
type: Answer

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/27303307
tags question: http://stackoverflow.com/q/27219921
tags question: http://stackoverflow.com/q/27161839
tags question: http://stackoverflow.com/q/27222990
tags question: http://stackoverflow.com/q/27281655
tags question: http://stackoverflow.com/q/27253837
tags question: http://stackoverflow.com/q/27284444
tags question: http://stackoverflow.com/q/27296143
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/27214363

http://stackoverflow.com/comment/48217134
type: AnswerComment
score: 0
type: Comment
has text: @PaulM Check out this open source react-autosuggest component: http://react-autosuggest.js.org/
comment on: http://stackoverflow.com/a/27189446

http://stackoverflow.com/a/27221150
score: 0
has body: if you are not expecting a return, why not just fake the call? before the call gets made, type return; in the function. If you want the spinner action, change the cursor on body to cursor: wait; (i think that was the one) Probably not understanding your question though... ?
type: Answer
answers question: http://stackoverflow.com/q/27221119

http://stackoverflow.com/comment/42829073
has text: Indeed. @Bartosz - note that only the _values_ of `total` and `uploaded` are used to initialise the observables - the knockout observables are completely unaware of the variables themselves and have no reference to them.
comment on: http://stackoverflow.com/a/27168728
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27280668
downvote count: 0
score: 7
upvote count: 7
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27280638
type: Answer
has comment: http://stackoverflow.com/comment/43032712
accepted answer of: http://stackoverflow.com/q/27280638
has comment: http://stackoverflow.com/comment/43032467
has body: .off() must be used with the same selector and event that .on() was used with. So, to unhook this: $(document).on("keydown", updated_textarea_var, function (e) { you would use this: $(document).off("keydown", updated_textarea_var); You must target the same object (the one the original event was attached to) and you must target the appropriate event so jQuery knows which event handlers to remove. You can optionally target the secondary selector and/or the actual callback function if you want a finer grained match for what to remove. However, since you are using delegated event handling, you may not have to turn the event handling off and back on. If we understood more about what you're actually trying to do, there may be a cleaner option. For example, if you're just trying to change which textarea is being targeted by the event handler, then you can use a class name in the event handler (let's say there's a class name called "target") like this: $(document).on("keydown", ".target", function (e) { And, then to change which textarea the event handler is in action for, you just remove the class name from one textarea and add it to another. This is a key feature of delegated event handling.

http://stackoverflow.com/q/27224959
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42930735
has comment: http://stackoverflow.com/comment/42930439
has comment: http://stackoverflow.com/comment/43009507
type: Question
accepted answer: http://stackoverflow.com/a/27227903
downvote count: 0
tagged with: javascript
has body: I am trying to run example test in file google_search_test.js located at \node_modules\selenium-webdriver\example. I am using WebdriverJS and only installed the selenium-webdriver NPM package in my system. I have moved to that path location in command prompt and ran the following command: node google_search_test.js I received the following error: Error Description: Path\node_modules\selenium-webdriver\example&gt;node google_search_test.js Path\node_modules\selenium-webdriver\testing\index.js:184 exports.describe.skip = global.describe.skip; ^ TypeError: Cannot read property 'skip' of undefined at Object.&lt;anonymous&gt; (C:\Users\kanasra\Desktop\Jaguars\Automation Testing\N odeJs\node_modules\selenium-webdriver\testing\index.js:184:40) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.&lt;anonymous&gt; (C:\Users\kanasra\Desktop\Jaguars\Automation Testing\N odeJs\node_modules\selenium-webdriver\example\google_search_test.js:24:12) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10)
has title: Getting Error while trying to run example test of Selenium Webdriver (WebdriverJS)
answer count: 1
has comment: http://stackoverflow.com/comment/42928027
tagged with: node.js
favorite count: 0
has comment: http://stackoverflow.com/comment/42942352
has comment: http://stackoverflow.com/comment/42930531
has answer: http://stackoverflow.com/a/27227903
tagged with: selenium
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/42930415
tagged with: selenium-webdriver

http://stackoverflow.com/a/27183630
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42856112
has comment: http://stackoverflow.com/comment/42854801
type: Answer
has body: Since it is a new window you first need to reach the opener which is window.opener. Give your iframe an id, and you can reach it by using: document.getElementById. Putting it together, it would be something like this: window.opener.document.getElementById('youriframe').location.reload( true ); You might also call a method in the opener context: // in window opener: function refreshFrame() { document.getElementById('IdOfYourFrame').location.reload(true); } // in new window (window open) you call the method by: window.opener.refreshFrame(); I put together a Codepen Expamle to demonstrate. Be aware that this is only working in case the different window locations are from the same domain (window.opener cross-domain security).
has comment: http://stackoverflow.com/comment/42854716
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42855812
has comment: http://stackoverflow.com/comment/42854762
answers question: http://stackoverflow.com/q/27183089
has comment: http://stackoverflow.com/comment/42854735
accepted answer of: http://stackoverflow.com/q/27183089

http://stackoverflow.com/a/27276837
score: 1
accepted answer of: http://stackoverflow.com/q/27275109
upvote count: 1
has comment: http://stackoverflow.com/comment/43084091
answers question: http://stackoverflow.com/q/27275109
has comment: http://stackoverflow.com/comment/43084179
has comment: http://stackoverflow.com/comment/43080477
type: AcceptedAnswer
has body: The second argument to parseInt(string, radix); is a integer between 2 and 36 that represents the radix of the first argument string. The return value of parseInt(string, radix); will be the decimal integer representation of the first argument taken as a number in the specified radix. Now,keeping that in mind if you convert them : Input Output a (base-24) 10 (base-10) a (base-34) 10 (base-10) o (base-34) 24 (base-10) So, as you can see in third case it comes out to be 24 and bingo! there you go the condition is true. You can use any online tool to convert from one number system to another like I used this one : http://extraconversion.com/base-number/base-34 Hope this Helps!
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42827989
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27168017
type: QuestionComment
has text: your code is working...........

http://stackoverflow.com/a/27181803
score: -1
answers question: http://stackoverflow.com/q/27158945
has comment: http://stackoverflow.com/comment/42937901
has comment: http://stackoverflow.com/comment/42879513
downvote count: 1
has comment: http://stackoverflow.com/comment/66562394
has body: You've got an animation on the element that is being shown / hidden. You need to put your assertion after a timeout. Since you're only checking if it's ':visible', you don't need to wait for the entire animation to complete. I would start with 100ms (or even 0ms) and then see if you need more. For example: it("Checking #completed-task is visible", function (done) { $("#master div.onoffswitch").find("input[data-id='completed-task']").click(); // This may be needed to increase the mocha timeout. //this.timeout(100); setTimeout(function() { chai.assert.equal($("#completed-task").is(":visible"), true); done(); }, 100); }); This answer has more details and a link to docs: https://stackoverflow.com/a/15982893/361609
has comment: http://stackoverflow.com/comment/42874110
type: Answer
has comment: http://stackoverflow.com/comment/42919716
has comment: http://stackoverflow.com/comment/66554521
has comment: http://stackoverflow.com/comment/42879540
upvote count: 0
has comment: http://stackoverflow.com/comment/42879451

http://stackoverflow.com/q/27183204
downvote count: 2
has comment: http://stackoverflow.com/comment/42854067
type: Question
has comment: http://stackoverflow.com/comment/42854341
has comment: http://stackoverflow.com/comment/42854075
has comment: http://stackoverflow.com/comment/42854171
has title: What value is not strictly equal to itself & NaN in javascript
tagged with: javascript
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/27183370
has body: I need that value of a variable such that i get alert "Yes", in the code. var a; // set the value of a here ... a=? // don't edit the code below: if (a === a) { alert('No!'); } else { if (isNaN(a)) { alert('Not again!'); } else { alert('Yes'); } } What is a?
has comment: http://stackoverflow.com/comment/42853963
tagged with: nan
favorite count: 0
has comment: http://stackoverflow.com/comment/42854082
has answer: http://stackoverflow.com/a/27183853
has comment: http://stackoverflow.com/comment/42854074
accepted answer: http://stackoverflow.com/a/27183370
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/27183853
has comment: http://stackoverflow.com/comment/42853942

http://stackoverflow.com/comment/42870767
score: 0
type: AnswerComment
has text: @doniyor `some_elementid` must be the ID of the element you want to capture the onload event. In posted example, the container is `document`, you could use any static parent, e.g: `$('#container')[0].addEventListener(...);` ***As side note:*** don't forget IDs must be unique on document context
type: Comment
comment on: http://stackoverflow.com/a/27192312

http://stackoverflow.com/a/27176424
has comment: http://stackoverflow.com/comment/97509713
has comment: http://stackoverflow.com/comment/110869604
score: 32
type: Answer
has body: Here you go. Includes handling degenerate cases. Main algorithm is mostly from wikipedia article. function cuberoot(x) { var y = Math.pow(Math.abs(x), 1/3); return x &lt; 0 ? -y : y; } function solveCubic(a, b, c, d) { if (Math.abs(a) &lt; 1e-8) { // Quadratic case, ax^2+bx+c=0 a = b; b = c; c = d; if (Math.abs(a) &lt; 1e-8) { // Linear case, ax+b=0 a = b; b = c; if (Math.abs(a) &lt; 1e-8) // Degenerate case return []; return [-b/a]; } var D = b*b - 4*a*c; if (Math.abs(D) &lt; 1e-8) return [-b/(2*a)]; else if (D &gt; 0) return [(-b+Math.sqrt(D))/(2*a), (-b-Math.sqrt(D))/(2*a)]; return []; } // Convert to depressed cubic t^3+pt+q = 0 (subst x = t - b/3a) var p = (3*a*c - b*b)/(3*a*a); var q = (2*b*b*b - 9*a*b*c + 27*a*a*d)/(27*a*a*a); var roots; if (Math.abs(p) &lt; 1e-8) { // p = 0 -&gt; t^3 = -q -&gt; t = -q^1/3 roots = [cuberoot(-q)]; } else if (Math.abs(q) &lt; 1e-8) { // q = 0 -&gt; t^3 + pt = 0 -&gt; t(t^2+p)=0 roots = [0].concat(p &lt; 0 ? [Math.sqrt(-p), -Math.sqrt(-p)] : []); } else { var D = q*q/4 + p*p*p/27; if (Math.abs(D) &lt; 1e-8) { // D = 0 -&gt; two roots roots = [-1.5*q/p, 3*q/p]; } else if (D &gt; 0) { // Only one real root var u = cuberoot(-q/2 - Math.sqrt(D)); roots = [u - p/(3*u)]; } else { // D &lt; 0, three roots, but needs to use complex numbers/trigonometric solution var u = 2*Math.sqrt(-p/3); var t = Math.acos(3*q/p/u)/3; // D &lt; 0 implies p &lt; 0 and acos argument in [-1..1] var k = 2*Math.PI/3; roots = [u*Math.cos(t), u*Math.cos(t-k), u*Math.cos(t-2*k)]; } } // Convert back from depressed cubic for (var i = 0; i &lt; roots.length; i++) roots[i] -= b/(3*a); return roots; }
upvote count: 32
has comment: http://stackoverflow.com/comment/42858316
accepted answer of: http://stackoverflow.com/q/27176423
has comment: http://stackoverflow.com/comment/54728872
has comment: http://stackoverflow.com/comment/110067930
has comment: http://stackoverflow.com/comment/110077347
answers question: http://stackoverflow.com/q/27176423
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27431562
type: AcceptedAnswer
downvote count: 0
score: 6
type: Answer
has comment: http://stackoverflow.com/comment/43528516
accepted answer of: http://stackoverflow.com/q/27264146
answers question: http://stackoverflow.com/q/27264146
has body: Right now, protractor can only accept promise as capabilities if we are NOT using multicapabilities. The reason for this is because multiCapabilities runs each task in a new process, so the promise (function) cannot be passed (single capabilities work because we're not forking). Alternatively we could resolve capabilities in the launcher, before passing the resolved capabilities into the new processes; however, this will break the ability to set up proxies (https://github.com/angular/protractor/pull/1040), which relies on capability promises to be resolved after driverProvider setup. I can't think of an easy way of doing this (without large refactoring), but it is definitely doable. I created an issue for Protractor (https://github.com/angular/protractor/issues/1594). Please follow that and/or comment on it if this is something you need or you have other ideas to implement it. For now you would need to use the workaround you mentioned in your original question. UPDATE https://github.com/angular/protractor/pull/1629 supports this. Starting in protractor 1.6 (or if you sync to master) you can pass in a function to config.getMultiCapabilities like onPrepare and onCleanup. This function can return a promise to multiCapabilties (i.e. array of capabilities). See https://github.com/angular/protractor/blob/master/spec/getCapabilitiesConf.js for an example.
upvote count: 6

http://stackoverflow.com/q/27253679
has body: I am trying to acess a function of parent object from inside of a nested object. Ext.define('SearchPanel', { extend: 'common.Panel', header: false, xtype: 'search-panel', layout: 'fit', items: [ { xtype: 'form-panel', items: [ { xtype: 'datetimefield', itemId: 'from', fieldLabel: T('From'), dateConfig: { itemId: 'startDate', value: new Date(), validator: ValidateRange//trying to access "external" function here }, timeConfig: { value: '12:00 AM', itemId: 'startTime', validator: ValidateRange//trying to access "external" function here } } ], ValidateRange: //the function I'm trying to call from nested object function (value) { //validation logic } } ], }); It doesn't work. I get the error: Uncaught ReferenceError: ValidateRange is not defined
possible better answer: http://stackoverflow.com/a/49917592
downvote count: 0
has answer: http://stackoverflow.com/a/49917592
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27254615
has title: extJs access a parent function from nested object
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42984007
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27254615
tagged with: extjs
answer count: 2

http://stackoverflow.com/comment/43053942
score: 0
type: Comment
type: QuestionComment
has text: I feel pretty dumb, it says my functions aren't defined - but I cannot figure out what or where to declare it.
comment on: http://stackoverflow.com/q/27292687

http://stackoverflow.com/q/27274493
has comment: http://stackoverflow.com/comment/43019684
upvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27274613
possible better answer: http://stackoverflow.com/a/27274516
has body: I have a page with several selects like this: 1 2 1 2 Now I have an event handler to retrieve the selected value, that only works for number 8: var ready; ready = function() { $('#activity_8 #activity_projectuser_id').change(function() { console.log("yes!"); }); }; $(document).ready(ready); $(document).on('page:load', ready); How can I change the event handler so it works on any activity id?
type: AnsweredQuestion
has title: Change event handler on select with dynamic ID
has comment: http://stackoverflow.com/comment/43019319
accepted answer: http://stackoverflow.com/a/27274613
downvote count: 1
type: Question
tagged with: javascript
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/43018500
has answer: http://stackoverflow.com/a/27274516

http://stackoverflow.com/comment/42870251
type: QuestionComment
score: 0
has text: I see the spinners too
comment on: http://stackoverflow.com/q/27192164
type: Comment

webforms
tags question: http://stackoverflow.com/q/27233000
type: Tag
tag name: webforms
tags question: http://stackoverflow.com/q/27191829
tags question: http://stackoverflow.com/q/27190477

http://stackoverflow.com/comment/42973509
score: 0
type: QuestionComment
has text: thank u, anyway i got an answer somewhat similar to what i expect. cud u please hav a look at that.
comment on: http://stackoverflow.com/q/27247806
type: Comment

http://stackoverflow.com/comment/42959004
type: QuestionComment
has text: my apologize, greg the code above is working i wanted to hook in inside the code and to trigger the onclick event using hash in link thanks in advance..
comment on: http://stackoverflow.com/q/27241068
score: 0
type: Comment

http://stackoverflow.com/q/27227438
answer count: 3
tagged with: javascript
tagged with: gulp
has title: Gulp starter kit with gulp-load-plugins
score: 0
type: UnansweredQuestion
has body: I have a gulp starter kit for my project, however, I want to use gulp-load-plugins to for devDependencies of package.json file. My file structure is ProjectName Gulp -Tasks -broswerify.js -browserSync.js -jade.js -lint.js Gulpfile.js config.json package.json Gulpfile.js var requireDir = require('require-dir'); var dir = requireDir('./gulp/tasks', {recurse: true}); jade.js (Which is working as expected using gulp-load-plugins) var gulp = require('gulp'); var config = require('../../config.json'); var plugins = require('gulp-load-plugins')(); gulp.task('jade', function(){ return gulp.src(config.jade.src) .pipe(plugins.jade()) .pipe(gulp.dest(config.jade.build)) }); browsersync.js (which is not working using gulp-load-plugins) var gulp = require('gulp'); var config = require('../../config.json').browsersync; var plugins = require('browsersync'); // works //var plugins = require('gulp-load-plugins')(); // it doesn't works. gulp.task('browsersync', function () { plugins.browserSync.init(config); // (browsersync required) //plugins.browserSync.init(config) it doesn't work. (gulp-load-plugins required) }); I would like to know that if there is a better way to do that?
type: Question
has answer: http://stackoverflow.com/a/34713363
tagged with: gulp-load-plugins
has answer: http://stackoverflow.com/a/29348013
has answer: http://stackoverflow.com/a/27227515

http://stackoverflow.com/a/27262885
has comment: http://stackoverflow.com/comment/43038719
accepted answer of: http://stackoverflow.com/q/27262683
type: AcceptedAnswer
has body: When you click on a button that is inside a form, the form will be submitted automatically. This means a page reload. This is why your custom elements keep disappearing and why the alert kicks in. The console log was printed, but then removed on refresh (you can verify this by turning on the 'Preserve Log' feature on the console in Chrome) To handle this, in your submitClicked function, you need to prevent the default behavior of the form. Something like, var submitClicked = function(event) { event.preventDefault(); ... Rest of the code. }
score: 0
answers question: http://stackoverflow.com/q/27262683
type: Answer

http://stackoverflow.com/a/27162034
has body: First, height of the rect can not be a negative value. What i can think is two ways listed here: 1. Do special handling to the start y position, this is simple and better way to achieve your purpose. see fiddle here. .attr('y', function(d) { if(d.status === "System Error") { return height; } return y(d.duration) }) 2.Maybe you can draw a positive rect, and use transform to rotate to do the trick. Here is a fiddle to show you the transform fiddle .attr("transform", function() { return d3.svg.transform() .translate(200, 100) //something like this .rotate(180) .translate(-d3.select(this).attr("width"), -d3.select(this).attr("height"))(); }
answers question: http://stackoverflow.com/q/27160061
type: Answer
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/27307045
answers question: http://stackoverflow.com/q/27306938
score: 0
type: Answer
has body: Yes, you can use .load() to load a portion of an page. You may have to create separate HTML tags though, so you can target their selector. You might consider loading it all at the same time and just use CSS, making sure you have the overflow:hidden; and use .scroll(). Personally, I would break up your HTML Server Side and use AJAX to get the portions you seek.

http://stackoverflow.com/q/27164022
score: 1
possible better answer: http://stackoverflow.com/a/27164127
has answer: http://stackoverflow.com/a/27164127
type: Question
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27164172
tagged with: jquery
has answer: http://stackoverflow.com/a/27164255
favorite count: 0
has answer: http://stackoverflow.com/a/27164134
answer count: 5
has title: Issue in opening two dropdown at same time
has body: Here id dropdown fiddle http://jsfiddle.net/ym8t7Lhj/ The issue i am facing is i am having two dropdowns, if i click on one dropdown another dropdown is also opening. Can any one help me out in this. Script $(document).ready(function() { $(".dropdown dt a").click(function() { $(this).toggleClass("myclass"); $(".dropdown dd ul").toggle(); }); $(".dropdown dd ul li a").click(function() { var text = $(this).html(); $('.dropdown dt a').toggleClass('myclass'); $(".dropdown dt a span").html(text); $(".dropdown dd ul").hide(); $("#result").html("Selected value is: " + getSelectedValue("sample")); }); });
has answer: http://stackoverflow.com/a/27164304
accepted answer: http://stackoverflow.com/a/27164304
has comment: http://stackoverflow.com/comment/42820758
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/43026382
type: AnswerComment
has text: my text box contains time also.This is my textbox value "03/12/2014 23:05"
type: Comment
comment on: http://stackoverflow.com/a/27278468
score: 0

http://stackoverflow.com/q/27230155
accepted answer: http://stackoverflow.com/a/27237993
favorite count: 0
tagged with: three.js
tagged with: animation
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27237993
tagged with: javascript
has title: Animating an object from its center with sine wave in three.js
answer count: 1
downvote count: 0
has body: I am trying to replicate this effect: https://dribbble.com/shots/1754428-Wave?list=users&amp;offset=5 I want to animate a plane's vertices simlarly to the link I've provided. I know that it's achieved using a sine wave propagation, but I can't figure out how to start the movement from the central point of the plane. Right now, I have something like this (function drawFrame(ts){ window.requestAnimationFrame(drawFrame); var vLength = plane.geometry.vertices.length; for (var i = 0; i &lt; vLength; i++) { var v = plane.geometry.vertices[i]; v.z = Math.sin(ts / 500 + (v.x * (vLength / 2)) * (v.y / (vLength / 2))) * 3 + 5; } It works kind of OK, but notice how in the top left and bottom right corners the movement is inward, towards the centre of the plane and not outwards, as it should be. The other two corners are behaving in exactly the way I want them to be. Here's a link to what I currently have: http://codepen.io/gbnikolov/pen/QwjGPg All suggestions and ideas are more then welcome!

http://stackoverflow.com/q/27308498
answer count: 3
has title: how to apply CSS to this jQuery function's results?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27308578
tagged with: css
has body: I want the following search results to be returned in an unordered list with this class designation "my-results". I cannot figure out where in the code below to apply my class designation. The HTML is dynamically generated. There is no static element like this pre-existing on the page: &lt;ul class="my-results"&gt;&lt;/ul&gt; Here is the function I'm using. $(document).ready(function() { var cache = {}; $( '#top-search-input' ).autocomplete({ source: function( request, response ) { if (request.term in cache) { response(cache[request.term]); return; } $.ajax({ url: "http://example.com/search", data: { q: "*" + request.term + "*", type: "Search", view: "json", }, dataType: "json", success: function( data ) { if (data.length) { cache[request.term] = data; } response(data); } }); }, minLength: 2, select: function( event, ui ) { window.location = ui.item.url; }, }).data( 'ui-autocomplete' )._renderItem = function( ul, item ) { var elemHTML = $('&lt;a&gt;&lt;/a&gt;').attr('href', item.url); elemHTML.append('&lt;span class="thumbnail"&gt;&lt;img src="' + item.thumbnail + '" /&gt;&lt;/span&gt;'); elemHTML.append('&lt;span class="title"&gt;' + item.title + '&lt;/span&gt;'); return $( '&lt;li class="ui-menu-item" &gt;' ) .append( elemHTML ) .appendTo( ul ); }; });
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27308838
score: 0
has answer: http://stackoverflow.com/a/27308585

http://stackoverflow.com/comment/42844681
has text: @frenchie Phongap is browser based app.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27173585

http://stackoverflow.com/comment/42831993
type: Comment
type: QuestionComment
has text: `/([12]\d|0[1-9]|3[0-1])-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2,4})/i`
comment on: http://stackoverflow.com/q/27170561
score: 0

http://stackoverflow.com/comment/42956355
score: 0
type: Comment
type: QuestionComment
has text: Yes, the hover is triggering and clearing the animation, and resumes when mouse leaves.
comment on: http://stackoverflow.com/q/27237115

http://stackoverflow.com/comment/43080322
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27300900
score: 0
has text: I'm sorry. https://github.com/wagerfield/flat-surface-shader/blob/master/deploy/fss.js#L907 this.gl.bufferData(this.gl.ARRAY_BUFFER, buffer.data, this.gl.DYNAMIC_DRAW);

http://stackoverflow.com/comment/42806801
comment on: http://stackoverflow.com/q/27155259
has text: Unfortunately, I couldn't get it to work. See EDIT above.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27233223
upvote count: 1
score: 1
has body: Info: https://docs.angularjs.org/api/ng/function/angular.element Note: If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite." ** Just use jquery or jqLite!!! ** If you don't use jquery, but only Angularjs don't worry. You already have an abbreviated version of jquery wrapped up in your Angularjs file. Right click on any item in the DOM in the browser (for this example, I'm using Google Chrome Version 39.0.2171.71 (64-bit)) Open the console tab and type this in - angular.element($0) you should get the item back like this [ ] Now try angular.element($0).scope() You will get the scope object with all it's goodies. Let's say it's the controllers scope. Then you can influence it directly in the browser. In this examples scope, there are userRoles. Let's change the value in the browser... angular.element($0).scope().userRole Says it's "guest" so let's change it to "bananas" angular.element($0).scope().userRole = 'bananas' Now says it's 'bananas' This is certainly useful to view what variable values are in the DOM, however if you want to change something and see the results you have to manipulate something in the DOM to see the changes. For example... HELLO If you change the variable butter from it's loaded state, let's say it loaded true and is visible in the DOM and you change it to false angular.element($0).$parent.butter = false The change will not be visible in the current DOM without manipulating something in the DOM first. In this example, the div should disappear, but will not. After I set ng-show butter to false, I need to click on something in the DOM to get the DOM to refresh it's state based on the changed value. Something else... $0 represents the item you have highlighted in your elements tab. If you do this... angular.element($1) it will return something as well as trying angular.element($2) however it ends the…
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27233222
accepted answer of: http://stackoverflow.com/q/27233222
type: Answer

http://stackoverflow.com/comment/42892735
type: Comment
comment on: http://stackoverflow.com/q/27205048
score: 0
type: QuestionComment
has text: Did you link the jquery script?

http://stackoverflow.com/q/27216531
type: Question
has title: Set a value in hidden null field in Chrome/IE11/Firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/42913241
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27216985
favorite count: 0
has comment: http://stackoverflow.com/comment/42913111
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to set a value in subtext in JavaScript. Say Disptext has some value which I want to set in reportSubtext. This piece of code is working fine in IE8 but not in Chrome/IE11/Firefox. I am getting error like can't set value of an object which is already null. subtext is a hidden field. here is the definition of subtext : &lt;input type="hidden" name="reportSubText" value=" c:out value='${reportSubText}' c:set var="reportSubText" value="${reportSubText}"&gt; document.getElementById('SubText').value = DispText document.getElementById('SubText').value is null at the time of execution.
downvote count: 0
tagged with: internet-explorer-11
has answer: http://stackoverflow.com/a/27216993
score: 1
has comment: http://stackoverflow.com/comment/42912929
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42912921

http://stackoverflow.com/a/27289977
downvote count: 0
has body: There's little wrong in your jQuery. You are missing the ending round bracket ) and semicolon ;. So your jQuery should look something like this : jQuery : $("#selectAll").click(function () { $("#selectAll").hide(); $("#removeAll").show(); }); Now as i've tried in the following fiddle here, the anchors are displayed in same position. So there might be something wrong with your css code. Share the css code to get in detailed solution.
answers question: http://stackoverflow.com/q/27289367
type: Answer
upvote count: 1
score: 1

asp.net-mvc
tags question: http://stackoverflow.com/q/27312750
tags question: http://stackoverflow.com/q/27229042
tags question: http://stackoverflow.com/q/27172763
tags question: http://stackoverflow.com/q/27262808
tags question: http://stackoverflow.com/q/27158853
tags question: http://stackoverflow.com/q/27155259
tags question: http://stackoverflow.com/q/27272147
tags question: http://stackoverflow.com/q/27185416
tags question: http://stackoverflow.com/q/27310014
tags question: http://stackoverflow.com/q/27232042
tags question: http://stackoverflow.com/q/27269954
tags question: http://stackoverflow.com/q/27287336
tags question: http://stackoverflow.com/q/27236860
tags question: http://stackoverflow.com/q/27199031
tags question: http://stackoverflow.com/q/27203072
tags question: http://stackoverflow.com/q/27281186
tags question: http://stackoverflow.com/q/27187289
tags question: http://stackoverflow.com/q/27268691
tags question: http://stackoverflow.com/q/27233493
tags question: http://stackoverflow.com/q/27183992
tags question: http://stackoverflow.com/q/27289236
tags question: http://stackoverflow.com/q/27167344
tags question: http://stackoverflow.com/q/27241010
tags question: http://stackoverflow.com/q/27160000
tags question: http://stackoverflow.com/q/27293326
tags question: http://stackoverflow.com/q/27184130
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/27232395
tags question: http://stackoverflow.com/q/27232964
tags question: http://stackoverflow.com/q/27225575
tags question: http://stackoverflow.com/q/27295444
tags question: http://stackoverflow.com/q/27193147
tags question: http://stackoverflow.com/q/27244773
tags question: http://stackoverflow.com/q/27309260
tags question: http://stackoverflow.com/q/27196576
tags question: http://stackoverflow.com/q/27244515
tags question: http://stackoverflow.com/q/27228251
tags question: http://stackoverflow.com/q/27234005
tags question: http://stackoverflow.com/q/27235531
tags question: http://stackoverflow.com/q/27181896
tags question: http://stackoverflow.com/q/27267942
tags question: http://stackoverflow.com/q/27239196
tags question: http://stackoverflow.com/q/27176739
tags question: http://stackoverflow.com/q/27186242
type: Tag
tags question: http://stackoverflow.com/q/27268426
tags question: http://stackoverflow.com/q/27159086
tags question: http://stackoverflow.com/q/27199872
tags question: http://stackoverflow.com/q/27230744
tags question: http://stackoverflow.com/q/27209777
tags question: http://stackoverflow.com/q/27281919
tags question: http://stackoverflow.com/q/27269135
tags question: http://stackoverflow.com/q/27191979
tags question: http://stackoverflow.com/q/27255632
tags question: http://stackoverflow.com/q/27249459

http://stackoverflow.com/a/27229460
answers question: http://stackoverflow.com/q/27229350
has comment: http://stackoverflow.com/comment/42938794
accepted answer of: http://stackoverflow.com/q/27229350
upvote count: 1
type: AcceptedAnswer
has body: That is because that is a separate if condition. So, it will move on to the next condition regardless of the outcome. I suppose you will have to use else part with the first if condition to get the expected result that you're wanting. function passwordValidation() { var uname = document.getElementById("pword1").value; var pword = document.getElementById("cPassword").value; var matchCol = "#009900"; var noMatchCol = "#CC0000"; var noBg = "#FFFFFF"; var passReq = new RegExp("^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\\\+\=\"\.\[\]_£|`¬':;~{}&lt;&gt;()#?!@$%^&amp;*-]).{8,20}$"); if (uname.length &lt; 1 || pword.length &lt; 1) { cPassword.style.backgroundColor = noBg; match = ""; } else { // this should solve the problem if (passReq.test(pword)) { DIMR = "Does Meet Requirements"; } else { DIMR = "Does Not Meet Requirements"; } if (uname == pword) { match = "Match!"; cPassword.style.backgroundColor = matchCol; } else { match = "No Match!"; cPassword.style.backgroundColor = noMatchCol; } document.getElementById("combination").innerHTML = match; document.getElementById("reqMeeting").innerHTML = DIMR; } }
has comment: http://stackoverflow.com/comment/42936426
has comment: http://stackoverflow.com/comment/42936646
type: Answer
has comment: http://stackoverflow.com/comment/42936360
has comment: http://stackoverflow.com/comment/42936237
downvote count: 0
has comment: http://stackoverflow.com/comment/42936162
score: 1
has comment: http://stackoverflow.com/comment/42938713
has comment: http://stackoverflow.com/comment/42940003
has comment: http://stackoverflow.com/comment/42935988

http://stackoverflow.com/a/27235170
answers question: http://stackoverflow.com/q/27234667
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: In principle, there are two ways of accessing attribute values in objects. The first form is what you're using in your code: d.attribute This works fine if the name of the attribute is static. If it isn't, the second form is better: d["attribute"] It achieves exactly the same thing, except that you can pass any (dynamically-generated) string. So in your case you need to use d[whatSelection]
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27234667

http://stackoverflow.com/q/27304023
tagged with: javascript
favorite count: 0
answer count: 1
tagged with: css
has title: Hint StackExchange voting buttons with Pentadactyl
upvote count: 3
has answer: http://stackoverflow.com/a/27311854
linked to: http://stackoverflow.com/q/7642746
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27311854
tagged with: vimperator
type: Question
has body: How can I get Pentadactyl (a fork of Vimperator) to hint voting arrows on StackExchange? For example, I want to upvote this question and answer but Pentadactyl does not provide hinting for the voting arrow buttons even after I removed my .pentadactylrc file and restarted Firefox. Is there any way to view the currently mapped keys in Vim? I think I'm not getting hinting for any questions but I'm not 100% sure. I've never had problems with Vimperator on StackOverflow and I expect that Pentadactyl should have most if not all of the features that Vimperator does. I suspect that the description of the hinttags' 'ht' setting on this page describing Pentadactyl settings is the key to figuring this out. http://5digits.org/help/pentadactyl/options.xhtml Unfortunately I wouldn't know a CSS selector or XPath expression from my own elbow. Is this the solution and if so, what CSS selector describes a SO voting button? If not, what is the solution?
tagged with: firefox
downvote count: 0

http://stackoverflow.com/comment/42945155
score: 3
has text: Well, the issue is either that your file isn't the right place, the file name is incorrect (hint: it's case sensitive in most cases), or some sort of permissions or configuration problem preventing access. In any case, the HTML snippet won't help us help you.
comment on: http://stackoverflow.com/q/27234215
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27204598
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27204198
has body: Where does "$score.username" come from? github.getRepoDetails($score.username, $scope.reponame) I think that you are missing a dependency for the $score or you have just misspelled $scope.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27204198

jquery-events
tags question: http://stackoverflow.com/q/27161595
tags question: http://stackoverflow.com/q/27275279
tag name: jquery-events
tags question: http://stackoverflow.com/q/27169469
tags question: http://stackoverflow.com/q/27190801
tags question: http://stackoverflow.com/q/27263925
tags question: http://stackoverflow.com/q/27281655
type: Tag
tags question: http://stackoverflow.com/q/27187782
tags question: http://stackoverflow.com/q/27185817
tags question: http://stackoverflow.com/q/27307212
tags question: http://stackoverflow.com/q/27169364
tags question: http://stackoverflow.com/q/27259886
tags question: http://stackoverflow.com/q/27195525
tags question: http://stackoverflow.com/q/27231254
tags question: http://stackoverflow.com/q/27239039
tags question: http://stackoverflow.com/q/27193484

http://stackoverflow.com/a/27205593
has comment: http://stackoverflow.com/comment/42909777
type: Answer
has comment: http://stackoverflow.com/comment/42896137
downvote count: 1
upvote count: 0
has comment: http://stackoverflow.com/comment/42893880
answers question: http://stackoverflow.com/q/27205362
score: -1
has comment: http://stackoverflow.com/comment/42899193
has comment: http://stackoverflow.com/comment/42893994
has body: i don't think its necessary to put a data attribute on the select options. just use value for the monetary value and the html text field for the option text. Fiddle A B C D javascript: $(function(){ $('select[name="Menu"]').change(function(){ var textId= $(this).data('text'); var price = $( "option:selected").val(); $('#'+textId).val(price); }); });

http://stackoverflow.com/comment/43054668
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27275218
has text: You are creating an extension to the Chrome?

http://stackoverflow.com/q/27204404
answer count: 3
possible better answer: http://stackoverflow.com/a/34738021
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/62198806
has answer: http://stackoverflow.com/a/34738021
favorite count: 0
has title: Bootstrap Selectpicker will not reset using built-in functions
has answer: http://stackoverflow.com/a/27204908
tagged with: twitter-bootstrap
has body: I have an array of Bootstrap Selectpickers for filtering results from a database. I need a way of resetting all the selectpickers to 'Nothing Selected', this is my code: HTML By Group etc... JS ajax_fetch('build_group_options', {groupno:groupno}).done(function(html) { //var html is a list of options in html format $('#groups').html(html).find('option[value=""]').remove(); //refresh the selectpicker to make sure options are registered in the picker $('.selectpicker').selectpicker('refresh'); }); Try to reset all the pickers: $('#reset_filters').click(function() { $('.selectpicker').selectpicker('deselectAll'); $('.selectpicker').selectpicker('render'); $('.selectpicker').selectpicker('refresh'); $(this).closest('form').find('.selectpicker').each(function() { $(this).selectpicker('render'); }); }); As you can see I have tried all the functions to reset but to no avail so am obviously doing some wrong further up the logic.
accepted answer: http://stackoverflow.com/a/27204908
type: AnsweredQuestion
type: Question
score: 5
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/71926216
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/71953196
tagged with: ajax

http://stackoverflow.com/comment/43063535
type: QuestionComment
has text: @Bergi if you wish so please provide an answer and I will accept it, your comment brought me to the path of solving my problem! Thanks!
score: 0
comment on: http://stackoverflow.com/q/27299194
type: Comment

http://stackoverflow.com/comment/42830405
comment on: http://stackoverflow.com/q/27169730
type: Comment
type: QuestionComment
has text: @lsp - It's generally inserted by the browser if you forget it
score: 3

http://stackoverflow.com/a/27242508
answers question: http://stackoverflow.com/q/27240829
has comment: http://stackoverflow.com/comment/42982960
type: Answer
has body: you can also use for dragg and drop aculo script. it will provide you many features . I have applied in my website. Reference: http://madrobby.github.io/scriptaculous/draggable/
score: 0

http://stackoverflow.com/q/27302126
has body: I just can't get my code to work. I want to append a multiline String to my body using jQuery. But when I define the string using a backslash for each line break, I get "Unexpected token ILLEGAL" Error. What am I doing wrong? My Code: var first = true; function showPopup(text, title) { //Fügt HTML und CSS für Popup-Box zum Body des HTML Dokumentes hinzu. if (first) { var string1 = ' \ \ \ \ \ Schließen \ \ '; In the line below is the first error: var string2 = ' '; $("body").append(string1); $("body").append(string2); first = false; } //Setzt den Titel und den Text der Popup-Box. $("#popup #text").innerHTML = text; $("#popup #title").innerHTML = title; //Öffnet die Box togglePop(); } So, what I am doing wrong? I would be grateful for help.
tagged with: javascript
tagged with: jquery
has title: Backslashes in jQuery Error "Unexpected token ILLEGAL"
linked to: http://stackoverflow.com/q/805107
answer count: 1
has answer: http://stackoverflow.com/a/27302174
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27302174
tagged with: css
type: AnsweredQuestion
score: 0
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/43037467
type: AnswerComment
has text: The test passes in Chrome because Chrome does what we *expect* it to do. Internet Explorer presently fails because it *does not* do what we expect.
comment on: http://stackoverflow.com/a/27284179
score: 0
type: Comment

http://stackoverflow.com/a/27155798
answers question: http://stackoverflow.com/q/27155480
has body: You need to set a click event on document to close the box. I tried to keep your original click function intact. $(document).ready(function(){ var $content = $(".contentcone").hide(); $(".togglecone").on("click", function(e){ $(this).addClass("expandedcone"); $content.slideDown(); }); $(this).on('click', function(e) { if ($(e.target).is('.togglecone')) { // don't slide up if you click the cone return; } if ($(".togglecone").hasClass('expandedcone')) { $content.slideUp(); $(this).removeClass("expandedcone"); } }); }); http://jsfiddle.net/SCKhf/925/
type: Answer
score: 0

http://stackoverflow.com/a/27167984
has comment: http://stackoverflow.com/comment/42827645
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42827748
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27167911
has body: Try this: $('#scaled_frame').contents().find(domPath).click();
has comment: http://stackoverflow.com/comment/42835566
accepted answer of: http://stackoverflow.com/q/27167911

http://stackoverflow.com/comment/73309568
type: AnswerComment
type: Comment
has text: I have stumbled across this answer in 2017, do these the two best solutions still remain the best to use?
comment on: http://stackoverflow.com/a/27192753
score: 6

http://stackoverflow.com/a/39481101
has comment: http://stackoverflow.com/comment/67435219
type: Answer
answers question: http://stackoverflow.com/q/27266550
has body: Heres what I've got: function steamrollArray(arr) { // the flattened array var newArr = []; // recursive function function flatten(arr, newArr) { // go through array for (var i = 0; i &lt; arr.length; i++) { // if element i of the current array is a non-array value push it if (Array.isArray(arr[i]) === false) { newArr.push(arr[i]); } // else the element is an array, so unwrap it else { flatten(arr[i], newArr); } } } flatten(arr, newArr); return newArr; }
score: 0

http://stackoverflow.com/a/27260875
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27249745
answers question: http://stackoverflow.com/q/27249745
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43005631
has body: You can add a custom parse function to put the contents of the as a property of the placemark, for use in a button click handler function. Proof of concept code snippet: var geoXml; var map; function initialize() { var myOptions = { center: new google.maps.LatLng(36.82907321372808, -4.46044921875), zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); geoXml = new geoXML3.parser({ map: map, singleInfoWindow: false, pmParseFn: parsePlacemark, // afterParse: useTheData }); geoXml.parseKmlString(file2kml); google.maps.event.addDomListener(document.getElementById('toggle'), 'click', toggle); } // Custom placemark parse function function parsePlacemark (node, placemark) { var tagNodes = node.getElementsByTagName('Codigo'); var tag = null; if (tagNodes && tagNodes.length && (tagNodes.length > 0)) { placemark.tag = geoXML3.nodeValue(tagNodes[0]); } } function toggle() { var tag = document.getElementById('tag').value; for (var i=0; i < geoXml.docs[0].placemarks.length; i++) { if (geoXml.docs[0].placemarks[i].tag == tag) if (geoXml.docs[0].placemarks[i].marker.getMap() == null) { geoXml.docs[0].placemarks[i].marker.setMap(map); } else { geoXml.docs[0].placemarks[i].marker.setMap(null); } } } google.maps.event.addDomListener(window, "load", initialize); var file2kml = "<?xml version='1.0' encoding='UTF-8' ?> PR-A 239 Algatocín – Benarrabá PRA-239 -5.28165881693292,36.5697241462153 #Ruta_PRA PR-A 267 Pico del Vilo PRA-267 -4.25874817605722,36.9917987986663 #Ruta_PRA PR-A 239 Los Nacimientillos – Las Pilas PRA-239 -5.27479155176616,36.5748306219344 #Ruta_PRA PR-A 239 Estación de Benaoján - Jimera de Líbar PRA-239 <Snippet/> 1 clampToGround -5.246115,36.712255 -5.246242,36.711970 -5.245898,36.711291 -5.246101,36.710594 -5.246349,36.710255 -5.246487,36.710018 -5.246646,36.709709 -5.246632,36.709610 -5.246664,36.709555 -5.247046,36.708836 -5.247169,36.708446 -5.247158,36.708447 -5.247331,36.708245 -5.24753…

http://stackoverflow.com/comment/65943731
score: 0
has text: According to: http://googlegeodevelopers.blogspot.co.at/2014/11/localization-of-street-addresses-in.html Its not possible.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27300537

http://stackoverflow.com/q/27287766
has title: Trying to write JSON data to a txt file using Ajax and PHP
tagged with: php
has answer: http://stackoverflow.com/a/27288422
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43077398
has body: My project is to take input from the user and write it to the end of a text file in JSON format using ajax and php. Problem is that the php only writes the time and date to the end of the file and nothing else. I took the example from a previous post and modified it here for my purposes. Here's the html movie.html: MOVIE NAME: Here's the movie.js file which sends the data via Ajax: function addStuff(){ var movie_name_entered = document.getElementById("box").value; var movieList = document.getElementById("list"); var hr= new XMLHttpRequest(); var url= "movie.php"; hr.open("POST",url,true); hr.setRequestHeader("Context-type","application/x-www-form-urlencoded"); var param = "film=" + movie_name_entered; hr.setRequestHeader("Content-length", param.length); hr.setRequestHeader("Connection", "close"); hr.onreadystatechange= function(){ if(hr.readyState==4 && hr.status==200){ var return_data=hr.responseText; console.log(hr.responseText); document.getElementById("status").innerHTML=return_data; } } hr.send(param); document.getElementById("status").innerHTML = "processing..."; } Here's the php (btw, I console.logged the data being sent to the php and it is correct): <?php if($_POST){ $data = $_POST["film"]; $file ='movie.txt'; $fp = fopen($file, "a"); $encoded = json_encode($data); fwrite($fp, $encoded); fclose($fp); return $encoded;} ?> As mentioned above, the code only writes the time and date to the text file and nothing more no matter what I do. I tested the data being sent and it's valid $_POST data. I'm not sure how else to proceed. Any helop would be appreciated. Thx!
has comment: http://stackoverflow.com/comment/43070759
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/27288422
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27288105
has answer: http://stackoverflow.com/a/27288105
score: 0
answer count: 2
tagged with: ajax

http://stackoverflow.com/comment/43042084
score: 0
type: AnswerComment
type: Comment
has text: Would it be better to use closure to fully hide the member functions and variables?
comment on: http://stackoverflow.com/a/27287586

http://stackoverflow.com/a/27221793
has comment: http://stackoverflow.com/comment/42922597
has comment: http://stackoverflow.com/comment/42923017
has comment: http://stackoverflow.com/comment/42922985
score: 6
has comment: http://stackoverflow.com/comment/42922494
has comment: http://stackoverflow.com/comment/42922402
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42922961
accepted answer of: http://stackoverflow.com/q/27221767
answers question: http://stackoverflow.com/q/27221767
has comment: http://stackoverflow.com/comment/42922547
has body: No, it would not. value is never executed. Try this instead: title text here EDIT: Shown how to test for existence of the input, and removed the arcane way of finding title since there is a better way. Although, in this case, you might know that you've created the input field, and take it as granted that it is there (your program should make an error if it's not, just like it should make an error if you delete a line from the code itself. I would only have such a check on HTML that I do not control. It might be a personal choice though, I know I don't do enough defensive programming. EDIT2: jasonscript has a point, but I thought it would confuse the OP even more. If you want a best-practices answer though, you'd do some variety of this, to avoid global variables: (function(theInput) { if (theInput) { theInput.value = document.title; } })(document.getElementById('titleinput'));
type: Answer
upvote count: 6

mathquill
tags question: http://stackoverflow.com/q/27273788
tags question: http://stackoverflow.com/q/27217242
type: Tag
tag name: mathquill

http://stackoverflow.com/comment/42936868
type: QuestionComment
comment on: http://stackoverflow.com/q/27228656
has text: @LimboExile, it's empty when you first open it. With the the "Network" open, refresh the page.
score: 0
type: Comment

http://stackoverflow.com/a/27208269
type: Answer
answers question: http://stackoverflow.com/q/27207999
score: 0
has body: Try this: function removeReturn(ary){ var b = [], a = []; for(var i=0,l=ary.length; i&lt;l; i++){ var s = ary[i].split(''); for(var n=0,c=s.length; n&lt;c; n++){ if(s[n] === '\u021B5')s[n] = ''; } b.push(s.join('')); } for(var i=0,l=b.length; i&lt;l; i++){ var x = b[i]; if(x !== '')a.push(x); } return a; }

http://stackoverflow.com/a/27156293
has comment: http://stackoverflow.com/comment/42808116
has comment: http://stackoverflow.com/comment/45682157
accepted answer of: http://stackoverflow.com/q/27153528
has comment: http://stackoverflow.com/comment/42808399
has comment: http://stackoverflow.com/comment/42809035
has comment: http://stackoverflow.com/comment/42809163
answers question: http://stackoverflow.com/q/27153528
type: Answer
upvote count: 16
has comment: http://stackoverflow.com/comment/58419238
has comment: http://stackoverflow.com/comment/42808690
score: 16
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42810707
has body: Here's a simple solution: Codepen illustrating a simple fix Here's the meat of what we're doing: ion-scroll[direction=x] { width: 100vw; } ion-scroll[direction=y] { height: 100vh; } That will allow your scrolls to work as expected in your Ionic app (and, in fact, this is what I do in mine as part of the CSS boilerplate). GIF: in action on CodePen

http://stackoverflow.com/a/27182530
answers question: http://stackoverflow.com/q/27182451
upvote count: 1
has body: JSfiddle is adding JS with onload - so that should work - $( document ).ready(function() { console.log( "ready!" ); $("#popUp-login").click(function() { $("#login-PopUp-box").css("display", "block"); }); });
has comment: http://stackoverflow.com/comment/42862516
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42854590

http://stackoverflow.com/comment/42924874
has text: @edmund_spenser what do you mean?
type: AnswerComment
comment on: http://stackoverflow.com/a/27188715
score: 0
type: Comment

http://stackoverflow.com/a/27220701
upvote count: 1
has comment: http://stackoverflow.com/comment/42944137
type: AcceptedAnswer
has body: Refined Answer: Try this jsfiddle: http://jsfiddle.net/a1smjgrv/5/. It will accomplish what you're looking for and is much simpler than trying to bind multiple click events on the same element. Original Answer: The problem is that when the page is loaded, there are not any 'branch1', 'ornament1', or 'light1' elements on the page, so the click event containing the alert() is not being bound to anything. There are only 'branch' elements on the page, so the click events for the branches are all that's bound. When the tree is powered ON and the 'branch' elements are changed to be a 'branch1' class, the click event containing the className update are still attached to that element. So, when it tries to update the class name based on your object literal ({light: 'branch', branch: 'ornament', etc...}), it can't find a match for any of those because the class name of the given element is now 'branch1' instead of 'branch', so it's setting the class name on the element to 'undefined' (hence, the disappearance). If you want a function to be bound to an element at any point in time that the element is rendered to the page, you'll need to bind it at the document level instead. Something like the following: $(document).on('click', 'branch1', function() { alert('SHAZAM!'); });
has comment: http://stackoverflow.com/comment/43217046
has comment: http://stackoverflow.com/comment/43022840
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27220506
score: 1
has comment: http://stackoverflow.com/comment/43021487
answers question: http://stackoverflow.com/q/27220506
has comment: http://stackoverflow.com/comment/42937592
has comment: http://stackoverflow.com/comment/42943157

http://stackoverflow.com/q/27270040
favorite count: 0
type: UnansweredQuestion
tagged with: symfony
upvote count: 1
type: Question
tagged with: yui
has body: This is an error of assetic:dump in Symfony2. [Assetic\Exception\FilterException] An error occurred while running: '/usr/bin/java' '-jar' '/path/to/java/yuicompressor-2.4.8.jar' '--charset' 'UTF-8' '-o' '/tmp/YUI-OUT-NynbGd' '--type' 'js' '/tmp/YUI-IN-2GZ9rr' Error Output: Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:635) at java.util.ArrayList.get(ArrayList.java:411) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.getToken(JavaScriptCompressor.java:578) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSymbolTree(JavaScriptCompressor.java:1094) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.compress(JavaScriptCompressor.java:556) at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:186) ... 5 more Input: I think an error is somewhere of a script. How should I do to identify an error point?
score: 1
has title: How should I do to identify an error point in assetic:dump of Symfony2?
has answer: http://stackoverflow.com/a/27271147
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: assetic

http://stackoverflow.com/comment/43065758
has text: and you just made `.php_sp`
type: Comment
comment on: http://stackoverflow.com/a/27301046
score: 2
type: AnswerComment

http://stackoverflow.com/a/27312431
has comment: http://stackoverflow.com/comment/43086264
answers question: http://stackoverflow.com/q/27312319
score: 0
has comment: http://stackoverflow.com/comment/43086724
has comment: http://stackoverflow.com/comment/43086063
has comment: http://stackoverflow.com/comment/43087642
has comment: http://stackoverflow.com/comment/43158408
has comment: http://stackoverflow.com/comment/43089282
has comment: http://stackoverflow.com/comment/43088397
has comment: http://stackoverflow.com/comment/43088340
has comment: http://stackoverflow.com/comment/43086033
has comment: http://stackoverflow.com/comment/43122874
has comment: http://stackoverflow.com/comment/43086004
type: Answer
has comment: http://stackoverflow.com/comment/43089582
has comment: http://stackoverflow.com/comment/43181010
has comment: http://stackoverflow.com/comment/43197142
has comment: http://stackoverflow.com/comment/43088869
has comment: http://stackoverflow.com/comment/43085662
has comment: http://stackoverflow.com/comment/43090055
has comment: http://stackoverflow.com/comment/43090212
has body: $( document ).ready(function() { $('#provincie').on('change', function(event){ if($(this).val() == '#provincie'){ $("#result_div").empty() }else{ var values = $(this).serialize(); $.ajax({ url: "toevoegen.php", type: "post", data: values, success: function(data){ $("#result_div").empty().append(data); }, error:function(){ $("#result_div").empty().append('something went wrong'); } }); } }); }); Hope it will work for you. If it didnt please let me know.
has comment: http://stackoverflow.com/comment/43085964

http://stackoverflow.com/comment/43062444
type: AnswerComment
score: 0
has text: In principle this answers my question, unfortunately here (jsf 1.2, richfaces 3.3.2) only the Ctrl+V works, pasting via context menu not.
type: Comment
comment on: http://stackoverflow.com/a/27296351

w3c
type: Tag
tag name: w3c
tags question: http://stackoverflow.com/q/27206268

http://stackoverflow.com/comment/42883345
has text: I want to get the id from comment.php in your Ajax callback. But its not work sir.
comment on: http://stackoverflow.com/q/27199490
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27222202
tagged with: php
has body: I tried to use a column chart example given in Highcharts tutorial. This code should work fine. Someone please help me to figure out the problem. I attach the code below. I don't know why it only shows blank page. Column chart with data from MySQL using Highcharts Here is data.php. I think there is nothing wrong about this php. <?php $con = mysql_connect("localhost","*****","*******"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test_youtube", $con); $query = mysql_query("SELECT month, wordpress, codeigniter, highcharts FROM project_requests"); $category = array(); $category['name'] = 'Month'; $series1 = array(); $series1['name'] = 'Wordpress'; $series2 = array(); $series2['name'] = 'CodeIgniter'; $series3 = array(); $series3['name'] = 'Highcharts'; while($r = mysql_fetch_array($query)) { $category['data'][] = $r['month']; $series1['data'][] = $r['wordpress']; $series2['data'][] = $r['codeigniter']; $series3['data'][] = $r['highcharts']; } $result = array(); array_push($result,$category); array_push($result,$series1); array_push($result,$series2); array_push($result,$series3); print json_encode($result, JSON_NUMERIC_CHECK); mysql_close($con); ?>
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42929426
type: Question
has title: Highcharts(cloumn chart) not displaying anything just blank html page
tagged with: highcharts
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42924362
has comment: http://stackoverflow.com/comment/42941714
has comment: http://stackoverflow.com/comment/42968971
has comment: http://stackoverflow.com/comment/42923529
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27264749
has body: There are four main divs i have one button and another container div in the main div. when i press the button the container div is visible and text of the button changes but all the main divs are visible my problem is i want to hide all other divs, the main div whose button is pressed should be visible along with the container div rest other main divs should be hidden . but i am not able to hide other main divs <?php for($i=0;$i<=3;$i++) { echo" sometext:-$url sometext :$b sometext :$c sometext :$d sometext :$e sometext :$f sometext :$g $i"; echo " sometext:-$url sometext :$b sometext :$c sometext :$d sometext :$e sometext :$f sometext :$g "; echo " "; } ?> when we click a button two events are held 1:- all other main divs and container divs are hidden leaving the one div whose button has been pressed 2:- the div whose button is pressed in that both the main div and container div are shown and the text of the button is changed to collapsed when we click the button again the events held are 1:- all the main divs are shown and container divs are hidden 2:- text of the button is changed to expand out of the above mentioned events many have been achieved . Problem is we are not able to hide rest of the main div leaving the current main div whose button has been pressed
accepted answer: http://stackoverflow.com/a/27265125
tagged with: php
type: AnsweredQuestion
score: 1
has title: To Show Only Selected Div And Hide Rest All Other Divs
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27264797
has answer: http://stackoverflow.com/a/27265125
answer count: 2
possible better answer: http://stackoverflow.com/a/27264797
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27301179
accepted answer: http://stackoverflow.com/a/27301345
has comment: http://stackoverflow.com/comment/43066357
possible better answer: http://stackoverflow.com/a/27301514
tagged with: object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27301514
type: Question
tagged with: push
tagged with: arrays
tagged with: javascript
has body: how would one go about pushing a new row to a table with an ng-click? This is what I have currently. The information is in an array. My array looks like this. $scope.workflows = [{ Id: 1, Name: "Workflow Page 1", Description: "Describe Workflow", Steps: [{ Id: 1, Name: "name me", Description: "describe me", Action: "do something", Obj: "whats the goal", AdditionalInfo: "anything else", }, { Id: 2, Name: "name me", Description: "describe me", Action: "do something", Obj: "whats the goal", AdditionalInfo: "anything else", }, ]}, }, ]; This is what I want to add to my array and how I'm using scope to try to add it. $scope.addStep = function(newStep) { $scope.newStep = [{ Id: 0, Name: "Step on THIS!", Description: "I dare ya!", Action: "STOMP!", Obj: "A Rock", AdditionalInfo: "I am bleeding...", }] $scope.workflows.push(newStep); alert("test :" + "Its GON WORK"); }; Then in the HTML I use an ng-click to active the newStep function, hoping that it creates a new row in my table. + Click to Add a New Step Thank you!
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27301345
has title: Push New Row to Table on Ng-Click with Angular
tagged with: angularjs

http://stackoverflow.com/comment/42832962
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27169612
has text: I find that not very usable to be honest....
type: Comment

http://stackoverflow.com/comment/42856745
type: Comment
comment on: http://stackoverflow.com/a/27184391
score: 0
type: AnswerComment
has text: Thank you. I want to see the error message, so want to return a JsonResult, but how to fetch the JsonResult on the client side? the on on_load(evt) is called, but evt.status is not defined.

http://stackoverflow.com/q/27313533
has comment: http://stackoverflow.com/comment/43087493
type: AnsweredQuestion
downvote count: 0
score: 7
type: Question
has comment: http://stackoverflow.com/comment/43087587
has answer: http://stackoverflow.com/a/27313572
tagged with: javascript
has title: using particular word of element in html
answer count: 3
upvote count: 7
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/27314599
has body: this is a car //HTML p element Is there any way that I can use the word only that I click on e.g if I click on car only 'car' is used. if I click on this only 'this' is used. i.e. the only word that I click on. This is a car myFunction() { var my; my=document.getElementbyID("demo")[1]; //to get 'is' } p.s I need to use only a single word that is clicked. My p element contains at-most 10 words. Thanks in advance
has answer: http://stackoverflow.com/a/27314599
has answer: http://stackoverflow.com/a/27313637
accepted answer: http://stackoverflow.com/a/27313637

http://stackoverflow.com/q/27217955
accepted answer: http://stackoverflow.com/a/27218276
tagged with: javascript
tagged with: express
score: 0
has title: Alertifyjs alerts shown to the person who triggered it
has comment: http://stackoverflow.com/comment/42915780
tagged with: alertifyjs
has comment: http://stackoverflow.com/comment/42915500
has answer: http://stackoverflow.com/a/27218276
tagged with: node.js
type: AnsweredQuestion
tagged with: cookies
type: Question
has body: As a disclaimer, I'm new to nodejs and express framework in general so please bear with me while I'm still trying to learn. I'm using alertifyjs library to show notifications for various alerts to a user. Now, the problem is that the notifications are showing for everyone who is on the site. I get why this is happening and it makes sense. How do I go about making it so a specific alert only shows for the person that triggered it? What exactly do I use to make this happen? Cookies? Thank you for your help and let me know if you need any more information. Here's a code example... //client code socket.on('word length', function(data) { alertify.error('Check word length!'); }); //server code if (word.length &gt; 50 || word.length &lt;= 1) { // check word length: io.sockets.emit('word length', word); }
answer count: 1

http://stackoverflow.com/a/27288842
has comment: http://stackoverflow.com/comment/43080898
has comment: http://stackoverflow.com/comment/43080797
type: Answer
has comment: http://stackoverflow.com/comment/43081587
upvote count: 1
has comment: http://stackoverflow.com/comment/43078650
has comment: http://stackoverflow.com/comment/43078575
score: 1
answers question: http://stackoverflow.com/q/27288063
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43079726
has comment: http://stackoverflow.com/comment/43079298
accepted answer of: http://stackoverflow.com/q/27288063
has comment: http://stackoverflow.com/comment/43080030
has comment: http://stackoverflow.com/comment/43081044
has comment: http://stackoverflow.com/comment/43081018
has comment: http://stackoverflow.com/comment/43080664
has body: Generally, this solution is a 2-step process: manipulate existing parties one by one from the last to the insert point. insert new party to the insert point. function add_party(divId) { var party = document.getElementById(divId); var newParty = party.cloneNode(true); var allParties = document.querySelectorAll('div[id^="party"]'); var newId = parseInt(divId.replace('party', ''), 10) + 1; for(var i = allParties.length-1; i > newId-2; i--) { allParties[i].setAttribute('id', 'party' + (i+2)); allParties[i].querySelector('h1').innerHTML = 'Party ' + (i+2); var partyInputs = allParties[i].querySelectorAll('input[type="text"]'); for(var j = 0; j < partyInputs.length; j++) { var prefix = partyInputs[j].getAttribute("name").replace(/\d+/, ""); partyInputs[j].setAttribute("name", prefix + (i+2)); } } newParty.setAttribute('id', 'party' + newId); newParty.querySelector('h1').innerHTML = 'Party ' + newId; var inputs = newParty.querySelectorAll('input[type="text"]'); for(var i = 0; i < inputs.length; i++) { var prefix = inputs[i].getAttribute("name").replace(/\d+/, ""); inputs[i].setAttribute("name", prefix + newId); inputs[i].setAttribute("value", ""); inputs[i].value = ""; } party.parentNode.insertBefore(newParty, party.nextSibling); } Party 1 party name： party time：

http://stackoverflow.com/comment/42811719
type: QuestionComment
has text: @j08691 - the guidance is appreciated. will be sticking with the getElementById syntax. The purpose for me in doing this was to get a better understanding of the basic mechanics
comment on: http://stackoverflow.com/q/27158751
score: 0
type: Comment

http://stackoverflow.com/q/27175986
tagged with: canvas
has comment: http://stackoverflow.com/comment/42841467
answer count: 1
has comment: http://stackoverflow.com/comment/42841357
has answer: http://stackoverflow.com/a/27176401
accepted answer: http://stackoverflow.com/a/27176401
tagged with: getimagedata
has title: Cannot get Image Data from a canvas
has body: The following function should get image data (using context.getImageData() from an exisitng canvas, containing an image (already loaded on the webpage), and a second canvas that is not shown on the page. The first canvas' data is "got"as expected, and alert(data1.data.length) pops up with a reasonable number. However the second canvas' data is not "got" got, and the function breaks before the alert(data2.data.length); line. That is the only line that does not seem to work in the whole function, and is my problem. function operateImage(){ var operand = new Image(); var data1, data2; //exisiting canvas var c =document.getElementById("edit_canvas"); var ctx=c.getContext("2d"); var operation = document.getElementById("operation").value; //make a new temporary canvas and store the input image var hiddenCanvas = document.createElement('canvas'); var hiddenCtx = hiddenCanvas.getContext('2d'); operand.src = document.getElementById("operation_image").value; hiddenCanvas.width = operand.width; hiddenCanvas.height = operand.height; hiddenCtx.drawImage(operand,0,0); //get image data objects from both canvases data1 = ctx.getImageData(0,0,c.width,c.height); alert(data1.data.length); data2 = hiddenCtx.getImageData(0,0,hiddenCanvas.width,hiddenCanvas.height); alert(data2.data.length); /*pass the two image data objects to another function for processing*/ } After the function gets the image data it will pass them to another function depending on the operation value. (which will AND, OR, XOR, or NOT the contents of the pixel data arrays together) Edit: This is an error message I get: " Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data."
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/43071174
type: Comment
type: QuestionComment
has text: Define minimize. Right now, you can close it and reopen it...
comment on: http://stackoverflow.com/q/27304129
score: 0

http://stackoverflow.com/comment/42905539
type: Comment
type: QuestionComment
has text: Different server. However i just figured out include [ ] at json object side is making it run
comment on: http://stackoverflow.com/q/27212352
score: 0

http://stackoverflow.com/q/27258409
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42999556
has body: i have got an existing website developed using asp.net 3.5. business requirement is such that it needs be accessed through mobile devices mainly and mostly tablets. is there any way i can achieve that without converting the entire website to mvc4 or re writing the front end code?
tagged with: jquery
tagged with: asp.net
has answer: http://stackoverflow.com/a/27260164
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27258604
tagged with: css
type: UnansweredQuestion
has title: ASP.net 3.5 converting existing website to responsive design
tagged with: javascript
type: Question

http://stackoverflow.com/a/27257500
has comment: http://stackoverflow.com/comment/43048244
score: 1
has comment: http://stackoverflow.com/comment/43002233
has comment: http://stackoverflow.com/comment/43009568
has comment: http://stackoverflow.com/comment/43040833
has comment: http://stackoverflow.com/comment/43002480
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27256787
has comment: http://stackoverflow.com/comment/43055930
downvote count: 0
has body: You will probably need to use a custom filter: Something like this should do it: &lt;input ng-model="searchName"&gt; &lt;div ng-repeat="record in recordlist | filter: filterByNested"&gt; And in your controller: $scope.filterByNested = function (record) { return record.pax.reduce(function (prev, curr, idx, array) { return prev || curr.name == $scope.searchName; }, false); }; Basically you define a custom filter that returns true if the element you are searching is in the nested array. It would be trivial to change the filter function to work based on length too.

http://stackoverflow.com/q/27157667
type: UnansweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42809428
has comment: http://stackoverflow.com/comment/42809457
has comment: http://stackoverflow.com/comment/42809675
has comment: http://stackoverflow.com/comment/42809477
favorite count: 0
has answer: http://stackoverflow.com/a/27157971
has answer: http://stackoverflow.com/a/27157778
type: Question
has comment: http://stackoverflow.com/comment/42809505
answer count: 2
has body: I'm supposed to find the highest and lowest of four numbers without the use of an array. How can I go about doing this? My apologies, I forgot to link my code. var num1, num2, num3, num4; num1 = prompt("Enter the first number."); num2 = prompt("Enter the second number."); num3 = prompt("Enter the third number."); num4 = prompt("Enter the fourth number."); if (num1 &lt; num2) { if (num1 &lt; num3) { if (num1 &lt; num4) { var lowest = num1; } } }
downvote count: 6
has title: Finding the lowest and highest of four numbers without an array
score: -6
tagged with: javascript

http://stackoverflow.com/comment/79528211
comment on: http://stackoverflow.com/a/32373965
type: Comment
has text: Not working if you use a rest api with a different domain.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27225205
type: UnansweredQuestion
score: 0
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/42928920
has comment: http://stackoverflow.com/comment/42928472
tagged with: javascript
answer count: 1
tagged with: drop-down-menu
tagged with: jquery
has title: two interrelated dropdown list in php
has answer: http://stackoverflow.com/a/27225444
tagged with: php
has body: I have 2 drop-down list, first drop-down list will be populated statically and its value won't change facility course treatment Now i have 3 tables 1)facility_for_office 2)course_for_office 3)treatment_for_office Facility_for_office id officefacilityid officeid 1 F1 O1 2 F2 O2 course_for_office id officecourseid officeid 1 C1 O2 2 C2 O3 treatment_for_office id officetreatmentid officeid 1 T1 O1 2 T2 O3 I want that if the user selects facility from first drop-down then, the second drop-down list should display list of facility_for_office table and if he selects course then data of course_for_office should get displayed and if treatment is selected the second drop-down list should display data from treatment_for_office table, and if nothing is selected, the second drop-down list should be disabled. i tried finding jquery for it, but wasn't able to find any proper one. can anyone please tell me how it can be done

http://stackoverflow.com/comment/43068155
type: QuestionComment
has text: This is a Django template. Two curly braces is the Django variable syntax. For angular I have to change the variable syntax to `{({ var })}`
comment on: http://stackoverflow.com/q/27293877
score: 0
type: Comment

http://stackoverflow.com/q/27158963
has comment: http://stackoverflow.com/comment/42812696
tagged with: http://stackoverflow.com/tag/html
has title: Make a submit button POST and AJAX call same time?
has comment: http://stackoverflow.com/comment/42811927
accepted answer: http://stackoverflow.com/a/27159411
upvote count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/42812484
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42812636
type: Question
answer count: 3
has body: I have this form that will POST to show_aht2.php but I also want it to make the AJAX call that you see in my code below. So, how can I do both so the user doesn't go to the other? I want the user to stay on map.php thanks in advance map.php &lt;form action="show_aht2.php" method="post"&gt; &lt;input type="radio" name="date_selected" value="1d" checked="checked"/&gt;1d &lt;input type="radio" name="date_selected" value="1w" /&gt;1w &lt;input type="radio" name="date_selected" value="1m" /&gt;1m &lt;input type="radio" name="date_selected" value="3m" /&gt;3m &lt;input type="submit" id="aht_btn" name="get_aht" value="Get AHT" /&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#aht_btn').click(function(){ $.ajax({ type:"GET", url : "show_aht2.php", data:{ } , // do I need to pass data if im GET ting? dataType: 'json', success : function(data){ //doing stuff //get the MIN value from the array var min = data.reduce(function(prev, curr) { return isNaN(+curr['aht_value']) || prev &lt; +curr['aht_value'] ? prev : +curr['aht_value']; }, 1000000); // alert("min:" + min); //return min for debug //get the MAX value from the array var max = data.reduce(function(prev, curr) { return isNaN(+curr['aht_value']) || prev &gt; +curr['aht_value'] ? prev : +curr['aht_value']; }, -1000000); //alert("max:" + max); //return max number for debug //function for calculation of background color depending on aht_value function conv(x){ return Math.floor((x - min) / (max - min) * 255); } //function for background color //if NA then show white background, either show from green to red function colorMe(v){ return v == 'NA' ? "#FFF" : "rgb(" + conv(v) + "," + (255-conv(v)) + ",0)"; } //going through all DIVs only once with this loop for(var i = 0; i &lt; data.length; i++) { // loop over results var divForResult = $('#desk_' + data[i]['station']); // look for div for this object if(divForResult.length) { // if a div was found divForResult.html(data[i]['aht_value']…
has comment: http://stackoverflow.com/comment/42811971
score: 2
has answer: http://stackoverflow.com/a/27159649
has answer: http://stackoverflow.com/a/27159354
has answer: http://stackoverflow.com/a/27159411
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42812621
has comment: http://stackoverflow.com/comment/42812302
possible better answer: http://stackoverflow.com/a/27159354

http://stackoverflow.com/comment/42917272
score: 0
type: Comment
type: QuestionComment
has text: But you could have some server-side resource build you a colored cursor on demand. Don't ask me how but the jQuery would be something like `$(this).css('cursor', 'url(make_pointer.php?color=#FC6) 9 30 auto')`. Mmm, there's a MIME issue to overcome but I'm sure it's possible.
comment on: http://stackoverflow.com/q/27218922

http://stackoverflow.com/q/27166818
downvote count: 1
type: Question
has body: I have two HTML drop down Please Select Volvo Saab Mercedes Audi Please Select a b Now, If I Select volvo from first drop down and b from second dropdown and then I change to Audi in the first dropdown, I want the value of second drop down to show Please Select instead of b (selected previously) using javascript PS: I am new to Javascript
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27166864
has answer: http://stackoverflow.com/a/27166875
has answer: http://stackoverflow.com/a/27166864
favorite count: 0
has title: HTML drop down javascript help needed
accepted answer: http://stackoverflow.com/a/27166875
type: AnsweredQuestion
score: 0
upvote count: 1

http://stackoverflow.com/comment/42821579
comment on: http://stackoverflow.com/a/27164340
score: 0
type: Comment
type: AnswerComment
has text: for loop is working good but the code bellow the for loop is not working i am using jquery1.11.0.min.js

http://stackoverflow.com/comment/42933471
type: Comment
comment on: http://stackoverflow.com/a/27227726
score: 0
type: AnswerComment
has text: OR rather, how do you say if something matches a regular expression?

http://stackoverflow.com/q/27213468
has answer: http://stackoverflow.com/a/27213523
possible better answer: http://stackoverflow.com/a/27213517
favorite count: 0
has answer: http://stackoverflow.com/a/27213517
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27213523
upvote count: 1
downvote count: 1
type: AnsweredQuestion
type: Question
tagged with: javascript
has title: Cannot read property 'success' of undefined using $http
has answer: http://stackoverflow.com/a/33947220
score: 0
answer count: 3
has body: Within my controller I do topicContent.request().success(function(data){ $scope.threadContent = data; }); and in my factory I wrote as below : app.factory('topicContent', ['$http', function($http){ return var query = function() { $http({ url: "http://www.corsproxy.com/daysof.me/lowyat/thread.php", method: "GET" }); } return { request : function(){ return query(); } } }]); I've checked there's no dependency error for my service. Any idea why it says success is undefined?

http://stackoverflow.com/comment/42857059
score: 0
type: Comment
type: QuestionComment
has text: Better solution than ajax and js. http://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes
comment on: http://stackoverflow.com/q/27184612

http://stackoverflow.com/q/27289097
has answer: http://stackoverflow.com/a/27289285
tagged with: http://stackoverflow.com/tag/html
answer count: 4
possible better answer: http://stackoverflow.com/a/27289109
has answer: http://stackoverflow.com/a/27289109
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27289285
type: Question
has title: Click on Link to show data on div and Link Disappear is not working
has answer: http://stackoverflow.com/a/27289299
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27289235
has body: What I need I need when user click on link data is shown. link disappear after click. I have tried code view details jquery code $('.viewdetail').click(function() { $(this).find('.speakers').show(); $(this).find('.viewdetail').hide(); }); problem when I click on view detail link data is shown on div. link doesn't disappear. if I put anchor before div then data is not shown on speaker class div. any suggestion are most welcome. jsfiddle: http://jsfiddle.net/fw3sgc21/
score: 0
has comment: http://stackoverflow.com/comment/43044542

http://stackoverflow.com/a/27167038
upvote count: 1
type: Answer
downvote count: 0
has body: I'm guessing you want to do this because one set of conditions should import one thing vs another. I think javascript is the best tool for this anyway, even if you could use plain html (which you can't, because comments can't be nested in html). You can load the set of script dynamically, based on whatever conditions need to be met: http://api.jquery.com/jQuery.getScript/ Or you could roll up your own (if you're jQuery-averse) by running an XMLHttpRequest and then executing the script.
score: 1
has comment: http://stackoverflow.com/comment/42826336
answers question: http://stackoverflow.com/q/27165559

http://stackoverflow.com/a/27287152
answers question: http://stackoverflow.com/q/27284683
type: Answer
has body: Got it sorted in the end although I still don't understand why it originally broke. After jumping into the .js files that the site called upon, I ended up manually reconstructing the couple that I wanted and calling them in code. This is not a good solution but it has worked, at least. Since the site (a university web-site managed on Squiz Matrix CMS) uses a sort of "customised version" of Bootstrap, Jquery and such that seems to strip out some elements of those things, there may have been some bugs introduced specific to our version of these things.
score: 0

http://stackoverflow.com/comment/43021838
type: QuestionComment
has text: You omitted the word boundaries `\b`. Note that without them, also `car` in `care` and `scary` will be replaced.
score: 0
comment on: http://stackoverflow.com/q/27275462
type: Comment

http://stackoverflow.com/q/27168194
type: AnsweredQuestion
has title: jQuery carousel making responsive
has body: I have this carousel which is not responsive and need to make it responsive but not sure what to do with it as its a current carousel ive found online that ive been using. Can someone maybe help me get it responsive? they are just going to be images - many thanks in advance http://codepen.io/anon/pen/RNPYqq HTML: > < JS: jQuery(document).ready(function ($) { setInterval(function () { moveRight(); }, 3000); var slideCount = $('#slider ul li').length; var slideWidth = $('#slider ul li').width(); var slideHeight = $('#slider ul li').height(); var sliderUlWidth = slideCount * slideWidth; $('#slider').css({ width: slideWidth, height: slideHeight }); $('#slider ul').css({ width: sliderUlWidth, marginLeft: - slideWidth }); $('#slider ul li:last-child').prependTo('#slider ul'); function moveLeft() { $('#slider ul').animate({ left: + slideWidth }, 200, function () { $('#slider ul li:last-child').prependTo('#slider ul'); $('#slider ul').css('left', ''); }); }; function moveRight() { $('#slider ul').animate({ left: - slideWidth }, 200, function () { $('#slider ul li:first-child').appendTo('#slider ul'); $('#slider ul').css('left', ''); }); }; $('a.control_prev').click(function () { moveLeft(); }); $('a.control_next').click(function () { moveRight(); }); }); CSS: @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600); html { border-top: 5px solid #fff; background: #58DDAF; color: #2a2a2a; } html, body { margin: 0; padding: 0; font-family: 'Open Sans'; } h1 { color: #fff; text-align: center; font-weight: 300; } #slider { position: relative; overflow: hidden; margin: 20px auto 0 auto; border-radius: 4px; } #slider ul { position: relative; margin: 0; padding: 0; height: 200px; list-style: none; } #slider ul li { position: relative; display: block; float: left; margin: 0; padding: 0; width: 1130px; height: 775px; background: #ccc; text-align: center; line-height: 300px; } a.control_prev, a.control_next { position: absolute; top: 40%; z-index: 999; display: block;…
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27169164
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42828311
has answer: http://stackoverflow.com/a/27169164
has comment: http://stackoverflow.com/comment/42828268
has comment: http://stackoverflow.com/comment/42829467
has comment: http://stackoverflow.com/comment/42828095
tagged with: css

http://stackoverflow.com/q/27296164
accepted answer: http://stackoverflow.com/a/27300695
type: Question
tagged with: dropbox
has title: Dropbox.js how to download an specific revision? is it possible?
tagged with: javascript
tagged with: dropbox-api
answer count: 1
has answer: http://stackoverflow.com/a/27300695
tagged with: download
has body: I'm using dropbox.js to upload the files from my web app to the cloud. I noticed that if you upload two files with the same name, it just create another version or revision. The thing is I dont found any way to "programatically" download an specific revision of the file. Is there any workaround? Any help will be appreciated I'm using this function to generate the download link: function downFile(i) { var client = new Dropbox.Client({ key: "xxxxxxxxxxx", secret: "xxxxxxxxxx", sandbox: false, token: "xxxxxxxxxxxx" }); client.makeUrl(i, { downloadHack: false }, function(error, data) { if (error) { return console.log(error); // Something went wrong. } $("#mylink").html(data.url); $("#mylink").attr("href", data.url); }); }
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/27216439
accepted answer of: http://stackoverflow.com/q/27215833
score: 0
type: Answer
has body: That is because as what @charlieftl has pointed out in the comments, the element div.thumbnail does not exists at runtime, and it is not possible to bind a click event to an element that is not present... What you can do, however, is to rely on event bubbling — for example, when the click event is triggered on a newly added .caption, it actually bubbles up all the way to the top of the DOM tree (to the document object). You can listen to this bubbling on any element that is already present at runtime — of course it is safest to listen on document since it is an object that is always present: $(document).on('click', '.caption', function(){ alert("Del"); });
answers question: http://stackoverflow.com/q/27215833
type: AcceptedAnswer

http://stackoverflow.com/comment/42886890
has text: thankyou very much but for some reason when ever i put in two boxes saying paint and line and connect it up to the javascript with an ID it just doesnt let me drw anything and makes the canvas small @Shomz
type: Comment
comment on: http://stackoverflow.com/a/27174376
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42976620
has text: You need to wrap above code in $(document).ready(function(){ Above code goes here }); in script tag.
comment on: http://stackoverflow.com/a/27250917
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/42969398
comment on: http://stackoverflow.com/a/27246634
type: Comment
has text: To display the information correctly my error function needs to be `error: function (jqXHR, textStatus, errorThrown )`. If you add this to your response, I will gladly accept it :D
score: 0
type: AnswerComment

http://stackoverflow.com/q/27256787
tagged with: javascript
type: UnansweredQuestion
type: Question
has title: Filter by array length or nested object property in AngularJS
has answer: http://stackoverflow.com/a/27257500
favorite count: 0
tagged with: angularjs
has body: I have an array with objects looking like that: record in recordlist { date : "02/12/2014" time : "00.02.01" car : "369" pax: [ { name : "Ben" chosen : true }, { name : "Eric" chosen : true } ] } So far, when I list using ng-repeat, I'm able to filter by object (record) property. Filter: &lt;input class="form-control" placeholder="Time" ng-model="search.time"&gt; ng-repeat: &lt;div ng-repeat="record in filteredRecords = (recordlist | filter: search)"&gt; The problem comes when I want to filter the nested array (pax). I've tried this, but so far no luck: &lt;input ng-model="search.pax.name"&gt; // filter by name property &lt;input ng-model="search.pax.length"&gt; // filter by array length Any tips?
upvote count: 1
answer count: 1
downvote count: 1
score: 0
tagged with: arrays

http://stackoverflow.com/q/27199239
upvote count: 1
tagged with: angularjs-directive
has title: $scope.watch() in a link function
type: AnsweredQuestion
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/27199808
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has body: I finally have an object and have some of its data dynamically created. But I now want to use a button to increment through my data set and I cant get this to work. I thought I needed to use the scope.watch but after wrapping my elem.append in the watch function it still doesn't catch when I click the button and increment through my array. this is my first time playing with templates and directives and it is kicking my butt. All help is greatly appreciated. app.js angular.module("App", []) .controller("MainCtrl", function($scope) { $scope.count=0; $scope.bpmSong=[{ "AlbumName":"Unknown Album", "ArtistName":"Angel City", "SongName":"Love Me Right Feat. Laura McAllen[Rezonance Q Remix]", "$id":"4453334", "$priority":null }, { "AlbumName":"Immersion", "ArtistName":"Pendulum", "SongName":"The Island - Part 1 - Dawn", "$id":"26593443", "$priority":null }, { "AlbumName":"Someone to Love Me", "ArtistName":"Jomanda", "SongName":"Got a Love for You", "$id":"29376555", "$priority":null }, { "AlbumName":"Avicii - Essential Mix (2010-12-11)", "ArtistName":"Avicii", "SongName":"Penguin", "$id":"29533653", "$priority":null }, { "AlbumName":"MOS Addicted To Bass 2011", "ArtistName":"Eric Prydz", "SongName":"Niton (The Reason)", "$id":"30154682", "$priority":null }] }) .directive('flashWidget', function(){ return{ restrict: 'E', scope: { song: '=' }, controller: function($scope) { $scope.numb = 0; $scope.click = function () { $scope.numb++ } }, template: ' Click me Clicked {{numb}} times', link: function(scope, elem) { scope.$watch(scope.song[scope.numb].$id, function(){ elem.append(' '+ ' '+ ' ' ); }) } } }); index.html This is from the Controller and Directive
has answer: http://stackoverflow.com/a/27199808

arrays
tags question: http://stackoverflow.com/q/27215710
tags question: http://stackoverflow.com/q/27281537
tags question: http://stackoverflow.com/q/27310365
tags question: http://stackoverflow.com/q/27171630
tags question: http://stackoverflow.com/q/27240752
type: Tag
tags question: http://stackoverflow.com/q/27239985
tags question: http://stackoverflow.com/q/27209118
tags question: http://stackoverflow.com/q/27172247
tags question: http://stackoverflow.com/q/27196621
tags question: http://stackoverflow.com/q/27245509
tags question: http://stackoverflow.com/q/27156088
tags question: http://stackoverflow.com/q/27309012
tags question: http://stackoverflow.com/q/27241089
tags question: http://stackoverflow.com/q/27216011
tags question: http://stackoverflow.com/q/27300618
tags question: http://stackoverflow.com/q/27312147
tags question: http://stackoverflow.com/q/27236015
tags question: http://stackoverflow.com/q/27264624
tags question: http://stackoverflow.com/q/27242516
tags question: http://stackoverflow.com/q/27298362
tags question: http://stackoverflow.com/q/27191233
tags question: http://stackoverflow.com/q/27256787
tags question: http://stackoverflow.com/q/27235627
tags question: http://stackoverflow.com/q/27197049
tags question: http://stackoverflow.com/q/27209630
tags question: http://stackoverflow.com/q/27179012
tags question: http://stackoverflow.com/q/27296520
tags question: http://stackoverflow.com/q/27153827
tags question: http://stackoverflow.com/q/27263593
tags question: http://stackoverflow.com/q/27278835
tags question: http://stackoverflow.com/q/27214968
tags question: http://stackoverflow.com/q/27262616
tags question: http://stackoverflow.com/q/27255886
tags question: http://stackoverflow.com/q/27265101
tags question: http://stackoverflow.com/q/27293820
tags question: http://stackoverflow.com/q/27240325
tags question: http://stackoverflow.com/q/27303655
tags question: http://stackoverflow.com/q/27231137
tags question: http://stackoverflow.com/q/27168356
tags question: http://stackoverflow.com/q/27310751
tags question: http://stackoverflow.com/q/27205673
tags question: http://stackoverflow.com/q/27166623
tags question: http://stackoverflow.com/q/27197875
tags question: http://stackoverflow.com/q/27177026
tags question: http://stackoverflow.com/q/27305581
tags question: http://stackoverflow.com/q/27199053
tags question: http://stackoverflow.com/q/27167971
tags question: http://stackoverflow.com/q/27162372
tags question: http://stackoverflow.com/q/27202403
tags question: http://stackoverflow.com/q/27228048
tags question: http://stackoverflow.com/q/27265398
tags question: http://stackoverflow.com/q/27256699
tags question: http://stackoverflow.com/q/27293730
tags question: http://stackoverflow.com/q/27156427
tags question: http://stackoverflow.com/q/27218965
tags question: http://stackoverflow.com/q/27192379
tags question: http://stackoverflow.com/q/27250956
tags question: http://stackoverflow.com/q/27234643
tags question: http://stackoverflow.com/q/27307177
tags question: http://stackoverflow.com/q/27305833
tags question: http://stackoverflow.com/q/27203073
tags question: http://stackoverflow.com/q/27250726
tags question: http://stackoverflow.com/q/27173227
tags question: http://stackoverflow.com/q/27181032
tags question: http://stackoverflow.com/q/27166946
tags question: http://stackoverflow.com/q/27221712
tags question: http://stackoverflow.com/q/27212831
tags question: http://stackoverflow.com/q/27261932
tags question: http://stackoverflow.com/q/27185909
tags question: http://stackoverflow.com/q/27267794
tags question: http://stackoverflow.com/q/27175140
tags question: http://stackoverflow.com/q/27165939
tags question: http://stackoverflow.com/q/27287018
tags question: http://stackoverflow.com/q/27280350
tag name: arrays
tags question: http://stackoverflow.com/q/27266550
tags question: http://stackoverflow.com/q/27182095
tags question: http://stackoverflow.com/q/27280962
tags question: http://stackoverflow.com/q/27233789

http://stackoverflow.com/q/27234382
score: 0
has comment: http://stackoverflow.com/comment/43140177
has title: Javascript SVG clipto with clip rule (fabricjs)
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
type: UnansweredQuestion
tagged with: fabricjs
type: Question
tagged with: javascript
has body: There is the exemple in img http://imgur.com/rFdcctc I have a background where i put an image (phone case). After that i put a rectangle on the top side (50% top). (canvas) On that i put an svg that is an another mask (that follow the case curves). The svg is the same as the entire background in size. So to only have the top of the SVG i "clip" a rectangle on to it. var clipTo = function(ctx) { var w = mask.width, h = mask.height; var x = -w/2, y = -h/2; var rx = 0, ry = 0; ctx.moveTo(x+rx, y); ctx.lineTo(x+w-rx, y); ctx.lineTo(x+w, y+(h/2)-ry); ctx.lineTo(x+rx,y+(h/2)); ctx.lineTo(x,y+ry); ctx.closePath(); }; mask.setClipTo(clipTo); And it works fine. But when i put a dragable image on it the image is mask by the SVG but not the clip rectangle, as if the clip is still there. (in the image, the content of the red rectangle should be invisible) I have found that there is a clip-rule : https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-rule that could maybe with luck enventually should do it, but i have no idea how to apply it in javascript (i use fabricjs) So if someone has an idea... :) Thank you
has comment: http://stackoverflow.com/comment/43118359

http://stackoverflow.com/comment/43012635
has text: It might be the `document.querySelector`?
score: 1
comment on: http://stackoverflow.com/q/27271373
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27269822
accepted answer: http://stackoverflow.com/a/27270480
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: jQuery shuffle div when clicking on image
tagged with: shuffle
has body: I am trying to use a button as an image, will shuffle a block of text Sorry if this is a very basic question, I'm just having trouble applying it to my current jQuery
tagged with: css
has answer: http://stackoverflow.com/a/27270480
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: button
tagged with: javascript

http://stackoverflow.com/a/27316909
score: 0
answers question: http://stackoverflow.com/q/27261211
type: Answer
has body: I guess your "problem" has nothing to do with the input. It is more likely a problem with the opacity transition (and how to trigger) - see: iOS CSS opacity + visibility transition BTW: Your CSS is very "redundant" - DRY.

http://stackoverflow.com/q/27234528
favorite count: 0
linked to: http://stackoverflow.com/q/25271243
has title: Cross-domain, cross-tab communication between co-operating pages
has answer: http://stackoverflow.com/a/54160067
has comment: http://stackoverflow.com/comment/69437319
has comment: http://stackoverflow.com/comment/77900654
has comment: http://stackoverflow.com/comment/77898724
has answer: http://stackoverflow.com/a/69079718
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/28230845
tagged with: postmessage
linked to: http://stackoverflow.com/q/4079280
upvote count: 21
tagged with: local-storage
type: Question
has comment: http://stackoverflow.com/comment/77900620
has comment: http://stackoverflow.com/comment/139842454
has comment: http://stackoverflow.com/comment/77900697
score: 21
tagged with: javascript
has comment: http://stackoverflow.com/comment/77890075
has comment: http://stackoverflow.com/comment/77890253
has comment: http://stackoverflow.com/comment/69428091
has comment: http://stackoverflow.com/comment/77890503
tagged with: cross-domain
answer count: 3
has comment: http://stackoverflow.com/comment/77890337
has comment: http://stackoverflow.com/comment/83283356
has answer: http://stackoverflow.com/a/48667123
has body: Say I have two tabs, each with a web-page loaded on a different domain. The pages in the two tabs want to communicate. The simplest solution I could see was this one (my answer on a closely-related question I found while searching for duplicates), where one or both of the pages load an intermediate page iFrame, which proxies between postMessage() and localStorage events. However, this does require this page to be hosted somewhere, and an extra request by the client. Are there any techniques for this that wouldn't require a specialised "proxy page" to be served by one of the domains? (I.e. that could be implemented by a JavaScript library without a supporting server?)
downvote count: 0

http://stackoverflow.com/comment/42843469
has text: Thanks, but that's the point. So how can a Javascript application keep state at the client at all? From the sources I've read I learned that many developers use eg. basic auth, sending user login and password (!) over the network on every request when using RESTful auth. They must keep it at the client, how otherwise can it be?
type: QuestionComment
comment on: http://stackoverflow.com/q/27177224
score: 0
type: Comment

http://stackoverflow.com/comment/43028963
has text: @AndrewDunai , how this problem is related to Mongo , are you high or something ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27279451
type: AnswerComment

http://stackoverflow.com/a/30458364
has body: I did a cross-browser solution (+ie9, ff, chrome, safari), only with pure css. http://codepen.io/nl_fonseca/pen/MwbovQ input[type='range'] { -webkit-appearance: none; -moz-appearance: none; background: none; cursor: pointer; display: block; height: 100%; overflow: hidden; width: 45px; &amp;:focus { box-shadow: none; outline: none; } &amp;::-webkit-slider-runnable-track { -webkit-appearance: none; background: #666; height: 3px; } &amp;::-webkit-slider-thumb:before { position: absolute; top: 0; right: 50%; left: -200px; background: #e00; content: ''; height: 3px; } &amp;::-webkit-slider-thumb { width: 0; height: 0; -webkit-appearance: none; position: relative; } &amp;::-moz-range-track { width: 45px; } &amp;::-moz-range-thumb { width: 3px; height: 3px; -moz-appearance: none; background: transparent; border: 0; border-radius: 0; box-shadow: 0; position: relative; } &amp;::-moz-range-progress { background: #e00; } &amp;::-ms-track { background: transparent; border: 0; border-color: transparent; border-radius: 0; border-width: 0; color: transparent; height: 3px; width: 45px; } &amp;::-ms-fill-lower { background: #e00; border-radius: 0; } &amp;::-ms-fill-upper { background: #666; border-radius: 0; } &amp;::-ms-thumb { width: 0; height: 0; background: transparent; } &amp;::-ms-tooltip { display: none; } }
downvote count: 0
has comment: http://stackoverflow.com/comment/78378573
type: Answer
has comment: http://stackoverflow.com/comment/79997739
has comment: http://stackoverflow.com/comment/75174378
answers question: http://stackoverflow.com/q/27153035
has comment: http://stackoverflow.com/comment/75166331
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/80036868

http://stackoverflow.com/q/27225679
type: AnsweredQuestion
has title: Unexpected JavaScript (jQuery) Behavior (Function call, rather than Form submit)
tagged with: forms
accepted answer: http://stackoverflow.com/a/27226038
type: Question
has comment: http://stackoverflow.com/comment/42929711
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
score: 2
has answer: http://stackoverflow.com/a/27226038
upvote count: 2
has comment: http://stackoverflow.com/comment/42929621
has body: Okay, I don't get this. I have a specific type of form-declaration, jQuery will always process the Form Data and sends an Ajax-Request, but inside the form, I have Buttons, once for Form-Submission (Ajax) and once for calling specific Functions. Like so: Regenerate Both called like so in jQuery: $(function() { $('form.ajax').submit(function(event) { event.preventDefault(); var data = $(this).serializeArray(); // do stuff with data }); $('[data-click]').click(function(event) { // prevents form submit event.preventDefault(); // calls defined function and passes element that got clicked on window[$(this).attr('data-click')](this); }); }); Now the strange thing, if I click the data-click Button, it works, if I click the intended submit-button, it also works, but if I have a normal input text field inside the form and press return, to "submit" the form, it does whatever the first button does in the form, conclusion, if the form-submit button is before the data-click button, everything works just fine, but if the data-click button is before the submit button (wich it is!), the data-click function will be called. One way to fix this, is to start the form with a hidden submit button, although that ruins the HTML. All in all, it can look like this: <?php $usid = Server::generateUnusedUSID(); ?> <?php echo $usid; ?> Regenerate Check data Note that every form with the class ajax, should never be submitted "as is", it always has to do a ajax-submission and goes through the JavaScript. The client always has JavaScript enabled, don't worry about that.

http://stackoverflow.com/q/27215757
accepted answer: http://stackoverflow.com/a/27220617
has title: JavaScript: Find Local WebSocket Servers
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17998011
score: 3
has body: I'm experimenting at the moment with trying to detect local network websocket servers (that I wrote) within an IP range. I have one running on the network and I would like my script to detect it (and others on the same port). At the moment I can accomplish this with a for loop and just try and create a list depending on whether I can successfully connect to a server on that IP. That however is very slow and inefficient. Any ideas how to do this quickly and efficiently? A snippet of my code: var port = 1234; var ip_range = "192.168.1."; var servers = []; var i = 0; function findServers() { if ( i &gt; 255 ) { return; } try { var host = "ws://"+ip_range+i+":"+port; var socket = new WebSocket(host); socket.onopen = function(){ console.log("Success: " + socket.url); servers.push(socket.url); i++; findServers(); }; socket.onerror = function(error){ console.log("Error: " + socket.url); i++; findServers(); }; } catch (e) { console.log("Error: " + socket.url); i++; findServers(); } } If it helps I wrote the socket server so I can modify the code if need be.
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/27220617
tagged with: javascript
answer count: 1
tagged with: websocket
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/27198553
answers question: http://stackoverflow.com/q/27198135
score: 0
has comment: http://stackoverflow.com/comment/42881600
has body: Your question is rather vague. Keep in mind that the JavaScript alert() method cannot be styled, so you would need to create your own modal. I use one like this (very responsive): function styledAlert(message){ document.getElementById('alertText').innerHTML = message; document.getElementById('alertWrapper').style.display = 'block'; } #alertWrapper { position: absolute; display: none; top:0; left:0; right:0; bottom:0; } #alertBox { position: fixed; top: 25%; bottom: 25%; right: 25%; left: 25%; background: rgba(0,0,0,0.7); border-radius: 25px; } #alertAccept { position: absolute; bottom: 15px; right: 15px; } #alertText { margin: 15px; color: white; } OK Type in an alert message: And then blur the textbox to see the alert . . . If this is not what you are looking for, please make your question a little more specific on the end result that you are seeking.
type: Answer

http://stackoverflow.com/comment/42832161
score: 0
type: QuestionComment
has text: use [ng-class](https://docs.angularjs.org/api/ng/directive/ngClass), you don't need jQuery for that
type: Comment
comment on: http://stackoverflow.com/q/27170654

http://stackoverflow.com/comment/42869753
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27169463
score: 0
has text: if you can convert LCS to GCS then it is easy ... just convert basis vectors (one per each axis) and point (0,0,0) and from the result construct the transform matrix like this: http://stackoverflow.com/a/25216549/2521214 if you can not then the only option is to find some function inside API you are use for DOM hierarchy access

http://stackoverflow.com/a/27244095
has body: I believe you are using your MongoLab's username &amp; password for connecting to your database. You should define a username &amp; password for your database in MongoLab control panel for example I have a database named 'test', after login to Mongolab I'll go to https://mongolab.com/databases/test#users and add new username and password for 'test' database username: hamid, password:zzzz. the connection for test database my mongolab will be mongodb://hamid:zzzz@ds053438.mongolab.com:53438/test Updated: Test your connection via robomongo Connect to mongolab via robomongo Step 1: create new connection Step 2: enter your address ds063200.mongolab.com and 61200 as your port Step 3: enter flights as your database and your database user and password ('not mongolab user and password)
answers question: http://stackoverflow.com/q/27243824
has comment: http://stackoverflow.com/comment/42967189
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42964888
type: Answer
has comment: http://stackoverflow.com/comment/42963714
has comment: http://stackoverflow.com/comment/42967070
score: 3
has comment: http://stackoverflow.com/comment/42965073
downvote count: 0
has comment: http://stackoverflow.com/comment/42965273
has comment: http://stackoverflow.com/comment/42964713
has comment: http://stackoverflow.com/comment/42965024
has comment: http://stackoverflow.com/comment/42963891
has comment: http://stackoverflow.com/comment/42964230
accepted answer of: http://stackoverflow.com/q/27243824
upvote count: 3

http://stackoverflow.com/comment/42832225
comment on: http://stackoverflow.com/a/27170721
type: AnswerComment
score: 0
has text: and I don't have enough reputation to post a picture of the console :( it's harder to describe than to show
type: Comment

http://stackoverflow.com/comment/48259696
score: 0
type: QuestionComment
type: Comment
has text: Have you managed to come up with something since you posted your question? Would be great if you share your example if you got it working.
comment on: http://stackoverflow.com/q/27154988

http://stackoverflow.com/comment/42806293
comment on: http://stackoverflow.com/q/27155681
type: Comment
type: QuestionComment
has text: Thanks, I got this from the CodeSchool tutorial but now I have another problem, the fields inside {{}} are not displaying at all.
score: 0

http://stackoverflow.com/comment/42955808
has text: Can you change your code to use some static example test data instead of dynamic real time data? Then fiddle that? Without anything to look at, it's very hard to guess where this problem might lie, if it's even in the code snippets you pasted.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27239460

http://stackoverflow.com/q/27240521
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27240740
type: Question
answer count: 2
has body: I am creating a web form in which users have the option to set a custom profile picture. What I'm trying to do is to create a drop-down box that gives you the option to choose between uploading an image or linking an image from a URL. The option that is not selected should be disabled, but I can't seem to get this to work. Here is my code: HTML: Choose a Profile Picture: Upload an Image Load from URL JS: function upload() { document.getElementById("enterUrl").disabled = true; document.getElementById("fileBrowse").disabled = false; } function link() { document.getElementById("fileBrowse").disabled = true; document.getElementById("enterUrl").disabled = false; } Here is the JSFiddle for the code.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27240621
score: 0
has title: Choosing between uploading a file or entering a custom URL - HTML Forms
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27240621
possible better answer: http://stackoverflow.com/a/27240740

http://stackoverflow.com/a/27303865
answers question: http://stackoverflow.com/q/27303427
score: 2
has body: What's happening is that the path elements that represent the states are filled black by default. These are the weird shapes that you're seeing -- most of it is obscured by the county paths, but some of them are still visible. To prevent this from happening, copy the CSS from the example you've linked to, in particular .states { fill: none; }
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27303427
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42962167
has text: Steve, thanks for the interest. Updated the question to give a bit more information.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27231698

http://stackoverflow.com/q/27236096
has answer: http://stackoverflow.com/a/27236218
answer count: 3
downvote count: 3
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27236208
type: Question
score: -2
has title: Is it possible to add two div boxes inside a html with javascript?
has answer: http://stackoverflow.com/a/27236169
has comment: http://stackoverflow.com/comment/42949065
tagged with: javascript
has body: Hello I will make a html page, and see if it is possible to add 2 div boxes inside an html page with use of javascript ? HEDER TEXT HERE Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Etiam porta sem malesuada magna mollis euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur blandit tempus porttitor. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibu magna mollis euismod. Main contributors Aenean lacinia bibendum. Donec ullamcorper nulla non metus auctor fringilla. Donec id elit non mi porta gravida at eget metus. Donec ullamcorper nulla non metus auctor fringilla. Donec id elit non mi porta gravida at eget. Consectetur Fusce Quam Magna Risus Bibendum Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Donec sed odio dui.Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum. Consectetur Fusce Quam Read more

http://stackoverflow.com/comment/43058175
type: QuestionComment
has text: Why do 5 and 6 go before 4 in top-to-bottom order?
comment on: http://stackoverflow.com/q/27296886
score: 0
type: Comment

pretty-urls
type: Tag
tags question: http://stackoverflow.com/q/27299353
tag name: pretty-urls

http://stackoverflow.com/comment/42849913
has text: try a google search, over at google.com
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27180693

http://stackoverflow.com/q/27255494
downvote count: 1
has title: Selecting a drop down item using space key using Jquery in FireFox
type: Question
accepted answer: http://stackoverflow.com/a/27256721
has body: $(this).keydown(function(e) { if(e.keyCode ===32) { } } http://jsfiddle.net/gaby/CWvwn/ In the following fiddle i have noticed that you can't choose an item by pressing space key in FireFox. It works in other browsers though. Is there a jquery way to force the item to be selected using space key (something like i wrote above)?
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27256721
favorite count: 0
type: AnsweredQuestion
score: 0
upvote count: 1

http://stackoverflow.com/q/27284835
has comment: http://stackoverflow.com/comment/43037922
score: 1
has title: HTML5 Canvas Pixelation When Positioning and Combining Images
linked to: http://stackoverflow.com/q/18922880
tagged with: canvas
has comment: http://stackoverflow.com/comment/43037954
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43037625
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/43037881
type: UnansweredQuestion
has body: Using GameAlchemist's brilliant code found in HTML5 Canvas Resize (Downscale) Image High Quality?, I successfully scaled down an image with excellent fidelity. The referenced answer returns a new canvas. If I take that canvas and write it to an existing canvas using drawImage() or putImageData() at the top-left corner (i.e. (0,0)), it looks great. As soon as I try to centre the image within an existing (larger) canvas, however, it becomes pixelated, though not as bad as it does when I allow the canvas to scale it down and centre it. Is there a way to place images anywhere in the canvas without pixelation? For example: var canvas = document.getElementById("imageContainer"); canvas.setAttribute("height", 500); canvas.setAttribute("width", 500); var ctx = canvas.getContext("2d"); var image = new Image(); image.src = some_url; // see linked answer for downScaleImage() var newcanvas = downScaleImage(image, 0.2); // this is vertically centred but pixelated // ctx.drawImage(newcanvas, 0, Math.round((canvas.height-newcanvas.height)/2)); // this is at the top-left corner but beautiful ctx.drawImage(newcanvas, 0, 0); Also, short of having multiple, small canvases, is there a way to combine high-quality images into a single canvas without pixelation occurring? Thanks.
upvote count: 1
type: Question

http://stackoverflow.com/comment/42943571
type: Comment
type: QuestionComment
has text: Are you serious about your problem?
comment on: http://stackoverflow.com/q/27233445
score: 3

http://stackoverflow.com/q/27239460
has comment: http://stackoverflow.com/comment/42963669
score: 0
has comment: http://stackoverflow.com/comment/42955720
has comment: http://stackoverflow.com/comment/42955674
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43494368
has comment: http://stackoverflow.com/comment/42955655
has comment: http://stackoverflow.com/comment/42974879
has body: My attempts to make my y values scale to logarithmic are turning my data upside-down. I have vanilla js code and every implementation I read about are tied up in huge libraries of production code, I am not sure how/what to extract, I need some guidance as I could not put my finger on the problem weather it be sum or miss-use of the Math functions. I am testing this by drawing the y 'data' to canvas (no libraries used) my x axis is constant 2px difference Math.log uses e (2.718) as default base which is what I have read.. So I should be seeing my price data on a natural log scale but it wont work. function logScale(data){ var log=data.slice(0); var i=log.length; while(i--){ log[i]=Math.log(data[i]); // should be natural but I don't see a change // log[i]=Math.pow(Math.log(data[i]),10); //upside-down // log[i]=Math.log(data[i])/Math.LN10; //no visible change when drawn to canvas } console.dir(log); return log; } Another attempt from a couple of weeks ago where I am using the data min, max and difference. then removing all the infinity. function ᐥlogarithm(data){ var Lmax,Lmin,Ldif,Logarithm,infinity; Lmax=Math.max.apply(this,data); Lmin=Math.min.apply(this,data); Ldif=(Lmax-Lmin); Logarithm=[]; infinity=[]; for(var i=data.length-1;i&gt;=0;i--){ Logarithm[i]=Math.log((data[i]-Lmin)/Ldif); if(Logarithm[i]===-Infinity){infinity.push(i);} } for(var i=0;i&lt;=infinity.length-1;i++){Logarithm.splice(infinity[i],1);} return Logarithm; } The data looks different but still not quite like log scale. It is vertically warped to best describe it. Please note jsfiddle-ing this won't work as The data is bitcoin prices (real time) so as there is no working code for a log scale there is no good way to show a comparison. Bitcoin or any other exchange data gets served as is so these functions would (if they worked) transfom any data array to log scale. How do D3 do it? What is wrong with my code?
has comment: http://stackoverflow.com/comment/42955545
answer count: 0
has comment: http://stackoverflow.com/comment/42955808
has comment: http://stackoverflow.com/comment/42955820
type: Question
has title: Math.log, a Natural logarithmic y scale for currency time-series?
tagged with: math
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/42920012
score: 0
comment on: http://stackoverflow.com/q/27220410
has text: @Mohamed-Yousef nothing change sir.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43014733
has text: Comments with the aim of criticising or not helping to resolve the problem are totally out of place.
comment on: http://stackoverflow.com/q/27266120
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/42881281
score: 0
type: AnswerComment
has text: This defiantly helps! I understand now that I have to normalize the value. But I think before I can start tackeling this problem I need the correct way to set up my json file it should be like I stated at the top of this question maybe you can make some sense out of my fiddle I tried to make it as clear as possible with the comments. http://jsfiddle.net/9m1m8yLz/ Appreciate the help so far! I understand your example :)
comment on: http://stackoverflow.com/a/27198224
type: Comment

http://stackoverflow.com/comment/45795907
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27308762
type: Comment
has text: Hi, I haven't found any way to fix this. What I did was using a map that Highcharts provide in their map library.

http://stackoverflow.com/comment/42913422
comment on: http://stackoverflow.com/q/27216768
score: 0
type: Comment
type: QuestionComment
has text: That's just how PHP was designed, I guess.

http://stackoverflow.com/q/27166634
score: -1
tagged with: google-chrome
answer count: 1
downvote count: 1
type: UnansweredQuestion
has title: Firefox makes weird things on event modification
upvote count: 0
tagged with: firefox
has body: I've done a little keydown event modification for my 2d 'framework'. window.addEventListener('keydown', function(e) { e = e || window.event; e.key = that.keyCodeToKeyName[e.keyCode]; fireEvent('keydown', e); }); where that.keyCodeToKeyName is that.keyCodeToKeyName = {8: 'backspace', 9: 'tab', 13: 'enter', 16: 'shift', 17: 'ctrl', 18: 'alt', 19: 'pause', 20: 'capslock', 27: 'esc', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down', 45: 'insert', 46: 'delete', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 96: 'numpad0', 97: 'numpad1', 98: 'numpad2', 99: 'numpad3', 100: 'numpad4', 101: 'numpad5', 102: 'numpad6', 103: 'numpad7', 104: 'numpad8', 105: 'numpad9', 112: 'f1', 113: 'f2', 114: 'f3', 115: 'f4', 116: 'f5', 117: 'f6', 118: 'f7', 119: 'f8', 120: 'f9', 121: 'f10', 122: 'f11', 123: 'f12'}; so if I, in chrome, call _.on('keydown', function(e) { if (e.key === 'space' &amp;&amp; paused) return newRound(); keys[e.key] = true; }); e.key is, for example 'left', 'ctrl', 'n', ... but in Firefox the first letter of the string is uppercase ?! anyone has an idea why this happens ? I also tried getting the key-name in my own listener function: _.on('keydown', function(e) { var key = _.keyCodeToKeyName[e.keyCode]; if (key === 'space' &amp;&amp; paused) return newRound(); keys[key] = true; }); which works in both browsers.
tagged with: javascript
favorite count: 0
type: Question
tagged with: events
has answer: http://stackoverflow.com/a/27470069

http://stackoverflow.com/comment/42947812
type: Comment
type: QuestionComment
score: 8
has text: No, there isn’t, unless you assign one specifically, e.g. with `a.array = myArr;`, but that’s kind of a given, and won’t work on primitives like numbers, booleans, or strings, either. What are you trying to accomplish?
comment on: http://stackoverflow.com/q/27235627

http://stackoverflow.com/comment/42979805
type: QuestionComment
comment on: http://stackoverflow.com/q/27252880
has text: obligatory remark: http://stackoverflow.com/questions/590747/using-regular-expressions-to-parse-html-why-not
score: 0
type: Comment

http://stackoverflow.com/comment/43064096
score: 0
comment on: http://stackoverflow.com/q/27299997
type: Comment
type: QuestionComment
has text: Yes I did, @TrueBlueAussie.

http://stackoverflow.com/a/27311329
type: Answer
has comment: http://stackoverflow.com/comment/43083538
has comment: http://stackoverflow.com/comment/43089636
has comment: http://stackoverflow.com/comment/43083342
score: 0
has comment: http://stackoverflow.com/comment/43083794
answers question: http://stackoverflow.com/q/27311316
has body: Use preventDefault() as shown :- $(".settings").click(function(event){ event.preventDefault(); var con = confirm("This some text. Are you sure?") if (con == false){ // .... } else{ // .... } }); OR(use return false) $(".settings").click(function(){ var con = confirm("This some text. Are you sure?") if (con == false){ // .... } else{ // .... } return false; });
has comment: http://stackoverflow.com/comment/43083564

http://stackoverflow.com/a/27265651
score: 1
has comment: http://stackoverflow.com/comment/43003410
has body: I don't know why you want to match the delimiting hyphen, instead of just matching the whole string and capture the numbers: input.match(/(-?\d+) *- *(-?\d+)/) The 2 numbers will be in capturing group 1 and 2. It is possible to write a regex which works for sanitized input (no space, and guaranteed to be valid as shown in the question) by using \b to check that - is preceded by a word character: \b- Since the only word characters in the sanitized string is 0-9, we are effectively checking that - is preceded by a digit.
has comment: http://stackoverflow.com/comment/43003100
accepted answer of: http://stackoverflow.com/q/27265515
has comment: http://stackoverflow.com/comment/43004866
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43003064
upvote count: 1
has comment: http://stackoverflow.com/comment/43002788
type: Answer
has comment: http://stackoverflow.com/comment/43008122
downvote count: 0
answers question: http://stackoverflow.com/q/27265515

http://stackoverflow.com/q/27280732
linked to: http://stackoverflow.com/q/2730046
has comment: http://stackoverflow.com/comment/43031927
score: 0
tagged with: iframe
tagged with: toggle
type: Question
has body: I'm trying to figure out a way to get an iframe to load with jquery toggle. I can get the iframe to toggle, but the iframe is truncated each time and only about ~20% of the iframe is displayed. The rest is cut-off. http://jsfiddle.net/purpletenspeed/0dvdye07/2/ Any help would be greatly appreciated!!! HTML &lt;ul &lt;li&gt; &lt;a href="#" class="show_hide"&gt; Toggle &lt;/a&gt; &lt;div class="slidingDiv"&gt; &lt;iframe title="Launch Chat" width="500" height="600" src="https://home-c4.incontact.com/inContact/ChatClient/ChatClient.aspx?poc=8824e96a-2f91-4dbd-b9c0-eaf91a26bd48&amp;bu=12" frameborder="0 &lt;/iframe&gt; &lt;/div&gt; &lt;/li&gt; JavaScript: $(document).ready(function () { $('.show_hide').click(function () { $(".slidingDiv").toggle(); }); }); css .slidingDiv { height: 600px; width: 300; padding: 10px; margin-top: 10px; display:none }
has comment: http://stackoverflow.com/comment/43031120
has comment: http://stackoverflow.com/comment/43030240
has comment: http://stackoverflow.com/comment/43032049
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43030887
has answer: http://stackoverflow.com/a/27280906
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43030413
has title: jquery toggle cutting off iframe
has comment: http://stackoverflow.com/comment/43030351

timer
tag name: timer
tags question: http://stackoverflow.com/q/27182628
tags question: http://stackoverflow.com/q/27209856
tags question: http://stackoverflow.com/q/27221205
type: Tag
tags question: http://stackoverflow.com/q/27233445
tags question: http://stackoverflow.com/q/27286876
tags question: http://stackoverflow.com/q/27159785
tags question: http://stackoverflow.com/q/27234087
tags question: http://stackoverflow.com/q/27244661

http://stackoverflow.com/comment/42970244
comment on: http://stackoverflow.com/a/27247699
score: 0
type: AnswerComment
has text: Two : 1.> Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead 2.>Use of getPreventDefault() is deprecated. Use defaultPrevented instead. But these are in Jquery code 2.0.3...
type: Comment

http://stackoverflow.com/comment/47281849
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27238444
has text: same for me, ended up using tourbus, ... its stripped down and makes alot more sense

http://stackoverflow.com/q/27302262
accepted answer: http://stackoverflow.com/a/27314240
type: Question
linked to: http://stackoverflow.com/q/26109556
tagged with: session
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/43083435
has comment: http://stackoverflow.com/comment/43088588
has title: req.session.passport is empty: req.user undefined
upvote count: 1
downvote count: 0
answer count: 1
favorite count: 0
has body: I've asked a similar question before, but I noticed it was in the Javascript section. I have more specific ideas of what might be going wrong now, as well. Basically, req.session.passport is empty in my logs. Whenever I start navigating around my site, req.user becomes undefined because the session doesn't have Passport's logged in user anymore. I would like to know if anyone knows how to solve this? Maybe it's just an error in the configuration of Passport, or the entire Express setup? App.js: var express = require("express"), bodyParser = require("body-parser"), mongodb = require("mongodb"), mongoose = require("mongoose"), uriUtil = require("mongodb-uri"), morgan = require("morgan"), session = require("express-session"), passport = require("passport"), flash = require("connect-flash"), ip = "hidden", port = process.env.PORT || 80 var app = express() app.disable("x-powered-by") app.use(bodyParser.json()) app.use(bodyParser.urlencoded({ extended: true })) app.use(morgan("dev")); // log every request to the console // required for passport app.use(session({ secret: "hidden", key: 'asdasdasd', cookie: { maxAge: 60000, secure: false }, resave: true, saveUninitialized: false })); // session secret app.use(passport.initialize()); app.use(passport.session()); // persistent login sessions app.use(flash()); // use connect-flash for flash messages stored in session app.set("view engine", "jade") app.use(express.static(__dirname + "/views")) require("./includes/passport")(passport) require("./includes/subject") require("./includes/user") Passport.js: var LocalStrategy = require("passport-local").Strategy, User = require("./user"), bCrypt = require('bcrypt-nodejs') module.exports = function(passport) { // used to serialize the user for the session passport.serializeUser(function(user, done) { done(null, user._id); }); // used to deserialize the user passport.deserializeUser(function(id, done) { User.findById(id, function(err, user) { done(err, user); }); }); // ===============…
tagged with: node.js
type: AnsweredQuestion
tagged with: cookies
score: 1
has answer: http://stackoverflow.com/a/27314240

http://stackoverflow.com/a/61760219
upvote count: 1
answers question: http://stackoverflow.com/q/27193732
has body: I like @Almaz Vildanov's solution. Works great. Since I use typescript, I ported the class definition to .ts: import {ExtrudeGeometry, Shape, Vector2} from "three"; class PrismGeometry extends ExtrudeGeometry { constructor(vertices: Vector2[], height) { super(new Shape(vertices), {depth: height, bevelEnabled: false}); } } example use (as in @Almaz Vildanov's original, but could leave out THREE because of imports): var A = new Vector2( 0, 0 ); var B = new Vector2( 30, 10 ); var C = new Vector2( 20, 50 ); var height = 12; var geometry = new PrismGeometry( [ A, B, C ], height ); var material = new MeshPhongMaterial( { color: 0x00b2fc, specular: 0x00ffff, shininess: 20 } ); var prism1 = new Mesh( geometry, material ); prism1.rotation.x = -Math.PI / 2; scene.add( prism1 );
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/q/27184925
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: input
has body: Hi I have a form and a script and it works great to add and multiply values in a form i made...only problem is it wont add decimal numbers. Any way to fix this? Calculate http://jsfiddle.net/1s3hoeqw/2/
has answer: http://stackoverflow.com/a/27185279
has comment: http://stackoverflow.com/comment/42856994
has answer: http://stackoverflow.com/a/27184991
upvote count: 1
has comment: http://stackoverflow.com/comment/42856958
type: AnsweredQuestion
has title: How to add form field values using javascript and/or jquery?
possible better answer: http://stackoverflow.com/a/27184991
score: 1
tagged with: sum
has comment: http://stackoverflow.com/comment/42857147
tagged with: forms
has comment: http://stackoverflow.com/comment/42857217
type: Question
accepted answer: http://stackoverflow.com/a/27185279

cordova
tags question: http://stackoverflow.com/q/27164715
tags question: http://stackoverflow.com/q/27204967
tags question: http://stackoverflow.com/q/27158707
tags question: http://stackoverflow.com/q/27178725
tags question: http://stackoverflow.com/q/27169292
tags question: http://stackoverflow.com/q/27230078
tags question: http://stackoverflow.com/q/27243169
tags question: http://stackoverflow.com/q/27202752
tags question: http://stackoverflow.com/q/27303271
tags question: http://stackoverflow.com/q/27309293
tags question: http://stackoverflow.com/q/27166265
tags question: http://stackoverflow.com/q/27286812
tags question: http://stackoverflow.com/q/27173272
tags question: http://stackoverflow.com/q/27264467
tags question: http://stackoverflow.com/q/27212020
tags question: http://stackoverflow.com/q/27246251
tags question: http://stackoverflow.com/q/27255340
tags question: http://stackoverflow.com/q/27267525
tags question: http://stackoverflow.com/q/27248749
tags question: http://stackoverflow.com/q/27299669
tag name: cordova
tags question: http://stackoverflow.com/q/27268319
tags question: http://stackoverflow.com/q/27241784
tags question: http://stackoverflow.com/q/27292479
tags question: http://stackoverflow.com/q/27169776
tags question: http://stackoverflow.com/q/27217387
tags question: http://stackoverflow.com/q/27214392
tags question: http://stackoverflow.com/q/27292937
tags question: http://stackoverflow.com/q/27295328
tags question: http://stackoverflow.com/q/27310861
tags question: http://stackoverflow.com/q/27162449
tags question: http://stackoverflow.com/q/27262404
tags question: http://stackoverflow.com/q/27292085
tags question: http://stackoverflow.com/q/27300583
tags question: http://stackoverflow.com/q/27221921
tags question: http://stackoverflow.com/q/27197028
tags question: http://stackoverflow.com/q/27221084
tags question: http://stackoverflow.com/q/27237110
tags question: http://stackoverflow.com/q/27212943
tags question: http://stackoverflow.com/q/27255757
tags question: http://stackoverflow.com/q/27215426
tags question: http://stackoverflow.com/q/27162333
tags question: http://stackoverflow.com/q/27246533
tags question: http://stackoverflow.com/q/27273360
type: Tag
tags question: http://stackoverflow.com/q/27153152
tags question: http://stackoverflow.com/q/27302568
tags question: http://stackoverflow.com/q/27263530
tags question: http://stackoverflow.com/q/27250138
tags question: http://stackoverflow.com/q/27165641
tags question: http://stackoverflow.com/q/27200070
tags question: http://stackoverflow.com/q/27224572
tags question: http://stackoverflow.com/q/27212404

http://stackoverflow.com/comment/42916867
score: 0
type: Comment
has text: Up to now, I use `localStorage` indeed. But the fact of loosing all my data, and having to remember to export the notepad (with some Download file feature) if I clean the history makes it practically uninteresting and useless... unfortunately...
comment on: http://stackoverflow.com/a/27218608
type: AnswerComment

http://stackoverflow.com/comment/42989271
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27257144
type: Comment
has text: Is `prop()` returning integer? If not wrap that into `parseInt()` like `var currentTime = parseInt($("#player").prop("currentTime"))`

http://stackoverflow.com/q/27267511
type: Question
has title: create a filter searchbox to a checkbox list- dynamic response listing
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27267611
has answer: http://stackoverflow.com/a/27267608
has body: I need to do a form with a long list of item with checkbox for user to tick and pick their options. Because the list has hundreds of item, so to make the search job easy, I thought if I could have a search box act like a filter. when the user enters something, it will filter the list to match the entered text. for example when user enter "A", only items with "A" will be display in the list. the user will repeat searching for item and tick the checkbox on item they wanted. and then when the searchbox is empty, the full list should be displayed. in the end, the user click submit, all the checked item should be post to the next page. (I hope my explanation is clear enough to understand.) Was thinking js "onchange" function might solve the problem but with my limited knowledge on js, I have no idea how to. For example my code: &lt;form name="submit" action="envelope.php" method="POST"&gt; &lt;table width="100%" cellspacing="0" cellpadding="3"&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td colspan="2"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="search" onchange="filter()"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php $i=0; $str = "SELECT * FROM item "; $query = mysql_query($str) or die(mysql_error()); while($row = mysql_fetch_array($query)) { $i++; ?&gt; &lt;tr&gt; &lt;td style="border-bottom: 1px #cccccc solid" width="10"&gt;&amp;nbsp;&amp;nbsp;&lt;?php echo $i ?&gt;.&lt;/td&gt; &lt;td style="border-bottom: 1px #cccccc solid"&gt;&lt;input type="checkbox" name="itm[]" value="&lt;?php echo $row['ID'] ?&gt;"/&gt;&lt;/td&gt; &lt;td style="border-bottom: 1px #cccccc solid"&gt;&lt;?php echo $row['ID'] ?&gt;&lt;/td&gt; &lt;td style="border-bottom: 1px #cccccc solid"&gt;&lt;?php echo $row['name'] ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/table&gt; &lt;/div&gt; &lt;br/&gt; &lt;input type="submit" name="submit" value="submit"/&gt; &lt;/form&gt; the input text field would be the search filter. Appreciate if someone could advise. Thank you in advance!
tagged with: php
possible better answer: http://stackoverflow.com/a/27267608
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27267611

http://stackoverflow.com/q/27281528
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/43033117
has body: I am getting JSON data in my page, and I want to include "like" and "dislike" options to the buttons with a click event using the following code. But I am not able to get the result. I'm not sure of how to loop the array. //code for like and dislike buttons $scope.li = function(ep1){ ep1.cue.episode.ratings.loved = (ep1.cue.episode.ratings.loved) + 1; if ((ep1.cue.episode.ratings.hated) &gt; 0) ep1.cue.episode.ratings.hated = (ep1.cue.episode.ratings.hated) - 1; ep1.liked = true; ep1.disliked = false; };
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27282621
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43031799
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27282621
favorite count: 0
has comment: http://stackoverflow.com/comment/43032514
has comment: http://stackoverflow.com/comment/43032643
has comment: http://stackoverflow.com/comment/43032753
has comment: http://stackoverflow.com/comment/43032438
has comment: http://stackoverflow.com/comment/43031972
has title: How to use click event work in angularjs?
tagged with: angularjs

http://stackoverflow.com/comment/43144025
has text: The menu takes a single click...this is so bizarre.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27310691
type: Comment

http://stackoverflow.com/comment/42984141
score: 0
type: Comment
type: QuestionComment
has text: _"but the code only works when I preview it in the HTML and Javascript boxes of the site i'm using (then displays nothing when I launch it)"_ That doesn't make much sense. Have you tried debugging the code with your developer tools?
comment on: http://stackoverflow.com/q/27255096

http://stackoverflow.com/comment/42874983
type: Comment
has text: Can you please help me with creating correct loops with your functions? I'm new for JS and would be very grateful to you
type: AnswerComment
comment on: http://stackoverflow.com/a/27194801
score: 0

http://stackoverflow.com/q/27238938
has title: Bootstrap popover destroy & recreate works only every second time
answer count: 6
tagged with: popover
has body: I want to programmatically destroy &amp; recreate a specific Bootstrap popover. So what I do is: $('#popoverspan').popover('destroy'); $('#popoverspan').popover({placement : 'bottom', trigger : 'hover', content : 'Here it is!'}); And it works every second time only. I thought that it's the matter of the time it takes to destroy the popover, but even adding a delay between the two lines doesn't help. I recreated the problem in JSFiddle: http://jsfiddle.net/Lfp9ssd0/10/ Why is it like that? It has been suggested that it works, e.g. in Twitter Bootstrap Popover with dynamically generated content via ajax and Bootstrap Popover Reinitialization (To refresh Content) It works just fine when I skip the destroying, but I am not sure what happens when I create another popover for an element without destroying the already existing one. Is it reinitialised or does it create a new popover with losing the access to the old one?
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/43286458
has answer: http://stackoverflow.com/a/47819942
has answer: http://stackoverflow.com/a/27345242
type: AnsweredQuestion
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/32511781
upvote count: 21
has answer: http://stackoverflow.com/a/50361556
has answer: http://stackoverflow.com/a/68164279
accepted answer: http://stackoverflow.com/a/27345242
type: Question
possible better answer: http://stackoverflow.com/a/32511781
score: 21

http://stackoverflow.com/comment/42836645
score: 0
type: Comment
type: QuestionComment
has text: Your chart should be inisialised in the $.getJSON() callback, becasue chart is inisialised before, getting whole data.
comment on: http://stackoverflow.com/q/27171337

http://stackoverflow.com/comment/43045209
type: Comment
has text: The column headers have some hardcoded behaviour that adds `draggable="true"` attribute, preventing highlighting (check out the ng-grid source code). If you need more flexible headers, it's probably time to move to UI-Grid where it's much easier to define custom headers: http://ui-grid.info/docs/#/tutorial/302_custom_header
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27285951

http://stackoverflow.com/comment/42842957
type: AnswerComment
comment on: http://stackoverflow.com/a/27175671
has text: @frenchie the first paragraph describes the difference between touchstart and click/FastClick.
type: Comment
score: 1

http://stackoverflow.com/q/27247912
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27248035
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: email
tagged with: mailto
favorite count: 0
downvote count: 0
has title: simple mailto function that composing an email from html file
has body: I need to create a simple mailto function so when I click on the html file it brings up my default email application with the composed mail "ready-to-go." I figured a click event on the mailto ID would be sufficient, but it is not firing. What should I do? FYI, I do not want the user to click on the hyperlink. I plan on removing it. <TITLE>Your Title Here email
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27248035
type: Question

http://stackoverflow.com/a/27270270
upvote count: 1
has comment: http://stackoverflow.com/comment/43011129
type: Answer
downvote count: 0
has body: Try this $('#level1-option').trigger("change");
answers question: http://stackoverflow.com/q/27270207
score: 1
has comment: http://stackoverflow.com/comment/43042247

http://stackoverflow.com/a/27293574
type: Answer
upvote count: 1
score: 1
has body: You can simply add same "target" attribute to all of your links, this way they will all be opened in same new tab. link Also, you can use second parameter of the window.open method, and pass same window name there window.open("http://www.example.com", "mywindow");
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27292585
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27292585

http://stackoverflow.com/a/47222449
has comment: http://stackoverflow.com/comment/81394566
has body: function AllowAlphabet(evt) { var charCode = (evt.which) ? evt.which : event.keyCode; if ((charCode &gt; 64 &amp;&amp; charCode &lt; 91) || (charCode &gt; 96 &amp;&amp; charCode &lt; 123)) return true; else return false; }
has comment: http://stackoverflow.com/comment/115998017
score: 0
answers question: http://stackoverflow.com/q/27227599
type: Answer

http://stackoverflow.com/a/29390393
downvote count: 24
upvote count: 247
has comment: http://stackoverflow.com/comment/60811122
has comment: http://stackoverflow.com/comment/89443057
answers question: http://stackoverflow.com/q/27159179
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/82114810
has comment: http://stackoverflow.com/comment/105112035
has comment: http://stackoverflow.com/comment/82114747
has comment: http://stackoverflow.com/comment/82354985
accepted answer of: http://stackoverflow.com/q/27159179
has comment: http://stackoverflow.com/comment/85207148
has comment: http://stackoverflow.com/comment/99185501
type: Answer
has comment: http://stackoverflow.com/comment/65263890
has comment: http://stackoverflow.com/comment/104009089
has body: This function converts a Blob into a File and it works great for me. Vanilla JavaScript function blobToFile(theBlob, fileName){ //A Blob() is almost a File() - it's just missing the two properties below which we will add theBlob.lastModifiedDate = new Date(); theBlob.name = fileName; return theBlob; } TypeScript (with proper typings) public blobToFile = (theBlob: Blob, fileName:string): File => { const b: any = theBlob; //A Blob() is almost a File() - it's just missing the two properties below which we will add b.lastModifiedDate = new Date(); b.name = fileName; //Cast to a File() type return theBlob as File; } Usage const myBlob = new Blob(); //do stuff here to give the blob some data... const myFile = blobToFile(myBlob, "my-image.png");
has comment: http://stackoverflow.com/comment/94638240
score: 223

http://stackoverflow.com/comment/42891948
type: QuestionComment
has text: I've copied and pasted into plunker the same code that I have in my local webserver.
comment on: http://stackoverflow.com/q/27204198
score: 0
type: Comment

http://stackoverflow.com/comment/43086783
type: AnswerComment
has text: i am getting only single value @ghost
comment on: http://stackoverflow.com/a/27312889
score: 0
type: Comment

http://stackoverflow.com/a/27297729
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27297625
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: onclick[^(]*\('([^']+) Try this.Grab the groups 1.See demo. http://regex101.com/r/yR3mM3/54
answers question: http://stackoverflow.com/q/27297625

http://stackoverflow.com/a/36160701
has body: I couldn't make it work with the @t4deu solution, because my ng-app tag was in the body, so I leave a little change in case that it helps to someone. &lt;script&gt; document.addEventListener('deviceready', function() { angular.bootstrap(document.querySelector('body'), ['starter']); }, false); &lt;/script&gt;
upvote count: 3
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27300583

http://stackoverflow.com/comment/42900304
has text: side note - use either `dataType: "json"` or `var data = JSON.parse(response);`, not both.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27209166
type: Comment

http://stackoverflow.com/q/27272797
accepted answer: http://stackoverflow.com/a/27272898
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27272906
has title: JQuery - Correct way to populate data in form
answer count: 2
possible better answer: http://stackoverflow.com/a/27272906
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/43015237
has comment: http://stackoverflow.com/comment/43015850
has comment: http://stackoverflow.com/comment/43015158
has answer: http://stackoverflow.com/a/27272898
tagged with: php
type: AnsweredQuestion
has body: function getData(id) { $.getJSON('process.php?action=lookup&amp;id='+id, parseInfo); return false; } // Display data in form function parseInfo(data) { if (data.id &gt; 0) { $('#txtaction').val('update'); $('#txtbook_id').val(data.id); } else { $('#txtaction').val(''); $('#txtbook_id').val(''); } } Referring to the method above, is this the proper way to populate form fields? Will it cause any problem when calling getData function if i have a long list of form fields to populate and attributes to change? Thank you in advance for any comments!
has comment: http://stackoverflow.com/comment/43015393
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43020194
has comment: http://stackoverflow.com/comment/43037620
type: Question

http://stackoverflow.com/q/27277421
has answer: http://stackoverflow.com/a/27277539
has body: I was trying to understand why is it that when I click my radio button, I do not see the output of the total price, but when I ran my code in jsfiddle or in a seperate test.php page where I did not refer the script for the iCheck, the total price output was showing. How does the design of the iCheck interfere? And how can I fix this issue? icheck.js $(document).ready(function(){ $('input').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); }); price.js //outputs the Total price when the radio button is clicked $(document).ready(function(){ //alert(); $(document).on("click", ".btn-checkbox-plan", function(e){ if($(".btn-checkbox-plan").is(':checked')){ $("#output").html($(this).val()); } }); }); Code: Checkout Silver Plan $699 Gold Plan $999 Personalized Logo $49.99 Tax + Processing $0.00 Total
tagged with: http://stackoverflow.com/tag/html
tagged with: php
accepted answer: http://stackoverflow.com/a/27277539
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
has title: The custom iCheck design of the radio button prevents the output of Total price when clicked
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/27164613
accepted answer: http://stackoverflow.com/a/27167987
tagged with: jquery
has answer: http://stackoverflow.com/a/27165823
has body: I want to write a mRender function for j Query datable to give and hide and show link for the incoming data. I have 2 columns in it one is for description and other is for card number. Now, when I get card number from the Ajax call, I need to have a show and hide link in second column where card number will be displayed. When data gets populated, it should show Show link - on click of this link it should show Hide link - I am new to this j query and java script thing. Would appreciate any help. Thanks function DisplayCardList() { oTable = $('#cardTable').dataTable({ "aaData": cardList, "aoColumnDefs": [ { "aTargets": [0], "sClass": "Card Name", "mData": "description" }, { "aTargets": [1], "sClass": "CardNumber", //I need to write the function here.. } ] }); $('#cardTable').show(); }
possible better answer: http://stackoverflow.com/a/27165823
has comment: http://stackoverflow.com/comment/42821766
type: AnsweredQuestion
has title: I need to mask the incoming number and show only last 4 digits?
tagged with: mask
has answer: http://stackoverflow.com/a/27167987
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27167886
score: 0
answer count: 3
tagged with: datatables
has comment: http://stackoverflow.com/comment/42824951

http://stackoverflow.com/comment/43050055
score: 0
comment on: http://stackoverflow.com/q/27292110
type: Comment
type: QuestionComment
has text: Added the jquery i'm using, i'm not at my computer right now, so i dont have access to my php code atm

http://stackoverflow.com/q/27170021
tagged with: jquery
has title: google+ login error. Blocked a frame with origin "http://localhost"
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42839204
has body: I am applying google+ login in my website. but when i send data to my service to save it on database it gives me following error: Uncaught SecurityError: Blocked a frame with origin "http://localhost" from accessing a frame with origin "https://apis.google.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match. my code is: this function fills the values in textboxes. and the values are getting filled correctly. function signinCallback(authResult) { if (authResult['status']['signed_in']) { gapi.client.load('plus', 'v1', function() { var request = gapi.client.plus.people.get({ 'userId': 'me' }); request.execute(function(resp) { var googleId = resp.id; var name=resp.displayName isGoogleSignUp(googleId, function(res) { if (res) { window.location = "profile.php"; } else { $("#loginPopup").css("dispaly", "none"); $("#signupPopup").css("display", "block"); $("#socialName").val(name); //$("#socialMail").val(); $("#socialId").val(googleId); $("#socialType").val("google"); } }); console.log(resp); }); }); } else { console.log('Sign-in state: ' + authResult['error']); } } This function gives error when called by submit button click- function socialSignUp1() { var urlString = "Service/socialSignup.php"; var form = new Object(); form.socialId = $("#socialId").val; console.log(form.socialId); form.type = $("#type").val(); form.name = $("#socialName").val(); form.mail = $("#socialMail").val(); form.phone = $("#socialPhone").val(); form.address = $("#socialAddress").val(); $.ajax({ type: 'POST', data: form, url: urlString, success: function(resultData) { if (resultData == 1) { window.location("profile.php"); } }, error: function(resultData) { alert(resultData); }, failed: function() { alert("hello"); } }); }
has comment: http://stackoverflow.com/comment/42831859
has comment: http://stackoverflow.com/comment/42831669
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27170373
type: Question
has comment: http://stackoverflow.com/comment/42831062
tagged with: javascript
tagged with: google-signin
has comment: http://stackoverflow.com/comment/42831288
has comment: http://stackoverflow.com/comment/42830988
has comment: http://stackoverflow.com/comment/42852273
answer count: 1
downvote count: 0
tagged with: google-plus

http://stackoverflow.com/q/27272075
tagged with: javascript
has answer: http://stackoverflow.com/a/27272151
type: AnsweredQuestion
has body: I want to renumber the integers inside a string, that has this format (letters and int numbers): "e1b2xx4d3". In this example, I want to get: "e1b2xx3d4"; I have written the following JS code: var count = 0; var matches; var transcript = "e1b2xx4d3"; var transcript1 = transcript; regex = /\d+/g; while ((matches = regex.exec(transcript)) !== null) { transcript1 = transcript1.replace(matches[0], ++count); } console.log(transcript1); The idea is to replace each number in the string by its sequence number (count), but it does not work because of destructive replaces (here, we get "e1b2xx4d3", because "xx4" is replaced with "xx3", but at the next iteration by "xx4" back). I need to do this with regex because the case that I deal with is more complex than the one shown and requires using regex. I think that I have to do it in two passes (iterations): 1. compiling replacements and 2. applying replacements simultaneously. By curiousity, can someone find a way to do this in one pass ? Fiddle: http://jsfiddle.net/0frru6fr/
favorite count: 0
type: Question
tagged with: regex
accepted answer: http://stackoverflow.com/a/27272151
score: 0
upvote count: 1
downvote count: 1
answer count: 1
has title: Renumber the integers inside a string in Javascript

http://stackoverflow.com/a/27207779
has comment: http://stackoverflow.com/comment/42904851
downvote count: 0
has body: You should set up a MutationObserver in your content script to watch for insertions of elements you want to modify. See this question for more details. Also, the Mutation Summary library might work well in your case.
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42903003
answers question: http://stackoverflow.com/q/27198201

http://stackoverflow.com/comment/42854629
has text: Can you create a jsib or jsfiddle demonstrating this issue? , that would be helpful.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27178459

http://stackoverflow.com/a/72668581
answers question: http://stackoverflow.com/q/27205018
score: 0
type: Answer
has body: You can now achieve this using TensorFlow.js: Check the console log!

http://stackoverflow.com/q/27293758
possible better answer: http://stackoverflow.com/a/27293915
has comment: http://stackoverflow.com/comment/43054326
downvote count: 3
has answer: http://stackoverflow.com/a/27293915
upvote count: 1
accepted answer: http://stackoverflow.com/a/27308897
duplicate of: http://stackoverflow.com/q/10585029
has comment: http://stackoverflow.com/comment/43052634
type: AnsweredQuestion
score: -2
has body: I am very new to JavaScript and I have been tasked by my job to make a HTML Parser that can go through lines of a html file and find say an ID tag and then match it with an excel sheet (or CSV), and then swap the ID with a value from the spreadsheet / CSV file. NOTE: I am not asking you to do it for me; just I have looked through loads and I am just not aware of the right parser I need. A point in the right direction would be great thanks. Here is an example of a HTML document with IDs: (The ID's are prefixed with #IDHERE# as I don't know how to prefix an ID without the parser yet) //Header Data Here #ID_MainTitle# #ID_Para1# Here is a table (Lua) (could be excel etc, but just for an example): { ["ID_MainTitle"] = "Hello World", ["ID_Para1"] = "This is a test!", } This would need to be the end result: //Header Data Here Hello World This is a test! I know it's not much help but I did have a look but none of the ones I found looked remotely like what I need.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43052579
favorite count: 0
has answer: http://stackoverflow.com/a/27308897
has comment: http://stackoverflow.com/comment/43054068
has comment: http://stackoverflow.com/comment/43052628
has comment: http://stackoverflow.com/comment/43054324
has comment: http://stackoverflow.com/comment/43052672
answer count: 3
has comment: http://stackoverflow.com/comment/43052498
has title: How to make a HTML Parser in JavaScript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27294162
tagged with: node.js
tagged with: parsing
linked to: http://stackoverflow.com/q/10585029

http://stackoverflow.com/comment/43016507
comment on: http://stackoverflow.com/a/27273367
score: 0
type: AnswerComment
has text: Like the use of moment.js!
type: Comment

http://stackoverflow.com/comment/42948404
has text: Okay, this is weird. Are you sure the indentation of your code is correct? I can see that `success: (data) ->` should have one more space in front of it. Can you check it?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27235827
type: Comment

http://stackoverflow.com/comment/42971063
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27232971
score: 0
has text: so how do you do that ? @LarsKotthoff

http://stackoverflow.com/comment/42815854
score: 0
comment on: http://stackoverflow.com/a/27161093
type: Comment
has text: Why would the user deliberately disclose the information that is sent by manipulating the encryption code? I'm not sure you've got the attack scenario right.
type: AnswerComment

http://stackoverflow.com/comment/43199666
comment on: http://stackoverflow.com/a/27169697
type: AnswerComment
score: 0
has text: Check the phase. I've seen errors be thrown during the ApplyRequestValues phase with computed content in the detail facet of a DataView. It doesn't cause a problem, because it's display content, so also gets recalculated successfully during later phases of the partial refresh. I don't know the exact cause to identify if the same could happen with a repeat control - I've not encountered an error in ApplyRequestValues for a repeat control.
type: Comment

http://stackoverflow.com/a/77931900
type: Answer
has comment: http://stackoverflow.com/comment/137405633
answers question: http://stackoverflow.com/q/27223756
score: -1
downvote count: 1
upvote count: 0
has body: when check this . I saw it also uupercase so if (e.target.tagName === "IMG"){ e.target.parentElement.remove(); } tried It.

http://stackoverflow.com/comment/42999409
comment on: http://stackoverflow.com/a/27263554
type: AnswerComment
has text: you can use `$(ui.draggable).find('span')`. this will return both the span tags
score: 0
type: Comment

http://stackoverflow.com/comment/43986679
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27253653
has text: Are you using the latest version of jsPlumb?

http://stackoverflow.com/comment/42923254
type: Comment
comment on: http://stackoverflow.com/a/27221970
score: 2
has text: Well, what value of `index` do you get? I get 4405 today. What's the message at `msg[4405]`?
type: AnswerComment

http://stackoverflow.com/q/27263054
tagged with: php
has body: Using jQuery and AJAX, I've created a script that loops every second to refresh a console. The page is setup like so: index.php -&gt; console.php -&gt; consoleQuery.php Where index.php is the main page, with buttons that can trigger multiple AJAX scripts and replace the body of index.php with the returned contents. One of the scripts being console.php and part of console.php includes the following script. window.setInterval(function() { $.ajax({ type: "POST", url: "ajax/consoleQuery.php", data: "", success: function(response) { $("#consoleBody").html(response); } }); console.log("Console refreshed"); }, 1000); This script calls upon consoleQuery.php to essentially update the body of the page and refresh it every second. The problme is however, upon clicking another page thats parented to index.php (for example index.php -&gt; home.php) the JS that is causing the loop still occurs in the background when home.php replaces the body of index.php. On top of this, triggering console.php again causes it to then refresh the console twice per second and so on if its clicked multiple times. Essentially the loop is running in multiple instances. What I want to try and do is upon triggering one of the AJAX requests that doesn't request console.php, stop the looping script that is refreshing the body of the page. Is there any way to stop the loop when accessing a different page? Thanks in advance!
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27263104
answer count: 1
accepted answer: http://stackoverflow.com/a/27263104
has title: Stop looping AJAX query

http://stackoverflow.com/a/28664505
has comment: http://stackoverflow.com/comment/51715279
has comment: http://stackoverflow.com/comment/51572456
has comment: http://stackoverflow.com/comment/51699204
has comment: http://stackoverflow.com/comment/51640034
has comment: http://stackoverflow.com/comment/54998063
accepted answer of: http://stackoverflow.com/q/27236960
answers question: http://stackoverflow.com/q/27236960
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/54899644
has comment: http://stackoverflow.com/comment/51615529
has body: You just have to abstract that with an helper function. Assuming jQuery: function ajax(type, url, data){ $.ajax({ url: url, data: data, type: type }) .done(function(data) { iterator.next(data); }) .fail(function() { iterator.throw(); }); } var get = ajax.bind(null, 'GET'); var post = ajax.bind(null, 'POST'); var put = ajax.bind(null, 'PUT'); var patch = ajax.bind(null, 'PATCH'); var del = ajax.bind(null, 'DELETE'); function *asyncGet() { var URL = 'https://api.stackexchange.com/2.2/answers?order=desc&amp;sort=activity&amp;site=stackoverflow' var data = yield get(URL); console.log(data); } var iterator = asyncGet(); iterator.next(); Another example using setTimeout: function delayReturn(time, val){ setTimeout(function(){ iterator.next(val); }, time); } var delayReturn1s = delayReturn.bind(null, 1000); function *main() { console.log(yield delayReturn1s('Lolcat')); } var iterator = main(); iterator.next() Of course you can abstract the iterator passing with something like this: var async = function(generator){ var resume = function(err, data){ if (err) iterator.throw(); iterator.next(data); } var iterator = generator(resume); iterator.next(); } Then you can simply: function ajax(type, url, data, cb){ $.ajax({ url: url, data: data, type: type }) .done(function(data) { cb(null, data) }) .fail(function() { cb(arguments); }); } var get = ajax.bind(null, 'GET'); var post = ajax.bind(null, 'POST'); var put = ajax.bind(null, 'PUT'); var patch = ajax.bind(null, 'PATCH'); var del = ajax.bind(null, 'DELETE'); async(function *(resume) { var URL = 'https://api.stackexchange.com/2.2/answers?order=desc&amp;sort=activity&amp;site=stackoverflow' var data = yield get(URL, null, resume); console.log(data); });
type: Answer
upvote count: 5
downvote count: 0

http://stackoverflow.com/q/27173054
has body: I have the following code example in fiddle.net here of a Dijit.Menu and a div. The Menu appears with a left click, my problem is that the Menu overlaps (or covers, hides) the content of the target div and users cannot read its content when making comparisons with the alternatives presented in the Menu, see the figure below. So is there a way to make the Menu appear without overlapping the div content, so that the div content could be seen while browsing the menu items, maybe positioning the menu below or above the div, as in the following figure.
has comment: http://stackoverflow.com/comment/42841642
answer count: 2
tagged with: javascript
score: 0
has title: Avoid overlapping between a Dijit Menu and its target div
has answer: http://stackoverflow.com/a/27206460
accepted answer: http://stackoverflow.com/a/27206460
has answer: http://stackoverflow.com/a/27202236
tagged with: menu
tagged with: dijit.form
tagged with: popup
has comment: http://stackoverflow.com/comment/42840144
tagged with: dojo
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27202236

http://stackoverflow.com/comment/43083881
type: Comment
has text: If you can do this with a circle or rect already, you should be able to use the getBBox() method on any element like a path, to get its x1,x2,y1,y2 points to compare against. Just run getBBox() and look at the output.
type: QuestionComment
comment on: http://stackoverflow.com/q/27295718
score: 0

http://stackoverflow.com/q/27310142
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27310563
has title: Javascript return file from web service
type: Question
has comment: http://stackoverflow.com/comment/43082608
has comment: http://stackoverflow.com/comment/43081934
tagged with: javascript
tagged with: jquery
has body: I am trying to make a file download using javascript from a web service. The web service return data in JSON string with format below: { "status": "OK", "encodedFile": "[binary]" } The encodedFile is a Base64 encoded form of file bytes from the web service. The web service get the file in the server, convert the file to be array of bytes, and then encode the array of bytes to string using Base64, and return the response in JSON format, so the javascript get the string. After I get the the string and decode it (I get the bytes of file), how I can return it (the bytes) as a file download? Basically, now I have the bytes of file, and I want to return it to be a file download. I am using jquery ajax to get the response, get the "status", and get the "encodedFile". Any help or suggestion will be appreciated. Thank you in advance.
downvote count: 0
answer count: 1
favorite count: 0
tagged with: download
has comment: http://stackoverflow.com/comment/43082584
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43081653
score: 3
upvote count: 3

http://stackoverflow.com/a/27257511
score: 18
has comment: http://stackoverflow.com/comment/42994001
answers question: http://stackoverflow.com/q/27257336
upvote count: 18
downvote count: 0
has body: Internet Explorer does not permit data URIs as navigable content, for security purposes. To understand why, I would encourage you to read Henning Klevjer's short white-paper on the topic, Phishing by data URI. In summary, this has been demonstrated to open up avenues by which the end-user could be tricked into giving up sensitive information. Also, from the data Protocol documentation on MSDN: For security reasons, data URIs are restricted to downloaded resources. Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements. To be honest, passing a data URI to window.open feels a bit hacky. Instead, you should use an API to handle the process (provided one exists). If you'd like to download a file to the user's machine in Internet Explorer, consider using navigator.msSaveBlob or navigator.msSaveOrOpenBlob. As an example, consider the following: if ( window.navigator.msSaveOrOpenBlob &amp;&amp; window.Blob ) { var blob = new Blob( [ "A,B\nC,D" ], { type: "text/csv" } ); navigator.msSaveOrOpenBlob( blob, "strings.csv" ); }
type: Answer
has comment: http://stackoverflow.com/comment/42989785

http://stackoverflow.com/a/42544586
type: Answer
answers question: http://stackoverflow.com/q/27284644
score: 3
has body: I ran into this problem too, here's an answer for future Google searches. For some reason parallax.js adds 'position: absolute' to your .layer elements. In the non-jquery version - I just commented out the following on line 289. // Configure Layer Styles for (var i = 0, l = this.layers.length; i &lt; l; i++) { var layer = this.layers[i]; if (this.transform3DSupport) this.accelerate(layer); // layer.style.position = i ? 'absolute' : 'relative'; // nope // layer.style.display = 'block'; // nope // layer.style.left = 0; // nope // layer.style.top = 0; // nope
upvote count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/113275661

http://stackoverflow.com/comment/138829285
comment on: http://stackoverflow.com/q/27207129
score: 0
type: Comment
type: QuestionComment
has text: In my case I needed to add the web page's base URL to the manifest's `externallyCollectable` list. Ex: `externally_connectable: { matches: ["*://localhost/*"] }`

http://stackoverflow.com/a/73819597
answers question: http://stackoverflow.com/q/27159179
type: Answer
downvote count: 1
score: 8
upvote count: 9
has body: var blob = new Blob(["Hello, world!"], { type: "text/plain;charset=utf-8" }); var file = new File([blob], "name.txt"); Now you can upload as .txt file

x-editable
tags question: http://stackoverflow.com/q/27289041
tags question: http://stackoverflow.com/q/27193923
type: Tag
tag name: x-editable

http://stackoverflow.com/a/27265232
upvote count: 1
answers question: http://stackoverflow.com/q/27265024
downvote count: 0
type: Answer
has body: Use a mediator file instead of directly linking to the url The mediator PHP file will count how many times it has been called (use a counter there) and then redirect to the actual URL URL As per your code, it should be something like while($rows=mysql_fetch_assoc($run)) { $title=$rows['title']; $desc=$rows['description']; $url=urlencode($rows['url']); //include 'index.php'; echo "$title $url" "; } And in your redirect.php file (count and redirect file) if(!file_exists('counter.txt')){ file_put_contents('counter.txt', '0'); } file_put_contents('counter.txt', ((int) file_get_contents('counter.txt')) + 1); header('Location: ' . $_GET['redirect']);
score: 1

http://stackoverflow.com/comment/43030490
type: Comment
has text: I've added a snippet from my app.js to clarify the state configuration for this page. @akonsu I tried $scope.$parent.quantity and that did not work either...
score: 0
comment on: http://stackoverflow.com/q/27280432
type: QuestionComment

http://stackoverflow.com/comment/42832467
comment on: http://stackoverflow.com/q/27170632
score: 0
has text: I have to run few JS on another site (like clicking few links or buttons) for many times. But after each click the page will refresh and so I have to run the JS again manually(on Console panel). But I am trying to create a JAVA application which will open link in browser, click the link by JS(Which will be run by JAVA App), then the page will refresh automatically, then again clicking the link by JS and continue for an hour. How can I do that? @Gimby
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43078204
score: 1
comment on: http://stackoverflow.com/q/27308024
type: Comment
has text: You might have to trap keydown or keypress events which are disticnt.
type: QuestionComment

http://stackoverflow.com/a/27314114
type: Answer
has body: You can send fields request parameter to me call. It will return the username in the response as needed. FB.api('/me?fields=email,username,first_name,last_name', function(response) { console.log(response.username); })
score: 0
answers question: http://stackoverflow.com/q/27311928
has comment: http://stackoverflow.com/comment/43088531

http://stackoverflow.com/a/27266884
has comment: http://stackoverflow.com/comment/43963806
has comment: http://stackoverflow.com/comment/43026134
answers question: http://stackoverflow.com/q/27251745
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43966076
has comment: http://stackoverflow.com/comment/43657052
has comment: http://stackoverflow.com/comment/43214304
score: 1
has comment: http://stackoverflow.com/comment/43005528
has comment: http://stackoverflow.com/comment/43656723
has comment: http://stackoverflow.com/comment/43964186
has comment: http://stackoverflow.com/comment/43639154
has comment: http://stackoverflow.com/comment/43219040
has comment: http://stackoverflow.com/comment/43671036
has comment: http://stackoverflow.com/comment/43670944
has body: I think the OP is trying to project the point C onto the line passing thru point B and is perpendicular to line AB. If this is the case, the math for the projection is not correct. You can find the projected point D as D= C - dot(vec(BC), vec(AB)) * vec(AB)/|vec(AB)|^2 By this calculation, the projected point D will be (50.8825952820492, 6.00363622113846). The following is a picture for points A, B, C and D :
has comment: http://stackoverflow.com/comment/43965795
has comment: http://stackoverflow.com/comment/43214202
has comment: http://stackoverflow.com/comment/43980058
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43005310
has comment: http://stackoverflow.com/comment/43623085
accepted answer of: http://stackoverflow.com/q/27251745

http://stackoverflow.com/comment/42883723
comment on: http://stackoverflow.com/q/27199800
has text: Just a guess, but maybe it should be `store.products` (plural)? Otherwise try to replicate it here: http://plnkr.co/edit/iZ9xjp5dIopc6sAjccKj?p=preview
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27225995
downvote count: 1
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/27225936
has comment: http://stackoverflow.com/comment/42929778
has comment: http://stackoverflow.com/comment/42930578
has comment: http://stackoverflow.com/comment/42930247
type: Answer
has body: You can have some global integer variable (counter), which you should increase (+1) in the success method just below j(".refresh").html(html); Then, you can display it anywhere at the page. Also, don't forget to set that counter to 0 when the page is loaded. Or, you can have the check in the success method: if(counter == undefined) { counter = 0; } Complete code: var counter; $(document).ready(function () { var j = jQuery.noConflict(); j('.refresh').click(refreshDiv); j('.refresh').css({ color: "" }); function refreshDiv() { j.ajax({ url: "refresh.php", cache: true, success: function (html) { j(".refresh").html(html); if(counter == undefined) { counter = 0; } counter ++; j("#divForCounter").text('refreshed ' + counter + 'times'); } }); } }); &lt;?php echo time(); ?&gt; P.S. You should have div with id divForCounter in your html, where the text regarding refreshes will be posted.

http://stackoverflow.com/comment/42823087
comment on: http://stackoverflow.com/q/27165228
has text: For DocType refer this: http://stackoverflow.com/questions/7695044/what-does-doctype-html-do
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27220120
has body: Polymer has an element called core-ajax that handles this. I have used it on the page linked below, check it out: https://github.com/IntrinsicSchools/student-portal/blob/master/client/app/elements/kickboard-behaviors.html
has comment: http://stackoverflow.com/comment/42926055
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27215497
score: 1

http://stackoverflow.com/q/27226199
has comment: http://stackoverflow.com/comment/42930123
score: -1
has comment: http://stackoverflow.com/comment/42930110
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27226236
has body: I have a table and wants to toggle a td content on td click. just like accordian. I have tried this code but of no use. $('#table tr').each(function(){ $(this).on("click", "#largeTd", function(){ //$(this).toggle(); //$('#largeTd:eq(' + index + ')',this).toggle(); }); }); How could I solve this issue. Below is the HTML code which will be having a large text in a td. I want to show/hide this content on td click. Text large Text large Text Text4 large Text large Text
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42931043
downvote count: 1
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/27226354
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42930097
has comment: http://stackoverflow.com/comment/42930192
has comment: http://stackoverflow.com/comment/42930752
has title: Show and hide a td in jquery

http://stackoverflow.com/comment/42853887
type: Comment
has text: Doesn't matter, it's a string, as is
score: 1
comment on: http://stackoverflow.com/q/27183078
type: QuestionComment

http://stackoverflow.com/a/27171811
has comment: http://stackoverflow.com/comment/42835963
answers question: http://stackoverflow.com/q/27171102
type: Answer
score: 14
has comment: http://stackoverflow.com/comment/42837054
upvote count: 14
has comment: http://stackoverflow.com/comment/42835790
has comment: http://stackoverflow.com/comment/42835815
has body: You can actually do this with a pseudo element. It's not clear whether the 'click' is intended to mean mouse hold down (:active) or a formal 'click' process. For the former, you can do this. span { position: relative; } span:active:after { content:attr(title); padding:5px; border:1px solid #ccc; top:5px; right:10%; background: #bada55; } def For the latter then adding a class that displays the pseudo element would be the obvious solution. See this JSfiddle
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27171102

http://stackoverflow.com/q/27307493
tagged with: highcharts
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27311069
has answer: http://stackoverflow.com/a/27314833
has comment: http://stackoverflow.com/comment/43082997
has title: Name bars in highcharts bar chart by data
possible better answer: http://stackoverflow.com/a/27314833
upvote count: 1
has body: I am using the highcharts library, and I am attempting to create a bar chart however I am having problems in regards to naming the 'bars' in the chart. By default, they shows their numerical value (0, 1, 2 and so on), however I would like to name them by the data passed to the series. The data is passed in an array such as: ['yahoo.com', 1700],, and the name displays correctly on hover, how can I also display it where the numerical index currently is? Jsfiddle: http://jsfiddle.net/3bpwsadu/1/ Thanks
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27311069
score: 1
type: Question
answer count: 2

http://stackoverflow.com/q/27283610
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27284093
score: 0
linked to: http://stackoverflow.com/q/27263831
has title: d3 Workaround for svg transform in chrome
type: Question
has body: I've created an inner dimension to cut off plotting in d3. Here is the code: var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var nestedSVG = svg.append('svg') .attr("width", innerWidth) .attr("height", innerHeight) .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); This works fine in firefox. But I've learned that chrome does not support svg transforms like this (and it isn't working in chrome). Is there a workaround so that I can transform nestedSVG?
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43035617
has comment: http://stackoverflow.com/comment/43068610
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion

http://stackoverflow.com/q/27195127
tagged with: javascript
has body: I'm looking for the simplest way to stub in a custom event emitter when a socket connection is made. I realize this can be done w/ sinon (as shown below) var socket = new io.EventEmitter(); sinon.stub(io, 'connect').returns(socket); // initialization that causes io.connect to be invoked socket.emit('connect'); Ideally I'm looking for what I see as a true "black box" stub that knows nothing of the underlying technology. I do this w/ ajax with a simple library called fauxjax today for xhrs and this allows me to stub in "return this json when this url is request via http GET". If I decide to switch from jQuery $.ajax to some other xhr library - no test rework is required because I wrote them agnostic of the tech. I'm looking for this same "agnostic connection stub" for Websockets - does anything like this exist? Or is a full stub/spy/mock library like sinon the only approach worth looking at today? I'm headed down the path of a simple monkey patch of window.WebSocket - just wanted to see if others have had such luck.
favorite count: 0
has comment: http://stackoverflow.com/comment/62058787
answer count: 0
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/62012316
score: 3
tagged with: stub
has title: How to stub a web socket (supplying only an event emitter like object) in javascript
type: Question
tagged with: testing
tagged with: mocking
tagged with: websocket
downvote count: 0

http://stackoverflow.com/a/27234711
type: Answer
answers question: http://stackoverflow.com/q/27191323
score: 0
has body: I've investigated the solution with the publish-counts package. In my case it is the very heavy package. It was loading CPU all the time. I've replace my server side code to use a collection with count field. Common: Counter = new Mongo.Collection('count') Server: Meteor.Publish('count', function() { return Counter.find() }) if(Counter.find().count() === 0) Counter.insert({count: Tracks.find().count()}) var CronManager = new Cron(10000) CronManager.addJob(1, function() { Counter.update({}, {$inc: {count: 1}}) Tracks.insert({filed1: 'test'}) })

http://stackoverflow.com/comment/43013527
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27270089
has text: I haven't downvoted it. However, next time you should decide if it is a Java or a JavaScript question.

http://stackoverflow.com/a/27297724
type: Answer
has comment: http://stackoverflow.com/comment/43060584
score: 1
has body: You have to make it into milliseconds and then compare it. It will then work correctly. As of now you're comparing strings which I suppose follows lexical pattern. var startdatearr = [+new Date("04 Dec 2014 14:30:00"), +new Date("07 Dec 2014 14:30:00")]; var enddatearr = [+new Date("05 Dec 2014 14:30:00"), +new Date("08 Dec 2014 14:30:00")]; var d = +new Date(); for (i = 0; i &lt; startdatearr.length; i++) { if (startdatearr[i] &lt;= d &amp;&amp; d &lt;= enddatearr[i]) { alert("true"); } else { alert("false"); } } To again convert the milliseconds to date and then showing UTC string, you could do alert(new Date(d).toUTCString()); alert(new Date(startdatearr[0]).toUTCString()); alert(new Date(enddatearr[0]).toUTCString()); DEMO
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27297589
has comment: http://stackoverflow.com/comment/43059948
answers question: http://stackoverflow.com/q/27297589
upvote count: 1

http://stackoverflow.com/comment/42882560
type: Comment
has text: Sorry and Thank you, I'm also new to javascript. What does mw mean?
comment on: http://stackoverflow.com/a/27185596
type: AnswerComment
score: 0

http://stackoverflow.com/a/27168838
answers question: http://stackoverflow.com/q/27162564
score: 1
upvote count: 1
has body: Make sure you have in your index.js file: var busboy = require('connect-busboy'); // ... var app = express(); // ... // and app.use(busboy()); // I had exact the same error when this line was missing in index.js
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42891313
type: AnswerComment
score: 0
has text: Thank you for explanation of this process.
type: Comment
comment on: http://stackoverflow.com/a/27204052

http://stackoverflow.com/a/27194482
answers question: http://stackoverflow.com/q/27193195
has comment: http://stackoverflow.com/comment/42883087
has comment: http://stackoverflow.com/comment/42883875
has body: When you specify width: 100% or height: 100% on an element you are telling that element to look to its parent for sizing. CSS .full-size { height: 100%; width: 100% } HTML &lt;body&gt; &lt;div class="fill-size"&gt;&lt;/div&gt; &lt;/body&gt; The above &lt;div&gt; will fill the parent container, in this case &lt;body&gt;. If you want the &lt;body&gt; to have a height and width of 100%, you need to tell its parent, &lt;html&gt; what its size is as well. So in your CSS try: body, html { width: 100%; height: 100%; } This will give your &lt;body&gt; the height and width of the screen so that any children of &lt;body&gt; with percentages for heights and widths can draw off of the viewport. To help with constraining random children elements inside a full screen container div, set their position: absolute; so that you can randomize their location via JS and keep the div's position relative to the containing parent. Something like this fiddle. Keep reloading the page to get the circle to randomize it's location by setting the top and left properties to the constraints of the parent div. Hopefully that helps you out!
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42882684
has comment: http://stackoverflow.com/comment/42878576
score: 0
accepted answer of: http://stackoverflow.com/q/27193195
type: Answer

http://stackoverflow.com/comment/42999042
has text: The only difference between `nextTick`, `setImmediate`, and `setTimeout` is *when* the callback is scheduled to run. Respectively, at the beginning of the next tick, at the end of the current event queue, and at some wall-time in the future. If the *callback* blocks the event loop by taking a long time to do work, it is said to starve the event loop because it prevents other events in the queue from being dispatched. Also, it only blocks the JS thread. The other (native) threads are not blocked; they continue to add events to the queue.
type: Comment
comment on: http://stackoverflow.com/a/27263112
score: 1
type: AnswerComment

recreate
type: Tag
tag name: recreate
tags question: http://stackoverflow.com/q/27305965

http://stackoverflow.com/a/27313637
type: Answer
has comment: http://stackoverflow.com/comment/43319836
upvote count: 3
has comment: http://stackoverflow.com/comment/43088653
answers question: http://stackoverflow.com/q/27313533
has comment: http://stackoverflow.com/comment/43089570
has body: Assuming your paragraph only contains text, you can use a small script to prepare the paragraph by splitting it into words : var element = document.getElementById('demo'); element.innerHTML = element.innerHTML.split(' ').map(function(w){ return '&lt;span class=w&gt;'+w+'&lt;/span&gt;'; }).join(' '); [].forEach.call(document.querySelectorAll('.w'), function(w){ w.onclick = function(){ alert(w.innerHTML); return false; } }); Demonstration
accepted answer of: http://stackoverflow.com/q/27313533
score: 3
has comment: http://stackoverflow.com/comment/43088403
has comment: http://stackoverflow.com/comment/43088470
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27306336
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43093150
type: Question
has answer: http://stackoverflow.com/a/27317149
has comment: http://stackoverflow.com/comment/43075256
tagged with: javascript
has body: I am trying to learn my way around JavaScript better. To do that, I thought I would try my hand at writing a reusable component. I want to be able to test this component. Currently, I have the following file structure: /lib /services /my-service my-service.js my-service-tests.js my-service.js looks like the following: function MyService() { } MyService.prototype.serviceType = "Test"; MyService.prototype.execute = function(p1, p2) { console.log('executing with ' + p1 + ' and ' + p2); try { // do stuff } catch (ex) { console.log(ex); } }; my-service-tests.js uses Jasmine and looks like the following: describe("MyService", function() { it(" Can execute", function() { expect(true).toBe(true); }); }); I can successfully execute the test from the command-line via Gulp. However, my challenge is, I want to call the execute function on MyService. Ultimately, I want to write tests around MyService. I was hoping to do something like this in the test above: var service = new MyService(); service.execute(); Is there a way to do this? I feel like I'm very close. Unfortunately, there seems to be something that I'm not fully understanding. If I just add this code, I get a reference error. Its like it doesn't know where MyService is located. I'm not sure what to do. Thank you for your help.
has answer: http://stackoverflow.com/a/27306390
score: 0
answer count: 2
has title: Using module in JavaScript
tagged with: jasmine
has comment: http://stackoverflow.com/comment/43075238

http://stackoverflow.com/a/27282400
has comment: http://stackoverflow.com/comment/43065849
type: Answer
has body: STUBB1 is not printing to console so $.getJSON is ignored? Not ignored. It is likely making a bad request but you won't know until you add code to handle the error condition (or just look in the browsers' console). $.getJSON is asynchronous, after all. I'd suggest just site to read up onhttp://api.jquery.com/jquery.getjson/, they have some examples.
score: 0
answers question: http://stackoverflow.com/q/27281436

http://stackoverflow.com/a/27168819
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27168424
has body: The implementation from John Resig: // Get date difference. // @see http://ejohn.org/projects/javascript-pretty-date/ function prettyDate(date, now){ var diff = (((now || (new Date())).getTime() - date.getTime()) / 1000), day_diff = Math.floor(diff / 86400); if (isNaN(day_diff) || day_diff &lt; 0 || day_diff &gt;= 31) return this.format(date, 'yyyy-mm-dd'); return day_diff == 0 &amp;&amp; ( diff &lt; 60 &amp;&amp; "Just now" || diff &lt; 120 &amp;&amp; "1 minute ago" || diff &lt; 3600 &amp;&amp; Math.floor( diff / 60 ) + " minutes ago" || diff &lt; 7200 &amp;&amp; "1 hour ago" || diff &lt; 86400 &amp;&amp; Math.floor( diff / 3600 ) + " hours ago") || day_diff == 1 &amp;&amp; "yesterday" || day_diff &lt; 7 &amp;&amp; day_diff + " days ago" || day_diff &lt; 31 &amp;&amp; Math.ceil( day_diff / 7 ) + " weeks ago"; },
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27168424

http://stackoverflow.com/a/27243878
has body: var kickers = function(idx){ var xyz;//below function in return statement can access this and argument idx return function(...) {//this ensures that your kickers is infact a function }; }();//invoke this function instantly due to () and assign the output to kickers When Javascript interpreter read above assignment to Kickers it will execute the anonymous function Since that function itself returns a function, the kickers will now a function (with closure). Meaning the kickers function will have a reference to the environment variables (idx and notplayed ) Edit: 1) Where it is getting value of idx - Since nothing is passed while invoking the function(last line ();) the idx will be undefined and idx = idx || -15; will assign the value -15 to it. 2) Could this be re-written without an inner function? - Yes. But the current implementation has an advantage where the scope of idx and notplayed is limited to kicker function and will not be accessible globally. Here is how you can write it directly as a function /* now idx and notplayed is global- but its meant to be used only by kicker * we cant move it inside the function definition as it will behave as local variable to the function * and hence will be freed up once executed and you cannot maintain the state of idx and notplayed */ var idx = -15; var notplayed = Math.max(input.length - 1/*player input*/ - 5, 0); var kickers = function(all, cardinality, rank) { return(all || 0) + (((cardinality == 1) &amp;&amp; (notplayed-- &lt;= 0)) ? rank * Math.pow(10, ++idx) : 0); }
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42990976
has comment: http://stackoverflow.com/comment/43031749
accepted answer of: http://stackoverflow.com/q/27243673
answers question: http://stackoverflow.com/q/27243673

http://stackoverflow.com/comment/42972414
type: AnswerComment
type: Comment
score: 1
has text: Now read what callback means and try to understand: alert is shown **after** DB operation.
comment on: http://stackoverflow.com/a/27248787

http://stackoverflow.com/comment/57260976
has text: This solution limits the depth to at most three levels. For example, `[[[[4]]]]` will return `[[4]]` rather than `[4]`.
type: Comment
comment on: http://stackoverflow.com/a/27266878
score: 0
type: AnswerComment

http://stackoverflow.com/q/27284319
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43036817
type: Question
has body: So I have a 3D game with a three.js perspective camera moving through a 3D space. Now when you have an item "selected" in this 3D space, I want a button to appear in the top left of the screen to unselect that item. Is there a way to do this using html? Because right now I have a button but it is pushing the game down below it instead of as a part of it which is expected from html. I think I need to make the background of the button transparent AND manually push the game up to the top of the screen. &lt;body style="background-color: #222222;"&gt; //Here is the button that I need to be transparent //because I have no way to test it, I have no idea if that style code I have makes it transparent or not &lt;input type="image" id="myimage" style="height:200px;width:200px;border:0 none;background-color: transparent;" src="media/undo.png"/&gt; &lt;script src="src/game.js"&gt;&lt;/script&gt; &lt;script src="src/main.js"&gt;&lt;/script&gt; //Here is where I load in the game &lt;script&gt; $(document).ready(function(){ //All loading stuff THREE.ImageUtils.crossOrigin = ''; var game = new Main($(document).width() - 10, $(document).height() - 20, "res/games.json"); game.init(); function gameUpdate(){ game.update(); window.requestAnimationFrame(gameUpdate, game.renderer.domElement); } gameUpdate(); }); &lt;/script&gt; //Done with game loading script &lt;/body&gt; Here is a picture of the problem: http://puu.sh/dg4rJ/5a25c817b7.jpg I need the game and button to be together. Is there anyway to do this or should I work on doing it in the game in JS?
tagged with: javascript
has answer: http://stackoverflow.com/a/27284728
tagged with: image
accepted answer: http://stackoverflow.com/a/27284728
answer count: 1
downvote count: 0
tagged with: button
favorite count: 0
has title: Make html button overlap into my game?
has comment: http://stackoverflow.com/comment/43037020

http://stackoverflow.com/comment/42865784
type: Comment
comment on: http://stackoverflow.com/q/27180892
has text: @imslavko: right, but how can an HTML file be retrieved from the repo, instead of via HTTP.get? The goal is to not have large chunks of HTML in the `test.js` file.
score: 0
type: QuestionComment

http://stackoverflow.com/q/27197059
duplicate of: http://stackoverflow.com/q/750486
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27197079
type: AnsweredQuestion
has title: Modified closure and setTimeout
linked to: http://stackoverflow.com/q/750486
type: Question
has answer: http://stackoverflow.com/a/27197079
has body: I have this little snippet (this is inside of an object): var tout = 0; self.initialize = function() { for (var key in periods) { setTimeout(function() { self.server.sendData('customData', periods[key], 0); }, tout); tout = tout + 7000; } } As you can see, I'm iterating through periods object fields, and I need each key to be visible inside my setTimeout() separately. Currently, that is not possible. I was trying something like this, hoping for a miracle: self.initialize = function() { for (var key in periods) { var localkey = key; //here is the change setTimeout(function() { self.server.sendData('customData', periods[localkey], 0); }, tout); tout = tout + 7000; } } But obviously, a miracle did not happen. Does anyone have any idea on how to approach this issue?

http://stackoverflow.com/a/27313654
upvote count: 1
has body: try this, $(function() { $('.rock-send').on('click', function() { var name = $("input[name='name']").val(); var band = $("input[name='band']").val(); var indx = $("input[name='indx']").val(); $.post('remote.php', { // dont forget to change the remote url there name: name, band: band, indx: indx, }, function( data ) { $("#rock-modal").html(data); // data is response from your remote php srcipt // so set this data to div with id "rock-modal" $("#rock-modal").modal('show'); // and show the div with id rock-modal }); }); });
score: 1
answers question: http://stackoverflow.com/q/27313460
downvote count: 0
has comment: http://stackoverflow.com/comment/43090507
type: Answer
has comment: http://stackoverflow.com/comment/43088999
has comment: http://stackoverflow.com/comment/43088257
has comment: http://stackoverflow.com/comment/43088516

http://stackoverflow.com/comment/42927112
type: AnswerComment
score: 0
type: Comment
has text: @CraftdMC - Remove the text `Content` from the `div`s. [Updated Fiddle](http://jsfiddle.net/chipChocolate/eLnz2va2/5/)
comment on: http://stackoverflow.com/a/27223263

http://stackoverflow.com/a/27374337
answers question: http://stackoverflow.com/q/27277419
has body: Why do you want to change state, when you $state.go($state.current)? Maybe use anchorScroll instead, not sure about html5. https://docs.angularjs.org/api/ng/service/$anchorScroll EDIT: Sorry, I missed about mouse scroll. Check this answer https://stackoverflow.com/a/14717011/1603188 and usage of $location.hash(id);
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43200425
upvote count: 2
has comment: http://stackoverflow.com/comment/43318630
accepted answer of: http://stackoverflow.com/q/27277419

http://stackoverflow.com/comment/43004603
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27266579
has text: You're all correct but I can only choose 1 answer, I chose this one because it's the one that I worked from. Thanks to everyone.

http://stackoverflow.com/comment/43257032
type: AnswerComment
comment on: http://stackoverflow.com/a/27337560
has text: I've figured it out now. The GET parameters were being appended over again after the redirect to the `og:url` parameter, causing the URL to be different each time, which in turn caused a redirect loop.
type: Comment
score: 0

http://stackoverflow.com/q/27176849
has comment: http://stackoverflow.com/comment/42842830
has answer: http://stackoverflow.com/a/27176963
has comment: http://stackoverflow.com/comment/42843774
has answer: http://stackoverflow.com/a/27176935
possible better answer: http://stackoverflow.com/a/38721074
has answer: http://stackoverflow.com/a/38721074
has title: What does `mailto:` do when there is no email client?
has body: I am developing a website. What does mailto: open in if there is no email client (like Outlook, Thunderbird, etc.)? It works on my computer, which has Outlook, but what if one wants mailto: to open in, say, gmail.com? What do I need to put in the mailto: statement for that to happen?
answer count: 5
tagged with: javascript
score: 16
has answer: http://stackoverflow.com/a/27176968
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: email
tagged with: mailto
downvote count: 0
has answer: http://stackoverflow.com/a/27177038
accepted answer: http://stackoverflow.com/a/27176968
favorite count: 0
type: Question
upvote count: 16

http://stackoverflow.com/q/27255427
type: Question
score: 3
has body: What I am trying to do is to add a button for uploding a file, which i can style and which shows me the name of the chosen file. I have searched a lot, and the more I search the more different sollutions I find. I found out, that you can't style the input directly, because you just cant... :(. Finally I picked a little from every solution and came to the following: I set up a span in a lable for the input[type file] and hid the input by display:none;. Now I can style the span to my needs, and on click it calls the input. With the little JS at the end, take the value of the input (what is the name of the picked file) and show it insted of the span-text on the styled button. but see yourself: #input-file { display: none; } .upload-btn { display: block; text-align: center; margin: 20px auto 20px; width: 50%; height: 30px; background-color: #fcff7f; line-height: 30px; } .upload-btn:hover { background-color: #c39d5a; color: white; cursor: pointer; } Browse What I would like to know is, what is wrong with this? For my understanding it is very simple, so simple that i dont understand "yet" why all the solutions I found on the internet, are way more difficult. They allways try to use fake inputs, with opacity and so on. So please can someone very experienced, tell me if I can use it like this, or do I have to change it? To what? Thanks ;) and a lot of excuses for the bad english.
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/27255556
accepted answer: http://stackoverflow.com/a/27255556
tagged with: javascript
linked to: http://stackoverflow.com/q/15201071
favorite count: 0
has title: Styling the input type file with CSS and a little JS, is this ok?
upvote count: 5
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6348494
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/43063024
type: AnswerComment
type: Comment
has text: Why prevent the event from propagating? The question was how to attach event handlers, which you did, but you also unnecessarily added functionality the OP didn't specify.
comment on: http://stackoverflow.com/a/27298749
score: 0

http://stackoverflow.com/comment/43008656
type: QuestionComment
comment on: http://stackoverflow.com/q/27268855
has text: http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport/7557433#7557433: check this answer which is really helpful.
score: 0
type: Comment

http://stackoverflow.com/a/27251014
answers question: http://stackoverflow.com/q/27250646
score: 6
accepted answer of: http://stackoverflow.com/q/27250646
has comment: http://stackoverflow.com/comment/42976488
type: AcceptedAnswer
upvote count: 6
has body: You may to use shared service/factory for this. If you want to pass just loaded data from one controller to another, you can pass it through the "Shared Service" and broadcast event in it with $broadcast/$emit functions. Broadcasted event can be listened in any controller with $scope.$on. angular.module("appControllers", []).factory("sharedService", function($rootScope){ var mySharedService = {}; mySharedService.values = {}; mySharedService.passData = function(newData){ mySharedService.values = newData; $rootScope.$broadcast('dataPassed'); } return mySharedService; }); appControllers.controller('linksController', ['$scope', 'sharedService', function ($scope, sharedService) { $scope.update = function(newData){ sharedService.passData(newData); }; } appControllers.controller('anotherController', ['$scope', 'sharedService', function ($scope, sharedService) { $scope.$on('dataPassed', function () { $scope.newItems = sharedService.values; }); }
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43086856
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27312775
has text: On the server side it is a Microsoft-written application and I don't have access to the binaries, so changing the server side is not an option. I have to store the token on the client side.

http://stackoverflow.com/q/27197301
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27197323
has body: I am new to HTML and know absolutely nothing about JQuery, but I am working on a personal site to learn some HTML. I was trying to have a page where the majority of text would be hidden and the user could click Show / Hide to show what they wanted to see (multiple options). I found this JQuery code in another post: $(document).ready(function(){ $("#hide1").click(function(){ $("o1").hide(); }); $("#show1").click(function(){ $("o1").show(); }); }); With the buttons: Hide Show I understand how to use it, but I want the text it is supposed to show/hide to be hidden when the page loads. I have tried the CSS visibility:hidden option but that does not work. Would anyone be able to suggest something?
favorite count: 0
possible better answer: http://stackoverflow.com/a/27197351
has title: How to use a JQuery Show/Hide script, to show hidden text
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27197351
tagged with: css
type: AnsweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27197323
score: -1
answer count: 2
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42966841
has text: gyzerok: if you have a concrete example, maybe a jsFiddle, it would be easier to help. I'm having trouble finding a concrete use case for this stream.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27240981
type: Comment

http://stackoverflow.com/q/27244942
tagged with: javascript
has answer: http://stackoverflow.com/a/27244975
has comment: http://stackoverflow.com/comment/42965060
has comment: http://stackoverflow.com/comment/42965094
has comment: http://stackoverflow.com/comment/42965067
linked to: http://stackoverflow.com/q/16920365
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42965101
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42965104
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 2
has comment: http://stackoverflow.com/comment/42965081
has title: Why this function not work on IE 7 , 8?
has body: How to apply for work on IE7 , 8 for test, fill 1 into input and then press button , input will change border to red and return false. But ie7 8 not work all.
type: Question
has comment: http://stackoverflow.com/comment/42965033
tagged with: internet-explorer
score: -2
has comment: http://stackoverflow.com/comment/42965059

http://stackoverflow.com/a/27304679
accepted answer of: http://stackoverflow.com/q/27301702
answers question: http://stackoverflow.com/q/27301702
type: Answer
score: 7
upvote count: 7
has body: see http://jsfiddle.net/ktzk1bh3/2/ HTML: Click me Javascript: //Bind to 'body' but only respond to events from the binding above var source = Rx.Observable.create(function(o) { $('body').on('click', '.aClass div .something', function(ev) { o.onNext(ev); }) }); var sub = source.subscribe(function(ev) { console.log("click", ev) });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27288918
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has title: Using directives with ngSanitize in AngularJS
linked to: http://stackoverflow.com/q/17417607
tagged with: javascript
has answer: http://stackoverflow.com/a/27289302
answer count: 1
downvote count: 0
has body: In my app I have a really simple controller whose job is to display messages: angular.module("app.components.messages", ['ngSanitize']) .controller("MessageBoxController", ['$scope', function($scope) { $scope.messageType = 'info'; $scope.hidden = true; $scope.$on('message.error', function(event, message) { $scope.message = message; $scope.messageType = 'error'; $scope.hidden = false; }); $scope.$on('message.warning', function(event, message) { $scope.message = message; $scope.messageType = 'warning'; $scope.hidden = false; }); }]); Then the message box itself is pretty straight forward: I'm using ngSanitize because sometimes I want to put links in the messages. For example in another controller I may do: $rootScope.$broadcast('message.warning', 'You are about to download ' + file.name + ' which is ' + file.size + '. Your current quota is ' + user.quotaRemaining + ' click here to confirm.'); And this works, and displays the link and everything. However in this particular case, after the user has clicked the link, I would like it to then fire another function to update the user's quota information. I naively tried putting an ng-click on my tag, but it turns out that ngSanitize filters out certain attributes, so that didn't work. How can I get stuff to happen after the link in the message is clicked? I don't necessarily have to use ngSanitize, I just used it because it seemed convenient.
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/27295266
has body: I'm very new with jQuery/Javascript and I use this spinner. I don't want to use any plugin. But I want to ask how can I give a max. and min. value for Example min.value 0 and max.value 13. Input "number" doens't work in IE, because of i don't use it. here is demo http://jsfiddle.net/xg228/75/ #Up { font-size:7px; width:20px; height:12px; float:right; margin-right:52px; background-color:#dddddd; border:none; border-bottom: 1px solid #bababa;" } #Up:hover { background-color: #bababa; } #Up:active { outline: none; border: none; } #Up:focus {outline:0;} #Down { font-size:7px; width:20px; height:12px; float:right; margin-right:52px; background-color:#dddddd; border:none; border-bottom: 1px solid #bababa;" } #Down:hover { background-color: #bababa; } #Down:active { outline: none; border: none; } #Down:focus {outline:0;} #Up:hover { background-color: #bababa; }
has answer: http://stackoverflow.com/a/27295487
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43055159
has comment: http://stackoverflow.com/comment/43055228
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43055277
tagged with: css
type: AnsweredQuestion
has title: up/down button with min/max value
accepted answer: http://stackoverflow.com/a/27295487
type: Question

http://stackoverflow.com/comment/47554487
type: AnswerComment
has text: Good news! Tested the release version 41 and all is well, without the extension. Cheers!
type: Comment
comment on: http://stackoverflow.com/a/27164770
score: 0

http://stackoverflow.com/comment/43069437
comment on: http://stackoverflow.com/a/27294892
type: Comment
score: 0
has text: Whell you know, if you can't explain something to a beginner, that means that you also don't understand it:)
type: AnswerComment

http://stackoverflow.com/comment/43097109
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27304747
has text: I just tried everything: version number, trying all combination of database name, still the same error. Works perfectly fine with other devices, and browsers, but not iOS 8.1 with its Safari. It works with Safari on MacBook Pro, which is a bit weird though to me.

http://stackoverflow.com/comment/42855071
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27183712
has text: for some reason the get action returning string object insted of Object
score: 0

http://stackoverflow.com/comment/42843773
has text: `var total = letter1 + letter2 + numbers;` This is not going to add the numbers together, this is just going to perform string concatenation.
type: QuestionComment
comment on: http://stackoverflow.com/q/27177155
type: Comment
score: 1

http://stackoverflow.com/comment/43058114
type: QuestionComment
has text: What returns `$.toSring();` ?
type: Comment
comment on: http://stackoverflow.com/q/27296745
score: 0

http://stackoverflow.com/a/27187379
accepted answer of: http://stackoverflow.com/q/27186914
has comment: http://stackoverflow.com/comment/42861532
has comment: http://stackoverflow.com/comment/42862346
has comment: http://stackoverflow.com/comment/42861957
answers question: http://stackoverflow.com/q/27186914
has comment: http://stackoverflow.com/comment/42862176
has comment: http://stackoverflow.com/comment/42861764
has comment: http://stackoverflow.com/comment/42861450
has comment: http://stackoverflow.com/comment/42861435
type: AcceptedAnswer
downvote count: 0
has body: Just trying to help! Here's a solution (working example you can play with the code http://jsbin.com/cakuh/1/), it's just a sketch but you should understand what to do: Games BBC Load Site $(function(){ $('button').on('click', function(){ var src = $("#MySelectMenu option:selected").attr('value'), myTimeout = null; // first we de-attach and re-attach an event load $('iframe[name="content"]').off('load').on('load', function(){ myTimeout = setTimeout(function(){ clearTimeout(myTimeout); $('iframe[name="content"]').off('load'); // you see, we concat '/admin' to the src $('iframe[name="content"]').attr('src', src + '/admin'); }, 1000); }); // this will change the iframe src and load the page, triggering the iframe load event $('iframe[name="content"]').attr('src', src); }); });
has comment: http://stackoverflow.com/comment/42861386
type: Answer
has comment: http://stackoverflow.com/comment/42861918
score: 1
has comment: http://stackoverflow.com/comment/42861291
has comment: http://stackoverflow.com/comment/42861577
has comment: http://stackoverflow.com/comment/42861410
has comment: http://stackoverflow.com/comment/42861853
upvote count: 1

http://stackoverflow.com/q/27188310
has body: I have a form on page. I want to submit a form when user click on submit button which is outside of form tag. When I am using $('#theform').submit() then submit method work perfectly but when I am doing this document.getElementById('theform').submit() then it is only refreshing my page. Fiddle JavaScript $(function() { $('input[type="submit"]').click(function() { //$('#theform').submit() document.getElementById('theform').submit() }) $('#theform').submit(function(e) { alert(0) e.preventDefault() }) }) html &lt;form id="theform"&gt; &lt;input type="text" id="fname" /&gt; &lt;input type="text" id="lname" /&gt; &lt;input type="text" id="country" /&gt; &lt;/form&gt; &lt;input type="submit" /&gt;
has answer: http://stackoverflow.com/a/27188653
possible better answer: http://stackoverflow.com/a/27188529
upvote count: 3
has comment: http://stackoverflow.com/comment/42863308
has title: .submit in javascript vs .submit in jquery
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/11557994
tagged with: forms
has comment: http://stackoverflow.com/comment/42863281
accepted answer: http://stackoverflow.com/a/27188653
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27188529
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43059602
has text: You're not removing `keyPress` handler from `document`. `keyPress` is a local variable in `ready()`, `LoseGame` can't refer it. `removeEventListener` just fails, you should see an error in the console: "ReferenceError: keyPress is not defined".
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27297349
score: 0

http://stackoverflow.com/comment/42837240
has text: Have you tried adding _Access-Control-Allow-Methods_ with it set to the methods you are allowing? i.e. `Access-Control-Allow-Methods: POST, GET, OPTIONS`
score: 0
comment on: http://stackoverflow.com/q/27173445
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43079540
has text: The class "my-results" is not already defined anywhere in HTML. The HTML returned by this function is the only HTML that will have this class designation.
type: Comment
comment on: http://stackoverflow.com/a/27308838
type: AnswerComment
score: 0

http://stackoverflow.com/a/27202956
has body: You could put the files name into an array: $pages= Array( 'aeyrt.php','nviorf.php','vyutkd.php','oiuybd.php','poiuuy.php'); And create a function that check the current file name position and return a link to the previous or next page. function getLink($pages,$previous = true){ $position = array_search(basename(__FILE__),$pages); if($position==0 && $previous){ return "Previous"; } if($position==count($pages)-1 && !$previous){ return "Next"; } if($previous && $position!==null && $position>0){ return "Previous"; } if($position!==null && $position<count($pages)-1){ return "Next"; } } I did not check if it work, but I think so ;) I modified the funtion to be circular
has comment: http://stackoverflow.com/comment/42888826
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27202823
has comment: http://stackoverflow.com/comment/42889585
has comment: http://stackoverflow.com/comment/42888687
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42888689
has comment: http://stackoverflow.com/comment/42889355
has comment: http://stackoverflow.com/comment/42888668

http://stackoverflow.com/a/36651602
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27312682
has body: Try taking a look at Continuation-Local Storage: https://github.com/othiym23/node-continuation-local-storage Heres a good article on implementing it within express: https://datahero.com/blog/2014/05/22/node-js-preserving-data-across-async-callbacks/
score: 0
accepted answer of: http://stackoverflow.com/q/27312682
type: Answer

http://stackoverflow.com/q/27155070
tagged with: unit-testing
has title: Angular/Karma - "Unexpected Request" error when expected and observed request are the same
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27322129
type: Question
possible better answer: http://stackoverflow.com/a/27156697
answer count: 2
has answer: http://stackoverflow.com/a/27156697
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27322129
has body: I'm unit testing a controller's method. My app fires off a few GET requests on app start, and I'm getting unexpected request errors when I run my tests. Here is the login method of my controller. Note: I'm using angular classy (thus the nonstandard syntax): login: function() { var self = this, params, loginSuccess, user; if (self.$.user.email === '' || self.$.user.password === '') { self.$notification.alert({ title: "Error", message: "Email and password can't be blank!" }); } else { params = { user: self.$.user, position: self.Geolocation.currentPosition }; self.$session.login(params).then(loginSuccess); } }; Here is the test: describe("LoginController", function() { var scope, $rootScope, createController, $controller, $httpBackend, $session, session, $notification; var emptyCredentials = { email: "bleh", password: "" }; beforeEach(angular.mock.module('myapp')); beforeEach(inject(function($injector){ jasmine.getJSONFixtures().fixturesPath='base/unit/fixtures'; $httpBackend = $injector.get("$httpBackend"); $httpBackend .when('GET', 'http://myapp.com:3000/api/v2/apps/3?app_id=3') .respond(200, getJSONFixture('apps.json')); $httpBackend .when('GET', 'http://myapp.com:3000/api/v2.2/locations?app_id=3') .respond(200, getJSONFixture('locations.json')); $httpBackend .when('GET', 'http://myapp.com:3000/api/v2/users/me?app_id=3') .respond(200, getJSONFixture('me.json')); $session = $injector.get("$session"); // mock session so that session.loggedIn doesn't return true // on subsequent tests session = { setUser: function() { }, loggedIn: function() { return false; }, authPath: function() { return false; }, login: $session.login }; $rootScope = $injector.get("$rootScope"); $controller = $injector.get("$controller"); $notification = $injector.get("$notification"); scope = $rootScope.$new(); createController = function () { return $controller('LoginController', { $scope: scope, $session: session, $notification: $notification }); }; // spies on $notification.alerts spyOn($notifi…
tagged with: karma-runner
tagged with: angularjs

http://stackoverflow.com/comment/43029665
type: AnswerComment
score: 0
type: Comment
has text: Well, I tried your source code but it fails when I upload two different images but with same filename & filesize.
comment on: http://stackoverflow.com/a/27280285

http://stackoverflow.com/a/27278035
has comment: http://stackoverflow.com/comment/43031803
score: 30
answers question: http://stackoverflow.com/q/27270880
has comment: http://stackoverflow.com/comment/43029634
has comment: http://stackoverflow.com/comment/43031528
has comment: http://stackoverflow.com/comment/61410458
has comment: http://stackoverflow.com/comment/119689503
has comment: http://stackoverflow.com/comment/43030916
accepted answer of: http://stackoverflow.com/q/27270880
has comment: http://stackoverflow.com/comment/51291048
has body: You can investigate how WooCommerce is adding items to the cart via ajax directly in the code.... the callback is located in includes/class-wc-ajax.php. WooCommerce already does this on product "loops" (product archives), so I don't think you need to reinvent the wheel and if their existing code doesn't work for what you are trying to do, then you should be able to borrow heavily from it. The beginning of that file has a loop with all the WooCommerce Ajax actions, but we can track down that the add to cart is basically this: add_action( 'wp_ajax_nopriv_woocommerce_add_to_cart', array( 'WC_AJAX', 'add_to_cart' ) ); And it's callback is a little further down the file: /** * AJAX add to cart */ public static function add_to_cart() { ob_start(); $product_id = apply_filters( 'woocommerce_add_to_cart_product_id', absint( $_POST['product_id'] ) ); $quantity = empty( $_POST['quantity'] ) ? 1 : wc_stock_amount( $_POST['quantity'] ); $passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity, $variation_id, $variations, $cart_item_data ); if ( $passed_validation &amp;&amp; WC()-&gt;cart-&gt;add_to_cart( $product_id, $quantity ) ) { do_action( 'woocommerce_ajax_added_to_cart', $product_id ); if ( get_option( 'woocommerce_cart_redirect_after_add' ) == 'yes' ) { wc_add_to_cart_message( $product_id ); } // Return fragments self::get_refreshed_fragments(); } else { // If there was an error adding to the cart, redirect to the product page to show any errors $data = array( 'error' =&gt; true, 'product_url' =&gt; apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ) ); wp_send_json( $data ); } die(); } If you want to view their add to cart ajax call, the JS for that is located in assest/js/frontend/add-to-cart.js. EDIT Now that I know you are looking to add a variation, maybe we can tweak the above. First, I think you'll need to pass the AJAX url to your script: wp_enqueue_script( 'wc-variation-…
has comment: http://stackoverflow.com/comment/43031672
has comment: http://stackoverflow.com/comment/43031728
downvote count: 0
has comment: http://stackoverflow.com/comment/43031997
has comment: http://stackoverflow.com/comment/43032038
has comment: http://stackoverflow.com/comment/53927799
upvote count: 30
has comment: http://stackoverflow.com/comment/72068626
has comment: http://stackoverflow.com/comment/43029692
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/72092843
has comment: http://stackoverflow.com/comment/43029653
has comment: http://stackoverflow.com/comment/43860607
has comment: http://stackoverflow.com/comment/43032318
has comment: http://stackoverflow.com/comment/50664348
has comment: http://stackoverflow.com/comment/72091319
type: Answer
has comment: http://stackoverflow.com/comment/51282649

http://stackoverflow.com/comment/42843137
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27177064
score: 1
has text: If you're worried about an attacker intercepting the cookie, it shouldn't be an issue over HTTPS provided the `secure` flag is set: http://security.stackexchange.com/questions/100/how-can-i-check-that-my-cookies-are-only-sent-over-encrypted-https-and-not-http

list
type: Tag
tags question: http://stackoverflow.com/q/27312202
tags question: http://stackoverflow.com/q/27248912
tag name: list
tags question: http://stackoverflow.com/q/27250414
tags question: http://stackoverflow.com/q/27233132
tags question: http://stackoverflow.com/q/27266782

http://stackoverflow.com/q/27246574
type: Question
tagged with: javascript
has body: My question is related to this problem, because I have the same issues. If I have a route like this: this.route('userPage', { path: '/user/:username', waitOn: function() { return [Meteor.subscribe('userPage', this.params.username)]; }, data: function() { return Users.findOne({username: this.params.username}); } }); and my subscription looks like this: Meteor.publish('userPage', function(username) { return Users.find({username: username}, {fields: {'profile': 1, 'username': 1}}); }); The 404 page will be rendered (this is fine), but the progress-bar hangs at 98% or so (why?). If I have a route like this: this.route('chat', { path: '/chat/:slug', waitOn: function() { return [ Meteor.subscribe('chat', this.params.slug), Meteor.subscribe('chatAvatars', this.params.slug) ]; }, data: function() { return Chat.findOne({slug: this.params.slug}); } }); and my subscriptions like this: Meteor.publish('chat', function(slug) { return Chat.find({slug: slug}); }); Meteor.publish('chatAvatars', function(slug) { var chat = Chat.findOne({slug: slug}); if (chat) { return Users.find({_id: {$in: chat.participants}}, {fields: {'profile.image': 1, 'username': 1}}); } else { return null; } }); No 404 not found template will be rendered. Why? Do I have to check in my onBeforeAction if the chat exists?
score: 0
has title: Display 404 not found template for 'slugs' when publication returns empty cursor - Meteor - iron-router
answer count: 1
linked to: http://stackoverflow.com/q/25794382
tagged with: meteor
tagged with: iron-router
has answer: http://stackoverflow.com/a/27311623
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27311623

http://stackoverflow.com/q/27156427
has comment: http://stackoverflow.com/comment/42807071
has comment: http://stackoverflow.com/comment/42807190
has comment: http://stackoverflow.com/comment/42807078
has answer: http://stackoverflow.com/a/27156596
has body: This is the question, I have a form that contains a number (not always the same amount) of inputs. All that inputs are tagged by the name ("qtyv[]") and all have the same id ("qtyv"). I want to sum all the values of that inputs, but I dont know how to get that data with javascript. Any ideas? Qty 1= &lt;input type="text" id="qtyv" name="qtyv[]" /&gt; Qty 2= &lt;input type="text" id="qtyv" name="qtyv[]" /&gt; ... I want to sum the values of all that inputs...
has comment: http://stackoverflow.com/comment/42807275
type: AnsweredQuestion
tagged with: forms
linked to: http://stackoverflow.com/q/9329446
type: Question
accepted answer: http://stackoverflow.com/a/27156596
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42807101
score: 0
has title: How to read an array with javascript from a form
answer count: 1

http://stackoverflow.com/q/27221894
has comment: http://stackoverflow.com/comment/42923667
score: 1
has comment: http://stackoverflow.com/comment/42922580
has answer: http://stackoverflow.com/a/27223151
possible better answer: http://stackoverflow.com/a/27222892
answer count: 2
has comment: http://stackoverflow.com/comment/42922629
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I am trying to implement a cinema webpage that will include the seat reservation system. I take some help from this page http://dayg.wordpress.com/2008/04/17/php-101-a-simple-seat-reservation-system/ and it works very fine when i test it alone. But when i try to implement it into my website, the seat checkbox seems not to work, it always alert "Please select a seat before clicking" when i press Reserve seat button (i have checked in some boxes). I use index.php and include every page on my website to load in when called. Here is my index.php code: &lt;?php ob_start(); include ('pages/top.php'); $ui1 = $_GET['ui1']; if (!$ui1) { $ui1 = 'movie';} $ui2 = $_GET['ui2']; if (!$ui2) { $ui2 = 'homepage';} ?&gt; &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;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt; &lt;/script&gt; &lt;title&gt;4starCine&lt;/title&gt; &lt;meta name="description" content="4starcinema website" /&gt; &lt;meta name="keywords" content="4starcinema,4starcine,4star,cine" /&gt; &lt;meta name="author" content="HTTA group 4" /&gt; &lt;link rel="stylesheet" href="css/style.css" type="text/css" /&gt; &lt;link rel="stylesheet" href="css/style2.css" type="text/css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="backdrop"&gt; &lt;div class="wrapper"&gt; &lt;div class="header"&gt; &lt;?php include ('pages/head.php')?&gt; &lt;/div&gt; &lt;div class="content"&gt; &lt;?php if (file_exists('pages/'.$ui1.'/'.$ui2.'.php')) { include ('pages/'.$ui1.'/'.$ui2.'.php'); } else { include ('pages/notfound.php'); } ?&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;div class="footer"&gt; &lt;div class="footer_mini"&gt; &lt;/div&gt; &lt;div class="footer_mini"&gt; &lt;/div&gt; &lt;div class="footer_mini"&gt; &lt;/div&gt; &lt;div class="footer_mini"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt…
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27222892
has title: javascript cant get variable in checkbox
upvote count: 1
accepted answer: http://stackoverflow.com/a/27223151
type: Question

http://stackoverflow.com/comment/43159293
comment on: http://stackoverflow.com/q/27294429
has text: Thanks i have updated all my Jquery to latest and now it is working fine .
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27309212
has title: How to find ids which are on screen
has answer: http://stackoverflow.com/a/27309431
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27309528
has answer: http://stackoverflow.com/a/27309285
type: Question
has comment: http://stackoverflow.com/comment/43080341
has body: I have a content like Initial Content 111 Initial Content 222 Initial Content 333 Initial Content 444 Initial Content 555 Initial Content 666 Initial Content 777 http://jsfiddle.net/LRLR/0sbdttds/ Even inside div, i have some more divs (not shown) Is there any which to find which all divs are visible on screen ? Requirement: 1. everytime div is focussed, i want to add css property 2. i need to store a variable
tagged with: javascript
answer count: 6
linked to: http://stackoverflow.com/q/17042431
has answer: http://stackoverflow.com/a/27309540
has answer: http://stackoverflow.com/a/27310039
upvote count: 1
has comment: http://stackoverflow.com/comment/43080735
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43080314
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27309274

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/27166623
tags question: http://stackoverflow.com/q/27291724

http://stackoverflow.com/comment/43113087
comment on: http://stackoverflow.com/a/27265756
type: AnswerComment
score: 0
type: Comment
has text: Thanks but SPEAK v1.2 is so different I can't even get to Sitecore.app. Now it is seems I have to do Sitecore.Speak.Components, but then what? The components have a model and view but are functions?

http://stackoverflow.com/q/27232381
score: -2
tagged with: javascript
answer count: 3
favorite count: 0
has title: javascript: can't iterate over an array: getting : TypeError: object is not a function
accepted answer: http://stackoverflow.com/a/27232428
possible better answer: http://stackoverflow.com/a/27232442
downvote count: 2
has answer: http://stackoverflow.com/a/27232442
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27232462
has comment: http://stackoverflow.com/comment/42941769
type: Question
has body: I am trying to iterate over roles for a business rule. But when i reach there, I get following error: TypeError: object is not a function Printing roles array on console: console.log('role:' + role); My array console result is as following: role:ROLE_TEAM_MANAGER,ROLE_SCORER,ROLE_LEAGUE_MANAGER my loop: for(var j=0;j&lt;role.length;j++){ var ccRole = role(0); // generates error or var ccRole = role(j); // generates error } I have spent sometime on it, but don't know what's wrong here.
has answer: http://stackoverflow.com/a/27232428
upvote count: 0

http://stackoverflow.com/comment/42888850
type: AnswerComment
has text: @D.M. Vamsi change your slideit() method with this and try.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27202862

http://stackoverflow.com/comment/42846233
type: Comment
has text: @Fagner Brack: Granted their var delay was obsolete (now removed).
score: 0
comment on: http://stackoverflow.com/a/27175620
type: AnswerComment

http://stackoverflow.com/q/27177303
has title: select sibling and parent divs for javascript/jquery
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27177375
tagged with: parents
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27177365
has answer: http://stackoverflow.com/a/27177365
accepted answer: http://stackoverflow.com/a/27177375
has body: hi just a general question. When making a javascript/jquery what would be the easiest way to indivate a particualr sibling div, or parent div, with a particular class. The scenario is sometihng like this &lt;div class="a"&gt; &lt;div class="b"&gt; &lt;/div&gt; &lt;div class="c"&gt; &lt;div class="d"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; i would like to make clicking on div class b open div class c. I would also like to make clicking on div class d close div class c. div class b is a sibling div to div class c and div class c and div class c is a parent of div class d. it is important that the javascript reffers to their parents or siblings because div class a (the container) will be repeated many times and each different instance of div class b and d should open different divs onclick, instead of all opening all instances with div class c. so far i have thought of using something like an event.target.getElementsByTagName("div")[] - but actually i think this only looks for children of a particular div which really isnt what i want because im looking for indicating a sibling and a parent. anyone who knows how to do this who could point me in the right direction?
downvote count: 1
type: Question
tagged with: children
score: -1

http://stackoverflow.com/comment/43073669
type: QuestionComment
comment on: http://stackoverflow.com/q/27305191
has text: I haven't done it, so I don't know if it would work, but maybe try an iframe instead of a popup.
score: 0
type: Comment

http://stackoverflow.com/comment/42900328
type: QuestionComment
has text: Which route is failing when changing books? `App.PagesGetRoute`?
comment on: http://stackoverflow.com/q/27209201
score: 0
type: Comment

http://stackoverflow.com/q/27201874
tagged with: node.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27202153
type: Question
has title: TypeError: Object #<Receiver> has no method 'on'
tagged with: javascript
score: 0
answer count: 1
has body: Im trying to execute script on node, and get this error: Maybe problem with socket.io version? The code send the mouse coords to server and the server sends it to clients. All help would be apreciated, thanks. pi@webserver ~/cursores $ sudo node server.js /home/pi/cursores/node_modules/websocket.io/lib/protocols/hybi-16.js:39 .on('text', function (packet) { ^ TypeError: Object #&lt;Receiver&gt; has no method 'on' at new WebSocket (/home/pi/cursores/node_modules/websocket.io/lib/protocols/hybi-16.js:39:6) at Server.createClient (/home/pi/cursores/node_modules/websocket.io/lib/server.js:88:10) at Server.handleUpgrade (/home/pi/cursores/node_modules/websocket.io/lib/server.js:60:21) at HTTPServer.&lt;anonymous&gt; (/home/pi/cursores/node_modules/websocket.io/lib/websocket.io.js:92:8) at HTTPServer.emit (events.js:106:17) at Socket.socket.ondata (http.js:1990:14) at TCP.onread (net.js:527:27) Script code: var express = require('express'); var wsio = require('websocket.io'); var app = express.createServer(); var ws = wsio.attach(app); app.use(express.static('public')); ws.on('connection',function(socket) { console.log("Connection detected"); }); app.listen(3000); console.log("Listening on port 3000");

http://stackoverflow.com/comment/42900036
has text: yes there is no way to do it using `needs`. `needs` is just to inject controllers into other controllers.
type: AnswerComment
comment on: http://stackoverflow.com/a/27200154
type: Comment
score: 1

http://stackoverflow.com/a/27164401
upvote count: 1
has body: This may be because of the default request length allowed by your server. Try setting it in the php.ini as follows: ; Maximum allowed size for uploaded files. upload_max_filesize = 40M ; Must be greater than or equal to upload_max_filesize post_max_size = 40M
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27164309

http://stackoverflow.com/a/27247699
accepted answer of: http://stackoverflow.com/q/27247548
has body: Check if document is ready before you execute the bootstrap switch plugin: $(document).ready(function() { //Code }); Update switch checkbox code: Add a class to the checkbox &lt;input name=\"my01Switch\" id=\"my01Switch\" type=\"checkbox\" data-toggle=\"switch\" checked=\"true\" class=\"custom-box\"/&gt; Update js code: function renderRooms(json) { if (json !== undefined) { //..... //$('#roomBoxWrap').json2html(json, transforms.theRoom); $('#form-nav').json2html(json.rooms, transforms.menurooms); $('#title_room_name').append(getRoomName(json)); //After the rooms are loaded $('.custom-box').bootstrapSwitch(); } }
has comment: http://stackoverflow.com/comment/42974817
has comment: http://stackoverflow.com/comment/42970187
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43001485
has comment: http://stackoverflow.com/comment/42970432
type: Answer
has comment: http://stackoverflow.com/comment/42974734
score: 2
has comment: http://stackoverflow.com/comment/42974286
answers question: http://stackoverflow.com/q/27247548
upvote count: 2
has comment: http://stackoverflow.com/comment/42970244
has comment: http://stackoverflow.com/comment/42974602
has comment: http://stackoverflow.com/comment/42974163

http://stackoverflow.com/q/27155746
answer count: 2
accepted answer: http://stackoverflow.com/a/27155872
downvote count: 0
tagged with: mean-stack
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27155847
has title: Reuse export.function in same document
tagged with: node.js
has answer: http://stackoverflow.com/a/27155847
favorite count: 0
has answer: http://stackoverflow.com/a/27155872
has body: I am building a settings module in a mean.js stack. And I want to re-use an existing function. But how? Here is some demo code: controller-x.js var mongoose = require( 'mongoose' ), errorHandler = require( './errors' ), time = require( 'time' ), _ = require( 'lodash' ); exports.create = function( req, res ) { // create something }; exports.save = function( req, res ) { // save something }; exports.update = function( req, res ) { // update something }; How can i (re-)use the "save" function in the update or create, or some another function?
upvote count: 1
has comment: http://stackoverflow.com/comment/42806008
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42806037
score: 1
has comment: http://stackoverflow.com/comment/42805886
type: Question

http://stackoverflow.com/a/27153798
score: 1
has comment: http://stackoverflow.com/comment/42802373
has body: You need a counter that you increment each time it's clicked: var b = 0; var a = document.getElementById('avalue'); a.onclick = function() { console.log(++b); }
answers question: http://stackoverflow.com/q/27153750
has comment: http://stackoverflow.com/comment/42802355
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42802617
downvote count: 0

http://stackoverflow.com/a/33004499
answers question: http://stackoverflow.com/q/27236802
has body: You can also attach max and min zoom levels to the map, something to consider the over all map zoom when loading kml layers. // sets the min and max zoom levels of the map var opt = { minZoom: 6, maxZoom: 18 }; map.setOptions(opt);
type: Answer
score: 0

http://stackoverflow.com/q/27285716
tagged with: javascript
has title: How come process.__proto__ !== process.constructor.prototype?
favorite count: 0
has comment: http://stackoverflow.com/comment/43039113
tagged with: node.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43039151
upvote count: 1
has answer: http://stackoverflow.com/a/27287397
has body: I opened up node repl and typed in process.__proto__ === process.constructor.prototype and I was surprised that the answer is false this perplexes me quite a bit. Isn't that o.__proto__ was defined to be its constructors prototype?
has comment: http://stackoverflow.com/comment/43039252
has comment: http://stackoverflow.com/comment/43039081
score: 1
tagged with: prototype
linked to: http://stackoverflow.com/q/10406552
type: Question
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/43039803
has text: An alternate approach is to use the three.js method `THREE.GeometryUtils.randomPointsInGeometry( geometry, n )`, which returns points on the faces (i.e., surface) of the geometry.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27285274
score: 0

http://stackoverflow.com/a/27185734
type: Answer
answers question: http://stackoverflow.com/q/27185473
score: 0
has body: If you linking your css/js file in index.html the the request will be parallel, not serial. I'm not sure about this, but I guess for all browsers it's parallel. Unless you link one css in index.html and then import the other css using the @import in css file. For asynchronous download, you need to use require.js or any such kind of package manager. The async attribute is used for execution only not for request. There is no limitation for http requests in a page. Using require.js is a good option.Actually with require.js you can use r.js which will help you to create a build, which will reduce your multiple css &amp; js files to a single file.

http://stackoverflow.com/q/27213826
has answer: http://stackoverflow.com/a/27213960
has answer: http://stackoverflow.com/a/27213940
has answer: http://stackoverflow.com/a/27213918
has comment: http://stackoverflow.com/comment/42907917
type: Question
has answer: http://stackoverflow.com/a/27213973
has comment: http://stackoverflow.com/comment/44145521
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/44146651
has comment: http://stackoverflow.com/comment/42908146
favorite count: 0
has body: I have written this function to remove lowercase vowels from a string. This function is not working for some strings. If the string has more than one occurrence of the same vowel only one vowel is being removed. [Edit: sorry I forgo to include 'y' as a vowel in my example below.] Thank you for your help. var string = "heelloo world"; var vowel = ["a", "e", "i", "o", "u"]; String.prototype.character = function name() { var i; for ( i = 0; i &lt; vowel.length; i++) { var secondLoop = string.length; for ( j = 0; j &lt; secondLoop; j++) { if (vowel[i] == string.charAt(j)) { string = string.slice(0, j).concat(string.slice(j + 1, secondLoop)); } } } } string.character(); console.log(string); //hello wrld
has title: Trying my own string method to remove vowels
has comment: http://stackoverflow.com/comment/42908001
answer count: 5
type: UnansweredQuestion
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27214068

http://stackoverflow.com/a/27247577
has body: A javascript file is always downloaded by the client because the client has to be able to execute the code inside. The best thing you can do is obfuscate the javascript code.
score: 4
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/27247535
type: Answer
has comment: http://stackoverflow.com/comment/42969914
has comment: http://stackoverflow.com/comment/42969957

http://stackoverflow.com/a/27561414
answers question: http://stackoverflow.com/q/27296555
downvote count: 0
type: Answer
upvote count: 1
has body: I thought I was the only one! :) I am using the Xamarin "version" of the WKWebView, and have the EXACT same issue. From what I suspect its the WKWebView itself not updating the page layout correctly and I haven't been able to find any code to force it to. So, while its not a proper solution, what I've landed up doing for now is to inject some javascript into the page on screen rotation to set the width of the header\footer. The width adjustment is slightly noticeable but at least it resolves itself without the need to scroll the page. Hope this helps, at least until the issue in WKWebView is properly resolved.
score: 1

http://stackoverflow.com/comment/42825075
type: QuestionComment
comment on: http://stackoverflow.com/q/27166456
has text: What programming language do you plan to use for it?
score: 0
type: Comment

http://stackoverflow.com/q/27237864
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27238192
accepted answer: http://stackoverflow.com/a/27238192
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42953365
has comment: http://stackoverflow.com/comment/42952572
tagged with: http://stackoverflow.com/tag/html
has body: I have this code Aenean lacinia bibendum. Donec ullamcorper nulla non metus auctor fringilla. Donec id elit non mi porta gravida at eget metus. Donec ullamcorper nulla non metus auctor fringilla. Donec id elit non mi porta gravida at eget. Consectetur Fusce Quam I want to add an opening div box before my h3 elements on my html page and a closing divbox after the I have tried with: But it will output: " " before all me h3 elements. What have I done wrong. How can I only make an opening div box before all the h3 elements?
has comment: http://stackoverflow.com/comment/42952699
has answer: http://stackoverflow.com/a/27237930
type: AnsweredQuestion
downvote count: 0
has title: How to make an opening divbox with jQuery
type: Question
has comment: http://stackoverflow.com/comment/42952657
score: 1
possible better answer: http://stackoverflow.com/a/27237930
has comment: http://stackoverflow.com/comment/42952599

http://stackoverflow.com/comment/42920618
has text: @AvinashRaj: I have formatted the query. Thanks for telling me ...I dint know
comment on: http://stackoverflow.com/q/27215466
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27294566
score: -2
tagged with: javascript
has title: Use javascript to remove last digit from field onSubmit
tagged with: jquery
has comment: http://stackoverflow.com/comment/43053871
downvote count: 2
answer count: 1
has body: I want to remove the last digit from a form field when a user clicks submit using javascript. e.g if I enter 1099 into a field with ID number, the value 109 would get submitted on submit.
has comment: http://stackoverflow.com/comment/43054060
favorite count: 0
type: UnansweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27294598
type: Question

http://stackoverflow.com/q/27230586
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/42940249
tagged with: google-maps
upvote count: 0
answer count: 1
favorite count: 0
has title: display the Marker from database
type: UnansweredQuestion
score: -2
has body: the following java script will display the Marker in google map. here i have added Control button to LEFT_BOTTOM. my out put shows all Marker. but i need to filter some Marker from database when i click Control button. how should i do it? ----
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/27232707
tagged with: javascript

http://stackoverflow.com/q/27173538
type: UnansweredQuestion
upvote count: 1
has body: I have the following code that displays a sidebar XUL window: <splitter /> The overlay displays fine when I run the plugin - the browser loads and I can see the overlay already prepared. However, I wanted to display the overlay on click of a toolbar button. The toolbar button is created using: CustomizableUI.createWidget({ id: "my-plugin-toolbar-button", defaultArea: "nav-bar", removable: true, label: "My Plugin", tooltiptext: "Open the sidebar overlay!", onClick: onClick }) The onClick right now just injects some scripts into the page. How do I use the same onClick to show/hide the overlay?
type: Question
score: 1
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27178878
tagged with: javascript
favorite count: 0
has title: Open or close XUL sidebar firefox
tagged with: firefox-addon
tagged with: plugins
tagged with: xul

http://stackoverflow.com/comment/42925127
score: 0
comment on: http://stackoverflow.com/q/27223037
type: Comment
type: QuestionComment
has text: Can you put breakpoints and/or `console.log` inside your factory and callback in the controller to see what is getting passed through? Also, what is returned by the `$http.get()`?

http://stackoverflow.com/a/27179284
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27177371
answers question: http://stackoverflow.com/q/27177371
has body: Finally got so angry I am not able to do it with css that I made it with jquery :( If anyone is interested here is the result I have at least fixed the issue no1 with better css but the second is done with jquery. solved no.1 with .circle_wrap{ position: absolute; bottom: 0; width: 100%; height: 100px; } and applying position:relative on its parent and the solution for no.2 is $(".circle_wrap").hover(function () { $(this).siblings("img").css("opacity", "0.2"); }, function () { $(this).siblings("img").css("opacity", "1"); }); EDIT: safari support .wrap img:hover{ -moz-transition: scale(1.1) rotate(0deg); transform: scale(1.1) rotate(0deg); -webkit-animation-name: scaleThis; -webkit-animation-duration:5s; -webkit-animation-iteration-count: 1; -webkit-animation-timing-function:ease-in-out; } @-webkit-keyframes scaleThis { 0% { -webkit-transform:scale(1) rotate(0deg); } 10% { -webkit-transform:scale(1.1) rotate(0deg); } 100% {-webkit-transform:scale(1.1) rotate(0deg); } }
score: 0

http://stackoverflow.com/comment/42985543
has text: @JordanForeman: Yes, the window object represents the global scope, but still - an object literal is a *syntactic device*, and has nothing to do with scope.
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27255829

http://stackoverflow.com/a/27293703
type: Answer
answers question: http://stackoverflow.com/q/27267371
score: 0
has body: I found the solution. I used this code like include in php but now, I'm using like separate page and it's works. I'm not change my code jet...maybe the problem it's like sais @Ricky in a comment: the Safari version on Windows is very very older and have mane bugs. Thanks for all comments and help!

http://stackoverflow.com/comment/42865794
has text: Yes, it is possible.
comment on: http://stackoverflow.com/q/27189795
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/42920381
type: QuestionComment
has text: Yes. But it loads more when it reaches the end.
comment on: http://stackoverflow.com/q/27220688
score: 0
type: Comment

http://stackoverflow.com/q/27256291
has comment: http://stackoverflow.com/comment/42986330
has comment: http://stackoverflow.com/comment/42988276
downvote count: 2
has answer: http://stackoverflow.com/a/27256367
type: Question
has body: Here's my challenge: Complete the canIGet function. This function should: take two arguments: 'item' should represent what the user wants to buy 'money' should represent how many dollars a user has return 'true' if a user can afford a given item according to the price chart below, false otherwise: 'MacBook Air' - $999 'MacBook Pro' - $1299 'Mac Pro' - $2499 'Apple Sticker' - $1 return 'false' if the 'item' is not in the above list apple products (Rather than returning true/false I am logging to console) I would appreciate an explanation of what I'm doing wrong. My code: var canIGet = function(item, money){ if ((money &gt;= 2499) &amp;&amp; (item == "Mac Pro" || "Macbook Pro" || "Macbook Air" || "Apple sticker")){ console.log("You can afford a Mac Pro"); } else if ((2499 &gt; money) &amp;&amp; (money &gt;= 1299) &amp;&amp; (item == "Macbook Pro" || "Macbook Air" || "Apple sticker")){ console.log("You can afford a Macbook Pro"); } else if ((1299 &gt; money) &amp;&amp; (money &gt;= 999) &amp;&amp; (item == "Macbook Air" || "Apple sticker")){ console.log("You can afford a Macbook Air"); } else if ((999 &gt; money) &amp;&amp; (money &gt;= 1) &amp;&amp; (item == "Apple sticker")){ console.log("You can afford a Apple sticker"); } else { console.log("Get a job!"); } }; canIGet("Mac Pro", 1500);
tagged with: if-statement
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42986798
has title: JavaScript If/Else and Comparison/Relational Operators
upvote count: 0
has comment: http://stackoverflow.com/comment/42987383
answer count: 1
has comment: http://stackoverflow.com/comment/42987485
favorite count: 0
tagged with: operators
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42986773
has comment: http://stackoverflow.com/comment/42987348

http://stackoverflow.com/a/47023762
has body: I simply had to ensure that the locale file was saved as UTF-8 instead of ANSI. I didn't seem to need charset attributes on script tags or a meta tag indicating that (at least in Chrome).
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27168168

http://stackoverflow.com/q/27268691
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/28096746
has body: How can I catch any exception that occurs in the client side code like "Pause On Caught Exceptions" on chrome developer tools?
has title: Catch all JavaScript client-side errors on the server-side
tagged with: single-page-application
has answer: http://stackoverflow.com/a/28096746
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27268888
tagged with: error-handling
type: Question
tagged with: c#
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/27269083
tagged with: javascript
has answer: http://stackoverflow.com/a/27268888

http://stackoverflow.com/a/69978057
has body: function flat(arr) { for (let i= 0; i&lt;arr.length; i++) { const element = arr[i]; if (Array.isArray(element)) { arr.splice(i, 1, ...element); // replaces arr[i] with its elements } } return arr; } This is non-recursive + in-place array modification (no new array is created)
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27303369

http://stackoverflow.com/q/27183780
type: Question
answer count: 1
tagged with: javascript
score: 0
has title: What am I doing wrong with replaceChild()?
has answer: http://stackoverflow.com/a/27184136
has body: I am really having trouble with this replaceChild() function. I am trying to teach myself javascript. Thank god I learned Object Oriented basics from java or I will be completely lost. Can This code is supposed to be replacing one picture with another. It's not replacing the picture at all. Can someone tell me what am I doing wrong? I will really appreciate it. <! adds buttons> MyButton MyButtonII
accepted answer: http://stackoverflow.com/a/27184136
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42854879
has comment: http://stackoverflow.com/comment/42856431

http://stackoverflow.com/comment/42929201
score: 0
type: Comment
has text: yes you are right only but i am not pointing out any mistakes here and please correct the mistake i made that is the reason why i gave the method i used. thanks and pls dont mind.
type: AnswerComment
comment on: http://stackoverflow.com/a/27225343

http://stackoverflow.com/comment/43453582
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27467522
type: AnswerComment
has text: I tried doing just that, and not it doesn't work in Chrome or Firefox. xD

http://stackoverflow.com/a/27179327
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27179012
type: Answer
score: 2
has body: I would assume the result in the callback uses zero based index (your working example where you use rows[0] also suggests this). So your loop should be for (var i=0; i &lt; count; i++) { user[i] = result.rows[i].sensor; console.log("here is the sensor", user[i]); };

http://stackoverflow.com/comment/42837673
comment on: http://stackoverflow.com/q/27173204
score: 0
has text: Jquery slide should work.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42938883
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27230628
has text: Oh, I swapped them around already but the same thing occurs; `Caman was used before it was defined` and also `Missing new` referring to the second code snippet.
score: 0

http://stackoverflow.com/comment/43004214
type: QuestionComment
comment on: http://stackoverflow.com/q/27266515
score: 0
has text: If you're returning JSON, set the `dataType` to 'json', and get rid of `dataobject = $.parseJSON(data);`
type: Comment

http://stackoverflow.com/q/27191438
answer count: 2
tagged with: javascript
has body: I am trying to make a list of users on a chat page using Angular.JS. I want to have the user see his own name at the top of the list. I would like to accomplish this by either: A) Omitting the user's own name from the list and then printing the user's name elsewhere. OR B) Pushing the user's name to the top of an unordered list (you see your own name at the top of the list.) Here's the relevant code: ChatCtrl.js function ($scope, $log, socket, personService) { // .......... $scope.person = personService.getPerson(); // personService is a service which gather info each time a person logs in socket.emit('people-join-server', { user: $scope.person.name, interests: $scope.person.interests }); socket.on("update-people", function(data) { $scope.people = data.people; $scope.count = data.count; $scope.$digest(); }); // .......... } Socket.js var _ = require('underscore')._; // the io argument comes from the root app.js file module.exports = function (io) { var people = {}; var sockets = []; var sizePeople = _.size(people); io.sockets.on('connection', function(socket){ socket.on('people-join-server', function (data) { people[socket.id] = {"user": data.user, "interests": data.interests}; io.sockets.emit('update-people', {people: people, count: sizePeople}); }); // ........ } }; chat_page.html &lt;ul&gt; &lt;li ng-repeat="peeps in people"&gt; &lt;span&gt;{{peeps.user}}&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt;
tagged with: angularjs-ng-repeat
tagged with: node.js
tagged with: angularjs
score: 0
has answer: http://stackoverflow.com/a/27201341
tagged with: socket.io
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27201341
possible better answer: http://stackoverflow.com/a/27197453
has answer: http://stackoverflow.com/a/27197453
has title: AngularJS - Omitting user from an unordered list

http://stackoverflow.com/a/27219206
has comment: http://stackoverflow.com/comment/42918686
answers question: http://stackoverflow.com/q/27219087
has comment: http://stackoverflow.com/comment/42917694
type: Answer
score: 6
has body: You can use labels with the break statement in js var input = prompt(); outside: while(true) { switch(input) { case 'hi': break; case 'bye': //I want to break out of the switch and the loop here break outside; } /*Other code*/ }
upvote count: 6
has comment: http://stackoverflow.com/comment/46043081
has comment: http://stackoverflow.com/comment/42917995
downvote count: 0

http://stackoverflow.com/comment/42839183
comment on: http://stackoverflow.com/q/27174565
has text: Just use the textbox's maxlength attribute. That way they cannot possibly type in more than 20 characters.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42952135
has text: For example, type in Here is a div to the field
comment on: http://stackoverflow.com/a/27237728
score: 0
type: AnswerComment
type: Comment

canvas
tags question: http://stackoverflow.com/q/27230643
tags question: http://stackoverflow.com/q/27250770
tags question: http://stackoverflow.com/q/27208715
tags question: http://stackoverflow.com/q/27313204
tags question: http://stackoverflow.com/q/27298063
tags question: http://stackoverflow.com/q/27237627
tags question: http://stackoverflow.com/q/27224528
tags question: http://stackoverflow.com/q/27210276
tags question: http://stackoverflow.com/q/27213366
tags question: http://stackoverflow.com/q/27158580
tags question: http://stackoverflow.com/q/27192409
tags question: http://stackoverflow.com/q/27175505
tags question: http://stackoverflow.com/q/27214203
tags question: http://stackoverflow.com/q/27270906
tags question: http://stackoverflow.com/q/27311828
tags question: http://stackoverflow.com/q/27175986
tags question: http://stackoverflow.com/q/27278116
tags question: http://stackoverflow.com/q/27203227
tags question: http://stackoverflow.com/q/27208681
tags question: http://stackoverflow.com/q/27168684
tags question: http://stackoverflow.com/q/27198999
tags question: http://stackoverflow.com/q/27230293
tags question: http://stackoverflow.com/q/27250227
tags question: http://stackoverflow.com/q/27243904
tags question: http://stackoverflow.com/q/27234185
tags question: http://stackoverflow.com/q/27201755
tags question: http://stackoverflow.com/q/27283710
tags question: http://stackoverflow.com/q/27187512
tags question: http://stackoverflow.com/q/27195704
tag name: canvas
tags question: http://stackoverflow.com/q/27304176
tags question: http://stackoverflow.com/q/27179382
tags question: http://stackoverflow.com/q/27247704
tags question: http://stackoverflow.com/q/27187770
tags question: http://stackoverflow.com/q/27179538
tags question: http://stackoverflow.com/q/27232030
tags question: http://stackoverflow.com/q/27220518
type: Tag
tags question: http://stackoverflow.com/q/27284835
tags question: http://stackoverflow.com/q/27197296
tags question: http://stackoverflow.com/q/27218032
tags question: http://stackoverflow.com/q/27227431
tags question: http://stackoverflow.com/q/27195402
tags question: http://stackoverflow.com/q/27218096
tags question: http://stackoverflow.com/q/27153053
tags question: http://stackoverflow.com/q/27228943
tags question: http://stackoverflow.com/q/27257094
tags question: http://stackoverflow.com/q/27154164
tags question: http://stackoverflow.com/q/27157248
tags question: http://stackoverflow.com/q/27213413
tags question: http://stackoverflow.com/q/27287732
tags question: http://stackoverflow.com/q/27178519
tags question: http://stackoverflow.com/q/27283422
tags question: http://stackoverflow.com/q/27252269
tags question: http://stackoverflow.com/q/27296493

http://stackoverflow.com/q/27205876
score: -1
has answer: http://stackoverflow.com/a/27205902
answer count: 1
downvote count: 1
favorite count: 0
has body: I just want set 2 arrays which should contain for loop output. Here's code: var key_ls = new Array(); var value_ls = new Array(); for (var a in window.localStorage) { key_ls[a] = a; value_ls[a] = localStorage[a]; } and it gives me no result. What do i wrong?
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/27205902
type: Question
has title: Error with declaring variables in for loop
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/27299266
accepted answer: http://stackoverflow.com/a/27299312
tagged with: c#
tagged with: javascript
has title: Setting value to hidden fields not working with jQuery
type: AnsweredQuestion
tagged with: jquery
tagged with: asp.net
has answer: http://stackoverflow.com/a/27299312
type: Question
has body: I have an application that I am creating with Visual Studio 2013 and I'm running into some issues with assigning a value to a hidden field using jQuery. First let me say that I am assigning a value to a hidden variable because I cannot access the text value of a label in the .cs file directly so I have to assign the value of the label to the hidden input field so I can access it in the .cs file. I hope that makes sense. Here are the hidden input fields that I have in my .aspx file: &lt;input type="hidden" id="at" runat="server" /&gt; &lt;input type="hidden" id="wt" runat="server" /&gt; &lt;input type="hidden" id="att" runat="server" /&gt; &lt;input type="hidden" id="wtt" runat="server" /&gt; &lt;input type="hidden" id="gt" runat="server" /&gt; &lt;input type="hidden" id="ah" runat="server" /&gt; &lt;input type="hidden" id="wh" runat="server" /&gt; &lt;input type="hidden" id="th" runat="server" /&gt; &lt;input type="hidden" id="tah" runat="server" /&gt; &lt;input type="hidden" id="twh" runat="server" /&gt; Here is the function that I run any time a key is pressed: &lt;script src="Scripts/add-bid.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('input[type=text]').keyup(function () { calculateTotal(); }); }); &lt;/script&gt; Here is the code inside of the add-bid.js script, namely the calculateTotal function: $("#at").val("100"); $("#wt").val("200"); $("#att").val("100"); $("#wtt").val("200"); $("#gt").val("600"); $("#th").val("42"); I have hard coded the values here for an example. I then go to retrieve the values of the hidden fields in my aspx.cs file, and they are all null. What am I doing wrong here? Any and all help is appreciated.
possible better answer: http://stackoverflow.com/a/27299402
has answer: http://stackoverflow.com/a/27299402
score: 0
answer count: 2

http://stackoverflow.com/a/27240455
has comment: http://stackoverflow.com/comment/42957553
upvote count: 5
has comment: http://stackoverflow.com/comment/42958706
downvote count: 0
answers question: http://stackoverflow.com/q/27240011
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27240011
has body: I would recommend using JSON when communicating back and forth between the server and client for this type of situation. JSON is meant to handle these types of nested structures in a uniform manner. Take a look at using the jQuery $.getJSON functionality, http://api.jquery.com/jquery.getjson/ The following is an example of how this structure would look... Javscript var request_data = {kwargs: {test: 1}}; $.getJSON(URL, {data: JSON.stringify(request_data)}, function(data){//whatever}) Django import json def your_view(request): my_json = json.loads(request.GET['data']) Doing this will allow you to parse the request which contains JSON data into a variable of your choice (my_json). Once you assign your variable with the results of json.loads(), you will now have a python object containing the parsed requested JSON data and you will be able to manipulate your object accordingly. &gt;&gt;&gt; my_json['kwargs'] {u'test': 1}
has comment: http://stackoverflow.com/comment/42958373
score: 5
type: Answer
has comment: http://stackoverflow.com/comment/42957661

http://stackoverflow.com/q/27263614
has body: I have use the below HTML code snippet to display text, but unable to do so in Internet Explorer 8 version. This code snippet works fine as expected in IE's latest versions but “\n” is not working in IE8 version . How to resolve this? Thanks in advance.
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27263869
favorite count: 0
has title: New line character "\n" not supported in IE 8 browser
linked to: http://stackoverflow.com/q/10889927
has answer: http://stackoverflow.com/a/27263766
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42999499
has comment: http://stackoverflow.com/comment/42999493
possible better answer: http://stackoverflow.com/a/27263648
answer count: 4
has answer: http://stackoverflow.com/a/27263648
has comment: http://stackoverflow.com/comment/42999751
has comment: http://stackoverflow.com/comment/43000032
upvote count: 1
has answer: http://stackoverflow.com/a/27263651
has comment: http://stackoverflow.com/comment/42999967
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27263766
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/42999488
tagged with: internet-explorer-8
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42999820

http://stackoverflow.com/comment/42852145
comment on: http://stackoverflow.com/a/27182020
type: Comment
score: 0
type: AnswerComment
has text: Oh, no worries. I did upvote Gilsha's answer, because that's exactly what your code needs. What *you* need though is in the duplicate question link.

http://stackoverflow.com/q/27257724
accepted answer: http://stackoverflow.com/a/27279075
type: Question
has comment: http://stackoverflow.com/comment/42989426
tagged with: javascript
has body: The docs do not seem to mention any such limit but I am getting strange errors when I try to send a 64 byte-long message. All other message transfers seem to work fine. Not that I think it is really relevant to the question being asked, but here is my send method within the COMMS namespace in case there is an obvious error that I should be aware of: // Transmits the given data // // @param[in] outData, The data to send as an ArrayBuffer // @param[in] onTxCompleted, The method called on completion of the outgoing transfer. The return // code is passed as a string. // @param[in] onRxCompleted, The method called on completion of the incoming transfer. The return // code is passed as a string along with the response as an ArrayBuffer. send: function(outData, onTxCompleted, onRxCompleted) { if (-1 === connection_) { console.log("Attempted to send data with no device connected."); return; } if (0 == outData.byteLength) { console.log("Attempted to send nothing."); return; } if (COMMS.receiving) { console.log("Waiting for a response to a previous message. Aborting."); return; } if (COMMS.transmitting) { console.log("Waiting for a previous message to finish sending. Aborting."); return; } COMMS.transmitting = true; chrome.hid.send(connection_, REPORT_ID, outData, function() { COMMS.transmitting = false; if (onTxCompleted) { onTxCompleted(chrome.runtime.lastError ? chrome.runtime.lastError.message : ''); } if (chrome.runtime.lastError) { console.log('Error in COMMS.send: ' + chrome.runtime.lastError.message); return; } // Register a response handler if one is expected if (onRxCompleted) { COMMS.receiving = true; chrome.hid.receive(connection_, function(reportId, inData) { COMMS.receiving = false; onRxCompleted(chrome.runtime.lastError ? chrome.runtime.lastError.message : '', inData); }); } }); }
tagged with: hid
downvote count: 0
answer count: 1
favorite count: 0
has title: Is there a limit to the ArrayBuffer size of chrome.hid.send?
has answer: http://stackoverflow.com/a/27279075
has comment: http://stackoverflow.com/comment/42989158
tagged with: google-chrome-app
has comment: http://stackoverflow.com/comment/42995676
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42992918
score: 1
upvote count: 1

http://stackoverflow.com/comment/42918617
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27219159
has text: is the intention to display the parsed date strings in a human readable list (pretty dates rather than timestamps)? or do you need the date object for something more complex? if not, could you not parse the date and append to the string the extra nano seconds, storing the original string in a `data` attribute?

http://stackoverflow.com/comment/42891731
type: AnswerComment
has text: probably not provide a good path to the file. See exaple: http://fiddle.jshell.net/yc86deoy/. And Study the source code http://fiddle.jshell.net/yc86deoy/show/
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27203130

http://stackoverflow.com/a/27299047
answers question: http://stackoverflow.com/q/27297309
has body: I have completely no idea, but suddenly this problem is solved. I did just added some test codes. And removed them. Then it works. Oh god..
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/27243791
type: UnansweredQuestion
tagged with: angularjs-http
score: 1
upvote count: 1
has title: put a spinner while $http.get fetches data from RESTful API in angularjs
has body: I am fetching a data with this function in my controller: var fetchStoreItems = function () { return $http.get('/enterprises/_store').then(function (response) { $scope.items = response.data; }, function (errResponse) { console.error("Error while fetching data") }) }; It is working fine and fast enough. But what if there are lots of items to fetch?! I want to put a spinner while data is being fetched. How can I do this?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27244192
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27243875
tagged with: angularjs

http://stackoverflow.com/q/27240296
answer count: 0
has comment: http://stackoverflow.com/comment/42957149
tagged with: javascript
type: Question
tagged with: css
has comment: http://stackoverflow.com/comment/42957087
score: 0
has comment: http://stackoverflow.com/comment/42957090
tagged with: gwt
has title: Adding Veritcal Scrollbar to Horizontally aligned parent panel
type: UnansweredQuestion
has body: A panel with horizontal alignment is containing two child panels. The height of one of them changes dynamically. I want to add vertical scrollbar on the parent panel when this child panel overflows. If I am using default layout for the parent panel which is vertical. It is working. But in case of horizontal alignment, it is not. Can anyone please help? I am using GWT.

http://stackoverflow.com/q/27199490
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42892917
downvote count: 1
has answer: http://stackoverflow.com/a/27199762
has title: Get a new Sql id after submition by Ajax
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27199532
tagged with: jquery
has comment: http://stackoverflow.com/comment/42883345
has comment: http://stackoverflow.com/comment/42883391
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42883036
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27199565
has comment: http://stackoverflow.com/comment/42890563
has body: After submission a comment of a post with ajax, comment.php display new comment with its own SQL auto increment id. like: // Here $id comes from SQL after submit data &lt;div class="comment'.$id.'"&gt;&lt;ul&gt; // new comment &lt;/ul&gt;&lt;/div&gt; Now, how to get this new id in Ajax complete: function(data) from comment.php to show it post.php page into . I tried this code which not working: complete: function(data){ var ID = $(this).attr('id').replace('comment',''); $(".comment"+ID).append(data.responseText); $(".comment"+ID).fadeIn(2000); } complete code: $(".repfrm").click(function(){ error.fadeOut(); if(checkForm()){ var author = inputAuthor.attr("value"); var url = inputUrl.attr("value"); var img = inputImg.attr("value"); var replycom = inputReplycom.attr("value"); var parent_id = inputparent_id.attr("value"); var tutid = inputTutid.attr("value"); $.ajax({ type: "POST", url: "comment.php", data: "action=insert&amp;author="+ author + "&amp;replycom="+ replycom + "&amp;url="+ url + "&amp;img="+ img + "&amp;parent_id="+ parent_id + "&amp;tutid="+ tutid, complete: function(data){ error.fadeOut(); var ID = $(this).attr('id').replace('comment',''); $(".comment"+ID).append(data.responseText); $(".comment"+ID).fadeIn(2000); }); } }); } else //alert("Please fill all fields!"); error_message(); });
has comment: http://stackoverflow.com/comment/42892734

http://stackoverflow.com/comment/43054541
comment on: http://stackoverflow.com/a/27267353
type: Comment
has text: Your solution is absolutely not worth it, your first line: `var date = new Date("12-January-2014");` is already a valid javascript date, so there is no need to do all the stuff that follows.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42975249
comment on: http://stackoverflow.com/a/27249368
type: Comment
has text: You can't control it from JS, it literally has to just be a hyperlink. Obviously that means that printing sucks for anyone that doesn't have access to server side generation... However there is another option. There are some client side PDF generation tools and 'Blob URLs', so you can do client side PDF generation too. Try [jsPDF](https://github.com/MrRio/jsPDF), I haven't used that one but it might do the trick.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43072606
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27304886
has text: Thank you for the detailed explanation. That clears up the syntax confusion

http://stackoverflow.com/q/27180920
possible better answer: http://stackoverflow.com/a/27181000
has answer: http://stackoverflow.com/a/27181000
has answer: http://stackoverflow.com/a/27180964
accepted answer: http://stackoverflow.com/a/27180980
tagged with: php
has answer: http://stackoverflow.com/a/27181057
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42850441
tagged with: forms
has body: Help, I am really not familiar with ajax and I wanted to submit a form without reloading the page. Using the codes below, it didn't reload but it certainly didn't post or didn't even call the ajax function. And here is the html form codes And here is the post.php code <?php if(isset($_POST['userpost'])){ $post_type = $_POST['post_type']; if($_POST['post_type']=="shoutout"){ $post = $_POST['userpost']; $query = 'INSERT INTO tblpost (post_content, post_date, post_userID, poster, post_type) VALUES ("'.$post.'", now(), "'.$_SESSION["user_ID"].'", "'.$_SESSION["username"].'", "'.$post_type.'" )'; $result = mysql_query($query) or mysql_error(); $tmp_post_ID = mysql_insert_id(); $type = "post"; notify($type, $tmp_post_ID); } if($_POST['post_type']=="story"){ $post_title = $_POST['post_title']; $post = $_POST['userpost']; $query = 'INSERT INTO tblpost (post_content, post_date, post_userID, poster, post_type, post_title) VALUES ("'.$post.'", now(), "'.$_SESSION["user_ID"].'", "'.$_SESSION["username"].'", "'.$post_type.'", "'.$post_title.'" )'; $result = mysql_query($query) or mysql_error(); $tmp_post_ID = mysql_insert_id(); $type = "post"; notify($type, $tmp_post_ID); } if($_POST['post_type']=="image"){ $tmp_name = $_FILES['post_image']['tmp_name']; $user_ID = $_SESSION['user_ID']; $post = $_POST['userpost']; $img_ID = upload_image($tmp_name,$user_ID); $query = 'INSERT INTO tblpost (post_content, post_date, post_userID, poster, post_type, img_ID) VALUES ("'.$post.'", now(), "'.$_SESSION["user_ID"].'", "'.$_SESSION["username"].'", "'.$post_type.'", "'.$img_ID.'" )'; $result = mysql_query($query) or mysql_error(); $tmp_post_ID = mysql_insert_id(); $type = "image"; notify($type, $tmp_post_ID); } //header('location:'.curPageURL()); } ?>
type: Question
has title: Ajax submitting form doesn't reload page but doesn't post
has answer: http://stackoverflow.com/a/27180980
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0

http://stackoverflow.com/q/27292557
has answer: http://stackoverflow.com/a/27293010
has body: I am working on a JavaScript driven audio player with a playlist. I have a problem when I try to add a click event to the elements I want to play. Apparently I am doing something wrong in the loop because the elements are displayed, yet not played. No errors in the console. JSFIDDLE HERE //object obj = { songsrc: ["mariah_carey_all_i_want", "chris_rea_driving", "wham_last_christmas", "dean_martin_snow", "brenda_lee_rocking"], title: ["Mariah Carey", "Chris Rea", "Wham", "Dean Martin", "Brenda Lee"], songs: ["All I want for christmas is you", "Driving home for christmas", "Last christmas", "Let it snow", "Rocking around"], images: ["mariah_carey", "wham", "chris_rea", "dean_martin", "brenda_lee"] } // the &lt;ul&gt; in which the li elements I have lay mylist.addEventListener("click", changeTrack); // adding the songs to the playlist addTrack(); function addTrack() { for(var i = obj.title.length-1; i &gt;= 0; i--) { li = document.createElement("li"); li.className = "songs_wrap"; li.innerHTML = "&lt;div class='songs_inner'&gt;" + "&lt;h4&gt;"+obj.title[i]+ "&lt;/h4&gt;&lt;p&gt;" + obj.songs[i] + "&lt;/p&gt;&lt;/div&gt;"; mylist.appendChild(li); } } // trying to make them play when I click a song (a li element) function changeTrack(event) { var target = event.target; while (target != mylist) { if (target.nodeName == 'LI') { for(var i = target; i &lt; obj.songsrc.length; i++) // I guess this is wrong { obj.images.src = "images/" + obj.images[i] + ".jpg"; var title = playlist_status.innerHTML = obj.title[i]; var song = playlist_song.innerHTML = obj.songs[i]; audio.src = dir + obj.songsrc[i] + ext; playbtn_icon.className = "icon-pause"; audio.play(); } } target = target.parentNode } }
tagged with: target
has title: JavaScript Playlist Target Element
tagged with: javascript
tagged with: element
type: Question
accepted answer: http://stackoverflow.com/a/27293010
type: AnsweredQuestion
answer count: 1
score: 0

http://stackoverflow.com/q/27159212
downvote count: 0
has comment: http://stackoverflow.com/comment/42812343
favorite count: 0
has answer: http://stackoverflow.com/a/27159992
has comment: http://stackoverflow.com/comment/42812382
accepted answer: http://stackoverflow.com/a/27159992
has answer: http://stackoverflow.com/a/27159689
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27159929
score: 1
linked to: http://stackoverflow.com/q/1695376
has title: JavaScript division on click trigger any given predefined event [CROSS BROWSER COMPATIBILITY]
has body: I have a form and an internal division: &lt;form action="#" name="form" id="identification_form" class="classification_form"&gt; &lt;div name="division" id="identification_division" class="classification_division"&gt; &lt;/div&gt; &lt;/form&gt; JavaScript manipulating with events: document.getElementById('identification_division').onClick = function(event){ document.getElementById('identification_form').submit(); //does NOT trigger element.onsubmit event } document.getElementById('identification_form').onSubmit = function(event){ alert("submitted!") } The form successfully submits but does not call the event The element.onsubmit event only works when using a submit button inside the form and manually clicking the button (or pressing enter while in focus of another input element) How can i make element.onClick call the the onSubmit function? when using element.onSubmit i get an undefined error in the browser console. My current solution: function submition(event){ alert("submitted"); } document.getElementById('identification_division').onClick = function(event){ submition(event || null); document.getElementById('identification_form').submit(); } document.getElementById('identification_form').onSubmit = function(event){ submition(event || null); } Note my current solution can cause a memory leak in early versions of Opera &amp; Internet Explorer. JQUERY is not an option
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27159689
answer count: 3
upvote count: 1

http://stackoverflow.com/q/27209245
accepted answer: http://stackoverflow.com/a/27209272
score: 0
has answer: http://stackoverflow.com/a/27209272
tagged with: ajax
has answer: http://stackoverflow.com/a/27209255
answer count: 5
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: How do I pop a simple alert box via AJAX?
has answer: http://stackoverflow.com/a/27209294
has body: Here's my code in the tag: and here's my HTML: 0 1 2 3 4 5 6 7 8 9+ Why isn't this working? What am I doing wrong?
type: Question
possible better answer: http://stackoverflow.com/a/27209255
has answer: http://stackoverflow.com/a/27209518
tagged with: javascript
has answer: http://stackoverflow.com/a/27209299
tagged with: jquery

http://stackoverflow.com/q/27250160
has body: I want any input text to have the word "vowel" added before each vowel - e.g. "Hello world" becomes "Hvowelellvowelo wvowelorld" At the moment my code works but only for the first vowel and then stops - how can I set it to repeat across the whole text input? http://jsfiddle.net/53qH6/5/ document.getElementById("input").addEventListener("keyup", function() { document.getElementById("output").innerHTML = this.value.replace(/([aeiou]).*/i, "vowel$1"); }, false); Thanks.
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27250378
favorite count: 0
linked to: http://stackoverflow.com/q/12993629
has comment: http://stackoverflow.com/comment/42975432
downvote count: 1
has comment: http://stackoverflow.com/comment/42974475
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27250378
score: -1
has title: How can I add some text before each vowel? (Code stops after first one)
upvote count: 0

http://stackoverflow.com/comment/43071198
has text: A better approach might be to change what's available to trigger the modal--add a tab to the side of the viewport or something.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27304129
score: 0

http://stackoverflow.com/comment/42905864
type: Comment
comment on: http://stackoverflow.com/a/27165736
has text: And by the way, although `visibility` is an [animatable property](http://www.w3.org/TR/css3-transitions/#animatable-properties), according to spec it's [interpolated as a discrete step](http://www.w3.org/TR/css3-transitions/#animtype-visibility), so you wouldn't see *actual* animation. That's the reason I suggested `opacity`.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43091141
has text: Thank you with your solution! I will learn "lodash" later on.:)
comment on: http://stackoverflow.com/a/27312517
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28142922
answers question: http://stackoverflow.com/q/27297478
has body: I mentioned this question above but the tl;dr is: $Formatters change how your $modelValue will appear as a $viewValue. $Parsers validate your $viewValue to be saved as an $modelValue. Moreover, $formatters are invoked whenever the $modelValue changes, to transform the $modelValue into the $viewValue. So, essentially $formatters format view-bound values, whereas $parsers validate data-bound values. Both $formatters and $parsers are properties with an array of functions that are applied in the order they are push()'d or unshift()'d onto the stack. Hopefully this helps you understand the $formatters and $parsers.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44707044
accepted answer of: http://stackoverflow.com/q/27297478
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/34163746
answers question: http://stackoverflow.com/q/27191267
downvote count: 0
upvote count: 6
score: 6
type: Answer
has body: The W3C Recommendation defining HTML5 has a list of obsolete, nonconforming features, including the lowsrc attribute. Its recommendation is to make a progressive JPEG image whose first scan has the same level of spatial detail as the 50 kB image and whose later scans fill in the extra details in the full 800 kB image. This mechanism presumably requires user agents to use HTTP range requests to determine how much data to retrieve relative to the size at which the image is displayed, just as they use range requests to seek through the source of an audio or video element.

http://stackoverflow.com/q/27168349
has answer: http://stackoverflow.com/a/27168862
has body: I want to show 10 20 in single input type text, but below option is not working. Can any one help me Javascript:- var a = 10; var b = 20; document.getElementById("current").value = a , b; HTML:- &lt;input type="text" id="current"&gt;
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27168409
type: Question
has answer: http://stackoverflow.com/a/27168387
has title: Javascript, How to show two value into same input type text field?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27168387
score: 0
has answer: http://stackoverflow.com/a/27168527
accepted answer: http://stackoverflow.com/a/27168409

http://stackoverflow.com/comment/42952860
score: 0
type: Comment
type: QuestionComment
has text: Ok, I'll dig deeper into ng-model. I was thinking that as I wrote this. Yes, it works. I have to use $http instead of $resource because of the Base64 encoding that I need to pass.
comment on: http://stackoverflow.com/q/27238043

http://stackoverflow.com/a/27256680
has comment: http://stackoverflow.com/comment/42989004
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43045984
type: Answer
has comment: http://stackoverflow.com/comment/42987364
has body: With 'as' you are defining the way you will refer to your controller scope in you view. So this: Hello {{name}}! app.controller('MainCtrl', function($scope) { $scope.name = 'World'; }); Is equal to this: Hello {{main.name}}! Your controller: app.controller('MainCtrl', function($scope) { this.name = 'World'; }); DEMO So basically you should be able to call this.$digest or this.$apply as you would do on $scope. UPDATE After doing some search, I think the correct solution should be using $scope.apply() or $scope.digest(). Main resource: AngularJS’s Controller As and the vm Variable There is a comment rising your same question and the author replay: You can use $scope.$apply() in that case and just inject $scope for that purpose (still using vm for everything else). However, if you switch fro using ajax to using Angular's $http, then you won't need to call $apply as angular's $http does that for you. That's what I recommend Other resources I found: this vs $scope in AngularJS controllers Angular: Should I use this or $scope Do You Like Your Angular Controllers with or without Sugar?
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27256136
has comment: http://stackoverflow.com/comment/42988839
answers question: http://stackoverflow.com/q/27256136
has comment: http://stackoverflow.com/comment/68033347
score: 7

http://stackoverflow.com/a/27214596
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42909368
has body: Instead of looking at the page source use the chrome dev tools. Open the web site you want with chrome. Make a right click on it and select the option inspect element. When the tool is open take a look at the tab Elements, there you can see and handle de the DOM and you will see an HTML structure easy to read and follow.
has comment: http://stackoverflow.com/comment/42909427
answers question: http://stackoverflow.com/q/27214520
upvote count: 1

http://stackoverflow.com/comment/42972022
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27248787
has text: It depends on what your task is... The data is _likely_ inserted properly, since you got the “Inserted” message. So I guess the task is already achieved.
score: 0

http://stackoverflow.com/comment/42888345
comment on: http://stackoverflow.com/q/27202403
type: QuestionComment
has text: @T.J.Crowder: The link you're looking for is https://stackoverflow.com/questions/500504/why-is-using-for-in-with-array-iteration-such-a-bad-idea :-)
type: Comment
score: 0

http://stackoverflow.com/comment/42846095
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27178631
score: 0
has text: From condition - The jQuery method below is working but I want to do this with JavaScript

http://stackoverflow.com/comment/42851720
type: AnswerComment
score: 0
type: Comment
has text: @Kartikeya - Ids should be used - not classes
comment on: http://stackoverflow.com/a/27181729

http://stackoverflow.com/comment/42816692
has text: It does look right. Is the other, non-password information for @sample still there? Also, could you put your form up there? And finally, could you try removing the `unless: :field` section of your validations?
type: QuestionComment
comment on: http://stackoverflow.com/q/27161165
score: 0
type: Comment

http://stackoverflow.com/q/27171602
score: 0
has answer: http://stackoverflow.com/a/27211347
tagged with: datatable
has comment: http://stackoverflow.com/comment/42834215
has title: jQuery Datatable sort issue
has body: I am using the Datatable plugin http://www.datatables.net/examples/basic_init/zero_configuration.html to populate the table I use jquery .html() function and pass the table content to it . the problem is after the data is appended to the table all the sort , paginate and search functions are not working anymore , each change on these removes the data from the table . can anyone help me with this problem please ? thank you
accepted answer: http://stackoverflow.com/a/27211347
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27182628
has answer: http://stackoverflow.com/a/48747322
has answer: http://stackoverflow.com/a/27182938
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/74307806
type: Question
has answer: http://stackoverflow.com/a/60387984
upvote count: 16
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/27187801
has answer: http://stackoverflow.com/a/61455666
accepted answer: http://stackoverflow.com/a/27187801
possible better answer: http://stackoverflow.com/a/27182938
favorite count: 0
has body: I'm trying to create a time-based count down clock. It is not based upon current_dates. The initial time that will be pulled will be from a separate php file. This will be for a browser based-game. When someone clicks the button to initiate this script. it will check if certain requirements are met and if so then this script will initiate. Based upon the level of the object it will pull the initial timer for that proceeding level. Hope that makes sense. Anyhow I based the timer script off of the first code I provide. This script only accounts for minutes and seconds. I modified it to include days and hours as well. Somewhere in the process I have messed up and the script doesn't even work at all. I'm also not quite sure if this would be the best method to calculate this. So, if you have a cleaner method at doing this please share. Thank you in advance. This script is based off of a minutes / seconds script I saw. Here's the original source: &lt;span id="countdown" class="timer"&gt;&lt;/span&gt; &lt;script&gt; var seconds = 60; function secondPassed() { var minutes = Math.round((seconds - 30)/60); var remainingSeconds = seconds % 60; if (remainingSeconds &lt; 10) { remainingSeconds = "0" + remainingSeconds; } document.getElementById('countdown').innerHTML = minutes + ":" + remainingSeconds; if (seconds == 0) { clearInterval(countdownTimer); document.getElementById('countdown').innerHTML = "Buzz Buzz"; } else { seconds--; } } var countdownTimer = setInterval('secondPassed()', 1000); &lt;/script&gt; Here is the modified script that I am trying to include days, hours, minutes and seconds. &lt;span id="countdown"&gt;&lt;/span&gt; &lt;script&gt; var current_level = 93578; function timer() { var days = Math.round(current_level/86400); var remainingDays = Math.round(current_level - (days * 86400)); if (days &lt;= 0){ days = current_level; } var hours = Math.round(remainingDays/3600); var remainingHours = Math.round(remainingDays - (hours * 3600)); if (hours &gt;= 24){ hours…
tagged with: timer
downvote count: 0
has title: Javasacript Countdown timer in Days, Hours, Minute, Seconds
tagged with: countdowntimer
score: 16
tagged with: php

http://stackoverflow.com/comment/42952036
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27237633
has text: Actually I see that now. Made a Bootply, anywhere you click minimizes the whole thing to oblivion. http://www.bootply.com/MoAPhNAwlT

http://stackoverflow.com/q/27154764
answer count: 2
accepted answer: http://stackoverflow.com/a/27154883
has body: I want to increment for each row day and show day name. 1.1.2014 Wednesday 2.1.2014 Thursday ...etc How to make this? App.js App.controller('TestCtrl', function ($scope) { var g = ['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']; var datastart = new Date(2014, 1, 1); $scope.myDate = datastart; $scope.myDays = g; }); HTML: &lt;div class="row" ng-repeat="MyDay in MyDays"&gt; // for 1 to 31 &lt;div class="col-md-2"&gt; &lt;div class="form-group"&gt; &lt;input type="text" class="form-control" value="" /&gt; &lt;/div&gt; &lt;/div&gt;
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42803990
possible better answer: http://stackoverflow.com/a/27156239
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27156239
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27154883
type: Question
has comment: http://stackoverflow.com/comment/42804161
has title: List all days in a month (dates with day names)
tagged with: javascript
score: 0

http://stackoverflow.com/q/27280424
has body: I have a form divided into two different sections and and I'd like the user to click "edit" next to a section and then submit only that part of the form. I've done this a bunch of times with jquery but I'm a fairly new to angular and I can't find/think of the correct way. Also, this needs to be done programmatically, since there are more inputs and potentially more sections that will be added to the form. Any help much appreciated, thank you! EDIT: just to clarify, my question is: how could I submit the form but only post the first row of inputs, or only the second row of inputs EDIT: Ok this is my latest thought on how to accomplish this... I'm trying to send a form in two different sections. I was thinking I could wrap each part of the form in a separate controller, then do the $http request inside of a factory/service called "sendForms" (which one of these is the right way, factory or service?) and then set the form data to this.formData inside the factory/service. Then use ng-model="formData" on all the inputs and use ng-submit="sendForms" on the form element. Am I on the right track here? I did not update the code to look like this yet. First Name Last Name Address 1 Address 2
upvote count: 2
has answer: http://stackoverflow.com/a/27281983
type: Question
has comment: http://stackoverflow.com/comment/43034482
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/43033135
score: 2
answer count: 1
downvote count: 0
favorite count: 0
has title: Angular JS - submit form in two different sections
tagged with: angularjs
linked to: http://stackoverflow.com/q/27200495
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43032075
has comment: http://stackoverflow.com/comment/43031956
has comment: http://stackoverflow.com/comment/43035088

http://stackoverflow.com/q/27242259
accepted answer: http://stackoverflow.com/a/27242476
tagged with: css
type: AnsweredQuestion
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27242330
tagged with: javascript
tagged with: jquery
score: 0
has title: Display multiple progress bar with multiple file upload using jquery,html and css
tagged with: http://stackoverflow.com/tag/html
has body: I use one browse button to select multiple files to upload but only 1 progress bar display for all uploaded files. Please review the following code: Proper Title Files: I have to display separate progress bar for separate file upload.
has answer: http://stackoverflow.com/a/27242330
has answer: http://stackoverflow.com/a/27242476

http://stackoverflow.com/a/27283955
accepted answer of: http://stackoverflow.com/q/27283863
has body: Call success_handler within an anonymous function that you pass to the post function, rather than passing success_handler directly. Then you can propagate anything you want through to your callback that you specify when calling handleMemberAction. return SF.action.post("action/transfer/" + action_path, request, function (postCallbackData) { success_handler(postCallbackData, btn); }); Note, I'm not sure what SF.action.post calls your function with, but I've just passed it on assuming the first argument you have there is correct.
answers question: http://stackoverflow.com/q/27283863
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27300606
type: AnsweredQuestion
has title: JSF 2 - JavaScript inputText Validation Number
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27341851
tagged with: jsf-2
score: 0
linked to: http://stackoverflow.com/q/469357
answer count: 1
has comment: http://stackoverflow.com/comment/43139359
has answer: http://stackoverflow.com/a/27341851
has body: I am working with JSF 2 and I want to validate an inputText with javascript, in my script is defined that only numbers can be entered but the letters are also entered my code jsf &lt;p:inputText id="idDNI" style="width:140px;" value="#{empleadoBean.emVista.strDNI}" maxlength="8" required="true" onkeypress ="validar(event)"/&gt; js function validar(e) { var unicode=e.keyCode? e.keyCode : e.charCode; if (unicode == 8 || unicode == 46 || unicode == 37 || unicode == 39) { return true; } else if ( unicode &lt; 48 || unicode &gt; 57 ) { return false; } else{ return true; } } Thanks for all, excuse me for my English

http://stackoverflow.com/a/54204162
score: 0
type: Answer
has body: Note you need to add "authentifcation" too, it's done by an ajax function called beforeSend: beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", "Basic " + btoa("neo4j"+ ":" + "yourNeo4jPassword")); }} also the path to the database is "http://localhost:7474/db/data/transaction/commit" and not "http://localhost:7474/" So the final Solution is : $.ajax({ url: "http://localhost:7474/db/data/transaction/commit", type: "POST", data: body, contentType: "application/json", beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", "Basic " + btoa("neo4j"+ ":" + "password")); }} ) .done(function(result){ console.log(result); }) .fail(function(error){ console.log(error.statusText); });
answers question: http://stackoverflow.com/q/27213258

http://stackoverflow.com/q/27289231
has comment: http://stackoverflow.com/comment/43044961
has comment: http://stackoverflow.com/comment/43045337
score: 0
linked to: http://stackoverflow.com/q/18176755
answer count: 1
has title: datepicker enabling specific dates from database
favorite count: 0
tagged with: postgresql
has comment: http://stackoverflow.com/comment/43044937
type: UnansweredQuestion
tagged with: datepicker
has body: I am trying to enable only the dates that are in my database, after doing several research I came up with these code These is my script &lt;script&gt; &lt;?php $dis = pg_query("SELECT 'date_purchased' FROM 'tree_solds';"); foreach ($dis as $disa){ $dis .="'".$disa."',"; } $dis = substr($dis,0,-1); ?&gt; var array=[&lt;?php echo $dis; ?&gt;]; jQuery(document).ready(function($) { $( "#datepicker" ).datepicker({ maxDate: new Date(), dateFormat: "yy-mm-dd", beforeShowDay: function(date){ if($.inArray($.datepicker.formatDate('yy-mm-dd', date), array) &gt; -1) { return [true,"","Available"]; } else{ return [false,'',"Not Available"]; } } }); }); &lt;/script&gt; and these is my html file &lt;div&gt;&lt;input type="text" id="datepicker" /&gt; When I query the console the error that shows is these GET http://localhost/resources/demos/style.css index.php:40 Uncaught SyntaxError: Unexpected token &lt; morris.min.js:6 Uncaught Error: Graph container element not found These is my line 37 to 40 &lt;link rel="stylesheet" href="/resources/demos/style.css"&gt; &lt;script&gt; &lt;?php But currently when i click on the text box nothing shows. I've been looking at the code for several hours and can't seem to find any error. Everything was working fine before I entered this part &lt;?php $dis = pg_query("SELECT 'date_purchased' FROM 'tree_solds';"); foreach ($dis as $disa){ $dis .="'".$disa."',"; } $dis = substr($dis,0,-1); ?&gt; var array=[&lt;?php echo $dis; ?&gt;]; Can anyone please help me? Thanks
tagged with: php
has answer: http://stackoverflow.com/a/27289453
upvote count: 1
has comment: http://stackoverflow.com/comment/43046262
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43044812
tagged with: javascript

http://stackoverflow.com/a/27308456
upvote count: 1
has comment: http://stackoverflow.com/comment/43079096
score: 1
answers question: http://stackoverflow.com/q/27308024
accepted answer of: http://stackoverflow.com/q/27308024
type: AcceptedAnswer
has body: There are a number of keystroke events including: keyup keydown keypress It is likely that you have to trap or handle some or all of them to achieve the desired function.
downvote count: 0
has comment: http://stackoverflow.com/comment/43079249
type: Answer
has comment: http://stackoverflow.com/comment/43079031

http://stackoverflow.com/a/27183672
answers question: http://stackoverflow.com/q/27182972
score: 0
has body: try using $tr .= "&lt;td &gt;".((gettype($cols[$i]) == 'NULL') ? '-' : $cols[$i]) ."&lt;/td&gt;"; instead of $tr += "&lt;td &gt;".((gettype($cols[$i]) == 'NULL') ? '-' : $cols[$i]) ."&lt;/td&gt;";
has comment: http://stackoverflow.com/comment/42854814
type: Answer

http://stackoverflow.com/comment/42807212
comment on: http://stackoverflow.com/a/27156529
score: 1
type: AnswerComment
has text: Using a `background-image` on an `img` tag is yucky semantically, and he'll need to remove the `src` tag in order for that to work. I'd rather see that on a `block` or `inline-block` element.
type: Comment

http://stackoverflow.com/comment/43081218
has text: @BrendanAshworth: Even if it was true, that doesn't seem to justify a downvote. In case there are any anti-io.js arguments, please let us know them!
type: AnswerComment
comment on: http://stackoverflow.com/a/27309455
type: Comment
score: 2

http://stackoverflow.com/a/27309771
type: Answer
answers question: http://stackoverflow.com/q/27309614
has body: try this code var array = [5,4,3,2,1]; document.write("&lt;br&gt;Facorial: " + factorial(array).join(',')); function factorial(params){ var op = []; for (i = params.length - 1; i &gt;= 0 ; i--){ var f = 1; for (j = 0; j &lt; i; j++){ f = f * params[j]; } op.push(f); } return op; }
score: 0

http://stackoverflow.com/q/27239371
has answer: http://stackoverflow.com/a/27239399
tagged with: node.js
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27239399
tagged with: javascript
tagged with: gruntjs
score: 0
has body: I am trying to set up some options using env in my gruntfile.js so that I can use NODE_ENV based if statements in my server.js file. I have installed grunt-env using "npm grunt-env --save-dev" and included and env section in gruntfile.js: grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), env: { dev: { NODE_ENV : 'development' }, prod: { NODE_ENV : 'production' } }, .... I also registered the tasks for dev and production at the end of the file grunt.registerTask('dev', ['csslint', 'jshint', 'nodeunit', 'sass', 'concurrent', 'nodemon']); grunt.registerTask('prod', ['cssmin', 'uglify', 'nodemon']); When I run "grunt dev" or "grunt prod" the server starts without error and starts the correct tasks, but I am still not able to access NODE_ENV form inside my server.js file. I tried adding the following: console.log(process.env.NODE_ENV); this returns as "undefined" no matter if I use "grunt dev" or "grunt prod" Where am I going wrong?
answer count: 1
has title: why can't I access value NODE_ENV in my server.js file when I have set it gruntfile.js with grunt-env

http://stackoverflow.com/comment/87712484
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27439524
has text: I seem to find that f is not accessible from within the return function
score: 0

http://stackoverflow.com/comment/42950352
comment on: http://stackoverflow.com/q/27236442
has text: my historical minimum for node itself (with an app running) has been about 10mb/instance. even on a 32-core box, that's only 320mb of ram unless you're spinning up more than one per cpu.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42904989
score: 0
type: Comment
has text: Well, from all this underscore learning I forgot about vanilla JS. Upped your answer
comment on: http://stackoverflow.com/a/27211528
type: AnswerComment

http://stackoverflow.com/q/27259337
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/27260130
has body: I'm really new to AngularJS. I'm trying to create a simple web app that is nothing more than a page that displays a product. When the user clicks next they are taken to the next product in the array. At the moment I'm able to use the ngRepeat directive to show all items in the array: {{product.item}} Amount: {{product.number}} count: {{count}} Increase Decrease Add (function() { var app = angular.module('store', [ ]); app.controller('StoreController', function(){ this.products = items; }); var items = [ { item: 'Top', number: 2, images: 'shirt_icon.jpeg' }, { item: 'Bottom', number: 5, images: 'pants_icon.jpg' }, { item: 'Underwear', number: 3, images: 'underwear_icon.jpg' }, ]; })(); But what I really want is to have a simple "next" button that will populate the same page with all of the product information next in the array.
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42992070
has title: Get next item in array on ngClick
accepted answer: http://stackoverflow.com/a/27260130
type: AnsweredQuestion
type: Question
upvote count: 4
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/42992232
downvote count: 0

http://stackoverflow.com/q/27279564
tagged with: google-app-engine
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27449293
tagged with: oauth-2.0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/83524751
tagged with: google-cloud-platform
score: 1
has body: I am developing applications on Google App Engine, and am looking into the OAuth2.0 details. My question is the following: if a hacker intercepts an OAuth2.0 access token, can he fake requests from one of the "Authorized JavaScript Origins" defined in the Google Cloud Console? A bit more details if it is unclear: in the Google Cloud console, you can define a OAuth2.0 client id which you send with your javascript using Google's JS api (complete flow here). Part of the process is that you get an access token, which you then use to authenticate subsequent requests. As an extra layer of security, all requests need to come from a specific origin that you define in your cloud console (see image). So only requests from that domain are accepted. But I am wondering, if a hacker did know to get hold of an access token from one of my users, the request would still need to come from the authorized origin. Can that hacker then go to https://myapp.appspot.com, tweaks the javascript with for example chrome Javascript Console, and use the access token from the user to make malicious calls as if he was the user he stole the token from? As I see it, then the request is coming from an authorized JS origin, and with a valid OAuth2.0 access token. What am I missing?
favorite count: 0
has comment: http://stackoverflow.com/comment/43028936
has comment: http://stackoverflow.com/comment/84646633
has comment: http://stackoverflow.com/comment/43030359
type: Question
has title: Oauth2 - can hacker fake google app engine requests if he knows access token

http://stackoverflow.com/comment/43082841
type: Comment
score: 0
type: QuestionComment
has text: Yes, you are right, but this is just the SIMPLEST version used to illustrate the problem. In real life I have multiple controllers/views all using the directive with different flavours of variables being passed in.
comment on: http://stackoverflow.com/q/27310829

http://stackoverflow.com/q/27261727
has comment: http://stackoverflow.com/comment/42996632
tagged with: three.js
has answer: http://stackoverflow.com/a/27262556
score: 0
has comment: http://stackoverflow.com/comment/42996344
answer count: 1
has body: I am using ThreeJS to load a scene like so: $(document).ready(function(){ var scene = new THREE.ObjectLoader().load("scene.js"); var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); var renderer = new THREE.WebGLRenderer(); var fly = new THREE.OrbitControls(camera); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); var gui = new dat.GUI(); gui.add(controls, 'rotationSpeed',0,100); camera.position.z = 5; camera.position.z = 32; function render() { requestAnimationFrame( render ); renderer.render( scene, camera ); } render(); }); var controls = new function() { this.rotationSpeed = 0.02; this.bouncingSpeed = 0.03; }; and here's the scene (Exported from the ThreeJS editor): http://www.codepixl.net/experiments/threejs/scene.js But when I try to load the scene: It repeatedly throws cannot read property 'fog' of undefined and undefined is not a function at me. What's happening? What should happen:
has comment: http://stackoverflow.com/comment/42996602
tagged with: javascript
has title: ThreeJS ObjectLoader- cannot read property 'fog' of undefined
linked to: http://stackoverflow.com/q/17757391
accepted answer: http://stackoverflow.com/a/27262556
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42996332
type: Question

http://stackoverflow.com/comment/43084091
type: Comment
comment on: http://stackoverflow.com/a/27276837
score: 1
type: AnswerComment
has text: A number system is based on the different kinds of symbols it has to represent the numbers. For example if you take binary you just have two supported symbols '0' and '1'. So if you take all the symbols from Indo-Arabic Numerals(0,1,2,3,4,5,6,7,8,9) and Latin letters(a-z), you will have a maximum of 36 different symbols to represent a number in such a number system. That's why Javascript function parseInt supports up to 36 as radix.

http://stackoverflow.com/a/27234971
score: -1
upvote count: 0
type: Answer
has body: Convert the array into an associative array. The keys in an associative array are unique. Example code shown in node. → node &gt; a ={ "1.0": 1417048100, "1.1": 1417046900} { '1.0': 1417048100, '1.1': 1417046900 } &gt; a["1.0"] 1417048100 &gt; a["1.0"]=99999 99999 &gt; a { '1.0': 99999, '1.1': 1417046900 } For a better understanding read up on hashes and the blog post below may also be helpful. http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/
downvote count: 1
answers question: http://stackoverflow.com/q/27234820

http://stackoverflow.com/a/27232428
type: AcceptedAnswer
has body: The correct is, to access an element of an array like below: arrayName[index] where arrayName is the name of your array and index is the index of the element you want to get or set it's value.
answers question: http://stackoverflow.com/q/27232381
type: Answer
accepted answer of: http://stackoverflow.com/q/27232381
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/114057067
score: 0
type: Comment
has text: If using `L.circleMarker` you need to pass `marker._path` instead of `marker._icon`
comment on: http://stackoverflow.com/a/40889696
type: AnswerComment

http://stackoverflow.com/comment/42856846
has text: Domain (realm) is used in hash calculation, but how it helps me? I skip irrelevant details. What technical details are required? I saw (for native browser implementation) that `response` parameter in `Authorization` header for request to new uri differs from previous one. I supposed that browser stores clear text password and uses it in hash recalculation. My main question is: Is it true?
comment on: http://stackoverflow.com/q/27172860
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42978265
type: QuestionComment
has text: @AAhad When the animation or the watch arrives in a specific frame or specific time, the event begins (plays an audio in this event ) . It's strange , in some phones that I tested went well . But not in others . In all tablets tested worked. I noticed that when I open the app again ( resume ) the animation is still in the same frame but quickly , the app updates the animation and he returns to the frame it should be.
comment on: http://stackoverflow.com/q/27241784
score: 0
type: Comment

http://stackoverflow.com/a/27240548
has comment: http://stackoverflow.com/comment/42984872
has comment: http://stackoverflow.com/comment/42960737
accepted answer of: http://stackoverflow.com/q/27239099
type: Answer
has body: ng-repeat="slots in timeslot" Plunker: http://plnkr.co/edit/ImdmHlpevzO6FL2fe2EP?p=preview As Dinesh said, remove calendar when you're specifying the controller. Unless you're doing something more complicated that we don't know about, Angular is smart enough to know which controller you're trying to use.
answers question: http://stackoverflow.com/q/27239099
score: 1
upvote count: 1
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/a/27172267
has body: I wouldn't code that from scratch. There are many jQuery plugins (see here that are doing exactly what you need. For example http://fotorama.io/ is such a plugin. See example below. You can also find that at jsFiddle here Also galleria.io is a good gallery slider. I have used it for a smaller web page in production. That's a lot easier. Please have a look at the fotorama page for customization (e.g. autoplay, thumbnails, etc.)
type: Answer
answers question: http://stackoverflow.com/q/27171709
has comment: http://stackoverflow.com/comment/42835216
score: 0
has comment: http://stackoverflow.com/comment/42835000

http://stackoverflow.com/a/27250184
type: Answer
has body: You need to use event delegation. Event delegation allows us to attach a single event listener, to a parent element, that will fire for all descendants matching a selector, whether those descendants exist now or are added in the future. $('body').on("click",'.item', function() { // change style });
downvote count: 0
answers question: http://stackoverflow.com/q/27250170
score: 5
upvote count: 5

http://stackoverflow.com/comment/43192179
score: 0
type: Comment
has text: With Michal and Vitorino's help, thank you. i make the css like this #radio1 { pointer-events: none; opacity:0.5; } it works fine in chrome and firefox, but IE... any comments for IE
type: QuestionComment
comment on: http://stackoverflow.com/q/27312124

http://stackoverflow.com/comment/42982960
comment on: http://stackoverflow.com/a/27242508
has text: Thanks saqib, but I don't want to add any new libraries to the app other than Angular.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42989521
type: AnswerComment
type: Comment
has text: I ran your "Run code snippet" and it works just as I want it to work. I made sure it is similar to my code and it is, but Total doesn't get outputed when I test it on my website
comment on: http://stackoverflow.com/a/27257745
score: 0

http://stackoverflow.com/q/27252081
type: AnsweredQuestion
type: Question
score: 5
upvote count: 5
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/27259111
tagged with: javascript
tagged with: express
has body: I'm new to Mean.io and I'm trying to aggregate an external .js file to my package but I'm doing it wrong because it is not being added to aggregated.js. This is what I've done: importer.register(function(app, auth, database) { importer.aggregateAsset('js', 'xml2json.min.js'); //We enable routing. By default the Package Object is passed to the routes importer.routes(app, auth, database); //We are adding a link to the main menu for all admin users VavelImporter.menus.add({ title: 'importer example page', link: 'importer example page', roles: ['admin'], menu: 'main' }); return importer; }); The important line is: importer.aggregateAsset('js', 'xml2json.min.js'); My asset (xml2json.min.js) is located under importer/public/assets/js/xml2json.min.js. I need someone to explain me where to put that asset so Mean.io locates that file. Thanks.
has title: How to aggregate JS assets on Mean.io
tagged with: node.js
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27259111
tagged with: mean.io

http://stackoverflow.com/q/27177898
tagged with: javascript
tagged with: api
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/27180417
accepted answer: http://stackoverflow.com/a/27180417
favorite count: 0
tagged with: wolframalpha
has comment: http://stackoverflow.com/comment/42844766
linked to: http://stackoverflow.com/q/16268930
has body: I am trying to use WolframAlpha's API through Javascript. I don't understand why the following code returns me an empty alert. I'm new at jQuery, but I was told it was the best method to use right here. Thank you very much for your help
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
score: 1
type: Question
has title: jquery - wolframalpha api xml request

http://stackoverflow.com/comment/42932577
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27227589
has text: Why are you putting `JSON.stringify` anywhere near `application/atom+xml`?!
score: 1

http://stackoverflow.com/comment/43082871
type: AnswerComment
has text: I'd never needed to do that so it was interesting. glad to help!
comment on: http://stackoverflow.com/a/27310352
type: Comment
score: 0

http://stackoverflow.com/a/27292026
score: 0
has body: Here is your desired solution: $('[name="next"]').addClass('disabled'); $('[name="options"]').on('change',function(e){ e.preventDefault(); $('[name="next"]').toggleClass('disabled', !$('[name="options"]:checked').length); }) FIDDLE
type: Answer
answers question: http://stackoverflow.com/q/27291830
has comment: http://stackoverflow.com/comment/43049647
has comment: http://stackoverflow.com/comment/43049786
has comment: http://stackoverflow.com/comment/43049865

http://stackoverflow.com/q/27206732
type: Question
has body: I was discussing with some about overflows and specifically about integer overflow in parseInt function, where the parameter was not verified before passing it to the parseInt function which then returns the value. I then gave as input some thing like this 9000000000000000000000000999999999999999999999. I then got an exception saying that there is an "overflow in the second argument". I am saying that there is an integer overflow but he is saying that there is not. that is parsInt just informing me. first I want to know who is right. am I wrong. were could I get the source code from javascript engine so that I could see how the parsing is really done
tagged with: javascript
has comment: http://stackoverflow.com/comment/42895705
has title: overflow on parseInt or not?
tagged with: overflow
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42895723
has comment: http://stackoverflow.com/comment/42896440
has comment: http://stackoverflow.com/comment/42896014
linked to: http://stackoverflow.com/q/5353388
answer count: 0
has comment: http://stackoverflow.com/comment/42895905
score: 0
has comment: http://stackoverflow.com/comment/42895842

http://stackoverflow.com/a/27265517
has comment: http://stackoverflow.com/comment/43002693
has comment: http://stackoverflow.com/comment/43003144
score: 5
has comment: http://stackoverflow.com/comment/43003596
has body: Add a listener to the form, collect the values, build an object and add it to the grocery_list, e.g. &lt;script&gt; var grocery_list = {} function addGroceryItem(form) { grocery_list[form.item.value] = {category: form.category.value, price: form.price.value}; return false; } &lt;/script&gt; &lt;form onsubmit="return addGroceryItem(this)"&gt; &lt;input name="item"&gt;&lt;br&gt; &lt;input name="category"&gt;&lt;br&gt; &lt;input name="price"&gt;&lt;br&gt; &lt;input type="submit" value="Add item"&gt; &lt;input type="button" value="Show list" onclick="console.log(grocery_list)"&gt; &lt;/form&gt; Though I'd be tempted to use a plain button, not a submit button, and put the listener on the button's onclick handler.
type: AcceptedAnswer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/27265282
type: Answer
has comment: http://stackoverflow.com/comment/43002854
answers question: http://stackoverflow.com/q/27265282
downvote count: 0

http://stackoverflow.com/q/27179276
tagged with: javascript
has comment: http://stackoverflow.com/comment/42849701
answer count: 2
upvote count: 1
favorite count: 0
has body: I'm quite a beginner at Bootstrap 3.0 and I really can't figure out how to align two buttons in a jumbotrons side-by-side. I have this code but it just stacks the buttons above one another: See more Martlet: Faces Edition
has answer: http://stackoverflow.com/a/27179344
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42847765
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27179436
downvote count: 0
tagged with: twitter-bootstrap
score: 1
type: Question
has title: How to align two buttons side-by-side in a jumbotron

http://stackoverflow.com/a/27253760
score: 1
has body: why don't you use this form? var yourjavascriptArray = &lt;%=new JavaScriptSerializer().Serialize(cSharpArrayName);%&gt;;
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27253648

http://stackoverflow.com/comment/45891305
type: AnswerComment
comment on: http://stackoverflow.com/a/28756245
score: 0
type: Comment
has text: Yepp, this solved my issue aswell. Ugly one but still the only thing that works. Also looking forward to this being fixed!

http://stackoverflow.com/q/27260394
score: 11
has comment: http://stackoverflow.com/comment/42994038
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27538872
has title: Set URL to SEO Friendly Title with Dashes instead of ID
type: Question
accepted answer: http://stackoverflow.com/a/27529317
has answer: http://stackoverflow.com/a/27536379
has answer: http://stackoverflow.com/a/27484667
downvote count: 0
tagged with: javascript
upvote count: 11
has comment: http://stackoverflow.com/comment/42994104
has answer: http://stackoverflow.com/a/27529317
tagged with: seo
has comment: http://stackoverflow.com/comment/42993953
favorite count: 0
tagged with: angularjs
has body: I am using AngularJS to create a page of articles with links for details for the individual articles. The links are based on the ID to ensure they are unique, but I would like the URLs to be the title with dashes (much more SEO/user friendly) rather than the ID. Here is the Angular Example where the product details are clean titles: http://angular.github.io/angular-phonecat/step-11/app/#/phones My current URLs are linked by ID so they appear as article/66D5069C-DC67-46FC-8A51-1F15A94216D4 I want them to display as the article title such as article/start-investing and ensure they are SEO friendly. My concern is that if two articles by separate authors have the same title (ex. Learn about investing), that I will get errors if I try to link/lookup by title versus an ID that is unique per article. Here are my controllers: var pfcControllers = angular.module('pfcControllers', []); pfcControllers.controller('pfcCtrl', ['$scope', 'pfcArticles', function ($scope, pfcArticles) { $scope.articles = pfcArticles.query(); }]); pfcControllers.controller('pfcCtrl2', ['$scope', '$routeParams', 'pfcArticles', function ($scope, $routeParams, pfcArticles) { $scope.article = pfcArticles.get({ articleID: $routeParams.articleID }); }]); Here is my router: var pfcModule = angular.module('pfcModule', ['ngRoute', 'pfcServices', 'pfcControllers']); pfcModule.config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/home', { templateUrl: './views/home.html'}). when('/categories', { templateUrl: './views/categories.html', controller: 'pfcCtrl' }). when('/article/:articleID', { templateUrl: './views/articles.html', controller: 'pfcCtrl2' }). otherwise({ redirectTo: '/home' }); }]); Here are my two partials: Categories.html (multiple articles) Heading ID Title Category ID Link {{article.id}} {{article.articletitle}} {{article.articlecategoryid}} Link Article.html (individual article) Heading ID Title Category ID Summary {{article.id}} {{article.articletitle}} {{article.articlec…
possible better answer: http://stackoverflow.com/a/27536379

http://stackoverflow.com/comment/42909513
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27214718
has text: `function Foo() {}` is a declaration, not an invocation, so why do you expect that an execution context would be created here? There's no invocation.

http://stackoverflow.com/a/27265680
downvote count: 0
has comment: http://stackoverflow.com/comment/43002910
type: Answer
answers question: http://stackoverflow.com/q/27265655
has body: console.log(function fn(n) { if (n == 0) { return 1; } else { return (n + fn(n - 1)); } }(8)); Error in this line function(n+function(n-1)), because this is syntax error, you can not call function like you do. In our case you should add for self-Invoking function - name, and use it for recursion call stack
score: 3
upvote count: 3

http://stackoverflow.com/a/27257686
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42989122
has comment: http://stackoverflow.com/comment/42989095
has comment: http://stackoverflow.com/comment/42989071
type: Answer
upvote count: 1
has body: You need to add value to your inputs... &lt;input class="btn-checkbox" type="radio" name="groupnine" onclick="calculate(this);" **value="$699"**/&gt; &lt;input class="btn-checkbox" type="radio" name="groupnine" onclick="calculate(this);" **value="$999"**/&gt;
answers question: http://stackoverflow.com/q/27257611

http://stackoverflow.com/comment/63960901
score: 9
type: AnswerComment
type: Comment
has text: sneaky using apply in there to split the arr, love it.
comment on: http://stackoverflow.com/a/27282907

http://stackoverflow.com/comment/42966161
type: QuestionComment
has text: @AlexMbaka when will the elements disappear?
comment on: http://stackoverflow.com/q/27244321
score: 0
type: Comment

http://stackoverflow.com/q/27204673
possible better answer: http://stackoverflow.com/a/27205209
answer count: 2
accepted answer: http://stackoverflow.com/a/27206926
downvote count: 0
tagged with: javascript
tagged with: prototype
has title: Javascript, implementing custom Object.Create
favorite count: 0
has body: I need to implement inheritance tree in JavaScript where each node can have more than 1 parent. We have to implement Object.Create and Object.call methods on our own. We are specifically not allowed to use new keyword. Here is what I have so far: var myObject = { hash:0, parents: [], create: function(args){ //TODO check if not circular if(args instanceof Array){ for(i=0;i&lt;args.length;i++){ this.parents.push(args[i]); } } return this; }, call : function(fun,args){ //TODO: dfs through parents return this[fun].apply(this,args); }, } var obj0 = myObject.create(null); obj0.func = function(arg) { return "func0: " + arg; }; var obj1 = myObject.create([obj0]); var obj2 = myObject.create([]); obj2.func = function(arg) { return "func2: " + arg; }; var obj3 = myObject.create([obj1, obj2]); var result = obj0.call("func", ["hello"]); alert(result); //calls the function of obj2 istead of obj0 The problem with this code is that I get a call to obj2's function instead of obj0's. I'm suspecting that create() function should not return this, but something else instead (create instance of itself somehow).
upvote count: 1
has answer: http://stackoverflow.com/a/27206926
tagged with: tree
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27205209
score: 1
type: Question

http://stackoverflow.com/q/27156041
has answer: http://stackoverflow.com/a/27157426
type: AnsweredQuestion
has body: I'm using the EntityManager from Breeze for the API portion of data-binding. However, the EntityManager fails to track the changes. It will execute the code like it's supposed to but it never recognizes the changes. What's the issue? Please, refrain from saying anything that is not constructive or any personal attacks. We're here as professionals and scientists(i know i am). Here is my code: Service: (function () { var serviceId = 'UWRLService'; angular.module('myApp') .factory(serviceId, ['$q', 'breeze', 'logger', 'appSettings', UWRLService]); // console.log('Initialized UWRL Service.js'); function UWRLService($q, breeze, logger, appSettings) { // console.log('inside datacontext -- UWRLService'); // configure logging for this service logger = logger.forSource(serviceId); var logError = logger.logError; var logSuccess = logger.logSuccess; var logWarning = logger.logWarning; //Setup variables with common Breeze query classes var entityQuery = breeze.EntityQuery; // setup breeze entity manager var serviceName = appSettings.apiUrl + '/breeze/Uwrl/';//Where the entire service is pointing to var manager = new breeze.EntityManager(serviceName); var entityStateChangeAction = breeze.EntityAction.EntityStateChange; // expose methods var service = { getChangesCount: getChangesCount, saveChanges: saveChanges, rejectChanges: rejectChanges, getDivisions: getDivisions, getPools: getPools, getRandomCust: getRandomCust //createChangeFactorEntity: createChangeFactorEntity, }; return service; // FUNCTION DECLARATIONS //Attaches a new entity to the Breeze repository //Passes the name and an array of values to seed the entity with //function createChangeFactorEntity(entityName, initialValues) { // var newFactor = manager.createEntity(entityName, initialValues); // return newFactor; //} function getRandomCust() { var query = breeze.EntityQuery.from('alpha') .where('customerNumber', '==', 1); return executeQuery(query, 'Alpha found!'); } function getDivisions() { var query = breeze.Entit…
score: 0
has title: Javascript--Breeze Manager Not Detecting Changes
type: Question
tagged with: c#
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27157426
has comment: http://stackoverflow.com/comment/42806869
tagged with: entitymanager
has comment: http://stackoverflow.com/comment/42807288
tagged with: breeze

angularjs-directive
tags question: http://stackoverflow.com/q/27297478
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/27255009
tags question: http://stackoverflow.com/q/27285981
tags question: http://stackoverflow.com/q/27305497
tags question: http://stackoverflow.com/q/27199239
tags question: http://stackoverflow.com/q/27302497
tags question: http://stackoverflow.com/q/27252500
tags question: http://stackoverflow.com/q/27163191
tags question: http://stackoverflow.com/q/27240607
tags question: http://stackoverflow.com/q/27241479
tags question: http://stackoverflow.com/q/27249900
tags question: http://stackoverflow.com/q/27290905
tags question: http://stackoverflow.com/q/27279123
tags question: http://stackoverflow.com/q/27170654
tags question: http://stackoverflow.com/q/27268321
tags question: http://stackoverflow.com/q/27282792
tags question: http://stackoverflow.com/q/27310829
tags question: http://stackoverflow.com/q/27260140
tags question: http://stackoverflow.com/q/27237780
tags question: http://stackoverflow.com/q/27300124
tags question: http://stackoverflow.com/q/27247583
tags question: http://stackoverflow.com/q/27244593
tags question: http://stackoverflow.com/q/27283709
type: Tag
tags question: http://stackoverflow.com/q/27181152
tags question: http://stackoverflow.com/q/27178478
tags question: http://stackoverflow.com/q/27272749
tags question: http://stackoverflow.com/q/27252053
tags question: http://stackoverflow.com/q/27210918
tags question: http://stackoverflow.com/q/27264016
tags question: http://stackoverflow.com/q/27168650
tags question: http://stackoverflow.com/q/27256200
tags question: http://stackoverflow.com/q/27187271
tags question: http://stackoverflow.com/q/27200477
tags question: http://stackoverflow.com/q/27293708
tags question: http://stackoverflow.com/q/27195669
tags question: http://stackoverflow.com/q/27245399
tags question: http://stackoverflow.com/q/27259337
tags question: http://stackoverflow.com/q/27265558

http://stackoverflow.com/a/27262281
has comment: http://stackoverflow.com/comment/43023791
downvote count: 0
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/50519132
has body: http://jsfiddle.net/bpbaz10L/ $('.slider-for').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, fade: true, autoplay:true, //trigger after the slide appears // i is current slide index onAfterChange:function(slickSlider,i){ //remove all active class $('.slider-nav .slick-slide').removeClass('slick-active'); //set active class for current slide $('.slider-nav .slick-slide').eq(i).addClass('slick-active'); } }); //set active class to first slide $('.slider-nav .slick-slide').eq(0).addClass('slick-active');
accepted answer of: http://stackoverflow.com/q/27260225
type: Answer
answers question: http://stackoverflow.com/q/27260225
has comment: http://stackoverflow.com/comment/43023009
has comment: http://stackoverflow.com/comment/49977380
upvote count: 5

http://stackoverflow.com/q/27179382
tagged with: css
favorite count: 0
has body: This one's giving me a hard time - I'm wondering on how to properly implement mipmapping of pictures used on the web, mostly web stores. I want to implement GoogleMaps-like zooming of high res images. The problem here is not making the image viewer, it is the effectiveness and responsivity of the solution. I could just load a double-resolution image and place it in a 256x256 box. When user scrolls (or does equivalent multitouch gesture), the box would enlarge up to 512 px and from about 480 px the 1024px image would be preloading and so on, until we reach the, say, 4096px barrier when no higher zoom or resolution would be available (or the zoom is a "digital zoom" now). Let's say we have a bitmap of a certain bpp that would make the 256x256px image 100 KB in size. On simply switching the image to 512x512 version, the same 100 KB would quadruple to 400 KB, but the problem is only 300 KB more is needed, as we already have one of four pixels of the image (let's say the nearest neighbor method was used to resize/downscale the images). We would only need to double the row/column by loading the other rows/columns and merging those pictures in one 256x512 or 512x256 px image, then do the same for the second dimension. This makes me wonder: Are current computers/browsers/devices powerful enough to do such operation without significant performance drops? Is this even possible? How? are there any benefits after all? Thanks... EDIT 1: (from a comment): The question was mostly about saving bandwidth and/or minimize server load in terms of having to serve 8 pictures per single picture (in image size "tiering") or to serve one big (in terms of filesize) image, to save traffic and workload. Most people don't open/zoom the image, but I also wanted the "progressive" behavior of Google Maps (try to load a map and zoom in). Example 1 Here's the process illustrated by Imagick. filenames are in form of x1-y1-x2-y2.ext: convert 1-1-256-256.jpg 1-257-257-512.jpg +append -crop 256x1 +repag…
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/17861447
has answer: http://stackoverflow.com/a/32187329
score: 2
has comment: http://stackoverflow.com/comment/102201479
has title: Mipmapping (LODing - Level of Detail) of pictures/background in HTML5
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/75923285
comment on: http://stackoverflow.com/a/27196250
has text: I'm getting issues with html5 videos still loading on pages after a turbolink, so want to disable it for them pages
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27206299
has comment: http://stackoverflow.com/comment/42896386
has answer: http://stackoverflow.com/a/27207412
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42896367
favorite count: 0
has comment: http://stackoverflow.com/comment/42896408
has answer: http://stackoverflow.com/a/27207251
tagged with: angularjs
has answer: http://stackoverflow.com/a/27207237
has body: I'm very new to AngularJS and I try to do the following: Bind an scroll event on an element by using a custom directive. Here's the code: First of all, my controller: var officeUIApplication = angular.module('OfficeUI.Ribbon.Module', []) .controller('OfficeUI', ['$scope', '$http', function($scope, $http) { var application = this; $scope.customAlert = function() { console.log('This ia scrolling demo.'); } }]) You'll notice, that here I have function called 'CustomAlert'. I don't know why I'm binding it to $scope, I've only found this kind of information on the next. Can I remove the scope or can someone explain my why it's important? Then I have the directive: .directive("ngcScroll", function() { return { restrict: 'A', link: function (scope, element, attributes) { scope.customAlert(); element.on('DOMMouseScroll mousewheel', function (e) { console.log('Element is being executed.'); }); } } }); The console.log is executed, so that's not a problem, it's executed, but on the scope.customAlert() I receive the following error: scope.customAlert is not a function. I've found to do it like follow: scope.$apply('customAlert()'); However, then I receive $apply is already in progress. Anyone has an idea how I should achieve this? Kind regards,
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42896457
score: 1
possible better answer: http://stackoverflow.com/a/27206852
has comment: http://stackoverflow.com/comment/42895614
upvote count: 1
has answer: http://stackoverflow.com/a/27206852
has title: AngularJS: Exeucting function from controller in a directive
type: Question
accepted answer: http://stackoverflow.com/a/27207237
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42896401
has comment: http://stackoverflow.com/comment/42896446

http://stackoverflow.com/comment/42993358
comment on: http://stackoverflow.com/a/27256409
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/66070/discussion-between-paul-and-user1989).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42822974
type: QuestionComment
score: 0
has text: Now its the correct fiddle
comment on: http://stackoverflow.com/q/27165313
type: Comment

http://stackoverflow.com/q/27193664
has body: I want to calculate the price after a button click. I have 3 buttons which are selectable. For example : button1 = 50$, button2 = 100$, button3 = 200$ Now I want to update the price after a button click. Is there any solution to handle this? Because, If i send the Ajax request and update my html-element the price isn't added. My old price always disappear. So if the user selects button1 the price is 50$, but if the user also selects button2 my price is 100$, not $150. Thanks :)
has title: AJAX, JQuery, calculate price after button click
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42872826
favorite count: 0
has comment: http://stackoverflow.com/comment/42872793
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/27193816
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
tagged with: ajax

http://stackoverflow.com/comment/42999533
has text: if we want to get "better", i would go over if possible; is weak sauce
type: AnswerComment
comment on: http://stackoverflow.com/a/27263651
score: 1
type: Comment

http://stackoverflow.com/q/27281030
tagged with: label
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27282027
has answer: http://stackoverflow.com/a/27281217
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43030973
has title: How to get data from a js alert box into a label
tagged with: alert
has body: I simply want to display the data in the alert box as a label instead. This is what I found and it works fine as an alert box: I have searched for quite some time and have found a wealth of information, none of which I have been able to make work. I tried many snippets and played with many variations of those snippets yet I get either a compilation error or a blank screen. There must be a relatively simple way of doing this, is there not? Any help is greatly appreciated. Bob I appreciate your replies. Awolf and Allesandro, I've been able to use your code in my page and have it display a great deal of information. However, not quite what I was looking for. Epascarello, I was able to click "Run Code Snippet" on the site here and got exactly what I was looking for. BUT, I can't seem to implement on my page. You say it's basic Javascript and it may very well be, but js is not one of my strong suits. In fact I don't even have a JS suit. I am unable to get a page to display what I need using your script, yet I'm sure it's what I need. This, amongst many other variations is what I've tried: And yes I have included this: What have I got in the wrong spot? Thanks Bob
has answer: http://stackoverflow.com/a/27281827
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42862631
type: Comment
has text: could you please show us how `X` and `Y` values getting use for child element in html, so that we can relate the problem easily?
comment on: http://stackoverflow.com/q/27188091
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43041889
comment on: http://stackoverflow.com/a/27286403
score: 0
type: AnswerComment
has text: Hi @Felix , this is the http://jsfiddle.net/ay9wg3o7/ i made , able to read the `theid` but context menu cannot close, did u know where the problem ?
type: Comment

http://stackoverflow.com/a/55681645
has body: Update: February 4, 2019 Google Announced WebSockets support for the App Engine Flexible Environment WebSockets is available to your App Engine Flexible Environment application with no special setup. Take a look at our documentation to learn more: Python | Java | Nodejs. You must add to your app.yaml network: session_affinity: true
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27238010
score: 2
downvote count: 0

http://stackoverflow.com/q/27232969
tagged with: google-chrome
tagged with: navigateurl
type: Question
has answer: http://stackoverflow.com/a/27233356
tagged with: javascript
has comment: http://stackoverflow.com/comment/42942676
score: 0
has comment: http://stackoverflow.com/comment/42942761
answer count: 1
has title: HTML/Javascript simple redirect -works in IE/Opera but not in Chrome/Firefox
has body: I have a HTML page, which just creates a URL to a daily MP3 Can someone please help me, i get it to work in IE and Opera, but not in Chrome and FireFox The page simply does nothing in Chrome/Firefox, whilst it downloads the file in IE/Opera
has comment: http://stackoverflow.com/comment/42942637
tagged with: http-redirect
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/503093
accepted answer: http://stackoverflow.com/a/27233356

http://stackoverflow.com/a/27313729
type: Answer
has body: It is due to your "el" property, the view that u r appending should be inside your el eg: el : "#container" // must set . . . . . . the events will work for all newly appended views
answers question: http://stackoverflow.com/q/27313268
score: 0

http://stackoverflow.com/q/27199825
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: node.js
has body: I was just wondering if anyone has any good ideas about a "ensuring readiness" pattern in Node JS when using promises. I have something like this, but I think the main problem with it is the fact that I think the .then(cb) for a promise actually overwrites the previous one, rather than chaining another handler... function awaitQueueCreation() { if (!q._queueURL) return whenQueueCreated; else return p.resolve(q._queueURL); } q.someQueueMethod = function(param) { awaitQueueCreation().then(function() { // do what this method is supposed to do... }); }; How would you handle this type of thing?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27199898
has title: Promises and ensuring readiness Node JS

http://stackoverflow.com/a/27248300
score: 0
answers question: http://stackoverflow.com/q/27248183
type: Answer
has body: Here is a working example http://jsbin.com/pajecubute/1/edit jQuery $( document ).ready(function() { $( "a" ).click(function( event ) { alert( "The link will no longer take you to jquery.com" ); event.preventDefault(); }); });

http://stackoverflow.com/q/27274023
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43017924
has title: Jquery plugin to work on multiple elements
has comment: http://stackoverflow.com/comment/43017474
has body: I've been developing a simple plugin for jquery, I have managed to get it to work perfectly for singular elements but I can't get it to work for use on more than one element on a page. How do I construct the function to work on multiple elements? Here's my construct, its really basic. (function($){ $.fn.pluginName= function(prop){ var params = $.extend({ // param default set here },prop); // functions added here return this; } })(jQuery); This works fine for a singular use on page but if I wanted to make this work for multiple elements how would I do that? The function is meant to change input fields so would need to work for multiple instances on a page. I tried adding a this.each(function(){ ... }) to wrap around main content but this returned the same result. Any help would be greatly appreciated as I'm not sure where to go with this and other tutorials will make me strip out the entire code and start again. Thanks EDIT I've edited my code, I can not get the function to call through. (function($){ $.fn.colorChange= function(params){ var defaults= { backgroundColor: 'red' }; var params = $.extend(defaults, params); return this.each(function(){ changeColor(); function changeColor(defaults){ $(this).css({ 'background-color' : defaults.backgroundColor }); } }); } })(jQuery); If I don't wrap this in a function and just create it as an anonymous function it works fine. However I intend to have many functions and the code could get a bit sloppy. For some reason this is not working, any help?
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/43018611
tagged with: plugins
has comment: http://stackoverflow.com/comment/43017470
type: Question

http://stackoverflow.com/comment/42957654
has text: @Todd: Yeah, hard to tell. On the one hand, the main snippet given doesn't include jQuery UI. On the other hand, the linked tutorial in the question is for jQuery UI. :-) My guess is like many, many people, they're getting jQuery and jQuery UI confused, which is fair enough.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27240561
type: AnswerComment

http://stackoverflow.com/comment/135719461
type: Comment
score: 0
comment on: http://stackoverflow.com/a/76564559
type: AnswerComment
has text: If you look at my code you'll see that it doesn't simply pump out an "s" at the end of the String if it's plural. It uses a plural parameter value if one is supplied. If not, then it adds an "s" to the single parameter value. So, for all of your examples, you simply use pluralize(count, "fish", "fish"), pluralize(2, "piece of furniture", "pieces of furniture"), etc...

http://stackoverflow.com/a/27239235
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27239046
score: 1
upvote count: 1
has body: 1) Add this line after the click handler: $('.accordion &gt; dt &gt; a').first().trigger('click'); 2) Add this line at the second line of the click handler: if ($(this).parent().next().is(":visible")) return false; So: $('.accordion &gt; dt &gt; a').click(function() { allPanels.slideUp(); if ($(this).parent().next().is(":visible")) return false; $(this).parent().next().slideDown(); return false; }); $('.accordion &gt; dt &gt; a').first().trigger('click'); updated FIDDLE
has comment: http://stackoverflow.com/comment/42955681
has comment: http://stackoverflow.com/comment/42955212
has comment: http://stackoverflow.com/comment/42955336
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27239046

http://stackoverflow.com/comment/43081030
comment on: http://stackoverflow.com/a/27309381
type: Comment
has text: if I don't use the resolve, how can I pass the $stateParams to Page2Ctrl?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43061042
score: 1
comment on: http://stackoverflow.com/q/27297777
type: Comment
type: QuestionComment
has text: something like this http://jsbin.com/zapemulece/1/edit?html,output ?

http://stackoverflow.com/comment/42847618
comment on: http://stackoverflow.com/a/27179245
has text: That's nearly perfect, but you've forgotten to remove and add the active class for the navigation. How can I add it?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27281865
score: 0
accepted answer: http://stackoverflow.com/a/27282321
has body: I'm trying to create a jQuery plugin from jQuery Boilerplate. I also am wanting to create another utility-type plugin separate from this plugin. I've been up and down Google searching for different methods to create one and such. I have run into many different types and I'm unsure where to start, so I turned to StackOverflow in hopes you can help guide me. My goal is to call my plugin (utility method/function) and pass some options and data to it and have it return to me some data whether it's an object, a string or an array, depending on the function called. I'd like to do something like this: &lt;script&gt; var options = {option1: 'value1', option2: 'value2'}; var output = $.myplugin('methodName', options); &lt;/script&gt; However, I want to respect plugin namespace, proper jQuery etiquette, etc.
type: Question
answer count: 2
tagged with: jquery-boilerplate
has title: jQuery Utility Boilerplate
possible better answer: http://stackoverflow.com/a/27282463
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27282463
has comment: http://stackoverflow.com/comment/43032502
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/43032563
has answer: http://stackoverflow.com/a/27282321
has comment: http://stackoverflow.com/comment/43032474
type: AnsweredQuestion

http://stackoverflow.com/q/27248760
possible better answer: http://stackoverflow.com/a/27248842
has body: I'm trying to select the Land so I can show it like {{ selectCenter.land }} but its empty. Can someone see what's wrong? Here is a working plunker http://plnkr.co/edit/Q8jhdJltlh14oBBLeHJ9?p=preview and code ngOption demo Search: You have chosen: {{ selectCenter }} // Code goes here angular.module("myApp", []); angular.module("myApp").controller("SelectCtrl", ["$scope", function ($scope) { $scope.centre = [ {"id":"122","shopID":"200","land":"denmark"}, {"id":"123","shopID":"201","land":"france"}, {"id":"124","shopID":"202","land":"italy"} ]; }]);
tagged with: javascript
has answer: http://stackoverflow.com/a/27248842
has answer: http://stackoverflow.com/a/27249743
type: AnsweredQuestion
tagged with: angularjs
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27249743
has title: Angularjs - get the value to show from a html select

http://stackoverflow.com/comment/43039355
comment on: http://stackoverflow.com/q/27284400
score: 0
type: QuestionComment
has text: It is a plugin I have that lets me do it, chrome-extension://jifpbeccnghkjeaalbbjmodiffmgedin/crxviewer.html?crx=https%3A%2F%2Fclients2.google.com%2Fservice%2Fupdate2%2Fcrx%3Fresponse%3Dredirect%26os%3Dwin%26arch%3Dx86-64%26nacl_arch%3Dx86-64%26prod%3Dchromecrx%26prodchannel%3Dunknown%26prodversion%3D38.0.2125.58%26x%3Did%253Dddjfhkkpgfghimddaekfocbahebohdim%2526uc&zipname=ddjfhkkpgfghimddaekfocbahebohdim.zip
type: Comment

http://stackoverflow.com/comment/42844714
comment on: http://stackoverflow.com/a/27176612
score: 0
type: AnswerComment
type: Comment
has text: ideally I want to integrate the discount in the update price function but i'm not sure how to integrate it without messing up the price I know i have to use the index of part but I'm not sure after that

http://stackoverflow.com/q/27227040
has body: We have a widget in our Magento page which allows us to show some featured products. But what our main goal is, is that we want to change the featured products when an element is clicked, here is what the widget looks like in code: {{widget type="slideshow/slideshow" slideshow_ids="16,17,18,19,20" template="ma2_slideshow/slideshownews.phtml"}} The id's which the widget uses, needs to be changed when an element is clicked. I've already searched and fiddled with some variables but it doesn't work unfortunately... I am also wondering what type of language the widget is... Any more information needed? Any suggestions?
upvote count: 1
type: Question
tagged with: magento
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: click
has title: Change value on element click JavaScript
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/27218841
score: 1
has body: First change: windows.setInterval(reload(), ms); to: windows.setInterval(reload, ms); reload() calls a function and returns a result which is given as an argument to setInterval. And you do not want that because you want to give as an argument reference to a function, not its result.
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27218791
type: Answer

http://stackoverflow.com/comment/42953706
type: QuestionComment
has text: I guess your problem is the performance, you must always parse the complete data on clientside and create all polygons. When you use a FusionTable to store the data you may use a FusionTablesLayer to draw the polygons. Benefits: the parsing of the data will be done on serverside and you don't have performance issues with many polygons, because the polygons will be rendered via tiles(and of course only the tiles for the viewport will be loaded)
score: 1
comment on: http://stackoverflow.com/q/27235456
type: Comment

http://stackoverflow.com/a/27202041
answers question: http://stackoverflow.com/q/27178648
has comment: http://stackoverflow.com/comment/42906015
accepted answer of: http://stackoverflow.com/q/27178648
score: 1
has comment: http://stackoverflow.com/comment/42903013
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42903153
has comment: http://stackoverflow.com/comment/42893977
type: Answer
has body: Funk Doc's suggestion of following this Shopify tutorial is what I would have recommended too. This gist (from the above tutorial) shows how to bind an event handler to the 'change' event on the sort-by dropdown, causing a sort to be triggered whenever the selected value in the dropodown changes: jQuery('#sort-by').bind('change', function() { Shopify.queryParams.sort_by = jQuery(this).val(); location.search = jQuery.param(Shopify.queryParams).replace(/\+/g, '%20'); }); The reason this needs to be done in Javascript is because Liquid is rendered server-side, so this: {% assign sorted_products = collection.products | sort: SELECT_CHOICE_HERE %} ...will have already been rendered before the user gets a chance to select a choice from the dropdown menu. Javascript is needed here to handle user events on the client side.

http://stackoverflow.com/comment/42978766
type: AnswerComment
comment on: http://stackoverflow.com/a/27237351
has text: @RandyHanak not sure to be honest, I've not tried it, but if it's modularity your after Google for "Steve Sanderson Knockout Components Video" it's on vimeo somewhere and he shows you how to carve your components up for reuse in single page applications.
score: 0
type: Comment

http://stackoverflow.com/comment/43252792
comment on: http://stackoverflow.com/a/27302748
type: AnswerComment
has text: hummm, sure, how do I do this?
score: 0
type: Comment

http://stackoverflow.com/a/27270280
type: Answer
has body: This is for anyone referencing the post. The resulting working answer looks like this. Please vote for sanki for this answer. I'm just re-laying the info. html: Reader Publisher client.js Template.authJoinType.events({ 'click div.join-type-inner': function(e, tmpl) { var userType = $(e.target).attr("value"); Session.set('userType', userType); var selectedUserType = Session.get('userType'); console.log(selectedUserType); } });
answers question: http://stackoverflow.com/q/27269234
score: 0

http://stackoverflow.com/q/27223965
tagged with: jquery
has comment: http://stackoverflow.com/comment/42926279
score: 0
has comment: http://stackoverflow.com/comment/42926159
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42926039
has comment: http://stackoverflow.com/comment/42926196
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27224101
has comment: http://stackoverflow.com/comment/42926269
has comment: http://stackoverflow.com/comment/42926085
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/42926150
has answer: http://stackoverflow.com/a/27224160
has answer: http://stackoverflow.com/a/27224080
has comment: http://stackoverflow.com/comment/42926189
type: Question
has title: I can't get the button to target the parent div and parent siblings
has body: I have weak jquery skills and its killing me. Deadline looms. So, I have this html: 1 2 3 4 5 6 7 Using this function $(function() { $(".productbox").click(function() { $(this).toggleClass( "expandthebox", 1500 ), $(".productbox").not(this).removeClass("expandthebox", 1500); return false; }); }); This works great, but the click is on the div rather than on the button within the div. I want the divs to expand just as they do from a click on the button (or pic) inside the div. I have come close to making it work with the click on "button" and $(this).parent.toggleclass but I can't seem to get the "removeClass" to work on the other div's. So tired and cranky now, really hoping someone will help me. Thanks in advance.
has answer: http://stackoverflow.com/a/27224111
tagged with: javascript

http://stackoverflow.com/q/27154287
possible better answer: http://stackoverflow.com/a/27154410
has title: Find first ancestor to be a child of an object with specific class using jQuery
has answer: http://stackoverflow.com/a/27154410
score: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27154332
answer count: 4
type: AnsweredQuestion
has body: I am looking for a correct way to find elements first ancestor to be a child of an element with a specific class. Using XPath notation I'm looking for (if I didn't botch it): ./ancestor::*[../@class='my_class'] I guess I can run a while(...) loop calling parent() until current elements parent has specified class and go from there, but maybe there is some selector/filter/whatever in jQuery that can be used instead?
upvote count: 1
has answer: http://stackoverflow.com/a/27154580
downvote count: 1
accepted answer: http://stackoverflow.com/a/27154332
type: Question
has answer: http://stackoverflow.com/a/27154460
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27297955
has title: Send query to database while closing browser
has comment: http://stackoverflow.com/comment/43062916
has comment: http://stackoverflow.com/comment/43061365
has body: On my website name combiner, I want to send query to database while closing browser i have tried this script but it didn't execute the query in database to change the value of column statue $(window).on("beforeunload", function() { <?php include('config/configuration.php'); $uid=$_GET['id_p']; $statue_pharmacie = mysql_query('update pharmacies set statue=0 where id="'.$uid.'"'); ?> return inFormOrLink ? "Do you really want to close?" : null; });
has answer: http://stackoverflow.com/a/27299524
has comment: http://stackoverflow.com/comment/43060430
has comment: http://stackoverflow.com/comment/43060789
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27299524
type: Question
has comment: http://stackoverflow.com/comment/43060260
has comment: http://stackoverflow.com/comment/43060297
tagged with: javascript
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

regex
tags question: http://stackoverflow.com/q/27158120
tags question: http://stackoverflow.com/q/27300470
tags question: http://stackoverflow.com/q/27242136
tags question: http://stackoverflow.com/q/27215466
tags question: http://stackoverflow.com/q/27262892
tags question: http://stackoverflow.com/q/27185072
tags question: http://stackoverflow.com/q/27272029
tags question: http://stackoverflow.com/q/27176502
tags question: http://stackoverflow.com/q/27179434
tags question: http://stackoverflow.com/q/27248828
tags question: http://stackoverflow.com/q/27252880
tags question: http://stackoverflow.com/q/27297625
tags question: http://stackoverflow.com/q/27277819
tags question: http://stackoverflow.com/q/27231410
tags question: http://stackoverflow.com/q/27238375
tags question: http://stackoverflow.com/q/27184795
tag name: regex
tags question: http://stackoverflow.com/q/27197398
tags question: http://stackoverflow.com/q/27309587
tags question: http://stackoverflow.com/q/27168475
tags question: http://stackoverflow.com/q/27275214
tags question: http://stackoverflow.com/q/27166579
tags question: http://stackoverflow.com/q/27156362
tags question: http://stackoverflow.com/q/27272075
tags question: http://stackoverflow.com/q/27178382
tags question: http://stackoverflow.com/q/27167717
tags question: http://stackoverflow.com/q/27163308
tags question: http://stackoverflow.com/q/27256555
tags question: http://stackoverflow.com/q/27269502
tags question: http://stackoverflow.com/q/27269287
tags question: http://stackoverflow.com/q/27269766
tags question: http://stackoverflow.com/q/27162952
tags question: http://stackoverflow.com/q/27181637
tags question: http://stackoverflow.com/q/27227658
tags question: http://stackoverflow.com/q/27158885
tags question: http://stackoverflow.com/q/27174565
tags question: http://stackoverflow.com/q/27312511
tags question: http://stackoverflow.com/q/27225554
tags question: http://stackoverflow.com/q/27223036
tags question: http://stackoverflow.com/q/27164012
tags question: http://stackoverflow.com/q/27186174
tags question: http://stackoverflow.com/q/27180905
tags question: http://stackoverflow.com/q/27200212
tags question: http://stackoverflow.com/q/27201382
tags question: http://stackoverflow.com/q/27287204
tags question: http://stackoverflow.com/q/27182889
tags question: http://stackoverflow.com/q/27232447
tags question: http://stackoverflow.com/q/27266320
tags question: http://stackoverflow.com/q/27289981
tags question: http://stackoverflow.com/q/27258529
tags question: http://stackoverflow.com/q/27158329
tags question: http://stackoverflow.com/q/27153578
tags question: http://stackoverflow.com/q/27250706
tags question: http://stackoverflow.com/q/27161597
tags question: http://stackoverflow.com/q/27222709
tags question: http://stackoverflow.com/q/27222640
tags question: http://stackoverflow.com/q/27271020
tags question: http://stackoverflow.com/q/27292190
tags question: http://stackoverflow.com/q/27281854
tags question: http://stackoverflow.com/q/27217861
tags question: http://stackoverflow.com/q/27278462
tags question: http://stackoverflow.com/q/27246813
tags question: http://stackoverflow.com/q/27184248
tags question: http://stackoverflow.com/q/27308612
tags question: http://stackoverflow.com/q/27208537
tags question: http://stackoverflow.com/q/27156449
tags question: http://stackoverflow.com/q/27190304
tags question: http://stackoverflow.com/q/27200660
tags question: http://stackoverflow.com/q/27225279
tags question: http://stackoverflow.com/q/27307910
tags question: http://stackoverflow.com/q/27289813
tags question: http://stackoverflow.com/q/27246754
tags question: http://stackoverflow.com/q/27170561
tags question: http://stackoverflow.com/q/27170481
tags question: http://stackoverflow.com/q/27160709
tags question: http://stackoverflow.com/q/27165569
tags question: http://stackoverflow.com/q/27235982
tags question: http://stackoverflow.com/q/27196475
tags question: http://stackoverflow.com/q/27228780
tags question: http://stackoverflow.com/q/27265515

http://stackoverflow.com/q/27195099
type: Question
tagged with: javascript
tagged with: jquery
has title: recursive function using jquery each variable value not updating
score: 0
has body: I've HTML in following format: WZ_VS_Test_Top WZ_VS_Test_Top.First WZ_VS_Test_Top.First.1 {{Drop Here}} WZ_VS_Test_Top.First.2 {{Drop Here}} WZ_VS_Test_Top.Second WZ_VS_Test_Top.Second.1 {{Drop Here}} WZ_VS_Test_Top.Second.2 {{Drop Here}} And I'm running a javascript recursive loop to get a ||| separates string of itemid---parentid---order like following: var getNewOrderForItemAndDescendents = function(selector) { var sNewOrder = ""; var nOrder = 1; $(selector).find('>ul.sortable').each(function(index, obj) { sNewOrder += "|||" + $(this).attr('itemid') + "---" + ($(this).parents('ul.sortable:first').length > 0 ? $(this).parents('ul.sortable:first').attr('itemid') : 'NULL') + "---" + nOrder++; $(this).find('> li').each(function() { sNewOrder += getNewOrderForItemAndDescendents($(this)); }); }); return sNewOrder; } And calling it like var result = getNewOrderForItemAndDescendents($('.containerForReordering')); ERRPR Its returning result like (notice last number 1 before every separator |||): |||WZ_VS_Test_msgSection---NULL---1||| WZ_VS_Test_Top---WZ_VS_Test_msgSection---1||| WZ_VS_Test_Top.First---WZ_VS_Test_Top---1||| WZ_VS_Test_Top.First.1---WZ_VS_Test_Top.First---1||| WZ_VS_Test_Top.First.2---WZ_VS_Test_Top.First---1||| WZ_VS_Test_Top.Second---WZ_VS_Test_Top---1||| WZ_VS_Test_Top.Second.1---WZ_VS_Test_Top.Second---1||| WZ_VS_Test_Top.Second.2---WZ_VS_Test_Top---1 So basically while it would honor the local copy sNewOrder (in recursive context) of function but nOrder variable is not incrementing from jquery each loop and it always stays at 1. What am I doing wrong?? PS: I tried using index of each(), it always comes as zero even on second element!!! Very weird issue indeed. PS2: Did a minor change in JS, now no longer supplying order to function call, it was redundant any ways. At every level number should start with 1 but for siblings it would be 2, 3, 4...
has answer: http://stackoverflow.com/a/27195941
answer count: 1
type: UnansweredQuestion
tagged with: recursion

http://stackoverflow.com/a/27155305
has body: For this you are better off using the tooltip.formatter. This gives you much more control over every aspect of the layout. Sample: tooltip: { crosshairs: true, useHTML: true, backgroundColor: '#eee', borderColor: '#000000', borderRadius: 0, formatter: function () { return ' ' + this.series.name + ' ' + '' + this.y + ' (' + this.x + ') '; } },
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27153016
type: Answer
accepted answer of: http://stackoverflow.com/q/27153016

http://stackoverflow.com/comment/42898758
type: QuestionComment
score: 1
has text: worked for me to copy from Firefox to Notepad++ - actually with 2 newlines, not just 1..
comment on: http://stackoverflow.com/q/27208403
type: Comment

http://stackoverflow.com/q/27189584
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/19504368
has title: Multiple http Requests AngularJS
has comment: http://stackoverflow.com/comment/42865780
duplicate of: http://stackoverflow.com/q/19504368
tagged with: rest
tagged with: angularjs
tagged with: angular-promise
has body: I consume a RESTful Service in Multiple Steps. First I send a GET Request and receive a List of URIs, which I then follow in a for-each Loop to make my second REST Call. var deferred = $q.defer(); var results = []; APICall.getAllObjects(id).then(function(data){ angular.forEach(data.data, function( value, key){ APICall.getIndiviualObject(value).then(function(result) { results.push(result); //put Indiviual Objects in Array deferred.resolve({objects: result}); }); }); }); return deferred.promise; Unfortunately this only returns a Single Element, even when there are multiple Objects returned. I have no Idea how to resolve this - Granted Promises are relatively new for me... Any Ideas on how to make this a proper Asynchronous Call?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27190117
type: Question
has answer: http://stackoverflow.com/a/27189850
tagged with: javascript

http://stackoverflow.com/comment/42942606
has text: Thank you very much. It worked really the way I wanted it.. could you please explain the way you did it?
type: Comment
comment on: http://stackoverflow.com/a/27232792
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43073408
has text: If `$` is undefined in *option 2* means that you are actually loading it as an `iframe` (!?). Could you try in *option 2* to force `iframe` to `false`?
score: 0
comment on: http://stackoverflow.com/a/27301002
type: Comment
type: AnswerComment

http://stackoverflow.com/q/27204104
tagged with: object
has answer: http://stackoverflow.com/a/27204123
tagged with: javascript
has comment: http://stackoverflow.com/comment/42890938
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I am trying to override .name property of constructor b. But it is not working. Whats wrong with code. function b(){ this.name="johnson" } b.prototype.name="david" var a= new b() alert(a.name)
downvote count: 4
upvote count: 0
score: -4
has title: Override object property using prototype
has comment: http://stackoverflow.com/comment/42890903
type: Question

http://stackoverflow.com/comment/43042064
type: QuestionComment
comment on: http://stackoverflow.com/q/27287549
has text: the style same which has been given to the first textbox, right ?
score: 0
type: Comment

http://stackoverflow.com/q/27300241
score: 0
answer count: 1
tagged with: javascript
has body: I need help to know how to update value cookie "currenttime" using javascript. I want to set current time of displaying movie. I use videojs (http://www.videojs.com/) and there is a function to get current time, which looks like this: var whereYouAt = myPlayer.currentTime(); But I don't know how to set this value to cookie. I try this: videojs("video1").ready(function(){ var myPlayer = this; function setCookie(cvalue) { document.cookie = "cookiessss" + "=" + cvalue; } var whereYouAt = myPlayer.currentTime(); setCookie(whereYouAt); }); But it doesn't change value of cookie during playing movie.
type: UnansweredQuestion
has title: Set cookie "currenttime" using javascript
has answer: http://stackoverflow.com/a/27335183
type: Question
tagged with: video
tagged with: cookies

http://stackoverflow.com/comment/42835051
type: AnswerComment
comment on: http://stackoverflow.com/a/27165561
type: Comment
has text: `XMLHttpRequest` is actually the native way in JavaScript to make an AJAX call, it is what jQuery uses for the $.ajax function.
score: 0

http://stackoverflow.com/q/27266046
has body: I am trying to append my Kendo Grid toolbar after some functions using following:: 1) I am getting the toolbar as:: var toolbar = $("#Grid").find(".k-grid-toolbar").html(); 2) then after some changes to Grid using grid.setOptions(JSON.parse(options)) which causes disappear of Toolbar i am again appending toolbar to grid as:: $("#Grid").find(".k-grid-toolbar").html(toolbar); Here toolbar is appended properly but I am not able to use those functions(i.e. Dropdown inside of toolbar). How can i get my toolbar Dropdown working? Thanks in advance
tagged with: telerik
upvote count: 1
tagged with: grid
has comment: http://stackoverflow.com/comment/43018553
score: 1
has comment: http://stackoverflow.com/comment/43043249
has comment: http://stackoverflow.com/comment/43037639
has answer: http://stackoverflow.com/a/27296162
type: Question
downvote count: 0
answer count: 1
has title: Kendo toolbar append is not working
tagged with: javascript
tagged with: kendo-ui
has comment: http://stackoverflow.com/comment/43041968
favorite count: 0
has comment: http://stackoverflow.com/comment/43041517
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43231449

http://stackoverflow.com/comment/42946502
comment on: http://stackoverflow.com/q/27234643
score: 0
type: Comment
type: QuestionComment
has text: For instance, I select **a**,**b** and **c**. Then I unselect **b** and paxlist will remain with `[a, b]` instead of `[a,c]`

http://stackoverflow.com/a/27251957
has body: A basic CSS for making your circle pulsate (decrease milliseconds at will, but I suggest to not make it blink, it's visually a bit ugly IMO) would be : #circle{ height:2rem; width:2rem; border-radius: 4rem; opacity: 0.0; -webkit-animation: pulsate 1000ms ease-out; -webkit-animation-iteration-count: infinite; -webkit-transition: background-color 300ms linear; -moz-transition: background-color 300ms linear; -o-transition: background-color 300ms linear; -ms-transition: background-color 300ms linear; transition: background-color 300ms linear; } @-webkit-keyframes pulsate { 0% {opacity: 0.1;} 40% {opacity: 1.0;} 60% {opacity: 1.0;} 100% {opacity: 0.1;} } Here's a JSFiddle : http://jsfiddle.net/bonatoc/7b0a45hq/27/ Now you need to put your REST logic (basically the PHP code you already have, but it would be better to use a function that returns the name of the class (named same as CSS), and you would use it with addClass/removeClass as shown in the fiddle). Instead of JQuery's .click(), you would use JQuery's ajax, like the offical example shows : $.ajax({ url: "test.html", context: document.body }).done(function() { $( this ).addClass( "done" ); });
type: Answer
answers question: http://stackoverflow.com/q/27251236
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/43008753
accepted answer of: http://stackoverflow.com/q/27251236
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42979114
downvote count: 0

http://stackoverflow.com/a/27267093
accepted answer of: http://stackoverflow.com/q/27267022
answers question: http://stackoverflow.com/q/27267022
downvote count: 0
upvote count: 3
type: AcceptedAnswer
has body: This is a guess, but the error handler may need to emit an event: var onError = function ( err ) { gutil.log( gutil.colors.green( err.message ) ); this.emit( 'end' ); }; Stolen from my own gulp.js which handles browserified in the same way.
type: Answer
score: 3

http://stackoverflow.com/q/27295420
has title: Prevent default for controller and directive on the same page
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27303172
tagged with: angularjs
type: Question
has body: I have the table with two click actions – first one is click on a whole row responsible for opening feedback, second one is click on name which add the item to the team. {{d.name}} {{d.age}} {{d.grade}} {{d.job}} {{f}} Currently click on a whole row open feedback section as well. I would like to prevent this and looking for solution as we have similar in directive case: mainApp.directive("addNewTeamMember", ['teamSharedObj', function (teamSharedObj) { return { restrict: 'A', link: function( scope, element, attrs ) { element.bind('click', function(e) { e.preventDefault(); console.log(scope.teamMemberName) scope.$apply(function() { if (typeof teamSharedObj.selected == 'undefined') { alert("No team. Please select team."); return; } var result = []; var asObject = JSON.parse(attrs.value); result.push(asObject); teamSharedObj.addTeamMembers(teamSharedObj.selected, result); }); }); // element.on('click', function(e){ // e.preventDefault(); // }); } } }]) I try different cases but nothing works. The most popular advice is to use an event to prevent others action hits: $scope.clicked = function(what, event) { alert(what + ' clicked'); if(event){ event.stopPropagation(); event.preventDefault(); } } My controller is: mainApp.controller("feedbackCtrl", [ '$scope', 'teamSharedObj', function($scope, teamSharedObj) { // control visibility state $scope.state = 'off'; $scope.selected = "undefined"; $scope.isOpen = function(employee) { return $scope.state === "on" && $scope.selected === employee; } // handle click on item $scope.onItemClick = function(employee, event) { event.stopPropagation(); event.preventDefault(); $scope.state = ($scope.state === 'on' ? 'off' : 'on'); $scope.selected = employee; } // open appropriate feedback container $scope.getFeedback = function(employee) { var result = teamSharedObj.feedback[employee] ? teamSharedObj.feedback[employee] : " No values "; return result ; } $scope.submitNewFeedback = function(employee, feedback) { teamSharedObj.addFeedback(emplo…
accepted answer: http://stackoverflow.com/a/27303172
score: 0
answer count: 1

http://stackoverflow.com/q/27233856
has body: I am trying to add a L.Control element to my leaflet map. However once I added the element to my map, I noticed that its not clickable. I would like to display a form inside this L.Control element, however I cant select any elements from my drop down menus, since the clicks always go through to the map. Here a JSfiddle: http://jsfiddle.net/fd3dnnc1/1/ as well as my JS code: var map = L.map('map').setView([0.27, 37.66], 6); // add an OpenStreetMap tile layer L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '&amp;copy; &lt;a href="http://osm.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors' }).addTo(map); var mainMenu = L.Control.extend({ options: {position: 'topright'}, onAdd : function (map) { this._div = L.DomUtil.create('div', 'mainMenu'); this._div.innerHTML = '&lt;h3&gt;Main Menu&lt;/h3&gt;'; this._div.innerHTML += '&lt;h4&gt;Data:&lt;/h4&gt; MODIS NDVI &lt;h4&gt;AOI:&lt;/h4&gt; Kenya, Africa &lt;br&gt;&lt;br&gt;' this._div.innerHTML += '&lt;h4&gt;Indicator:&lt;/h4&gt;' this._div.innerHTML += '&lt;form&gt;&lt;form id="form" class="form" action="" method="POST"&gt;' + '&lt;select name="indicator"&gt;&lt;option value="NDVI_ABS"&gt;NDVI&lt;br&gt;' + '&lt;option value="NDVI_VCI"&gt;VCI&lt;br&gt;' + '&lt;option value="RAIN_ABS"&gt;Precipitation&lt;br&gt;' + '&lt;/select&gt;'; this._div.innerHTML += '&lt;input type="submit" value="Refresh Map" name="submit"&gt;&lt;/form&gt;'; return this._div; }, }); map.addControl(new mainMenu()); Any suggestions on how to make it clickable?
type: Question
has title: Clickable L.control on leaflet
tagged with: javascript
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/27240083
has answer: http://stackoverflow.com/a/27240083
favorite count: 0
accepted answer: http://stackoverflow.com/a/27238541
type: AnsweredQuestion
tagged with: leaflet
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27238464
has answer: http://stackoverflow.com/a/27238541

http://stackoverflow.com/comment/42974999
comment on: http://stackoverflow.com/a/27249421
type: AnswerComment
score: 0
has text: Thanks for reply, but i am doing same thing its not working i forgot to add $scope here but in my code i already added. Can you give me some suggestion.
type: Comment

http://stackoverflow.com/a/27292577
has body: DO you have a color plugin? You can't animate background color without it. You can find one here: https://github.com/jquery/jquery-color
score: -1
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27292508
downvote count: 1

http://stackoverflow.com/comment/42977514
has text: In this case you need to tell the hexbin layout about the scaling you're using and not apply it externally: http://jsfiddle.net/k02chcch/1/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27250799

http://stackoverflow.com/comment/101455315
has text: It is working with only one pseudo element like .one:before but not working for 2 pseudo elements like .one:hover:before. For ex. it works for $(this).setPseudo(":after", "content", "'123'"); but same code not working for $(this).setPseudo(":hover:after", "content", "'123'");
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27255808

http://stackoverflow.com/comment/43046586
type: AnswerComment
has text: Did you try to echo in plain php file those variables?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27266786

http://stackoverflow.com/q/27193817
type: Question
has answer: http://stackoverflow.com/a/27193984
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27193984
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
tagged with: angularjs-ng-options
upvote count: 1
has title: Angular.js: HTML select element with ng-options of object-properties
type: AnsweredQuestion
score: 1
tagged with: select
has body: I'm building my first AngularJS app and I really like the concepts I saw so far. Right now I have the following data structur I would like to bring into the view as a select HTML element: var objs = { "A1": 12234, "A2": 2354, "A3": 2323434 } I tried to bind the data structure objs to a select drop down as follows: -- This results in: A1 A2 A3 ..but I expect: A1 A2 A3 Switching to doesn't work.. Does anyone has an idea what my fault is? I try to avoid to do it with ng-repeat..

http://stackoverflow.com/comment/42869908
comment on: http://stackoverflow.com/q/27192043
score: 0
type: Comment
type: QuestionComment
has text: I would contend that that comment is inaccurate. Passing the `arguments` object out of a function to another function (including this one) is not a good idea for performance reasons.

http://stackoverflow.com/comment/42899914
comment on: http://stackoverflow.com/a/27208513
type: Comment
score: 1
has text: My code solves the problem of hiding showing HTML tags having an id or similar class, solving the problem asked in your question. Your update deals with a totally different problem. So I am confused, as I do not really understand what you want to do. If it is hiding/showing things in Javascript, then my code should solve the problem. If force hovering, then it is a different issue. Hover is a UI event and if you do not want to do anything extreme, then you can add/remove a class. If you want to do something extreme, you can implement a separate function and call it whenever you want hover.
type: AnswerComment

xpath
tags question: http://stackoverflow.com/q/27269502
tag name: xpath
tags question: http://stackoverflow.com/q/27308612
tags question: http://stackoverflow.com/q/27260583
type: Tag

http://stackoverflow.com/a/27298013
upvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/43060351
answers question: http://stackoverflow.com/q/27297824
type: Answer
has body: You could create it using CSS. You'll want to use all of the browser extension calls to ensure cross-platform consistency. To create a radial gradient you must also define at least two color stops. Example of Radial Gradient: Radial Gradient Syntax background: radial-gradient(shape size at position, start-color, ..., last-color); By default, shape is ellipse, size is farthest-corner, and position is center. Radial Gradient - Evenly Spaced Color Stops (this is default) Example A radial gradient with evenly spaced color stops: #grad { background: -webkit-radial-gradient(red, green, blue); /* Safari 5.1 to 6.0 */ background: -o-radial-gradient(red, green, blue); /* For Opera 11.6 to 12.0 */ background: -moz-radial-gradient(red, green, blue); /* For Firefox 3.6 to 15 */ background: radial-gradient(red, green, blue); /* Standard syntax */ }
downvote count: 2

http://stackoverflow.com/q/27168580
tagged with: jquery-mobile
tagged with: javascript
score: -1
answer count: 2
downvote count: 1
linked to: http://stackoverflow.com/q/27165641
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to create and open a dialogue box dynamically and automatically on page load in jquery mobile page but not able to do it ..I think i am missing some thing but not able to get what .. Here is my jquery code and function that is called on pageload.. function onLoad() { openDialogBox1(); document.addEventListener("deviceready", onDeviceReady, false); $("#searchby_chooser_ok_button").bind ("click", searchByCriteria); if (typeof Contact === "undefined") { getElement("contacts_list").innerHTML = " The Cordova Contacts API is inaccessible "; } } function openDialogBox1(){ $("#simplestring").simpledialog({ 'mode' : 'string', 'prompt' : 'Please Enter Your Mobile No.', 'buttons' : { 'OK': { click: function () { $('#dialogoutput').text($('#dialoglink').attr('data-string')); } }, 'Cancel': { click: function () { }, icon: "delete", theme: "c" } } }) } Please help me to correct my mistake ..Thanks..
has answer: http://stackoverflow.com/a/27169167
upvote count: 0
has title: How to create and Open a dialogue Box Dynamically on page load
type: Question
duplicate of: http://stackoverflow.com/q/27165641
has answer: http://stackoverflow.com/a/27168629

http://stackoverflow.com/q/27154197
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
has title: Smooth transition between two videos
has answer: http://stackoverflow.com/a/27154424
downvote count: 0
type: Question
tagged with: javascript
score: 4
answer count: 1
tagged with: jquery
favorite count: 0
has body: Supposed to happen I have two video elements. The first one should run for 6 seconds and then fadeOut and start the second video that will also run from 0 to 6 seconds. After the 6 seconds have passed, it should fadeOut and the first one should fadeIn and run again. The idea is that I want that transisition to be sort of a neat fade instead of an abrupt jump. This loop needs to go on until the user stop it. For now, my only concern is to reproduce the loop and the fade. I have A piece of HTML and JavaScript. My HTML mark up simply contains two video elements within a container: HTML: &lt;div id="container" style="height: 230px; position: relative;"&gt; &lt;video id="video1" style="position: absolute; top: 0; left: 0;display: none; width: 450px; height: 450px;"&gt; &lt;source src="mysource.mp4" type="video/mp4"&gt; &lt;/video&gt; &lt;video id="video2" style="position: absolute; top: 0; left: 0; display: none; width: 450px; height: 450px;"&gt; &lt;source src="mysource.mp4" type="video/mp4"&gt; &lt;/video&gt; &lt;div id="container" style="height: 230px; position: relative;"&gt; JavaScript: var toggleTo = 2; function startVideo(vid){ var startTime = 0; var endTime = 8; var video = $('#video'+ vid).get(0); var video2 = $('#video'+ toggleTo).get(0); video.addEventListener('timeupdate', function(){ console.log('vid1: '+ parseInt(this.currentTime,10)); if(parseInt(this.currentTime,10) &gt;= parseInt(endTime - 2)){ video2.play(); $('#video'+ toggleTo).fadeIn(1000); $('#video'+ vid).fadeOut(2000); } if(this.currentTime &gt;= endTime){ video.pause(); } },false); video2.addEventListener('timeupdate', function(){ console.log('vid2: '+ parseInt(this.currentTime,10)); if(parseInt(this.currentTime,10) &gt;= parseInt(endTime - 2)){ $('#video'+ vid).fadeIn(1000); $('#video'+ toggleTo).fadeOut(2000); video.currentTime = 0; video.play(); } if(this.currentTime &gt;= endTime){ video2.pause(); } },false); video.currentTime = 0; video.play(); } This happens Video is starting fine and goes …
type: UnansweredQuestion

http://stackoverflow.com/q/27198976
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42882325
has comment: http://stackoverflow.com/comment/42882291
linked to: http://stackoverflow.com/q/4841373
answer count: 2
linked to: http://stackoverflow.com/q/18614374
downvote count: 1
favorite count: 0
duplicate of: http://stackoverflow.com/q/18614374
possible better answer: http://stackoverflow.com/a/27199056
has answer: http://stackoverflow.com/a/27199049
accepted answer: http://stackoverflow.com/a/27199049
has comment: http://stackoverflow.com/comment/42883264
has answer: http://stackoverflow.com/a/27199056
linked to: http://stackoverflow.com/q/8377410
type: AnsweredQuestion
upvote count: 0
has body: I am trying to create an html form that makes calculations based off of user input. This is the code I have right now: Ingredient Name Amount (in Mg) % Carrier Total Carrier Volume Total Ingredient Volume Mg % Calculate Final Volume With the following javascript: You can also see it here: www.healthkismet.com/supplement_pricer.html Right now the line: document.getElementById("d").innerHTML = volume + x evaluates to string + x, but I am not sure why. If I do calculations with just x then everything is okay. I think the way I'm storing the variables 'volume' and 'carrier' is the root cause but I don't know why. (and the 'x' variable is computed as an integer because it's already been divided and multiplied). I've looked at this answer on stackexchange: Addition is not working in JavaScript and understand how to hack around it. I've also seen this answer: take user input from a Form perform calculation (order of operations) and output back into that form but if I just typed that example in verbatim I wouldn't know exactly why my code doesn't work right now as it is.
has comment: http://stackoverflow.com/comment/42883262
type: Question
has comment: http://stackoverflow.com/comment/42882303
has title: Javascript storing a value as a string
linked to: http://stackoverflow.com/q/12306784

http://stackoverflow.com/q/27161908
has comment: http://stackoverflow.com/comment/42817312
downvote count: 0
has answer: http://stackoverflow.com/a/27161993
favorite count: 0
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27161950
tagged with: css
has title: what is the (extra) padding/margin of the first element after placing multiple number of elements next to each other using jQuery
has answer: http://stackoverflow.com/a/27161950
score: 2
type: AnsweredQuestion
has body: The first element appears to have extra spacing on its right which I cant figure out where it is coming from. Can someone help me? Here is the code I used: http://jsfiddle.net/srabeat/tenx4y1c/1/ for (i = 0; i < 30; i++) { $(".box").append(' '); } .box { background-color: #ddd; width: 200px; height: 200px; border: 1px solid #fff; } .x { color: #444; margin: 10px; height:10px; width: 10px; background-color: #444; display: inline-block; -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); }
accepted answer: http://stackoverflow.com/a/27161993
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42817299

http://stackoverflow.com/q/27199577
downvote count: 5
score: -4
has answer: http://stackoverflow.com/a/27199795
accepted answer: http://stackoverflow.com/a/27199795
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42883169
has body: html and javascript work properly there as you can see. but when I add this to a htmlbox in google sites, it shows an error saying "1+1: URI unknown:///unknown is malformed" Help me, thanks Here's my html and javascript [1]: http://jsfiddle.net/TvHdU/4/
type: Question
answer count: 1
tagged with: javascript
favorite count: 0
has title: How to include javascript with HTML in google sites?
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: google-sites
has comment: http://stackoverflow.com/comment/54357871

http://stackoverflow.com/a/27180041
accepted answer of: http://stackoverflow.com/q/27177026
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27177026
has body: The following code uses a brute-force approach. It generates every permutation of every combination of the desired length. Permutations are checked against a dictionary to avoid repeating them in the result. function makePermutations(data, length) { var current = new Array(length), used = new Array(length), seen = {}, result = []; function permute(pos) { if (pos == length) { // Do we have a complete combination? if (!seen[current]) { // Check whether we've seen it before. seen[current] = true; // If not, save it. result.push(current.slice()); } return; } for (var i = 0; i &lt; data.length; ++i) { if (!used[i]) { // Have we used this element before? used[i] = true; // If not, insert it and recurse. current[pos] = data[i]; permute(pos+1); used[i] = false; // Reset after the recursive call. } } } permute(0); return result; } var permutations = makePermutations(['a', 'a', 'b', 'b'], 3); for (var i = 0; i &lt; permutations.length; ++i) { document.write('['+permutations[i].join(', ')+']&lt;br /&gt;'); }
has comment: http://stackoverflow.com/comment/42849013
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43064811
type: Comment
comment on: http://stackoverflow.com/a/27296993
type: AnswerComment
has text: @SimenMangseth classes are not useful if you have more than 3 slides
score: 0

http://stackoverflow.com/comment/43031567
type: Comment
type: QuestionComment
has text: Really can't figure out why jsFiddle won't work for my mess but feel free to look at the actual site: [wordExplorer link](http://www.camelliakalra.com/499/portal/games/wordexplorer/)
comment on: http://stackoverflow.com/q/27280258
score: 0

http://stackoverflow.com/comment/42896104
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27207018
has text: Yeah, that's the object I'm concerned about. What I'm wondering is whether I can still use that same name *despite* the built-in object. (In Node, you can.)
type: AnswerComment

http://stackoverflow.com/q/27218054
has title: Scroll to next when pressing 'j'
has body: I think you all have seen this feature on facebook. When you press j, the scroll position jumps to the next story and when you press k it scrolls to the previous story. Now, if I have a lot of divs with the class .story (In the snippet they all have the same height; but, actually, they'll be different), how can I navigate through them (scroll to the next and previous .story) by pressing j and k like on facebook? body{ background-color:#ecf0f1; } .story { background-color: #fff; border-radius: 5px; height: 500px; margin: 20px auto; width: 70%; }
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27218186
type: Question
upvote count: 4
answer count: 2
possible better answer: http://stackoverflow.com/a/27218381
has answer: http://stackoverflow.com/a/27218381
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/42915682
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27218186
favorite count: 0
has comment: http://stackoverflow.com/comment/42915647

mapbox
tags question: http://stackoverflow.com/q/27207390
tags question: http://stackoverflow.com/q/27294383
type: Tag
tag name: mapbox

http://stackoverflow.com/comment/42832303
type: Comment
type: QuestionComment
has text: Use spans instead of paragraphs if you want it on the same line
comment on: http://stackoverflow.com/q/27170810
score: 1

http://stackoverflow.com/comment/42857061
has text: I'm wondering if the click is getting eaten by the `a` tag, can you try replacing it with `div` or something?
score: 0
comment on: http://stackoverflow.com/q/27184412
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42872516
has text: (Meaning they go from 0-11 not 1-12) That's so they can be easily cross-referenced with an array of month names to be more language independent.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27193334

http://stackoverflow.com/q/27218922
answer count: 2
linked to: http://stackoverflow.com/q/45962081
has comment: http://stackoverflow.com/comment/42928384
tagged with: css
possible better answer: http://stackoverflow.com/a/76520433
has answer: http://stackoverflow.com/a/76520433
linked to: http://stackoverflow.com/q/66428258
linked to: http://stackoverflow.com/q/46706847
tagged with: cursor
has answer: http://stackoverflow.com/a/34135863
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/34135863
has comment: http://stackoverflow.com/comment/42917114
has comment: http://stackoverflow.com/comment/42917272
linked to: http://stackoverflow.com/q/18551277
score: 2
type: AnsweredQuestion
has title: javascript selecting a custom cursor (svg)
downvote count: 0
has body: I'm dynamically changing a cursor to a local svg on hover with $(element).on('mouseover', function () { $(this).css('cursor', 'url(svgs/pointer.svg) 9 30 auto'); }; Thats working fine but I'd like to select that svg to manipulate its fill color. Is there any way to do this so I don't have to make a bunch of different svgs with different fills? Thanks
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: Question
upvote count: 2

http://stackoverflow.com/comment/42876971
score: 0
has text: JavaScript can't open modals in all browsers.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27195976

http://stackoverflow.com/a/27168627
has body: Try this : var date1 = new Date("11/28/2014"); var date2 = new Date("11/27/2014"); var date_difference=parseInt((date1-date2)/(24*3600*1000)); alert(date_difference); Hope it helps!
answers question: http://stackoverflow.com/q/27168424
type: Answer
score: 0

http://stackoverflow.com/a/27232336
has body: When you are outputting the {{block...}} declaration you are doing it in the content of the page, what you want to do is use the XML layout to insert your menu into the "left" block a.k.a the left sidebar In Design > Page Layout > Layout choose 2 column left sidebar, then paste this block in the XML section (remove the unnecessary links if you want): account customer/account/ Account Dashboard account_edit customer/account/edit/ Account Information address_book customer/address/ Address Book downloadable_products downloadable/customer/products My Downloadable Products newsletter newsletter/manage/ Newsletter Subscriptions OAuth Customer Tokens oauth/customer_token My Applications reviews review/customer My Product Reviews orders sales/order/history/ My Orders tags tag/customer/ My Tags wishlist wishlist/ My Wishlist This answer is a partial reference to this post with a bit of research by me on the extra blocks by magento There are also limitations of this implementation as you cannot make this page secure. As far as I know you will need to create a custom module for that, this article by @AlanStorm should help you out
has comment: http://stackoverflow.com/comment/43004642
score: 0
answers question: http://stackoverflow.com/q/27230913
type: Answer

http://stackoverflow.com/q/27217072
linked to: http://stackoverflow.com/q/23803743
has body: I'm using $.ajax for many requests each one has a different settings and values passed to the function. I need to check whether these settings are merged correctly into $.ajax settings. var options = { endpoint: '/path/page' method : "POST", mode: 'abort', data : { value : $(this).val() }, headers : { 'X-Key' : 'value' } } $.ajax( $.extend(true, { url: endpoint, type: 'GET', cache: true, dataType: 'json', contentType: 'application/x-www-form-urlencoded; charset=UTF-8', headers : { 'X-Same-Domain':'1', }, async: true, data: data, timeout: 5000, }, options) ) How can I see in console those settings used by $.ajax request on success or failure?
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/56189395
type: Question
has answer: http://stackoverflow.com/a/27217299
accepted answer: http://stackoverflow.com/a/27217299
has title: Get settings used by jquery $.ajax request
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 2
answer count: 3
possible better answer: http://stackoverflow.com/a/56189395
has answer: http://stackoverflow.com/a/27217342
favorite count: 0

http://stackoverflow.com/comment/42839844
has text: What does `console.dir(req.headers['content-type'])` show if you put that before your `var post = new Post({`? Also, what body parsing middleware are you using before that route?
score: 0
comment on: http://stackoverflow.com/q/27173043
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42986891
type: AnswerComment
has text: One thing I notice now though is that I can't stringify an instance of User. It ends up being {} without any of the properties or values. Why is that?
type: Comment
comment on: http://stackoverflow.com/a/27178953
score: 0

http://stackoverflow.com/comment/42893412
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27205362
has text: what is wrong with my script??? or is it possible that i can use a conditional statement here? because the answer in the text box won't changed even though i have chosen a different option in the drop down menu.

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/27206462
tags question: http://stackoverflow.com/q/27223096
type: Tag

http://stackoverflow.com/a/27192690
has body: If you know the name of multidimensional array, you can use eval('foo' + bar). This will return right the content without any brackets. If no, you may use regex to extract dimensions from string, like bar.match(/[0-9]+/g).
has comment: http://stackoverflow.com/comment/42871180
accepted answer of: http://stackoverflow.com/q/27192379
type: Answer
answers question: http://stackoverflow.com/q/27192379
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27261042
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42995294
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/42995249
answer count: 1
has answer: http://stackoverflow.com/a/27261172
has comment: http://stackoverflow.com/comment/42995158
has title: Ajax Call keeps failing without error
type: UnansweredQuestion
tagged with: php
has body: So my ajax call works fine, i get a green light next to it in web inspector and I see the correct parameters being sent back and JSON objects being returned. However, it automatically goes to ERROR. I added some error handling and have ran out of ideas.. Does anyone see anything?? Javascript function getMoreOlder(id) { $.ajax({ url: "getmore.php", type : "POST", dataType : "json", data: { postid : id, type: "later", }, success: function(response){ alert("Success"); for (var i=0; i&lt;json.length; i++) { // alert("Loop"); } }, error: function(jqXHR,error, errorThrown){ if(jqXHR.status&amp;&amp;jqXHR.status==400){ alert(jqXHR.responseText); }else{ alert("Something went wrong"); } } }); } PHP Script $id = $_POST['postid']; $type = $_POST['type']; if($type == "later") { $sql = "CALL `sp_BlogPosts_PageByPostID`('" . $id ."')"; $exec = mysqli_query($conn, $sql); while($fetch = mysqli_fetch_assoc($exec)) { $obj = array( "PostID" =&gt; stripslashes(trim(mysqli_real_escape_string($conn, $fetch['PostID']))), "Title" =&gt; stripslashes(trim(mysqli_real_escape_string($conn, $fetch['title']))), "Content" =&gt; stripslashes(trim(mysqli_real_escape_string($conn, $fetch['content']))), "Email" =&gt; stripslashes(trim(mysqli_real_escape_string($conn, $fetch['email']))), "Username" =&gt; stripslashes(trim(mysqli_real_escape_string($conn, $fetch['username']))), "Created_At" =&gt; stripslashes(substr(trim(mysqli_real_escape_string($conn, $fetch['created_at'])), 0 , 10))); echo json_encode($obj); } Example Usage &lt;button onClick="getMoreOlder(1113);"&gt; Load More Posts &lt;/button&gt; Example Return {"PostID":"1177","Title":"Off track","Content":"Hi This is a Post", "Email":"me@yahoo.com", "Username":"Abc123", "Created_At":"12-2-14"} Key Points Correct variables are being sent in POST Correct information is returned in POST Always returns error Something went wrong! Web Inspector shows 200 code for POST request
has comment: http://stackoverflow.com/comment/42995238
type: Question

http://stackoverflow.com/q/27231108
has answer: http://stackoverflow.com/a/27231875
has comment: http://stackoverflow.com/comment/42939737
tagged with: javascript
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/42939432
has comment: http://stackoverflow.com/comment/42939565
tagged with: arrays
downvote count: 0
has title: cannot re-add item to basket (array) after it is removed
favorite count: 0
accepted answer: http://stackoverflow.com/a/27231875
has comment: http://stackoverflow.com/comment/42939433
type: Question
tagged with: php
has comment: http://stackoverflow.com/comment/42939055
upvote count: 2
has body: I have a basket (an array) in my PHP form, where users can add their selected movies to it. The image below, may show the situation better: Problem: As can be seen in the image, user can click on the garbage image to remove a movie from the list. Now, the problem is that if he/she would like to re-add this removed film to the selected list again, the message is shown "This movie is already in the list"., while it should be shown ONLY IF the movie is not in the list NOW! This is my code (form.php): Could someone kindly help me know how to fix it?
has comment: http://stackoverflow.com/comment/42939240
has comment: http://stackoverflow.com/comment/42940013
answer count: 1
has comment: http://stackoverflow.com/comment/42940069

http://stackoverflow.com/a/27160924
answers question: http://stackoverflow.com/q/27154456
has comment: http://stackoverflow.com/comment/42842870
type: Answer
has comment: http://stackoverflow.com/comment/42918667
has comment: http://stackoverflow.com/comment/42817898
has body: To have it transition as a whole with respect to the origin point, there needs to be a positioning modifier and a separate transitioning modifier. In your example above, the position modifier is also transitioning the render nodes based on it's own origin. You want it to transition from the root origin of the position (center of context in this case). ------------------- | Global Modifier | &lt;=== Modifier for position ------------------- | ------------------- | Root Modifier | &lt;=== Modifier that will transition ------------------- the root node from/to position | --------------------------------------- | | | ---------------- ---------------- -------------------- | Blue Mod | | Green Mod | | Red Mod | &lt;=== Positions each renderable ---------------- ---------------- -------------------- with respect to the root | | | ---------------- ----------------- ---------------- | Blue Surface | | Green Surface | | Red Surface | ---------------- ----------------- --------------- Here is some code to show how it can be done. Click Here for a running example var globalModifier = new Modifier({ size: [100, 100], origin: [0, 0], align: [0.5, 0.5], transform: Transform.translate(0, 0, 0.0001) }); var rootModifier = new Modifier({ size: [undefined, undefined], origin: [0, 0], align: [0, 0], transform: Transform.translate(0, 0, 0.0001) }); var blueModifier = new Modifier({ size: [100, 100], origin: [0.5, 0.5], align: [0, 0], transform: Transform.translate(0, 0, 1) }); var greenModifier = new Modifier({ size: [50, 50], origin: [0, 0], align: [0, 0], transform: Transform.translate(0, 0, 2) }); var redModifier = new Modifier({ size: [50, 50], origin: [1, 1], align: [0, 0], transform: Transform.translate(0, 0, 2) }); var blueSurface = new Surface({ content: 'blue', size: [undefined, undefined], classes: ['double-sided'], properties: { color: 'white', textAlign: 'right', backgroundColor: 'blue' } }); var redSurface = new Surface({ content: 'red', size: [undefined, undefined], classe…
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42922158
accepted answer of: http://stackoverflow.com/q/27154456
has comment: http://stackoverflow.com/comment/42831376
has comment: http://stackoverflow.com/comment/42842337
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42982389
score: 2
type: Comment
has text: Bear in mind you could actually define the module in the `app.js` file like this `angular.module('ft.controllers', [])` and then add the controllers wherever like this `angular.module('ft.controllers').controller(...)`. Notice the second call doesn't send an array - that becomes a *get* instead of *define*.
comment on: http://stackoverflow.com/a/27237564
type: AnswerComment

http://stackoverflow.com/q/27220518
tagged with: canvas
has body: I'm totally new to webGl and I'm working on an Oculus Rift project with Three.js. I try to make a kind of loader: when a user focus a point during 2s I throw an event. I'm using frustum.intersectsObject(object) and it's work : when the object is in the viewport, the function returns true but I want it return true only if the object is in a centered area. Here is my code in the render loop to check if the object is in the frustum: // Create a new Frustum object (for efficiency, do this only once) var frustum = new THREE.Frustum(); // Helper matrix (for efficiency, do this only once) var projScreenMatrix = new THREE.Matrix4(); // Set the matrix from camera matrices (which are updated on each renderer.render() call) projScreenMatrix.multiplyMatrices( views[0].focusCamera.projectionMatrix, views[0].focusCamera.matrixWorldInverse ); // Update the frustum frustum.setFromMatrix( projScreenMatrix ); // Test for visibility if ( frustum.intersectsObject( loaderMesh ) ) { console.log("In the frustum"); } else{ console.log("Not in the frustum"); } I tried to use two cameras: one for the renderer and another one with a smaller field of view to set the frustum matrice but it doesn't work. Do you have any idea to make it works? Thanks in advance
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27225371
has title: Determine if a mesh is in the center of field of view
answer count: 1
tagged with: three.js
accepted answer: http://stackoverflow.com/a/27225371
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/27275218
has body: Is there a way in javascript to count the number of http request that a website does to a server? EXAMPLE: In my local webserver running with apache tomcat i have a simple html page helloworld.html with a style.css file, so when i type "localhost:8080/helloworld.html" the browser does two requests, one for helloworld.html and one for style.css. My goal is to show this number on helloworld.html for a video element, when i play it start several number of http get to the webserver. I'm trying for several days on the web but I have not found anything. I found webrequest api but i think that only chrome extension can use it. I found also chrome.devtools.network API but i can use it only when chrome dev tools is opened.
has comment: http://stackoverflow.com/comment/43019818
has comment: http://stackoverflow.com/comment/43019668
tagged with: google-chrome-devtools
has title: Counting the number of http requests in javascript
tagged with: httprequest
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27275352
score: 5
has comment: http://stackoverflow.com/comment/43054668
tagged with: javascript
has answer: http://stackoverflow.com/a/32073410
tagged with: tomcat
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43020145
upvote count: 5
type: UnansweredQuestion

http://stackoverflow.com/comment/42881225
has text: Yes this requires JavaScript. I'll show you an example in a second
comment on: http://stackoverflow.com/q/27198381
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43044115
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27288405
has text: Please share more of the HTML code snippet starting from the menu item to the element you want to click.
type: Comment

http://stackoverflow.com/q/27297709
tagged with: javascript
has body: I'm looking to use https://github.com/flatiron/nconf in the browser. I have tried to use it with browserify but because nconf calls fs.readdirSync when it is required to scan directories for configuration, it fails in the browser. // config.js 'use strict'; var nconf = require('nconf'); // this triggers the fs.readdirSync var globalConfig = { my: { global: 1 }}; nconf.use('global', { type: 'literal', store: globalConfig }); var envConfig = { my: { env: 2 }}; nconf.use('env', { type: 'literal', store: envConfig }); module.exports = nconf; Is it possible to use some sort of browserify transform (I didn't see a way to make it force the use of BRFS in nconf) or a way to use nconf (or some other similar library) to manage client side configuration? If not nconf itself, then just something that would allow me to do something similar to this: config.load('user-settings', { my : { user: 1 } }); config.load('global-settings', { my: { global: 2 } } ); config.get('my.user'); // 1 config.get('my.global'); // 2 config.unload('global-settings'); config.get('my.global'); // undefined
answer count: 1
has title: Using nconf in the browser?
favorite count: 0
type: UnansweredQuestion
tagged with: nconf
score: 3
upvote count: 3
tagged with: configuration
has comment: http://stackoverflow.com/comment/47969614
type: Question
has answer: http://stackoverflow.com/a/62161991
downvote count: 0

http://stackoverflow.com/comment/42991638
type: Comment
type: AnswerComment
has text: Yup, exactly. If a new UI design comes out suggesting just a stack of labeled radio buttons ("1 Year", "5 Years", "Permanent"), then you change the UI but continue with the same API and data representation.
comment on: http://stackoverflow.com/a/27258907
score: 0

http://stackoverflow.com/q/27291839
tagged with: inbox
answer count: 1
tagged with: browser-extension
tagged with: iframe
has body: We develop browser extensions for Google Chrome, Firefox and Safari. We need to insert an iframe in Inbox (https://inbox.google.com/) in our Chrome extension. I created a JavaScript code that inserts the iframe to the page with jQuery. Here is the code: JavaScript code: var $container = jQuery(' '); $container.append(' '); jQuery("body").append($container); Utils.getUrl = function(filename, preferSecure) { return WS.getURL(filename, preferSecure); }; /* Function to retrieve the relative URL/URI of a file in the platform's file system. */ WS.getURL = function(filename, preferSecure) { if (typeof filename !== "string") { filename = ""; } else if (filename.substr(0, 1) === "/") { /* Remove forward slash if it's the first character, so it matches with the base URLs of the APIs below. */ filename = filename.substr(1); } switch (Sys.platform) { case 'chrome': return chrome.extension.getURL(filename); } }; login_iframe.html: login_iframe.js: // Get URL parameter. function GetURLParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if ((sParameterName.length >= 2) && (sParameterName[0] === sParam)) { return decodeURIComponent(sParameterName[1]); } } return null; } document.getElementById("iframe").src = GetURLParameter("url"); I also added "content/login/login_iframe.html" to "web_accessible_resources" in manifest.json. But I get these error messages in the console: login_iframe.js:14 Uncaught TypeError: Cannot set property 'src' of null rs=AItRSTPbuBGKt-Gq9QZ6xBfrjWRS7py0HA:13055 'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead. login_iframe.js:14 Uncaught TypeError: Cannot set property 'src' of null What is the problem and why does document.getElementById("iframe") return null and why do I get this error message twice? I also tried to insert login_iframe.j…
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27292141
type: Question
has title: How do I insert an iframe with dynamic HTTPS source from a Chrome extension?
tagged with: javascript
has answer: http://stackoverflow.com/a/27292141
score: 0
tagged with: google-chrome-extension

http://stackoverflow.com/q/27255089
has comment: http://stackoverflow.com/comment/42992440
score: 0
tagged with: relationship
has body: Think of this question in a blog context, I'm using Post and Comment to represent our actual app. We're trying to build an app using Parse.com, and want to display a list of Posts, with the number of Comments alongside. There seems to be 2 ways to do this, and one seems incredibly inefficient, but the other requires that all users have write access to the Post. Inefficient Way Store a relation in each Comment referring to the Post, then run 1 query per displayed Post to count the number of Comments: var postsWithComments = [ // {post: post, commentCount: 0} ]; (new Parse.Query(Post)) .find() .then(function (posts) { posts.forEach(function (post) { (new Parse.Query(Comment)) .equalTo('post', post) .count() .then(function(commentCount) { postsWithComments.push({ post: post, commentCount: commentCount }); }); }); }); Insecure Way Store an array, pointer, or relation on Post, referring to each Comment that belongs to it. This allows quick and easy counting, as well as easy access via Query.include(). The problem is that every user needs write access to Post in order to add a Comment. Is there another way to store or query this data that I'm missing? All I need is a collection of Posts with the count of Comments. The user can tap to see those Comments (at which point we can load the actual data in). Edit to add: Manually-Maintained Way Further googling has found people getting around this issue using Cloud Code to update a column on the parent object using an afterSave on the child object. Pseudo-code: Parse.Cloud.afterSave("Comment", function(request, response) { var comment = request.object; var post = comment.get('post'); var query = new Parse.Query(Parse.Object.extend('Comment')); query .equalTo('post', comment.get('post')) .count() .then(function(commentCount) { post .set('commentCount', commentCount) .save() .then(function() { response.success(); }, function(error) { response.error(error); }); }); });
has title: Parse.com relationships and ACLs
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/43047801
type: UnansweredQuestion
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42993949
tagged with: javascript

http://stackoverflow.com/comment/42906887
comment on: http://stackoverflow.com/q/27213225
score: 0
type: Comment
type: QuestionComment
has text: You will need to use `$(document).ready()` to attach a new ID when the document DOM has loaded and then get the selected option using `$(this).find("option:selected").val()`.

http://stackoverflow.com/comment/42973861
comment on: http://stackoverflow.com/q/27249094
score: 0
type: Comment
type: QuestionComment
has text: i think now you can judge it more clearly, where am i going wrong??

http://stackoverflow.com/comment/44643892
has text: http://stackoverflow.com/questions/11126396/how-to-add-additional-map-markers-to-google-maps-that-are-embedded-on-a-website
score: 0
comment on: http://stackoverflow.com/q/27268262
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42867800
score: 0
type: AnswerComment
has text: Thanks again. Your answer is great! I just corrected the "Parse.Proimse.as();" to "Parse.Promise.as();" and removed r"eturn Parse.Promise.as('Hello')" and also added ";" at the end of "return promise".
type: Comment
comment on: http://stackoverflow.com/a/27179971

http://stackoverflow.com/comment/48375441
type: QuestionComment
has text: such issues are hard to solve remotely if it involves hardware , anyway there are many possible solutions , so lets start to identify the issue first , please visit this url :https://www.webrtc-experiment.com/demos/MediaStreamTrack.getSources.html , and let me know if the video usb adapter gets detected .
score: 0
comment on: http://stackoverflow.com/q/27174335
type: Comment

http://stackoverflow.com/a/27246472
score: 0
has comment: http://stackoverflow.com/comment/42968843
type: Answer
answers question: http://stackoverflow.com/q/27246291
has body: Your code should work. Maybe you do not have much content on your webpage such that the browser would not scroll to the appropriate position. I have an example here in the fiddle link: http://jsfiddle.net/z78p7d5L/8/ HTML Code: test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test testtest test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test tes…

http://stackoverflow.com/comment/42901922
comment on: http://stackoverflow.com/a/27209987
has text: yes sir, followed your answer, but still doesn't work, so I think it may be something else with my code
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27264337
upvote count: 15
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27262404
downvote count: 2
has comment: http://stackoverflow.com/comment/55450608
score: 13
has body: As said: clearcache or clearsessioncache is only for Android. read this API Doc In case of Android so before re-opening: window.open("domain.com", "_blank", "location=no,clearsessioncache=yes"); For iOS: check this out. Alternatives: Clear the session cookie via javascript directly or indirectly (check this - JQuery Cookie clearing ) Phonegap/Cordova plugin that allows you to clear cookies of the webview...see this
accepted answer of: http://stackoverflow.com/q/27262404
has comment: http://stackoverflow.com/comment/72560544

http://stackoverflow.com/a/27205540
score: 0
type: Answer
has body: There are multiple ways of using other fonts in HTML, and subsequently, JavaScript. But it's a good practice to always declare fonts in your CSS, so I think your going at it a bit backwards. One way is to have your font somewhere in your project and link to it using css to declare the font in the following manner. You could assign the font to anything, not just @font-face. It could be p, or li, or any other elements: @font-face { font-family: myFont; src: url(&lt;path-to-my-font&gt;/myFont.ttf); } Another way is to link to some service like Google Fonts. You can add something like this in your HTML header. This example is for a font called "IM Fell English": &lt;link href='http://fonts.googleapis.com/css?family=IM+Fell+English' rel='stylesheet' type='text/css'> However, if you must you could use something like this example provided by W3Schools.com: document.getElementById("myElement").style.fontFamily="Impact,Charcoal,sans-serif"; myElement.innerHTML = "Hello"; And this should write hello to that document with the specified font, provided it is visible tto your project. Hope this helps :)
answers question: http://stackoverflow.com/q/27205377

http://stackoverflow.com/a/27189350
has body: I would use this regex: /(\{\".*?:.*?\"\})/ This will give you the json in a matched group. Demo here: http://regex101.com/r/cV7oK7/1 Use like so: var regx = /(\{\".*?:.*?\"\})/g, match = ""; while (match = regex.exec(yourString) !== null) { var json = $.parseJSON(match[0]); //use the json }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27189053

http://stackoverflow.com/comment/42821470
type: Comment
comment on: http://stackoverflow.com/q/27164371
has text: better construct the first select box the on change of that make ajax call to get the relevant data for second.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/56085620
type: AnswerComment
has text: In case it helps anyone else, I ran into this issue because I was inadvertently attempting to unmount a component before a click event had finished bubbling. I fixed it by simply adding `event.stopPropagation()` in my click handler.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27153167

http://stackoverflow.com/comment/42939533
score: 0
type: QuestionComment
has text: I suppose I would approach this a little differently. I'd create an Item object with ID, Name, Price, and Quantity that gets passed to an Order array. That way when you click the button you can loop through the Order array to see if that Item ID already exists, if theres a match increment the Quantity.
type: Comment
comment on: http://stackoverflow.com/q/27231137

http://stackoverflow.com/q/27303427
has body: https://www.dropbox.com/s/znno4krx64zs3hm/Screenshot%202014-12-04%2015.11.10.png?dl=0 I started adapting the choropleth d3 code here. Here's the code puts the choropleth into the page //initialize the map's dimensions var width = 960; var height = 500; //define the display threshold var color = d3.scale.threshold() .domain([.02, .04, .06, .08, .10]) .range(["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"]); var path = d3.geo.path(); //add the map image to the div var svg = d3.select("#" + rowID + " .choropleth").append("svg") .attr("width", width) .attr("height", height); //import data from REST interface $.ajax({ url: "&lt;?php echo REST_URL; ?&gt;", data: {"method": "getChoroplethData", "reportID": reportID, "mode": mode, "contents": JSON.stringify(window.reportData[reportID]['contents'])}, success: function(response){ response = parseJSON(response); var us = response['us']; var data = response['data']; var reportID = response['reportID']; var rateById = {}; for(var i in data){ rateById[data[i]['id']] = +data[i]['rate']; } svg.append("g") .attr("class", "counties") .selectAll("path") .data(topojson.feature(us, us.objects.counties).features) .enter().append("path") .attr("d", path) .style("fill", function(d) { return color(rateById[d.id]); }); svg.append("path") .datum(topojson.mesh(us, us.objects.states, function(a, b) { return a.id !== b.id; })) .attr("class", "states") .attr("d", path); //show the report $("#" + rowID + " .panel-body").slideDown(); } }); For the most part this works. The response from the AJAX call has 3 parts. us is the us.json data that the choropleth example above uses and data contains the data from unemployment.tsv translated into JSON data in the format [{'id':'some id','rate':'some rate},...{'id':'some id','rate':'some rate'}]. It's being placed in the right part of the page and all the pieces are moving correctly except that when the choropleth is drawn it looks like this. I can't think of any reason for these massive bl…
has title: unusual black shapes in d3 choropleth
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43069921
has comment: http://stackoverflow.com/comment/43070118
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/27303865
tagged with: choropleth
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27303865

http://stackoverflow.com/q/27250956
has body: I am trying to get the id values of a table row of the checkbox that had been checked, but for some reason. is not returning an array of objects my current script: console.log(array_checks); returns what I need: an array of objects and makes the script work well. But if I un-comment .closest('tr').attr('id'), it doesn't return anymore the array of objects, it returns a string with the first checked table row id. Where am I mistaking HTML &lt;tr id="row_132" class="even"&gt; &lt;td&gt; &lt;input id="52" class="checkbox-dash" type="checkbox" value="52" name="delete-dash[]"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr id="row_91" class="even"&gt; &lt;td&gt; &lt;input id="54" class="checkbox-dash" type="checkbox" value="54" name="delete-dash[]"&gt; &lt;/td&gt; &lt;/tr&gt; Jquery var array_checks = $('.checkbox-dash:checked')/*.closest('tr').attr('id')*/; console.log(array_checks); if (array_checks.length) { // Getting values of the table row id of checked checkboxes var array_values = array_checks.map(function(){ return this.value; }).get(); } else { var array_values = 0; $('#message').html('Please select at least one row in order to delete.').show(700); } $.ajax({ type: 'post', url: '../lib/ajax.html', data: { action: 'delete_sites_history', user_id: user_id, array_values: array_values }, beforeSend: function() { $("#result").html('Loading...'); }, complete: function(data) { $("#result").html(''); $.each(array_values, function(index, rows) { console.log(rows); $('#row_'+rows).fadeOut(1000); }); }, error: function() { $("#result").html('There was an error'); } }); EXPECTED OUTPUT console.log(array_checks); - need to return of array of objects (row_132, row_91) Object[ tr#row_132.checkbox-dash attribute value = "132", tr#row_91.checkbox-dash attribute value = "91" ]
accepted answer: http://stackoverflow.com/a/27251036
type: AnsweredQuestion
score: 0
type: Question
has comment: http://stackoverflow.com/comment/42976097
has title: Return an array of objects from the closest table row of checked checkboxes
has answer: http://stackoverflow.com/a/27251036
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42977106
comment on: http://stackoverflow.com/a/27250951
has text: @Robert: that is what worked for me. i would suggest you to look into thia articles http://www.danwellman.co.uk/fixing-jquery-click-events-for-the-ipad/ and http://www.mitch-solutions.com/blog/17-ipad-jquery-live-click-events-not-working. see if it helps
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/42843384
score: 1
type: QuestionComment
has text: The funny thing about Angular 2.0 is how they drop support for IE10+. Meaning if you are writing a software applications for internal use by customers you will need to wait till none of your customers are still on IE10. Right now it is a struggle, at least for us, to get our customers off of IE8. So when I look at the radical changes coming in Angular 2.0 my thoughts are, thank god our client / server code can be iterated separately and it will probably be 2-3 years before we even assess using it.
comment on: http://stackoverflow.com/q/27162387
type: Comment

resize
tags question: http://stackoverflow.com/q/27258753
tags question: http://stackoverflow.com/q/27284021
type: Tag
tag name: resize

http://stackoverflow.com/a/27253895
answers question: http://stackoverflow.com/q/27253643
score: 0
has body: You have to define an id property of the model and Backbone will care about duplicates for you. Here is more details about add method. And small example how it works: var Type = Backbone.Model.extend({ idAttribute: 'Second' }); var types = new Backbone.Collection([{ First: 1, Second: 11 }], {model: Type}) types.add(new Type({ First: 1, Second: 11 })); types.add(new Type({ First: 2, Second: 22 })); types.add(new Type({ First: 2, Second: 22 })); console.log(types.length); // 2
type: Answer
has comment: http://stackoverflow.com/comment/42981860
has comment: http://stackoverflow.com/comment/42981675
has comment: http://stackoverflow.com/comment/42982137

http://stackoverflow.com/q/27221467
has comment: http://stackoverflow.com/comment/42922452
tagged with: javascript
score: 0
tagged with: angularjs
has title: Load controller dynamically without routeProvider
has comment: http://stackoverflow.com/comment/42921775
answer count: 0
type: UnansweredQuestion
tagged with: angularjs-controller
has body: so i have my index.html like following app.js: var app=angular.module("myapp",[]); app.controller('Ctrl',['$scope',function($scope) { $scope.gotoXXX() { $scope.sidebar="xxx.html"; } }]); sidebar.html: Obviously, this is not working. It prompts for XXXcontroller not defined. So I figured the controller was not properly injected. And I need to change view partially, so routeProvider is not an option. So I'm wondering, Is there anyway to dyanmically inject controllers?
type: Question

http://stackoverflow.com/q/27231778
has answer: http://stackoverflow.com/a/27232116
tagged with: javascript
tagged with: jquery
has title: highlight div depending on select box value
type: AnsweredQuestion
upvote count: 0
has body: i have here a select option and a div that has the same content of select option value 1 2 3 4 1 2 3 4 what i want to do is whenever i click the select option 1, the div below that has the same text will be highlighted, Can someone help me how to code it on jquery? Thanks!
has answer: http://stackoverflow.com/a/27231850
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/42940337
linked to: http://stackoverflow.com/q/26240887
type: Question
linked to: http://stackoverflow.com/q/2245934
has answer: http://stackoverflow.com/a/27231926
accepted answer: http://stackoverflow.com/a/27231850
linked to: http://stackoverflow.com/q/1428438
tagged with: select
answer count: 3
downvote count: 1
possible better answer: http://stackoverflow.com/a/27231926

http://stackoverflow.com/q/27304685
has comment: http://stackoverflow.com/comment/43072609
has comment: http://stackoverflow.com/comment/43072638
type: Question
has comment: http://stackoverflow.com/comment/43072702
has comment: http://stackoverflow.com/comment/43072632
has comment: http://stackoverflow.com/comment/43072572
has comment: http://stackoverflow.com/comment/43072466
tagged with: mongodb
tagged with: javascript
has comment: http://stackoverflow.com/comment/43072741
score: 0
has comment: http://stackoverflow.com/comment/43072762
has title: MongoDB create a new collection from the client side?
has body: Intro: I have a collection of players in my app, this is built using a schema and then passing some stuff into my node.js configuration, perhaps it's a bit more complex than that but I mean this is the basic idea of how mongoDB for nodejs works with models and collections. So now in my database I have my DB name then collections then a collection of players, great now I can build an api and start making requests to GET and PUT from that collection. Question: My problem is in my stats app after week one's game was tracked I need to clear all the player attributes so that in week 2 it's fresh, but I would like to save all the stats for the players from week 1. So due to my basic knowledge of how a collection is built I am thinking in order to build a new collection I need to define a schema, but perhaps there is another way, if not then the schema would have to be dynamic right? Well how do I build a dynamic schema to suit this problem? Ideas: Idea: The user clicks a button saying complete week 1, then the server takes all the data from the players collection and builds a new collection named week 1 players? Question: If the above is a good idea, how do I build a function to create a new mongoDB collection and save players_week1 into its own branch? Final Word: So hopefully someone has an optimal solution and understands what I am talking about, in the mean time I am going to try and follow my idea and see if I can search the docs to find some answers. Thanks guys.
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/43072384
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43072556

http://stackoverflow.com/comment/43182326
type: QuestionComment
has text: OK, let's play around with this jsfiddle http://jsfiddle.net/CriddleCraddle/pusqrowu/
comment on: http://stackoverflow.com/q/27304704
score: 0
type: Comment

http://stackoverflow.com/a/27299595
has comment: http://stackoverflow.com/comment/43065019
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27299004
answers question: http://stackoverflow.com/q/27299004
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43065205
score: 2
has body: Try with this code: var list = [{...},{...},...{...}]; //folder list in JSON format == JS object var tree = buildChildrenList(''); //find root folders first function buildChildrenList(parentId){ var childrens = []; for(var i=0;i&lt;list.length;i++){ if (list[i].parentId == parentId){ childrens.push({ id: list[i].id, label: list[i].label, inode: true, open: false, icon: 'folder', branch: buildChildrenList(list[i].id) //this is a recursive call }); } } return childrens; }
downvote count: 0

ionic-framework
tags question: http://stackoverflow.com/q/27244593
tags question: http://stackoverflow.com/q/27244935
tags question: http://stackoverflow.com/q/27248322
tags question: http://stackoverflow.com/q/27152812
type: Tag
tags question: http://stackoverflow.com/q/27163873
tags question: http://stackoverflow.com/q/27298214
tags question: http://stackoverflow.com/q/27249705
tags question: http://stackoverflow.com/q/27212674
tags question: http://stackoverflow.com/q/27208885
tags question: http://stackoverflow.com/q/27294136
tags question: http://stackoverflow.com/q/27285472
tags question: http://stackoverflow.com/q/27271489
tags question: http://stackoverflow.com/q/27212020
tags question: http://stackoverflow.com/q/27246251
tags question: http://stackoverflow.com/q/27290845
tags question: http://stackoverflow.com/q/27267736
tags question: http://stackoverflow.com/q/27252454
tags question: http://stackoverflow.com/q/27300583
tags question: http://stackoverflow.com/q/27153528
tags question: http://stackoverflow.com/q/27273713
tags question: http://stackoverflow.com/q/27288382
tags question: http://stackoverflow.com/q/27237110
tags question: http://stackoverflow.com/q/27255757
tags question: http://stackoverflow.com/q/27229592
tags question: http://stackoverflow.com/q/27240108
tags question: http://stackoverflow.com/q/27229074
tags question: http://stackoverflow.com/q/27295328
tag name: ionic-framework

http://stackoverflow.com/comment/42833510
type: Comment
type: QuestionComment
has text: "the divs are produced in the same way" -- Are all the divs present when the document is rendered? Before you hook up the click event, do `console.log($('.addSet').length)` to make sure the event handler is registered on that element. You could also try event delegation: `$('body').on('click', '.addSet')` I believe is the syntax (without looking it up).
score: 2
comment on: http://stackoverflow.com/q/27171394

http://stackoverflow.com/a/27315494
accepted answer of: http://stackoverflow.com/q/27210336
answers question: http://stackoverflow.com/q/27210336
type: Answer
has body: You could make use of the callbacks the plugin provides. Also, if you want to change for a more complete plugin such as fullPage.js, there you have the option scrollBar than when set to true will allow plugins such as waypoint or appear to work as expected. The reason for it is detailed in fullPage.js FAQs: Parallax, as well as many other plugins which depends on the scrolling of the site, listens the scrollTop property of javascript. fullPage.js doesn't actually scroll the site but it changes the top or translate3d property of the site. Only when using the fullPage.js option scrollBar:true or autoScrolling:false it will actually scroll the site in a way it is accessible for the scrollTop property. The same principle is applied to onepage-scroll but the difference is that fullPage.js provides a way to deal with it (scrollBar:true) and onepage-scroll doesn't.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42881121
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27198229
has text: @EthanBrown, 1st, because I don't know anything about HTML5 and I am struggling to with it, 2nd, because In my project, I need to use external images and using images in HTML5 is not as easy as etc etc.... there are so many pointless preparations to achieve a simple task such as using an external image...
score: 0

http://stackoverflow.com/a/27168883
has body: You do not need to pass anything in the function. Try this JS :- function toCelsius(){ var fahrenheit = document.getElementsByName("firstname")[0].value; var cel = (5 / 9) * (fahrenheit - 32); document.getElementById("demoTemp").innerHTML = cel; }
answers question: http://stackoverflow.com/q/27168653
score: 0
type: Answer

http://stackoverflow.com/comment/42891553
comment on: http://stackoverflow.com/q/27204336
type: Comment
type: QuestionComment
has text: This is not a problem for access Token. I have checked it before.
score: 0

http://stackoverflow.com/comment/42937708
type: Comment
comment on: http://stackoverflow.com/a/27229394
score: 0
type: AnswerComment
has text: Ah! Thanks I really need a general explanation! :) so i can use next time as well.Last thing: can you update with the last code also here above? I'm not sure if your last update with the new generated name in F case is the one with window.randomName or the one with x = pickRandomName.

http://stackoverflow.com/a/27215095
score: 1
has comment: http://stackoverflow.com/comment/42910313
has comment: http://stackoverflow.com/comment/42910220
downvote count: 0
answers question: http://stackoverflow.com/q/27215080
has body: You can use the [] operator: if (form["text_" + y].value == "") {
type: Answer
upvote count: 1

http://stackoverflow.com/q/27159755
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27160730
has comment: http://stackoverflow.com/comment/42813541
has body: I am trying to calculate the height of the page shown within the iframe using document.getElementById('iframe1').contentWindow.outerHeight contentWindow.outerHeight takes different values in different browsers and does not really give the right height value. Also, in internet explorer, I see an error "Access is denied". The page I am trying to show within the iframe does not have any problems loading.
has comment: http://stackoverflow.com/comment/42813592
type: Question
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/27160034
tagged with: javascript
has comment: http://stackoverflow.com/comment/42813837
has comment: http://stackoverflow.com/comment/42813393
has comment: http://stackoverflow.com/comment/42813638
score: 0
downvote count: 2
has title: How to calculate the height of an iframe dynamically?
favorite count: 0
has comment: http://stackoverflow.com/comment/42813647

http://stackoverflow.com/a/27237930
upvote count: 1
answers question: http://stackoverflow.com/q/27237864
downvote count: 0
type: Answer
has body: You can't. You are manipulating the DOM. It's not possible just to insert an opening element. The browser will automatically fix it for you. Instead you should find a better solution (trust me, there is one) for your use case (e.g. jQuery's wrap function).
score: 1

http://stackoverflow.com/comment/57261026
has text: This could be made a bit faster by reusing the `ret` array. See my answer for such an solution.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27267762
score: 1

http://stackoverflow.com/q/27160814
has comment: http://stackoverflow.com/comment/42828944
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: fullpage.js
has title: fullpage.js + reportcard.js .js error
type: UnansweredQuestion
tagged with: css
has body: I'm using fullpage.js theme and reportcard.js widget on my personal github pages website and I'm getting a spinning loading graphic... it was showing me some error in the .js and i commented out the code (line 45 of reportcard.js) Also, I've been having some issues formatting the elements... it seems that example3.css (fullpage) is conflicting with reportcards css.. I'm not really sure how all the code formatting works on Stack Overflow so here are my links: GitHub repo: https://github.com/twotimes22/twotimes22.github.io Domain: http://www.thomasweld.com/ FullPage.js: alvarotrigo.com/fullPage/ ReportCard.js: reportcard.rileyh.com/ Any help will be much appreciated. Thanks
answer count: 0
has comment: http://stackoverflow.com/comment/43674303
type: Question

http://stackoverflow.com/a/27186969
accepted answer of: http://stackoverflow.com/q/27178580
answers question: http://stackoverflow.com/q/27178580
has body: I've added return resolved $.Deferred() Object to my function. function playChain(animData){ function func() { //some action return new $.Deferred().resolve(); } function func_at () { playChain(this); } function func_after () { playChain(this); } s.buildChain(data, animData, func, func_at, func_after); } Then I've corrected the buildChain function. this.buildChain = function (data, animData, func, func_at, func_after) { function act1 () { var d = func.apply(animData, arguments); data.filter(function(e){ if(e.trigger == 'at' &amp;&amp; e.link == animData.id) return true; }).forEach(function(e){ func_at.apply(e, arguments); }); return d; } function act2() { data.filter(function(e){ if(e.trigger == 'auto' &amp;&amp; e.link == animData.id) return true; }).forEach(function(e){ func_after.apply(e, arguments); }); } act1().done(act2); };
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42886434
has comment: http://stackoverflow.com/comment/42860804
type: Answer

http://stackoverflow.com/comment/42988526
type: Comment
type: QuestionComment
score: 1
has text: "var Foo = Foo || {};" is pointless, "var Foo={};" is better (not hiding a potential ref error without fixing it), but why use Foo at all instead of hopping to Bar?
comment on: http://stackoverflow.com/q/27257291

http://stackoverflow.com/comment/42866354
has text: Is serachUsers using an itemController? or is it just iterating a collection, because your context may not be what you think it is, which is likely what you're problem is, it's attempting to send an action to some item which isn't actionable (the context `this` is probably just an individual item)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27184412

http://stackoverflow.com/q/27247146
has answer: http://stackoverflow.com/a/27248045
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27247223
possible better answer: http://stackoverflow.com/a/27248045
downvote count: 0
tagged with: javascript
tagged with: html-lists
has title: Add li to ul with looking for if exists
accepted answer: http://stackoverflow.com/a/27247223
has body: i'm adding thinks getting from a input field into a list. The adding function works well but i want to check if the string, which the user wants to add already exists. So i want something like that but don't know the right functions to use HTML First name: Other people's names: javascript var list = document.getElementById('demo'); function changeText2() { var firstname = document.getElementById('firstname').value; var listElement = list.getElementsByTagName("li"); // here is the missing code if (listElement.text is not in list){ var entry = document.createElement('li'); entry.appendChild(document.createTextNode(firstname)); list.appendChild(entry); } else alert("is already in !"); } EDIT* The Code from above in jsfiddle.
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/27302381
type: Question
tagged with: javascript
tagged with: bundle-layout
linked to: http://stackoverflow.com/q/26164800
answer count: 1
downvote count: 0
favorite count: 0
tagged with: colors
type: UnansweredQuestion
has body: This is a followup on this question: D3 Dynamic hierarchical edge bundling - 2 way import The original problem was resolved and is shown in http://jsfiddle.net/w2rfwokx/1/ i.e there is an orange link in case node 1 and node 2 both import each other. But there seems to be an issue with this resolution, which becomes apparent in this new data set shown in http://jsfiddle.net/w2rfwokx/3/ When node 1 and node 2 both import each other, and when node 1 is highlighted, node 2 is in orange, which is how it needs to be, but the link is not. I guess the code is not taking into account the complex data set. In this complex data set, node 1 imports node 2, node 2 imports node 1 and node 3, node 3 imports node 2. I can figure out that construction of unique links array in this code block needs change var unique_links = links.reduce(function(p,c) { var index=p.map(function(d,i) { if(d.source===c.target &amp;&amp; d.target===c.source) return i;}).shift(); if(!isNaN(index)) p[index].both=true; else p.push(c); return p; },[]); Though i am struggling to see what change. I am still learning d3.js and my primary purpose is application of this to process management Any pointers would be helpful
has title: Hierarchical edge bundling 2 way - link colour
has answer: http://stackoverflow.com/a/30545842
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
score: 1
upvote count: 1

http://stackoverflow.com/comment/50169946
has text: Did you ever figure this out? Getting the same error.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27214534
score: 0

web
tags question: http://stackoverflow.com/q/27247489
tags question: http://stackoverflow.com/q/27153833
tags question: http://stackoverflow.com/q/27313569
tags question: http://stackoverflow.com/q/27277322
tags question: http://stackoverflow.com/q/27178153
tags question: http://stackoverflow.com/q/27184544
tags question: http://stackoverflow.com/q/27164526
type: Tag
tags question: http://stackoverflow.com/q/27220144
tags question: http://stackoverflow.com/q/27281247
tags question: http://stackoverflow.com/q/27234768
tags question: http://stackoverflow.com/q/27297005
tags question: http://stackoverflow.com/q/27282372
tags question: http://stackoverflow.com/q/27175996
tags question: http://stackoverflow.com/q/27299555
tags question: http://stackoverflow.com/q/27176778
tag name: web
tags question: http://stackoverflow.com/q/27222988
tags question: http://stackoverflow.com/q/27291660
tags question: http://stackoverflow.com/q/27312954
tags question: http://stackoverflow.com/q/27252371
tags question: http://stackoverflow.com/q/27216454
tags question: http://stackoverflow.com/q/27271615
tags question: http://stackoverflow.com/q/27292846

http://stackoverflow.com/comment/42907428
has text: Is there a way to use the aws-sdk or aws-s3 overall without having to pass a user-login like facebook/google or anything else? Maybe there's a way to have a chat about that?
type: AnswerComment
comment on: http://stackoverflow.com/a/27200276
score: 0
type: Comment

extjs4
tags question: http://stackoverflow.com/q/27221135
tags question: http://stackoverflow.com/q/27295830
tag name: extjs4
tags question: http://stackoverflow.com/q/27297256
type: Tag

http://stackoverflow.com/comment/43069279
comment on: http://stackoverflow.com/q/27303075
has text: @RobertRozas I just tried it and it gives me undefined.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42930896
has text: If you want text, the str var in success should contain "1, 2, 3". If it's not working, try to use die("1, 2, 3"); in PHP, and tell me what happened
score: 0
comment on: http://stackoverflow.com/q/27226542
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27290146
type: Answer
has comment: http://stackoverflow.com/comment/43048183
has comment: http://stackoverflow.com/comment/43047984
answers question: http://stackoverflow.com/q/27289974
score: 0
has body: var objArray = [{id:1},{id:2},{id:3}]; var sortOrder = [2,3,1]; var newObjArray = []; for (i in sortOrder) { newObjArray.push(objArray[(sortOrder[i]) - 1]) };

http://stackoverflow.com/comment/47098093
score: 1
has text: Hi, check Akshats answer here: http://stackoverflow.com/questions/27755891/meteor-what-is-spacebars-kw-hash-object#answer-27756461
type: Comment
comment on: http://stackoverflow.com/q/27300703
type: QuestionComment

http://stackoverflow.com/q/27196668
type: UnansweredQuestion
has body: At the moment I'm facing a javascript problem. This is the javascript code: $(document).ready(function() { /* createNewTodo("_OPDRACHT_", "_PRIO_", "_DONE_"); _OPDRACHT_ = wat er gedaan met worden. _PRIO_ = prioriteit 1-5 (1 is hoogste, 5 is laagste) _DONE_ = uitgevoerd 1-2 (1 is nee, 2 is ja */ function todo(opdracht,prio,done) { this.opdracht = opdracht; this.prio = prio; this.done = done; } function createNewTodo(opdracht,prio,done) { var createdTodo = new todo(opdracht,prio,done); if ( localStorage.todoCount == undefined ) { localStorage.setItem('todoCount', 0) } var todoSize = parseInt(localStorage.todoCount) + 1; commitToStorage(todoSize,createdTodo); } function addList(){ var val = $('#name').val(); var tjap = createNewTodo(val,"1","1"); } function commitToStorage(objectCount,newObject) { var item = + objectCount; localStorage.setItem('todoCount', objectCount); localStorage.setItem(item, JSON.stringify(newObject)); } var todoCount = localStorage.getItem('todoCount'); for (i=1;i&lt;=todoCount;i++) { var number = parseInt(i) + 1; var todo = jQuery.parseJSON(localStorage.getItem(+ i)); createMarkup(todo); } function createMarkup(todo) { $('ul#items').append( "&lt;li&gt;" + todo.opdracht + " " + "&lt;/li&gt;" ); } $('#add-btn').click(addList); }); When I click on the add-btn it will insert a item in localstorage with a array of values. Everything is working fine until I refresh the page. At the first time I can add as many items in localstorage without a problem but when I try to add items after refreshing the page I get the following error: Uncaught TypeError: object is not a function. Been searching a lot on the internet but could't find a appropriate solution for this. Anyone that can help me out and push me in the right direction? Thanks in advance.
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/27197830
tagged with: javascript
tagged with: jquery
has title: Uncaught TypeError: object is not a function after second refresh
upvote count: 1
answer count: 1
favorite count: 0

vb.net
tags question: http://stackoverflow.com/q/27281919
tags question: http://stackoverflow.com/q/27223512
tags question: http://stackoverflow.com/q/27172988
type: Tag
tag name: vb.net
tags question: http://stackoverflow.com/q/27306413
tags question: http://stackoverflow.com/q/27285114
tags question: http://stackoverflow.com/q/27234427
tags question: http://stackoverflow.com/q/27257364

http://stackoverflow.com/comment/43042974
comment on: http://stackoverflow.com/q/27261137
type: Comment
type: QuestionComment
score: 0
has text: show the code for `CommentView` and are you sure that `addComments` is executed ? Can you create a fiddle to demonstrate the issue ?

http://stackoverflow.com/comment/42834866
has text: this is not working bro...
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27171597
type: Comment

http://stackoverflow.com/comment/43070607
type: AnswerComment
score: 0
has text: This might be an issue of what your time is on the server versus client computer. Leave the code in the test in one time on the website to see what the hour is being returned ... it may not match what you expect.
type: Comment
comment on: http://stackoverflow.com/a/27301925

http://stackoverflow.com/comment/42945254
has text: I'm positive the submitCollabForm() is inside accessBox, because when the email is not valid, the error message p ops up like it should.
score: 0
comment on: http://stackoverflow.com/q/27234034
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43038809
type: QuestionComment
has text: Don't point us to a link as an example of the data. Links rot and break. Instead, present a minimal example of the HTML inside the question. Anything else discourages answers.
score: 0
comment on: http://stackoverflow.com/q/27285141
type: Comment

http://stackoverflow.com/comment/43113696
has text: @hbob Cool. You are right about the last line, I just misunderstood your example, I thought you were saying you also had a body in the `foo` task. When defining a task, you can leave the function off entirely, e.g. `gulp.task("foo", ["fooCommon"]);`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27320296
type: Comment

http://stackoverflow.com/a/27277476
has comment: http://stackoverflow.com/comment/43023940
answers question: http://stackoverflow.com/q/27277412
type: Answer
score: 2
upvote count: 2
has body: You reference the global variable in your console.log statement. Try this : (function(){ var notCloned = false, toClone = true; window.toClone = toClone; window.whatsClone = function() { return toClone; } }()); window.toClone = false; console.log(toClone); // Will print false because actually is getting from the scope of global window console.log(whatsClone()); // Will print true whatsClone() will get the proper scoped variable. I created fast JSBin fiddle Also keep in mind that Primitives ( String, Number, Boolean ) are not referenced, they are copied, so basically: foo = true; window.bar = foo; window.bar will not be a reference to foo it will be just a copy of the boolean value.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27277412
downvote count: 0

http://stackoverflow.com/a/27222451
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Events handled by a template's event map will have the template's data context available in the this keyword. If your item is the data context (and it likely is if you are getting itemName and description without helpers), you can just use this._id in the event handler. {{itemName}} {{description}} Delete With the event: Template.quickList.events({ 'click #delete': function(event){ Lists.remove(this._id); } });
type: Answer
accepted answer of: http://stackoverflow.com/q/27222003
answers question: http://stackoverflow.com/q/27222003

http://stackoverflow.com/a/27175951
type: AcceptedAnswer
has body: You want to centre your marker on the map's centre? function addmarker() { var marker = new google.maps.Marker({ position: map.getCenter(), title: 'new marker', draggable: true, map: map }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } If you also want to be able to click on the map, and add a marker (and presumably then following the same rule, centre the map on that position)... google.maps.event.addListener(map, 'click', function(event) { map.setCenter(event.latLng); addmarker(); });
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27175254
answers question: http://stackoverflow.com/q/27175254
upvote count: 1

http://stackoverflow.com/comment/43040900
comment on: http://stackoverflow.com/q/27286673
type: Comment
type: QuestionComment
score: 0
has text: I think its because of internet explorer setting. Any pop message from other website also cant close ex.[http://css-tricks.com/examples/PopFromTopMessage/]

http://stackoverflow.com/q/27232786
tagged with: javascript
has comment: http://stackoverflow.com/comment/42942388
favorite count: 0
has answer: http://stackoverflow.com/a/27233044
has title: Javascript HTML checkbox array set onclick
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has comment: http://stackoverflow.com/comment/42942400
linked to: http://stackoverflow.com/q/11791296
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: onclick
has body: I have an array of check boxes, that I pass in to a function, with the intention of setting up a listener for each box. At this point all I want the listener to do is to display the id and the value of each checkbox in an alert box. Both attributes have been set before being passed into this function. The array is created and then passed through using the following line: var oCustomMultiSelect = new customMultiSelect(oCheckBoxes); The listeners are then activated using the following method: function customMultiSelect(pCheckBoxes) { for (i = 0; i &lt; pCheckBoxes.length; i++) { pCheckBoxListener(pCheckBoxes[i]) } } and this is the method that is supposed to set up the listeners: function pCheckBoxListener(pCheckBox) { alert("Value " + pCheckBox.value + " ID " + pCheckBox.id); } The method I have so far will display the correct values, but not onclick, it displays them at the time of construction. I want it to display them when they are clicked. I assume this is a very simple problem, but i cannot find the correct way to achieve this.
type: Question
has answer: http://stackoverflow.com/a/27233312
answer count: 2
downvote count: 0

http://stackoverflow.com/q/27222988
possible better answer: http://stackoverflow.com/a/27222994
answer count: 2
accepted answer: http://stackoverflow.com/a/27223000
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: web
has body: I write a click hander like this; $("#button1").click(function(evntData) { alert("button1 clicked."); }); to invoke it immediately I do like this; $("#button1").click(function(evntData) { alert("button1 clicked."); }(null)); in this way it is called on start up and work fine. but later when button is clicked this event handler is not called. How can I do it? Thanks
upvote count: 2
has answer: http://stackoverflow.com/a/27223000
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27222994
has title: How to invoke inline click handler immediately using JQuery?
type: Question

http://stackoverflow.com/q/27310951
type: Question
accepted answer: http://stackoverflow.com/a/27312177
answer count: 2
has body: I have a progress bar that indicates the scroll progress for a page. So if I scroll the page half way down the progress bar width is set to 50%, so it is constantly changing based on where I am on the page. (function(){ var $w = $(window); var $prog = $('.progress-bar'); var wh, h, sHeight; function setSizes(){ wh = $w.height(); h = $('#page-content-wrapper').height(); sHeight = h - wh; } setSizes(); $w.on('scroll', function(){ var perc = Math.max(0, Math.min(1, $w.scrollTop()/sHeight)); updateProgress(perc); }).on('resize', function(){ setSizes(); $w.trigger('scroll'); }); function updateProgress(perc){ $prog.css({width : perc*100 + '%'}); } }()); What I would like to do is append an element to visually indicate the bookmarked position in relation to the progress bar. So let's say I want to add an asterix (*) below the progress bar when I click the bookmark button/link. To do this I need a way of using the current progress bar width and use that to set the appended element position, which I have, though not sure how to apply that in append context. $('#bookmark').on("click", function() { $(".progress-bar").append("&lt;div style='position:absolute; left:xxxx%'&gt;*&lt;/div&gt;"); }); Thank you
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27311583
favorite count: 0
has answer: http://stackoverflow.com/a/27311583
has answer: http://stackoverflow.com/a/27312177
tagged with: css
type: AnsweredQuestion
tagged with: cookies
score: 1
has title: Append element to parent and position based on parent's current width
upvote count: 1

http://stackoverflow.com/comment/43029847
type: AnswerComment
comment on: http://stackoverflow.com/a/27280496
type: Comment
has text: Alternatively, you could use `querySelectorAll`.
score: 1

http://stackoverflow.com/comment/42880826
has text: @GrooveChampion yes, using `scale()` (or with just a bit of math and imagination like margin-left/top: -value; combined with W/H incrementation)
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27198147
type: AnswerComment

http://stackoverflow.com/q/27216601
upvote count: 1
type: Question
tagged with: jquery-animate
tagged with: jquery-pagination
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: JQuery Animate scroll down to the bottom of a long list not working
favorite count: 0
has body: I have a page like this and use jquery pageless for pagination. Now, I need to run a script to scroll down to the bottom. I tried jquery animate in a loop but it doesn't seem to work. 1000000 items ........... Loading more.. And I run this script to continuously scroll down the page for me, it seems ok at first, but it gets slow down more and more after each animation. function loadmore() {$("html, body").animate( { scrollTop: $(document).height()-$(window).height() }, 100, loadmore); }; loadmore();
type: UnansweredQuestion
tagged with: scroll
answer count: 0
score: 1

http://stackoverflow.com/q/27239762
tagged with: python
score: 1
has answer: http://stackoverflow.com/a/27240966
has comment: http://stackoverflow.com/comment/42956491
upvote count: 1
has answer: http://stackoverflow.com/a/27243079
type: Question
has answer: http://stackoverflow.com/a/27240176
has title: Sorting a threaded conversation
has comment: http://stackoverflow.com/comment/42956805
tagged with: javascript
tagged with: sorting
has body: Not sure how to frame this one, but here goes. It's a sorting algorithm question Tools I have to play with are PostgresSQL and python (2.6) on the server and javascript/jquery at the browser end I need to move data that describes a threaded conversation from a postgres DB to a web page. The data starts off in chronological order, I want to display in threads Record numbers are small - should never be more than 100 messages returned So, as a simple example, imagine the table: ID Reply_To Text === ======== ============================= 1 0 Hello World 2 0 Make me a sandwich 3 1 Hello back 4 2 No chance 5 1 Who are you? 6 5 Me of course The end point I want to reach is Hello World Hello Back Who are you? Me of course Make me a sandwich No chance Or, to put it another way... ID Reply_To Text === ======== ============================= 1 0 Hello World 3 1 Hello back 5 1 Who are you? 6 5 Me of course 2 0 Make me a sandwich 4 2 No chance I'm not after a full solution here, all the ajax, json and formatting stuff I'm happy to get on with. I'm just having issues getting my head around the neatest way to manage the sort. SQL? Python? Javascript? I'm currently playing with array sorts in Javascript (for no better reason than the fact that my python skills are exceptionally weak) EDIT At the moment I'm at something like: function byThread(a,b) { if (a.reply &gt; b.id &amp;&amp; a.reply != 0){ console.log("Compared id=" + a.id + " with id=" + b.id + " and returned -1 ") return -1; } if (a.id &gt; b.reply &amp;&amp; b.reply != 0 ){ console.log("Compared id=" + a.id + " with id=" + b.id + " and returned 1 ") return 1; } console.log("Compared id=" + a.id + " with id=" + b.id + " and returned 0 ") return 0; } msg.sort(byThread); And it's frustratingly close
answer count: 3
tagged with: sql
has comment: http://stackoverflow.com/comment/42956757
linked to: http://stackoverflow.com/q/3307480
downvote count: 0
favorite count: 0
tagged with: postgresql
type: UnansweredQuestion

http://stackoverflow.com/q/27193301
tagged with: clone
downvote count: 0
tagged with: dom
type: Question
has title: Node.cloneNode() inconsistent with DOM Spec
accepted answer: http://stackoverflow.com/a/27193851
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/27193851
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 3
has body: It is well documented (mainly on SO) that using Node.cloneNode(true) on an &lt;input type="text"&gt; returns a new &lt;input&gt; node with the same text contents as the original one, but cloning a &lt;select&gt; (after a user has chosen) returns a new &lt;select&gt; without the user selection. This at first seems to not follow the spec, because according to DOM 3: cloneNode Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent (parentNode is null) and no user data. User data associated to the imported node is not carried over. The answer to why this happens is somewhat spelled out later, but it is more clear in the DOM 2 spec, cloneNode Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. I'm willing to accept this behavior given this wording, although I'd argue that an &lt;input&gt; doesn't contain a text node, because the childNodes property of an &lt;input&gt; will always be an empty NodeList regardless if it contains text (in the spec's wording, "has a text node"). At the least, I understand that which &lt;option&gt; a user selects is considered user data, so it makes sense that this is not cloned. In this case, this "user data" is contained in the selected property of the &lt;option&gt;. However, when trying the behavior with radio buttons and checkboxes, the behavior in Chrome 38, FF 33, Safari 6.2, completely defies the above definition. Cloning checked checkboxes or selected radio buttons maintains their checked state. This seems to be contrary to the spec, since this information is "user data," which (like the &lt;select&gt;) is contained in a property (in this instance checked). Am I correct that this does not align with the specification? If not, is there elsewhere where this b…

http://stackoverflow.com/a/27246476
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27246192
has body: What you want to do is to call javascript code upon clicking your link which finds out the next element to be highlighted. For example when the link 'Next' which you want to use to change the active tab to the next tab is clicked, your code could look like this: var tabs = $("days li"); //get all your tabs var firstTab= $(tabs[0]); //this represents the first tab tabs.each(function(index){ if($(this).hasClass('active'){ $(this).toggleClass(active); if(index &lt; tabs.length - 1){ //the active tab has a next tab following it, activate it $(tabs[index+1]).toggleClass('active'); return false; } else{ //the last tab was the active tab, so we have to start from the first tab firstTab.toggleClass('active'); return false } } }); Now you can put this into a function selectNextTab and tell your browser to call this function when your link was clicked. If you have other buttons that are supposed to do the same in a different place just make sure they have the 'next' class. $(".next").click(function () { selectNextTab(); });
type: Answer

http://stackoverflow.com/comment/43004880
comment on: http://stackoverflow.com/q/27266879
has text: http://jsfiddle.net/d2sxmn1L/1 it's working
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42936083
score: 0
type: QuestionComment
has text: how do you know its still in memory?
type: Comment
comment on: http://stackoverflow.com/q/27229275

if-statement
tags question: http://stackoverflow.com/q/27174882
tags question: http://stackoverflow.com/q/27196868
tag name: if-statement
type: Tag
tags question: http://stackoverflow.com/q/27161399
tags question: http://stackoverflow.com/q/27242366
tags question: http://stackoverflow.com/q/27293911
tags question: http://stackoverflow.com/q/27222757
tags question: http://stackoverflow.com/q/27293037
tags question: http://stackoverflow.com/q/27155138
tags question: http://stackoverflow.com/q/27227658
tags question: http://stackoverflow.com/q/27256291
tags question: http://stackoverflow.com/q/27229350
tags question: http://stackoverflow.com/q/27296762
tags question: http://stackoverflow.com/q/27250221

http://stackoverflow.com/comment/42823108
comment on: http://stackoverflow.com/a/27165150
type: AnswerComment
score: 0
has text: Thanks a lot , is there any way of giving transition of arrows in the clickable div, upward when the slide moves up and downward when moves down....
type: Comment

http://stackoverflow.com/comment/42816599
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27161528
has text: Why don't you use an iframe?

http://stackoverflow.com/a/32840724
has body: if you have a variable number of children then you can use that: Using apply function which take an array of parameters. React.createElement.apply(this, ['tbody', {your setting}].concat(this.renderLineList())) where renderLineList is for instance: renderLineList: function() { var data=this.props.data; var lineList=[]; data.map(function(line) { lineList.push(React.createElement('tr', {your setting})); }); return lineList; }
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/56504059
type: Answer
answers question: http://stackoverflow.com/q/27290013
has comment: http://stackoverflow.com/comment/128944042
score: 4

http://stackoverflow.com/comment/43084187
comment on: http://stackoverflow.com/a/27311476
type: AnswerComment
has text: @Anuket, kindly check my post
score: 0
type: Comment

http://stackoverflow.com/comment/42836554
score: 1
comment on: http://stackoverflow.com/q/27170535
type: QuestionComment
type: Comment
has text: @Pablo yah, just testing purpose only. By the way thank you very much

http://stackoverflow.com/q/27286476
has answer: http://stackoverflow.com/a/27286803
has body: Hey guys is it possible to have 3 iframes next to one another side by side instead of it going down the page vertically? Here is the iframe code i need put next to one another. echo(" Daniel talks about the Austplan model. "); echo(" Peace of mind. "); echo(" WHO IS DANIEL RENNEBERG?. "); Any help would be much appreciated. Thankyou.
has title: Multiple iFrames Next To One Another
has answer: http://stackoverflow.com/a/27286563
answer count: 5
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27286518
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27289123
type: Question
tagged with: iframe
upvote count: 1
has answer: http://stackoverflow.com/a/27286517

http://stackoverflow.com/q/27286566
has comment: http://stackoverflow.com/comment/43050782
tagged with: amazon-sns
has title: Using Amazon Simple Notification Service (SNS) in the client-side
type: Question
tagged with: javascript
tagged with: amazon-web-services
score: 0
answer count: 2
has body: is possible to use the AWS SNS in the client, with Javascript?? I am creating a website that has a booking form , and I would like to send an email notification as soon as the user presses the submit button, for this I thought of using the Simple Notification Service, however I 'm not finding the documentation using with the client side. Would anyone tell me if it is possible ? I've searched on google and did not get a satisfactory answer.
has answer: http://stackoverflow.com/a/27338889
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27338797

http://stackoverflow.com/comment/43145260
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27221994
type: Comment
has text: What version are you using?

http://stackoverflow.com/a/27267241
type: Answer
has body: Download the file from your JavaScript as a JSON or XML blob with an Ajax request.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43005479
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27267097
accepted answer of: http://stackoverflow.com/q/27267097

http://stackoverflow.com/a/27224160
downvote count: 0
type: Answer
has body: You can select the parent's siblings and remove the class. $(function () { $("button").click(function () { $(this).parent().toggleClass("expandthebox", 1500); $(this).parent().siblings().removeClass('expandthebox', 1500) return false; }); }); Fiddle
score: 1
answers question: http://stackoverflow.com/q/27223965
upvote count: 1

http://stackoverflow.com/comment/43102642
has text: thats no problem. when you click on an item, clone the whole list, and append a new one with data. when you go back append the clone list. Basic Demo. try "Infiniti, G37" http://jsfiddle.net/z5sa9z5g/
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27298215
type: AnswerComment

http://stackoverflow.com/q/27259837
tagged with: http://stackoverflow.com/tag/html
has title: Hide tooltip on hover?
answer count: 1
tagged with: jquery-ui-tooltip
type: UnansweredQuestion
tagged with: css
type: Question
tagged with: tooltip
tagged with: javascript
score: 0
has body: We use tooltips, to display color names on a color picker. You can see the result here: www.printnil.com Unfortunately the tooltips does not work really good. The problem is, when you cursor is in the middle of the color picker and you move the cursor up to a further color, the tooltip doesn not disappear. We need to find a solution to hide the tooltips, if you hover a new color or the the tooltip. ... We tried to move the tooltip upwards, so we get a little gap between the the color and the tooltip. But if you move the mouse faster you catch the transition effect. Maybe some JavaScript? /** Color Swatches **/ .swatch { float: left; width: 100%; margin: 0px 0px 10px 0px; } .swatch .header { margin: 0.5em 0; } .swatch input { display:none; } .swatch label { width: 100%; height: 40px; float:left; margin:0; } .swatch-element label { cursor: pointer; } .swatch .swatch-element { width: 20%; height: 40px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float:left; -webkit-transform:translateZ(0); -webkit-font-smoothing:antialiased; position:relative; } .swatch input:checked + label { text-align: center; width: 100%; } .swatch input:checked + label:before { font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\e607"; line-height: 40px; font-size: 15px; color: #fff; background: rgba(0,0,0,0.45); padding: 6px; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; } .swatch .tooltip { font: normal 12px sans-serif; text-align:center; background: #27282b; color:#fff; bottom:100%; padding: 10px; display:block; position:absolute; width:140%; left: -20%; margin-bottom:15px; filter:alpha(opacity=0); -khtml-opacity: 0; -moz-opacity: 0; opacity:0; visibility:hidden; -webkit-transform: translateY(10px); -moz-transform: translateY(10px); -ms-transform: translateY(10…
has answer: http://stackoverflow.com/a/27260044

http://stackoverflow.com/q/27264120
tagged with: javascript
has title: Image SlideShow using javaScript and HTML5
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27264141
type: UnansweredQuestion
tagged with: css
type: Question
has body: I am writing code for image slide Show using Java Script and HTML 5. I am using SetInterval() method to call ImageSlider Function repeatedly. Problem is Imageslider function is called only once. Here is my code Online Booking
answer count: 1

http://stackoverflow.com/a/27212905
type: Answer
has body: Here is all ok, your issue in parent height, so if in your jsfiddle you will add: body{ height:100%; } html{ height:100%; } it will work, but in your own code in your site, check all your parents for this iframe, if they have height 100%.
answers question: http://stackoverflow.com/q/27212131
score: 0

http://stackoverflow.com/q/27155081
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27155933
upvote count: 2
has body: What Angular says... [ngSubmit] prevents the default action (which for form means sending the request to the server and reloading the current page), but only if the form does not contain action, data-action, or x-action attributes. So if you were unable to remove the [action] attribute from HTML, how would you override this behavior to inject custom code on form submittion and prevent the defined [action] to get triggered? One possible solution is to create a directive and override the DOM property "onsubmit". The CONS here is you are forced to configure it on backend when you could reach the same using the angular attribute app.directive("contactForm", function(){ return { link: function( scp, elm, att ) { elm[0].onsubmit = function( evt ) { /* your custom code here */ } } }; }); Thanks in advance
has comment: http://stackoverflow.com/comment/42805522
tagged with: dom
has comment: http://stackoverflow.com/comment/42806546
type: Question
has comment: http://stackoverflow.com/comment/42806000
tagged with: javascript
answer count: 2
tagged with: ng-submit
downvote count: 0
has title: Forcing ngSubmit in presence of [action] attribute
has comment: http://stackoverflow.com/comment/42805761
favorite count: 0
possible better answer: http://stackoverflow.com/a/30717229
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27155933
has answer: http://stackoverflow.com/a/30717229

http://stackoverflow.com/comment/43084484
comment on: http://stackoverflow.com/a/27311175
type: AnswerComment
has text: Thanks Yogesh for your quick reply. The solution seems good. But i afraid that the Server will take too much resource if the parent document grows big (in the range of few thousands).
score: 0
type: Comment

http://stackoverflow.com/q/27269766
tagged with: node.js
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43011133
has comment: http://stackoverflow.com/comment/43010924
has title: Regex in Express.js router
has body: I'm trying to find some documentation about regex in Express, but the information in Express API is very sparse. I'm trying to do a regex matching objectID. This example about regex is given in the Express documentation. router.get(/^\/commits\/(\w+)(?:\.\.(\w+))?$/, function(req, res){ ... }); I have tried the following in my router, and it seems to work fine. client.get('/staff/:id([0-9a-fA-F]{24})', function(req, res) { ... }); But there are some differences that i can't figure out... My example is surrounded in ', the example in the API is not. What does this mean? Is my expression a string and not a regex? I dont use: /^ or ?$/. Not knowing much about regex I guess this is some kind of anchors. Do i need this? I dont escape \ the first part of my URL /staff/:id. Is this something i should do? Also, does anyone know about a extensive resource for reading about regex in Express routers... or parameter options or whatever it is I'm doing above...
type: Question
has answer: http://stackoverflow.com/a/27269924
tagged with: javascript
tagged with: express
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/43010692
favorite count: 0
type: UnansweredQuestion
tagged with: regex

http://stackoverflow.com/q/27226978
has comment: http://stackoverflow.com/comment/42933214
answer count: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42932105
type: UnansweredQuestion
has body: I am facing a complex situation in which parent window is calling showModelDialog box to submit a form. When form is submitted it goes to a struts2 action. Action does some work and then redirects to parent page again. Thus full parent page is refreshed again. I want that after user click on submit in child window. Child window should close and results needs to be updated only on specific part of parent window. function calling child window: function createRegularFile() { var userAgent = navigator.userAgent; var appName = navigator.appName; window.name="WorklistFiles"; alert("before="+UserFiles.innerHTML); if(appName=="Microsoft Internet Explorer") { window.showModalDialog("createFilePrepareFilesAction.action",window,"help:no;dialogheight:400px;dialogwidth:500px;status:0;"); } else{var abc=window.open("createFilePrepareFilesAction.action","window","HEIGHT=400,WIDTH=500,screenX=80,left=300,screenY=50,top=200,scrollbars=1,resizable=yes"); } function in child window: function create() { //other code document.createRegularFile.action="createFileFilesAction.action"; document.createRegularFile.submit(); window.close(); } Action code: createFile() { //some code. return "parent" } Struts.xml: worklistWorklistAction ${error.get(0)} Parent.jsp Contains code which displays a table using <s:iterator> Only this table needs to be updated after successful submission. I know how to use AJAX but not able to find way to implement it in this situation.
has answer: http://stackoverflow.com/a/27228045
score: 0
type: Question
has comment: http://stackoverflow.com/comment/42932885
has comment: http://stackoverflow.com/comment/42931778
tagged with: javascript
tagged with: forms
tagged with: struts2
has title: How to display results in parent window after form submission in showModelDialog box using ajax

http://stackoverflow.com/comment/43047870
score: 0
has text: There's no minimum spacing between labels. The only thing you can affect is the labels themselves.
type: QuestionComment
comment on: http://stackoverflow.com/q/27290587
type: Comment

http://stackoverflow.com/a/28329781
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27270291
has body: I managed to get it working via element.focus() (tested in iOS 8, Cordova application) So: $('select').on('touchend', function(ev) { ev.preventDefault(); ev.target.focus(); });
downvote count: 0

http://stackoverflow.com/q/27267894
tagged with: opengl-es
favorite count: 0
tagged with: fbo
has answer: http://stackoverflow.com/a/27350805
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43077730
tagged with: webgl
upvote count: 1
has body: I am trying to use WebGL to render a scene to a framebuffer and look at the color value of a specified pixel (the one that is clicked on). The issue is when I try and get pixel data using gl.readPixels all pixels but (0,0) return null values (0,0,0,0). The (0,0) pixel (top left corner) returns what is expected, which is the clear color used for the framebuffer. Here is the main part of the code I am using: gl.bindFramebuffer( gl.FRAMEBUFFER, fbo ); gl.viewport( 0, 0, canvas.width, canvas.height ); gl.clearColor( 1.0, 1.0, 1.0, 1.0 ); gl.clearDepth( 1.0 ); gl.clear( gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT ); // render code goes here var pixelData = new Uint8Array( 4 ); gl.readPixels( screenPositionX, screenPositionY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixelData ); gl.bindFramebuffer( gl.FRAMEBUFFER, null ); If I use gl.readPixels on the rendered scene, I get the correct results, but not when I am using it on the framebuffer. I suppose this means I could render the framebuffer and then use gl.readPixels, but I would prefer not to do this as the framebuffer is not meant to be seen and is instead used for data collection. Any info or suggestions? EDIT: I have found the solution and posted it below.
type: Question
has title: WebGL Framebuffer ClearColor Only Affects (0,0) Pixel
tagged with: framebuffer
has comment: http://stackoverflow.com/comment/43006741
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27350805
has comment: http://stackoverflow.com/comment/43021443
answer count: 1
downvote count: 0
score: 1

http://stackoverflow.com/comment/42988750
score: 0
comment on: http://stackoverflow.com/q/27256983
type: QuestionComment
type: Comment
has text: `Access-Control-Allow-Origin` is a response header, not a request header. Trying to use it as a request header will break an otherwise correct CORS setup (because it's a non-simple request header).

http://stackoverflow.com/comment/42815911
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27160917
has text: What would I be requesting on the response page? Or in other words, how will I know which cell is clicked? (_REQUEST[' '] )

http://stackoverflow.com/a/27156608
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27156306
has body: You shouldn't need to use angular.element if you are doing things within a directive. If you want to use angular.element in code, you are probably better off using jQuery. I put together a sample jsfiddle that binds a directive to a pre-defined class (some-known-parent-class) and searches for all the "i" elements under it and adds newClass class to it: var mod = angular.module("myApp", []); mod.directive("someKnownParentClass", function () { return { restrict: "C", link: function (scope, element, attrs) { element.find("i").addClass("newClass"); } } }); This way, you are decoupling the direct DOM manipulation (i.e. angular.element) through using a directive to do the manipulation. Fiddle here.

http://stackoverflow.com/comment/43073158
type: AnswerComment
comment on: http://stackoverflow.com/a/27304734
score: 0
has text: <ng-style="{'border-right-color':[currentData.colorCode]}"> The above code is working perfectly fine with the tabs border. I want to set the border color for the active tab.
type: Comment

http://stackoverflow.com/q/27278915
has comment: http://stackoverflow.com/comment/43060044
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
tagged with: wpf
has title: WPF - Call a Javascript in a WebBrowser
tagged with: c#
tagged with: java
has body: I have a WebBrowser control in my WPF Descktop Aplication, i need to open this webbrowser in the form starts and make this code to do this: public LibrasPlayer() { InitializeComponent(); LibrasPlayerWeb.LoadCompleted += webb_LoadCompleted; } void webb_LoadCompleted(object sender, NavigationEventArgs e) { LibrasPlayerWeb.InvokeScript("stop"); } But when the code reach in "LibrasPlayerWeb.InvokeScript("stop");" have an error of (DISP_E_UNKNOWNNAME)), this web page use Javascript to comunicate with a java engine to make a player of libras language, but all of InvokeScripts (Stop, Start, and other methods) give me this error. Someone have any idea about how i can work with this?
has comment: http://stackoverflow.com/comment/43029731
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43063690
has comment: http://stackoverflow.com/comment/43047876
score: 0

http://stackoverflow.com/comment/42824416
comment on: http://stackoverflow.com/q/27159109
type: QuestionComment
has text: @Bergi Actually, that has not much to do with my question. However, it is also very interesting! Thank you!
score: 0
type: Comment

http://stackoverflow.com/comment/44295612
type: Comment
has text: Thanks, this helped me! Also, I put this allow/deny code in the shared (client/server) folder.
score: 0
comment on: http://stackoverflow.com/a/27292800
type: AnswerComment

http://stackoverflow.com/q/27276997
favorite count: 0
has answer: http://stackoverflow.com/a/27279302
tagged with: selectors-api
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/31959420
downvote count: 1
type: Question
has body: I wrote a webpage (with HTML, CSS, and javascript) which loads information from an XML file to "fill in the blanks" in the elements on the page. Everything works perfectly unless I load the page in Internet Explorer (I'm using IE 11.0). I've had a few problems and worked around a couple of them, but new problems keep popping up, so I think I just don't understand how IE deals with XML. The error I'm getting is: Unable to get property 'querySelectorAll' of undefined or null reference when I use the code: selectedBookNodeList = bookDataDocument.getElementById(bookId); In the IE debugger it shows "selectedBookNodeList" as NULL, but the bookDataDocument is NOT null. Again, this works perfectly fine in Chrome and Firefox (here's a link: http://www.pattmayne.com/stories2/). Why is it NULL in IE11, but it works fine in the other browsers?? Here is all the code: var bookPage; var bookDataDocument; var XMLConnection; var bookDataRootNode; var selectedBookNode; var bookDescription; var bookDescription2; var bookDescription3; var bookImage; var bookTitle; var paperbackLink; var ebookLink; function setupXML() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari XMLConnection=new XMLHttpRequest(); } else {// code for IE6, IE5 XMLConnection=new ActiveXObject("Microsoft.XMLHTTP"); } XMLConnection.open("GET", "novels/book_data.xml", false); XMLConnection.send(null); bookDataDocument = XMLConnection.responseXML; } function setBook(bookId) { selectedBookNodeList = bookDataDocument.getElementById(bookId); bookTitle = selectedBookNodeList.querySelectorAll("title").item(0).childNodes[0].nodeValue; bookDescription = selectedBookNodeList.querySelectorAll("description").item(0).childNodes[0].nodeValue; bookDescription2 = selectedBookNodeList.querySelectorAll("description2").item(0).childNodes[0].nodeValue; bookDescription3 = selectedBookNodeList.querySelectorAll("description3").item(0).childNodes[0].nodeValue; ebookLink = selectedBookNodeList.querySelectorAll("ebo…
tagged with: httprequest
score: 0
answer count: 2
has title: Internet Explorer 11 won't read "getElementById" for XML and returns null
tagged with: javascript

http://stackoverflow.com/q/27168074
answer count: 1
has answer: http://stackoverflow.com/a/43870409
has body: When I run my PhantomJS script in debug mode, I see sometimes this error : [DEBUG] Network - Resource request error: 5 ( "Operation canceled" ). When I run my script 1000 times, I've this error 1 or 2 times. I want to catch it without running my script in debug mode but I don't know how ! I try several error handlers : phantom.onError = function(msg, trace) { console.log("PhantomJS onError\n"); }; page.onError = function(msg, trace) { console.log("PhantomJS onError\n"); }; page.onResourceError = function(resourceError) { console.log("PhantomJS onResourceError\n"); }; page.onResourceTimeout = function(req) { console.error('PhantomJS onResourceTimeout\n'); }; page.onLoadFinished = function(status) { if (status != 'success') { console.error('PhantomJS onLoadFinished Error\n'); } }; Do you have an idea for me ? How can I catch this error ? I use PhantomJS 1.9.7 x64 on Unix. Thanks,
type: UnansweredQuestion
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/42827930
type: Question
has title: PhantomJS - Handling Network Error
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42829466

liferay
tags question: http://stackoverflow.com/q/27193831
tags question: http://stackoverflow.com/q/27288372
tag name: liferay
tags question: http://stackoverflow.com/q/27272760
tags question: http://stackoverflow.com/q/27175171
type: Tag

http://stackoverflow.com/comment/43085172
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27312208
has text: Also your button is inside the `div` element that animates to the left. now reading your question you want to show somethng on the right... to come from the right edge of the screen? Can you please give us an experimental demo so we can really see what you've got so far? All we can see is currently: http://jsbin.com/paguc/1/edit?html,css,output
score: 0

http://stackoverflow.com/comment/43006010
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27267403
has text: i'm not able to post the picture due to reputation count. pardon my ignorance
type: AnswerComment

http://stackoverflow.com/comment/42829027
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27167567
has text: ok, just beware that withCredentials is necessary to send the auth cookies :)

http://stackoverflow.com/comment/42992386
comment on: http://stackoverflow.com/a/27259020
type: Comment
has text: I tried a few different things, but it did not work. Then, I read all of the comments again to better understand how it works, and thanks to @plbsam's new explanation, I was able to achieve it. Thanks guys! =]
score: 1
type: AnswerComment

http://stackoverflow.com/q/27284699
has title: Two drop down lists form to get one url
upvote count: 0
tagged with: javascript
score: -1
answer count: 2
accepted answer: http://stackoverflow.com/a/27284761
has answer: http://stackoverflow.com/a/27284786
has comment: http://stackoverflow.com/comment/43037316
has comment: http://stackoverflow.com/comment/43037340
favorite count: 0
has answer: http://stackoverflow.com/a/27284761
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27284786
tagged with: forms
downvote count: 1
type: Question
has body: I would like to create two dropdown lists form, for example the first one would have "Advice A" and "Advice B" and the second one would have "Advice 1" and "Advice 2" For example, a visitor would choose "Advice A" from the first dropdown list and "Advice 2" from the second dropdown list. After clicking on the submit button, he would be redirected to http://www.domain.com/advice-a/advice-2/ How could i do this? I only found example code of list 1 which would modify list 2 on Google, which doesn't help me.

http://stackoverflow.com/comment/43003414
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27266079
has text: are you resizing the element? if yes then put this `if($('#bar')..` code in that event.

http://stackoverflow.com/q/27248043
tagged with: requirejs
possible better answer: http://stackoverflow.com/a/27252931
has comment: http://stackoverflow.com/comment/42978497
score: 2
has answer: http://stackoverflow.com/a/27252931
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27289307
has comment: http://stackoverflow.com/comment/42979152
has comment: http://stackoverflow.com/comment/42977894
tagged with: knockout.js
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43005656
has comment: http://stackoverflow.com/comment/43006605
downvote count: 0
has title: RequireJS: how to add a prefix to path
tagged with: javascript
favorite count: 0
has body: I'm developing a SPA using Knockout.js V3 and RequireJS. I have ko components written like this: define(['text!settings.html'], function( htmlString) { 'use strict'; function SettingsViewModel(params) { ... } // Return component definition return { viewModel: SettingsViewModel, template: htmlString }; }); Now i want to support localization and for that I have duplicated html for each supported language, so for example: en/settings.html de/settings.html se/settings.html I would like to let the user change a language and refresh the app with the new language, is it possible to instruct require text plugin to add the language prefix to all html, so when i write: text!settings.html it will actually load: text!de/settings.html
accepted answer: http://stackoverflow.com/a/27289307
tagged with: http://stackoverflow.com/tag/html
tagged with: single-page-application
upvote count: 2

http://stackoverflow.com/a/27263643
score: 0
answers question: http://stackoverflow.com/q/27263392
type: Answer
has body: You could combine both buttons and a text input into single form and use JavaScript (via onclick attribute) to change form action based on the button clicked. Locate Pilgrim View BioData

http://stackoverflow.com/a/27180722
answers question: http://stackoverflow.com/q/27180680
score: 0
has comment: http://stackoverflow.com/comment/42870641
has body: You can declare a variable outside of the anonymous function and just assign the one inside as its value. (do it this way if you plan to reuse goldenTreasure for another purpose inside the anonymous function. var some; $(document).ready(function() { var goldenTreasure = "Tasty Loins"; some = goldenTreasure; }
type: Answer

http://stackoverflow.com/q/27153233
has answer: http://stackoverflow.com/a/27153314
answer count: 2
tagged with: javascript
score: 0
tagged with: translate-animation
has answer: http://stackoverflow.com/a/27154729
tagged with: css
has body: When my grid of post loads, the posts load at position zero. Then translate3d/width grab their values and they go to right place: http://www.marianoshoes.com/the-journal/ How can I disable this weird javascript/css animation, using css? Thanks!
type: UnansweredQuestion
has title: disable css/javascript animation (transform: translate3d)
type: Question
tagged with: translate3d
tagged with: transform

http://stackoverflow.com/a/36789537
downvote count: 1
answers question: http://stackoverflow.com/q/27221364
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/61290760
score: 4
has body: It is probable that you might have already found a solution. I faced the same problem today and this is how I solved it in plain javascript: var xhr = new XMLHttpRequest(); xhr.open('GET', 'assets/object/sample.zip', true); xhr.responseType = 'arraybuffer'; xhr.onload = function(e) { // response is unsigned 8 bit integer var responseArray = new Uint8Array(this.response); var blobData = new Blob([responseArray], { type: 'application/zip' }); zip.createReader(new zip.BlobReader(blobData), function(zipReader) { zipReader.getEntries(displayEntries); }, onerror); }; xhr.send(); The problem I see in your code is that you are changing the value to Uint8Array and assigning it to var a, but still use the raw data in blobreader. Also the blob reader required blob and not an array. So you should have converted var a into blob and then used it for reading.

http://stackoverflow.com/comment/42818799
type: QuestionComment
comment on: http://stackoverflow.com/q/27157350
has text: Just curious, what does the console.log look like if you echo a "before xx" and "after xx" for each component? Perhaps its possible that the nested component fires a before/etc event properly, despite "after" not working right? That could be used to manually track when the process is finished.
score: 0
type: Comment

http://stackoverflow.com/comment/42912102
type: Comment
has text: Just noticed that the fiddle includes ArinCool's suggestion as well for one of the controls, but as you can see, neither approach works.
score: 0
comment on: http://stackoverflow.com/q/27215381
type: QuestionComment

http://stackoverflow.com/comment/42814367
has text: um i dont quite understand you, do you mean for example -7708.748564 i just add 7708.747564 and just make the height bigger?
type: QuestionComment
comment on: http://stackoverflow.com/q/27160061
score: 0
type: Comment

http://stackoverflow.com/comment/42914672
type: AnswerComment
comment on: http://stackoverflow.com/a/27216605
type: Comment
has text: getPage() function gets the .php page via ajax `.load()`. When it's finished loading it animates the old page out, and new page in via `.animate()`. Now I use your code in the animation callback. Everything works great, except when I change the page and go back again, I get stacks of `<script type="text/javascript" charset="UTF-8" src="https://mts1.googleapis.com/vt?... `, that appear to be only temporary (~20sec). Could this cause any problems?
score: 0

http://stackoverflow.com/comment/43120016
has text: I don't understand the downvote. This is a perfectly valid answer, and quite complete if you ask me. +1
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27210835

http://stackoverflow.com/comment/43047347
has text: Really? I was under the impression (based on this doc https://developers.google.com/maps/documentation/javascript/reference#LatLng) that any LatLng object could be substituted with a LatLng literal, which is the hash representation I was using. Is that not correct?
score: 1
comment on: http://stackoverflow.com/a/27290411
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43063957
type: QuestionComment
comment on: http://stackoverflow.com/q/27299997
score: 0
has text: Re-running a jQuery selector (even a fast ID one) is a bad idea. Use a local var to store it e.g. `var $length = $("#Length");`
type: Comment

http://stackoverflow.com/comment/43022949
score: 2
has text: I'm dying to know why you want this!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27276981

http://stackoverflow.com/q/27174882
downvote count: 1
has comment: http://stackoverflow.com/comment/42839724
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27174999
tagged with: if-statement
score: -1
has body: initial apologies if the question is not worded the best. it's been a long day of JS and this is probably my final question of the day on here. so here goes.... firstly, my code: this is the JS function passwordValidation(){ var uname = document.getElementById("username").value; var pword = document.getElementById("password").value; var userTB = document.getElementById("username"); var passTB = document.getElementById("password"); var userTBLength = userTB.length; var passTBLength = passTB.length; var matchCol = "#009900"; var noMatchCol = "#CC0000"; var noBg = "#FFFFFF"; if (uname.length &lt; 1){ password.style.backgroundColor = noBg; }else if (username.value == password.value){ match = "Match!"; password.style.backgroundColor = matchCol; } else if (username.value != password.value{ match = "No Match!"; password.style.backgroundColor = noMatchCol; } document.getElementById("combination").innerHTML = match; } this is my html &lt;form&gt; Username: &lt;input type="text" name="username" id="username" autocomplete="off" &gt; &lt;br&gt;&lt;br&gt; Password: &lt;input type="text" name="password" id="password" onkeyup="passwordValidation()"&gt; &lt;br&gt; &lt;/form&gt; Basically it is a password validation form where if the passwords match, then it prints out match and the second field is turned green (this works). prints out no match and in red if it doesn't match (this also works). my question, and a persnickety one it is, is regarding when both fields are blank. i.e length 0 it's unnecessary but I would like to achieve it to complete a successful day. initially when the page loads up both the boxes are blank or white. when the user starts typing the second box turns green or red (this is great). issue is that when you delete values from both boxes it still stays green as obviously "blank" matches with "blank". All I would like is that when they are blank they constantly have a white background and feel like my function should be achieving that...
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/42839410
possible better answer: http://stackoverflow.com/a/27175392
tagged with: javascript
has answer: http://stackoverflow.com/a/27175392
favorite count: 0
has comment: http://stackoverflow.com/comment/42839741
answer count: 3
has comment: http://stackoverflow.com/comment/42839383
has title: Understanding JavaScript if statements combined with text box length
has comment: http://stackoverflow.com/comment/42839588
has answer: http://stackoverflow.com/a/27174999
has answer: http://stackoverflow.com/a/27175424

http://stackoverflow.com/q/27290354
type: Question
has comment: http://stackoverflow.com/comment/96216527
tagged with: reactjs
tagged with: client-server
has comment: http://stackoverflow.com/comment/132507941
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27291188
possible better answer: http://stackoverflow.com/a/46509510
has answer: http://stackoverflow.com/a/44593699
has answer: http://stackoverflow.com/a/46509510
favorite count: 0
score: 169
answer count: 4
has answer: http://stackoverflow.com/a/54715407
tagged with: node.js
has answer: http://stackoverflow.com/a/27291188
upvote count: 169
type: AnsweredQuestion
has body: I just have began to study ReactJS and found that it gives you 2 ways to render pages: server-side and client-side. But, I can't understand how to use it together. Is it 2 separate ways to build the application, or can they be used together? If we can use it together, how to do it - do we need to duplicate the same elements on the server side and client side? Or, can we just build the static parts of our application on the server, and the dynamic parts on the client side, without any connection to the server side that was already pre-rendered?
has title: ReactJS server-side rendering vs client-side rendering

http://stackoverflow.com/comment/43072679
type: Comment
comment on: http://stackoverflow.com/a/27299986
type: AnswerComment
has text: It's an animated gif so I have to load the full image. I wonder if I could lazy load. Basically, load the page then a load the gif without compromising the page itself. Make sense?
score: 0

http://stackoverflow.com/q/27238444
type: Question
linked to: http://stackoverflow.com/q/27106349
tagged with: javascript
has title: Bootstrap tour infinite loop
downvote count: 0
score: 1
favorite count: 0
tagged with: bootstrap-tour
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47242827
upvote count: 1
has body: I am trying to get the tour to redirect to another page, but when it redirects it enters a loop. tried all i can. Right now i am using path, i have tried using onNext and the tour just doesn't work. Here is my code: &lt;script&gt; // Instance the tour var tour = new Tour({ steps: [ &lt;?php if(!$master_id) { ?&gt; { placement:"bottom", backdrop:true, duration:5000, element: "#user_signin", title: "Sign in to your account", content: "Click here to see the sign in form" }, { placement:"bottom", backdrop:true, duration:5000, element: "#user_signup", title: "Create a new account", content: "Click here to see the sign up form" }, &lt;?php } ?&gt; { placement:"bottom", backdrop:true, duration:5000, element: "#user_location", title: "Choose your location", content: "Select your location so we can show you tailored results and service providers close to you." }, { placement:"top", backdrop:true, duration:5000, element: "#autocomplete", title: "Search for a service", content: "Search for any service you require, our service categories range from automobile repairs to fashion design." }, { placement:"top", backdrop:true, duration:5000, element: "#autocompleteCity", title: "Select a location", content: "You can also select a particular location and search for a service in that location" }, { placement:"top", backdrop:true, duration:5000, element: "#all_categories", title: "Select a service category", content: "Visit a service category and view businesses in that category and those around you" }, { placement:"top", backdrop:true, duration:5000, element: "#footer", title: "Useful links", content: "Other useful links you may need." }, { placement:"top", backdrop:true, duration:5000, element: "#google_translate_element", title: "Choose your language", content: "Not fluent in english? select your prefered language." }, { path: "s.php", placement:"bottom", backdrop:true, duration:4000, element: "#all_search_result", title: "View all results", content: "View all results from your sea…
answer count: 0
has comment: http://stackoverflow.com/comment/53649716
has comment: http://stackoverflow.com/comment/47281849

http://stackoverflow.com/comment/43070538
comment on: http://stackoverflow.com/a/27276684
score: 0
type: AnswerComment
has text: "... for a webbased portal" *requires* InDesign Server. Adobe does not allow the desktop version to be used for something like that.
type: Comment

http://stackoverflow.com/a/27291261
score: 0
type: Answer
has body: your markup is wrong remove data-ride="carousel" from your markup
answers question: http://stackoverflow.com/q/27290926
accepted answer of: http://stackoverflow.com/q/27290926
has comment: http://stackoverflow.com/comment/43048303
type: AcceptedAnswer

http://stackoverflow.com/q/27155440
has answer: http://stackoverflow.com/a/61127715
type: UnansweredQuestion
tagged with: xsd
tagged with: node.js
downvote count: 0
has title: Is there an XSD validator for Node.js
score: 12
type: Question
has answer: http://stackoverflow.com/a/36301895
tagged with: javascript
has answer: http://stackoverflow.com/a/35772477
answer count: 3
has comment: http://stackoverflow.com/comment/42805567
has body: I need to validate XML in a node.js application.I have found this, but it's basically a java plugin, and despite the excellent pun making opportunities, I would prefer not to use Java in my JavaScript. So is there a native node module that can validate XML based on an XSD schema? (1.1 compatibility very much preferred)
has comment: http://stackoverflow.com/comment/42805218
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
upvote count: 12

http://stackoverflow.com/comment/42896110
has text: your own c'tor - not a problem. an override c'tor based on dom settings... not so much. can you share what's in your mind for such a demand?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27206389

http://stackoverflow.com/comment/42837946
comment on: http://stackoverflow.com/a/27173831
type: Comment
type: AnswerComment
has text: @samtam try change your code self. I wrote about your errors.
score: 0

http://stackoverflow.com/q/27217388
tagged with: javascript
score: 6
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/27276933
favorite count: 0
has answer: http://stackoverflow.com/a/44485364
type: Question
has comment: http://stackoverflow.com/comment/82547580
answer count: 2
tagged with: three.js
tagged with: merge
upvote count: 6
possible better answer: http://stackoverflow.com/a/44485364
tagged with: mesh
has body: I want to create a Pine using 2 meshes, 1 for the trunk and another one for the bush, this what I've done: var pine_geometry = new THREE.Geometry(); var pine_texture_1 = THREE.ImageUtils.loadTexture('./res/textures/4.jpg'); var pine_geometry_1 = new THREE.CylinderGeometry(25, 25, 50, 6); var pine_material_1 = new THREE.MeshBasicMaterial({ map : pine_texture_1 }); var pine_1 = new THREE.Mesh(pine_geometry_1); pine_1.position.x = x; pine_1.position.y = y + 25; pine_1.position.z = z; pine_1.updateMatrix(); pine_geometry.merge(pine_1.geometry, pine_1.matrix); var pine_texture_2 = THREE.ImageUtils.loadTexture('./res/textures/5.jpg'); var pine_geometry_2 = new THREE.CylinderGeometry(0, 70, 250, 8); var pine_material_2 = new THREE.MeshBasicMaterial({ map : pine_texture_2 }); var pine_2 = new THREE.Mesh(pine_geometry_2); pine_2.position.x = x; pine_2.position.y = y + 175; pine_2.position.z = z; pine_2.updateMatrix(); pine_geometry.merge(pine_2.geometry, pine_2.matrix); var pine = new THREE.Mesh(pine_geometry, new THREE.MeshFaceMaterial([pine_material_1, pine_material_2])); pine.geometry.computeFaceNormals(); pine.geometry.computeVertexNormals(); Game.scene.add(pine); The Pine is correctly positioned as I want, however, the whole merged shape only uses 1 material instead of the 2 (the whole shape is covered by the 1st) and I want that each mesh has it's respective material when mergin both. What I'm doing wrong? any idea?
has title: Use multiple materials for merged geometries in Three.js
has answer: http://stackoverflow.com/a/27276933

http://stackoverflow.com/comment/42867050
has text: Seriously, zero-based months are just the worst idea ever. >_<
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/27190464
type: Comment

http://stackoverflow.com/a/27293076
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/27292947
type: Answer
has body: Try: Note the 'float:left'
answers question: http://stackoverflow.com/q/27292947

http://stackoverflow.com/comment/42908273
has text: If they're willing to install plugin on their browser , it's possible! but you have to write a plugin (Add-On or whatever you may call it)!
comment on: http://stackoverflow.com/q/27214011
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27287519
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43041870
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/27288443
has answer: http://stackoverflow.com/a/27288443
tagged with: php
type: Question
has title: How to push values to PHP array variable through JavaScript?
score: 1
has comment: http://stackoverflow.com/comment/43042015
has answer: http://stackoverflow.com/a/27288475
accepted answer: http://stackoverflow.com/a/27288475
answer count: 2
has comment: http://stackoverflow.com/comment/43042098
upvote count: 1
has body: this this my page also i have one form also,it have a clb button for every alert,i have written a javascript function for each button(by looping) to pass the ticket id, so when i click clg this should store in php array variable to keep every ticket id,below is button code and javascript function &lt;input value="clb" onclick="clb_this('116305');" type="button"&gt; function clb_this(vl) { alert(vl); } this value should store in below variable `&lt;input type='hidden' name='tic_array[]' id='tic_array'&gt;` please share your ideas,thanks
tagged with: arrays

http://stackoverflow.com/a/27212844
has body: As mentioned by Rahul Desai you have to use ngMinlength and ngMaxlength. But since you want to use numbers you have to change the code a little bit to this &lt;input type="number" ng-model="id" ng-minlength=9 ng-maxlength=9 required /&gt; To be honest I don't know what to do with class="form-control". Maybe you can add it or leave it out?! Anyway you can also try this &lt;input type="number" ng-model="id" ng-pattern="/^[0-9]{1,9}$/" required /&gt; You shouldn't need min/max attribute anymore. EDIT: I guess I made a mistake with the second one. It should be either ng-pattern="/^[0-9]{9}$/" or ng-pattern="/^[0-9]{9,9}$/"
type: Answer
has comment: http://stackoverflow.com/comment/98966884
has comment: http://stackoverflow.com/comment/99047325
upvote count: 3
answers question: http://stackoverflow.com/q/27212592
score: 3
downvote count: 0

http://stackoverflow.com/a/27184425
has body: You should check the checked property for truthy/falsy, because the checked property is a boolean. Like this: if (document.getElementById("pid8").checked) { .. Even in HTML you don't need to assign the string "checked" to the "checked" attribute. Only the presence of this attribute is enough. You can re-write this: &lt;input type="checkbox" checked="checked" /&gt; as this: &lt;input type="checkbox" checked /&gt; In fact you can assign anything to it and it will be ignored and treated as presence. This will also work: &lt;input type="checkbox" checked="DoNotCheck" /&gt; I see that you are trying to count the number of checked checkboxes. You could do that easily by using a querySelectorAll. See this Snippet: document.getElementById('btn').onclick = function() { var l = document.querySelectorAll("input[type=checkbox]:checked").length; document.getElementById('result').innerText = l; } &lt;input type="checkbox" /&gt;&lt;input type="checkbox" /&gt;&lt;input type="checkbox" /&gt; &lt;input type="checkbox" /&gt;&lt;input type="checkbox" /&gt;&lt;input type="checkbox" /&gt; &lt;hr /&gt; &lt;input id="btn" type="button" value="Go" /&gt; &lt;p id="result" &gt;&lt;/p&gt;
answers question: http://stackoverflow.com/q/27184324
score: 4
downvote count: 0
type: Answer
upvote count: 4

http://stackoverflow.com/comment/42951411
type: AnswerComment
score: 0
type: Comment
has text: Thanks, that does make sense, unfortunately there still seems to be a problem but I cannot see it, did you test it and it work?
comment on: http://stackoverflow.com/a/27236755

http://stackoverflow.com/q/27173288
has comment: http://stackoverflow.com/comment/42837252
tagged with: node.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42836738
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42838252
has comment: http://stackoverflow.com/comment/42837042
has comment: http://stackoverflow.com/comment/42837004
has comment: http://stackoverflow.com/comment/42836865
tagged with: javascript
score: 0
tagged with: commonjs
answer count: 1
favorite count: 0
has body: I need to be able to run arbitrary node.js javascript in a browser. This javascript may contain require() statements. I'd like to be able to inline the script from required modules, on the server, before sending it off to the client. One caveat is that the javascript that I need to send the client is in memory, stored as a string, not sitting in a file. I was thinking of using something like browserify for this. I'm not sure how to pass browserify a string though. Is there a simple way to accomplish this? Does this way involve browserify?
has title: Inlining require statements in node.js
tagged with: browserify
has comment: http://stackoverflow.com/comment/42836936
has answer: http://stackoverflow.com/a/27174598

http://stackoverflow.com/a/27184391
has body: You can return http success/failed code to client: [HttpPost] public ActionResult Upload(HttpPostedFileBase[] files_to_upload) { ... if (succeeded) { return new HttpStatusCodeResult(200); } else { return new HttpStatusCodeResult(400); } }
type: Answer
has comment: http://stackoverflow.com/comment/42856074
has comment: http://stackoverflow.com/comment/42856311
has comment: http://stackoverflow.com/comment/42856212
has comment: http://stackoverflow.com/comment/42856189
has comment: http://stackoverflow.com/comment/42857043
accepted answer of: http://stackoverflow.com/q/27184130
has comment: http://stackoverflow.com/comment/42856745
answers question: http://stackoverflow.com/q/27184130
has comment: http://stackoverflow.com/comment/42856959
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/27279748
has body: You don't have quotes around the value in the generated HTML. Try this instead: &lt;div class="input-field3"&gt;&lt;input type="text" class="form-control" id="my-var" placeholder="&lt;?php echo $myVar ?&gt;"&gt;&lt;/div&gt;
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27279728
score: 3
has comment: http://stackoverflow.com/comment/43028254
upvote count: 3

angularjs-ng-show
tags question: http://stackoverflow.com/q/27264575
type: Tag
tag name: angularjs-ng-show

http://stackoverflow.com/q/27187613
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27187716
tagged with: getelementbyid
favorite count: 0
downvote count: 0
has body: Today I found a strange behavior with IE9.(I am working on an old application which works fine on IE9 to make it compatible with firefox and chrome) I have written this snippet of code. Test You can see inside test() function I have used getElementById("t0_ship_bill") where as in html there is no such element is defined with that id.Still IE9 does not throws error ,it is able to get the element by the name. Output: Firefox: TypeError: o1 is null IE9: LOG: true LOG: Its executed. Any one having any idea how IE9 able to get the element without ID on it where as firefox and chrome throws error ? This is the main reason because of which my application throws error on firefox on many lines where as works fine on IE.
has title: Does getElementById() and getElementByName() are same for IE9?
type: AnsweredQuestion
score: 2
tagged with: internet-explorer
tagged with: internet-explorer-9
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/27187716
answer count: 1

http://stackoverflow.com/q/27177755
has answer: http://stackoverflow.com/a/27179527
answer count: 1
favorite count: 0
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/27179527
upvote count: 1
type: AnsweredQuestion
score: 1
has title: sum of columns in csv using d3
type: Question
has body: I have a csv file which has timestamp, value1, value2, value3 I am trying to create a pie chart in which three slices correspond to sum of value1, value2 and value3 column respectively. So, slice1 corresponds to sum of all values in first column , slice2 will correspond to sum of all values in second column and so on. I know that we can group based on a column value, but not sure how to achieve this. Please suggest
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27264253
type: Answer
has body: You can use attribute contains selector to get required option.then you can set it selected using .attr('selected', 'selected'): $("#sheets option[value*='"+mText +"']").attr('selected', 'selected');
answers question: http://stackoverflow.com/q/27264209
score: 0

http://stackoverflow.com/comment/43011390
score: 0
type: QuestionComment
has text: You're right, if it is a plain object then the enumeration should not happen. What is the value of `this.originalRespone.timespans.bind`? How is the `timespans` object created? Please provide [some code that lets us reproduce the issue](http://stackoverflow.com/help/mcve)
comment on: http://stackoverflow.com/q/27248470
type: Comment

http://stackoverflow.com/comment/42984853
comment on: http://stackoverflow.com/a/27255228
score: 0
type: Comment
has text: Thank you Paul. I will get on that shortly with a reply.
type: AnswerComment

http://stackoverflow.com/comment/42824268
comment on: http://stackoverflow.com/a/27160627
type: Comment
score: 0
has text: Yes, but you're adding "relative" container for safety :), actually there's no need for that element, but the parent div "absolute" can cause some weird things sometimes, the cases are unlimited. Have you tried above example?
type: AnswerComment

http://stackoverflow.com/q/27249245
score: 0
has answer: http://stackoverflow.com/a/27249610
type: Question
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43005806
has comment: http://stackoverflow.com/comment/42978858
answer count: 1
has title: HighCharts - dynamic graph & no tick mark on the right hand side dual axis
type: UnansweredQuestion
has body: I'm new to high charts. I'm dynamically making 2 ajax calls(inside getData() Function) and plotting the high chart with 2 series(with 2 y axis). each ajax call with return the json data. 1st json data (sample) [{"dt":"May 15, 2000","index":"2,007.030850"},{"dt":"May 16, 2000","index":"2,025.956108"}] 2nd json data (sample) [{"dt":"May 15, 2000","nav":"145.236000"},{"dt":"May 16, 2000","nav":"146.602974"}] I'm creating two series with 2 ajax calls. in the 2nd ajax call, i'm dynamically adding a y-axis for the 2nd series data. $(document).ready(function() { function getData() { var chart = Highcharts.charts[0]; /* 1st Ajax Call to get the json data to plot the first series */ $.ajax({ type: 'POST', dataType: 'json', url: '/Six/TSServlet?file=ivv-sixIshareFundsHistoryIndex.json', data: '', async: false, success: function(data) { var categories1 = []; var seriesData1 = []; var yaxis; $.each(data, function(i, e) { categories1.push(e.dt); /* below step to remove , is not important, done for my program */ yaxis = parseFloat(e.index.replace(/,/g, '')); seriesData1.push(yaxis); }) // add x-axis catagories chart.xAxis[0].update({ categories: categories1, tickInterval: 150 }, true); // add the 1st series chart.series[0].setData(seriesData1); } }); /* 2nd Ajax Call to get the json data to plot the second series */ $.ajax({ type: 'POST', dataType: 'json', url: '/Six/TSServlet?file=ivv-sixIshareFundsHistoryNav.json', data: '', async: false, success: function(data) { var categories2 = []; var seriesData2 = []; var yaxis; $.each(data, function(i, e) { categories2.push(e.dt); /* below step to remove , is not important, done for my program */ yaxis = parseFloat(e.nav.replace(/,/g, '')); seriesData2.push(yaxis); }) /* This is the problem area, dynamically adding a dual y axis for the 2nd series */ chart.addAxis({ // Secondary yAxis id: 'NAV-Series-Axis', title: { text: 'NAV Series' }, lineWidth: 2, lineColor: '#08F', opposite: true }); // add the 2nd series chart.addSeries({name: "NAV…

http://stackoverflow.com/comment/42821239
type: QuestionComment
has text: please share html code with checkbox for which you are running the loop, this way we can help you better.
score: 1
comment on: http://stackoverflow.com/q/27164175
type: Comment

http://stackoverflow.com/a/27199619
type: Answer
score: 2
upvote count: 2
has body: Here is a plunker for what you are attempting to do: http://plnkr.co/edit/t1UJMLtiBaKQnb7syPJH?p=preview (function(){ angular.module("App", []) .controller("MainCtrl", function($scope) { $scope.Song=[{ "AlbumName":"Unknown Album", "ArtistName":"Angel City", "SongName":"Love Me Right Feat. Laura McAllen[Rezonance Q Remix]", "$id":"4453334", "$priority":null }, { "AlbumName":"Immersion", "ArtistName":"Pendulum", "SongName":"The Island - Part 1 - Dawn", "$id":"26593443", "$priority":null }, { "AlbumName":"Someone to Love Me", "ArtistName":"Jomanda", "SongName":"Got a Love for You", "$id":"29376555", "$priority":null }, { "AlbumName":"Avicii - Essential Mix (2010-12-11)", "ArtistName":"Avicii", "SongName":"Penguin", "$id":"29533653", "$priority":null }, { "AlbumName":"MOS Addicted To Bass 2011", "ArtistName":"Eric Prydz", "SongName":"Niton (The Reason)", "$id":"30154682", "$priority":null }]; $scope.selectedSong = {}; $scope.currentSong = function(){return $scope.selectedSong ; } $scope.selectSong = function (i){ $scope.selectedSong = $scope.Song[i]; }; }) .directive('flashWidget', function(){ return{ restrict: 'E', scope: {song: '&amp;'}, link: function(scope, elem, attrs) { function updateDom(song){ if (song.$id == undefined) return; elem.html('&lt;object width="250" height="40"&gt;'+ '&lt;embed src="http://grooveshark.com/songWidget.swf" type="application/x-shockwave-flash" width="250" height="40" flashvars="hostname=cowbell.grooveshark.com&amp;songIDs=' + song.$id + '&amp;style=metal&amp;p=0" allowscriptaccess="always" wmode="window"&gt;&lt;/embed&gt;'+ '&lt;/object&gt;'); } scope.$watch(scope.song, function(value) { updateDom(value) }); } } }); })() Use the '&amp;' operator for establishing a read only linkage between the controller and the directive. The &amp; operator establishes a binding between a directive scope property and an expression in the parent scope. In this instance, the expression in the parent scope is a function that returns current selected song.…
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27163191
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27163191
has comment: http://stackoverflow.com/comment/42896409

http://stackoverflow.com/q/27224863
has comment: http://stackoverflow.com/comment/42927740
has answer: http://stackoverflow.com/a/27224946
accepted answer: http://stackoverflow.com/a/27224946
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/42927805
has title: Setting location.href removes port number
tagged with: javascript
tagged with: browser
score: 0
answer count: 1
has body: I am developing an application whose initial page resides at: https://localhost:8443/#/signin I want to perform a redirect from JavaScript to the following location: https://localhost:8443/admin To do this, I write code as follows: location.href = location.origin + '/admin'; However, when I do perform this, the page browses to: https://localhost/admin I also tried location.assign() with the same result. Why does setting location.href or location.assign() remove the port-number from the URL? Any other way I can accomplish this?
type: AnsweredQuestion

http://stackoverflow.com/comment/63586948
type: AnswerComment
has text: Not in Chromium 50 AFAICT
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28849022

http://stackoverflow.com/comment/43075970
has text: Ok I understand, seems like it isnt an array as I thought. What do you suggest to do it? I mean every option has its own value atm. I added a code snippet, how I add my options
comment on: http://stackoverflow.com/q/27306768
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27163287
has comment: http://stackoverflow.com/comment/42828040
type: Answer
answers question: http://stackoverflow.com/q/27162538
has body: jQuery(function($) { $("tr[id^=row]").each(function() { var id = this.id.replace('row', ''); var item = $(this).find("td.col" + id).map(function(idx, dom) { return dom.innerHTML; }).get(); alert(JSON.stringify(item)); }); }); DEMO1.1 DEMO1.2 DEMO3.1 DEMO3.2 DEMO4.1 DEMO4.2
has comment: http://stackoverflow.com/comment/42819562
score: 0

http://stackoverflow.com/comment/42964161
score: 1
has text: Thanks man, it worked perfectly! Can you please explain the code involved?
type: AnswerComment
comment on: http://stackoverflow.com/a/27237993
type: Comment

http://stackoverflow.com/comment/42955179
has text: https://developers.google.com/maps/documentation/javascript/fusiontableslayer should be a good start
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27235456

http://stackoverflow.com/comment/43394658
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27228751
score: 0
has text: @ThilakRao No. It just doesn't work. In the end, I had to make a separate endpoint for the detail grid, even though it was unnecessary.

http://stackoverflow.com/a/31663645
has comment: http://stackoverflow.com/comment/93572105
has comment: http://stackoverflow.com/comment/57722326
has comment: http://stackoverflow.com/comment/54596812
has comment: http://stackoverflow.com/comment/90422918
answers question: http://stackoverflow.com/q/27159179
type: Answer
upvote count: 461
has comment: http://stackoverflow.com/comment/121012267
has comment: http://stackoverflow.com/comment/136024746
has comment: http://stackoverflow.com/comment/66997550
downvote count: 2
has comment: http://stackoverflow.com/comment/80088642
score: 459
has body: You can use the File constructor: var file = new File([myBlob], "name"); As per the w3 specification this will append the bytes that the blob contains to the bytes for the new File object, and create the file with the specified name http://www.w3.org/TR/FileAPI/#dfn-file
has comment: http://stackoverflow.com/comment/59649936
has comment: http://stackoverflow.com/comment/128280650
has comment: http://stackoverflow.com/comment/106156705

http://stackoverflow.com/a/27306018
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27304777
has body: If you already have an editor object, you don't need to use CKEDITOR.instances at all, just use editor.getData();

http://stackoverflow.com/a/27484017
type: Answer
has comment: http://stackoverflow.com/comment/43437602
has body: I've been experiencing the same problem and changed a bit the native plugin implementation to fix this. You can find the fork at: https://github.com/ebariaux/twilio_client_phonegap Plugin has not been tested extensively, just made that change that got me the functionality I wanted.
score: 0
answers question: http://stackoverflow.com/q/27248749

http://stackoverflow.com/a/27237082
answers question: http://stackoverflow.com/q/27236901
type: Answer
score: 0
has body: I have put some elements around it to make it more clear, but this should do the job. http://jsfiddle.net/chkrmqmx/ HTML Scroll down Animate fadeIn CSS .hero { background: green; height: 1000px; } .animated { display: none; height: 200px; } #spacer { margin-top: 200px; } Javascript (with jQuery) $(window).scroll(function() { var $this = $(window); if ($this.scrollTop() >= 800) { $("#spacer").css('margin-top', '0'); $("#fadein").fadeIn(1000); } });

http://stackoverflow.com/comment/43068786
type: Comment
type: QuestionComment
has text: Actually [`FileList`](https://developer.mozilla.org/en-US/docs/Web/API/FileList) is a property of `input type="file"`. It is read-only. The `value` of the input can be read on server-side only. If you want to rotate the image on client-side, send the original file and rotating parameters to server, and re-rotate the image on server.
score: 1
comment on: http://stackoverflow.com/q/27302399

http://stackoverflow.com/q/27185072
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42857371
type: Question
score: 0
has answer: http://stackoverflow.com/a/27185121
answer count: 1
tagged with: find-occurrences
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27185121
has body: Why doesn't this javascript regexp code work? According to the documentation it should: Here's my String for parsing (it's the rails nested form information): flex_table[flex_rows_attributes][0][flex_cells_attributes][0][id] What I want are these sections, which may or may not be part of the string: flex_rows_attributes, 0, flex_cells_attributes, 0 Here's my regular expression(as I mentioned, the javascript flavour): flex_table((\[(\w+)\]\[(\d+)\])*) I only get back the last of the two entries, but I want them both. Does anyone know, what I am missing here?
tagged with: regex
has title: Regular Expression javascript repeat with optional sections

http://stackoverflow.com/a/27231604
type: Answer
has comment: http://stackoverflow.com/comment/42941000
has comment: http://stackoverflow.com/comment/42941052
upvote count: 2
downvote count: 1
has body: You could try using code like this to check if the date is already in the set this is just an example but this function should return true or false depending on if the date is ok or not: &lt;script type="text/javascript"&gt; var test = [ {start : '2014-11-13T12:00:00', end : '2014-11-13T14:00:00'}, {start : '2014-11-13T14:30:00', end : '2014-11-13T16:00:00'} ]; var test1 = {start : '2014-11-13T13:30:00', end : '2014-11-13T14:30:00'}; if(checkDates(test, test1)) { window.alert("Ok"); } else { window.alert("Error"); } function checkDates(test, test1) { var returnBoolean = true; for(var i = 0; i &lt; test.length; i++) { if(((new Date(test1.start)) &gt;= (new Date(test[i].start)) &amp;&amp; (new Date(test1.start)) &lt;= (new Date(test[i].end))) || ((new Date(test1.end)) &gt;= (new Date(test[i].start)) &amp;&amp; (new Date(test1.end)) &lt;= (new Date(test[i].end)))) { returnBoolean = false; break; } } return returnBoolean; } &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/27231220
answers question: http://stackoverflow.com/q/27231220
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/42940542

http://stackoverflow.com/a/27255109
upvote count: 1
downvote count: 1
has body: I'm not certain about this, but I think you just need to strip out the "http://" from your url as per the documentation here: http://www.corsproxy.com/ Also the URL you gave in the example gives a 404 by itself. Hope this helps, Yuri
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27254958
has comment: http://stackoverflow.com/comment/42984117

titanium
type: Tag
tags question: http://stackoverflow.com/q/27296227
tag name: titanium
tags question: http://stackoverflow.com/q/27250946

http://stackoverflow.com/q/27190477
score: 0
has body: I need to select an item with an id value that is not always the same (depending on amount of radio buttons set by Code Behind of ASP.NET WebForms). What is unique is the valuethat belongs to the input field. &lt;input id="ctl00_ContentPlaceHolder1_RadioButtonList_2" type="radio" name="ctl00$ContentPlaceHolder1$RadioButtonList" value="21" /&gt; How can I obtain this input element with JavaScript that works in IE8?
has answer: http://stackoverflow.com/a/27190599
accepted answer: http://stackoverflow.com/a/27190599
linked to: http://stackoverflow.com/q/7321896
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: webforms
has title: Get an input element with specific value in IE8?

http://stackoverflow.com/comment/42975208
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27250535
has text: Seeing your HTML and CSS would really help.
type: Comment

http://stackoverflow.com/a/27213546
downvote count: 0
has comment: http://stackoverflow.com/comment/42943577
type: Answer
has comment: http://stackoverflow.com/comment/42927705
has comment: http://stackoverflow.com/comment/42909009
has comment: http://stackoverflow.com/comment/42908378
has body: A quick tidy up of your script tag shows that you are only defining the function click if the http call was successful. I would suggest moving the definition of the click method outside of the success callback. You may also be running into a race condition that the click function has not been defined before clicking the actual button. Regardless you will want to move that function definition to where the controller is actually created. Suggested edits (moved click definition outside of http call response): var demoApp = angular.module('demoApp', ['ngResource']); demoApp.controller('AllPosts', function($scope, $http, $resource) { $scope.click = function(post_id) { var Post = $resource('/update/:PostId ', { PostId: post_id, salutation: 'json' }); post = Post.get({ PostId: post_id }, function() { post.rating = post.rating + 1; post.$save(); }); }; $http.get('/blogpost/?format=json').success(function(data, status, headers, config) { $scope.posts = data.results; $scope.predicate = '-title'; }).error(function(data, status, headers, config) {}); }) Updates: Injected $resource into the controller Removed $resource from click function params
has comment: http://stackoverflow.com/comment/42909398
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27213222
has comment: http://stackoverflow.com/comment/42908316

http://stackoverflow.com/comment/43104814
comment on: http://stackoverflow.com/a/27282848
type: Comment
has text: You were correct, I wasn't going through the proxy. Thanks for your help!
type: AnswerComment
score: 0

http://stackoverflow.com/q/27202511
type: Question
tagged with: javascript
has title: Switching tab makes CSS go crazy
tagged with: css-animations
score: 0
answer count: 2
tagged with: 3d
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27203284
has answer: http://stackoverflow.com/a/27203475
has answer: http://stackoverflow.com/a/27203284
tagged with: css
has body: Can anyone explain why this 3D works OK when you visit the page but disintegrates when you switch to another tab and then revert to the page? But then... ... it disappears into the screen! HTML: CSS: #container{ -webkit-perspective: 800; width: 850px; height: 520px; } #img, #s1 { -moz-background-size: cover; -o-background-size: cover; background-size: cover; background-repeat: no-repeat; } #cube{ -webkit-transform-style: preserve-3d; -webkit-transform: translateZ(-425px); -webkit-backface-visibility: hidden; width: 850px; height: 520px; } #cube.enable { -webkit-animation: flash 0.75s ease-in-out; -moz-animation: flash 0.75s ease-in-out; -ms-animation: flash 0.75s ease-in-out; -o-animation: flash 0.75s ease-in-out; animation: flash 0.75s ease-in-out; } @-webkit-keyframes flash { 100% { -webkit-transform: translateZ(-425px) rotateY(90deg); } } Script: var getImage = function(){ var images = ["img1.jpg", "img2.jpg", "img3.jpg"]; $.each(images, function( index, value ) { $(' ').attr('src', value); }); index = 0; return function(){ if (++index == images.length){ index = 0; } return images[index]; }; }(); setInterval(function(){ transform($('#img'), getImage()); }, 1000); function transform(img, newImg){ img .wrap(' ') .css('-webkit-transform', 'translateZ(425px)'); img .clone() .attr('id', 's1') .insertBefore(img) .css('background-image', 'url("' + newImg + '")') .css('position', 'absolute') .css('-webkit-transform', 'rotateY(-90deg) translateZ(425px)'); PrefixedEvent($('#cube')[0], "AnimationEnd", function () { img.unwrap().unwrap(); img.remove(); $('#s1') .attr('id', 'img') .css('-webkit-transform', ''); }); $('#cube').addClass('enable'); } function PrefixedEvent(element, type, callback) { var pfx = ["webkit", "moz", "MS", "o", ""]; for (var p = 0; p < pfx.length; p++) { if (!pfx[p]) type = type.toLowerCase(); element.addEventListener(pfx[p]+type, callback, false); } }
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27203475

http://stackoverflow.com/a/27164611
has body: Use: $("#result").load("https://abc/external.html #test");
answers question: http://stackoverflow.com/q/27164572
upvote count: 4
downvote count: 0
score: 4
type: Answer

http://stackoverflow.com/comment/69855788
type: Comment
type: QuestionComment
has text: To understand you well, you tend to have multiple selects with the same options, and you want them to be dependent on each other. Am I right?
comment on: http://stackoverflow.com/q/27259586
score: 0

http://stackoverflow.com/q/27298926
has comment: http://stackoverflow.com/comment/43070867
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27298967
answer count: 1
has title: show/hide visibility by classname not ById
tagged with: show
type: UnansweredQuestion
tagged with: getelementsbyclassname
tagged with: hide
has comment: http://stackoverflow.com/comment/43061913
type: Question
has body: I am using this javascript and code to hide/show certain divs but on each click, there are multiple divs on the page that I want to hide/show so I would rather do it by class name. I don't really know javascript so the simpler, the better. Here is the javascript: Here is the html: Home How It Works Testimonials FAQ Home How It Works Testimonials FAQ

http://stackoverflow.com/a/27274457
score: 0
downvote count: 1
type: Answer
has body: What you need to do is simply reduce the array. You don't need jQuery here at all because forEach, map and reduce are basic native operations built-in to Arrays in JavaScript. var bestChamp = json.champions.reduce(function (prev, next) { if (prev.stats.totalSessionsPlayed &gt;= next.stats.totalSessionsPlayed) { return prev; } else { return next; } }); // bestChamp contains the object reduce transforms an array into a single value/object. So in this case we transform the array of champions into one object, with the highest number of totalSessionsPlayed. You can read more about Array.prototype.reduce on MDN If you additionally want to exclude objects with id = 0 then it's as simple as adding this condition to the if-statement: var bestChamp = json.champions.reduce(function (prev, next) { if (next.id === 0) { return prev; } if (prev.stats.totalSessionsPlayed &gt;= next.stats.totalSessionsPlayed) { return prev; } else { return next; } }); // bestChamp contains the object Here's the whole snippet: var json = { "summonerId": 22421317, "modifyDate": 1414692614000, "champions": [ { "id": 110, "stats": { "totalSessionsPlayed": 5, "totalSessionsLost": 5, "totalSessionsWon": 0, "totalChampionKills": 32, "totalDamageDealt": 725106, "totalDamageTaken": 113405, "mostChampionKillsPerSession": 13, "totalMinionKills": 937, "totalDoubleKills": 3, "totalTripleKills": 0, "totalQuadraKills": 0, "totalPentaKills": 0, "totalUnrealKills": 0, "totalDeathsPerSession": 52, "totalGoldEarned": 62141, "mostSpellsCast": 0, "totalTurretsKilled": 6, "totalPhysicalDamageDealt": 613669, "totalMagicDamageDealt": 105253, "totalFirstBlood": 0, "totalAssists": 55, "maxChampionsKilled": 13, "maxNumDeaths": 14 } }, { "id": 21, "stats": { "totalSessionsPlayed": 7, "totalSessionsLost": 1, "totalSessionsWon": 6, "totalChampionKills": 54, "totalDamageDealt": 1143509, "totalDamageTaken": 132528, "mostChampionKillsPerSession": 18, "totalMinionKills": 1420, "totalDoubleKills": 7, "totalTripleKills": 1, "totalQuad…
has comment: http://stackoverflow.com/comment/43018923
has comment: http://stackoverflow.com/comment/43019123
answers question: http://stackoverflow.com/q/27273208
upvote count: 1

http://stackoverflow.com/comment/43068595
has text: Have you checked the browser console for errors in the initiation code, mains.js?
type: QuestionComment
comment on: http://stackoverflow.com/q/27285354
type: Comment
score: 1

http://stackoverflow.com/comment/42925857
has text: @CasimiretHippolyte: All the newlines and most of the other whitespace in the code samples were introduced when sundar used the snippet feature to format the code. I reverted that and formatted it the old-fashioned way.
type: Comment
comment on: http://stackoverflow.com/a/27215793
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42993609
type: AnswerComment
has text: [[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, ...]] in each cell
type: Comment
comment on: http://stackoverflow.com/a/27258644
score: 0

http://stackoverflow.com/comment/42949065
has text: Welcome to StackOverflow. Your question is very unclear. I'd suggest editing your post to ask a more specific question, if possible including some background to the question.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27236096

http://stackoverflow.com/a/27305548
has body: EDIT: I missed the jQuery tag... leaving the answer still. var productCt = document.getElementById('ProductContainer'), reInsertProductCt = tempRemove(productCt); [].slice.call(productCt.children) .sort(function (a, b) { var aName = a.dataset.name, bName = b.dataset.name; return aName < bName? -1 : +(aName > bName); }) .forEach(productCt.appendChild.bind(productCt)); reInsertProductCt(); function tempRemove(el) { var parent = el.parentNode, nextSibling = el.nextSibling; parent.removeChild(el); return function () { if (nextSibling) parent.insertBefore(el, nextSibling); else parent.appendChild(el); }; } <h>TEST NAME B</h> TEST <h>TEST NAME A</h> TEST <h>TEST NAME C</h> TEST <h>TEST NAME E</h> TEST <h>TEST NAME D</h> TEST
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27305268

http://stackoverflow.com/q/27202294
tagged with: position
type: Question
tagged with: slider
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27203013
has title: Content After Slider Is Overwriting Slider. Why?
tagged with: css
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27203013
has body: I am working on a slider that is working perfectly but the problem is that the content of web-page after the slider is overwriting on slider's 2-3 slides. I don't want to fix the height of slider but also want to show after slider content after every slides of slider. The code is shared below. This Is The DIV Or Text Before The Slider. Google Google is an American multinational corporation specializing in Internet-related services and products. Open Google Bing Bing is a search engine that brings together the best of search and people in your social networks to help you spend less time searching and more time doing. Open Bing Yahoo Yahoo! Inc. is an American multinational Internet corporation headquartered in Sunnyvale, California. Open Yahoo This Is The DIV Or Text After The Slider. You can also see the live FIDDLE with error...
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/a/69031138
score: 0
has body: function takes two dates and returns the number of days between the first and second dates. function getDays(a,b){ var Time=b.getTime()-a.getTime(); var diff=Time/(1000*60*60*24); console.log(diff); } getDays( new Date("June 14, 2019"), new Date("June 20, 2019") ) /*another way*/ function getDays(a,b){ var dateOne=new Date(a), dateTow=new Date(b); var Time=dateTow.getTime()-dateOne.getTime(); var diff=Time/(1000*60*60*24); console.log(diff); } getDays("July 20, 2019","July 30, 2019");
answers question: http://stackoverflow.com/q/27169729
type: Answer

http://stackoverflow.com/q/27306753
answer count: 1
tagged with: datatable
type: AnsweredQuestion
has title: JS DataTables ColReorder API Reorder Bug?
has body: JS DataTables ColReorder results in unexpected behavior when using the API to re-order columns. https://github.com/DataTables/ColReorder/ A first re-order works fine e.g. tableColReorder.fnOrder([2, 1, 0]); But this subsequent re-order should return columns to their original order but it doesn't. Why not? tableColReorder.fnOrder([0, 1, 2]); Simple fiddle example here: http://jsfiddle.net/h7wdt72k/ $(document).ready(function () { // Initialize data table extension. var table = $('table') .DataTable({ paging: false, searching: false, ordering: false, bInfo: false }); // Initialize column re-order extension. tableColReorder = new $.fn.dataTable.ColReorder(table); // Re-order columns. Switch first/last columns. tableColReorder.fnOrder([2, 1, 0]); // Re-order columns to original order 0, 1, 2. Does not work!? tableColReorder.fnOrder([0, 1, 2]); // Get current column order. Did not apply re-order directly above. Why not!? alert(tableColReorder.fnOrder()); // This statement returns columns to original order 1, 2, 3. Works but why!? //tableColReorder.fnOrder([2, 1, 0]); }); html: 1 2 3 1 2 3 1 2 3
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27349129
accepted answer: http://stackoverflow.com/a/27349129

http://stackoverflow.com/a/27252382
has body: There are numerous bugs that are being handled in Firefox for it not supporting programable video framerate and resolution changes. Allowing the framerate to be changed in the media constraints Support runtime change of video resolution Support plain numbers for the video resolution in the media constraints You are supposedly able to set the constraints this way: mediaConstraints = { "audio": true, "video": { width: { min: 320, max: 320 }, height: { min: 240, max: 240 } } }; But I have never been able to get video resolution constraints to work it to work in Firefox through media constraints. I have had limited success with changing the default resolution in about:config in firefox. These issues are known and I believe that numerous people are working on them to get them resolved.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43024114
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43045553
has comment: http://stackoverflow.com/comment/43024548
accepted answer of: http://stackoverflow.com/q/27159479
answers question: http://stackoverflow.com/q/27159479

http://stackoverflow.com/comment/42861040
type: QuestionComment
score: 0
has text: your question is not clear... please provide some plnkr link or clarify your question
comment on: http://stackoverflow.com/q/27186814
type: Comment

http://stackoverflow.com/a/27302895
answers question: http://stackoverflow.com/q/27302671
type: Answer
has comment: http://stackoverflow.com/comment/43068871
has body: I would recommend using the MomentJS library. It includes a ton of methods to format, manipulate, etc...
score: 0

http://stackoverflow.com/a/27301268
type: Answer
accepted answer of: http://stackoverflow.com/q/27300450
has body: You can make use of Function.prototype.bind() to set the this value within the callback to the same this value used outside the callback: jax.onreadystatechange = function() { if (jax.readyState == 4 && jax.status == 200) { this.innards = jax.responseText; } }.bind(this); As a bit of a tangent, this is a great opportunity to use instead of a plain XMLHttpRequest. It will lead to more idiomatic Polymer code: {{innards}}
answers question: http://stackoverflow.com/q/27300450
score: 0
has comment: http://stackoverflow.com/comment/43074414
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43075812

http://stackoverflow.com/comment/42892007
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27204448
has text: I'm not sure how is all the computed style geting and integer parsing fast, but [it definitelly works](http://jsfiddle.net/Darker/nrw7xu2r/2/), even for all kinds of weird border dimensions (`pt`, `em`...).

http://stackoverflow.com/a/27156009
answers question: http://stackoverflow.com/q/27154233
type: AcceptedAnswer
has body: You could do the following: class Test { Value : number; } Object.defineProperty(Test.prototype, "Value", { value: 5, enumerable: true, configurable: false }); var t = new Test(); t.Value = 54; console.log(t.Value); // 5 But why not just return the value in the get function? class Test { public get Value(): number { return 5; } } var t = new Test(); t.Value = 54; console.log(t.Value); // 5 Using Decorators A more elegant way if you really want a value property is to create a reusable decorator: function ValueProperty(value: any) { return (target: Object, propertyKey: string) =&gt; { Object.defineProperty(target, propertyKey, { value, enumerable: true, configurable: false }); }; } Then to use it: class Test { @ValueProperty(5) Value: number; } new Test().Value; // 5
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27154233
upvote count: 3

http://stackoverflow.com/comment/106718189
type: AnswerComment
comment on: http://stackoverflow.com/a/27253223
type: Comment
score: 8
has text: If you happen to be using some API which deals with `Uint8Array` (raw bytes), then you can decode a UTF-8 array from a string (or in otherwords encode a string into a UTF-8 array) using `new TextEncoder("utf-8").encode(JSON.stringify(object))`

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/27225318
type: Tag

http://stackoverflow.com/q/27311146
tagged with: jquery
type: Question
has title: jQuery setupSearchButton animate broken after 2 times clicking on it
has answer: http://stackoverflow.com/a/27311762
score: 0
has body: I have a search button on my website, i have a function that wil animate my input field when clicking by moving it to the right. And if i click out of it then it wil close. This works only after like 2 times open/close it is broken and won't animate anymorge. I added a console.log(); so i can see what its doing. Here is my function. function setupSearchButton() { j(".icon").click(function() { var icon = j(this), input = icon.parent().find("#search"), submit = icon.parent().find(".submit"), is_submit_clicked = false; j(".searchform").animate({ "margin-left": "+=180px", "display": "block !important" }, "slow", function(){ console.log("Move the searchbar to the right 180px;"); }); // Animate the input field input.animate({ "width": "165px", "opacity": 1 }, 300, function() { input.focus(); }); submit.mousedown(function() { is_submit_clicked = true; }); // Now, we need to hide the icon too icon.fadeOut(300); input.blur(function() { if(!input.val() &amp;&amp; !is_submit_clicked) { input.animate({ "width": "0", "padding": "0", "opacity": 0 }, 200); // Get the icon back icon.fadeIn(200); j(".searchform").animate({ "margin-left": "-=180px", "display": "block !important" }, "slow", function(){ console.log("Move the searchbar back by adding a negative -180px to the left."); }); }; }); }); } Also i'm using "noconflict". So what i'm doing wrong here ?. Thx
answer count: 1
accepted answer: http://stackoverflow.com/a/27311762
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/a/27166815
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27163485
has body: You can encode the binary file into base64 string and decode. Here's an example in PHP for encoding: function encodedAudioString($type, $file) { return 'data:audio/' . $type . ';base64,' . base64_encode(file_get_contents($file)); } If you want to encode and decode in a browser, you need to request the file with XHR as arrayBuffer. Check this link for full code: https://github.com/dondido/MP3-to-Base64-Encoder-and-Decoder/blob/master/index.html Then you can embed the dataURI string as the src of an audio element: &lt;audio controls src="data:audio/ogg;base64,T2dnUwACAAAAAAAAAAA..........8l3KcK"&gt;
accepted answer of: http://stackoverflow.com/q/27163485

http://stackoverflow.com/a/27193829
has body: Your code works for me as long as I supply sane parentWidth,parentHeight values: var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) { var ratio = Math.min(maxWidth / srcWidth, maxHeight / srcHeight); var rtnWidth = srcWidth*ratio; var rtnHeight = srcHeight*ratio; return { width: rtnWidth, height: rtnHeight }; } var parentWidth = 100; //self._widgetSize[0]; var parentHeight = 50; //self._widgetSize[1]; var canvasImage = new Image(); canvasImage.onload = function() { var imgSize = calculateAspectRatioFit(canvasImage.width, canvasImage.height, parentWidth, parentHeight); ctx.clearRect(0, 0, parentWidth, parentHeight); ctx.drawImage(canvasImage,30,30,imgSize.width, imgSize.height); }; canvasImage.src = "http://www.greenwallpaper.org/backgrounds/simply-green-502085.jpeg"; body{ background-color: ivory; padding:10px; } #canvas{border:1px solid red;} &lt;canvas id="canvas" width=300 height=300&gt;&lt;/canvas&gt;
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42910492
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27188246
has comment: http://stackoverflow.com/comment/42907837
answers question: http://stackoverflow.com/q/27188246

http://stackoverflow.com/a/40738842
score: 2
answers question: http://stackoverflow.com/q/27240776
has body: You could easily just use the following without including jQuery to show the element: element.css('display', 'block'); And corresponding to hide it: element.css('display', 'none');
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/70602652
type: Answer

http://stackoverflow.com/q/27172682
has answer: http://stackoverflow.com/a/27182923
type: Question
has title: Angularjs assigning dynamic ng-model name ,in constructing elements in list?
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
score: 0
type: UnansweredQuestion
tagged with: laravel-blade
tagged with: laravel
has body: Here i defined my code, please help me in this. I am using angularjs in blade template engine of laravel, in this i couldn't dynamically assign name to ng-model in angular $scope.categoryChange=function(id,model){ $scope.getCategories(id,model); };//category change orgusers=0; $scope.users = new Array(); $scope.addUsers = function(){ if($scope.totalExperts>0){ orgusers++; newUser={"name":"name"+orgusers,"model":"expertise"+orgusers,"category":"empcategory"+orgusers}; $scope.users.push(newUser); if($scope.totalExperts!='' && $scope.totalExperts>0){ $scope.totalExperts--; } }else{ alert("To add users please input total experts field ."); document.getElementById('focusIt').focus(); } }; $scope.removeUser = function(removeUser){ $scope.users.splice($scope.users.indexOf(removeUser),1); if($scope.totalExperts!='' || $scope.totalExperts==0){ $scope.totalExperts++; } }; $scope.getCategories=function(catId,model){ experts=new Array(); angular.forEach($scope.categories, function(value,key) { if(catId==value.parent){ experts[key]={id:value.id,name:value.category}; } }); $scope[model]=experts; }; Name: <input type="text" name="<%user.name%>" /> Email: Phone: {{ Form::label('select category','',array('style'=>'display:inline-block;')) }} <select name="empcategories[]" ng-model="<%user.name%>" ng-options="k as v for (k,v) in mainCategories" ng-change="categoryChange(emp1,'<%user.model%>')" > {{ Form::label('Expertise','',array('style'=>'display:inline-block;')) }} <select name="empspecialized[]" ng-model="empspecialization" ng-options="k as v.name for (k,v) in <% user.model %>"> - Error: [ngModel:nonassign] Expression '<%user%>' is non-assignable. Element: any suggestions or solutions , am waiting thanks in advance

http://stackoverflow.com/comment/43167698
type: QuestionComment
comment on: http://stackoverflow.com/q/27271814
score: 0
has text: First of all, I'm curious why you are using categories for dates? Wouldn't be better to use datetime axis? Anyway, I tried to export 1300 (only!) which works okay: http://jsfiddle.net/9459stu9/ - however, I'm not sure if that's the PDF file you want to achieve.. When using 13000 of points there is error with exceeded maximum size of SVG file to be exported, sorry.
type: Comment

http://stackoverflow.com/a/27254204
has comment: http://stackoverflow.com/comment/42984021
has comment: http://stackoverflow.com/comment/42982754
score: 1
has comment: http://stackoverflow.com/comment/42982543
downvote count: 0
has body: Consider using CSS: .highlightbox>p { white-space:pre; /* or pre-wrap, if preferred */ } .highlightbox>p { white-space: pre; } VPNt As Low as $8.33/month Best Plan for Heavy Users Random IP Address-------------------YES! Ever Changing IP Address-----------YES! US IP Address--------------------------YES! Logging the Sites you Visit.--------NEVER! Super Secure Privacy-----------------YES! Great for P2P---------------------------YES! Super High Speed---------------------YES! Great for Streaming-------------------YES! US Video Services --------------------YES! Runs on Windows -------------------YES! Runs on Mac---------------------------YES! Runs on IOS --------------------------YES! No Overage Charges-----------------YES! Host Servers-----------------------------No Use our Static IP service for hosting servers Unlimited Bandwidth-------------------YES!
type: Answer
answers question: http://stackoverflow.com/q/27253975
upvote count: 1

http://stackoverflow.com/a/27239452
answers question: http://stackoverflow.com/q/27239258
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/27239258
has comment: http://stackoverflow.com/comment/42955499
has body: The logic is as follows: you want to find the first item that is not contained within the user array. So you can do the following: var item = _.find(items, function (item) { return !_.findWhere(user, item); }); jsFiddle Demo
downvote count: 0
score: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/43055367
comment on: http://stackoverflow.com/q/27295301
score: 0
type: Comment
type: QuestionComment
has text: Hello, please always provide a [mcve](http://stackoverflow.com/help/mcve) of your problem. In addition, describe what you already tried.

http://stackoverflow.com/q/27234482
tagged with: client-side
favorite count: 0
score: 2
has body: First off, I am sorry if there is a trivial answer to this question but I am unable to find one. The concept that I have in question is the following. I have a client app and a server app that exchange data. I am trying to separate the logic that handles a server update in the client in the following way. A "main" class that handles application logic and works with parsed and sanitized data and a "worker" class that parses the received data and calls the appropriate method of the "main" class. I guess this is in some way imitating events. Here is an example structure to make things more clear. var Main = function(){ this.init(); }; Main.prototype = { init: function(){ //Do init logic }, connect: function(){ var client = new Client(); client.onStateUpdate(this.executeStateUpdate); client.connect('localhost', 3001); }, executeStateUpdate: function(data){ // Problem - the "this" operator is now Client and not Main } }; var Client = function(){ }; Client.prototype = { connect: function(host, port){ this.client = new WebSocket("ws://"+host+":"+port); this.client.onmessage = function(e){ var data = JSON.parse(e); //handle received data stateUpdate(data); }; }, stateUpdate: function(data){ //sanitize data to application objects this.stateUpdateCallback(sanitizedData); }, onStateUpdate: function(callback){ this.stateUpdateCallback = callback; } } The biggest problem here is that calling "main" methods from the "worker" makes them point to the wrong object(e.g "Client" and not "Main"). I have thought about passing the "Main" class object to the "Client" object instead of callbacks, but this way I have to hardcode all the callback methods that would be called on each event that arises from the server. I am open to any suggestions on how to solve this matter and sticking to this architecture of the code is not mandatory for me.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27235185
upvote count: 2
tagged with: design-patterns
accepted answer: http://stackoverflow.com/a/27235185
type: Question
has title: Software Design - Interaction between two classes
tagged with: javascript
tagged with: client-server
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27169820
has answer: http://stackoverflow.com/a/37054156
possible better answer: http://stackoverflow.com/a/43692921
upvote count: 4
has answer: http://stackoverflow.com/a/27268908
has answer: http://stackoverflow.com/a/35474496
has title: How to get the ancestors of a JS tree node when it is selected?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/28670644
has answer: http://stackoverflow.com/a/30642264
type: Question
tagged with: jstree
answer count: 8
has answer: http://stackoverflow.com/a/43692921
has answer: http://stackoverflow.com/a/27247376
tagged with: javascript
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/27269753
has comment: http://stackoverflow.com/comment/42830656
has comment: http://stackoverflow.com/comment/42836107
downvote count: 0
has body: I am getting the child tree name but I want to get its complete hierarchy of parent node names. Below code shows how I get the child node and print its value in a particular div element: $(document).ready(function () { $('#bdeViewNew').on('changed.jstree', function (e, data) { var i, j, r = []; for (i = 0, j = data.selected.length; i < j; i++) { r.push(data.instance.get_node(data.selected[i]).text.trim()); $('#treeBreadCrumbs').html(r.join(', ')); } }); }); Now it prints the value of child node, e.g. Child a. But I want something like follows, if the tree structure is as shown below: Parent Child 1 Child a Child b Child 2 Child c Child d so if I click on Child a I want my div content updated as Parent > Child 1 > Child a as of now I am getting Child a only. Please let me know how I can get the correct output. I tried like this as shown below to get path of all the parent node: $(document).ready(function() { $('#bdeViewNew').on('changed.jstree', function(e, data) { var ids = data.inst.get_path('#bdeViewNew' + data.rslt.obj.attr('id'),true); var names = data.inst.get_path('#bdeViewNew' + data.rslt.obj.attr('id'),false); alert("Path [ID or Name] from root node to selected node = ID's = "+ids+" :: Name's = "+names); }); }); but still no result to get_path. Do I need to use different JS or a plugin? And what is the meaning of attr('id') i should pass the id of that li or something else as i did'nt understand this syntax properly. Adding my jstree: Parent 1 Child 1 <c:forEach items="${empInfo.empList}" var="empValue"> ${empValue.empName} </c:forEach> Child 2 <c:forEach items="${imgInfo.imgList}" var="imgValue"> ${imgValue.imgName} </c:forEach>
accepted answer: http://stackoverflow.com/a/27268908
favorite count: 0
has answer: http://stackoverflow.com/a/27264947

underscore.js
tags question: http://stackoverflow.com/q/27275263
tags question: http://stackoverflow.com/q/27259115
type: Tag
tags question: http://stackoverflow.com/q/27238691
tags question: http://stackoverflow.com/q/27227606
tags question: http://stackoverflow.com/q/27170380
tag name: underscore.js
tags question: http://stackoverflow.com/q/27245652
tags question: http://stackoverflow.com/q/27192043
tags question: http://stackoverflow.com/q/27235720
tags question: http://stackoverflow.com/q/27267168
tags question: http://stackoverflow.com/q/27259635
tags question: http://stackoverflow.com/q/27300465
tags question: http://stackoverflow.com/q/27280616
tags question: http://stackoverflow.com/q/27233032
tags question: http://stackoverflow.com/q/27213549
tags question: http://stackoverflow.com/q/27234404
tags question: http://stackoverflow.com/q/27230831
tags question: http://stackoverflow.com/q/27300473
tags question: http://stackoverflow.com/q/27270322
tags question: http://stackoverflow.com/q/27220639
tags question: http://stackoverflow.com/q/27211957
tags question: http://stackoverflow.com/q/27168356
tags question: http://stackoverflow.com/q/27269061
tags question: http://stackoverflow.com/q/27239258
tags question: http://stackoverflow.com/q/27179905

http://stackoverflow.com/q/27275537
tagged with: javascript
has title: kineticJS loading images sequentially (and set fillPatternImg) opacity tween not working
tagged with: kineticjs
has answer: http://stackoverflow.com/a/27298360
tagged with: opacity
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27298360
score: 0
has body: I am creating a little app with KineticJS which creates multiple nodes (RegularPolygons). After the stage is loaded (triggered with play(); ) I fill each node sequentially with an (pattern)image (triggered with loadImages(urls);. This works fine, but now I want to add a nice fade-in effect with a Tween, like: set all nodes > load single image > set node patternImage > tween to opacity 0.8 > on tween complete, load next image (repeat). For some reason the tweens won't play, they just appear in complete state (opacity 1) ;( var stage = new Kinetic.Stage({ container: 'canvas', width: $(window).width(), height: $(window).height() }); var layer = new Kinetic.Layer() var layer2 = new Kinetic.Layer() var urls = [ 'http://lorempixel.com/300/300/sports/1', 'http://lorempixel.com/300/300/sports/2', 'http://lorempixel.com/300/300/sports/3', 'http://lorempixel.com/300/300/sports/4', 'http://lorempixel.com/300/300/sports/5', 'http://lorempixel.com/300/300/sports/6', 'http://lorempixel.com/300/300/sports/7', 'http://lorempixel.com/300/300/sports/8', 'http://lorempixel.com/300/300/sports/9', 'http://lorempixel.com/300/300/sports/10', 'http://lorempixel.com/300/300/business/1', 'http://lorempixel.com/300/300/business/2', 'http://lorempixel.com/300/300/business/3', 'http://lorempixel.com/300/300/business/4', 'http://lorempixel.com/300/300/business/5', 'http://lorempixel.com/300/300/business/6', 'http://lorempixel.com/300/300/business/7', 'http://lorempixel.com/300/300/business/8', 'http://lorempixel.com/300/300/business/9', 'http://lorempixel.com/300/300/business/10'/*, 'http://lorempixel.com/300/300/cats/1', 'http://lorempixel.com/300/300/cats/2', 'http://lorempixel.com/300/300/cats/3', 'http://lorempixel.com/300/300/cats/4', 'http://lorempixel.com/300/300/cats/5', 'http://lorempixel.com/300/300/cats/6', 'http://lorempixel.com/300/300/cats/7', 'http://lorempixel.com/300/300/cats/8', 'http://lorempixel.com/300/300/cats/9', 'http://lorempixel.com/300/300/cats/10', 'http://lorempixel.…
tagged with: tween
type: Question
tagged with: arrays
answer count: 1

http://stackoverflow.com/a/27219765
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/27219726
type: AcceptedAnswer
downvote count: 0
has body: Replace line $('.add').click(function(e){ with $(document).on("click", ".add", function(e){ The reason for this is that the click() function binds your function(e){} to .add elements that exist at the time the click() function is called. The on() method works differently. On the click event it will also search for any .add items that exist at the time the click event is raised. http://jsfiddle.net/1qq40qex/
answers question: http://stackoverflow.com/q/27219726
type: Answer
has comment: http://stackoverflow.com/comment/42928135
has comment: http://stackoverflow.com/comment/42956669
has comment: http://stackoverflow.com/comment/42964970
has comment: http://stackoverflow.com/comment/42926542
has comment: http://stackoverflow.com/comment/42927639

http://stackoverflow.com/comment/42814397
type: AnswerComment
score: 0
type: Comment
has text: bada bing batta boom! i havent tested this but i am sure this will work! thanks, you gave me exatly what i was looking for new event.
comment on: http://stackoverflow.com/a/27159929

http://stackoverflow.com/comment/42887332
has text: That'll work for the files that *do* have the spaces, but of course, not for the ones that don't (OP seems to have to handle both).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27202069
type: AnswerComment

http://stackoverflow.com/a/27265660
has body: You should check the condition on click or change. I hope that my example will help you. $("input:checkbox.country").click(function() { if(!$(this).is(":checked")) alert('you are unchecked ' + $(this).val()); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input class="country" type="checkbox" name="country1" value="India" /&gt; India &lt;/br&gt; &lt;input class="country" type="checkbox" name="country1" value="Russia" /&gt; Russia &lt;br&gt; &lt;input class="country" type="checkbox" name="country1" value="USA" /&gt; USA &lt;br&gt; &lt;input class="country" type="checkbox" name="country1" value="UK" /&gt; UK
type: Answer
upvote count: 13
score: 13
answers question: http://stackoverflow.com/q/27265308
downvote count: 0

http://stackoverflow.com/q/27284948
has body: What I'm trying to do: I have a javascript program that, when a button is clicked, takes in 4 strings from 4 text boxes in a form, and outputs those strings into a formatted textarea. function testResults(form){ var errorhandle1 = parseInt(document.myForm.Item_Code.value); var errorhandle2 = parseInt(document.myForm.Item_Cost.value); var errorhandle3 = parseInt(document.myForm.Quantity.value); //above variables are for error handling. var d = " "; var subtotal = parseInt(form.Item_Cost.value) * parseInt(form.Quantity.value); var subtotalValue = parseInt(document.myForm.Subtotal.value); var testVar = "Item Code: " + form.Item_Code.value + d + "Item Name: " + form.Item_Name.value + d + "Item Cost: " + form.Item_Cost.value + d + "Quantity: " + form.Quantity.value + '\n'; document.myForm.myTextarea.value += testVar; document.myForm.Subtotal.value = parseInt(subtotal) + subtotalValue; document.myForm.Sales_Tax.value = document.myForm.Subtotal.value * salestax; document.myForm.Total.value = parseInt(document.myForm.Subtotal.value) + parseFloat(document.myForm.Sales_Tax.value); } The above code works just fine, and does exactly what I want it to do for the scope of my program. try { if ((isNaN(errorhandle3) == true) || (isNaN(errorhandle2) == true)) { throw "Error1"; } } catch (e) { if (e == "Error1") { alert("Error! You must enter a number into the qty and cost fields!"); } } What I'm trying to accomplish with the try...catch block is simply to make sure that document.myForm.Item_Code.value document.myForm.Item_Cost.value document.myForm.Quantity.value are actually numbers. The try...catch statements trigger every time I run the program and doesn't care what I put in the corresponding text boxes. I would greatly appreciate any and all insight on this! Also: I looked at both of these links and was unable to understand my problem. javascript parseInt return NaN for empty string http://www.w3schools.com/jsref/jsref_isnan.asp
has comment: http://stackoverflow.com/comment/43037766
has comment: http://stackoverflow.com/comment/43037821
tagged with: javascript
linked to: http://stackoverflow.com/q/6736476
upvote count: 10
has answer: http://stackoverflow.com/a/27285044
linked to: http://stackoverflow.com/q/18082
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/79110498
has answer: http://stackoverflow.com/a/27285032
favorite count: 0
has title: "Try...Catch" Block not Working with parseInt()
possible better answer: http://stackoverflow.com/a/79110498
type: Question
score: 9
has comment: http://stackoverflow.com/comment/43037950
accepted answer: http://stackoverflow.com/a/27285032
answer count: 3
downvote count: 1

http://stackoverflow.com/comment/42819704
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27163457
has text: You've defined maxlength = 3 but wanted in 5 ????? A little bit unclear what you're trying to do her....
score: 0

http://stackoverflow.com/q/27223512
type: UnansweredQuestion
has title: Populating existing dropdownlist using AsyncPostBackTrigger, not populate a new dropdownlist
tagged with: vb.net
has answer: http://stackoverflow.com/a/27242583
type: Question
answer count: 1
tagged with: javascript
tagged with: asyncpostbackerror
has body: For my web app, I tried to populate dropdownlist (DDL) based on what client click on the calendar extender ( I have this declared in codebehind vb.net to load it from database) using AsyncPostBackTrigger (because I dont want the page to autopostback). I have the button to fire the date selected and it did worked to populate the DDL except not really the way I wanted it to. Instead of updating it in the existing DDL, it creates a new DDL besides the existing ones. I tried looking for solution but did not managed to find any. Anyone can help me figure out why this happens and how to fix this? Here's my asp.net & javascript code <asp:Label ID="label16" runat = "server" Text="Select the date"></asp:Label> <asp:TextBox ID="tbPostingDt" runat="server" style ="width:174px;"></asp:TextBox> <asp:Button ID="ClickBtn" runat="server" Text="Click" style="display:none" OnClick="ClickBtn_Click" /> <asp:ImageButton ID="CalendarBtnPostingDt" runat="server" ImageUrl="~/Images/Calendar_scheduleHS.png" AlternateText="Click to display calendar"/> <cc1:CalendarExtender ID="calPost" runat="server" PopupButtonID="CalendarBtnPostingDt" TargetControlID="tbPostingDt" OnClientDateSelectionChanged="dateSelectionChanged" Format="dd-MMM-yyyy" Enabled="True"></cc1:CalendarExtender> <asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional"> <asp:Label ID="label18" runat = "server" Text="Post Cycle No"></asp:Label> <asp:DropDownList ID = "ddlPostCycleNo" runat = "server" style ="width:180px;"> <asp:ListItem>ALL</asp:ListItem> </asp:DropDownList> <asp:AsyncPostBackTrigger ControlID="ClickBtn" EventName="Click" /> </asp:UpdatePanel> function dateSelectionChanged(sender, args) { var PostingDt = document.getElementById('<%= tbPostingDt.ClientID%>').value.trim(); var clickButton = document.getElementById("<%= ClickBtn.ClientID %>"); clickButton.click(); }
score: 0
tagged with: asp.net

http://stackoverflow.com/q/27160299
answer count: 1
has body: I want to create a double headed arrow/html element in my web page with some text in it. Basically an arrow like in shapes in MS Word. Also, I want it to be clickable so that I can trigger any event on the click. How can I accomplish this?
tagged with: javascript
has answer: http://stackoverflow.com/a/27160365
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42814493
score: -6
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
has title: How to draw double headed arrow in HTML?
downvote count: 7
type: Question

loops
tags question: http://stackoverflow.com/q/27252097
tags question: http://stackoverflow.com/q/27159682
tags question: http://stackoverflow.com/q/27237078
tags question: http://stackoverflow.com/q/27162538
tags question: http://stackoverflow.com/q/27220348
tags question: http://stackoverflow.com/q/27156754
tags question: http://stackoverflow.com/q/27194960
type: Tag
tags question: http://stackoverflow.com/q/27280054
tags question: http://stackoverflow.com/q/27296762
tag name: loops
tags question: http://stackoverflow.com/q/27157493
tags question: http://stackoverflow.com/q/27292848
tags question: http://stackoverflow.com/q/27284190
tags question: http://stackoverflow.com/q/27178796
tags question: http://stackoverflow.com/q/27155463

http://stackoverflow.com/comment/42883725
has text: In that case, it seems like my solution is optimal.
type: Comment
comment on: http://stackoverflow.com/a/27199898
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42893168
type: QuestionComment
has text: It's immediate, as if, I don't even see the loader div...there's no content being loaded through AJAX.
comment on: http://stackoverflow.com/q/27205230
score: 0
type: Comment

http://stackoverflow.com/comment/43006868
score: 0
comment on: http://stackoverflow.com/a/27266846
type: AnswerComment
type: Comment
has text: I think the OP is asking about arrays ("list") and objects ("dic"). But not certain about that…

http://stackoverflow.com/comment/42811205
type: QuestionComment
has text: Does it work in Chrome, Firefox etc?
score: 0
comment on: http://stackoverflow.com/q/27158394
type: Comment

http://stackoverflow.com/comment/42949308
comment on: http://stackoverflow.com/a/27178386
type: Comment
has text: I've looked through the examples for PhantomJS, but haven't found a script which would actually help you scrape everything. Note that you have to essentially make a local copy. So will have to not only download every resource that is requested, you also have to replace the (partial) resource in the page, before you save it. This may be a challenging endeavor
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42886361
has text: @chiccodoro you are right :)
comment on: http://stackoverflow.com/q/27189777
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42931660
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27222785
score: 0
has text: yes i want to join..

http://stackoverflow.com/comment/42887865
score: 0
type: Comment
type: QuestionComment
has text: Well, the first thing is, don't use `for-in` to loop through arrays (without safeguards, and there are better ways). More: http://stackoverflow.com/questions/9329446/for-each-over-an-array-in-javascript/9329476#9329476
comment on: http://stackoverflow.com/q/27202403

http://stackoverflow.com/comment/42907488
comment on: http://stackoverflow.com/q/27210974
type: Comment
type: QuestionComment
score: 0
has text: I did try putting them in a folder named example at one point, within the htdocs folder.

http://stackoverflow.com/q/27262115
type: Question
has body: I am working on a "component" for my website to show users how it looks on responsive views, and for this I have made several iframes to be displayed on devices to simulate its being used on an iPhone for example. Now, the problem is that the iframe code is being displayed on every page, so if I make the iframe display my website it will again see that there is an iframe inside of it and it wont stop loading the page, it creates sort of an "iframe loop" that makes the page never load. Does anyone have any idea on how to prevent this? Maybe just making the iframes load once?
has title: How can I prevent iframe infinite loops?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42998265
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
score: 1
tagged with: iframe
upvote count: 1

http://stackoverflow.com/comment/42939364
has text: I'm actually looking for the dates to be displayed before the form is POSTed, not after. Thanks!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27230994
type: Comment

http://stackoverflow.com/a/27291141
answers question: http://stackoverflow.com/q/27290125
type: Answer
upvote count: 1
score: 1
has body: Use Date.UTC() method var now = new Date(), // my date Thu Dec 04 2014 13:02:15 GMT+0300 (RTZ 2 (зима)) year = now.getFullYear(), month = now.getMonth(), day = now.getDay(), hours = now.getHours(), minutes = now.getMinutes(), utcDate; utcDate = new Date(Date.UTC(year, month, day, hours, minutes)); // Thu Dec 04 2014 16:02:00 GMT+0300 (RTZ 2 (зима)) Ext.Msg.alert('UTC Date', Ext.Date.format(utcDate, 'Y-m-d')); Look at this "Thu Dec 04 2014 16:02:00" - i got utc time(+3 hours) Fiddle example
downvote count: 0

http://stackoverflow.com/a/27157722
has body: If you take a look at the following line: option.innerHTML = calendarModel[category[i]]; This is going to try and look for property i on category, which is just a string. This is why you are getting undefined. Instead, you should be doing the following: option.innerHTML = calendarModel[category][i]; This will find the corresponding values to your category property on calendarModel
type: Answer
answers question: http://stackoverflow.com/q/27157507
has comment: http://stackoverflow.com/comment/42813962
has comment: http://stackoverflow.com/comment/42809852
score: 0

http://stackoverflow.com/q/27195781
type: AnsweredQuestion
tagged with: firefox
has answer: http://stackoverflow.com/a/27195867
has title: Submit button does not appear in Firefox but on Chrome and Internet Explorer
type: Question
possible better answer: http://stackoverflow.com/a/27195867
has answer: http://stackoverflow.com/a/27195900
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/42876653
score: 0
answer count: 2
has body: Like the title says, this does not appear on Firefox: My other submit button for my other form works on Firefox, however: form id="contactform" name="contactform" class="contactform" action="contact.php" method="post" onsubmit="return validate('contactform');"> *E-mail: IGN: *Message: Okay, so I tried the closing tags, and turns out that the submit button is hiding under some text and an image. Solution: Turns out that I had "overflow: hidden;" in my css file, and that was what made it hidden. Thanks for the responses.
accepted answer: http://stackoverflow.com/a/27195900
tagged with: javascript

http://stackoverflow.com/a/27242444
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27242256
type: Answer
upvote count: 1
has body: change your function name. don't use subTotal(); and don't use document.write("working"); function subTotalnew() { alert('working'); } onchange="subTotalnew() it gonna be work after input blur. oninput="subTotalnew() it gonna be work when input entering something.

http://stackoverflow.com/a/27607202
type: Answer
answers question: http://stackoverflow.com/q/27226242
has body: If you are looking at cascading drop down lists, refer to this link to do the required task with the help of simple jquery. Link Refer to Arun P Johnny's answer who also provides a Demo. jQuery(function($) { var locations = { 'Germany': ['Duesseldorf', 'Leinfelden-Echterdingen', 'Eschborn'], 'Spain': ['Barcelona'], 'Hungary': ['Pecs'], 'USA': ['Downers Grove'], 'Mexico': ['Puebla'], 'South Africa': ['Midrand'], 'China': ['Beijing'], 'Russia': ['St. Petersburg'], } var $locations = $('#location'); $('#country').change(function () { var country = $(this).val(), lcns = locations[country] || []; var html = $.map(lcns, function(lcn){ return '&lt;option value="' + lcn + '"&gt;' + lcn + '&lt;/option&gt;' }).join(''); $locations.html(html) }); });
score: 0

http://stackoverflow.com/q/27202170
downvote count: 0
score: 1
tagged with: firefox-addon-sdk
favorite count: 0
has title: firefox take a snapshot from addon side
type: UnansweredQuestion
answer count: 0
has body: I'm newbie to addon development and what i want is take a snapshot of specific area of browser[firefox] .so i'm developing Firefox extension for it .i tried lot! now i'm getting error "ctx.drawWindow is not a function". in my addon there is a context menu item named "take a snapshot" .when it is selected i want to take a snapshot error console.error: pool: Message: TypeError: ctx.drawWindow is not a function this is my add-on code main.js var selection = require("sdk/selection"); var { Ci } = require('chrome'); var utils = require('sdk/window/utils'); var window1 = utils.getMostRecentBrowserWindow(); var contextMenu = require("sdk/context-menu"); var menuItem = contextMenu.Item({ label: "take a snapshot", context: contextMenu.SelectionContext(), contentScript: 'self.on("click", function () {' + ' var cnvs = document.getElementById("myCanvas"); ' + ' var ctx = cnvs.getContext("2d"); '+ ' self.postMessage(ctx,cnvs);' + '});', onMessage: function (ctx,cnvs) { shoot(ctx,cnvs); } }); function shoot(ctx,cnvs){ console.log("runing"); var x = 100; var y = 100; var width = 200; var height = 200; ctx.drawWindow(window1, x, y, width, height, "rgb(255,255,255)"); console.log(cnvs.toDataURL()); } this the HTML page where i test my addon &lt;canvas id="myCanvas" width="300" height="300" style="border:1px solid #000000;"&gt; &lt;/canvas&gt;
has comment: http://stackoverflow.com/comment/43212780
upvote count: 1
linked to: http://stackoverflow.com/q/17913911
type: Question
tagged with: javascript

http://stackoverflow.com/a/27309761
type: Answer
accepted answer of: http://stackoverflow.com/q/27309614
score: 1
upvote count: 1
downvote count: 0
has body: Wrong (or at least: odd) things in your code: f is a number. You seem to expect your function to return an array, though? i &lt;= params.length should be i &lt; params.length. Array indices start at 0, and end at length-1. You are multiplying your accumulator variable with params[j] - where j is any number smaller than the currently looked-at array item. This is the reason why you get NaN - when i == 0, it loops until j == 5, and params[5] is undefined - resulting in a NaN result. What you want seems to be function factorial(n) { // function that computes the number n! var acc = 1; while (n &gt; 0) acc *= n--; return acc; } function facArray(params) { var f = []; for (var i=0; i&lt;params.length; i++) f[i] = factorial(params[i]); return f; }
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27309614

http://stackoverflow.com/a/27194131
has comment: http://stackoverflow.com/comment/42874678
answers question: http://stackoverflow.com/q/27193966
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27193966
has comment: http://stackoverflow.com/comment/42875471
type: Answer
has body: I have a feeling that the issue is not with .prop(), but rather with your DOM selection. You're first selector is using a non-standard selector, so it's implemented in JavaScript. Also, you're applying [id$=cblName] and :checkbox to every element found, not just input elements. So the first improvement would be: // v--or whatever v--only inputs $('div[id$=cblName] input:checkbox').prop('checked', true); But to use a fully native selector, use [type=checkbox] instead of :checkbox: // v--or whatever v--only inputs $('div[id$=cblName] input[type=checkbox]').prop('checked', true); // ---------------------------^-- native selector for only checkboxes This also should give a boost. NOTE: You've not provided HTML markup, but guessing from your second code block, the cblName element is the :checkbox. That means the first selector is just wrong. It should be this instead: $('input[id$=cblName]:checkbox').prop('checked', true); or better: $('input[id$=cblName][type=checkbox]').prop('checked', true); Notice I removed the space before the :checkbox. The way you had it, you were looking for descendants of the input, which wouldn't make sense.
has comment: http://stackoverflow.com/comment/42875136

http://stackoverflow.com/comment/44623991
has text: Hi man, we both are on the same boats, I am also trying to control Google Earth using Kinect. What have you achieved so far? Can you guide me how do I start?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27168837

http://stackoverflow.com/a/27496036
type: Answer
answers question: http://stackoverflow.com/q/27208724
has body: I worked it out. I had to add another div element called "prog" then var show function show() { document.getElementById("prog").style.display = "inline"; } and var loader = new THREE.JSONLoader(true); document.getElementById("prog").appendChild(loader.statusDomElement ); loader.load("obj/" + file, modelLoadedCallback);
score: 0

http://stackoverflow.com/comment/42985815
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27256015
score: 1
has text: This does work! I would not downvote necessarily, but do note that reselecting the object with it's ID causes jQuery to have to find the element. Using this will prevent that lookup and speed it up.

http://stackoverflow.com/a/27276236
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43026399
accepted answer of: http://stackoverflow.com/q/27275805
type: Answer
answers question: http://stackoverflow.com/q/27275805
has comment: http://stackoverflow.com/comment/43026419
has comment: http://stackoverflow.com/comment/43021623
score: 1
has body: One option is to hide the menu automatically when the max-width is less than 40em: @media all and (max-width: 40em){ .nav[data-state="collapsed"]{ visibility: hidden; } .nav[data-state="expanded"]{ visibility: visible; } } The fiddle is here: http://jsfiddle.net/mfwbe34m/ - is that what you're looking for?
upvote count: 1

http://stackoverflow.com/comment/42978898
type: AnswerComment
comment on: http://stackoverflow.com/a/27251463
has text: hmm.. I see what you did here. the thing is... that " Golf " is with a link too. when you click on golf - you get redirected. when you click on the #sub-menu - you get the menu opened.
score: 0
type: Comment

http://stackoverflow.com/q/27297256
has comment: http://stackoverflow.com/comment/43113302
tagged with: extjs
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43116085
favorite count: 0
tagged with: extjs4
upvote count: 2
has title: Ext.window.MessageBox draggable false, error calling hide method
score: 2
type: AnsweredQuestion
tagged with: extjs4.2
has body: After creating an instance of MessageBox like this var msgBox = Ext.create('Ext.window.MessageBox',{draggable: false}); -actually draggable false was set through an override to Ext.window.Window, I'm putting it like this to make it easier to reproduce. - also I do prefer the singleton syntax but there are already a ton of instances created like this in the code I'm working on. msgBox.alert("I am a bug, try to close me to reproduce"); Trying to close this MessabeBox calls the hide method: hide: function() { var me = this; me.dd.endDrag(); me.progressBar.reset(); me.removeCls(me.cfg.cls); me.callParent(arguments); }, which throws the following error: Cannot read property 'endDrag' of undefined Am I missing something or this is a bug? UPDATE: I'm using ExtJs 4.1.1 (but also happens in Extjs 4.2.1 (fixed on 4.2.2)) Any ideas or comments ?
tagged with: extjs4.1
type: Question
has answer: http://stackoverflow.com/a/27297751
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27297751

http://stackoverflow.com/a/27271163
downvote count: 0
score: 4
type: Answer
accepted answer of: http://stackoverflow.com/q/27270961
has body: Organize your table into multiple tbody groups (Yes, it's valid) and search within them. var $rows = $('#table tbody'); $('#search').keyup(function () { var val = '^(?=.*\\b' + $.trim($(this).val()).split(/\s+/).join('\\b)(?=.*\\b') + ').*$', reg = RegExp(val, 'i'), text; $rows.show().filter(function () { text = $(this).text().replace(/\s+/g, ' '); return !reg.test(text); }).hide(); }); body { padding: 20px; } input { margin-bottom: 5px; padding: 2px 3px; width: 209px; } td { padding: 4px; border: 1px #CCC solid; width: 100px; } Foo Bar Roll No: something something stuff something stuff Baz Bak Roll No: something something stuff something stuff Baz Bar Roll No: something something stuff something stuff (If you prefer an updated version of your Fiddle: http://jsfiddle.net/9y89dcsp/1/)
answers question: http://stackoverflow.com/q/27270961
has comment: http://stackoverflow.com/comment/43013107
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/q/27194266
score: 0
has body: I am doing a function where i am displaying a multile select box, it shows the items in the select box and some comes up as already selected, What i am trying to do is; select the items by dragging a mouse to select all, using a click on the item or there are all ways by which which we can select the items within the select box, be it mouse or keyboard., I am trying to show/hide contents based upon one of the selection of select box which is MD. On Page, i am trying that if MD is selected, it should keep the div opened. here is my try but i am failing in this because my knowledge in javascript is very less, if someone can point me in right direction, that will be great Here is my try: List 1 List 2 List 3 my code here Javascript Code: function checkASelection() { var thisVal = document.getElementById('assignType').value; alert(thisVal); if(thisVal == 'MD') { document.getElementById('annsection').style.display='block'; } } Want to in javascript but jquery is also an option which i am check
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27194355
has title: Get List of Multiple Selected Options in Select Box
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27194561
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

getboundingclientrect
tags question: http://stackoverflow.com/q/27169534
tag name: getboundingclientrect
type: Tag

http://stackoverflow.com/comment/42965067
score: 0
type: QuestionComment
has text: querySelector would work in ie8 and further..
comment on: http://stackoverflow.com/q/27244942
type: Comment

http://stackoverflow.com/q/27283264
has answer: http://stackoverflow.com/a/27303219
score: 3
tagged with: forms
has title: How do I postfix '+tag:<keyword>' to a form?
type: Question
tagged with: shopify
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a Shopify store and I'd like to use the search form to filter based on tags. According to the Shopify documentation I have to "Prefix a term with a field name and colon to narrow your search for that term to the specified field.". The default search form looks like this: Zoeken When a search for celavita is preformed, the url looks like this: http://store.<redacted>.com/search?type=product&q=celavita What I want is for the url to end up like this: http://store.<redacted>.com/search?type=product&q=celavita+tag:Jumbo I've tried this: Zoeken But this results in the url looking like: http://store.<redacted>.com/search?type=product&q=celavita&tag=Jumbo What could I try next? Could this be done using JavaScript/jQuery?
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/43034998
type: UnansweredQuestion

http://stackoverflow.com/a/27220463
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42920273
has comment: http://stackoverflow.com/comment/42920160
score: 2
has comment: http://stackoverflow.com/comment/42920080
has comment: http://stackoverflow.com/comment/42920055
has body: Something like this function draw_multiple() { var obstacles = { "item1": (5x3) + 2, // obstacles[0] returns 17 "item2": (2/2) * 5, // obstacles[1] returns 5 "anotherItem": "This is a string" // obstacles[2] returns "This is a string" }; for(var i=0; i&lt;10 ; i++) { drawCar ((i*70)+100,100, 30); } for(var i=0; i&lt;obstacles.length ; i++) { drawObstacles( obstacles[i] ); } } You need to create the function drawObstacles().
has comment: http://stackoverflow.com/comment/42921546
accepted answer of: http://stackoverflow.com/q/27220416
has comment: http://stackoverflow.com/comment/42920599
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27220416
has comment: http://stackoverflow.com/comment/42921580

http://stackoverflow.com/comment/42879294
type: Comment
comment on: http://stackoverflow.com/q/27197175
score: 0
has text: TotalTime reset on each execution, and TotalDurationofExecution doesn't. Isn't it what you want?
type: QuestionComment

http://stackoverflow.com/comment/42976183
score: 0
type: Comment
has text: trying to implement ajax solution.
comment on: http://stackoverflow.com/a/27250696
type: AnswerComment

http://stackoverflow.com/comment/42987628
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27256877
score: 0
has text: Yay, even works in IE, so I assume its a caching problem (you're actually running old code).

http://stackoverflow.com/q/27207821
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27207899
upvote count: 1
tagged with: google-chrome
type: AnsweredQuestion
score: 1
type: Question
tagged with: browser
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27207899
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/27208232
has title: nodejs `arguments` is object but in the browser, it is an `array`
has body: When I access arguments from inside called function in nodejs... echo '!function(){ console.log(arguments) }(1,2,3)' | node ... it outputs an object ... { '0': 1, '1': 2, '2': 3 } ... but in google chrome ... !function(){ console.log(arguments) }(1,2,3) ... outputs ... [1, 2, 3] Why is it not consistent? What other js environments have this different behaviour? Is it ok for me to use arguments? How can I ensure it is always an array before I use it?
has comment: http://stackoverflow.com/comment/42897506
has answer: http://stackoverflow.com/a/27208232

http://stackoverflow.com/a/27286669
type: Answer
score: 0
has body: You can use the .contents() method, then replace any _ in each text node as follows: $('.value > fieldset').contents().each(function() { this.nodeType !== 3 || ( this.textContent = this.textContent.replace(/_/g,' ') ); }); $('.value > fieldset').contents().each(function() { this.nodeType !== 3 || ( this.textContent = this.textContent.replace(/_/g,' ') ); }); Cantidad 3_rosas 12_rosas 18_rosas 24_rosas
answers question: http://stackoverflow.com/q/27286457

http://stackoverflow.com/q/27184612
upvote count: 1
tagged with: php
has title: Expiring session using session variable and javascript
has answer: http://stackoverflow.com/a/27184729
has comment: http://stackoverflow.com/comment/42856385
type: AnsweredQuestion
tagged with: session
has comment: http://stackoverflow.com/comment/42856427
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/27184729
has comment: http://stackoverflow.com/comment/42856850
has comment: http://stackoverflow.com/comment/42856398
has body: Hey guys i wanna check session of a logged in user in php dynamically. I presently use: $now = time(); if($now &lt; $_SESSION['expire']) { //continue session } else { //exit } I would like to implement the same using javascript and dynamically check the variable every 60 secs. Is there a way to do this dynamically?
has comment: http://stackoverflow.com/comment/42857059
has comment: http://stackoverflow.com/comment/42857673
favorite count: 0
linked to: http://stackoverflow.com/q/520237

haxe
tags question: http://stackoverflow.com/q/27275796
type: Tag
tag name: haxe

http://stackoverflow.com/a/29698398
answers question: http://stackoverflow.com/q/27292941
type: Answer
has body: According to a documentation that no longer exists, but in the Google cache, hangout_type property means : Specifies what type of Hangout should be started. The following values are supported: normal (Default) Launch the Hangout app without broadcasting to YouTube or starting a Hangout party. onair Launch the Hangout to be broadcast on YouTube as a Hangout On Air. party Launch the Hangout app as a Hangout party. moderated Launch the Hangout app with Control Room enabled.
score: 0

http://stackoverflow.com/q/27211052
type: AnsweredQuestion
type: Question
score: 5
has comment: http://stackoverflow.com/comment/42903413
answer count: 1
tagged with: javascript
tagged with: jquery
has title: When prepending data to vertically-scrolled document, how can I keep previous part visible?
has body: This is a part of infinite scroll which also works when we scroll upwards: Initial Content 111 Initial Content 222 Initial Content 333 Initial Content 444 Initial Content 555 Initial Content 666 Initial Content 777 JS code : var dataAbc = ' Focus Shifted Here '; setTimeout(function(){ $(dataAbc).prependTo("#sContainer");},3000); setTimeout(function(){ $(dataAbc).prependTo("#sContainer");},3000); setTimeout(function(){ $(dataAbc).prependTo("#sContainer");},3000); setTimeout(function(){ $(dataAbc).prependTo("#sContainer");},3000); Js Fiddle: http://jsfiddle.net/LRLR/ocfLkxex/ Issue: Whenever prependTo is called, the data is shifted downwards and new data is added at the top. The scrollbar seems to ignores this, and from the users' point of view, everything he was reading gets pushed down. After a few times, what user was reading gets pushed out of the visible area, and user must scroll down to continue reading. Desired: I want the user to be able to read long content without having to (re)scroll when new items are added at the top of the list. Ideally, if user scrolled so that i.e. "Initial Content 444" is at the top of the view, when new items are added, it should keep its visual position. New items should be added "above" it without visually moving the current contents. Why doesn't the scrollbar keep those elements visible already? How can I configure the scrollbar to behave like I want?
has comment: http://stackoverflow.com/comment/42903391
accepted answer: http://stackoverflow.com/a/27211156
favorite count: 0
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/42903421
has comment: http://stackoverflow.com/comment/42903571
tagged with: css
has answer: http://stackoverflow.com/a/27211156

http://stackoverflow.com/comment/42945709
has text: thanks bro..it gave me better view in using timer.really help me a lot even window.alert not show. :)
comment on: http://stackoverflow.com/a/27234327
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27237633
score: 0
answer count: 1
has title: Preventing strange behaviour of Bootstrap 3 Accordion
tagged with: javascript
has body: I have some complex html, and a little button-dropdown that auto populates certain fields with predetermined values. When I click one of the options on that button, the javascript function fires but the accordion collapses, which prevents the user from seeing the results of clicking that button. In addition to that, clicking anywhere else in the accordion collapses it, which prevents the user from filling in any fields. How do I prevent this behaviour so that only when you click on the panel heading, it closes? A sample of my HTML: &lt;div class="panel panel-default" data-toggle="collapse" data-target="#collapse-7"&gt; &lt;div class="panel-heading"&gt; &lt;h3 class="panel-title" style="font-size: 20px"&gt;TAXATION (Residual)&lt;/h3&gt; &lt;/div&gt; &lt;div id="collapse-7" class="panel-collapse collapse in"&gt; &lt;div class="panel-body"&gt; &lt;div class="row"&gt; &lt;div class="col-lg-10 bg-info"&gt; &lt;h4&gt;Rating criteria:&lt;/h4&gt; &lt;div class="col-sm-4"&gt;&lt;p&gt;1: Not capable of performing&lt;/p&gt;&lt;p&gt;2: Capable with significant / frequent intervention&lt;/p&gt;&lt;/div&gt; &lt;div class="col-sm-4"&gt;&lt;p&gt;3: Capable with limited / periodic intervention&lt;/p&gt;&lt;p&gt;4: Capable with no intervention&lt;/p&gt;&lt;/div&gt; &lt;div class="col-sm-4"&gt;&lt;p&gt;A: Advanced experience&lt;/p&gt;&lt;p&gt;B: Basic experience&lt;/p&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="col-lg-2"&gt; &lt;div class="btn-group"&gt; &lt;button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"&gt; Default all to... &lt;span class="caret"&gt;&lt;/span&gt; &lt;/button&gt; &lt;ul class="dropdown-menu" role="menu"&gt; &lt;li&gt;&lt;a href="#" onclick="defaulter('7', 'A')"&gt;A&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" onclick="defaulter('7', 'B')"&gt;B&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;table class="table"&gt; &lt;tbody&gt;&lt;tr style="background-colo…
has comment: http://stackoverflow.com/comment/42952009
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27237793
tagged with: jquery
has comment: http://stackoverflow.com/comment/42951948
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42952036
accepted answer: http://stackoverflow.com/a/27237793
tagged with: twitter-bootstrap

http://stackoverflow.com/q/27273898
type: Question
has title: $scope or scope in $scope.$watch?
tagged with: javascript
upvote count: 1
linked to: http://stackoverflow.com/q/111102
answer count: 1
has body: Found such an idea in article: Notice how the value function takes the scope as parameter (without the $ in the name). Via this parameter the value function can access the $scope and its variables. $scope.$watch( function( scope ) { return scope.val; ... instead of what i used to: $scope.$watch( function() { return $scope.val; ... Is it really better? And what is the reasoning behind this way?
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27274150
type: AnsweredQuestion
tagged with: watch
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27274150

http://stackoverflow.com/a/27299939
downvote count: 0
answers question: http://stackoverflow.com/q/27299411
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/27299411
has comment: http://stackoverflow.com/comment/43069106
has comment: http://stackoverflow.com/comment/43069816
upvote count: 2
has comment: http://stackoverflow.com/comment/43068477
has body: But I can't get it to work Some points: don't use an array of deferreds, even less a global one! Break it into single steps, and use a single promise for each step. use the counter value to resolve the promise. A promise should always represent an (async) result. don't use $.when unless you need to wait for multiple promises then does take a callback function. You must not call takeStep(), but pass it. You also might want to have a look at this answer for rules-of-thumb to get familiar with promises. // the most generic function that only waits and returns a promise function wait(t, v) { var d = new $.Deferred(); setTimeout(function() { d.resolve(v); }, t); return d.promise(); } // logs the value and returns the next number function markStep(nr) { log('step ' + cntr + ': ' + getCurrentTime() ); return nr+1; } // waits before logging and returns a promise for the next number function takeStep(nr) { return wait(stepTime, nr).then(markStep); } takeStep(0) .then(takeStep) .then(takeStep) .then(takeStep) .then(takeStep) .done(function(nr) { log('done (' + getCurrentTime() + ')'); });
type: AcceptedAnswer

http://stackoverflow.com/comment/43051071
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27292929
has text: Have you tried `field.style.border='';` ?
score: 3

http://stackoverflow.com/comment/96971103
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27278322
type: AnswerComment
has text: So once you add the extension to chrome options. How do you interact with the extension?

http://stackoverflow.com/a/27298011
upvote count: 1
answers question: http://stackoverflow.com/q/27296623
downvote count: 0
has body: There are a few ways of achieving this: Use a non-breakable space (like Tocino suggested) which might probably be the easiest way to do it. Try adding &nbsp; between the words which creates white spaces between words. Edited your fiddle to achieve this (not very ideal): HTML - &lt;div&gt; &lt;tspan id='tghj'&gt;&lt;/tspan&gt; &lt;tspan id='tghk'&gt;&lt;/tspan&gt; &lt;/div&gt; Javascript - $('#tghj').html('Hey'); $('#tghk').html('There'); CSS - #tghj { float: left; } #tghk { float: right; } this approach will give you some flexibility to adjust the positioning via CSS rather than Javascript. Further flexibility using the exact code from point 3 except that you mend the CSS as: #tghk { margin-left: 30%; /**or any other value depending on the amount of space you want between the words**/ } There are several ways of achieving this. Hope this helps.
type: Answer
score: 1

http://stackoverflow.com/q/27181998
tagged with: jsfiddle
tagged with: createelement
tagged with: javascript
has body: Im struggling to 'dynamically' create SVG elements using Firebug. Here is a jsfiddle example which also fails. http://jsfiddle.net/CLEZc/3/ <circle id="c1" cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> Generate function genRect () { var rect = document.createElementNS ("http://www.w3.org/2000/svg", "rect"); var svg = document.getElementsByTagName ("svg")[0]; console.log (rect); console.log (svg); rect.setAttribute ("width", "50"); rect.setAttribute ("height", "50"); rect.setAttribute ("fill", "#e11a51"); rect.setAttribute ("stroke", "blue"); rect.setAttribute ("x", "75"); rect.setAttribute ("y", "150"); svg.appendChild (rect); } Thanks,
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/5468350
tagged with: http://stackoverflow.com/tag/svg
has title: Generating an SVG shape
has answer: http://stackoverflow.com/a/27182077
tagged with: namespaces
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27182077

http://stackoverflow.com/q/27235567
tagged with: animation
has answer: http://stackoverflow.com/a/27235929
has body: I am trying to make div disappear and reappear by have the text disappear, the div collapsing, then the opposite with another div, using JQuery animate function but something's not working in the following code: $(currentTab + " > p").animate({ opacity: 0},{ duration: 500, complete: function(){ $(currentTab).animate({width: "0", opacity: 0}, { duration: 500, complete: function(){ $(clickedTab).animate({width: "70%"}, {duration: 500, complete: function(){ $(clickedTab + " > p").animate({ opacity: 1 }, 500); }}); }}); }}); where currentTab and clickedTab are my div ids, like "#ct-1", and my html looks like that: aaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb So the second animate doesn't run at all. I'm guessing this has somehting to do with the DOM, maybe I can't access a parent inside the animate ? maybe it's nothing to do with it... Thanks in advance ! Robin
has title: JQuery width animate doesn't run
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42947680
score: 0
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/43044484
score: 0
type: AnswerComment
has text: could you please explain with example
type: Comment
comment on: http://stackoverflow.com/a/27272739

http://stackoverflow.com/comment/42905555
type: Comment
type: QuestionComment
has text: It looks like your endpoint returns an object, not an array.
comment on: http://stackoverflow.com/q/27212352
score: 0

http://stackoverflow.com/a/27175734
upvote count: 19
score: 19
has body: After reading the documentation and playing a little bit with this Symbol type in chrome, it appears that a Symbol is a way to define a name -- not a value --, and the fact that properties defined using symbols are not visible using for..in, Object.getOwnPropertyNames() or JSON.stringify() makes symbols useful for metadata properties: // define metadata symbols var Metadata = { Date: Symbol('Message date') }; var email = function(recipient, message) { this.Recipient = recipient; this.Message = message; this[Metadata.Date] = new Date(); }; var email1 = new email('@Me', 'test'); JSON.stringify(email1); // { // Recipient: '@Me', // Message: 'test' // } // Date is still accessible using email1[Metadata.Date]; // Thu Nov 27 2014 16:50:00 GMT+0000 // Debugging in Console: // { // Recipient: '@Me', // Message: 'test' // Symbol(Message date): Thu Nov 27 2014 16:50:00 GMT+0000 // } Symbols can be made global using the Symbol.for function, so metadata names can be created once and used across all project files. Accessing the value using a symbol requires having a reference to the symbol when created. Each call to Symbol() creates a new one even if the same description is used: var a = Symbol('a'); var b = Symbol('a'); a != b // and a != Symbol('a') but, creating a symbol using Symbol.for, it will be registered in a global registry and the description becomes a key, meanong only one symbol with the same key will exist in the global registry: var a = Symbol.for('a'); var b = Symbol.for('a'); a == b // and a == Symbol.for('a')
accepted answer of: http://stackoverflow.com/q/27172762
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27172762
type: Answer

http://stackoverflow.com/comment/43077043
type: Comment
type: QuestionComment
has text: Wow hadn't seen that, but just corrected them and still doesn't work.
score: 0
comment on: http://stackoverflow.com/q/27303630

http://stackoverflow.com/q/27311530
score: 0
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43087567
downvote count: 1
has title: Other way than running javascript: from url?
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27330464
has body: Is there other way to inject my own javascript into another page without changing its url? For example look at this website: http://somadesign.ca/projects/fontfriend/ It is working through entering into url address long script, something like: javascript:{script code} which later injects script to any website. Is there any other,more autmoated, simpler way to do it?
has answer: http://stackoverflow.com/a/27311935
favorite count: 0
has comment: http://stackoverflow.com/comment/43083817
type: Question
has comment: http://stackoverflow.com/comment/43086712

http://stackoverflow.com/comment/42885698
comment on: http://stackoverflow.com/q/27201103
score: 5
type: Comment
type: QuestionComment
has text: This question appears to be off-topic because it is about code review, it might find a home on http://codereview.stackexchange.com.

http://stackoverflow.com/q/27292937
has title: css not getting applied due to external css inclusion
tagged with: css
has comment: http://stackoverflow.com/comment/43051434
tagged with: cordova
has answer: http://stackoverflow.com/a/27293155
has comment: http://stackoverflow.com/comment/43051094
type: Question
has answer: http://stackoverflow.com/a/27292982
has answer: http://stackoverflow.com/a/27292990
tagged with: javascript
has body: I am designing application in phonegap. I have externally included following css: &lt;link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css" /&gt; &lt;link rel="stylesheet" href="css/bootstrap.min.css"&gt; In design i want body to have one background image. For that i have done following: &lt;style&gt; /*this block should go in the styles.css file*/ .ui-panel-inner { padding:0px; /*make the buttons flush edge to edge*/ } .ui-controlgroup { margin:0; /*make the buttons flush to the top*/ } #header { height:54px; } #bars-button { margin:7px; } .bodyCSSBG { background-image:url("ProjectImages/aboutUsBackground.JPG"); background-repeat:no-repeat; background-size:cover; } &lt;/style&gt; In body: &lt;body class="bodyCSSBG"&gt; But background image is not getting aaplied to page. If i remove external css as: &lt;link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css" /&gt; Then background image gets applied. What can i do in this case?? EDIT1: written !Important as:
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43051177
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43051633

http://stackoverflow.com/comment/43032640
type: Comment
has text: I would suggest using an requirejs approach to this. Check out DI
comment on: http://stackoverflow.com/q/27282008
score: 1
type: QuestionComment

http://stackoverflow.com/a/27227073
has body: You should be using: var name = "&lt;%- data[0].firstname %&gt;"; document.getElementById("pil").innerText= name; As there's only one element with id="pil" I think the problem is with wrapping the code in the function, may be you should try this: &lt;body onload="myFunction()"&gt; and js be like: function myFunction() { var name = "&lt;%- data[0].firstname %&gt;"; document.getElementById("pil").innerText= name; } Here's the working FIDDLE
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27226963
score: 1

http://stackoverflow.com/comment/42881595
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27198510
has text: no, I am thinking @Kevin has the right track though.
type: AnswerComment

http://stackoverflow.com/a/27236215
has comment: http://stackoverflow.com/comment/42949367
answers question: http://stackoverflow.com/q/27236173
type: Answer
score: 2
downvote count: 0
has body: The form reference inside ValidateUpdate method does not seem right. You have defined it as "update" but trying to refer to it by "add".
upvote count: 2

http://stackoverflow.com/a/27308358
type: Answer
answers question: http://stackoverflow.com/q/27308297
accepted answer of: http://stackoverflow.com/q/27308297
has body: undefined, null, Numbers, Strings literals and Booleans are value types in javascript. So, they will be compared with their value unlike RegExp(or any other Object for that matter) which is an object, where the comparison takes place on the grounds of reference. So "a" == "a" will return true because the values are same but /a/ == /a/ will return false because the references are different.
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43041850
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27287450
has text: What is the value of "template" in your directive? is it dynamic, then where from that vale comes?

http://stackoverflow.com/comment/43055180
type: Comment
type: QuestionComment
score: 0
has text: Interestingly, when I open and close developer tools in chrome the images become movable. This is bizarre!
comment on: http://stackoverflow.com/q/27295119

http://stackoverflow.com/q/27155844
has answer: http://stackoverflow.com/a/27155948
score: 0
answer count: 2
has body: I'm using AngularJS's $resource module to sync "Appointments" back and forth with the server. An appointment contains a title, description, and time. The server accepts new appointments via a JSON object POST'd at api/appointments, ie. { title: "Doctors Visit", description: "Check up", time: "1:00pm" } Now the server will save the appointment and add an id to the object, and render a JSON response: { id: 23, title: "Doctors Visit", description: "Check up", time: "1:00pm" } The problem is, if I use the $resource module to save a new Appointment, it doesn't save the id attribute to the local JS object. var Appointment = $resource('example.com/api/appointments/:id.json', {id: "@id"}, { update: {method: "PUT"} }); var appointment = new Appointment(); appointment.title = "CEO Meeting"; appointment.description = "Meeting with the CEO"; appointment.time = "2:00pm" appointment.$save() The appointment variable doesn't have the attribute id ever assigned to it, even after the response is finished. What is the best way to do this?
has title: Server updates with AngularJS
has comment: http://stackoverflow.com/comment/42806292
tagged with: angularjs
tagged with: angular-resource
has answer: http://stackoverflow.com/a/27156270
accepted answer: http://stackoverflow.com/a/27156270
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/27155948
tagged with: javascript

http://stackoverflow.com/comment/42884607
type: Comment
type: QuestionComment
has text: What about defining each complex structure in the javascript array into java objects? Then add them to a List<Object> = new ArrayList<Object>();. Iterate the list, checking what object instance the elements represent and then handling them accordingly.
score: 1
comment on: http://stackoverflow.com/q/27200481

http://stackoverflow.com/comment/42938574
type: QuestionComment
comment on: http://stackoverflow.com/q/27230842
score: 1
has text: You shouldn't use an alert as a thank you message at all.
type: Comment

http://stackoverflow.com/a/27250025
has body: It's not working because you're POSTing to the wrong endpoint. Note your URL Here are the docs. It should probably be this: $.ajax({ url: "http://localhost:7474/db/data/transaction/commit", type: "POST", data: body, dataType: "jsonp", contentType: "application/jsonp" })
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42976484
type: Answer
has comment: http://stackoverflow.com/comment/42989381
has comment: http://stackoverflow.com/comment/42974398
has comment: http://stackoverflow.com/comment/42976681
has comment: http://stackoverflow.com/comment/42976604
has comment: http://stackoverflow.com/comment/42976690
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27249430
has comment: http://stackoverflow.com/comment/42977335
accepted answer of: http://stackoverflow.com/q/27249430
has comment: http://stackoverflow.com/comment/42979367

http://stackoverflow.com/comment/43065551
type: QuestionComment
comment on: http://stackoverflow.com/q/27298096
has text: I tried to make ng-change work, but since it depends on ng-model I couldn't get a positive result. I implemented some logic with ng-click to bypass the problem but I feel that this problem is so simple that it must have a simple and clean solution.
score: 0
type: Comment

http://stackoverflow.com/q/27155858
score: 1
has comment: http://stackoverflow.com/comment/42806216
tagged with: blogger
upvote count: 1
type: Question
has body: I have the problem with Blogger in defining data:post.url in variable for further output, for instance if I use data:blog.url it works perfectly: &lt;script type="text/javascript"&gt; var posturl="&lt;data:blog.url/&gt;" &lt;/script&gt; giving workable link from this statement: var summary = '&lt;a href="'+posturl+'"&gt;' '&lt;/a&gt;'; div.innerHTML = summary; but with data:post.url i just receive TEMPLATE ERROR:No dictionary named:'post'in:['blog','skin','view'] please advise if some one knows the reason, thanks!
tagged with: javascript
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42807188
has title: bloggers <data:post.url/> doesn't work in jscript
answer count: 0

http://stackoverflow.com/q/27218094
has title: Passing a javascript variable into a angularJS scope
answer count: 3
has answer: http://stackoverflow.com/a/27218477
has comment: http://stackoverflow.com/comment/42916138
possible better answer: http://stackoverflow.com/a/27218230
accepted answer: http://stackoverflow.com/a/27218477
has body: So I'm creating a webpage using the MEAN stack and I saved the user variable to be carried across every page using the HTML5/Javascript variable of sessionStorage. We are now trying to pass this value to angularJS through the controller. The issue is, however, we don't know how to pass it into the submit file without having the user type in the value. We tried doing to display the username as readonly and setting the value using getElementByID, but angularJS doesn't recognize the new value, but rather gets the value from the old field, which is "" because the value of the text field is blank to start with, so the user is undefined in the angularJS scope. We also tried to pass the value as a hidden scope, which also did not work, because angular Is there a way of just declaring the variable in the ng-model? The issue is that any ng value uses "" so it's always thinking that the value is just "user" is just the text "user" and not actually a variable. . Any help would be appreciated
tagged with: angularjs
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/27218372
tagged with: javascript
has answer: http://stackoverflow.com/a/27218230
has comment: http://stackoverflow.com/comment/42915819

http://stackoverflow.com/comment/42836666
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27173196
has text: @iliacholy nothing shows..
score: 0

http://stackoverflow.com/q/27307985
has title: How do I pass $scope to service
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43078371
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27308230
has comment: http://stackoverflow.com/comment/43078252
tagged with: javascript
has body: I want to get data to update my expression {{myList}} but it seem like I have the $scope issue in my service, below code doesn't seem to work : app.controller('AppCtrl', ['$scope', 'getTopicContent', function($scope,getTopicContent){ getTopicContent.request(); }]); app.factory('getTopicContent', ['$http', function($http, $scope){ var query = function() { return $http({ url: "http://www.corsproxy.com/mydata.me/level1/list.php", method: "GET" }).success(function(data, $scope){ $scope.myList= data; }); } return { request : function(){ return query(); } } }]); But if I do like this it will work http://pastebin.com/T7rjKYds, which I run the .success in the controller instead of within my service.
answer count: 1
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/27308230
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/42924255
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27222838
has text: Doesn't matter where it comes from ;)

http://stackoverflow.com/comment/62354922
type: Comment
comment on: http://stackoverflow.com/q/27220908
type: QuestionComment
has text: @RobG, sorry, I want it like 137.58 where the last digit is rounded and it's to two trailing digits after the decimal.
score: 0

http://stackoverflow.com/q/27240889
accepted answer: http://stackoverflow.com/a/27240916
possible better answer: http://stackoverflow.com/a/27240941
has answer: http://stackoverflow.com/a/27240941
type: Question
has comment: http://stackoverflow.com/comment/42958662
tagged with: javascript
has comment: http://stackoverflow.com/comment/42958302
has title: Javascript - extract span value
score: 0
answer count: 3
has body: Hi there i was wondering how you would get the Span Value="Example" from an object using JavaScript. playlist = document.getElementById("list"); playlist.addEventListener("click",playNext,false); function playNext(){ var next = playlist.value; alert(next); } As for the html Object1 I am unable to extract the "neededValue" from this span object, however i have had success returning the innerHTML from this span. Thanks,
has answer: http://stackoverflow.com/a/27240942
has answer: http://stackoverflow.com/a/27240916
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/27239780
has answer: http://stackoverflow.com/a/27239925
downvote count: 0
answer count: 1
tagged with: javascript
has body: I cannot access the upcoming_matches array inside the MySQL query callback, how come? I'm greeted with a 'TypeError: Cannot read property '1' of null' error message on the console.log(upcoming_matches[1]); line which indicates that the variable is being reset for some reason (a guess, I'm not very experienced with Javascript)? var regex = regex code.. while ((upcoming_matches = regex.exec(body)) != null) { HLTVID = upcoming_matches[1].split("-"); connection.query('SELECT * FROM `csgo_matches` WHERE HLTVID=' + HLTVID[0], function(err, rows, fields) { if (err) throw err; console.log(upcoming_matches[1]); }); }
score: 3
has title: Cannot use global variable in NodeJS MySQL
favorite count: 0
accepted answer: http://stackoverflow.com/a/27239925
linked to: http://stackoverflow.com/q/23667086
tagged with: node.js
type: AnsweredQuestion
upvote count: 3
type: Question

http://stackoverflow.com/a/54448113
upvote count: 4
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/27176640
has body: Via DOM: https://datatables.net/examples/data_sources/js_array.html If you're looking to create a JS variable from a Thymeleaf object you can add said object to the DOM. I recently did a project where I returned query results to a Java object of type List&lt;> and added that object to the DOM through my Spring Controller. //Deliver Results Array to the DOM model.addAttribute("myResult", myResult); After this object is added to your Thymleaf template model you can access it in your HTML as th:text="${myResult}" You can also reference it in your Javascript by simply referencing the name of the model object from the DOM. I haven't been able to get the variable to populate in the seperate JS file without making it global in scope from the HTML file with: &lt;script th:inline="javascript"&gt; var myResult = [[${myResult}]]; &lt;/script&gt; My JS file looks like this $(function(){ //Get Thymeleaf DOM Object console.log(myResult); }); Returning Result from DOM Th object in question must be reference-able from within the DOM. You may have better performance with AJAX and creating a controller that returns the data to the client over HTTP. Seems like thymeleaf 3 has other solutions as well : https://github.com/thymeleaf/thymeleaf/issues/395 Hope this helps!

http://stackoverflow.com/a/27295074
has comment: http://stackoverflow.com/comment/48472899
answers question: http://stackoverflow.com/q/27289281
has body: Please find below code of jquery.timeago plugin for following requirements: - for today it should display Today &lt;time&gt;, - for older than 3 days it should be &lt;Dayname&gt; &lt;time&gt;, - for older than 3 months it should be DD-MON-YYYY and - for older than 1.5 years it should be YYYY /** * Timeago is a jQuery plugin that makes it easy to support automatically * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago"). * * @name timeago * @version 1.4.1 * @requires jQuery v1.2.3+ * @author Ryan McGeary * @license MIT License - http://www.opensource.org/licenses/mit-license.php * * For usage and examples, visit: * http://timeago.yarp.com/ * * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org) */ (function (factory) { if (typeof define === 'function' &amp;&amp; define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); } else { // Browser globals factory(jQuery); } }(function ($) { $.timeago = function (timestamp) { if (timestamp instanceof Date) { return inWords(timestamp); } else if (typeof timestamp === "string") { return inWords($.timeago.parse(timestamp)); } else if (typeof timestamp === "number") { return inWords(new Date(timestamp)); } else { return inWords($.timeago.datetime(timestamp)); } }; var $t = $.timeago; var dayNames = ['Sunday', "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; $.extend($.timeago, { settings: { refreshMillis: 60000, allowPast: true, allowFuture: false, localeTitle: false, cutoff: 0, strings: { prefixAgo: null, prefixFromNow: null, suffixAgo: "ago", suffixFromNow: "from now", inPast: 'any moment now', seconds: "Today", minute: "Today", minutes: "Today", hour: "Today", hours: "Today", //seconds: "less than a minute", //minute: "about a minute", //minutes: "%d minutes", //hour: "about an hour", //hours: "about %d hours", day: "days", days: "days", month…
score: 0
type: Answer

http://stackoverflow.com/q/27195210
tagged with: ajax
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27195343
type: Question
tagged with: javascript
score: 0
has title: PHP on WAMP preferring same random array elements?
tagged with: random
accepted answer: http://stackoverflow.com/a/27195343
tagged with: wamp
has body: I am new to PHP and AJAX, and as a test I tried to create a script that gets the name of a random image in a folder on my server. However, it seems that the server prefers to give only names that it has already given. That is, it appears that, given that an file name has already been received once by the client, it is more likely to appear again later on the client. This, of course, it not the intended functionality. I suspect it has something to do with caching, but, as I mentioned before, I am not incredibly well-versed in using PHP. The following is the script that gets the random file name: &lt;?php $dir = "../img"; $files = array_values(array_diff(scandir($dir),["..",".",".htaccess"])); $file = $files[array_rand($files)]; echo $file; ?&gt; Changing the script to use echo array_rand($files) seems to verify that the random numbers are, indeed, biased. I have also read that PHP does poor random number generation on Windows. If this is why this is happening, is there any way to fix it?
answer count: 1

http://stackoverflow.com/comment/42809757
score: 1
has text: You should change ` ` to e.g. ` ` or change to different ids as you're using the same id 3 times. `id`s have to be unique.
comment on: http://stackoverflow.com/q/27157803
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27215364
answers question: http://stackoverflow.com/q/27215285
upvote count: 0
has body: Use split() function var strdata = cn=stanley01,ou=employee,o=user,cn=martha,ou=employee,o=user,cn=asley,ou=employee,o=user; var arraydata = strdata.split(",");
type: Answer
has comment: http://stackoverflow.com/comment/42910644
downvote count: 2
has comment: http://stackoverflow.com/comment/42912195
has comment: http://stackoverflow.com/comment/42912147
score: -2

http://stackoverflow.com/comment/43019656
type: QuestionComment
has text: What's the point of using `$.each` and `$.parseJSON` functions?
comment on: http://stackoverflow.com/q/27273208
score: 0
type: Comment

http://stackoverflow.com/a/27283885
has body: The values from prompt are strings and thats why the don't add as you wish add plus before params[i] and your have it correct var array = []; getNum(); document.write(array); document.write("&lt;br&gt;Sum: " + sum(array)); //Function to Sum Array function sum(params){ var total = 0 ; for (i = 0; i &lt; params.length; i++){ total += +params[i]; //make the params[i] to be a number } return total; } //Function to get Numbers in Array function getNum(){ var count = 0; alert("Please enter 5 numbers"); while(count &lt; 5) { array[count] = prompt("Number " + (count + 1)); count++; } }
answers question: http://stackoverflow.com/q/27283810
type: Answer
score: 0

http://stackoverflow.com/a/27290267
score: 0
has body: try this var payamount=document.getElementById('amount').value; var calamount=payamount*3; document.getElementById('calculate').innerHTML=calamount;
type: Answer
answers question: http://stackoverflow.com/q/27290190

http://stackoverflow.com/q/27250357
answer count: 2
has answer: http://stackoverflow.com/a/27250529
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42974872
tagged with: anonymous-function
has body: I would like to return value from anonymous function. How can I assign returned value to $id variable in below code ? $(document).on("click", '.delete-component', function(e) { return 4; }); //$id in this scope should be equal 4
has comment: http://stackoverflow.com/comment/43058235
score: 8
favorite count: 0
accepted answer: http://stackoverflow.com/a/27250529
upvote count: 8
has title: How to return value from anonymous function in js
linked to: http://stackoverflow.com/q/23667086
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42974828
has answer: http://stackoverflow.com/a/27250682
type: Question
possible better answer: http://stackoverflow.com/a/27250682

http://stackoverflow.com/comment/42944566
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27232970
has text: publish_stream is wrong. publish_actions is correct
type: AnswerComment

http://stackoverflow.com/comment/42818033
has text: Thank you, but still no luck.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27162279

http://stackoverflow.com/comment/43027522
type: QuestionComment
type: Comment
has text: I'm using media queries already for the breakpoint between medium screens to small screens, but this is for medium to large- and I cant use a media query for that as I dont know how many items will be in the menu or how long the labels will be
comment on: http://stackoverflow.com/q/27278972
score: 0

http://stackoverflow.com/q/27268326
tagged with: webix
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27422735
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/27395473
type: UnansweredQuestion
has title: Integration of webix tables and backbone
upvote count: 3
has comment: http://stackoverflow.com/comment/43282679
type: Question
has body: I am tying to integrate webix tables with a backbone collection as shown in the webix docs (http://docs.webix.com/desktop__backbone_collections.html) however it does not seem to work. The object sync call happens, but no data is loaded. budgets = new Backbone.Budget.Collection(window.budget) list = width : 320 view : "datatable" id : "budget_list" backbone_collection : budgets select : true scroll : false columns :[ {header : "Month", id: "budget_month"} {header : "Year", id: "budget_year"} {header : "Currency", id: "base_currency"} ] on: { onAfterRender : () -&gt; console.log("Sync ", @_settings) @sync(@_settings.backbone_collection) }
score: 3
has comment: http://stackoverflow.com/comment/43237650
tagged with: javascript

http://stackoverflow.com/q/27293741
has title: Is it possible to trigger a real click to prevent execute PopUp Blocker
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27293918
type: Question
has comment: http://stackoverflow.com/comment/43052638
tagged with: javascript
tagged with: jquery
has body: &lt;input type="button" id="myButton" onClick="performSyncronousRequest();"&gt; &lt;script&gt; function performSyncronousRequest() { $.ajax({ data: {}, success: function(){ window.open(\'http://www.google.com\'); }, async: false }); } &lt;/script&gt; if i execute the click live in BRowser it opens a new tab in browser without a Popup Warning but if i execute it with $(#myButton).click(); then the popblocker is activated is there a possibility to avoid this
tagged with: click
tagged with: ajax

http://stackoverflow.com/comment/43201436
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27272074
score: 0
has text: No i'm new in this wberkley. You are right in there.But the error was on the script as jao said.

http://stackoverflow.com/comment/42848625
has text: Maybe I worded the question wrong but I have bootstrap popover which contains an input box and I'm trying to change it's value. The input shows up when I click a button and that's what I meant by created after page loads.
type: Comment
comment on: http://stackoverflow.com/a/27179884
score: 0
type: AnswerComment

http://stackoverflow.com/q/27164209
tagged with: javascript
has answer: http://stackoverflow.com/a/27164357
type: Question
score: 0
answer count: 2
has body: I have html page that has 3 buttons which on click event displays respective hidden div with form .The html for buttons is : Using this js code on click of these buttons we can select html div. function toggle_visibility(id) { var e = document.getElementById(id); if(document.getElementById("c").id == id) { e.style.display = 'block'; document.getElementById("a").style.display='none'; document.getElementById("b").style.display='none'; document.getElementById("g").style.display='none'; document.getElementById("d").style.display='none'; document.getElementById("e").style.display='none'; document.getElementById("f").style.display='none'; document.getElementById("edituser").style.backgroundImage="url('images/edit_user_hover.png')"; } if(document.getElementById("d").id == id) { e.style.display = 'block'; document.getElementById("a").style.display='none'; document.getElementById("b").style.display='none'; document.getElementById("c").style.display='none'; document.getElementById("g").style.display='none'; document.getElementById("e").style.display='none'; document.getElementById("f").style.display='none'; document.getElementById("companyprofile").style.backgroundImage="url('images/edit_company_hover.png')"; } if(document.getElementById("e").id == id) { e.style.display = 'block'; document.getElementById("a").style.display='none'; document.getElementById("b").style.display='none'; document.getElementById("c").style.display='none'; document.getElementById("g").style.display='none'; document.getElementById("d").style.display='none'; document.getElementById("f").style.display='none'; document.getElementById("checkticket").style.backgroundImage="url('images/Check_ticket_hover.png')"; } The html for div is given below: <?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "v"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $age…
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: combobox
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27169094
has title: Comboboxes onsubmit changes giving results but refreshes javascript setting

http://stackoverflow.com/a/28074106
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/124780456
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27264829
has comment: http://stackoverflow.com/comment/100743492
has body: I tried it that way, too, but had the same problem: Can't rely on the variable names. Instead, I passed it to the server as a string instead of an object: corners = map.getBounds(); var c = corners.toString();` Then use whatever AJAX library to send the string to the server. It looks something like this: ((33.94310833405608, -118.44952616442868), (33.985820303992334, -118.34120783557125)) You will have to pick it apart using a regexp, but at least it's reliably formatted.
answers question: http://stackoverflow.com/q/27264829

http://stackoverflow.com/a/27192059
upvote count: 1
has body: Take momentjs it is really easy for tasks like this. var a = moment([2007, 0, 29]); var b = moment([2007, 0, 28]); a.diff(b, 'days') // 1
has comment: http://stackoverflow.com/comment/42870052
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27191948
score: 1

http://stackoverflow.com/comment/43006537
comment on: http://stackoverflow.com/a/27243052
has text: Unfortunately, I could not easily use jquery event handler as the event binding is added by JSONEditor([https://github.com/jdorn/json-editor])
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27235144
has body: From the documentation looks like for elasticsearch verserion 0.90x the delete by query should not be nested in query term : i.e the above query should be as follows : curl -XDELETE 'http://localhost:9200/index/type/_query?pretty' -d '{ "bool" : { "must" : [ { "match_all" : {} } ] } }' However for version 1.X documentation does mention that for delete by query the query should be nested inside a query similar to search api. This is mentioned in the breaking changes of 1.0 release
accepted answer of: http://stackoverflow.com/q/27233954
answers question: http://stackoverflow.com/q/27233954
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42867761
comment on: http://stackoverflow.com/q/27190805
has text: is x set if you dont call the callback? that callback might be breaking someting
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27274510
has comment: http://stackoverflow.com/comment/43018912
has comment: http://stackoverflow.com/comment/43018574
upvote count: 2
answers question: http://stackoverflow.com/q/27274454
type: Answer
has body: You've named your module "App". So you need ng-app="App" for it to work.
accepted answer of: http://stackoverflow.com/q/27274454
score: 2
has comment: http://stackoverflow.com/comment/43018888
has comment: http://stackoverflow.com/comment/43018638
has comment: http://stackoverflow.com/comment/43018458
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43018807

http://stackoverflow.com/comment/43027662
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27276548
has text: I'm prevented from installing this at work. So be it. But it looks perfect.
score: 0

http://stackoverflow.com/comment/42959736
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27239667
has text: ya, check this out: https://docs.docker.com/reference/run/#runtime-constraints-on-cpu-and-memory
type: Comment

http://stackoverflow.com/comment/43075918
type: Comment
comment on: http://stackoverflow.com/q/27306757
has text: What have you actually tried? Would be good to post whatever JS you have attempted, so we can help.
score: 0
type: QuestionComment

http://stackoverflow.com/q/27207349
favorite count: 0
accepted answer: http://stackoverflow.com/a/27217309
upvote count: 10
has comment: http://stackoverflow.com/comment/42901474
has body: How can I get the tooltip seen in the image below to be displayed as shared? You might want to take a look at the Highcharts API Reference (especially the info about the shared option): http://api.highcharts.com/highcharts#tooltip.formatter Here's the jsfiddle: https://jsfiddle.net/9bw1qLj4/ for fullscreen: https://jsfiddle.net/9bw1qLj4/embedded/result/ I tried this, but it didn't work: tooltip: { shared: true, formatter: function () { var y_value_kwh = (this.points[i].y/1000).toFixed(2); return '' + this.key + ' ' + '\u25CF ' + this.points[i].series.name + ': ' + y_value_kwh + ' kWh '; }, }, Current code: tooltip: { //shared: true, formatter: function () { var y_value_kwh = (this.y/1000).toFixed(2); return '' + this.key + ' ' + '\u25CF ' + this.series.name + ': ' + y_value_kwh + ' kWh '; }, }, Current output:
has answer: http://stackoverflow.com/a/27217309
downvote count: 0
type: AnsweredQuestion
score: 10
tagged with: formatting
type: Question
has title: Highcharts: Shared tooltip formatter this.points[i]
tagged with: highcharts
has comment: http://stackoverflow.com/comment/42911858
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42964357
comment on: http://stackoverflow.com/a/27244534
type: AnswerComment
has text: Wouldn't that select ` Inputs can include other functions! `?
type: Comment
score: 1

http://stackoverflow.com/comment/42840401
type: Comment
comment on: http://stackoverflow.com/a/27175403
has text: thanks but I have the problem that I have indicators so the user can also change the slide manually
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43046489
score: 0
type: Comment
has text: How do you decide the arrow direction and bg colour? (which values map to direction and colour from db?) What language do you use? C#,VB?
type: QuestionComment
comment on: http://stackoverflow.com/q/27289851

http://stackoverflow.com/a/74284857
answers question: http://stackoverflow.com/q/27266857
score: 0
type: Answer
has body: I was trying to see how to do this in 2022. And I ended up doing the following based on the current highest voted answer: import { Request, Response, NextFunction } from "express"; /** * Some Middleware * @param {Request} req * @param {Response} res * @param {NextFunction} next * @returns */ export function someMiddleware(req, res, next) { ... } I'm using VSCode, and it detects the req, res, and next objects. I hope this helps someone!

http://stackoverflow.com/comment/43071086
type: AnswerComment
type: Comment
has text: yeah jquery is first. 1. jquery.min.js 2. jquery.rwdImageMaps.min.js 3. 4. image map
comment on: http://stackoverflow.com/a/27303122
score: 0

http://stackoverflow.com/a/27291352
accepted answer of: http://stackoverflow.com/q/27278259
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27278259
type: Answer
score: 0
has body: I finally found that you cannot append script tags to head with jQuery this way. I found some solutions here and there (look at the first code snippet of the selected answer for the second link).

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/27241650
tags question: http://stackoverflow.com/q/27206873
tags question: http://stackoverflow.com/q/27222785
tags question: http://stackoverflow.com/q/27305290
tags question: http://stackoverflow.com/q/27177348
tags question: http://stackoverflow.com/q/27167295
tags question: http://stackoverflow.com/q/27181998
tags question: http://stackoverflow.com/q/27311595
tags question: http://stackoverflow.com/q/27302381
tags question: http://stackoverflow.com/q/27218922
tags question: http://stackoverflow.com/q/27307635
tags question: http://stackoverflow.com/q/27263831
tags question: http://stackoverflow.com/q/27296586
tags question: http://stackoverflow.com/q/27191981
tag name: svg
tags question: http://stackoverflow.com/q/27302889
tags question: http://stackoverflow.com/q/27215394
tags question: http://stackoverflow.com/q/27313363
tags question: http://stackoverflow.com/q/27297741
tags question: http://stackoverflow.com/q/27154239
tags question: http://stackoverflow.com/q/27209058
tags question: http://stackoverflow.com/q/27232335
tags question: http://stackoverflow.com/q/27306809
tags question: http://stackoverflow.com/q/27234382
tags question: http://stackoverflow.com/q/27230293
tags question: http://stackoverflow.com/q/27227976
tags question: http://stackoverflow.com/q/27204907
tags question: http://stackoverflow.com/q/27283610
tags question: http://stackoverflow.com/q/27281073
tags question: http://stackoverflow.com/q/27291499
tags question: http://stackoverflow.com/q/27291535
tags question: http://stackoverflow.com/q/27203129
tags question: http://stackoverflow.com/q/27230412
tags question: http://stackoverflow.com/q/27222061
type: Tag

http://stackoverflow.com/a/27265141
has body: try this.. $(document).ready(function(){ pageurl=url+"usermenu.action"; $.ajax({ type: "POST", url: pageurl, dataType: "html", success : (function( data) { $("#maincontent").html(data); }); });
answers question: http://stackoverflow.com/q/27265055
score: 0
type: Answer

http://stackoverflow.com/q/27312700
tagged with: jqplot
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43085914
possible better answer: http://stackoverflow.com/a/27313162
tagged with: json.net
upvote count: 2
has answer: http://stackoverflow.com/a/27314100
answer count: 2
accepted answer: http://stackoverflow.com/a/27314100
has body: Given a class A ... public class A { public string Prop1 { get; set; } public string Prop2 { get; set; } } string jsonString = JsonConvert.SerializeObject( new A() { Prop1 = "ABC", Prop2 = "$.jqplot.DateAxisRenderer" } ); jsonString contains... "{ \"Prop1\":\"ABC\", \"Prop2\":\"$.jqplot.DateAxisRenderer\" }"; Question: How can I unquote Prop2? i.e. I want jsonString to contain... "{ \"Prop1\":\"ABC\", \"Prop2\":$.jqplot.DateAxisRenderer }"; so that Prop2 is evaluated (on the client) as a reference and not a string
has comment: http://stackoverflow.com/comment/43085927
tagged with: javascript
has comment: http://stackoverflow.com/comment/43086296
has comment: http://stackoverflow.com/comment/43085981
favorite count: 0
has comment: http://stackoverflow.com/comment/43085950
has answer: http://stackoverflow.com/a/27313162
has comment: http://stackoverflow.com/comment/43086042
has comment: http://stackoverflow.com/comment/43087059
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/43086007
has comment: http://stackoverflow.com/comment/43085879
has comment: http://stackoverflow.com/comment/43088918
type: Question
has comment: http://stackoverflow.com/comment/43115327
has comment: http://stackoverflow.com/comment/43086224
tagged with: c#
has title: JSON serialization - how to unquote a property value?
has comment: http://stackoverflow.com/comment/43086135

http://stackoverflow.com/comment/112124811
has text: For me the folder is called `node_modules` not `npm_modules` (magento 2)
type: Comment
comment on: http://stackoverflow.com/a/27251796
score: 0
type: AnswerComment

http://stackoverflow.com/a/27280398
score: 3
accepted answer of: http://stackoverflow.com/q/27279123
answers question: http://stackoverflow.com/q/27279123
has comment: http://stackoverflow.com/comment/43035110
has comment: http://stackoverflow.com/comment/43059731
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43071258
has comment: http://stackoverflow.com/comment/43061834
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/43059884
has comment: http://stackoverflow.com/comment/43035124
has comment: http://stackoverflow.com/comment/43061642
has comment: http://stackoverflow.com/comment/43072316
has body: Instead of using ng-transclude, you can build your own search transclude directive that can be used to put result onto the transcluded scope. For example, your search directive might look something like this with ng-repeat and the search-transclude directive where you want the transcluded content: .directive("search", function (SearchResults) { return { restrict: "AE", transclude: true, scope: {}, template: ' Search Relevance:' + '{{result.relevance}}' + //the most important part search-transclude that receives the current //result of ng-repeat ' ', link: function (scope, elem, attrs) { //get search results scope.results = SearchResults.results; } } }) Build search transclude directive as follows: .directive("searchTransclude", function () { return { restrict: "A", link: function (scope, elem, attrs, ctrl, $transclude) { //create a new scope that inherits from the parent of the //search directive ($parent.$parent) so that result can be used with other //items within that scope (e.g. selectResult) var newScope = scope.$parent.$parent.$new(); //put result from isolate to be available to transcluded content newScope.result = scope.$eval(attrs.result); $transclude(newScope, function (clone) { elem.append(clone); }); } } }) The transcluded content will now be able to see selectResult function if it exists in the scope where the search directive was created. Example here.
downvote count: 0
has comment: http://stackoverflow.com/comment/43061660
has comment: http://stackoverflow.com/comment/43035649

http://stackoverflow.com/comment/42944174
has text: Can you change the search function to take in the whole set of data, and do the looping inside the search function? Then give it a callback, which writes the resultSet after the function is done.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27233745

http://stackoverflow.com/comment/42921196
has text: like i said, i see the good reasons. i just thought this was going to be a ton simpler. but i have now edited my post to have a good description and code that i am trying to use.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27220914

http://stackoverflow.com/comment/51373863
type: QuestionComment
has text: Try [`jquery.one()`](http://api.jquery.com/one/). And if you need to detach an event handler, you can use `off()`. But you probably would not need it in your case if you use `one()`.
type: Comment
comment on: http://stackoverflow.com/q/27186701
score: 0

http://stackoverflow.com/a/27241547
has comment: http://stackoverflow.com/comment/42962588
has comment: http://stackoverflow.com/comment/42961428
score: 0
type: Answer
has body: In your code, i see there's no controller declaration. You must define a controller, in order to enable angular to resolve the placeholders. Try :
has comment: http://stackoverflow.com/comment/42961647
has comment: http://stackoverflow.com/comment/42963152
has comment: http://stackoverflow.com/comment/42962122
answers question: http://stackoverflow.com/q/27240108

http://stackoverflow.com/q/27244494
type: Question
has body: I am newbee to zend framework 2, and i am try to use the angular js in my project. Actually at present, i am calling a function name in the controller like this. return new ViewModel(array( 'result' => $result , 'userData' => $row, 'userInfo' => $userInfo, )); and in the view page. simply i am looping the view. <?php if( $this->result ) { ?> <?php foreach ($this->result as $data) { ?> <?php echo $data['patient_fname']; ?> <?php echo $data['weight']; ?> <?php echo $data['height']; ?> <?php echo $data['bp_level_low']; ?>/<?php echo $data['bp_level_high']; ?> <!-- <?php echo $data['sugar_level_random']; ?> --> <a href="<?php echo $this->url('doctor', array('action'=>'editvitalrecords', 'id' => $data['hrid'] ));?>"> Edit <!-- | <a href="<?php echo $this->url('doctor', array('action'=>'deletevitalrecords', 'id' => $data['hrid'] ));?>">Delete --> <?php } ?> <?php } ?> so how can i use the angular js in the above code. Thanks,
tagged with: javascript
has title: how to use angular js in zend framework 2
score: 0
answer count: 1
tagged with: zend-framework2
has answer: http://stackoverflow.com/a/31097524
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/43009202
score: 0
type: Comment
type: QuestionComment
has text: You should use `Parse.Object.saveAll`.
comment on: http://stackoverflow.com/q/27269253

http://stackoverflow.com/q/27229127
has title: Can't get js fadeIn() to work
tagged with: jquery
has body: Trying to figure out how I use the fadeIn() function when I scroll to the bottom of the page. It seems to be a reasonably common technique these days and I'd like to use it. My code is as follows, but I can't find a way to get the images to fade in. var c = 0; $(function() { $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() - $(window).height()) { c = c + 1; if (c &lt;= 7) { $('#intro').html($('#intro').html() + '&lt;ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://mywebsite.com"&gt;&lt;img src="images/filler.png" alt="" /&gt;Count = ' + c + '&amp;raquo;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br class="clear" /&gt;'); } else if (c == 8) { $('#intro').html($('#intro').html() + '&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="example_page.html"&gt;Search historical stories&lt;/a&gt;&lt;/p&gt;'); } else { // do nothing } } }); });
has answer: http://stackoverflow.com/a/27229288
accepted answer: http://stackoverflow.com/a/27229239
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9439725
score: 0
possible better answer: http://stackoverflow.com/a/27229288
has comment: http://stackoverflow.com/comment/42935365
type: Question
has comment: http://stackoverflow.com/comment/42936172
tagged with: javascript
has comment: http://stackoverflow.com/comment/42935998
answer count: 2
has answer: http://stackoverflow.com/a/27229239

http://stackoverflow.com/q/27229219
has body: A+ A- I've got an extra section of text that needs to be changed by this button. I've tried this: A+ A- And this A+ A- Without any luck. I'm sure it's a simple solution, however I am new, and can not figure this out. Here's the function:
has comment: http://stackoverflow.com/comment/42936054
favorite count: 0
possible better answer: http://stackoverflow.com/a/27229396
has answer: http://stackoverflow.com/a/27229396
score: 0
upvote count: 1
has title: How would I add an extra div to this button?
downvote count: 1
has answer: http://stackoverflow.com/a/27229452
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42936283
accepted answer: http://stackoverflow.com/a/27229365
has comment: http://stackoverflow.com/comment/42935435
type: Question
has comment: http://stackoverflow.com/comment/42935919
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27229365

http://stackoverflow.com/comment/42920790
comment on: http://stackoverflow.com/a/27217821
has text: Wonderful. Your answer made my day....!!!!!Many many thanks....!!!!!I was trying to get this literally through the thanksgiving weekend......
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42948322
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27216115
has text: and see that you have this file present "assets/swf/copy_csv_xls_pdf.swf" if not then it will be giving an error on console of your browser

http://stackoverflow.com/a/27224101
has comment: http://stackoverflow.com/comment/42962421
type: Answer
has comment: http://stackoverflow.com/comment/42926656
downvote count: 0
score: 1
has body: How about this $(function() { $(".productbox button").click(function() { var $parentDiv = $(this).closest('.productbox'); $parentDiv.toggleClass( "expandthebox", 1500 ), $(".productbox").not($parentDiv).removeClass("expandthebox", 1500); return false; }); }); Working fiddle
answers question: http://stackoverflow.com/q/27223965
upvote count: 1
has comment: http://stackoverflow.com/comment/42926452

http://stackoverflow.com/a/54160067
downvote count: 2
score: 0
has body: This javascript library appears to provide the functionality you're looking for (i.e., supports cross-origin communication between browser tabs). I have not used this yet, but will be trying this out in my application. Check out https://github.com/wingify/across-tabs.
answers question: http://stackoverflow.com/q/27234528
has comment: http://stackoverflow.com/comment/123348019
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/101461638

http://stackoverflow.com/comment/42978958
type: QuestionComment
comment on: http://stackoverflow.com/q/27252126
score: 0
has text: @clapas There can be more than three options so its random. I'm only showing one question at the time and yes, everything should be dynamically...
type: Comment

http://stackoverflow.com/comment/43039177
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27263364
has text: sorry i didnt get you.Can you post some code or explain what you are trying with example.

http://stackoverflow.com/a/27257144
has comment: http://stackoverflow.com/comment/42989029
has comment: http://stackoverflow.com/comment/42989647
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27256907
has comment: http://stackoverflow.com/comment/42989091
has comment: http://stackoverflow.com/comment/42989945
type: Answer
has comment: http://stackoverflow.com/comment/42989271
accepted answer of: http://stackoverflow.com/q/27256907
has body: Only looping to check when the beginning of the track is reached is foolish and not necessary. You could use the Math.max function to ensure value is 0 or above: var currentTime = $("#player").prop("currentTime"); var newTime = Math.max(currentTime - 10, 0);

http://stackoverflow.com/q/27259471
answer count: 1
has answer: http://stackoverflow.com/a/27267843
tagged with: javascript
tagged with: facebook-graph-api
type: UnansweredQuestion
tagged with: facebook
has title: Simple Facebook "like" Form
type: Question
has comment: http://stackoverflow.com/comment/43005346
tagged with: forms
has body: I'm in kind of a unique situation where I need to generate new "likes" on a Facebook page, but I need to be able to track the names of the people who like the page through my recommendation. My thought is to create a "form" of sorts that I can share the link to, and the form would have a single button on it. This button, when clicked, would do 2 things: 1) "Like" the Facebook page in question on their behalf 2) Gather the name data (from Facebook) of the person who liked the page and store that name in a list that only I can access. That's it. I'd love it if the list could be storage/generated in Google docs somehow. Also, please note that this is not my Facebook page or a page that I control in any way. Now, I realize that there is a less complicated solution to this, which is to simply embed the "Like" button and have a form that asks people to fill out their name and submit. However, it is important that the name on Facebook matches with the name I receive. Is it possible to add new code to the "like" button code from Facebook that mines the name data instead of creating a whole new process? Please share your thoughts on how this might be accomplished or if there as a better solution.
score: 0

http://stackoverflow.com/a/27249120
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27248394
downvote count: 0
answers question: http://stackoverflow.com/q/27248394
type: Answer
upvote count: 2
has body: Check both class level permission and object level(ACL) permission and make sure client have permission to update the object. Also note that, All class and object have their own permission.
score: 2

http://stackoverflow.com/comment/42809210
score: 0
comment on: http://stackoverflow.com/q/27154456
type: QuestionComment
type: Comment
has text: It looks like it rotates as a whole, but maybe I am missing something.

http://stackoverflow.com/comment/43066070
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27299797
has text: The message does not show because nothing is being done with it. You would need to add some code to display the message in whatever way you want to show it. One way is to create a specific div in the HTML and assign the value of message to its textContent: http://msdn.microsoft.com/en-us/library/ie/yfc4b32c%28v=vs.94%29.aspx. (Also, I edited by answer to make message global, as @Lekhnath suggested on a different answer).
type: AnswerComment

http://stackoverflow.com/q/27170358
tagged with: placeholder
type: Question
has comment: http://stackoverflow.com/comment/42831790
tagged with: javascript
has comment: http://stackoverflow.com/comment/42836283
score: 0
tagged with: textarea
has body: The placeholder text is not showing in my text area that I created with javascript until I click into the box. var input = document.createElement("textarea"); input.rows = "2"; input.placeholder = placeholder; I've read a lot of the same questions about this and it is usually because the textarea tags are on different lines however, my tags are generated by javascript and when I look at the source the tags are on the same line and there appears to be nothing between the tags. The HTM generated is: &lt;textarea placeholder="Enter here" rows="2"&gt;&lt;/textarea&gt;
has comment: http://stackoverflow.com/comment/42832568
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Placeholder text not showing in textarea when generated with javascript (tags on the same line)
answer count: 0
has comment: http://stackoverflow.com/comment/42831614

http://stackoverflow.com/q/27186167
has body: I don't have latitude and longitude coordinates to set view on leaflet js library. I had an array of objects which contains city and state, country as properties.Now i want to set the markers on the map using leaflet js for this array. What could be the better way to do this?
has answer: http://stackoverflow.com/a/27193728
type: UnansweredQuestion
tagged with: openstreetmap
has title: Set view for an array of addresses(no coordinates) using leaflet js
tagged with: javascript
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
tagged with: maps
answer count: 1
tagged with: leaflet

http://stackoverflow.com/comment/42962786
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27243211
type: AnswerComment
has text: This is not a jQuery question.

http://stackoverflow.com/q/27194358
type: Question
has body: I am trying to translate a simple python code to JavaScript. The python code is pretty much replacing a character with another character and prints out the results. My python code is def replace(word): for old, new in ( ("a", "@"), ("e", "()"), ): s = word.replace(old, new) print (s) For JavaScript I cant get my head around translating it. I tried to do something like iterating but it seems to be a sloppy code function replace(character) { for(var i = 0; i&lt;word.length;i++) { ...} }
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27194420
answer count: 1
tagged with: python
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27194420
has title: Replacing a character (translating python code to JavaScript)

http://stackoverflow.com/q/27263593
type: Question
has comment: http://stackoverflow.com/comment/42999541
score: 3
accepted answer: http://stackoverflow.com/a/27263637
upvote count: 5
tagged with: arrays
tagged with: javascript
answer count: 3
has body: I have an array of values with names: names = ['Jim', 'Jack', 'Fred'] I have also received a value from a function, which is a name in string form, such as: returnedValue = 'Jim' How can I run the returnedValue string against the values of the names array and test for a match? My feeling is that you would want to use the .filter method of the array prototype but I can't conceive of how to do it that way.
has comment: http://stackoverflow.com/comment/42999555
favorite count: 0
linked to: http://stackoverflow.com/q/7346827
has answer: http://stackoverflow.com/a/27263637
possible better answer: http://stackoverflow.com/a/27263680
has answer: http://stackoverflow.com/a/60309128
has comment: http://stackoverflow.com/comment/42999442
has comment: http://stackoverflow.com/comment/42999444
has answer: http://stackoverflow.com/a/27263680
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12623272
downvote count: 2
has comment: http://stackoverflow.com/comment/44764556
has title: How to match a variable value against an array of values in Javascript?
tagged with: match

http://stackoverflow.com/q/27287018
linked to: http://stackoverflow.com/q/7958292
has comment: http://stackoverflow.com/comment/43041145
has body: I have a array a=[1,2,3,4,5] b=[3,4,5,6,7] Here i want values of array a [1,2] and array b [6,7] and stored in diff arrays like below. c=[1,2] d=[6,7] Thanks in Advance. its like a=[chkbx_705_49,chkbx_706_49,chkbx_707_49,chkbx_708_49,chkbx_709_49,chkbx_710_49,chkbx_711_49,chkbx_712_49,chkbx_714_49,chkbx_705_50,chkbx_706_50,chkbx_707_50,chkbx_708_50,chkbx_709_50,chkbx_710_50,chkbx_711_50,chkbx_705_51,chkbx_706_51,chkbx_707_51,chkbx_708_51,chkbx_711_51,chkbx_710_52,chkbx_711_52,chkbx_710_53,chkbx_711_53] b= [chkbx_705_49,chkbx_705_50,chkbx_705_51,chkbx_705_52,chkbx_705_53,chkbx_706_49,chkbx_706_50,chkbx_706_51,chkbx_706_52,chkbx_706_53,chkbx_707_49,chkbx_707_50,chkbx_707_51,chkbx_708_49,chkbx_708_50,chkbx_708_51,chkbx_709_49,chkbx_709_50,chkbx_710_49,chkbx_710_50,chkbx_711_49,chkbx_711_50,chkbx_711_51,chkbx_712_49] here i deleted chkbx_710_52,chkbx_711_52,chkbx_710_53,chkbx_711_53 checkbox values from array a and added chkbx_705_52,chkbx_705_53,,chkbx_706_52,chkbx_706_53 added in array b. So i want c = chkbx_710_52,chkbx_711_52,chkbx_710_53,chkbx_711_53 d = chkbx_705_52,chkbx_705_53,,chkbx_706_52,chkbx_706_53
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27287138
type: Question
answer count: 2
has title: how to get diff btw two arrays in javascript?
has answer: http://stackoverflow.com/a/27287132
score: 0
linked to: http://stackoverflow.com/q/10048766
duplicate of: http://stackoverflow.com/q/10048766
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/43057013
score: 0
type: AnswerComment
has text: Facebook is a good example for this, they load each isolated component serially and each component has an "importance" number, so of course the outline of the website is the most important, then Feed, then Chat and so on. If all the code was in one huge file, it wouldn't load as fast because Facebook is a monster website. but, this isn't the case for "normal" websites, which are 99% fine with one file. (i build mine automatically using GULP from many separate files)
type: Comment
comment on: http://stackoverflow.com/a/27294833

http://stackoverflow.com/comment/43071281
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27301702
score: 0
has text: see if this helps - http://xgrommx.github.io/rx-book/content/getting_started_with_rxjs/creating_and_querying_observable_sequences/bridging_to_events.html#bridging-to-custom-events-with-fromeventpattern

http://stackoverflow.com/comment/43074502
type: QuestionComment
comment on: http://stackoverflow.com/q/27305786
has text: O Yeah Problem Fixes Thankssss Rocket Hazmat :) and all who viewed and replied :)
score: 0
type: Comment

http://stackoverflow.com/a/27165736
answers question: http://stackoverflow.com/q/27163587
has comment: http://stackoverflow.com/comment/42825893
has comment: http://stackoverflow.com/comment/42824940
has comment: http://stackoverflow.com/comment/42840970
has comment: http://stackoverflow.com/comment/42826363
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27163587
has comment: http://stackoverflow.com/comment/42825438
has comment: http://stackoverflow.com/comment/42904905
has comment: http://stackoverflow.com/comment/42826230
type: Answer
has comment: http://stackoverflow.com/comment/42901751
score: 5
has comment: http://stackoverflow.com/comment/42905756
has comment: http://stackoverflow.com/comment/42905864
upvote count: 5
has body: (I guess) the HTML may look like this: &lt;div class="some other"&gt; In such case, if you do it like elem.domEl.className = 'reveal'; then you'll get &lt;div class="reveal"&gt; All styles brought by class some and other are gone! You definitely don't want that, right? Also you don't want repeated classname, something like &lt;div class="reveal reveal"&gt; So, here are the solutions: The best way is to use HTML5 API classList: elem.domEl.classList.contains('reveal') // Check whether element has a classname elem.domEl.classList.add('reveal') // Add a classname elem.domEl.classList.remove('reveal') // Remove a classname elem.domEl.classList.toggle('reveal') // Toggle a classname If you still want to run the code in out-dated browsers, try these: // Check whether element has a classname function hasClass(ele, cls) { var clsChecker = new RegExp("\\b" + cls + "\\b"); return clsChecker.test(ele.className); } // Add a classname function addClass(ele, cls) { var clsChecker = new RegExp("\\b" + cls + "\\b"); if(clsChecker.test(ele.className)) { // ele already has the className, don't need to do anything return; } ele.className += (' '+ cls); } // Remove a classname function removeClass(ele, cls) { var clsChecker = new RegExp("\\b" + cls + "\\b"); if(clsChecker.test(ele.className)) { // ele does have the className, remove them all (in case repeated) ele.className.split(clsChecker).join(''); } } // Toggle a classname function toggleClass(ele, cls) { var clsChecker = new RegExp("\\b" + cls + "\\b"); if(clsChecker.test(ele.className)) { // ele does have the className, remove them all (in case repeated) ele.className.split(clsChecker).join(''); } else { // ele doesn't have the classname, add it ele.className += (' '+ cls); } } // Usages hasClass(elem.domEl, 'reveal') // Check whether element has a classname addClass(elem.domEl, 'reveal') // Add a classname removeClass(elem.domEl, 'reveal') // Remove a classname toggleClass(elem.domEl, 'reveal') // Toggle a classname

http://stackoverflow.com/comment/75928155
type: Comment
comment on: http://stackoverflow.com/a/27196250
has text: You should post a question with your issue. There has to be something that can be fixed there
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42936478
has text: Describe what you changed and why.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27229758

http://stackoverflow.com/comment/43030662
comment on: http://stackoverflow.com/a/27280869
score: 0
type: AnswerComment
type: Comment
has text: Yes I tried but getting same problem. However month must by word since I do not have control on it.

http://stackoverflow.com/q/27300095
tagged with: javascript
has body: How can i get this code working on Safari (Mac OS) javascript document.getElementById("name").src = "../index.html"; document.getElementById("name").herf = "http://google.com/index.html"; html Your Brower doesn't support iframe so: click
downvote count: 0
answer count: 1
tagged with: macos
favorite count: 0
type: UnansweredQuestion
has title: How to get this javascript code working on Mac
score: 1
has answer: http://stackoverflow.com/a/27301054
upvote count: 1
type: Question
tagged with: ios

http://stackoverflow.com/comment/42890000
has text: Because items are one index more than users. ie, here items rows are 6 & users rows are 5.
comment on: http://stackoverflow.com/a/27203476
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42865462
comment on: http://stackoverflow.com/q/27173380
score: 0
has text: Yes I want to execute something when user activates a tab, but only the first time he do it
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27302644
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43068469
type: UnansweredQuestion
tagged with: iframe
tagged with: geolocation
has body: We have a web booking widget hosted on saytaxi.com. Widget uses browser location services to determine your location, but you need to approve the request in browser - you will see a popup saying "Saytaxi.com is requesting to share your location". Problem is we distribute this widget via iframe, but it always requests to share location from the domain where it is located - saytaxi.com See for example - http://saytaxicr.com Is there a way to request location from the domain where the iframe is stored?
has answer: http://stackoverflow.com/a/27302788
type: Question
answer count: 1
tagged with: javascript
has title: How to hide domain name from html5 location services?
score: 0

http://stackoverflow.com/q/27163485
has answer: http://stackoverflow.com/a/27163731
tagged with: audio
has answer: http://stackoverflow.com/a/27166815
type: Question
type: AnsweredQuestion
tagged with: javascript
has body: I need to create the popup window and insert some content by using the JavaScript coding. Now, my web page will show the pop-up when some function(CamanJS) processed. The function will output the Image in DataUrl form.And show it in the pop-up var w=window.open('about:blank','image from canvas'); w.document.write("&lt;img src='"+this.toBase64()+"' alt='from canvas'/&gt;"); I want to insert a audio with 5 second into the pop-up. And than played the audio will execute the Function2().
accepted answer: http://stackoverflow.com/a/27166815
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27163731
has title: Create a audio object by using JavaScript code

http://stackoverflow.com/comment/42950587
comment on: http://stackoverflow.com/a/27236566
type: Comment
has text: Perhaps I have a typo somewhere, but your code seems to be updating the colors in the modal buttons and not the original button caller
score: 0
type: AnswerComment

http://stackoverflow.com/a/27257308
type: AcceptedAnswer
type: Answer
has body: I wrote this code, what i wanted and worked for me: window.engineLoading = {images_count:0, images_loaded_count:0, fonts_count:0, fonts_loaded_count:0 }; document.querySelector("a").onclick = function(){ // first elemnet a var before_stylesheets_length = document.styleSheets.length; var before_fonts_size = document.fonts.size; document.fonts.onloadingerror = function(a){ window.engineLoading.fonts_loaded_count++; } document.fonts.onloading = function(a){ window.engineLoading.fonts_count++; } document.fonts.onloadingdone = function(a){ window.engineLoading.fonts_loaded_count++; } var head= document.getElementsByTagName('head')[0]; var style= document.createElement('link'); style.rel= 'stylesheet'; style.setAttribute("href","./new_style.css"); style.onload = function(){ for(i=before_stylesheets_length; i&lt;document.styleSheets.length; i++){ var rules = document.styleSheets[i].rules; for(q=0; q&lt;rules.length; q++){ var styles = rules[q].style; for(s=0; s&lt;styles.length; s++){ console.log(styles[s]); if((styles[s] == "background-image" || styles[s] == "background") &amp;&amp; styles.backgroundImage.length &gt; 0){ window.engineLoading.images_count++; var body= document.getElementsByTagName('body')[0]; var image = document.createElement('img'); var url = styles.backgroundImage; url = url.replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); image.src = url; image.width = 0; image.height = 0; image.setAttribute("class","pace-load-style"); image.onload = function(e){ console.log(e); window.engineLoading.images_loaded_count++; }; image.onerror = function(e){ window.engineLoading.images_laoded_count++; } body.appendChild(image); break; } } } } }; style.onerror = function(){}; head.appendChild(style); setTimeout(function(){ checkCurrentState(); }, 1000); return false; }; function checkCurrentState(){ if(window.engineLoading.images_count == window.engineLoading.images_loaded_count &amp;&amp; window.engineLoading.fonts_count == window.engineLoading.fonts_loaded_count){ conso…
accepted answer of: http://stackoverflow.com/q/27241186
answers question: http://stackoverflow.com/q/27241186
score: 0

http://stackoverflow.com/comment/42997427
has text: Well, you need to tie the "like"/"dislike" to a user. So, each `employee` record should have a list of users who liked/disliked, and for the current user you need to check whether the user has already liked or disliked a particular employee and handle additional like/dislikes accordingly. At any rate, this is not an Angular question.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27262270
type: QuestionComment

http://stackoverflow.com/a/27252206
type: Answer
has body: The picker always initializes from the date/time in the input field. If the value in the input field is not a valid date/time (or not in the format that you specify), it defaults to the current time. If the field is blank, that would be the case. If you want a different starting date/time, then set the value of the field when you create it. You can use jQuery's .val() method or the DOM .value property. To be sure the value is the right format, use an AnyTime.Converter such as: var anytimeFormat = "%d/%m/%Y %H:%i:%s"; $('#chooseTime').val( (new AnyTime.Converter( { format:anytimeFormat})).format( new Date(2014,11,2,0,0,0) ) ); AnyTime.picker( "chooseTime", { format: anytimeFormat, firstDOW: 1 }); For faster assistance, please use the contact form on the project website.
answers question: http://stackoverflow.com/q/27245448
score: 0

http://stackoverflow.com/comment/42880799
type: Comment
has text: @PaulTheFirewoodSalesman, I edited my answer. Had missed out the length attribute and also, you need to change the values in your drop down.
comment on: http://stackoverflow.com/a/27198042
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43077184
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27307464
has text: I probably would have missed that, but it makes sense!
type: AnswerComment

http://stackoverflow.com/a/27216119
score: 9
answers question: http://stackoverflow.com/q/27215394
type: AcceptedAnswer
downvote count: 0
has body: By the time done runs, bubbles haven't been added yet since bubbles is a plugin. new Datamap returns an object with a d3 selection at svg: var map = new Datamap({...}); //add bubbles map.bubbles(bubbleData); //handle bubble clicks map.svg.selectAll('.bubbles').on('click', function() {...}); That should work for the first batch of bubbles. If you are dynamically adding bubbles and don't want to reset the listeners, you can use jQuery event delegation to handle the dynamic bubbles: $(map.svg[0][0]).on('click', '.bubbles', function(e) { //handle click here as well });
accepted answer of: http://stackoverflow.com/q/27215394
type: Answer
upvote count: 9

http://stackoverflow.com/comment/42808873
score: 1
has text: I just pushed the release-mode code to http://new.orienteer.io/. Nothing's minified, so you should be able to read everything.
type: Comment
comment on: http://stackoverflow.com/q/27155589
type: QuestionComment

http://stackoverflow.com/q/27187271
tagged with: angularjs-directive
tagged with: javascript
has body: I am created tooltip directive. but data comes from api , so on page load directive initializes and then data is loaded through api.api data comes later hence directive is not initialized properly . how can i handle this ? HTML:: &lt;strong href="#" pop-over items="result" title="detailes" display-length="5"&gt;{[{ result.name}]} Javascript : listingApp.directive('popOver', function ($compile) { var itemsTemplate = "&lt;ul class='unstyled'&gt;&lt;li&gt;{{items}}&lt;/li&gt;&lt;/ul&gt;"; var getTemplate = function (contentType) { var template = ''; switch (contentType) { case 'items': template = itemsTemplate; break; } return template; } return { restrict: "A", transclude: true, scope: { items: '=', title: '@', //popContent: '=', displayLength:'@' }, transclude: true, template: "&lt;span ng-transclude&gt;&lt;/span&gt;", link: function (scope, element, attrs) { debugger; // console.log('^^^^^^^^^^^^^^^'+attrs.popContent); var popOverContent; if (scope.items) { var html = getTemplate("items"); popOverContent = $compile(html)(scope); } var options = { content: popOverContent, placement: "bottom", html: true, title: scope.title, trigger: "hover" }; if ((scope.items || '').length &gt; attrs.displayLength) { $(element).find('.display_data').text(scope.items.substring(0, attrs.displayLength)); element.attr('title', scope.items); $(element).find('.view_more').popover(options); } else { $(element).find('.display_data').text(scope.items); } } }; });
type: UnansweredQuestion
has title: tooltip data coming from api not initialized
tagged with: jquery
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/27187346
score: 0
answer count: 1

http://stackoverflow.com/q/27271814
has comment: http://stackoverflow.com/comment/43217253
type: Question
has body: I have a highcharts column chart(http://www.highcharts.com/docs/chart-and-series-types/column-chart) with almost morethan 13000 categories on x-axis i.e. i am using datehour axis and i have a bar at specific datehour. Let say i have to take pdf containing all the data, Is it possible? If so can i put extremes max value to 13000. What is the max value that Highcharts support in case of SetExtremes, Source width and SourceHeight? I can not fine these values on Highcharts website. Thanks.
has comment: http://stackoverflow.com/comment/43215437
has comment: http://stackoverflow.com/comment/43167698
answer count: 0
has title: Highcharts SetExtremes Sourcewidth and height
score: 0
has comment: http://stackoverflow.com/comment/43016159
has comment: http://stackoverflow.com/comment/43101732
has comment: http://stackoverflow.com/comment/43040815
has comment: http://stackoverflow.com/comment/43080830
has comment: http://stackoverflow.com/comment/43217517
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43216650
has comment: http://stackoverflow.com/comment/43096456
has comment: http://stackoverflow.com/comment/43050891
has comment: http://stackoverflow.com/comment/43216811
has comment: http://stackoverflow.com/comment/43244392
has comment: http://stackoverflow.com/comment/43216678
tagged with: highcharts
tagged with: javascript

http://stackoverflow.com/q/27307486
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27307622
has comment: http://stackoverflow.com/comment/43077327
has comment: http://stackoverflow.com/comment/43077331
has title: parseFloat returns NaN (when parsing a document style size)
has comment: http://stackoverflow.com/comment/43077265
has answer: http://stackoverflow.com/a/27307726
score: 0
has comment: http://stackoverflow.com/comment/43077259
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43077290
type: Question
accepted answer: http://stackoverflow.com/a/27307726
has answer: http://stackoverflow.com/a/27307622
answer count: 2
has body: the body style parseFloat keeps returning NaN when it should be -0.1 or 0.1 when I print it in console.log, I'm most-likely just getting tired, but I can't see the issue. Any help is greatly appreciated as always, Also not looking for a jQuery answer here, this must be JS function startUp() { var fontButtons = document.getElementsByClassName("fontsizer"); for (var i=0; i &lt; fontButtons.length; i++) { document.getElementsByClassName("fontsizer")[i].addEventListener("click", resizeText); } }; window.onload = startUp; function resizeText() { var fontChange = parseFloat(this.value); console.log(fontChange); if (document.body.style = "") { document.body.setAttribute("style", "font-size:1.0em;"); } var currentFontSize = parseFloat(document.body.style.fontSize.replace('em', '')); console.log(currentFontSize); document.body.style.fontSize = (currentFontSize + fontChange) + "em"; }; and the html &lt;div id="fontbuttons"&gt; &lt;input class="fontsizer" value="-0.1" type="image" id="fontdown" alt="-" src="fontdown.png" /&gt; &lt;input class="fontsizer" value="0.1" type="image" id="fontup" alt="+" src="fontup.png" /&gt; &lt;/div&gt;

http://stackoverflow.com/comment/42993866
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27259722
type: Comment
has text: The question is not about checking the typeof but about understanding why the var is not initialised to undefined each time the code is executed. @raina77ow has pointed the right reason.

http://stackoverflow.com/comment/42832955
comment on: http://stackoverflow.com/a/27165512
score: 0
type: AnswerComment
has text: Does the function work? Place alert(1); at the beginning of the showposts() function. Also; you have one to many `"` in your php script, replace `.$row['genuine']."; ` with `.$row['genuine']; `
type: Comment

http://stackoverflow.com/q/27284021
has answer: http://stackoverflow.com/a/27319156
type: UnansweredQuestion
tagged with: facebook
type: Question
tagged with: shopify
answer count: 1
tagged with: javascript
tagged with: resize
tagged with: image
score: 0
has body: I'm new to using Shopify, and our company is creating a facebook store for our product. Our product requires the user to upload an image with every unit bought (they are customized). Does anyone know how we can include a file input in the checkout form? Or even in the thank you screen? Also, we would like to have an image resize tool included, which we have a javascript package for. Is there a way to modify HTML and include javascript through Shopify's facebook store? I know it is possible through themes in regular shopify, but we can't seem to find the equivalent in the facebook version of shopify. Thank you for the help!
has title: Shopify Facebook store javascript

jasmine
tags question: http://stackoverflow.com/q/27164404
tags question: http://stackoverflow.com/q/27162466
tags question: http://stackoverflow.com/q/27187043
tag name: jasmine
tags question: http://stackoverflow.com/q/27239824
tags question: http://stackoverflow.com/q/27189968
tags question: http://stackoverflow.com/q/27259350
tags question: http://stackoverflow.com/q/27306336
tags question: http://stackoverflow.com/q/27234785
tags question: http://stackoverflow.com/q/27250877
tags question: http://stackoverflow.com/q/27303692
type: Tag
tags question: http://stackoverflow.com/q/27264016
tags question: http://stackoverflow.com/q/27251191
tags question: http://stackoverflow.com/q/27201761
tags question: http://stackoverflow.com/q/27154475
tags question: http://stackoverflow.com/q/27208888

http://stackoverflow.com/a/27255900
has comment: http://stackoverflow.com/comment/42989276
has comment: http://stackoverflow.com/comment/42987850
type: Answer
has body: That is because jQuery isn't in your file. Here's the modified version of the header with jQuery added: Random Animation Bullshit EDIT: Use this instead Random Animation Bullshit
has comment: http://stackoverflow.com/comment/42986265
has comment: http://stackoverflow.com/comment/42989746
has comment: http://stackoverflow.com/comment/42987185
has comment: http://stackoverflow.com/comment/42986087
answers question: http://stackoverflow.com/q/27255775
has comment: http://stackoverflow.com/comment/42989683
has comment: http://stackoverflow.com/comment/42989143
has comment: http://stackoverflow.com/comment/42988792
has comment: http://stackoverflow.com/comment/42988749
has comment: http://stackoverflow.com/comment/42988099
has comment: http://stackoverflow.com/comment/42989053
has comment: http://stackoverflow.com/comment/42989548
has comment: http://stackoverflow.com/comment/42986222
has comment: http://stackoverflow.com/comment/42987367
score: 0

http://stackoverflow.com/a/27301787
has body: You need to call the function, you can do this by adding an EventListener to document and then check if it's enter that was pressed. var keyevent = (/Firefox/i.test(navigator.userAgent)) ? "keypress" : "keydown"; // fit browser document.addEventListener(keyevent, function(e) { if (event.keyCode == 13) { var a = document.getElementById('name').value; //get field values var b = document.getElementById('message').value; //get field values postMessageToDB(inputElement, event); // as I said, not sure what this will do, but you need to get the data you want to pass first within this function. } }); Then, just remove the keypress checkup from you function and you should check this line, I can't see that this is going to work: inputElement.div.submit();
answers question: http://stackoverflow.com/q/27301524
has comment: http://stackoverflow.com/comment/43067532
type: Answer
has comment: http://stackoverflow.com/comment/43068210
has comment: http://stackoverflow.com/comment/43067676
has comment: http://stackoverflow.com/comment/43067495
has comment: http://stackoverflow.com/comment/43077039
score: 0

http://stackoverflow.com/a/27276767
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43022491
type: Answer
has body: The problem most likely comes from improperly using for-in on an HTMLCollection. This will include other items besides DOM elements. when it encounters the block[i].appendChild(span), it'll throw an error if block[i] isn't an element and therefore doesn't have an .appendChild() method. Use a for loop instead. function blockSize() { var block = document.getElementsByClassName("size"); for (var i = 0; i &lt; block.length; i++) { var width = Math.round(block[i].clientWidth/document.documentElement.clientWidth*100); var height = Math.round(block[i].clientHeight/document.documentElement.clientHeight*100); var span = document.createElement("span"); span.innerHTML = width+"x"+height+"%"; block[i].appendChild(span); } }
accepted answer of: http://stackoverflow.com/q/27276660
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27276660
has comment: http://stackoverflow.com/comment/43022665
has comment: http://stackoverflow.com/comment/43023087

http://stackoverflow.com/q/27169551
has comment: http://stackoverflow.com/comment/42830969
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42831305
has comment: http://stackoverflow.com/comment/42830153
upvote count: 1
has body: I have created a jQuery plugin, that internally uses class instantiation, something along these lines: ;(function ($, window, document, undefined) { 'use strict'; function MyPlugin(element, options) { this.settings = $.extend({}, options); this.$el = $(element); this.init(); return this; } MyPlugin.prototype = { init: function(){}, method1: function(){}, method2: function(){} } $.fn.myplugin = function (options, val) { return this.each(function () { if(typeof options === 'object'){ if (undefined == $(this).data('myplugin')) { var plugin = new MyPlugin(this, options); $(this).data('myplugin', plugin); } } }); } })(jQuery, window, document); Now, from external JavaScript code I want to determine if an object available at .data('myplugin') is instance of MyPlugin. Even though console logs out clearly 'MyPlugin' in front of expansion triangle, the following code: $(el).data('myplugin') instanceof MyPlugin breaks with error, claiming that MyPlugin is not defined. (most probably due to that the prototype has been defined within encapsulation) So what would be the right way to check for instanceof?
has title: instanceof check for jQuery plugin instances attached to data attribute
favorite count: 0
tagged with: instanceof
has answer: http://stackoverflow.com/a/27169633
has answer: http://stackoverflow.com/a/27170764
accepted answer: http://stackoverflow.com/a/27170764
has comment: http://stackoverflow.com/comment/42831590
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42831162
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27169633
has comment: http://stackoverflow.com/comment/42832113

http://stackoverflow.com/comment/42879893
comment on: http://stackoverflow.com/q/27197422
has text: As an hint : you have to calculate the ammount increasing with php ( make some basic math with your time interval ) and then return that value inside a function with an ajax request (jquery). Pass the function to `currentAmount`. Just get some more extra docs
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27168628
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/44043846
has answer: http://stackoverflow.com/a/72929503
type: Question
tagged with: leaflet
upvote count: 4
answer count: 3
has comment: http://stackoverflow.com/comment/105689119
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27170838
has title: How to capture a click on a specific leaflet layer
has comment: http://stackoverflow.com/comment/105076689
has body: I think the question says it all. I am using leaflet. I am loading three layers onto the map. However I can't find a way to know on which layer I clicked after clicking on the map. Basically because there is no event handler set on layers, only onto the map. I also tried to add the layers into a feature group and add an on click event to this feature group. However clicking on the map does not result in any event / response. This is what I did in the featureGroup: addWaterNameLayers: function() { var knownWaters = L.tileLayer.wms(getGeoServer('wms', geoEnviroment), { layers: this.wmsLayers.known.name, format: 'image/png', opacity: 0, styles: 'cursor: pointer', transparent: true, attribution: "" });//.addTo(this.mapInfo); var unknownWaters = L.tileLayer.wms(getGeoServer('wms', geoEnviroment), { layers: this.wmsLayers.unknown.name, format: 'image/png', opacity: 0.3, styles: '', transparent: true, attribution: "" }); L.FeatureGroup(knownWaters, unknownWaters).on('click', function(event) { console.log('click'); this.handleClick(event); },this); //this part will work on mapclick, so on featuregroup it should work? //when clicking on the map /* this.mapInfo.on('click', function(event) { this.handleClick(event); }, this); */ }, in the code above you can see the click event on te map as well... that one works. on the featuregroup it doesn't. Also when I change the code for the featureGroup to these it will not work either: var featGr = L.FeatureGroup(knownWaters, unknownWaters).on('click', function(event) { this.handleClick(event); },this); var featGr = L.FeatureGroup(knownWaters, unknownWaters); featGr.on('click', function(event) { this.handleClick(event); },this); adding the featureGroup to the layer will also do nothing...

http://stackoverflow.com/a/27265476
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27265305
has body: New edit Here is a working DEMO $('.selectpicker').selectpicker(); var all = $('option[value=all]'); $('.selectpicker').change(function() { var all = $('option[value=all]'); var thisVal = all.html(); if (all.is(':selected')) { $('.selectpicker').selectpicker('deselectAll'); $('ul.dropdown-menu &gt; li[rel=0]').addClass('selected'); $('span.filter-option').html(thisVal); } else { $('ul.dropdown-menu &gt; li[rel=0]').removeClass('selected'); } });
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43002482
has comment: http://stackoverflow.com/comment/43004793

http://stackoverflow.com/comment/42819471
score: 0
type: AnswerComment
has text: Thanks for that. That looks very big. Is it possible to reduce in few lines if possible
type: Comment
comment on: http://stackoverflow.com/a/27163102

http://stackoverflow.com/comment/43037170
comment on: http://stackoverflow.com/q/27284595
score: 0
type: Comment
type: QuestionComment
has text: Perhaps some CSS is conflicting with the `` tags? It's difficult to troubleshoot without an example.

http://stackoverflow.com/a/27207108
answers question: http://stackoverflow.com/q/27207063
type: Answer
downvote count: 1
score: 2
upvote count: 3
has body: try with jquery document ready. $( document ).ready(function() { alert($('#&lt;%= ColorHiddenField.ClientID %&gt;').val()); });

http://stackoverflow.com/q/27246840
tagged with: javascript
has comment: http://stackoverflow.com/comment/42969268
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to redirect to another page like header("Location: example.com/myOtherPage/5#jumpHere"); when the if condition is true then jump to somewhere inside that page using &lt;a name="jumpHere"&gt;&lt;/a&gt; but the # is being url encoded to %23 so it doesn't jump to that section of the page.. Is it possible to prevent # from being encoded? Or is there another way to do this? [update] Tried doing $('html, body').animate({ scrollTop: $('#jumpHere').offset().top }); instead.. It jumps now to where I want to but scrolls up again to the top page.. How do I prevent it from going back to the top?
has comment: http://stackoverflow.com/comment/42972862
answer count: 0
has comment: http://stackoverflow.com/comment/42972464
has comment: http://stackoverflow.com/comment/42968991
has comment: http://stackoverflow.com/comment/42969017
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42970949
tagged with: urlencode
has comment: http://stackoverflow.com/comment/42971446
has title: redirect then jump somewhere inside another page
type: Question
has comment: http://stackoverflow.com/comment/42975516

http://stackoverflow.com/a/27303454
answers question: http://stackoverflow.com/q/27302380
type: Answer
accepted answer of: http://stackoverflow.com/q/27302380
downvote count: 0
has comment: http://stackoverflow.com/comment/43092409
score: 5
type: AcceptedAnswer
has body: Ah. A way to do this is to use $parse like this: var onFileReadFn = $parse(attrs.onReadFile); var reader = new FileReader(); reader.onload = function() { var fileContents = reader.result; // invoke parsed function on scope scope.$apply(function() { onFileReadFn(scope, { 'contents' : fileContents }); }); }; reader.readAsText(element[0].files[0]); Full example here: http://jsfiddle.net/200eoamf/1
upvote count: 5

http://stackoverflow.com/q/27203287
tagged with: content-management-system
has answer: http://stackoverflow.com/a/27205125
tagged with: javascript
has answer: http://stackoverflow.com/a/27204328
tagged with: vs-web-site-project
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm almost finished with my website. The pages are completely made out of html,Css and Javascript. Now i would like to be able to change/add content really quickly and easily on the page. So of course i would need a CMS for that, something like Wordpress,drupal or joomla. But I want to use all of the html/css and javascript that i wrote. So my question is: is it possible to import Html/Css/JS to a CMS? I would like to use drupal, but any other good CMS will work too if this is possible.
has title: Import Html/Css/JS to CMS?
accepted answer: http://stackoverflow.com/a/27204328
tagged with: css
type: AnsweredQuestion
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27205125

http://stackoverflow.com/comment/42989734
comment on: http://stackoverflow.com/q/27257956
type: Comment
has text: If you cannot modify any HTML and can only use JavaScript after the fact, I am afraid you will be seeing some "jumpyness". Not really sure that is avoidable.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42971166
score: 0
type: QuestionComment
has text: Is it's easily done. But why do you want to use Angular? Just for one field validation? Its application is much wider, maybe you don't really need it?
type: Comment
comment on: http://stackoverflow.com/q/27248297

http://stackoverflow.com/comment/42970375
has text: I want it to convert to GMT+5:30
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27247683
type: Comment

http://stackoverflow.com/a/27230150
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42937618
type: Answer
accepted answer of: http://stackoverflow.com/q/27229797
has body: This might help you. + -
downvote count: 0
has comment: http://stackoverflow.com/comment/42937729
score: 1
answers question: http://stackoverflow.com/q/27229797

http://stackoverflow.com/comment/43019384
type: Comment
score: 0
type: QuestionComment
has text: I successfully used this plugin http://www.outsharked.com/imagemapster/default.aspx?demos.html#shapes to achieve something similar.
comment on: http://stackoverflow.com/q/27274106

http://stackoverflow.com/q/27174477
has comment: http://stackoverflow.com/comment/42838538
downvote count: 1
linked to: http://stackoverflow.com/q/9329446
type: Question
has comment: http://stackoverflow.com/comment/42838887
has body: I'm currently struggling on a very simple javascript task, but I'm new to it, so its confusing me a lot. e.g. html Item 1 Title lorum ipsum So I need to combine paragraphs 1 & 2, and replace the empty info in paragraph 3. I don't use jQuery yet, so my research has caused struggle because of this.... i currently have: var p1 = getElementsByClassName ('description-1').innerHTML; var p2 = getElementsByClassName ('description-2').innerHTML; var p3 = p1 + P2 document.getElementsByClassName ('description-combined').innerHTML = p3 I did have p3 to have p1.concat(p2) but that didn't work. I'm using it as an external file, so i may be missing out on putting something in my HTML file too.
score: -1
has answer: http://stackoverflow.com/a/27174665
linked to: http://stackoverflow.com/q/10693845
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42838694
tagged with: javascript
has comment: http://stackoverflow.com/comment/42838775
favorite count: 0
has title: combine html paragraphs using javascript
has comment: http://stackoverflow.com/comment/42838663
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27174665
type: AnsweredQuestion

http://stackoverflow.com/comment/43003430
has text: @RobG Like I said, you can either return a predicate or a hash function. For example, what if you would want to group by the result of `%3`? It wouldn't work with `true`/`false`. At-least not for this solution. I agree that the function name is misleading though.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27265910

http://stackoverflow.com/comment/42856117
comment on: http://stackoverflow.com/q/27184324
score: 0
type: Comment
type: QuestionComment
has text: @ArCiGo Yeah I got the answer. Thank u all.. :)

http://stackoverflow.com/q/27293987
has body: I would like to create two dropdown lists form, for example the first one would have "Advice A" and "Advice B" and the second one would have "Advice 1" and "Advice 2" For example, a visitor would choose "Advice A" from the first dropdown list and "Advice 2" from the second dropdown list. After clicking on the submit button, he would be redirected to http://www.domain.com/advice-a/advice-2/ I already have this code: var getURL = function(){ var option1 = document.getElementById('dropDown1').value; var option2 = document.getElementById('dropDown2').value; var URL = 'http://www.domain.com/' + option1 + '/' + option2; location.href=(URL); } 1 2 1 2 Run I would like to make it compatible with all mobiles and tablets browsers. I heard i need it written in Jquery. What would be the code? I would like a complete custom url http://www.domain2.com/custom-value/ if value "2" from dropDown1 and value "2" from dropDown2 is selected. Thanks for your help.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27294192
type: Question
has title: Two drop down lists for a mobile site
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/42921091
type: Comment
comment on: http://stackoverflow.com/a/27221088
has text: ui-router is excellent, but it's not necessary until it's necessary.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42870657
has text: @doniyor Ya, even onload event doesn't bubble, you can still capture it to any static praent container. e.g: http://jsfiddle.net/j8y0ow3h/ using onerror event for images
comment on: http://stackoverflow.com/a/27192312
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43018578
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27273968
has text: There was no way for anyone besides you to know that, you didn't post any code that referred to MarkerWithLabel.
type: Comment

http://stackoverflow.com/q/27234876
favorite count: 0
has comment: http://stackoverflow.com/comment/42946429
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42946477
has comment: http://stackoverflow.com/comment/42946346
has comment: http://stackoverflow.com/comment/42946532
type: Question
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27235032
accepted answer: http://stackoverflow.com/a/27235032
has comment: http://stackoverflow.com/comment/42946569
has title: $timeout - Number is not a function
upvote count: 2
has body: Having a terrible time getting $timeout to work in an Angular directive. Essentially even the most simplistic implementation continues to throw a TypeError: number is not a function error. I've done a bit of research and for the life of me can't figure out what is going wrong. $timeout(function(){ console.log('$timeout called'); }, 500); I'm only left to assume $timeout expects a function for the delay which makes no sense unless I am reading the documentation incorrectly. https://docs.angularjs.org/api/ng/service/$timeout Thanks in advance. Stripped out everything but the $timeout implementation from the directive. (function (window, angular, undefined) { 'use strict'; angular.module('bento.numberinput', ['bento.services']) .factory('$helper',[ function(){ // code here } ]) .directive('bentoNumberInput', [ '$helper', function ($helper) { return { restrict : 'A', require : '?ngModel', replace : false, transclude: true, link: function($scope, $element, $attrs, $controller, $timeout){ $timeout(function(){ console.log('$timeout called'); }, 500); } }; }]); })(window, window.angular);
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/43001048
comment on: http://stackoverflow.com/a/27264490
has text: can't i change css using this?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27309856
answer count: 1
has answer: http://stackoverflow.com/a/27310361
has comment: http://stackoverflow.com/comment/43081693
has title: I am trying to get two columns first of name and second of increment by 60. But i am getting 0 in every row of second column
has comment: http://stackoverflow.com/comment/43081110
accepted answer: http://stackoverflow.com/a/27310361
type: AnsweredQuestion
upvote count: 0
has body: //X is not increased instead getting 0 in each column. for (var i = 0; i &lt; users.length; i++) { for (var x = 0; x &lt; users.length; x += 60) { var table = document.getElementById("myTable"); var row = table.insertRow(i); var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); cell1.innerHTML = users[i]; cell2.innerHTML = x; } }
tagged with: javascript
favorite count: 0
type: Question
score: -2
has comment: http://stackoverflow.com/comment/43081124
downvote count: 2

http://stackoverflow.com/q/27199783
possible better answer: http://stackoverflow.com/a/27199812
has answer: http://stackoverflow.com/a/27199812
type: Question
has answer: http://stackoverflow.com/a/27199890
tagged with: javascript
tagged with: date
has answer: http://stackoverflow.com/a/27199877
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27199890
upvote count: 2
has title: milliseconds between a specified date and convert to date format in js
type: AnsweredQuestion
score: 2
has body: convert milliseconds between a specified date and to date format in js $.each(item,function(index,a){ var date=1416249000000; Date date1=new Date(date); htmlTable += '&lt;td&gt;'+date1+'&lt;/td&gt;'; }); this causes error how to parse this to date format inside jquery edit my question the date value doesn't contain 'l' at last sorry it's my mistake

http://stackoverflow.com/comment/42857817
type: QuestionComment
has text: @Sandeep i was removed but still it doesnt works.
score: 0
comment on: http://stackoverflow.com/q/27185246
type: Comment

http://stackoverflow.com/comment/43220078
comment on: http://stackoverflow.com/a/27179967
score: 0
type: AnswerComment
type: Comment
has text: I did like the most basic Javascript Codecademy course but that was a while ago. I've got the script in at the bottom. But where do I put the first stuff? In with the CSS? And what needs to go in "yourURL"?

http://stackoverflow.com/comment/42943834
score: 0
comment on: http://stackoverflow.com/q/27233513
type: Comment
type: QuestionComment
has text: Well, JSON only supports a specific set of "data types". So you have to represent your data as such. E.g. you could represent an instance of `Pseudoclass` as `{class: 'Pseudoclass', data: {x: ...}}`. Then you also have to provide a corresponding deserialization method.

fullpage.js
tags question: http://stackoverflow.com/q/27304920
tag name: fullpage.js
tags question: http://stackoverflow.com/q/27245933
tags question: http://stackoverflow.com/q/27177032
type: Tag
tags question: http://stackoverflow.com/q/27160814

http://stackoverflow.com/comment/42921912
comment on: http://stackoverflow.com/a/27221550
type: Comment
score: 1
has text: And you might need to wrap it in `$('#checkbox').on('change', function () {});` to fire off when it changes.
type: AnswerComment

http://stackoverflow.com/a/27303445
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43070071
answers question: http://stackoverflow.com/q/27303075
has body: I'm adding this for better formatting ... Did you try this? $(document).ready(function(){ setTimeout(function() { console.log($('.f_hidden_p').text()); console.log($('.f_hidden_p').val()); }, 2000); }); ... with no results?
has comment: http://stackoverflow.com/comment/43070234

http://stackoverflow.com/comment/42892910
comment on: http://stackoverflow.com/q/27204447
has text: @Pointy...can you explain me how to do it, whether the click heandlers or event delegation???
score: 0
type: Comment
type: QuestionComment

kinect
type: Tag
tag name: kinect
tags question: http://stackoverflow.com/q/27168837

http://stackoverflow.com/q/27194907
type: UnansweredQuestion
tagged with: php
has body: I am working on a php project. I have an associative array which I use to make a dictionary. I have also a string with a text where are included some keys of the array. What I want to do is generating another String with the same text of the first one but where key words are replaced with array's values. Before the sostitution I want the user writes in each empty-value of the array (which compares into the String) the contents. I have to do it throw a pop up. I need to get the variable's content of the Javascript variable and put it into the PHP array. I have tried to use AJAX but I am a biginner and I do not know if I am doing well. Here my code (which it does not work): &lt;?php $array["red"] = "Once upon a time"; $array["blue"] = "fox"; $array["black"] = "cat"; $array["orange"] = ""; $string = "&lt;br /&gt; It has been a long time since red " . "blue. My name is blue " . "and my surname is black. &lt;br /&gt;" . "My age isorange. &lt;br /&gt; &lt;br /&gt;."; echo "First string': ". $string; ?&gt; &lt;br /&gt; &lt;br /&gt; &lt;?php foreach ($array as $key =&gt; $value) { if ((strstr($string, $key) == true) &amp;&amp; ($value == "")) { ?&gt; &lt;script&gt; name = prompt("Insert a correct value: "); while ((name== "") || !(isNaN(name)) || name== null) { window.alert("Wrong insert!"); name= prompt("Insert a correct value: "); } var xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","index.php?name="+name,true); xmlhttp.send(); &lt;/script&gt; &lt;?php $q = $_REQUEST["name"]; $value = $q; echo "the value is ".$q; } //echo $key." =&gt; ".$value; echo "&lt;br/&gt; &lt;br/&gt;"; } ?&gt;
has comment: http://stackoverflow.com/comment/42877604
type: Question
tagged with: javascript
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27196577
answer count: 1
has title: Passing a variable from AJAX to PHP

http://stackoverflow.com/q/27169729
favorite count: 0
linked to: http://stackoverflow.com/q/542938
score: -3
has comment: http://stackoverflow.com/comment/42830432
linked to: http://stackoverflow.com/q/26956723
type: AnsweredQuestion
upvote count: 0
has title: calculate the difference by using javascript betwenn the two dates
has body: Here two date variable available.one is date and another one is todaydate. I need to calculate the day in between today date and date. var s=jSonArray[0].new_StartDate;//retrive the s value from Json Array var dateString = s.substr(6); var currentTime = new Date(parseInt(dateString )); var month = currentTime.getMonth() + 1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); var date = month + "/" +day + "/" + year; var currentDateTime = new Date(); var todaydate= (currentDateTime.getMonth() + 1) + '/' + currentDateTime.getDate() + '/' + currentDateTime.getFullYear();
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/3224834
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/69031138
downvote count: 3
has answer: http://stackoverflow.com/a/69031138
has answer: http://stackoverflow.com/a/27169828
accepted answer: http://stackoverflow.com/a/27169828

http://stackoverflow.com/a/27160500
answers question: http://stackoverflow.com/q/27160473
has body: Using .next() is not working because .details is not the immediate sibling of .current. Using .closest() does not work simply because it starts from the element itself and then travels up the DOM (searches for ancestors), and does not look among the siblings nested in the same level. Basically we are trying to emulate the behavior of the general sibling selector ~ in CSS, with the exception that is has to be first occurence. Therefore, we use .nextAll(), and pair that up with .first() that returns the first element that satisfies the .nextAll(), i.e. // jQuery-based DOM transversal $('.current').nextAll('.details').first(); You can of course use CSS, but I suspect that would be less efficient. Also, by using CSS selectors you will not be able to transverse the DOM by chaining additional methods: // CSS-based selection $('.current ~ .details:first'); $(function() { $('.current').nextAll('.details').first().css('background-color','#eee'); }); 1 2 3 1 2 6
accepted answer of: http://stackoverflow.com/q/27160473
has comment: http://stackoverflow.com/comment/42814752
upvote count: 3
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0

http://stackoverflow.com/comment/43086253
type: Comment
comment on: http://stackoverflow.com/a/27312645
has text: no it's a seperate checkbox value it's meant for a profile to check wether or not the person seeing the view wants to see personal information of the person
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42943215
type: QuestionComment
score: 0
has text: I think JavaScript doesn't handle operator overloading, so you will not be able to do comparison with the `>` operator. My advice is to create a method inside your `myTime()` class which take a `Time()` object in parameter and do comparisons inside.
comment on: http://stackoverflow.com/q/27233183
type: Comment

http://stackoverflow.com/a/27164096
accepted answer of: http://stackoverflow.com/q/27164075
has body: You need to set the variable before the return statement. app.service('productsService', ['$http', productsService]); function productsService($http){ var _products = []; return { getProducts: getProducts } //var _products = []; this will never run function getProducts(){ $http.get('http://localhost:4000') .then(function(data){ _products = data; }); } }
answers question: http://stackoverflow.com/q/27164075
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/a/51292463
answers question: http://stackoverflow.com/q/27194359
score: 0
type: Answer
has body: function pluralize( /* n, [ n2, n3, ... ] str */ ) { var n = Array.prototype.slice.call( arguments ) ; var str = n.pop(), iMax = n.length - 1, i = -1, j ; str = str.replace( /\$\$|\$(\d+)/g, function( m, p1 ) { return m == '$$' ? '$' : n[+p1-1] } ) ; return str.replace( /[(](.*?)([+-])(\d*)(?:,([^,)]*))?(?:,([^)]*))?[)]/g, function( match, one, sign, abs, not1, zero ) { // if abs, use indicated element in the array of numbers // instead of using the next element in sequence abs ? ( j = +abs - 1 ) : ( i &lt; iMax &amp;&amp; i++, j = i ) ; if ( zero != undefined &amp;&amp; n[j] == 0 ) return zero ; return ( n[j] != 1 ) == ( sign == '+' ) ? ( not1 || 's' ) : one ; } ) ; } console.log( pluralize( 1, 'the cat(+) live(-) outside' ) ) ; // the cat lives outside console.log( pluralize( 2, 'the child(+,ren) (is+,are) inside' ) ) ; // the children are inside console.log( pluralize( 0, '$1 dog(+), ($1+,$1,no) dog(+), ($1+,$1,no) dog(+,,)' ) ) ; // 0 dogs, no dogs, no dog console.log( pluralize( 100, 1, '$1 penn(y+,ies) make(-1) $$$2' ) ) ; // 100 pennies make $1 console.log( pluralize( 1, 0.01, '$1 penn(y+,ies) make(-1) $$$2' ) ) ; // 1 penny makes $0.01
upvote count: 3
downvote count: 3
has comment: http://stackoverflow.com/comment/89563050

http://stackoverflow.com/comment/42997014
comment on: http://stackoverflow.com/a/27261703
type: Comment
has text: @TomášZato for some random reason the solution isn't working now I was super excited when I got it after 4 hours of searching Is there any possible reason that it could go to the previous scenario of request method : OPTIONS
score: 0
type: AnswerComment

http://stackoverflow.com/q/27251124
score: 0
has answer: http://stackoverflow.com/a/27251194
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42976353
has body: I've made a module in JS (without jQuery) that changes the background image of a web-page based on data from the client browser (getting browser width, height and doing the appropriate stuff.. etc.) but I only know how to initialize it on page load via DOM eventListeners and I want to be able to be able to fire it via click or other user-driven events. I don't think I'm fully grasping what I need to do to remove the EventListener without making all the rest of the code unusable, which has been the end result of my own attempts. Any points in the right direction would be much appreciated - below is the first couple of functions called by the script: // the initialization of the page bindReady(function(){ startBGResize(); }); // DOM ready handler function bindReady(handler){ var called = false; var ready = function() { if (called) return; called = true; handler(); }; if (document.addEventListener) { document.addEventListener('DOMContentLoaded', ready, false); } else if (document.attachEvent) { if (document.documentElement.doScroll &amp;&amp; window == window.top) { var tryScroll = function(){ if (called) return; if (!document.body) return; try { document.documentElement.doScroll('left'); ready(); } catch(e) { setTimeout(tryScroll, 0); } }; tryScroll(); } document.attachEvent('onreadystatechange', function(){ if (document.readyState === 'complete') { ready(); } }); } if (window.addEventListener) window.addEventListener('load', ready, false); else if (window.attachEvent) window.attachEvent('onload', ready); }
type: Question
has title: How to remove a DOM ready handler so a Javascript function can be fired on
answer count: 1
linked to: http://stackoverflow.com/q/23799296
tagged with: javascript

http://stackoverflow.com/comment/43055212
score: 0
type: Comment
has text: Ok tell a lie, turns out the guy who wrote this decided that this form didn't need to be submitted or validated lol.
comment on: http://stackoverflow.com/a/27294582
type: AnswerComment

http://stackoverflow.com/comment/42940779
type: Comment
score: 0
type: AnswerComment
has text: Glad to have helped, did you see my updated solution? Thanks to @j08691 for the pointer.
comment on: http://stackoverflow.com/a/27231850

http://stackoverflow.com/a/27286031
has body: your code only works for existing .removeIcon elements. if you do add dynamic elements, try use .on $("#container").on('click', '.removeIcon', function() { alert(); console.log("Clicked!"); }); which binds click event on all .removeIcon elements inside #container (including dynamic added elements)
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43039452
answers question: http://stackoverflow.com/q/27286011
type: Answer
has comment: http://stackoverflow.com/comment/43039428
accepted answer of: http://stackoverflow.com/q/27286011
score: 7
has comment: http://stackoverflow.com/comment/43039551
upvote count: 7

http://stackoverflow.com/a/27294110
has comment: http://stackoverflow.com/comment/43059970
upvote count: 1
answers question: http://stackoverflow.com/q/27292238
type: Answer
downvote count: 0
score: 1
has body: The 3rd parameter you are passing to xmlhttp.open(); is true, which means asynchronous (note that you shouldn't quote the true - you want to pass a true value, not the string "true". This means that the function will return straight away, while the actual request happens in the background. So if you straight away check the result, the real request won't have responded yet, and you will get null as you are seeing. You should use something like the following, before you call send(): xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { alert(xmlhttp.responseText); } } to listen for when the AJAX request completes, then alert you when it does. P.s. if you are new to Javascript, I would reccomend not using w3schools - it's example code is not very high quality, and use jQuery - most sites on the web use it to make a lot of stuff a lot easier. Although mentioning "use jQuery" on Stack Overflow will often lead to a flamewar. A jQuery solution would look like: $.get('http://remoteserver.net/search/myvalues?format=xml').then(function (data) { alert(data); }, function (errror) { alert("An error occurred"); });

http://stackoverflow.com/q/27312319
has comment: http://stackoverflow.com/comment/43085824
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has comment: http://stackoverflow.com/comment/43087551
type: Question
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
has title: javascript, php, onchange select box not working
has body: I have a form with two select boxes, I wish to live change the boxes without having to press the submit button. This is the code I use: <?php $select = "SELECT provincie FROM plaatsen GROUP BY provincie "; $exec = mysql_query($select) or die ('Ojee, foutieve query!: '.mysql_error()); echo ' '; echo " "; echo " Kies provincie "; while ($provincie = mysql_fetch_assoc($exec)) { echo ' '.$provincie['provincie'].' '; } echo " "; $provincies = $_POST['provincie']; ?> Gekozen provincie: <?php echo $provincies; ?> <?php if(isset($_POST['provincie'])){ $plaats_query = "SELECT * FROM plaatsen WHERE provincie = '".$_POST['provincie']."' GROUP BY plaats ORDER BY plaats ASC "; $plaats_result = mysql_query($plaats_query) or die ("FOUT: " . mysql_error()); echo " "; echo " Kies plaatsnaam "; while($plaats = mysql_fetch_assoc($plaats_result)) { echo " " . $plaats['plaats'] . " "; } echo " "; } $plaatsje_query = "SELECT * FROM plaatsen WHERE stadid = '".$_POST['plaatsnaam']."' GROUP BY plaats ORDER BY plaats ASC "; $plaatsje_result = mysql_query($plaatsje_query) or die ("FOUT: " . mysql_error()); while($plaatsje = mysql_fetch_assoc($plaatsje_result)) $woonplaats = $plaatsje['plaats']; $regiotje = $plaatsje['regio']; $plaatsjes_query = "SELECT * FROM plaatsen WHERE stadid = '".$_POST['plaatsnaam']."' GROUP BY regio ORDER BY regio ASC "; $plaatsjes_result = mysql_query($plaatsjes_query) or die ("FOUT: " . mysql_error()); while($plaatsjes = mysql_fetch_assoc($plaatsjes_result)) $regiotje = $plaatsjes['regio']; ?> Categorie selecteren * Selecteer de categorie <?php while ($categorie = mysql_fetch_assoc($catexec)) { echo ' '.$categorie['catname'].' '; } ?> Naam bedrijf * Contactpersoon E-mailadres Website Telefoonnummer * Fax Straat * Postcode * <input type="hidden" name="transno" id="transno" value="<?php echo $n; ?>" /> KvK nummer * Beschrijving bedrijf 500 karakters beschikbaar. The code works, but only after pressing submit its is that I can choose the cities out of the previously ch…
tagged with: onchange
answer count: 1
has answer: http://stackoverflow.com/a/27312431
favorite count: 0

http://stackoverflow.com/comment/42998670
comment on: http://stackoverflow.com/q/27262998
has text: i think i m goig to do it parsing information from the same websocket, like you are saying. thank you:)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42940028
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27231536
has text: "The asp.net code fails to call javascript function" - what does this mean? Have you looked at the browser's page source html? Have you found `alertMe` definition and call there?

http://stackoverflow.com/q/27290640
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43089933
type: Question
has comment: http://stackoverflow.com/comment/43069965
has comment: http://stackoverflow.com/comment/43047802
tagged with: javascript
tagged with: jquery
has title: Angularjs is not loading second time
upvote count: 1
has comment: http://stackoverflow.com/comment/43047829
answer count: 1
has answer: http://stackoverflow.com/a/27315149
linked to: http://stackoverflow.com/q/27274167
favorite count: 0
has body: I am using angularjs in my application. I have a problem with this code, this code generate data first time. But when I come back to that page from other location it give only expression written in jsp page Below is my app.js var app = angular.module("myModule",[]); app.controller( "ReportController", function ($scope,$http) { $http({ method: 'POST', url: 'mypage_body.do', data: 'action=fetchdata', headers: {'Content-Type': 'application/x-www-form-urlencoded'} }) .success(function(response) { $scope.questions = response; }); } ); angular.element(document).ready(function (){ angular.bootstrap(document,['myModule']); }); It gives expression when I reload the page from other location like this {{question.title}} {{cell.f}}{{cell.f}} {{row.h}} {{row.v}} {{row.v}} I analyzed that page is not loading again. Means document.ready is not calling again on that page. Could anyone please help how to call again the module written in app.js without using document.ready. Any help would be appreciated. Thanks in advance.
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/42972293
score: 1
comment on: http://stackoverflow.com/q/27232971
has text: If you have issues with an answer, please comment on that answer.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29844079
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27295431
type: AcceptedAnswer
downvote count: 0
has body: In my case this below code works. By applying the charset to the string you will get the desired output. request.setAttribute("subject", new String("Test Subject".getBytes(), "UTF-8"));
answers question: http://stackoverflow.com/q/27295431
type: Answer
score: 3

http://stackoverflow.com/comment/42987038
type: QuestionComment
type: Comment
has text: It's a valid string. However, `Player [ playerid=123, category=b, high=150, total=2300]` is not a valid JSON expression that had a programmatically accessible `playerid` property - you'd need to parse it.
comment on: http://stackoverflow.com/q/27256699
score: 0

google-forms
tags question: http://stackoverflow.com/q/27277690
type: Tag
tag name: google-forms

http://stackoverflow.com/a/27653759
score: 0
answers question: http://stackoverflow.com/q/27294429
has comment: http://stackoverflow.com/comment/77698521
type: Answer
has comment: http://stackoverflow.com/comment/77709350
has comment: http://stackoverflow.com/comment/77704428
accepted answer of: http://stackoverflow.com/q/27294429
has body: Fullcalendar behaves abruptly without any errors and warnings when the jquery ui version is not up to date. So You need to update your jquery ui version preferably to 1.11...
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/57497098

http://stackoverflow.com/comment/42862726
has text: The shown HTML is invalid
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27188091

http://stackoverflow.com/a/27262484
downvote count: 0
score: 1
has body: You can add liked and disliked properties to each employee in the same ng-click handlers that add and subtract likes. $scope.like = function(employee){ employee.x = parseInt(employee.x) + 1; if (parseInt(employee.y) > 0) employee.y = parseInt(employee.y) - 1; employee.liked = true; employee.disliked = false; } $scope.dislike = function(employee){ if (parseInt(employee.x) > 0) employee.x = parseInt(employee.x) - 1; employee.y = parseInt(employee.y) + 1; employee.liked = false; employee.disliked = true; } Then, ng-disabled can prevent additional clicks. Inc like: {{employee.x}} Dec dislike: {{employee.y}} http://plnkr.co/edit/qRdp4io5pdfxL7KijTjy?p=preview
answers question: http://stackoverflow.com/q/27262270
accepted answer of: http://stackoverflow.com/q/27262270
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/27266694
accepted answer of: http://stackoverflow.com/q/27266533
has comment: http://stackoverflow.com/comment/43004915
has body: var running = false; startknop.onclick = function() { if(!running) { running=true; intervalId = setInterval(count, 1000); } } when timer is finished set running false.
type: Answer
answers question: http://stackoverflow.com/q/27266533
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/43009507
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27224959
has text: @Sakshi - I have received error http://stackoverflow.com/questions/27269600/selenium-webdriverjs-mousemove-method-not-working. Kindly help
score: 0

http://stackoverflow.com/q/27249871
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42974229
has comment: http://stackoverflow.com/comment/42974342
answer count: 1
has answer: http://stackoverflow.com/a/27250547
tagged with: angularjs
has title: Angular ng-repeat not showing on page load
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27250547
type: Question
has body: I've never had this issue before, but I've got an Angular controller that pulls a list of client connection data from a SignalR HUB and displays it on a status page. It's pretty straightforward stuff. My problem is: when the page is loaded, the controller runs and it retrieves the data properly, but it won't show on page until I do something that "jostles" angular, like clicking in the filter text box and then clicking out of it. I don't actually have to do anything that changes data. I've set a breakpoint and verified that the data is loaded properly, and it is being assigned to the scope. I also tried using a $scope.$apply() right after the data load, but it didn't have any impact. Here is the relevent code: Controller: angular.module('statusModule', ['utilitiesModule']). controller('statusController', ['$scope', '$location', 'Util', function ($scope, $location, Util) { var gurcaHub = $.connection.gurcaHub; var indexes = {}; var clients = []; $scope.search = { domain: '' }; var refreshClientList = function () { gurcaHub.server.getClients("", 0).done(function (result) { angular.forEach(result, function (item) { // omitted for brevity, all this does is massage the data a bit clients.push(item); }); $scope.clients = clients; }); }; angular.element(document).ready(function () { $.connection.hub.error(function (error) { $scope.errorMsg = error; }); $.connection.hub.start().done(function () { gurcaHub.server.connectManager({ ManagerToken: "123" }).done(function () { refreshClientList(); }); }); }); }]); And here is the relevent HTML: {{item.domain}} {{item.numClients}} Type Machine Name Client ID IP {{client.Type}} {{client.MachineName}} {{client.ClientId}} {{client.Ip}} I did remove the filter and I still have the same problem. Again, all I have to do is click in a form input field and then de-focus it again and everything shows up. I don't have to type anything. The data is there, it's just not displayed until you do something.

http://stackoverflow.com/q/27261150
tagged with: javascript
tagged with: jquery
has body: I have a div tag in in my JSP page. Its ID is autopopulated by other parameters that I don't have control over. The div tag looks like this. I am skipping the contents in the div in this post. &lt;div class="parallax styleswitch" id="${nodeId}" style="${desktopstyle}" data-large="${desktopstyle}" data-medium="display:none;" data-small="display:none;" data-dtautoheight="true" data-tabautoheight="false" data-mobautoheight="false"&gt; I want to calculate the height of this div. I was able make that work for div with static ID $(".testt").height(); http://jsfiddle.net/m7cyw70y/ How can I use the nodeId variable value in the JS to get the div's height? My JS code is in in the JSP page wrapped around script tags.
has answer: http://stackoverflow.com/a/27261263
type: Question
has answer: http://stackoverflow.com/a/27261204
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27261204
accepted answer: http://stackoverflow.com/a/27261263
type: AnsweredQuestion
has title: Calculate height of div with dynamically populate ID value

http://stackoverflow.com/comment/42890552
score: 0
type: Comment
has text: @AvinashRaj Sometimes, maybe.
comment on: http://stackoverflow.com/a/27203828
type: AnswerComment

http://stackoverflow.com/a/27306108
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/43075047
accepted answer of: http://stackoverflow.com/q/27305497
has body: You have to use the $compile service and then inject the result into your page: $(“#new-row-button”).click(function(e) { $.get(“/get_new_row_content”, function(data) { var $injector = angular.injector(['ng','any other needed modules']); $injector.invoke(function($rootScope,$compile){ $(“#table tbody”).append($compile(data)($rootScope)); }); }); });
downvote count: 1
answers question: http://stackoverflow.com/q/27305497
score: 1
has comment: http://stackoverflow.com/comment/43075077
type: AcceptedAnswer

http://stackoverflow.com/comment/42832152
comment on: http://stackoverflow.com/a/27170721
type: AnswerComment
type: Comment
score: 1
has text: @LShetty He does not enough reputation to comment

http://stackoverflow.com/comment/43097327
type: QuestionComment
comment on: http://stackoverflow.com/q/27307101
has text: Yea no problem. Any ideas why this is failing?
score: 0
type: Comment

http://stackoverflow.com/a/27239588
upvote count: 2
answers question: http://stackoverflow.com/q/27239287
accepted answer of: http://stackoverflow.com/q/27239287
type: AcceptedAnswer
downvote count: 0
has body: How about this: function letterGrade(grade) { // singleDigitGrade will be an integer, 1-10 var singleDigitGrade = Math.floor(grade / 10); if (singleDigitGrade === 9 || singleDigitGrade === 10) { alert('You made a(n) A.'); } else if (singleDigitGrade === 8) { alert('You made a(n) B.'); } else if ( singleDigitGrade === 7) { alert('You made a(n) C.'); } else if (singleDigitGrade === 6) { alert('You made a(n) D.'); } else { alert('You made a(n) F.'); } }
type: Answer
score: 2

http://stackoverflow.com/a/27211521
upvote count: 8
has comment: http://stackoverflow.com/comment/42905820
has body: It is to do with the version of angular you are using. Earlier versions of Angular allowed the ability to assign controller functions to the global scope like you did. Then this ability was removed from angular. There are still alot of tutorials around that reference this older style however. See this demo - http://jsbin.com/fowamutoli/1/edit I have replaced with angular legacy and your code runs. So in the future you need to declare an angular module and register your controller against it. i.e. &lt;html data-ng-app="app"&gt; &lt;script&gt; var app = angular.module('app', []). controller('simpleController', function ($scope) { $scope.customers = [ { Name: "Dave Jones", City: "Phoenix" } , { Name: "Jamie Riley", City: "Atlanta" } , { Name: "Heedy Walhin", City: "Chandler" } , { Name: "Thomas Winter", City: "Seattle" } ]; }); &lt;/script&gt;
type: AcceptedAnswer
score: 8
accepted answer of: http://stackoverflow.com/q/27211445
type: Answer
answers question: http://stackoverflow.com/q/27211445
has comment: http://stackoverflow.com/comment/42920708
downvote count: 0

http://stackoverflow.com/comment/43084172
comment on: http://stackoverflow.com/a/27311318
type: Comment
has text: @ARH check out the new fiddle
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42999345
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27263460
type: Comment
has text: Im using jquery & jquery-ui.

http://stackoverflow.com/a/28385714
has body: You have to export the OTHERPAGE from it's file: file OTHERPAGE.react.js: var OTHERPAGE = React.createClass({...}); module.exports = OTHERPAGE; use the OTHERPAGE component: var OTHERPAGE = require('./components/OTHERPAGE.react'); var React = require('react'); var parentId = ...; React.render(&lt;OTHERPAGE id={parentId} /&gt;, document.getElementById('main'));
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 6
upvote count: 6
answers question: http://stackoverflow.com/q/27207428
accepted answer of: http://stackoverflow.com/q/27207428

http://stackoverflow.com/comment/42865310
has text: please take your time to rewrite your question, so it can be understood
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27189566
type: Comment

http://stackoverflow.com/comment/43048016
type: AnswerComment
comment on: http://stackoverflow.com/a/27288196
type: Comment
has text: Hi, can you plz suggest me if I take 5 different images instead of same one . and images shouldn'd show together.... on every refresh but I'm unable do this so plz help out plz....
score: 0

http://stackoverflow.com/comment/42957627
has text: Another alternative that does the same thing if you are using UnderscoreJS or Lodash is `_.partial()`.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27240598
score: 0

http://stackoverflow.com/comment/43082674
comment on: http://stackoverflow.com/a/27299685
type: Comment
score: 0
type: AnswerComment
has text: yeah, my bad. i couldn't think of that scenario. well it depends on you actually. if u want to stop moving in the first and last panel towards empty panel, then u should just check the slide number in the appropriate manner. if u want to slide to the other end of the panel when u reach the edge, i mean first and last, then u should just update the slide number and continue executing as usual. i'll update my answer shortly

http://stackoverflow.com/comment/42843814
comment on: http://stackoverflow.com/q/27177155
has text: Could you tell me how I could add them together please?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27222668
answers question: http://stackoverflow.com/q/27222418
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27222418
has body: The results of document.getElementsByClassName() is an HTMLCollection which is a live collection of elements. If you don't want this collection to update as you add more elements to the document, you need to make a copy into an array; here's a simple way to just clone the container: var tabs = [].slice.call(parent.getElementsByClassName("tab"), 0); var tabContents = [].slice.call(parent.getElementsByClassName("tab-content"), 0); See also: Array.prototype.slice
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/q/27192479
has answer: http://stackoverflow.com/a/27590751
has body: I'm sorry if it is already asked, but I'm stuck on this. I'm making a website atm. In that website I have a page with around 100 images. The user can sort that page by dragging them into place. The problem is it is impossible to get all images on the screen. So if you have a image on the bottom which needs to be on the top, you'll have to scroll your way up. I know if you hold the picture at the bottom on the screen it will scroll too. But my users don't seem to understand :P. Code: &lt;div style="height:1000px;"&gt; &lt;img src="http://go.3fm.nl/data/thumb/abc_media_image/1000/1716/w456.015c6_r16-9_57ac1e644a2466ac4c5fa5aab5986e29.jpg"/&gt; &lt;/div&gt; Problem is I can't make it work. I made a fiddle (http://jsfiddle.net/j2194re7/) which has the same issue. My question: How can I drag and scroll with my mouse at the same time?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27590751
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42871617
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Scroll page while dragging image

http://stackoverflow.com/q/27305579
tagged with: asp.net
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27306907
score: 0
answer count: 1
tagged with: javascript
has body: I have a CustomValidator that checks some stuff on postback--it can't do it clientside. All of my validators are hidden because the styles are ugly, and in the uncommon case this particular validator fails, I want to trigger a nice bootstrap popover when the page reloads. At the moment, the page just reloads with no indication as to why it didn't go onto the next step of the wizard. What's the best way I can detect whether the validator succeeded or failed after the page loads? I'm considering just using a HiddenField and if the validator is invalid, setting the value. That seems like a workaround for something that should already exist.
has title: Asp.NET check if CustomValidator is valid clientside after postback

http://stackoverflow.com/comment/43031276
type: QuestionComment
has text: I should have clarified I'm using EXT 3.4.0. I ran your fiddle using this version and it didn't work. Sorry for not mentioning that. Updated my post.
comment on: http://stackoverflow.com/q/27277344
score: 0
type: Comment

http://stackoverflow.com/comment/42973727
type: QuestionComment
type: Comment
has text: You know your string's aren't the same length?!
score: 0
comment on: http://stackoverflow.com/q/27249720

http://stackoverflow.com/comment/42833800
type: Comment
comment on: http://stackoverflow.com/a/27171324
type: AnswerComment
has text: Solution is really great. Just one thing, this is case-sensitive solution, anyway to make this non case-sensitive?
score: 0

http://stackoverflow.com/q/27284935
tagged with: triggers
has comment: http://stackoverflow.com/comment/43037752
has comment: http://stackoverflow.com/comment/43037843
type: Question
type: AnsweredQuestion
has title: Jquery Use Row of Table Populated By PHP in Loop
accepted answer: http://stackoverflow.com/a/27284998
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43037780
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27285003
has answer: http://stackoverflow.com/a/27284998
has comment: http://stackoverflow.com/comment/43037792
possible better answer: http://stackoverflow.com/a/27285003
has body: was hoping to have someone with jQuery expertise help me out here... I have a table that is created dynamically through php using such code: ... &lt;tbody&gt; &lt;?php foreach ($members as $member){ echo '&lt;tr&gt;'; echo "&lt;td&gt;&lt;a href='#' class='edituser-information' title='edituser_information' data-id=" .$member['id']. "&gt;&lt;img src='/images/edit-button.png' width='59' height='28' alt='EDIT'&gt;&lt;/a&gt;"; echo '&lt;/tr&gt;'; }?&gt; &lt;/tbody&gt; ... I am passing information into a jQuery function and then ajax using this: $('#editUsersTable tbody').on('click', 'tr', function (){ data_id = $('td a.edituser-information', this).eq(0).attr('data-id'); $.ajax({ url: 'edit_specific_user.php', type: 'POST', data: {id : data_id}, ... THE PROBLEM: The ajax script picks up data-id correctly because it loads the information right through the row that was clicked on... Unfortunately, what I want is the user is FORCED to click the edit button, and not just the row in the table... As of now, the user can just click the row, and then it proceeds right into the jQuery because the entire row is the trigger. How can I change it that the user must click the specific row's edit button, and not the row itself? Thank you in advance!!

http://stackoverflow.com/q/27273636
has comment: http://stackoverflow.com/comment/43016682
has answer: http://stackoverflow.com/a/27273981
favorite count: 0
has answer: http://stackoverflow.com/a/27273829
answer count: 5
has body: I'm trying to change style of a div using select option dropdowns using innerhtml but I haven't a clue how to do it. Below is a simplified version of what i am working on. What code can be added to make this work? I'm looking for an elegant solution, with as little code as possible. In this example there should be 9 possible combinations, aside from the default. Some Text Arial Tahoma Georgia Red Green Blue Red Green Blue
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27273908
has title: How change style of a div using select options
has answer: http://stackoverflow.com/a/27273920
upvote count: 3
tagged with: innerhtml
has comment: http://stackoverflow.com/comment/43016683
has answer: http://stackoverflow.com/a/27273791
type: Question
has comment: http://stackoverflow.com/comment/43016688
has comment: http://stackoverflow.com/comment/43017043
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27273920
score: -2
accepted answer: http://stackoverflow.com/a/27273908
downvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/42923588
comment on: http://stackoverflow.com/a/27221970
type: AnswerComment
type: Comment
has text: To test for other days, you can just add/subtract a random number of days to/from `daysSinceEpoch`
score: 2

http://stackoverflow.com/q/27170043
tagged with: clone
has comment: http://stackoverflow.com/comment/97958532
tagged with: javascript
tagged with: dom
score: 20
answer count: 2
has answer: http://stackoverflow.com/a/55505323
has comment: http://stackoverflow.com/comment/97575400
favorite count: 0
tagged with: shadow-dom
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 20
has body: I'm trying to clone a shadow root, so that I may swap instances of &lt;content&gt;&lt;/content&gt; with their corresponding distributed nodes. My approach: var shadowHost = document.createElement('div'); var shadowRoot = shadowHost.createShadowRoot(); var clonedShadowRoot = shadowRoot.cloneNode(true); does not work, as "ShadowRoot nodes are not clonable." The motivation for this is that I wish to retrieve the composed shadow tree, so that I may use the rendered HTML markup. This may not work due to the nature of the Shadow DOM, the reference to the distributed nodes is likely to be broken by the cloning process. Composing the shadow tree is likely to be a native feature, but having searched through the w3c spec, I was unable to find such a method. Is there such a native method? Or, failing that, would manual traversal (replicating the tree in the process), work?
has title: How can I clone a ShadowRoot?
downvote count: 0
has comment: http://stackoverflow.com/comment/97761880
has answer: http://stackoverflow.com/a/55540552
type: Question

http://stackoverflow.com/comment/43067015
type: AnswerComment
has text: Shoot me an email, it's on my profile http://stackoverflow.com/users/574823/hawkeye126
type: Comment
comment on: http://stackoverflow.com/a/27301595
score: 1

http://stackoverflow.com/q/27250857
tagged with: http://stackoverflow.com/tag/csv
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/27320499
has comment: http://stackoverflow.com/comment/42981477
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42983537
has comment: http://stackoverflow.com/comment/42983197
has comment: http://stackoverflow.com/comment/42977071
has title: CSV file to Varible struggling, using papa.parse
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43014505
type: Question
has body: Ok, the goal is to copy the CSV from a file and store them as a string in javascript. Using Papaparse I have managed to get the contents from the CSV file but I cant seem to save the string outside of papaparse to use in another script. I have very new to javascript so be kind :) the while loop is to adjust the format to how i need it, however if i can get the data out i can do this outside of where it currently sits. Any help is welcome as this is driving me nuts! many thanks!! :D Test stuff
tagged with: javascript
has comment: http://stackoverflow.com/comment/43041159
has comment: http://stackoverflow.com/comment/43008608
tagged with: papaparse

http://stackoverflow.com/comment/42829534
score: 0
has text: Think facundofarias missed the word "not"as in "I think you should NOT do these calculations on the browser" , That's a very good point facundofarias.
comment on: http://stackoverflow.com/q/27166712
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27243025
has body: Check whether getting data is null or not. before printing data into table cell put condition for verification whether fetch data is valid or not or not null, null value add space in cell. Example code:- while(rs.next()) { %> <%= (rs.getString(1) !='')?rs.getString(1):"-" %> <%= (rs.getString(2) !='')?rs.getString(2):"-" %> <% } Your code :- write only following code <%-- Document : queryview Created on : Nov 16, 2014, 7:15:09 PM Author : user --%> <%@page import="querywork.getObject"%> <%@page import="java.sql.ResultSet"%> <%@page import="java.sql.DatabaseMetaData"%> <%@page import="querywork.Query"%> <%@page import="querywork.Parser"%> <%@page import="gudusoft.gsqlparser.EDbVendor"%> <%@page import="querywork.gettablecolumns"%> <%@page import="java.sql.PreparedStatement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%@page import="querywork.DBConnection"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <% String responseText = new String(""); boolean flg = false; String query1 = (String) request.getParameter("query"); String[] colname=new String[100]; EDbVendor dbVendor = EDbVendor.dbvmysql; try { getObject g = new getObject(dbVendor); Parser parser1 = new Parser(); Parser.Node parsedNode1 = parser1.parse(query1); g.setSqltext(query1); System.out.println(query1); String table = g.run(); String[] splitstring = table.split("Columns:"); String newval = splitstring[1].replaceAll("\\([^\\)]*\\)", ""); String[] inputSplitNewLine = newval.split("\\\n"); int i1=0; String[] firstval = splitstring[0].split("\\\n"); Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/", "root", ""); DatabaseMetaData dbmd = conn.getMetaData(); responseText= " "; for(int p=0;p<inputSplitNewLine.length;p++) { String col=inputSplitNewLine[p]; responseText=responseText+" "+col+" "; } responseText=" "; ResultSet ctlgs = dbmd.getCatalogs(); for (int i = 1; i < firstval.length; i++) { while (ctlgs.next()) { String dbname = ctlgs.getStri…
answers question: http://stackoverflow.com/q/27242182
has comment: http://stackoverflow.com/comment/42969679
score: 0
type: Answer

http://stackoverflow.com/comment/123155701
has text: Would `nodes = [...nodes, ...node]` also leave the elements in place, so would keep memory consumption O(1) without using the slightly obscure `apply` syntax? (Appreciate this answer was written long before we got `...` - just curious whether I understand this properly.)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27282907

http://stackoverflow.com/comment/42893102
comment on: http://stackoverflow.com/a/27205209
score: 0
type: AnswerComment
has text: I thing something like this
type: Comment

http://stackoverflow.com/a/27255268
has body: It is due to your model name and/or controller action name (Request and request). These are kind of reserved words in Rails.
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27254947
answers question: http://stackoverflow.com/q/27254947
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/42933265
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27227987
has text: I can't see tabs1 click function you're trying with....

http://stackoverflow.com/comment/43025197
has text: No, it means you just need to read up on the basicas of javascript. See my answer to get you going on this one
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27278000

http://stackoverflow.com/a/27199610
type: Answer
answers question: http://stackoverflow.com/q/27192043
has body: Conceptually the arguments object is an array but the type of arguments is object (not array) and the array functions (like slice) are not defined in the prototype of the arguments object. There are many helper method in underscore that fixes this issue i.e provides utility functions that work on both array and argument objects. The comment purpose in saying that this is useful for arguments object is based on this unification of array and arguments object in underscore js.
score: 0

http://stackoverflow.com/q/27239601
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42999665
type: Question
score: 1
has comment: http://stackoverflow.com/comment/43026688
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42958561
favorite count: 0
has comment: http://stackoverflow.com/comment/42958964
has body: Not sure why I can't update the data element in DTM. I'm trying to add a listener and update the "custom link name" whenever an element with the HTML5 custom attribute exists and is clicked. I haven't had any luck and don't know what I'm doing wrong? function addEvent(el, ev, fn, uc) { if (el.addEventListener) { el.addEventListener(ev, fn, uc); } else if (el.attachEvent) { // IE8- el.attachEvent('on'+ev, fn); } } addEvent(document, 'click', function(e) { e = e || window.event; var target = e.target || e.srcElement; var customLinkName = target.getAttribute("data-analytics-tracking-name"); if(customLinkName){ //return customLinkName; _satellite.setVar("custom link name", customLinkName); } }, false); When ever I check the value of the data element I get the default value that was set in the UI. Any idea how I make the data element update every time a qualifying element is clicked? this code runs as custom script for the data element in DTM, it is not being run as an event.
tagged with: adobe
has title: Issues setting DTM Data Element by either returning value or setting data element directly
answer count: 0
tagged with: adobe-analytics

http://stackoverflow.com/a/27238060
has comment: http://stackoverflow.com/comment/43069809
has comment: http://stackoverflow.com/comment/45400787
accepted answer of: http://stackoverflow.com/q/27221187
answers question: http://stackoverflow.com/q/27221187
score: 6
type: Answer
downvote count: 0
has body: In 0.9.1, the uid will be returned with the promise. For example: var FIREBASEURL = "https://&lt;my-firebase&gt;.firebaseio.com" var ref = new Firebase(FIREBASEURL); $rootScope.authObj = $firebaseAuth(ref); var newUser = { email: "email@email.com", password: "password", displayName: "Display Name", favFood: "Food" }; $rootScope.authObj.$createUser(newUser.email, newUser.password).then(function(authData) { console.log(authData.uid); //should log new uid. return createProfile(newUser, authData); }); function createProfile(authData, user){ var profileRef = $firebase(ref.child('profile')); return profileRef.$set(authData.uid, user); }; That should get you going. The key is to pass the returned promise (authData in my example) to the follow-on function. In 0.9.0, it is necessary to call an authentication method in order to obtain the user's uid.
has comment: http://stackoverflow.com/comment/63252091
type: AcceptedAnswer
upvote count: 6

http://stackoverflow.com/comment/43117306
has text: @TJ OK. I added an answer
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27305559
type: QuestionComment

http://stackoverflow.com/q/27258348
has title: Multiple click binding on element only executes one in knockout.js?
score: 2
has answer: http://stackoverflow.com/a/27258670
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/42990345
accepted answer: http://stackoverflow.com/a/27258670
tagged with: knockout.js
type: Question
has body: I have a dropdown menu which when clicked, should both open a modal dialog and close the dropdown menu. I have stored this functionality within two separate functions, like so: self.toggleDropdownVisibility = function () { self.showDropdown(!self.showDropdown()); }; // and self.toggleModalVisibility = function () { self.showModal(!self.showModal()); }; With my HTML being: &lt;li data-value="manage" data-bind="click: toggleModalVisibility, click: toggleDropdownVisibility"&gt; The problem is however, when I use this syntax, only the first function is executed (in this case, toggleModalVisibility), and if I reverse the order, toggleDropdownVisibility is called. How can I bind two click events to a single element and have them both execute?
tagged with: javascript
linked to: http://stackoverflow.com/q/9761457
downvote count: 0
has comment: http://stackoverflow.com/comment/42990370
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42961333
type: AnswerComment
comment on: http://stackoverflow.com/a/27230052
score: 0
type: Comment
has text: @Leo Can you please explain what you did. i am kind of newbie here.

http://stackoverflow.com/q/27272852
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
score: 0
has answer: http://stackoverflow.com/a/27434076
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: I have a search page on a rails app. The Search controller fetches the spaces based on a query in the model, and returns them as json. I'm using $.getJSON in a view to fetch them: Search Controller: respond_to :html, :js def index @spaces = Space.find_spaces(params) end Space model def self.find_spaces(params = {}) params ||= {} spaces = Space.all spaces = spaces.near(params[:location], 10) if params[:location].present? # spaces = space.where("name LIKE ? ", params[:name]) if params[:name].present? spaces = spaces.where("description LIKE %?%" , params[:description]) if params[:description].present? spaces end Script (views/search/index.html.erb) $( document ).ready(function() { $( "#search_form" ).submit(function() { // clear out current results first $('#spaces').empty(); // fetch all results $.getJSON( "/search.json", $('#search_form').serialize()) .done(function( data ) { $.each(data, function(key, space) { $('#spaces').append("&lt;h1&gt;" + space.name + "&lt;/h1&gt;&lt;p&gt;" + space.description + "&lt;/p&gt;"); }); }); }).trigger('submit'); //this is to submit on page load if coming from home page }); This is all working fine, and I can access the JSON object, and display it in the view using jquery, and it all updates without refresh as expected, with the right results based on the form/query. My question is regarding working with the Json data in the view. Am I doing this right? Seems a bit silly, as now I can't use any Rails helpers (for instance link helpers) in my view, as it's just javascript/json object. I don't want to end up appending a horrible mess of html with object ids etc to create links. Is there a proper/better way I should be doing this? I've read through the docs and a few other tutorials, but nowhere really (at all) describes the best way of working with returned Json in a view. Should I be using partials? .js.erb files? Magic? Thanks for any enlightenment!
accepted answer: http://stackoverflow.com/a/27434076
has title: Json object in Rails view
tagged with: ruby-on-rails

http://stackoverflow.com/comment/42963839
type: QuestionComment
score: 1
has text: I think the django framework uses the dollar `$` sign for something else rather then jQuery. Therefore you need to create a container around your jQuery functions where you assign the jQuery to the dollar sign only for the code inside the container
type: Comment
comment on: http://stackoverflow.com/q/27244227

http://stackoverflow.com/comment/42811236
score: 0
has text: Thanks I appreciate I'm actually not sure if my problem is with the file extension but I will work on it. Thanks for thinking of me. :-)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27155677

http://stackoverflow.com/comment/42870326
comment on: http://stackoverflow.com/q/27191494
has text: Referring to your html code there's no ` class="mywidgets"`???
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42807648
comment on: http://stackoverflow.com/q/27156754
score: 1
type: Comment
type: QuestionComment
has text: Try http://jsperf.com And yep both samples looks the same.

http://stackoverflow.com/q/27167765
upvote count: 3
tagged with: sails.js
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has body: In SailsJS, I would like to validate request parameters using the same mechanism as when models are validated when model actions are performed. So when you define a model you use the "attributes" option to specify your parameter properties, and they are then used for validation. But what if you'd like to validate say a login form or email form on the server side, thus there is no model needed for it and you'd just like to validate the parameters? So I'd like to be able to do something like this: //login validation req.validate({ email: { required: true, email: true }, password: { required: true } }); //send email validation req.validate({ subject: { required: true, type: 'string' }, to: { required: true, type: 'string' }, body: { required: true, type: 'string' } }); A function req.validate is mixed in for all requests and called if req.options.usage is set for the request, I've played with that a bit but I don't quite understand what it's doing. There is no documentation on this nor in "anchor" which is what's used for the validation. Any help or suggestions on how I could achieve this (preferably with some undocumented SailsJS feature)?
tagged with: validation
score: 3
has answer: http://stackoverflow.com/a/29455615
favorite count: 0
type: Question
answer count: 2
has title: Validate request parameters in SailsJS
has answer: http://stackoverflow.com/a/27667318

http://stackoverflow.com/q/27261993
tagged with: javascript
has comment: http://stackoverflow.com/comment/42996813
has comment: http://stackoverflow.com/comment/42997791
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27262352
has comment: http://stackoverflow.com/comment/42996984
tagged with: twitter-bootstrap
has title: Javascript Column Hover
score: 0
has body: I am stuck in a bit of a situation here and it would be great if someone could help me. Recently I created a package page for a client and included a JS hover effect so that I could hover over elements all together using different columns in Bootstrap. Now this is probably simple, but where I am stuck is the short space between columns, I am giving an example image .. The JS: var classes = ["el1", "el2", "el3", "el4", "el5", "el6", "el7", "el8", "el9","el10","el11","el12", "el13","el14","el15","el16","el17","el18","el19","el20","el21","el22", "el23", "el24","el25" ]; //list of your classes var elms = {}; var n = {}, nclasses = classes.length; function changeColor(classname, color) { var curN = n[classname]; for(var i = 0; i &lt; curN; i ++) { elms[classname][i].style.backgroundColor = color; } } for(var k = 0; k &lt; nclasses; k ++) { var curClass = classes[k]; elms[curClass] = document.getElementsByClassName(curClass); n[curClass] = elms[curClass].length; var curN = n[curClass]; for(var i = 0; i &lt; curN; i ++) { elms[curClass][i].onmouseover = function() { changeColor(this.className, "#dbdbdb"); }; elms[curClass][i].onmouseout = function() { changeColor(this.className, "transparent"); }; } }; The HTML: &lt;div id="packagecontent" class="container-fluid" style="display: block;"&gt; &lt;div class="row"&gt; &lt;div class="clearfix"&gt;&lt;/div&gt; &lt;div class="col-xs-4 col-md-4" id="pkg-main-col"&gt; &lt;div class="row pkg-inner"&gt; &lt;div class="header-image wp-image-404 size-full" style="visibility: hidden;"&gt;&lt;/div&gt; &lt;div class="pkg-pricing"&gt; &lt;h5&gt;PRICING&lt;/h5&gt; &lt;ul class="package-cat" style="text-align:left;"&gt; &lt;li class="el1"&gt;Monthly Pricing (Billed Annually)&lt;/li&gt; &lt;li class="el2"&gt;Monthly Pricing (Billed Monthly)&lt;/li&gt; &lt;li class="el3"&gt;Products&lt;/li&gt; &lt;li class="el4"&gt;Competitors&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="pkg-competitor-comparison"&gt; &lt;h5&gt;COMPETIROR COMPARISON&lt;/…
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42997055
has comment: http://stackoverflow.com/comment/42996952

http://stackoverflow.com/comment/75942568
comment on: http://stackoverflow.com/a/43692921
score: 0
type: AnswerComment
has text: obviously it is the easiest way i found to get complete path of selected node
type: Comment

http://stackoverflow.com/comment/77898724
type: Comment
type: QuestionComment
has text: @btzr - Definitely not impossible! I actually link to a solution in the question, and it doesn't need any server-side components at all (all sites involved can be 100% static, just using client-side JS). However, the solution I linked requires an extra HTML page (loaded in iFrame) to act as a proxy, and I was wondering if there's a more elegant solution.
score: 2
comment on: http://stackoverflow.com/q/27234528

http://stackoverflow.com/a/27288941
type: Answer
answers question: http://stackoverflow.com/q/27285623
score: 0
has body: I think you need to show some code as mentioned, as a base I would probably do something like this, changing the selector as required. s.selectAll('group').forEach( function( el ) { el.dbclick( myDoubleClickFunc ) } ); function myDoubleClickFunc() { this.animate(....) };

http://stackoverflow.com/q/27230543
upvote count: 2
has comment: http://stackoverflow.com/comment/42938334
has answer: http://stackoverflow.com/a/27230665
type: Question
has body: I'm trying to toggle a chevron-icon, but nothing happen. $("span:last").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); If I added this code below slidetoggle without if else section, then the icon change to up but not to down again . &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt; &lt;/script&gt; //starting jquery &lt;script&gt; $("#header").ready(function(){ $("#logo").hide(); $("#header").click(function(){ $("#logo").slideToggle("slow"); }); $("#down").click(function() { var $changeicon= $("down"); if ($changeicon .hasclass("glyphicon-chevron-down")) { $changeicon.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); } else { $changeicon.removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down"); } }); }); &lt;/script&gt; &lt;body&gt; &lt;button type ="button" class ="btn btn-success btn-lg" id ="header"&gt; &lt;span class ="glyphicon glyphicon-home pull-left"&gt; &lt;strong&gt;Header&lt;/strong&gt; &lt;/span&gt;&lt;span class ="glyphicon glyphicon-chevron-down pull-right btn-small" id ="down"&gt; &lt;/span&gt;&lt;/button&gt; &lt;div class ="row"&gt; &lt;div class ="col-lg-12" &gt; &lt;p id ="logo" style="background-color:#D9D9D9;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;Logo&lt;/a&gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;Skype&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;
tagged with: javascript
has comment: http://stackoverflow.com/comment/42938854
has comment: http://stackoverflow.com/comment/42938981
answer count: 2
accepted answer: http://stackoverflow.com/a/27230665
has answer: http://stackoverflow.com/a/27230582
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42938844
favorite count: 0
possible better answer: http://stackoverflow.com/a/27230582
has comment: http://stackoverflow.com/comment/42938497
has comment: http://stackoverflow.com/comment/42938042
has comment: http://stackoverflow.com/comment/42939172
score: 2
type: AnsweredQuestion
has title: Chevron icon is not going to downward after going up

http://stackoverflow.com/q/27254799
score: 1
tagged with: javascript
tagged with: date
type: Question
accepted answer: http://stackoverflow.com/a/27868691
answer count: 1
downvote count: 0
favorite count: 0
has body: I am using the following code to get difference between two dates in hrs, minutes and seconds, which I will save later in database as a string field. So I was wondering if it is possible to use Moment.js library or any Javascript functionally in order to get the total number of hours, minutes and seconds for all date differences saved in the database (ex. 02:24:33 + 03:12:20 + 12:33:33) as one final HH:MM:SS taking in consideration that the HH could exceed 24 if the total number of hours summed exceeded 24? Thanks $('.set-start-time').on("dp.change",function (e) { $('.set-end-time').data("DateTimePicker").setMinDate(e.date); }); $('.set-end-time').on("dp.change",function (e) { $('.set-start-time').data("DateTimePicker").setMaxDate(e.date); var now = $('.set-start-time').data('DateTimePicker').getDate().toLocaleString(); var then = $('.set-end-time').data('DateTimePicker').getDate().toLocaleString(); console.log(moment.utc(moment(then,"DD/MM/YYYY HH:mm:ss").diff(moment(now,"DD/MM/YYYY HH:mm:ss"))).format("HH:mm:ss")); //Output here come in format ex. 02:42:33 });
tagged with: momentjs
has title: Moment.js adding difference between multiple dates
upvote count: 1
has answer: http://stackoverflow.com/a/27868691
type: AnsweredQuestion

http://stackoverflow.com/comment/42877336
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27195833
has text: Okay, correction: "Barely" the final code... So, is it possible somehow? Probably you have your preferences how you like to edit your code. I just simply don't like how Jade simplifies to a "skeleton in a desert" the code. But I DO like when I can do this with Stylus in CSS.

http://stackoverflow.com/comment/42942318
type: QuestionComment
score: 1
has text: Also 1. can't create complex webapps relying on server side rendering only 2. pushing work to the client makes servers cheaper 3. proper use of good client side frameworks makes development easier 4. screw fads, use what works for your situ, save the rest for when they are needed. Done and done.
type: Comment
comment on: http://stackoverflow.com/q/27162387

http://stackoverflow.com/q/27205741
tagged with: javascript
tagged with: module
has answer: http://stackoverflow.com/a/27207840
favorite count: 0
upvote count: 2
type: UnansweredQuestion
downvote count: 1
tagged with: typescript
has title: Typescript equivalent to JS Module pattern
has body: I'm using the JS Module pattern (as described in this post), and I have code that looks like this: Foo = (function($, ko) { //Constructor for Foo var Foo = function () { //Uses $ and ko }; return Foo; })($, ko) I want to convert this pattern to a TypeScript equivalent, but I'm not sure what that would be. Do I replace the whole IIFE with this? class Foo { constructor() { //Uses $ and ko } } That seems roughly equivalent, but then it loses the explicit injection of my dependencies. Is this the way to do this in TypeScript?
has answer: http://stackoverflow.com/a/27264419
score: 1
type: Question
answer count: 2

http://stackoverflow.com/comment/42853628
has text: Simple Unsafe Name Example
comment on: http://stackoverflow.com/q/27182645
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43035739
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27283709
has text: is this coffeescript?

http://stackoverflow.com/q/27287779
has comment: http://stackoverflow.com/comment/43063807
type: Question
tagged with: primefaces
has comment: http://stackoverflow.com/comment/43046732
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43073943
favorite count: 0
has title: How to find the source file of the javascript
has answer: http://stackoverflow.com/a/27309166
type: UnansweredQuestion
tagged with: jsf
score: 1
upvote count: 1
has body: I'm using Primefaces 5.1. When I load my web page, go into the Firefox debugger and look into the javascript, I see that it has loaded some javascript (Primefaces.js.jsf to be precise) which is part of Primefaces 5.0 version. Now, I have taken care to delete all the references of 5.0. But still I get the same result. So, my question is- when a web page is loaded, and we see the javascript files loaded, how do we know where a particular script file is being retrieved from? P.S: I'm not the one who wrote the code to include this js. it is part of the framework. So, I have no control over where it is being accessed from. All I can do is if I know the path of the file, I can modify it to suit my needs. I have deleted the history/cache/Temporary files and also loaded the page using Ctrl + F5. Didnt help.

http://stackoverflow.com/q/27246291
has answer: http://stackoverflow.com/a/27246472
tagged with: http://stackoverflow.com/tag/html
has title: Javascript anchor to same page not working
has body: So I have a webpage where instead of using a new html document (It's for phones so loading a new html page each time makes it really slow) for each page I have sections which represents the different pages. It looks like this: So each section I create has it's own id. Now when i try to link to it using: function callback_listAllPOI(xmlObj){ console.log("callback_listAllPOI"); var names = xmlObj.getElementsByTagName("POI_namn"); var comments = xmlObj.getElementsByTagName("POI_kommentar"); for (i=0;i<names.length; i++){ var text = ' ' + names[i].textContent + ': ' + comments[i].textContent + ' '; $("#deployPOIList").append(text); } }; I can add 'li' items to the targeted 'ol' and add the text and everything but the href doesn't work. When it is pressed it just adds #page-1 at the end of my url instead of just going to the anchor on the page. I've tried creating an a tag with document.createElement('a') but it gives the same result. Edit: I can create a link tag statically to the webpage where the anchor works, it's only the anchor with javascript that doesn't work. This one works just like it should: Page 1 Edit 2: Tried both but didn't make a difference for me. Since I had to be done with it yesterday to be on schedule I had to make a decision so I changed to PhP and got it working that way. Thanks for your answers though and hopefully they will help someone with a similar problem!
type: UnansweredQuestion
tagged with: anchor
tagged with: href
tagged with: javascript
type: Question
score: 0
has answer: http://stackoverflow.com/a/27246857
answer count: 2

http://stackoverflow.com/comment/42960903
type: AnswerComment
type: Comment
has text: or `===` (which gets recommended a lot) http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons?rq=1
score: 1
comment on: http://stackoverflow.com/a/27242432

http://stackoverflow.com/comment/133716611
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27266550
type: Comment
has text: `const arr = [1, 2, '22',[1,33,44,['ddd'], 5678], 'abbb', 'ccc', 1234];` `const flat = String(arr).split(',').map((elm)=> {` `return !isNaN(elm) ? Number(elm) : elm` `})` `console.log(flat)`

http://stackoverflow.com/a/27177002
has body: Maybe this is what your looking for: function Square(length){ this.sideLength = length; } Square.prototype.calcPerimeter = function() { return this.sideLength * 4; }; Square.prototype.calcArea = function() { return this.sideLength * this.sideLength ; }; var square = new Square(5); console.log(square.calcPerimeter()); console.log(square.calcArea());
upvote count: 1
answers question: http://stackoverflow.com/q/27176625
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27176625
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42843011
has comment: http://stackoverflow.com/comment/42843023
score: 1

http://stackoverflow.com/comment/43063425
type: AnswerComment
has text: Thanks, I have tried to get it running without luck. The thing is mystats is a separate JS file, so am not able to control that global from my HTML.
type: Comment
comment on: http://stackoverflow.com/a/27299012
score: 0

http://stackoverflow.com/comment/42998919
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27262215
type: AnswerComment
has text: This is exactly what I needed. For some odd reason I thought those were two different properties. The idea, though, is to allow for multiple buttons, so I'm assuming that would be done like this? `[{text: "Yes", func: function() {/*some operation*/}, close: true}, {text: "No", func: function() {/*some operation*/}, close: false}]`

http://stackoverflow.com/q/27278649
has answer: http://stackoverflow.com/a/27278687
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/23799296
tagged with: onmouseover
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27278687
tagged with: mouseevent
type: AnsweredQuestion
has title: CSS Style manipulation : Javascript not Working
type: Question
possible better answer: http://stackoverflow.com/a/27278734
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27278734
tagged with: css
has body: i Was trying to make a simple button which changes colour on mouse over using JavaScript and its not working so,help please.... html: BUTTON PRESS ME JavaScript: var Button = document.getElementById('Button'); Button.onmouseover(function(){ this.style.backgroundColor = 'rgba(0,255,0,0.3)'; }); CSS: #Button{ width: 120px; height : 30px; position: fixed; top: 100px; left:300px; border: 1px solid black; background-color : rgba(0,0,255,0.3); font-size : 25px; }

http://stackoverflow.com/a/27250917
accepted answer of: http://stackoverflow.com/q/27250504
has comment: http://stackoverflow.com/comment/42977855
answers question: http://stackoverflow.com/q/27250504
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42976938
has body: I think, you want to open file-uploader on image button click! Right? If so, you can use pure javascript / jQuery as following: HTML: For jQuery append this to head of your document: Wrap following code in head too. JQuery: $(document).ready(function(){ $('#clickButton').on('click', function(){ $('#fileSelector').click(); }); }); OR Javascript: function openFileUpload(){ document.getElementById('fileSelector').click(); } http://jsfiddle.net/mas5qr1o/1/ See demo here: jQuery DEMO Javascript DEMO
type: Answer
has comment: http://stackoverflow.com/comment/42976698
has comment: http://stackoverflow.com/comment/43000754
score: 0
has comment: http://stackoverflow.com/comment/42976978
has comment: http://stackoverflow.com/comment/42977081
has comment: http://stackoverflow.com/comment/42976620
has comment: http://stackoverflow.com/comment/42976053
has comment: http://stackoverflow.com/comment/42977060
has comment: http://stackoverflow.com/comment/42977196

http://stackoverflow.com/q/27277322
answer count: 1
has title: Event handler in jquery flot legend
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27277813
has comment: http://stackoverflow.com/comment/43023832
tagged with: http://stackoverflow.com/tag/html
tagged with: web
upvote count: 2
type: UnansweredQuestion
has body: I'm plotting an arbitrary number of data sets with plot jquery. The legend of the plot is dynamically generated, because I have no information about how many datasets will be a priori. What I want is that whenever the user click the label of one of the series, its graph gets highlighted. I found that reordering the datasets' array will do the job. The problem is when the user clicks the legend. My code for the legend is: legend: { noColumns: 0, labelFormatter: function(label, series){ var lab = '&lt;a href="#" style="color:black" id="'+label.split('/')[1]+'"&gt;' + label.split('/')[0] + '&lt;/a&gt;'; return lab; }, backgroundColor: "#000", backgroundOpacity: 0.9, labelBoxBorderColor: "#000000", position: "nw" }, I've tried to set a handler inside the labelFormatter function, but this doesn't work. Also I've tried to set a class for each label and access them outside the outer function, but it doesn't work either. In short, I don't know how to access to the label, nor when or where to put the event handler. Could you help me please?
score: 2
type: Question
has comment: http://stackoverflow.com/comment/43023946
tagged with: flot

http://stackoverflow.com/comment/43061243
type: QuestionComment
comment on: http://stackoverflow.com/q/27297309
score: 0
has text: Do you have a complete, minimal setup you can provide that duplicates the issue? Or at least provide the data logged to the console? If the data is getting to busboy and the data is formatted correctly, there shouldn't be any problem getting `field` events from busboy.
type: Comment

http://stackoverflow.com/comment/42982910
score: 1
type: QuestionComment
has text: This is a pure HTML/JS or is there a roundtrip to a server ? I ask this, because you have probably a French locale and that might interfere with ,/.
type: Comment
comment on: http://stackoverflow.com/q/27254386

http://stackoverflow.com/q/27293708
tagged with: scope
has body: I have a form like this &lt;ng-form name="investorQuestionaireForm" ng-show="user &amp;&amp; user.investorType"&gt; &lt;input type="radio" required name="recesso" ng-model="investorQuestionaire.recesso" ng-change="investorQuestionaireValidation('recesso', investorQuestionaireForm)"/&gt; &lt;input type="radio" required name="recesso" ng-model="investorQuestionaire.recesso" ng-change="investorQuestionaireValidation('recesso', investorQuestionaireForm)"/&gt; &lt;/ng-form&gt; This form is inside a directive: angular.module('crowdcoreApp').directive('investorForm',function(){ templateUrl: 'views/template/equity_investor_form.html', restrict: 'E', scope: { project: '=project' }, }); The problem I'm facing is that when I click on the radio button, the value of investorQuestionaire.recesso is not updated, the ng-changefunction is not triggered and most of all the radio button, still result as pristine (both in the html class and in the directive scope). I think that there are some problems with the data binding... Any suggestion on the possible fault of this behavior?
has title: Angular form inside directive with isolated scope
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27294597
tagged with: angularjs
tagged with: binding
type: Question
score: 0
has answer: http://stackoverflow.com/a/27294597
answer count: 1
tagged with: angularjs-directive
tagged with: javascript

http://stackoverflow.com/q/27295393
type: AnsweredQuestion
has body: I want to group the words starting with character $ from the text area content . This is the editor content. Example paragrraph: Hi $firstname, Please find the company credentials mentioned below: Employee Name: Employee ID: Employee username: $username Email ID: $email Password: $password Regards, Administration Team My Code: $pattern = '/([$])\w+/'; preg_match($pattern, $input, $matches); print_r($matches); Output is : Array ( [0] =&gt; $firstname [1] =&gt; $ ) I need the output to be: Array ( [0] =&gt; $firstname [1] =&gt; $username [2]=&gt;$email [3]=&gt;$password ) What am I doing wrong?
accepted answer: http://stackoverflow.com/a/27295457
possible better answer: http://stackoverflow.com/a/27295452
type: Question
answer count: 2
has title: Extracting the words starting with $ in the string in php
has answer: http://stackoverflow.com/a/27295452
has answer: http://stackoverflow.com/a/27295457
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43055494
tagged with: mysqli
has comment: http://stackoverflow.com/comment/43055451
has comment: http://stackoverflow.com/comment/43055524
tagged with: php

http://stackoverflow.com/comment/43042581
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27287824
has text: if you can make fiddle it will be very helpful
score: 0

http://stackoverflow.com/comment/42876752
score: 0
type: QuestionComment
has text: change url on submit instead of input
comment on: http://stackoverflow.com/q/27195868
type: Comment

http://stackoverflow.com/comment/43031262
has text: Just show a custom spinner on the page and leave the browser spinner alone :-)
comment on: http://stackoverflow.com/q/27202748
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/27258819
has comment: http://stackoverflow.com/comment/42991381
score: 1
has body: By default &lt;button&gt; elements does not submit the form. Use &lt;input type='submit'&gt; instead.
upvote count: 1
has comment: http://stackoverflow.com/comment/42991326
has comment: http://stackoverflow.com/comment/42991220
answers question: http://stackoverflow.com/q/27258767
downvote count: 0
has comment: http://stackoverflow.com/comment/42991073
has comment: http://stackoverflow.com/comment/42991033
type: Answer
has comment: http://stackoverflow.com/comment/42992113

http://stackoverflow.com/a/29797036
has body: Add tinymce.suffix = '.min'; before invoking tinymce.init()
has comment: http://stackoverflow.com/comment/118836359
upvote count: 23
type: Answer
downvote count: 0
score: 23
answers question: http://stackoverflow.com/q/27273591

http://stackoverflow.com/a/27311158
score: 0
has comment: http://stackoverflow.com/comment/43084500
has body: I understand you want a dropdown in which you cannot select any option? Then just disable the options individually using ... Example: http://jsfiddle.net/mwvdlee/d5w51ut3/ 1 2 3 4
answers question: http://stackoverflow.com/q/27310920
has comment: http://stackoverflow.com/comment/43089322
type: Answer
has comment: http://stackoverflow.com/comment/43095193

http://stackoverflow.com/comment/42911198
type: QuestionComment
comment on: http://stackoverflow.com/q/27214274
has text: You may use $scope.myForm.$setDirty(); to achieve this behavior.
score: 0
type: Comment

http://stackoverflow.com/comment/43016967
score: 0
type: Comment
type: QuestionComment
has text: Do you need the `newValue` parameter or just want to get notified?
comment on: http://stackoverflow.com/q/27273587

http://stackoverflow.com/comment/43043871
comment on: http://stackoverflow.com/a/27284047
score: 0
type: AnswerComment
type: Comment
has text: Nice one. But make sure it works with _fixed_ elements like toolbars. Fixed elements lose their position when transition is applied to their parent/wrapping div.

http://stackoverflow.com/q/27252598
score: 0
has body: So im making my first Wordpress theme from scratch everything is going fine but now i got a problem. I want a Slider on the homepage but one thing is wrong. Im setting the width of the image to 100% !important but it doesnt go 100% width. It makes the image wider but not 100%. Example is here: http://bit.ly/11OuEBg You see the image doesnt contain the whole width. But you can see the background-color. Really weird, im using Meteor slides. I hope someone can help me out :D
has comment: http://stackoverflow.com/comment/42979523
has title: Wordpress slider, not displayed 100% width
has comment: http://stackoverflow.com/comment/42979495
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: UnansweredQuestion
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/42979430
tagged with: javascript

http://stackoverflow.com/a/27202268
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27202201
score: 1
answers question: http://stackoverflow.com/q/27202201
has body: You have 2 errors in your code: 1. custom function should return obj; 2. there's no reason to have new custom in var j = new custom(new Object()); This is the working version of your code: function custom(obj) { obj.name = "johnson"; return obj; } var j = custom(new Object()); console.log(j.name)
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/27245082
tagged with: jquery
has body: I want to add a javascript value to my php query. The code goes like this &lt;script&gt; $(document).on('click', '.dropdown-menu li a', function() { var categoryName = $(this).html(); &lt;?php $one = mysqli_query($con, "SELECT id FROM tb_category WHERE category_name = '?' "); ?&gt; }) &lt;/script&gt; I want to put the value of categoryName to the query which I made in php. How will I do it.
has comment: http://stackoverflow.com/comment/42965333
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27245206
has answer: http://stackoverflow.com/a/27245149
has answer: http://stackoverflow.com/a/27245412
has answer: http://stackoverflow.com/a/27245177
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/27245204
tagged with: javascript
has title: How can I pass a javascript value to php?
score: 0
linked to: http://stackoverflow.com/q/60174
tagged with: sql

http://stackoverflow.com/a/27240598
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42957940
has comment: http://stackoverflow.com/comment/42957627
accepted answer of: http://stackoverflow.com/q/27240557
answers question: http://stackoverflow.com/q/27240557
has body: The usual way you do this is with a builder function: var someArg = "Hello"; elem1.onclick = buildHandler(someArg); someArg = "Bye"; elem2.onclick = buildHandler(someArg); function buildHandler(arg) { return function() { foo(arg); };; } ...or with Function#bind: var someArg = "Hello"; elem1.onclick = foo.bind(null, someArg); someArg = "Bye"; elem2.onclick = foo.bind(null, someArg); Either way, what you're doing is creating a new function that, when called, calls foo with the value you pass it. The reason your original code doesn't work is that the functions close over the variable someArg, not its value as of when they're created. So since they use the value when they're called, you don't get the value you want. Both of the solutions above (in different ways), create functions that close over something taking the value as of when the function is created instead.

http://stackoverflow.com/comment/75449902
type: Comment
score: 1
has text: Note - if size for canvas isn't specified it will default to 300 x 150. Use something like canvas.width = img.width; and canvas.height = img.height; after image.onload and before drawing image, to avoid the image size being set to default. Using CSS to set the dimensions won't work. See response by @k3N [link](https://stackoverflow.com/questions/17764012/image-being-clipped-when-copied-to-html-canvas-using-drawimage)
type: AnswerComment
comment on: http://stackoverflow.com/a/33227005

http://stackoverflow.com/comment/42921315
comment on: http://stackoverflow.com/a/27215793
type: Comment
score: 0
type: AnswerComment
has text: @sundar: yes, don't forget that the dot doesn't match newlines by default. To change this behavior you need to use the dotall mode.

http://stackoverflow.com/q/27177842
tagged with: jquery-draggable
accepted answer: http://stackoverflow.com/a/27178004
has body: Hello guys i found this amazing drag and drop and resize image and i am trying to add a custom modification. I added an upload button so user can upload a photo. i added the function bellow to find the last img id, create a new one and replace the latest id and img source. The user's photo uploading well but it's not draggable and resizable like other objects. Official projects link is: http://tympanus.net/Tutorials/ImageVampUp/ The code that i added is: &lt;script&gt; $(document).ready(function() { $("input").change(function(e) { for (var i = 0; i &lt; e.originalEvent.srcElement.files.length; i++) { var file = e.originalEvent.srcElement.files[i]; var reader = new FileReader(); reader.onloadend = function() { var newoid = parseInt($("#objects .obj_item:last img").attr("ID").split("_")[1], 10) + 1; var newoimage = reader.result; $("#objects").append("&lt;div class='obj_item' style='width:80px; height:80px; float:left; margin-left:5px; margin-top:5px;'&gt;&lt;img id='"+newoid+"' width='80' height='80' class='ui-widget-content' src='"+newoimage+"' alt='el'/&gt;&lt;/div&gt;"); //$('#obj_25').attr('src', reader.result); } reader.readAsDataURL(file); } }); }); &lt;/script&gt; and inside projects left bar i added a div with an input so user can load the pic: &lt;input type='file' onchange="readURL(this);" /&gt;
has comment: http://stackoverflow.com/comment/42844573
has answer: http://stackoverflow.com/a/27178004
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42844562
tagged with: jquery-ui
tagged with: javascript
has title: Drag and drop and scale images but user's upload pic isn't draggable and resizable
has comment: http://stackoverflow.com/comment/42844701
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/42806592
comment on: http://stackoverflow.com/q/27156129
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/adeneo/gg8gLpg0/1/
score: 2

http://stackoverflow.com/q/27233393
has title: Finding the Value not the Text
has comment: http://stackoverflow.com/comment/42943464
has comment: http://stackoverflow.com/comment/42943461
tagged with: javascript
has comment: http://stackoverflow.com/comment/42943572
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42943482
has body: I have been messing with this for a couple days now and trying different things. What I am working with is a row in a table that has just normal cells and text box cells. These are both initially populated from a database query. then the values in the text boxes are manipulated. What I need is to be able to read them back out and reinsert them into the DB. what I am tyring to use to re-read them is not working could anyone help me out? I know my readTblValues1() Function wont do the insert and stuff, I can figure that out I just need help figuring out how to get the values from the 5 text boxes. Thanks! $rowCount = 1; while($row = mssql_fetch_array($result, MSSQL_ASSOC)){ if ($rowCount%2){ echo " ".$row['Order_Number']." 0 "; }else{ echo " ".$row['Order_Number']." 0 "; } $rowCount++; } function readTblValues1() { var TableData = ''; $('#tbTableValues').val(''); // clear textbox $('#confTable tr').each(function(row, tr){ TableData = TableData + $(tr).find('td:eq(1)').text() + ' ' // So-Numer + $(tr).find('td:eq(6)').val() + ' ' // conf_1 + $(tr).find('td:eq(7)').val() + ' ' // conf0 + $(tr).find('td:eq(8)').val() + ' ' // conf1 + $(tr).find('td:eq(9)').val() + ' ' // conf2 + $(tr).find('td:eq(10)').val() + ' ' // conf3 + $(tr).find('td:eq(11)').text() + ' ' // Total + '\n'; }); $('#tbTableValues').val(TableData); }
downvote count: 0
has answer: http://stackoverflow.com/a/27233522
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/42984044
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27253806
has text: To be fair the 48 hour grace period need not be so strict. As long as there is validation with the users email address at some point. I saw that with Accounts.validateLoginAttempt there is an 'allowed' callback function that returns either true or false. To begin with, can you show me how to set LoginWithEmail. I do not understand what it currently does when the user clicks on the link. +1 for the methodical approach towards the question, thank you Steffo

http://stackoverflow.com/a/27172635
has body: Use this function: isNaN(parseInt(mk1)) It will return "true" if not a number, and "false" if a number
type: Answer
answers question: http://stackoverflow.com/q/27171991
score: 0

http://stackoverflow.com/q/27226204
has body: I've added a pan/zoom element to my force directed graph. It only works when I'm over a node. What I wish to happen is when I click a node, the panning stops so I can move the node. But when on the 'background' so to speak I can move the graph around. Also, I need the ability to zoom in all the time on or off the graph using the mouse wheel but also have a boundary on the zoom ? To get around this would I have to limit the scale in some way ? __________________________________________________Fixed Ive sorted it by calling the redraw() elsewhere. I have my 'SVG' then i have my 'inner' ontop of that. So i call the redraw on the SVG and now it works only when im off the nodes, which is alot better than only working on the nodes. I think this is due to when i call it in the 'inner', as my 'inner' is just the graph the mouse position isn't being recognised as being in the 'inner'. So when i move it to the layer behind it, the 'SVG' it works fine as my SVG is a 'canvas' where everything is in. So the mouse position now interacts with the SVG, thus calling the 'redraw'. Am i correct in saying this ?
has title: How do I stop panning when moving a node ? Limit zooming too ? D3
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42941671
type: Question
has answer: http://stackoverflow.com/a/27233363
tagged with: javascript
has comment: http://stackoverflow.com/comment/42930490
score: 0
answer count: 1

http://stackoverflow.com/a/27297331
has comment: http://stackoverflow.com/comment/43058948
has body: The particular variable alone will not be carry forwarded. The whole scope will be carry forwarded when a closure is created. In this case foo and bar and whatever variables present in that scope will be available in inner function.
score: 1
answers question: http://stackoverflow.com/q/27297286
downvote count: 0
has comment: http://stackoverflow.com/comment/43059055
has comment: http://stackoverflow.com/comment/43059097
type: Answer
has comment: http://stackoverflow.com/comment/43058968
upvote count: 1
has comment: http://stackoverflow.com/comment/43062831

http://stackoverflow.com/q/27190779
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/27190854
possible better answer: http://stackoverflow.com/a/27190876
has answer: http://stackoverflow.com/a/27190835
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27190913
has comment: http://stackoverflow.com/comment/42867623
type: Question
score: 0
has title: Javascript Function activates before button is clicked
has body: If requirements are met when you click the button it will display a count down timer. Problem is it displays the countdown timer BEFORE you even click the button. I'm not sure what I'm overlooking. &lt;input id="upgrade" type="button" value="Upgrade" onclick="timer();" /&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;p id="countdown_timer"&gt;&lt;/p&gt; &lt;script&gt; function display_timer(){ document.getElementById("countdown_timer").innerHTML = "&lt;span id='countdown' class='timer'&gt;&lt;/span&gt;"; } &lt;/script&gt; &lt;script&gt; var currently_upgrading = 0; var current_ore = 398; var current_crystal = 398; var upgradeTime = 172801; var seconds = upgradeTime; function timer() { if(currently_upgrading == 1){alert('You are already upgrading a module.');return;} if(current_ore &lt;= 299){alert('You need more ore.');return;} if(current_crystal &lt;= 299){alert('You need more crystal.');return;} display_timer(); var days = Math.floor(seconds/24/60/60); var hoursLeft = Math.floor((seconds) - (days*86400)); var hours = Math.floor(hoursLeft/3600); var minutesLeft = Math.floor((hoursLeft) - (hours*3600)); var minutes = Math.floor(minutesLeft/60); var remainingSeconds = seconds % 60; if (remainingSeconds &lt; 10) { remainingSeconds = "0" + remainingSeconds; } document.getElementById('countdown').innerHTML = days + ":" + hours + ":" + minutes + ":" + remainingSeconds; if (seconds == 0) { clearInterval(countdownTimer); document.getElementById('countdown').innerHTML = "Completed"; } else { seconds--; } } var countdownTimer = setInterval('timer()', 1000); &lt;/script&gt;
tagged with: function
has answer: http://stackoverflow.com/a/27190913
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27190876

http://stackoverflow.com/a/27288841
has body: You need to check path to restangular.js. Also include jquery.js before angular.js.
has comment: http://stackoverflow.com/comment/43044389
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27288669
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27288669
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/42963877
has text: Well not sure how is he modifying the dom.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27244286

http://stackoverflow.com/comment/42865838
has text: I think you need to expand the example to show what it is you want exactly
comment on: http://stackoverflow.com/q/27189777
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42852175
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27181724
has text: Ran the trace, if I comment out the $.post line no error if I leave it in it errors with TypeError: Can only call NodeList.item on instances of NodeList. As I stated earlier if hard code 1234 for example in $.post('updatecolor.php', { 'color': '1234' }); it works fine if that helps.
score: 0

http://stackoverflow.com/a/27312153
has body: Are you writing this script on the same page as the div element or does this lies in an external page? If on external page then try checking if the control even passes to this page or not by simply putting an alert box or not. If this script is on the same page, then make sure you write this script after the element you defined as if you have written this on the top or before the #message div then the script would run before it even gets loaded on page and you would not see any difference.
type: Answer
has comment: http://stackoverflow.com/comment/43084849
score: 0
answers question: http://stackoverflow.com/q/27311956

http://stackoverflow.com/comment/42970710
type: AnswerComment
has text: But i need to use the options values is my code.Such as if i want to use optionone value in my plugin code??
type: Comment
comment on: http://stackoverflow.com/a/27247081
score: 0

http://stackoverflow.com/comment/42980012
type: Comment
type: QuestionComment
has text: Is the element loaded via AJAX, or just in the DOM normally?
comment on: http://stackoverflow.com/q/27252989
score: 0

http://stackoverflow.com/q/27229678
tagged with: extjs
has answer: http://stackoverflow.com/a/27229777
type: UnansweredQuestion
type: Question
has body: I'm looking for the time spinner control implementation (as it shown on the attached image) based on ExtJS classes. Is there any like this?
has title: ExtJS-based time spinner control
tagged with: javascript
score: 0
answer count: 1
tagged with: deftjs

http://stackoverflow.com/comment/42802412
has text: Can you post the collection data?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27153917
score: 0

http://stackoverflow.com/q/27250221
downvote count: 0
has body: content is extracted from javascript function where enhanceddetails is declared and fetch in node type.I want condition when enhancedetails is nt selected and its returns null.. so its row will disappear. XSL file &lt;xsl:when test="selecteddata/essentialaddons[enhanceddetails!='']"&gt; &lt;fo:table-row background-color="white"&gt; &lt;xsl:for-each select="selecteddata/enhancedaddons/enhanceddetails"&gt; &lt;fo:table-cell border="1pt solid #cccccc"&gt; &lt;xsl:for-each select="enhancedname"&gt; &lt;fo:block text-align="justify" margin="10pt" font-family="sans-serif"&gt; &lt;fo:inline padding-right="7pt" padding-left="10pt"&gt; &lt;fo:character character="&amp;#x2022;"/&gt; &lt;/fo:inline&gt; &lt;xsl:value-of select="." /&gt; &lt;/fo:block&gt; &lt;/xsl:for-each&gt; &lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell border="1pt solid #cccccc" padding-before="10%"&gt; &lt;fo:block text-align="center" margin="5pt" font-family="sans-serif"&gt; Fixed Fee &lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell border="1pt solid #cccccc" padding-before="7%"&gt; &lt;fo:block text-align="center" margin="5pt" font-family="sans-serif"&gt; &lt;xsl:value-of select="enhancedcost" /&gt; &lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;/xsl:for-each&gt; &lt;/fo:table-row&gt;
favorite count: 0
has comment: http://stackoverflow.com/comment/42981382
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43010530
has comment: http://stackoverflow.com/comment/43012138
answer count: 0
score: 1
has title: How to hide and show table rows in XSL file according to the string returning null or not from JS file
upvote count: 1
tagged with: xslt
type: Question
has comment: http://stackoverflow.com/comment/43011462
tagged with: if-statement
tagged with: javascript
has comment: http://stackoverflow.com/comment/43012077
tagged with: when-js
has comment: http://stackoverflow.com/comment/43011933

http://stackoverflow.com/comment/42928589
type: QuestionComment
type: Comment
has text: _I have a div_.....where? i guess you meant to say input type text...;)
comment on: http://stackoverflow.com/q/27225254
score: 0

http://stackoverflow.com/q/27153632
has answer: http://stackoverflow.com/a/39678291
has body: I'm using the Soundcloud API for streaming and it's working beautifully on desktop but not on mobile (only testing iphone and ipad at this point). The problem appears to be when I attempt to use the streaming SDK. Using the snippet below which comes straight from the Soundcloud docs is not even working on mobile. https://developers.soundcloud.com/docs/api/sdks#streaming SC.stream("/tracks/293", function(sound){ sound.play(); }); If I console.log the sound variable, I get false, instead of the Soundcloud stream object I would expect. SC.stream("/tracks/293", function(sound){ console.log(sound); // false }); Getting a track using SC.get isn't a problem as I'm getting an object returned so Soundcloud is properly initialized. Any help on this would be hugely appreciated. Thanks!
upvote count: 4
has comment: http://stackoverflow.com/comment/52402524
downvote count: 0
has comment: http://stackoverflow.com/comment/42898392
has comment: http://stackoverflow.com/comment/42941908
type: Question
tagged with: soundcloud
tagged with: mobile
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/46213432
has comment: http://stackoverflow.com/comment/50102922
has title: Soundcloud API SC.stream not working on mobile
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27189644
accepted answer: http://stackoverflow.com/a/27226143
has title: Hiding points in HighCharts on click
has answer: http://stackoverflow.com/a/27226143
type: AnsweredQuestion
has body: I got a HighChart with several 2 series. Now I want certain points in series 1 to be disabled when I click a link. This is my code so far: $('.remove').click(function () { var chart = $('#plot').highcharts(), series = chart.series[0]; if (series.data.length) { chart.series[0].data[0].remove(); } }); The problem is, that after removing this point, [0] changes to another value and after clicking it again, it goes on and on with deleting. I just want the points to disappear, this is possible with visible: visible Since 1.2.0 Read only. The series' visibility state as set by series.show(), series.hide(), or the initial configuration. But I just don't manage to implement it the right way in my onClick event.
possible better answer: http://stackoverflow.com/a/27189901
type: Question
answer count: 2
tagged with: highcharts
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27189901

http://stackoverflow.com/a/27204195
has comment: http://stackoverflow.com/comment/42956465
has comment: http://stackoverflow.com/comment/42990703
has body: Right, I finally got around to trying it out and it all runs well for me. To make sure we don't have any differences in environments take a look at the fiddle I made and let me know if it works for you as expected or if there's any other problems you need help with: JSFiddle of original code Small changes: commented out the api_messagebox(mats) as it's undefined. added lots of log statements so check out the web console. Edit I fixed the color problem by using THree.js' Color object as follows: var color = new THREE.Color("rgb(0,0,255)"); But you may be doing this somewhere as the GET_RGBA function you are calling seems to be missing from the code you gave me. As to making it wiremesh, I checked the Lambert object and it definitely had wiremesh = 1 set. Make sure that the wire var you're passing is actually set to true, I set it explicitly in this updated fiddle
type: Answer
has comment: http://stackoverflow.com/comment/42992795
has comment: http://stackoverflow.com/comment/42989974
has comment: http://stackoverflow.com/comment/42920613
has comment: http://stackoverflow.com/comment/42956292
answers question: http://stackoverflow.com/q/27192719
score: 0

http://stackoverflow.com/q/27294396
has answer: http://stackoverflow.com/a/27294707
tagged with: javascript
has title: Div Show Hide With Effect
linked to: http://stackoverflow.com/q/3508605
score: 0
has comment: http://stackoverflow.com/comment/43053600
tagged with: css
has answer: http://stackoverflow.com/a/27294661
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27295263
has answer: http://stackoverflow.com/a/27294767
has answer: http://stackoverflow.com/a/27294724
has comment: http://stackoverflow.com/comment/43053654
type: Question
has body: I have hiding a div with the simple query. I want add a effect when hiding the div. here is my code &lt;script type="text/javascript"&gt; function divcustumfldshow() { var dive = document.getElementById("divcustumfld"); dive.style.display = (dive.style.display == "none") ? "block" : "none"; } &lt;script&gt;

http://stackoverflow.com/comment/43201935
type: AnswerComment
type: Comment
has text: You are genius. :) Thanks a lot, 104 characters was the key to resolve my problem, I removed them using `str = str.slice(104);` and now photos are visible. THANKS!
comment on: http://stackoverflow.com/a/27299806
score: 0

http://stackoverflow.com/q/27156483
type: Question
has answer: http://stackoverflow.com/a/27156532
accepted answer: http://stackoverflow.com/a/27156532
tagged with: javascript
has title: Changing image src on hover
tagged with: image
has answer: http://stackoverflow.com/a/27156529
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42807158
linked to: http://stackoverflow.com/q/18032220
has comment: http://stackoverflow.com/comment/42807156
has body: I have a quick question that should be so simple. I have a table that has 4 columns and in each one I have an Tag which in turn contains an &lt;img&gt;. I am looking for a way in either css or javascript that I can change the img's src when I mouseover. So for example, just one of the rows would look like so: &lt;td&gt;&lt;a href="http://link1/"&gt;&lt;img alt="Link1" src="http://images/Link1.png/" /&gt;&lt;/a&gt;&lt;/td&gt; and the CSS that I have at present is: img[alt="Link1"]:hover { content:url("http://Link1Pressed.png"); } Now this works beautifully as it should do in chrome but in Firefox and IE it simply does nothing on the mouseover, what could I do to rectify this? Is there a better way of doing this for the 40 buttons that I have especially as the names are all conventional. IE, the link is a lowercase version of the alt which is the same as the pre .png bit of the image src which in turn is the same as the hover over img src but for the fact that the hover over img src has Pressed too. Your help would be mightily appreciated. Thanks
has comment: http://stackoverflow.com/comment/42808198
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/27156529
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/18032220

http://stackoverflow.com/comment/43041385
has text: Code isn't even using `stringIndex`
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27287204

http://stackoverflow.com/comment/42854442
has text: Thanks that removed the error but it refreshed my whole page. I'm actually using bootstrap form wizard and I want to remain at the specific tab and just reload the page without refreshing the whole thing.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27183468

http://stackoverflow.com/a/27162128
has comment: http://stackoverflow.com/comment/42820469
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27161167
has body: The issue in this case is a confusion between the various selection methods. If you look on page 6 when 'horror' is selected, you should see "Lost Girl" -- the horror movie. Basically, the $scope.filteredItems is the list of items selected by the filter field. If you type "Lost" into that field while "horror" is the genre, it will seem to work. That is because, when nothing is typed into the "filter" field, you are searching all the items. Then, when you find an item on (say) page 6 -- it gets added to the $scope.pagedItems array as an item on page 6. In order for this function to work, you need to modify the $scope.filteredItems list to only select elements that are in the selected genre and meet the filter criterion.
downvote count: 0
score: 1

http://stackoverflow.com/a/27241028
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27240951
has body: How can you append data to textarea? Append method should be used with container tags like div, span, ul, ol. Use .val() to set new data in textarea. If you want to append something than append it to parent of your #myData textarea. It will serve your purpose.

http://stackoverflow.com/q/27313217
type: Question
has comment: http://stackoverflow.com/comment/43088959
answer count: 2
tagged with: css
has answer: http://stackoverflow.com/a/27313850
tagged with: twitter-bootstrap-3
accepted answer: http://stackoverflow.com/a/27355135
has comment: http://stackoverflow.com/comment/43086855
score: 0
has body: I'm working on a website but I'm struggling to get my Bootstrap carousel to work properly. On normal screens it works great, but whenever I look at the website on a mobile device (or shrink the page on my desktop) the carousel is adjusting itself to be responsive. However, this causes my carousel to shrink to sizes where the carousel is displayed, but only has around 5 pixels in height making it look really strange. You can find my test website here to see it yourself, is there any way how I can fix this issue by either: Removing the carousel completely whenever the height is below 100px; Adjusting the carousel to only shrink horizontally or at least not shrink this much; Thanks in advance!
has title: Disable carousel in Bootstrap 3 auto resize on Mobile devices (Height)
possible better answer: http://stackoverflow.com/a/27313850
has comment: http://stackoverflow.com/comment/43086932
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27355135
tagged with: carousel

http://stackoverflow.com/a/33117222
accepted answer of: http://stackoverflow.com/q/27165952
answers question: http://stackoverflow.com/q/27165952
score: 0
type: AcceptedAnswer
type: Answer
has body: The simplest way I found to render templates directly to HTML is by using the gulp-consolidate plugin as per the following example: var gulp = require('gulp'); var consolidate = require('gulp-consolidate'); gulp.task('html', function() { gulp.src('templates/**/*.html') .pipe(consolidate('handlebars', {msg:'This is a message!'})) .pipe(gulp.dest('www')); }); Keep in mind that the handlebars library would also need to be installed for this example to work.

http://stackoverflow.com/a/27470069
has body: This is because event.key is a valid property in Firefox. Pass your key-string around functions as an argument or use another property name
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27166634
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43471852

http://stackoverflow.com/q/27167911
has comment: http://stackoverflow.com/comment/42827493
has comment: http://stackoverflow.com/comment/42827456
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: i want to access a dom element through CSS Path inside the iframe. following is the direct CSS Path: var dompath = "html body div div div div div div div ul li a:contains('Parks')"; $(dompath).click(); the above line is working fine if i am opening the page without iframe. I want to open the same page inside the iframe and want to trigger click on the above element from outside the iframe. i have tried in this way, but its not working. $('#scaled_frame').contents().(domPath).click(); how can i perform the click action from outside. Best Regards,
has answer: http://stackoverflow.com/a/27167984
answer count: 1
accepted answer: http://stackoverflow.com/a/27167984
tagged with: iframe
has title: access an element through CSS Path from outside of iframe
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/583753
type: Question

http://stackoverflow.com/q/27236437
has comment: http://stackoverflow.com/comment/42951078
favorite count: 0
has answer: http://stackoverflow.com/a/27237530
possible better answer: http://stackoverflow.com/a/28085303
upvote count: 8
has comment: http://stackoverflow.com/comment/42951487
has comment: http://stackoverflow.com/comment/42957040
has comment: http://stackoverflow.com/comment/42951320
tagged with: gulp
has comment: http://stackoverflow.com/comment/42950985
has body: Is there a way to set the working directory for Gulp within a gulpfile, so that I can run a gulp command from a subdirectory without running into any issues? I ran a search for this and didn't find what I was looking for. To clarify, I'm aware of adding a prefix to the files I'm using. However, instead of this - var gulp = require('gulp'); var jshint = require('gulp-jshint'); ... var paths = { js: [__dirname + 'app/*/*.js', __dirname + '!app/lib/**'], css: __dirname + 'app/*/*.styl', img: __dirname + 'app/img/*', index: __dirname + '*.html', dist: __dirname + 'dist' }; I'd like to do something like this: var gulp = require('gulp'); var jshint = require('gulp-jshint'); ... gulp.cwd(__dirname); // This would be much easier to understand, and would make future edits a bit safer. var paths = { js: ['app/*/*.js', '!app/lib/**'], css: 'app/*/*.styl', img: 'app/img/*', index: '*.html', dist: 'dist' }; I'm wondering if Gulp exposes this functionality. Perhaps node itself allows this. (I realize that there is likely a way to do command line itself when I run the command, but I would like to include it in the gulp file, especially for distribution purposes. I want the working directory for gulp to match the directory in which the gulpfile resides.) Thanks!
downvote count: 1
accepted answer: http://stackoverflow.com/a/27237530
has title: Set working directory in gulpfile.js?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8131344
score: 7
has comment: http://stackoverflow.com/comment/42960150
has comment: http://stackoverflow.com/comment/42951212
has comment: http://stackoverflow.com/comment/42950089
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28085303
tagged with: javascript

http://stackoverflow.com/comment/80680612
score: 1
has text: Did you ever figure this out?
type: Comment
comment on: http://stackoverflow.com/q/27274485
type: QuestionComment

http://stackoverflow.com/comment/43065490
type: QuestionComment
score: 0
has text: Just an aside: this has nothing to do with JSON; you're dealing with JavaScript objects, not textual notation that describes objects. (If your question dealt with parsing JSON text into objects, then the `[json]` tag would be appropriate.)
type: Comment
comment on: http://stackoverflow.com/q/27300863

http://stackoverflow.com/comment/43058337
type: Comment
has text: I have updated my answer with example how to execute multiple statements in a transaction using async.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27236053

http://stackoverflow.com/q/27271967
has answer: http://stackoverflow.com/a/27272438
tagged with: javascript
tagged with: jquery
answer count: 3
has title: JQuery Custom LightBox - Opacity Fade
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am building my own jQuery light box but am running into a small issue. The html page has 6 images on it and when one is clicked an overlay is displayed over the whole page with the image in the center. The issue I am running into is that the animation that controls the light box displaying is not smooth, it produces a sort of outwards in effect and I would like it to all be effected as one. The animation to fade it out works perfectly though, so I am not sure what I am missing ? Here is a jsFiddle: http://jsfiddle.net/hqsapk5a/ My HTML: x My jQuery: $(document).ready( function() { $('.image-thumb').click( function() { var image = $(this).attr('src'); $('#light-box-image').attr('src', image); $('.light-box').css('opacity', '0').fadeTo(100, 1, function() { $('.light-box').css('z-index', '2'); }); }); $('.light-box-close').click( function(e) { event.preventDefault(e); $('.light-box').css('opacity', '1').fadeTo(100, 0, function() { $('.light-box').css('z-index', '0'); }); }); }); My CSS: .page-wrapper { height: 100%; position: absolute; width: 100%; z-index: 1; } .grid { width: 600px; height: 552px; position: absolute; bottom: 0; left: 0; top: 0; right: 0; text-align: center; margin: auto; background-color: #DFDFDF; border: 2px solid #999; border-radius: 5px; padding: 20px 0px; } .image-thumb-wrapper { width: 228px; display: inline-block; margin: 5px; } .image-thumb:hover { cursor: pointer; } .light-box { position: fixed; height: 100%; width: 100%; top: 0; left: 0; z-index: 0; } .light-box-overlay { position: absolute; top: 0; left: 0; background-color: #000; height: 100%; width: 100%; opacity: 0.8; } img#light-box-image { z-index: 10; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; border: 2px solid #fff; background-color: #999; padding: 25px; border-radius: 5px; } .light-box { opacity: 0; } a.light-box-close { color: #fff; font-size: 1.2em; position: absolute; text-decoration: none; right: 10px; top: 5px; } a.light-box-close:hover { text-deco…
accepted answer: http://stackoverflow.com/a/27272338
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27272332
type: Question
has answer: http://stackoverflow.com/a/27272338
score: 0
has answer: http://stackoverflow.com/a/27272332

file
type: Tag
tags question: http://stackoverflow.com/q/27169780
tag name: file
tags question: http://stackoverflow.com/q/27219557
tags question: http://stackoverflow.com/q/27168958
tags question: http://stackoverflow.com/q/27264519
tags question: http://stackoverflow.com/q/27179788
tags question: http://stackoverflow.com/q/27299194

http://stackoverflow.com/comment/42968654
type: AnswerComment
type: Comment
score: 0
has text: Kindly help me in this question i have to send the data in a query string .Please help me
comment on: http://stackoverflow.com/a/27245048

http://stackoverflow.com/comment/42872268
score: 0
type: AnswerComment
type: Comment
has text: You used `name: 'id', index: 'Id'` which is suspected. Probably the name of `id` is `Id` in the source data?
comment on: http://stackoverflow.com/a/27193148

http://stackoverflow.com/a/27245769
upvote count: 4
answers question: http://stackoverflow.com/q/27244896
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27244896
type: Answer
has body: I create an object(objVal) and using .map() combine with .get() add an array with the selected values to that object(object key is the name of each select): $('#add').on("click", function() { var objVal = {}; $('select').each(function() { var arr = $(':selected', this).map(function() { return this.value; }).get(); objVal[$(this).attr("name")] = arr; }); console.log(objVal); }); A B C D E B D E B D E Result of this example is:
score: 4

video
tags question: http://stackoverflow.com/q/27225421
type: Tag
tags question: http://stackoverflow.com/q/27186964
tags question: http://stackoverflow.com/q/27247771
tags question: http://stackoverflow.com/q/27252660
tags question: http://stackoverflow.com/q/27178510
tags question: http://stackoverflow.com/q/27156462
tags question: http://stackoverflow.com/q/27300241
tags question: http://stackoverflow.com/q/27269291
tags question: http://stackoverflow.com/q/27247228
tags question: http://stackoverflow.com/q/27203863
tags question: http://stackoverflow.com/q/27244497
tags question: http://stackoverflow.com/q/27186585
tags question: http://stackoverflow.com/q/27253797
tags question: http://stackoverflow.com/q/27293773
tags question: http://stackoverflow.com/q/27213269
tag name: video
tags question: http://stackoverflow.com/q/27281065

http://stackoverflow.com/q/27235790
has answer: http://stackoverflow.com/a/27235827
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/130961495
has comment: http://stackoverflow.com/comment/42948889
possible better answer: http://stackoverflow.com/a/27235851
score: 1
has answer: http://stackoverflow.com/a/27235851
upvote count: 1
tagged with: coffeescript
accepted answer: http://stackoverflow.com/a/27235827
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42948766
tagged with: javascript
has title: Delete div after ajax success
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42948795
downvote count: 0
has body: I have a simple script that should delete a div after the ajax call is success: $ -&gt; $('body').on 'click', '.add-comment', (event) -&gt; event.preventDefault() body = $('#body_comment') target = event.target $.ajax method: 'POST' url: '/comments/create' data: body: body success: (data) -&gt; target.remove() error: (data) -&gt; # nothing here If I do: console.log(target) In the success block, it show the correct html div, but nothing happens when I do target.remove() or target.hide() Where I wrong ? PS: I've tried also to use $(target).remove() , without success.. new code: $('body').on 'click', '.add-comment', (event) -&gt; event.preventDefault() body = $('#body_comment') target = event.target $.ajax method: 'POST' url: '/comments/create' data: body: body success: (data) -&gt; $(target).remove() error: (data) -&gt; # nothing here PPS: OK I've found that was a conflict with another mine script...sorry guys!
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/42941212
has text: Are you serving your JSON file from a web server? If not, if you have python installed go to the folder where your data.json file exists and write `python -m SimpleHTTPServer`, then go to your browser and point it to http://127.0.0.1:8000/data.json and voila.
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27232214

http://stackoverflow.com/a/27166640
accepted answer of: http://stackoverflow.com/q/27166579
type: AcceptedAnswer
downvote count: 0
has body: Make the first .+ (which was inside the capturing group) as non-greedy by adding the reluctant quantifier ? next to + ^(.+?) ((?:BBB )?CCC)$ DEMO &gt; /^(.+?) ((?:BBB )?CCC)$/.exec('AAA BBB CCC'); [ 'AAA BBB CCC', 'AAA', 'BBB CCC', index: 0, input: 'AAA BBB CCC' ]
type: Answer
score: 3
answers question: http://stackoverflow.com/q/27166579
upvote count: 3

http://stackoverflow.com/a/27201169
has body: I think the issue is because you're accessing the the dragged element inside drop handler from a variable that you're setting in draggables start event, which in turn you're setting back to null in it's stop handler. You don't need to do this, you can access the dropped elements from the drop event callbacks arguments. Also, you don't need to change the CSS of droppable from the start, stop callbacks of draggable, you can use the activate and deactivate options of droppable itself. The code for your draggable - droppable interaction should be something along the following lines: $(document).ready(function () { /* Define drag and drop zones */ var $drop = $('#canvas-drop-area,#canvas-drop-area1'), $gallery = $('td &gt; #image-list li'), $draggedImage=null; /* Define the draggable properties */ $gallery.draggable({ helper: 'clone', start: function (e) { $drop.css('display','block') }, stop: function () { $(this).find('img').css({ /* 'opacity': 0.4 */ }); }, revert: true }); /* Define the events for droppable properties */ $drop.droppable({ over: function (event, ui) { $(this).addClass('active'); }, drop: function (event, ui) { var image = ui.draggable.find("img").get(0); img_to_canvas(image, image.alt,$(event.target).is("#canvas-drop-area")?1:2); }, out: function (event, ui) { $(this).removeClass('active'); }, deactivate: function (event, ui) { $(this).removeClass('active').css("display","none"); } }); });
has comment: http://stackoverflow.com/comment/42886074
has comment: http://stackoverflow.com/comment/42886053
score: 0
answers question: http://stackoverflow.com/q/27200945
type: Answer
has comment: http://stackoverflow.com/comment/42887217
has comment: http://stackoverflow.com/comment/42886037
has comment: http://stackoverflow.com/comment/42885956

http://stackoverflow.com/q/27292643
has body: it is simple question,i'm getting error from js library such as ...js:2:1 unknown. Is that mean that the problem came from this file in line 2 column 1 or?
has title: How to read javascript file error message
has comment: http://stackoverflow.com/comment/43050840
has comment: http://stackoverflow.com/comment/43050645
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43050940
has comment: http://stackoverflow.com/comment/43053557
has comment: http://stackoverflow.com/comment/43050762
answer count: 0
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/27253806
accepted answer of: http://stackoverflow.com/q/27247648
upvote count: 3
has body: I think the basic idea is to have some validation code eg in Accounts.validateLoginAttempt which you want to check every time before user logs in. What you can do is to store the date&amp;time when user signs up in user.profile.joinDate. If a user tries to login Check if the email address has been verified or check if the user is logging within the grace period of 48 hrs isWithinGracePeriod = function(user) { ** TBD returning true or false. This can be tricky when you have multiple instances in different time-zones. ** } and Accounts.validateLoginAttempt(function(attempt){ if (attempt.user &amp;&amp; attempt.user.emails &amp;&amp; !attempt.user.emails[0].verified ) { console.log('No verification action received yet.'); return isWithinGracePeriod(attempt.user); } return true; }); Further, here is the HTML/spacebars stuff: &lt;body&gt; {{ &gt; start }} &lt;/body&gt; &lt;template name="start"&gt; {{#if currentUser}}{{&gt;showUserProfile}}{{else}}{{&gt; login}}{{/if}} &lt;/template&gt; &lt;template name="login"&gt; ## Grab username/password here &lt;/template&gt; If the login template is created, we can try to capture the verification code after the user clicked the verification link. Note that, if no user is logged in, then login will be rendered, so we attach to login via Template.login.created = function() { if (Accounts._verifyEmailToken) { Accounts.verifyEmail(Accounts._verifyEmailToken, function(err) { if (err != null) { if (err.message = 'Verify email link expired [403]') { var message ='Sorry this verification link has expired.'; console.log(message); alertBox = Blaze.renderWithData(Template.Alert, {message: message}, $("body").get(0)); } } else { var message = "Thank you! Your email address has been confirmed."; console.log(message); alertBox = Blaze.renderWithData(Template.Alert, {message: message}, $("body").get(0)); } }); } }; The verification link is send in "hook" to Accounts.createUser: Accounts.onCreateUser(function(options, user) { user.profile = {}; Me…
score: 3
answers question: http://stackoverflow.com/q/27247648
has comment: http://stackoverflow.com/comment/42984044
has comment: http://stackoverflow.com/comment/43007682
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43091718
has comment: http://stackoverflow.com/comment/42987245
type: Answer

http://stackoverflow.com/q/27195500
score: -1
has comment: http://stackoverflow.com/comment/42878692
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27195612
has title: What is "define" in RequireJS?
favorite count: 0
type: UnansweredQuestion
downvote count: 2
tagged with: requirejs
upvote count: 1
has body: What is define in RequireJS? Is it a constructor or a function or...? Create module app. Before create module it loads module app2. After initialize callback: define( 'app', ['app2'], function( app2 ){ console.log(app2) } ); What's this syntax? define(function (require) { var logger = require("./app2"); console.log(logger); }); And this: define({ color: "black", size : "large" });

http://stackoverflow.com/q/27280669
answer count: 2
has body: My javascript code can only load the file when it's in the same directory as the code. The directory is /includes/friend.php it will load the file if my javascript code is in /includes but not anywhere else. Why is this? I have tried ../includes/friend.php but it does the same thing. &lt;script type="text/javascript"&gt; $(document).ready(function(){ refreshTabler(); }); function refreshTabler(){ $('#tableHolder').load('/includes/friend.php', function(){ setTimeout(refreshTabler, 5000); }); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43030130
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27280920
tagged with: php
has comment: http://stackoverflow.com/comment/43030037
has comment: http://stackoverflow.com/comment/43030032
has comment: http://stackoverflow.com/comment/43030024
type: Question
has answer: http://stackoverflow.com/a/27318109
tagged with: javascript
has title: Javascript can't load files from other directories
score: 0

http://stackoverflow.com/comment/59398294
type: Comment
comment on: http://stackoverflow.com/a/35582561
score: 0
type: AnswerComment
has text: Thanks for a nice plugin. One question though, why does it say `Component not found. Ignoring attached event for component object` in your fiddle?

http://stackoverflow.com/comment/42906211
comment on: http://stackoverflow.com/q/27203172
has text: The 3th party server must allow you to get his content due to origin restriction. This server may implement easyXDM or just add the correct header to each requests. If the 3th party server does not implement anything, you may just not include his content. I suggest you to make the test with your own server and ensure you allow CORD, then you may change to a real 3th party server or ask to them if they do not implement it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27220859
has answer: http://stackoverflow.com/a/29815154
tagged with: http://stackoverflow.com/tag/html
has title: record audio from user and save to server
upvote count: 11
linked to: http://stackoverflow.com/q/15014638
linked to: http://stackoverflow.com/q/27213366
answer count: 3
tagged with: php
tagged with: audio
linked to: http://stackoverflow.com/q/16616010
score: 11
has answer: http://stackoverflow.com/a/51305930
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
linked to: http://stackoverflow.com/q/16810450
has answer: http://stackoverflow.com/a/27228544
tagged with: recorder.js
has body: I'm trying to record audio from a website user and save the audio to my server. Many of the posts I have studied so far have referenced Matt Diamond's recorderjs. I attempted to recreate the demo at http://webaudiodemos.appspot.com/AudioRecorder/index.html by opening the source code through my browser. I copied the html, "audiodisplay.js", "recorder.js", and "main.js" and put them on my server. I also added the "recorderWorker.js" file from his GitHub site. In the recorder.js file, I changed var WORKER_PATH = 'js/recorderjs/recorderWorker.js' to var WORKER_PATH = 'recorderWorker.js'; When I run the demo I set up, I'm getting the "would you like to share your microphone.." warning and I can start the recording by pressing the mic icon on the right side. However, when I stop recording, the audio waveform doesn't show up below like in Matt's demo and the save icon doesn't become activated. If I can get the demo up and running, the next problem I have is saving the wav file to the server instead of locally like in the demo. I've found several posts saying to use XMLHttpRequest(), however I can't really figure out how to connect those examples to recorderjs. Saving WAV File Recorded in Chrome to Server HTML5 &amp; getUserMedia - Record Audio &amp; Save to Web Server after Certain Time RecorderJS uploading recorded blob via AJAX
type: Question

http://stackoverflow.com/comment/42810707
score: 0
type: AnswerComment
type: Comment
has text: Glad to hear it. I updated the `CSS` version, but the JavaScript I was working on got way too complicated way too fast.
comment on: http://stackoverflow.com/a/27156293

http://stackoverflow.com/a/27231283
has body: well you missed the most important part in knockout 'applyBindings' . Once you construct your view model you just need to call Step 1: Starting point ko.applyBindings(viewModel) step 2: next view model executes var viewModel = { myMessage: ko.observable() }; Refer knockout documentation http://knockoutjs.com/documentation/introduction.html Sample fiddle to test your scenario Here
has comment: http://stackoverflow.com/comment/42939461
score: 1
upvote count: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42939561
answers question: http://stackoverflow.com/q/27230744
has comment: http://stackoverflow.com/comment/42939520

http://stackoverflow.com/comment/102352962
type: AnswerComment
has text: iOS still does have some issues with click delays on UIWebView.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/48265680

http://stackoverflow.com/comment/42969343
type: AnswerComment
type: Comment
has text: sure, function displayTree () { $( "#putTheTreeInHere" ).append( loop() + loop() ) }, but is more intersting if you parametrize the loop... http://jsfiddle.net/alemarch/3k0x3c4L/2/
score: 0
comment on: http://stackoverflow.com/a/27239385

http://stackoverflow.com/comment/42833971
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27171562
score: 0
has text: Could you give us a fiddle ? : http://jsfiddle.net/

http://stackoverflow.com/a/27202419
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42964239
has comment: http://stackoverflow.com/comment/42968639
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42965972
has comment: http://stackoverflow.com/comment/42966651
has comment: http://stackoverflow.com/comment/42967301
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27201699
has comment: http://stackoverflow.com/comment/42966088
has comment: http://stackoverflow.com/comment/42963112
answers question: http://stackoverflow.com/q/27201699
has comment: http://stackoverflow.com/comment/42964051
has body: Download PHP SDK for Facebook Now create the a folder in application\libarires "facebook" Put the "SRC" folder of PHP SDK Now create a file with FacebookApp.php in that folder and put this code &lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once( APPPATH . 'libraries/facebook/src/facebook.php' ); class FacebookApp extends Facebook { var $ci; var $facebook; var $scope; public function __construct() { $this-&gt;ci =&amp; get_instance(); $this-&gt;facebook = new Facebook(array('appId' =&gt; $this-&gt;ci-&gt;config- &gt;item('app_id'),'secret' =&gt; $this-&gt;ci-&gt;config-&gt;item('app_secret'), 'cookie' =&gt; true)); $this-&gt;scope = 'public_profile'; } public function login_url() { $params = array('scope' =&gt; $this-&gt;scope); return $this-&gt;facebook-&gt;getLoginUrl($params); } public function logout_url() { return $this-&gt;facebook-&gt;getLogoutUrl(array('next' =&gt; base_url() .'logout')); } public function getFbObj(){ return $this-&gt;facebook; } public function get_user() { $data = array(); $data['fb_user'] = $this-&gt;facebook-&gt;getUser(); if ($data['fb_user']) { try { $data['fb_user_profile'] = $this-&gt;facebook-&gt;api('/me'); return $data; } catch (FacebookApiException $e) { $this-&gt;facebook-&gt;destroySession(); $fb_login_url = $this-&gt;facebook-&gt;getLoginUrl(array('scope' =&gt; $this-&gt;scope)); redirect($fb_login_url, 'refresh'); } } } Now in controller load this library $this-&gt;load-&gt;library('facebook/FacebookApp) in Method $obj_fb = new FacebookApp(); $fb_user_data = $obj_fb-&gt;get_user(); $data['fb_login_url'] = $obj_fb-&gt;login_url(); put the fb_login_url in href of login button and now the login will done. Hope it help you.
has comment: http://stackoverflow.com/comment/42968020
type: Answer
has comment: http://stackoverflow.com/comment/42966027
has comment: http://stackoverflow.com/comment/42963211
has comment: http://stackoverflow.com/comment/42963123

http://stackoverflow.com/comment/42962383
comment on: http://stackoverflow.com/q/27243151
type: Comment
type: QuestionComment
has text: Check out my answer and my fiddle http://jsfiddle.net/2xww81m8/
score: 0

http://stackoverflow.com/comment/42959223
type: QuestionComment
type: Comment
has text: Because that is a properly encoded url. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent
score: 1
comment on: http://stackoverflow.com/q/27241326

performance
tags question: http://stackoverflow.com/q/27265534
tags question: http://stackoverflow.com/q/27194070
tags question: http://stackoverflow.com/q/27302242
tags question: http://stackoverflow.com/q/27211653
tags question: http://stackoverflow.com/q/27300475
tags question: http://stackoverflow.com/q/27156754
tags question: http://stackoverflow.com/q/27221839
tags question: http://stackoverflow.com/q/27172443
tags question: http://stackoverflow.com/q/27182295
tags question: http://stackoverflow.com/q/27178153
tags question: http://stackoverflow.com/q/27298526
tags question: http://stackoverflow.com/q/27217242
tags question: http://stackoverflow.com/q/27240268
tags question: http://stackoverflow.com/q/27156976
tags question: http://stackoverflow.com/q/27224844
tags question: http://stackoverflow.com/q/27274257
tags question: http://stackoverflow.com/q/27279488
tags question: http://stackoverflow.com/q/27230930
tags question: http://stackoverflow.com/q/27285635
tags question: http://stackoverflow.com/q/27298558
tags question: http://stackoverflow.com/q/27225606
tag name: performance
tags question: http://stackoverflow.com/q/27162003
type: Tag
tags question: http://stackoverflow.com/q/27244410
tags question: http://stackoverflow.com/q/27294045

http://stackoverflow.com/q/27293877
tagged with: angularjs
type: UnansweredQuestion
has body: I get a json string from an $http request, and I want to use ng-repeat to display the data. As it stands, I get the json string from the server, but ng-repeat is not putting the data on the dom. {% csrf_token %} Search: {({ artist.fields.link })} artApp.controller('mycontroller2', ['$scope', '$http', function($scope, $http){ $scope.submit = function(){ var call = { method: 'POST', url: '/rest/', data: { "artiste": $scope.artiste }, headers: { 'Content-Type': 'application/json', 'X-CSRFTOKEN': "{{ csrf_token }}" } }; $http(call) .success(function(data){ $scope.artists = data; }) } }]); The response data that shows up in devtools is a json string "[{\"fields\": {\"artist\": \"Leonardo da Vinci\", \"link\": \"https://trove2.storage.googleapis.com/leonardo-da-vinci/galloping-rider-and-other-figures.jpg\", \"title\": \"Galloping Rider and other figures\"}, \"model\": \"serve.art\", \"pk\": 63057}, I thought I could just iterate over it with ng-repeat and generate html elements with the data, but it doesn't work right now.
has answer: http://stackoverflow.com/a/27294048
has comment: http://stackoverflow.com/comment/43052897
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/27304081
score: 0
has title: Json string in Angular ng-repeat not working
answer count: 3
has comment: http://stackoverflow.com/comment/43068155
has answer: http://stackoverflow.com/a/27294097

http://stackoverflow.com/a/27283734
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27283103
answers question: http://stackoverflow.com/q/27283103
has body: If I'm understanding the question correctly, given {1: 'foo'} you want the dropdown to show foo in the dropdown, and output 1 when selected. This option would work: ng-options="key as value for (key, value) in countries. key as sets the output to the key element, value for sets value to the dropdown iterator.
score: 0

http://stackoverflow.com/q/27155419
has comment: http://stackoverflow.com/comment/42805579
has comment: http://stackoverflow.com/comment/42805190
favorite count: 0
has answer: http://stackoverflow.com/a/72641707
upvote count: 18
has comment: http://stackoverflow.com/comment/42805295
tagged with: node.js
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/40397601
has comment: http://stackoverflow.com/comment/42807897
has comment: http://stackoverflow.com/comment/43007117
has comment: http://stackoverflow.com/comment/42805188
type: Question
accepted answer: http://stackoverflow.com/a/27193880
score: 18
tagged with: javascript
has answer: http://stackoverflow.com/a/75352120
has answer: http://stackoverflow.com/a/27193880
has answer: http://stackoverflow.com/a/40397601
has body: I try to parse a "iso-8859-1" page and save to my DB with utf-8, this is my code: var buffer = iconv.encode(data, "iso-8859-1"); data = iconv.decode(buffer, 'utf8'); It doesn't work. All symbols like å or ä convert to ï¿½ How can I save these symbols?
has title: Convert iso-8859-1 to utf-8 javascript
downvote count: 0

http://stackoverflow.com/q/27212188
has body: In this function i need show a file with all my assets similar to XAMPP, "I SAY" I want get my file, this file have all my .js .html .css .scss, and show all file in my localhost like a list similar to XAMPP. var http = require('http'); //var assets = require('/assets'); function appServer(request, response){ //get my assets file and show in localhost:8888 } http.createServer(appServer).listen(8888);
type: UnansweredQuestion
tagged with: oracle-database
has answer: http://stackoverflow.com/a/27212658
tagged with: node.js
has comment: http://stackoverflow.com/comment/42905153
tagged with: mysql
has title: require (show rute to my assets) #node
type: Question
tagged with: javascript
score: 0
tagged with: require
has comment: http://stackoverflow.com/comment/42905608
answer count: 1
has comment: http://stackoverflow.com/comment/42905196

http://stackoverflow.com/comment/42839972
type: AnswerComment
comment on: http://stackoverflow.com/a/27172416
type: Comment
has text: @Anu — That part of your post doesn't make sense. You're talking about JSON that is stored locally but you are accessing it remotely using HTTP.
score: 0

http://stackoverflow.com/q/27154637
has comment: http://stackoverflow.com/comment/42803795
score: 0
has comment: http://stackoverflow.com/comment/42803861
tagged with: function
answer count: 1
has comment: http://stackoverflow.com/comment/42803954
has comment: http://stackoverflow.com/comment/42803804
has title: In what order will these functions get executed?
has comment: http://stackoverflow.com/comment/42803719
has comment: http://stackoverflow.com/comment/42803825
has answer: http://stackoverflow.com/a/27154675
has comment: http://stackoverflow.com/comment/42803903
has comment: http://stackoverflow.com/comment/42804200
has comment: http://stackoverflow.com/comment/42804065
has comment: http://stackoverflow.com/comment/42805240
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42803899
has comment: http://stackoverflow.com/comment/42803738
type: Question
has comment: http://stackoverflow.com/comment/42804947
accepted answer: http://stackoverflow.com/a/27154675
has comment: http://stackoverflow.com/comment/42803883
has comment: http://stackoverflow.com/comment/42803787
has comment: http://stackoverflow.com/comment/42803736
tagged with: javascript
has body: I am rewriting a project of mine and this time I decided to use self invoking functions to save a bit of code, but I became very uncertain if this would even work since I don't want the self invoking functions to be run before page has loaded + the init function has been run. The expected execution order I want is this: init: function() { //some code gets executed here createCalendar(2015); } addEventListnrs: (function() { //event listeners gets added here on elements that gets created //in the createCalendar function })() createCalendar: function(year) { //creates elements that the addEventListnrs uses } window.onload = init; Question is, is this what I'm going to get or will the addEventListnrs function invoke itself before init gets run?

http://stackoverflow.com/a/27196755
score: 1
has body: You are not specifying which .checkout-bar li to select. You have to get the index of the .active tab and with this index select the checkount li, I think you shoud do something like this: $(document).ready(function () { $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { activeTabIndex = $('.nav.nav-tabs &gt; li.active ').index(); (".checkout-bar li.active").removeClass('active'); $(".checkout-bar li:eq("+activeTabIndex+")").addClass('active') }); });
upvote count: 1
answers question: http://stackoverflow.com/q/27196066
type: Answer
downvote count: 0

http://stackoverflow.com/a/27281473
answers question: http://stackoverflow.com/q/27281322
has comment: http://stackoverflow.com/comment/43034392
has comment: http://stackoverflow.com/comment/43033779
type: AcceptedAnswer
downvote count: 0
has body: You may need to use evnt.startDate.getTime() === today.getTime()
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43184729
accepted answer of: http://stackoverflow.com/q/27281322

http://stackoverflow.com/q/27193722
has answer: http://stackoverflow.com/a/27196954
has body: I have the following json: { "comments":[ { "id":1, "comment_text":"asdasdadasdsadsadadsa", "author":"adsfasdasdsad", "post_id":1, "ancestry":null, "archived":false, "created_at":"2014-10-16T23:16:44.173Z", "updated_at":"2014-10-16T23:16:44.173Z", "is_moderated":false, "avatar_url":null, "slug":null, "blog_id":2, "children":[ ] }, { "id":2, "comment_text":"idlsfghlskdhvbsldfhjdslifds\nzf\ndsf\nds\nf\ns\nf\ns\nfds\nfsdjghfsdligjhsepfiguhefdliguhefldiughfeliughnfesg\nf\nsg\ns\ng\ns\ndf\nsd\nf\nsdgsofughlefidughls;uhgsuhg.vskjfhglsiuhg.sfv", "author":"asdsdasdad", "post_id":1, "ancestry":null, "archived":false, "created_at":"2014-10-16T23:17:02.270Z", "updated_at":"2014-10-16T23:17:02.270Z", "is_moderated":false, "avatar_url":null, "slug":null, "blog_id":2, "children":[ { "id":3, "comment_text":"fdsfdsfdsfsdfsfsdf", "author":"sdfdsfdsfdsfds", "post_id":1, "ancestry":"2", "archived":false, "created_at":"2014-11-28T17:39:47.059Z", "updated_at":"2014-11-28T17:39:47.059Z", "is_moderated":false, "avatar_url":null, "slug":null, "blog_id":2, "children":[ { "id":4, "comment_text":"fdsfdsfdsdsfdsfds", "author":"sdfsdfdsfsdfdsfds", "post_id":1, "ancestry":"2/3", "archived":false, "created_at":"2014-11-28T17:39:53.049Z", "updated_at":"2014-11-28T17:39:53.049Z", "is_moderated":false, "avatar_url":null, "slug":null, "blog_id":2, "children":[ { "id":5, "comment_text":"sdfdsfdsfdsfdssdfsdfdsfdsfdsfds", "author":"sdfsdfdsfdsfdsf", "post_id":1, "ancestry":"2/3/4", "archived":false, "created_at":"2014-11-28T17:40:02.032Z", "updated_at":"2014-11-28T17:40:02.032Z", "is_moderated":false, "avatar_url":null, "slug":null, "blog_id":2, "children":[ ] } ] } ] } ] } ] } As you can see, some of the comments contain a children: [] of comments. I need to create nested comments in Reactjs based on this key. I was able to do this in a very messy jquery way, but with React I want to move away from jquery and create a pure react base of nested comments. Any one know of any examples, ideas or way of doi…
downvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27193980
has title: Nested comments in Reactjs
possible better answer: http://stackoverflow.com/a/27196954
tagged with: reactjs
answer count: 2
score: 5
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27193980
tagged with: http://stackoverflow.com/tag/html
upvote count: 6

http://stackoverflow.com/comment/42988018
has text: the pattern should be nn.nnn.nnn/nnnn-nn not nn.nnn.nnn./nnnn-nn
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27256654

http://stackoverflow.com/q/27237944
has title: How Do I Turn HTML Text into a Javascript Variable While Removing Line Breaks?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42952581
has body: I have a raw feed of some text within the body tag of an HTML page. I need to run a function on it to turn it into a Javascript string variable. However, there are literal line breaks in the HTML page (which are obviously not permissible in JS strings). Here's an example of the source of the page I'm working with: &lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; BLDG||0|EOR| PLNC||0|EOR| SUBD|Pine Manor|1|EOR| CITY|Fort Myers|1|EOR| &lt;/body&gt; jQuery is permissible. How do I turn this all into a Javascript variable while removing the literal line breaks so that the variables work?
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27237977
accepted answer: http://stackoverflow.com/a/27237977
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: variables
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42952586

http://stackoverflow.com/comment/42832831
has text: Just remove this if: `if(typeof options === 'object'){` - it's a remainder from my original code that performs conditional instantiation. Since we do not supply a valid `options` object, the instance is not created and the data remains empty. Without the if, the code works fine.
type: AnswerComment
comment on: http://stackoverflow.com/a/27170764
score: 0
type: Comment

http://stackoverflow.com/comment/42967727
type: Comment
has text: Thanks once again for your help. This is the exact thing I want to do. But one issue is still there. I'm having one modal pop-up opened which contains the form. You are also showing the rotating image and message in a new modal. For showing this modal I've to close the modal which contains the form. Actually I want to show the modal containing form, show the loader image and message on it and prohibit the user from doing any activity until the response comes. How to achieve this?
type: AnswerComment
comment on: http://stackoverflow.com/a/27233625
score: 0

http://stackoverflow.com/comment/42819899
has text: Tried it already. Didn't work. I think the problem might be how the two plugins add a new class when loading the page but instead of loading the image path it literally loads the {{new.image}} characters as the background of the image. Any other ideas?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27160640

http://stackoverflow.com/a/27304122
has body: function digitVal(elem){ if (!elem.value.match(/\d{2,2}/)){ // if the first two characters are not digits elem.style.background = 'yellow'; // the background changes to yellow } else { elem.style.background = 'white'; // otherwise leave it white } } &lt;input type="text" onkeyup="digitVal(this)" size="40" placeholder="first two characters must be numbers"/&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27303841

http://stackoverflow.com/comment/42858266
has text: @Brewal Sorry that was a typo. Please ignore that line.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27185595

http://stackoverflow.com/a/27232901
answers question: http://stackoverflow.com/q/27231174
type: Answer
has body: Using ParseInt('$variableName') you can achieve your desired result. I hope following will also helpful in your work. Using simple jQuery code you can move things easily as follows: HTML: I AM MOVING jQuery Function: function moveStuff(px) { $('#stuff').animate({ 'marginLeft' : px },1000); } WORKING SOLUTION on JS Bin
score: 0

http://stackoverflow.com/a/27257745
type: Answer
has comment: http://stackoverflow.com/comment/42989521
has body: i think you missed the value for each input: function calculate(obj) { document.getElementById("output").innerHTML = obj.value; } Silver Plan $699 Gold Plan $999 Total
has comment: http://stackoverflow.com/comment/42989995
has comment: http://stackoverflow.com/comment/42989390
has comment: http://stackoverflow.com/comment/42989707
score: 0
answers question: http://stackoverflow.com/q/27257611

http://stackoverflow.com/a/27312756
type: Answer
accepted answer of: http://stackoverflow.com/q/27312644
has comment: http://stackoverflow.com/comment/43087643
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27312644
score: 0
has body: jQuery Note that you can have multiple selectors separated by commas in a query. $(".user-name,.password,.urlcontent,.email,#About,#Careers").hide(); CSS You can also hide the elements by simply using CSS. .user-name, .password, .urlcontent, .email, #About, #Careers { display: none; }
type: AcceptedAnswer

http://stackoverflow.com/q/27165939
tagged with: http://stackoverflow.com/tag/csv
accepted answer: http://stackoverflow.com/a/27166140
tagged with: php
has body: i have some problems with CSV files. I have about 50 csv files, all looks the same like this below. I need to import them into Php array - (later i put them into js var, and use in diagrams) But the CSV dont looks like should do (i cant change it) - It have some data at top (first 10 lines) - i need to use them in different places (just show them - like "Kategoria:";"ROLNICTWO, LEŚNICTWO I ŁOWIECTWO"; - is a title) "Okres sprawozdawczy:";"Dane roczne"; "Kategoria:";"ROLNICTWO, LEŚNICTWO I ŁOWIECTWO"; "Grupa:";"SKUP PRODUKTÓW ROLNYCH"; "Podgrupa:";"Skup produktów na 1 ha użytków rolnych"; "Wymiary:";"Wykaz produktów, Lata"; "Kod";"Jednostka terytorialna";"buraki cukrowe";"buraki cukrowe";"buraki cukrowe";"buraki cukrowe"; "2010";"2011";"2012";"2013"; "[kg]";"[kg]";"[kg]";"[kg]"; "1100000000";" ŁÓDZKIE";"278";"355";"363";"333"; "1140000000";" MAZOWIECKIE";"247";"250";"286";"348"; "2120000000";" MAŁOPOLSKIE";"67";"87";"114";"127"; "2240000000";" ŚLĄSKIE";"168";"218";"245";"281"; "3060000000";" LUBELSKIE";"1139";"1170";"1235";"1346"; "3180000000";" PODKARPACKIE";"249";"208";"342";"404"; "3200000000";" PODLASKIE";"6";"30";"5";"0"; "3260000000";" ŚWIĘTOKRZYSKIE";"479";"482";"337";"534"; "4080000000";" LUBUSKIE";"184";"141";"264";"229"; "4300000000";" WIELKOPOLSKIE";"1102";"1412";"1485";"1532"; "4320000000";" ZACHODNIOPOMORSKIE";"522";"830";"909";"642"; "5020000000";" DOLNOŚLĄSKIE";"1044";"1045";"1274";"1136"; "5160000000";" OPOLSKIE";"1392";"1386";"2113";"1660"; "6040000000";" KUJAWSKO-POMORSKIE";"1588";"2040";"2272";"2252"; "6220000000";" POMORSKIE";"624";"748";"724";"879"; "6280000000";" WARMIŃSKO-MAZURSKIE";"153";"150";"163";"167"; How i can print them as array - to looks like this: [0] =&gt; Array ( [0] Okres sprawozdawczy [1] Dane roczne ) [1] =&gt; Array ( [0] Kategoria [1] ROLNICTWO, LEŚNICTWO I ŁOWIECTWO ) [2] =&gt; Array ( [0] Grupa: [1] SKUP PRODUKTÓW ROLNYCH ) etc. first 5 lines of CSV lines. But later from line 7 (6 is empty) - line 7,8,9 is one header.. "Kod"…
type: AnsweredQuestion
has title: Multiple CSV files to PHP Array -
has comment: http://stackoverflow.com/comment/42823942
type: Question
answer count: 2
tagged with: arrays
possible better answer: http://stackoverflow.com/a/27166174
tagged with: javascript
has answer: http://stackoverflow.com/a/27166140
has answer: http://stackoverflow.com/a/27166174
score: 0
has comment: http://stackoverflow.com/comment/42824146

http://stackoverflow.com/comment/42845689
comment on: http://stackoverflow.com/q/27176135
has text: Please create [a minimal verifiable example](http://stackoverflow.com/help/mcve) instead of posting all surrounding code. As for finding a minimum in a collection with Lo-Dash, have a look at [_.sortBy()](https://lodash.com/docs#sortBy).
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/51526453
type: Comment
comment on: http://stackoverflow.com/q/27233491
score: 0
type: QuestionComment
has text: getInitialState should not be used with es6 code. Instead, set your initial state in the constructor, `constructor(props) { super(props); this.state = {message: 'Hello!'} }`

http://stackoverflow.com/a/27226937
has comment: http://stackoverflow.com/comment/42931449
type: Answer
has comment: http://stackoverflow.com/comment/42931529
has comment: http://stackoverflow.com/comment/42931371
downvote count: 3
answers question: http://stackoverflow.com/q/27226888
upvote count: 2
has body: take the first character with myvar[0] and compare with the other two characters var firstchar = myvar[0]; //or myvar.charAt(0) for ie7 and older support if ( firstchar === '0' || firstchar === '+' ) { // do stuff myvar = myvar.replace( firstchar, 'X' ); // where X is the new character }
score: -1
has comment: http://stackoverflow.com/comment/42931810

http://stackoverflow.com/a/27188704
has body: Do not forget that margin may overlap one another. maybe the margin-bottom that you see isn't because of your div. Please inspect the element (Right click -> Inspect Element) and go to "Box Model" or "Layout" tab to see there the real margin of this specific div. A code sample will really help us (use http://jsbin.com or something similar)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27188438

http://stackoverflow.com/q/27162810
has answer: http://stackoverflow.com/a/27162943
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27162943
tagged with: javascript
has body: I have a &lt;navbar&gt; html tag I use to assign my CSS navbar styles to my page. It works when not in a Meteor development environment but Meteor does not seem to understand custom tags. I will probably end up switching over to a div container instead but I was curious if Meteor can read them. &lt;navbar&gt; &lt;img class="just-another-image" src="/img/vector-logos-for-the-win.svg"&gt;&lt;/img&gt; &lt;div class="more-navbar-stuff"&gt;&lt;/div&gt; &lt;/navbar&gt; And Meteor returned something like this error: While Building the application: client/index.html:123: Expected "navbar" end tag .../vector-logos-for-the-win.svg"&gt;&lt;/img&gt; &lt;div class="mor... ^ Does Meteor support these tags and I am just doing something wrong or do I have to use divs? I do close the navbar tag at the end of my navbar and this is obviously an example. My real navbar contains much more content and it is possible that an unbalanced tag is causing the error.
tagged with: http://stackoverflow.com/tag/html
tagged with: meteor
has title: Meteor Custom HTML tags not recognised
tagged with: css
possible better answer: http://stackoverflow.com/a/27163175
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42818686
has answer: http://stackoverflow.com/a/27163175
score: 0
has comment: http://stackoverflow.com/comment/42818705

http://stackoverflow.com/a/27268842
score: 0
type: Answer
has body: Thanks to Vladimirs direction, the issue, was solved by using observable arrays. I added a a uploadDocument function to the existing viewModel uploadDocument: function (documentList) { if (documentList != null) { _uploadButtonDisable(true) // start spinner var target = document.getElementById('uploadMessage'); var spinner = new Spinner().spin(target); //show spinner $(target).val("").show(); $("#uploadDocumentForm").ajaxSubmit({ type: "POST", success: function (data) { $.each(data, function (index, file) { // insert new datafile row to the table documentList.push(file); spinner.stop(spinner); $("#uploadMessage").text('@TranslationService.Read("SSP_Common_Success_Text", "SSP", languageCode)').fadeIn(1000, "linear", function () { $(this).delay(2000).fadeOut("slow", function () { $(this).text(""); }); }); _uploadButtonDisable(false) }) }, error: function () { spinner.stop(spinner); $("#uploadMessage").text('@TranslationService.Read("SSP_Server_Error_UI_Text", "SSP", languageCode)').fadeIn(1000, "linear", function () { $(this).delay(2000).fadeOut("slow", function () { $(this).text(""); }); }); _uploadButtonDisable(false) //input.replaceWith(input.val('').clone(true)); } }); var input = $("#choose-file"); } } Bind the viewModel. var jsonModel = '@Html.Raw(JsonConvert.SerializeObject(this.Model))'; var mvcwModel = ko.mapping.fromJSON(jsonModel); mvcwModel.viewModel = viewModel; ko.applyBindings(mvcwModel, document.getElementById("viewRequest")); attach uploadDocument to uploadButton &lt;tr&gt; &lt;td&gt; &lt;th&gt;&lt;input type="button" value="@TranslationService.Read("Waybill_OrderDisplay_UploadSubmit", module, languageCode)" id="btncareerssubmimt" class=" floatRight" data-bind="disable: viewModel.uploadButtonDisable, click: function(){ viewModel.uploadDocument($root.Documents);}" /&gt;&lt;/th&gt; &lt;/td&gt; &lt;/tr&gt;
answers question: http://stackoverflow.com/q/27226326

http://stackoverflow.com/comment/42829330
comment on: http://stackoverflow.com/q/27165903
score: 0
type: Comment
has text: So where in the source code are the additional form fields? If you can see them on page, they *are* in there - but as I said, you need to be looking at the *Generated* source code which would include any additional markup added by Javascript after the initial page load.
type: QuestionComment

http://stackoverflow.com/q/27170396
possible better answer: http://stackoverflow.com/a/27170769
has comment: http://stackoverflow.com/comment/42831674
has answer: http://stackoverflow.com/a/27170776
has comment: http://stackoverflow.com/comment/42832215
has title: Transforming puzzle written in pure javascript to javascript using jquery
type: AnsweredQuestion
has body: Javascript Script: function move(cellID, cell) { if (cellID==emptyCell) return; rest = cellID % 5; topPos = (cellID>5) ? cellID-5 : -1; bottomPos = (cellID<21) ? cellID+5 : -1; leftPos = (rest!=1) ? cellID-1 : -1; rightPos = (rest>0) ? cellID+1 : -1; if (emptyCell!=topPos && emptyCell!=bottomPos && emptyCell!=leftPos && emptyCell!=rightPos) return; cell1 = document.getElementById(emptyCell); img1 = cell1.firstChild; img = cell.firstChild; cell.removeChild(cell.firstChild); cell1.removeChild(cell1.firstChild); cell.appendChild(img1); cell1.appendChild(img); emptyCell = cellID; } HTML: .... Javascript with JQuery Script: $('td').click(function() { move(this.attr('id'), this); }); function move(cellID, cell) { if (cellID==emptyCell) return; rest = cellID % 4; topPos = (cellID>5) ? cellID-4 : -1; bottomPos = (cellID<13) ? cellID+4 : -1; leftPos = (rest!=1) ? cellID-1 : -1; rightPos = (rest>0) ? cellID+1 : -1; if (emptyCell!=topPos && emptyCell!=bottomPos && emptyCell!=leftPos && emptyCell!=rightPos) return; cell1 = document.getElementById(emptyCell); img1 = cell1.firstChild; img = cell.firstChild; cell.removeChild(cell.firstChild); cell1.removeChild(cell1.firstChild); cell.appendChild(img1); cell1.appendChild(img); emptyCell = cellID; } HTML: ... Ok so I am slowly trying to transform a puzzle game from javascript to javascript using the jquery library. I succeeded the loading part of the puzzle in both javascript and jquery, in which the pieces of the puzzle load on the screen, but now I cannot get the move function to work. The move function is the one that is supposed to move the pieces on a click event. The pure javascript part of the code works completely. However the jquery part does not. Can someone please enlighten me? Thanks.
score: 1
upvote count: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27170769
downvote count: 0
has comment: http://stackoverflow.com/comment/42831978
has comment: http://stackoverflow.com/comment/42831757
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27170776
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42831694
favorite count: 0
has comment: http://stackoverflow.com/comment/42831873

http://stackoverflow.com/comment/42851001
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27181341
has text: If it's not working, you're going to have to change code anyway....

http://stackoverflow.com/comment/42814789
has text: Thanks for the suggestion, I'm looking into it now!
comment on: http://stackoverflow.com/q/27160375
score: 0
type: QuestionComment
type: Comment

ctrl
tags question: http://stackoverflow.com/q/27178680
tag name: ctrl
type: Tag

http://stackoverflow.com/comment/90932177
has text: @Varun: thank you for response , I am new to node and I am not clear what is mongoose ODM. my package.json has "mongodb": "^2.2.35" and "mongoose": "^4.13.12" .
comment on: http://stackoverflow.com/a/27212984
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42997701
type: QuestionComment
has text: If it has an rvalue you can test it. But not the way your code looks. You can test person1.age You can't test the parent, that isn't an rvalue. To spin through your objects you need to put them into an array, loop and test their age.
score: 0
comment on: http://stackoverflow.com/q/27262588
type: Comment

http://stackoverflow.com/q/27295119
favorite count: 0
has comment: http://stackoverflow.com/comment/43056979
has comment: http://stackoverflow.com/comment/43055180
type: UnansweredQuestion
has body: I have created a jQuery plugin that has a plus/minus button to zoom into/out of an image, and allows the user to drag/move the image around within its container. Snippet contains entire plugin code and minimum required html/css to recreate issue: /*! * jQuery Image Zoom v1 * http://richard.parnaby-king.co.uk * https://github.com/richard-parnaby-king/jQuery-Image-Zoom */ //////////////////// Plugin ///////////////////// ;( function ( $, window, document, undefined ) { var pluginName = 'imageZoom', options = { scaleAmount:1.2, //(float) amount to zoom in / out by zoomInText:'+', //(string) Text to show in span for zoom in button zoomOutText:'-' //(string) Text to show in span for zoom out button }; function ImageZoom( element, opts ) { this.element = element; this._name = pluginName; options = $.extend( {}, options, opts ); //local variables var link = this.element.find('a'), bigImage = link.attr('href'), image = this.element.find('img'), currentScale = 1, mouseDown = false, ix = 0, iy = 0, sWidth,sHeight; this.image = image; this.link = link; link.on('click.' + pluginName, function(e){e.preventDefault();}); this.element.addClass('imageZoom-holder'); image.on('load',function(){ image.css({ '-webkit-transform' : 'scale(1)', '-moz-transform' : 'scale(1)', '-ms-transform' : 'scale(1)', '-o-transform' : 'scale(1)', 'transform' : 'scale(1)', 'top' : '0', 'left' : '0' }); sWidth = image.width(); sHeight = image.height(); image.attr('src',bigImage); image.width(sWidth); image.height(sHeight); }); //add buttons to image this.element.append(' '+options.zoomInText+''+options.zoomOutText+' '); var buttons = this.element.find('.imageZoom-buttons'); //when click on zoom in/out buttons, scale image accordingly buttons.find('.zoomInButton').on('click.' + pluginName,function(){ currentScale *= options.scaleAmount; image.css({ '-webkit-transform' : 'scale(' + currentScale + ')', '-moz-transform' : 'scale(' + currentScale + ')', '-ms-transform' : 'scale(' + currentScale + ')', '-o-tran…
has comment: http://stackoverflow.com/comment/43055325
upvote count: 1
downvote count: 1
type: Question
has title: Custom plugin to move image around not moving image when src changed
score: 0
has answer: http://stackoverflow.com/a/27298866
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27313187
has body: How can I pass parameter to .NET web method with fancytree Public Shared Function ReadNodes(parentId As String) As String I am trying to send it like this, but it always gets sent as a querystring parameter. $("#tree").fancytree( { source: { url: "Default.aspx/ReadNodes", data: {parentId: "-1"}, cache: false } } ) Can I somehow pass the value to a method as a parameter? This doesnt work, I keep getting a loading wheel and then a failure. No javascript errors in console. I have also tried the server method without a parameter, and I get the same behavior. So perhaps I am doing something else wrong.
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: fancytree
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28917808
upvote count: 1
type: Question
score: 1
has title: Fancytree passing parameters when loading nodes

http://stackoverflow.com/a/27211821
has body: You should print value instead of a and b. var a = ['a0', 'a1', 'a2']; var b = ['b0', 'b1', 'b2']; $.each(a, function(index, value){ console.log(value) //console value instead of a $.each(b, function(index, value){ console.log(value); //console value instead of b }); }); Also can try using map(). a.map(function(val, ond){ console.log(val); b.map(function(v, k){ console.log(v); }); });
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27211785
downvote count: 0
score: 1

http://stackoverflow.com/a/27295651
has body: At the beginning of my script, I check for the presence of the cookie, if it is there I delete the cookie (a new one will be generated if they save/add to cart again) and reload the page with the cookie information: function common_init() { var cookie = common_get_cookie("project_parameters"); //Send the user back to the project they are working on when they hit the back button - AC 2014-12-04 if ("" != cookie) { document.cookie = "project_parameters=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; window.location.href = (SITE_URL + "/Custom_App/?" + cookie); } //more code follows } and in the save project/add to cart function, I added: document.cookie="project_parameters=app_type" + app_type + "&amp;session_id=" + session_id + "&amp;cart_id=" + cart_id + "&amp;prjid=" + pid + "&amp;rid=" + rid;
type: Answer
answers question: http://stackoverflow.com/q/27275241
score: 0

http://stackoverflow.com/q/27303332
has answer: http://stackoverflow.com/a/27303596
has answer: http://stackoverflow.com/a/70996419
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43069737
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/27303380
has title: Replace null with quotes in JSON
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27303519
has comment: http://stackoverflow.com/comment/43069743
has answer: http://stackoverflow.com/a/27303410
linked to: http://stackoverflow.com/q/722668
has comment: http://stackoverflow.com/comment/43069858
answer count: 7
has comment: http://stackoverflow.com/comment/43070019
favorite count: 0
has answer: http://stackoverflow.com/a/66817250
has answer: http://stackoverflow.com/a/49935015
has body: This topic is addressed on this site for PHP and Rails but I don't see anything for standard JavaScript. If my JSON object has a null value in a pair it looks like this id:null but I need it to look like this id:"" Since JSON doesn't support single quotes I'm unsure how to do this. Current Result {"id":"e6168d55-1974-e411-80e0-005056971214","label":"List","parentId":null} Desired Result {"id":"e6168d55-1974-e411-80e0-005056971214","label":"List","parentId":""}
type: UnansweredQuestion

http://stackoverflow.com/comment/43074220
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27305786
has text: Better suitable for http://codereview.stackexchange.com/
type: Comment

http://stackoverflow.com/comment/42986330
score: 0
type: Comment
type: QuestionComment
has text: *"I would appreciate an explanation of what I'm doing wrong."* What makes you think your are doing something wrong? Is there a problem with your code? What is it?
comment on: http://stackoverflow.com/q/27256291

protractor
tags question: http://stackoverflow.com/q/27258609
tags question: http://stackoverflow.com/q/27240969
tags question: http://stackoverflow.com/q/27264146
tags question: http://stackoverflow.com/q/27189968
tags question: http://stackoverflow.com/q/27240744
tag name: protractor
tags question: http://stackoverflow.com/q/27170196
tags question: http://stackoverflow.com/q/27278222
tags question: http://stackoverflow.com/q/27234785
tags question: http://stackoverflow.com/q/27240657
type: Tag
tags question: http://stackoverflow.com/q/27188744
tags question: http://stackoverflow.com/q/27245332
tags question: http://stackoverflow.com/q/27301676
tags question: http://stackoverflow.com/q/27239768
tags question: http://stackoverflow.com/q/27276166
tags question: http://stackoverflow.com/q/27269459
tags question: http://stackoverflow.com/q/27181698
tags question: http://stackoverflow.com/q/27261210

http://stackoverflow.com/q/27291190
has answer: http://stackoverflow.com/a/27291231
has comment: http://stackoverflow.com/comment/43048492
upvote count: 0
has body: I have the following HTML code, generated by C#: Content goes here TOON MINDER TOON MEER I want to hide the Content goes here using the following Javascript code, but I want to keep the buttons still in the div. How would I achieve this, and if it is not possible, how can I do this? $(document).ready(function () { div.find('.newsfeed-hide').click(function () { $('.more-news-items').html(''); }); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27291237
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has title: Hide content in using .html() without hiding inner
downvote count: 1
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27291231
score: -1
accepted answer: http://stackoverflow.com/a/27291237
linked to: http://stackoverflow.com/q/17560867
answer count: 2

http://stackoverflow.com/q/27282934
has comment: http://stackoverflow.com/comment/43039449
has body: I'm trying to understand some of the fundamentals of javascript and DOM manipulation, and I've run into major roadblock. I'm trying a simple change of style to hide and show. It will work, but ONLY when I put in a breakpoint and run the code step by step. With no breakpoints in chrome developer tools it won't work. I wrote an equivalent in jQuery to, and ran into the exact same problem. Here is javascript: (function topping() { var x = document.getElementById('pizza').value; var y = document.getElementById('pizza'); y.addEventListener('change', changeToppings); function changeToppings() { if (x == 'Sicilian') { document.getElementById('RegToppings').style.display = 'none'; document.getElementById('SicToppings').style.display = 'block'; } else if (x == 'Regular') { document.getElementById('SicToppings').style.display = 'none'; document.getElementById('RegToppings').style.display = 'block'; } } })(); #SicToppings { display: none; } #RegToppings { display: block; } Regular Sicilian buddy mushrooms pepperoni olives pasta and here's the jQuery: $(document).ready(function() { $("#pizza").change(function () { var x = $("#pizza").value; if (x == "Sicilian") { $("#RegToppings").delay(1000).hide(); $("#SicToppings").delay(1000).show(); } else if (x == "Regular") { $("#SicToppings").delay(1000).hide(); $("#RegToppings").delay(1000).show(); } }) }) Thank you so much for any assistance you can offer. I'm not just looking for the solution, I'm trying to figure out why this is even happening, I think it has something to do with timing or call backs and I know that this a major component of javascript I have to understand. Thank you.
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27284798
has comment: http://stackoverflow.com/comment/43039476
tagged with: javascript
has title: Simple javascript will only work with a breakpoint
linked to: http://stackoverflow.com/q/779379
has comment: http://stackoverflow.com/comment/43034420
answer count: 2
has comment: http://stackoverflow.com/comment/43034303
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/43034394
favorite count: 0
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/43034280
has answer: http://stackoverflow.com/a/27283094
has comment: http://stackoverflow.com/comment/43034404
score: 1

http://stackoverflow.com/a/27167865
has body: You need to exclude space usintg ^\s and look for 1 or more characters so use + instead of * $("body")[0].className =$("body")[0].className.replace(/\b\s?demo-[^\s]+\b/g,''); DEMO
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27167717
answers question: http://stackoverflow.com/q/27167717
type: Answer

http://stackoverflow.com/a/27219091
answers question: http://stackoverflow.com/q/27218965
type: Answer
has comment: http://stackoverflow.com/comment/42917693
has comment: http://stackoverflow.com/comment/42917492
has comment: http://stackoverflow.com/comment/42917611
has comment: http://stackoverflow.com/comment/42917770
score: 0
has comment: http://stackoverflow.com/comment/42917674
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27218965
has body: You can create a sort order on them by sorting a different array. The simplest solution would be to sort a copy of the array: scores.slice().sort(compare).forEach(function(o, i) { o.sort_order = i; });

http://stackoverflow.com/a/27285554
type: Answer
has comment: http://stackoverflow.com/comment/43039161
answers question: http://stackoverflow.com/q/27285443
score: 0
has body: Put some sort of identifier as a data attribute on each row &lt;tr data-id="${entry.id}"&gt; Then you can use a change handler on the select elements to make an ajax call. Using jQuery it would look something like: $('select[name=status]').change(function(){ var data={ id : $(this).closest('tr').data('id'), name : $(this).val() }; $.post('path/to/server', data, function(response){ /* validate server response and then do something in UI */ }); }); Note that element ID's must be unique by defintiion but you are repeating the same ID's in your loop to create row elements. Reference : $.post() API Docs
has comment: http://stackoverflow.com/comment/43039220

http://stackoverflow.com/q/27279488
has answer: http://stackoverflow.com/a/34739030
answer count: 3
has body: I've confused as to how to utilize React's performance tool. My current usage is shown below: var Perf = React.addons.Perf; Perf.start(); this.setState({ newState: newStateObject, }, function(){ Perf.printInclusive(); Perf.stop(); }); This doesn't render anything on the page and blurts out Uncaught TypeError: Cannot read property 'counts' of undefined
has comment: http://stackoverflow.com/comment/45915601
has comment: http://stackoverflow.com/comment/43068346
favorite count: 0
has answer: http://stackoverflow.com/a/29040342
has title: React js Performance tool addon throws "Cannot read property 'counts' of undefined"
has comment: http://stackoverflow.com/comment/43060664
has comment: http://stackoverflow.com/comment/43525990
possible better answer: http://stackoverflow.com/a/28114498
type: AnsweredQuestion
tagged with: performance
has answer: http://stackoverflow.com/a/28114498
upvote count: 5
accepted answer: http://stackoverflow.com/a/29040342
type: Question
tagged with: reactjs
score: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43030981

http://stackoverflow.com/a/27260102
has comment: http://stackoverflow.com/comment/43019036
score: 0
has comment: http://stackoverflow.com/comment/43016780
answers question: http://stackoverflow.com/q/27259674
has comment: http://stackoverflow.com/comment/42994405
type: Answer
has comment: http://stackoverflow.com/comment/43019563
has body: Starting with the right side. document.forms[0] document.form gives you an array of all forms in the DOM. You can think of the DOM simply as a collection of all elements on the html page. forms[0] means you will get the first element in the array. This comes out to being the form with name="form1". So.. document.forms[0] //points to ... Next comes document.forms[0].elements[2] In a similar respect, this takes the form we are dealing with, and gives an array of all the elements in the form. These are not to be confused with children. It only gives the form elements like input, select. Not p or h1 even if they are inside the form. the [2] means we get the third element in the array. It looks like that would be the input with name="forwardon". Note, the option elements do not count since they are all considered part of the select. Finally document.forms[0].elements[2].value; The .value simply means the value of the element we just pointed to. That would be "forward". To put it all together. forprice.innerHTML=document.forms[0].elements[2].value; We are changing the dom element assigned to the variable "forprice" so that it's html contents will equal "forward". That is what the .innerHTML does - alter the contents between the tags of an html element. It appears forprice is set to an element with the id="desc" which i cannot find, but it would hypothetically look like this after the javascript. forward

http://stackoverflow.com/q/27294941
answer count: 4
has comment: http://stackoverflow.com/comment/68609329
has body: I see other solutions to my question but none that help me. I want to create a function to find if a number is positive/negative. The function should take an integer argument and return true if the integer is positive and false if it is negative. Also, prompt the user again and again if anything other than a number is entered Here's the code so far When I enter a number, it keeps alerting me it is true or false but won't let me enter another. How do I control my loop so I can ask until -1 is entered? It is not giving me a chance to enter -1 function isPositive(num) { var result; if (num &gt;= 0) { result = true; } else if (num &lt; 0) { result = false; } return result; } var num; num = parseInt(prompt("Enter a number")); while (num != -1) { alert(isPositive(num)); if (isNaN(num)) { alert("No number entered. Try again"); num = parseInt(prompt("Enter a number")); isPositive(num); while (num != -1) { alert(isPositive(num)); } } }
has answer: http://stackoverflow.com/a/47265614
upvote count: 2
type: UnansweredQuestion
has title: Javascript - Find if number is positive or negative
has answer: http://stackoverflow.com/a/27294991
downvote count: 1
score: 1
type: Question
has answer: http://stackoverflow.com/a/27295033
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43054704
has answer: http://stackoverflow.com/a/27295034
linked to: http://stackoverflow.com/q/7037669

http://stackoverflow.com/comment/42978278
has text: the code on the server side String commentStr = URLDecoder.decode(request.getParameter("commentText"), "UTF-8"); not work. I am using asp.net mvc on the server side.
type: AnswerComment
comment on: http://stackoverflow.com/a/27248611
score: 0
type: Comment

http://stackoverflow.com/a/63220370
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27212592
score: 2
has body: With Reactive Forms you should compose validators in such a way: formControlYourField: [ "", Validators.compose([ Validators.required, Validators.minLength(9), Validators.maxLength(9), Validators.pattern("^[0-9]*$"), ]), ] And of course in your .html
downvote count: 0

http://stackoverflow.com/comment/64847472
has text: You could do that too, yes. Matter of taste at this point
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27282907
score: 0

http://stackoverflow.com/a/27160627
has body: Try to change css. Than add one additional element in DOM and you're perfect. So CSS you need to change is .wrapper { min-height: 100%; margin: -20px auto 0; width: 70%; position: relative;/*This is new*/ } .main { position: absolute;/*This is new*/ /* float: left; */ REMOVE THIS width: 100%; height: 100%;/*This is new*/ background-color: #F80307; } In div with class MAIN add another div that will be positioned relative. .new_div{ position: relative; }
has comment: http://stackoverflow.com/comment/42824268
score: 0
has comment: http://stackoverflow.com/comment/42815519
answers question: http://stackoverflow.com/q/27160238
type: Answer

http://stackoverflow.com/q/27221675
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27286318
has comment: http://stackoverflow.com/comment/43039440
has comment: http://stackoverflow.com/comment/43003402
tagged with: java
downvote count: 2
has comment: http://stackoverflow.com/comment/43040200
upvote count: 1
has comment: http://stackoverflow.com/comment/42922859
has comment: http://stackoverflow.com/comment/43038553
type: Question
has title: d3.js code in not working on JPS
has comment: http://stackoverflow.com/comment/42995740
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27286318
has body: I am new in d3.js and i am trying to make a d3.js program in JSP. I have a two files 1) HTML 2) javascript now when i linked javascript in HTML file then it shows pie chart. Problem: when i am trying to run this code in jsp and its not working? I dont understand that just by changing the extension from html to jsp, why the program was stop showing pie chart? your suggestions would be helpful... this is the code- This is the JSP file and this is temp.js file- //Width and height var w = 300; var h = 300; var outerRadius = w / 2; var innerRadius = 0; var arc = d3.svg.arc() .innerRadius(innerRadius) .outerRadius(outerRadius); var pie = d3.layout.pie(); //Easy colors accessible via a 10-step ordinal scale var color = d3.scale.category10(); //Create SVG element var svg = d3.select("body") .append("svg") .attr("width", w) .attr("height", h); //Set up groups var arcs = svg.selectAll("g.arc") .data(pie(dataset)) .enter() .append("g") .attr("class", "arc") .attr("transform", "translate(" + outerRadius + "," + outerRadius + ")"); //Draw arc paths arcs.append("path") .attr("fill", function(d, i) { return color(i); }) .attr("d", arc); //Labels arcs.append("text") .attr("transform", function(d) { return "translate(" + arc.centroid(d) + ")"; }) .attr("text-anchor", "middle") .text(function(d) { return d.value; });
possible better answer: http://stackoverflow.com/a/27222450
has comment: http://stackoverflow.com/comment/43037958
has answer: http://stackoverflow.com/a/27222450
answer count: 2
linked to: http://stackoverflow.com/q/436411
tagged with: jsp
has comment: http://stackoverflow.com/comment/43033470
favorite count: 0
has comment: http://stackoverflow.com/comment/43039568
has comment: http://stackoverflow.com/comment/42923506
tagged with: d3.js
has comment: http://stackoverflow.com/comment/42922353
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42933890
linked to: http://stackoverflow.com/q/6395367
has comment: http://stackoverflow.com/comment/42959462
has comment: http://stackoverflow.com/comment/43040192
score: -1

audio
tags question: http://stackoverflow.com/q/27178510
tags question: http://stackoverflow.com/q/27160756
tags question: http://stackoverflow.com/q/27155677
tags question: http://stackoverflow.com/q/27282372
tags question: http://stackoverflow.com/q/27284938
type: Tag
tag name: audio
tags question: http://stackoverflow.com/q/27270459
tags question: http://stackoverflow.com/q/27304345
tags question: http://stackoverflow.com/q/27163485
tags question: http://stackoverflow.com/q/27210652
tags question: http://stackoverflow.com/q/27200918
tags question: http://stackoverflow.com/q/27279418
tags question: http://stackoverflow.com/q/27212335
tags question: http://stackoverflow.com/q/27220859
tags question: http://stackoverflow.com/q/27195498

yammer
type: Tag
tags question: http://stackoverflow.com/q/27174095
tag name: yammer

http://stackoverflow.com/comment/42948675
type: Comment
comment on: http://stackoverflow.com/a/27235828
score: 1
has text: Since i can't change my server port to 80, I was looking into http://jssip.net/documentation/0.5.x/getting_started/, but no documentation on how to change the port for JsSIP, any idea how? BTW, thanks for the remarkable fast answer ^^.
type: AnswerComment

http://stackoverflow.com/comment/43003706
comment on: http://stackoverflow.com/a/27266201
score: 0
type: AnswerComment
type: Comment
has text: I can't understand what's wrong here, why there is -1 in the code.

http://stackoverflow.com/q/27156781
type: Question
has comment: http://stackoverflow.com/comment/42807740
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42810902
score: 0
tagged with: popupwindow
has comment: http://stackoverflow.com/comment/42836986
answer count: 0
type: UnansweredQuestion
has title: JS- Popup Work in all browsers BUT Internet Explorer
has body: I have 1 problem: I try authorization in Google/Gmail in Popup. THis is my JavaScript code: var OAUTHURL = 'https://accounts.google.com/o/oauth2/auth?'; var SCOPE = 'https://www.google.com/m8/feeds/'; var VALIDURL = 'https://www.localhost:1987/Home/GetContacts?code='; var CLIENTID = 'MyClientId'; var REDIRECT = 'http://localhost:1987/Home/GetContacts' var TYPE = 'code'; var _url = OAUTHURL + 'scope=' + SCOPE + '&client_id=' + CLIENTID + '&redirect_uri=' + REDIRECT + '&response_type=' + TYPE; function login() { var win = window.open(_url, "windowname1", 'width=800, height=600'); var pollTimer = window.setInterval(function () { try { console.log(win.document.URL); if (win.document.URL.indexOf(REDIRECT) != -1) { console.log("NOW THIS WINDOW WLL BE CLOSE!"); window.clearInterval(pollTimer); var url = win.document.URL; acToken = gup(url, 'code'); win.close(); validateToken(acToken); } } catch (e) { console.log(e); } }, 100); } function validateToken(token) { console.log("Text before my ajax"); $.ajax({ url: '/Home/GetContacts?code=' + token, dataType: "json", type: "GET", contentType: 'application/json; charset=utf-8', data: {}, success: function (data) { console.log(data); var info = $.parseJSON(data); $('#ContactsList').empty(); for (var i = 0, len = info.length; i < len; i++) { console.log(info[i].ContactMail.ContactMail); var contact = $(' '); contact.text(info[i].ContactMail); contact.text(info[i].ContactName); $('#ContactsList').append(contact); } }, error: function (xhr) { console.log("Error"); console.log(xhr); } }) } //credits: http://www.netlobo.com/url_query_string_javascript.html function gup(url, name) { name = name.replace(/[[]/, "\[").replace(/[]]/, "\]"); var regexS = "[\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(url); console.log(results); if (results == null) return ""; else return results[1]; } function Test() { var win = window.open("http://www.google.com", "windowname1", 'width=800, height=600'); win.close(); …
tagged with: popup
has comment: http://stackoverflow.com/comment/42807808

http://stackoverflow.com/q/27265532
has title: Why my ASP Website content is not being crawled by Google?
possible better answer: http://stackoverflow.com/a/27265950
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/27265885
tagged with: seo
type: AnsweredQuestion
type: Question
has body: While testing using following tools . 1.webconfs.com/search-engine-spider-simulator.php 2.feedthebot.com/tools/ It shows that spider not seeing any text in my website http://wwww.vamartinc.com. I run the test after inserting some text just below the body tag, even then the results appear as spider sees no text. Even menu bar items text is not being found by the bot. My robots text is not restricting bots to fetch my content and meta as index , follow. Content Please help to resolve this .
has answer: http://stackoverflow.com/a/27265885
tagged with: javascript
tagged with: web-crawler
has answer: http://stackoverflow.com/a/27265950
score: 0
answer count: 2
tagged with: google-crawlers

http://stackoverflow.com/a/27272099
answers question: http://stackoverflow.com/q/27271373
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: In IE it is return at here: if ((loginForm.email.value.length != 0) &amp;&amp; (browserName == "Microsoft Internet Explorer")){ returnValue = false; var imEmail = validateEmail(loginForm.email.value); returnValue = imEmail; if (returnValue == false) document.querySelector('span[class="email"]').style.display=""; loginForm.email.focus(); return returnValue; ^^^^^^^^^^^^^^^^^^^ } In which the if statement is actually like this: if (returnValue == false) {document.querySelector('span[class="email"]').style.display="";} ^ ^ loginForm.email.focus(); return returnValue; I guess what you want is return when it is false. You really should wrap if statement with braces, otherwise only the first statement is under the check if (returnValue == false) { document.querySelector('span[class="email"]').style.display=""; loginForm.email.focus(); return returnValue; } Same for "loginForm.url"
accepted answer of: http://stackoverflow.com/q/27271373
type: Answer

http://stackoverflow.com/comment/42839652
comment on: http://stackoverflow.com/q/27174605
has text: @NicholasMurray: plalx answer covers it already.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42967179
has text: I tried but sorry to say it does not work for me, even i tried copying the code and locally but it does not work.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27245051

http://stackoverflow.com/q/27308773
tagged with: javascript
has answer: http://stackoverflow.com/a/27308864
tagged with: jquery
has comment: http://stackoverflow.com/comment/43079472
has body: I have an input that is supposed to add a class of clicked to another element with an id of #zip when clicked. Here is the code: $('#billing_zip').click(function () { $('#zip').addClass('clicked'); }); #zip { color: #444; font-style: italic; position: absolute; top: 8px; left: 35px } .clicked { display: none; } Zip zip I don't know why the above jQuery is not working.
has comment: http://stackoverflow.com/comment/43079453
has answer: http://stackoverflow.com/a/27308881
has comment: http://stackoverflow.com/comment/43079426
score: 0
has answer: http://stackoverflow.com/a/27308982
has answer: http://stackoverflow.com/a/27308927
favorite count: 0
has title: how to add a class to an element when i click a different element with jquery
answer count: 5
possible better answer: http://stackoverflow.com/a/27308864
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43079440
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43079414
type: Question
accepted answer: http://stackoverflow.com/a/27308881
has answer: http://stackoverflow.com/a/27308837

http://stackoverflow.com/comment/42949999
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27236566
type: Comment
has text: TypeError: this.find(...).style is not a function. After some research, Im wondering if I need to rethink my plugin model - this looks promising, http://www.smashingmagazine.com/2011/10/11/essential-jquery-plugin-patterns/ thoughts?

http://stackoverflow.com/comment/43100802
has text: Thanks man - I updated the question to reflect what I've learned from your Plunkr. Cheers bro.
comment on: http://stackoverflow.com/q/27299471
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42882830
type: AnswerComment
comment on: http://stackoverflow.com/a/27199338
type: Comment
has text: Perfect!, thanks a million, that's done the trick! it's 05:56 but was totally worth it to get this working :D
score: 0

http://stackoverflow.com/q/27215973
has body: I am currently working on a web site, which should also involve push notifications. I want to use server sent events, because I do not need to send an answer for my event back from the client to the server and therefore websockets are not required The backend is a C# Web Api service and the code is based on this tutorial public async Task&lt;HttpResponseMessage&gt; Get(HttpRequestMessage request) { HttpResponseMessage response = request.CreateResponse(); Action&lt;Stream, HttpContent, TransportContext&gt; onStreamAvailable = delegate(Stream stream, HttpContent headers, TransportContext context) { if (stream != null) { StreamWriter outStream = new StreamWriter(stream); outStream.WriteLine("event: testEvent"); outStream.WriteLine("data: hello world1!"); outStream.WriteLine(""); outStream.Flush(); outStream.WriteLine("event: testEvent"); outStream.WriteLine("data: hello world Nr. 2!"); outStream.WriteLine(""); outStream.Flush(); outStream.WriteLine("event: testEvent"); outStream.WriteLine("data: hello world Nr. 3!"); outStream.WriteLine(""); outStream.Flush(); outStream.WriteLine("event: testEvent"); outStream.WriteLine("data: hello world Nr. 4!"); outStream.WriteLine(""); outStream.Flush(); outStream.WriteLine("event: testEvent"); outStream.WriteLine("data: hello world Nr. 5!"); outStream.WriteLine(""); outStream.Flush(); } }; response.Content = new PushStreamContent(onStreamAvailable, "text/event-stream"); return response; } When using this code, the browser showed the first four messages, but not the last one. I then started debug mode and found out, that the browser shows the first event, right after the second one is flushed and so forth. I then made a telnet request to have a look at the output and this was the result: here I noticed that before every event there seems to be some text (maybe a byte encoded hexadecimal) which I didn't send. I thought maybe this is what the browser has trouble with. Any idea what i can do to remove this? Or is the error something e…
type: Question
has comment: http://stackoverflow.com/comment/42912869
tagged with: c#
has comment: http://stackoverflow.com/comment/42912197
downvote count: 0
tagged with: asp.net-web-api
tagged with: javascript
has comment: http://stackoverflow.com/comment/42911941
favorite count: 0
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1
tagged with: server-sent-events
has comment: http://stackoverflow.com/comment/42912322
has title: Web API Server Sent Events not working properly

http://stackoverflow.com/comment/43000409
comment on: http://stackoverflow.com/a/27256755
type: AnswerComment
type: Comment
score: 1
has text: The TL;DR is that the standardization process is a bit confusing, and using bleeding-edge features means that you'll have to do a non-trivial amount of digging around. Sorry :(

http://stackoverflow.com/comment/42812068
has text: When i remove bundle 757... my selected bundles removes correctly, but cart don't remove correctly
comment on: http://stackoverflow.com/a/27157412
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42928092
comment on: http://stackoverflow.com/a/27219523
score: 0
type: AnswerComment
type: Comment
has text: This doesn't really feel like an answer and more like advertisment for your framework.

http://stackoverflow.com/comment/42848104
comment on: http://stackoverflow.com/q/27175603
type: Comment
score: 2
has text: I'm guessing this is due to https://github.com/dojo/dojo/blob/1.10.2/request/xhr.js#L118 - if you can put together a simple test case and details of what browsers do/don't encounter the issue, I'd suggest filing a bug at https://bugs.dojotoolkit.org/
type: QuestionComment

http://stackoverflow.com/a/27173994
downvote count: 0
has comment: http://stackoverflow.com/comment/42905720
score: 1
has body: You are trying to make an inheritance You have to do var animal = function () {} animal.prototype = new obj(); animal.prototype.constructor=animal; src: http://phrogz.net/js/classes/OOPinJS2.html In an other way you may want to know that you can use: obj.prototype.__defineGetter__("name", function () { return this.n; /* where n is the name */ }); and use it like that var a = new obj("foo"); console.log(a.name);
upvote count: 1
answers question: http://stackoverflow.com/q/27173578
type: Answer
has comment: http://stackoverflow.com/comment/42838245

http://stackoverflow.com/a/27285404
upvote count: 1
has comment: http://stackoverflow.com/comment/43038606
has comment: http://stackoverflow.com/comment/43039563
type: Answer
has comment: http://stackoverflow.com/comment/43038546
has comment: http://stackoverflow.com/comment/43040126
has comment: http://stackoverflow.com/comment/43039784
answers question: http://stackoverflow.com/q/27284905
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43038830
has comment: http://stackoverflow.com/comment/43039625
has comment: http://stackoverflow.com/comment/43038581
has comment: http://stackoverflow.com/comment/43038690
has comment: http://stackoverflow.com/comment/43039719
has comment: http://stackoverflow.com/comment/43040176
has body: I think this will do what you are wanting much easier. $(document).ready(function(){ $("#selectall").on("change", function() { $.event.trigger("mycheck", {checked: $(this).prop("checked")}); }); $(".check-class").on("mycheck", function(e, data) { $(this).prop("checked", data.checked); }); });
has comment: http://stackoverflow.com/comment/43039350
has comment: http://stackoverflow.com/comment/43039959

http://stackoverflow.com/comment/63143499
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27154475
has text: Strange that jasmine website doesn't say where to give the path to the code that's being tested.
score: 0

http-redirect
tags question: http://stackoverflow.com/q/27254192
tags question: http://stackoverflow.com/q/27261891
type: Tag
tags question: http://stackoverflow.com/q/27243789
tags question: http://stackoverflow.com/q/27232969
tags question: http://stackoverflow.com/q/27260118
tags question: http://stackoverflow.com/q/27272829
tag name: http-redirect
tags question: http://stackoverflow.com/q/27246759
tags question: http://stackoverflow.com/q/27176369

http://stackoverflow.com/comment/42809153
type: QuestionComment
comment on: http://stackoverflow.com/q/27156778
has text: Ah, sorry, I forgot to add the jsFiddle. There is an error on the jsFiddle, but it's stil there even if I remove my and everything from js window
score: 0
type: Comment

http://stackoverflow.com/q/27203863
has answer: http://stackoverflow.com/a/31130518
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/27204416
favorite count: 0
has title: HTML & CSS Video Style
has body: I was wondering how to style the buttons and the whole element of an HTML Video with CSS. I would like to know the steps that need to be taken to complete these actions. &lt;video class="video" width="320" height="240" controls&gt; &lt;source src="movie.mp4" type="video/mp4"&gt; &lt;source src="movie.ogg" type="video/ogg"&gt; Your browser does not support the video tag. &lt;/video&gt;
accepted answer: http://stackoverflow.com/a/27204416
has comment: http://stackoverflow.com/comment/42890546
score: 6
tagged with: css
upvote count: 6
answer count: 4
tagged with: video
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27204458
tagged with: javascript
possible better answer: http://stackoverflow.com/a/31130518
has answer: http://stackoverflow.com/a/27204387

http://stackoverflow.com/a/27180603
has comment: http://stackoverflow.com/comment/42855906
has comment: http://stackoverflow.com/comment/42855915
has body: console.log(i); // employee number console.log(s.schedule.employees[i].tasks[j].site); // task site
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42849700
accepted answer of: http://stackoverflow.com/q/27180578
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27180578
has comment: http://stackoverflow.com/comment/42855728
has comment: http://stackoverflow.com/comment/42849707
type: Answer
has comment: http://stackoverflow.com/comment/42849688

http://stackoverflow.com/q/27212156
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27212218
has body: I want to call a function when the browser opens (or reloads) If I use: window.onopen = window.alert("opened"); That works fine however: window.onopen = winopen; window.onresize = winopen; function winopen() { alert("opened"); } Does not. The window.onresize call does work, I'm also using the resize event to call a different function but put it in here just to test whether the function call worked at all as I have the resize event function call working elsewhere.
has comment: http://stackoverflow.com/comment/42908537
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42905195
type: Question
has title: jscript onopen event failing to call function

http://stackoverflow.com/comment/42923919
score: 1
has text: did not know that. i wonder if im just out of date or never encountered this situation before... thanks!
comment on: http://stackoverflow.com/q/27222418
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43028223
score: 1
type: Comment
type: AnswerComment
has text: Doesnt work in Internet Explorer. The browser tries to open the page using some application. Very strange
comment on: http://stackoverflow.com/a/27279556

http://stackoverflow.com/comment/42884565
score: 0
type: Comment
has text: Thank you very much can i also get the name corresponding to the id ??
comment on: http://stackoverflow.com/a/27200389
type: AnswerComment

http://stackoverflow.com/a/27271253
score: 3
answers question: http://stackoverflow.com/q/27268404
downvote count: 0
type: Answer
has body: That plugin is hard-coded to rotate anti-clockwise. I updated the original plugin so that it now has an option to have clockwise: true. The new demo looks like this: This example has one running clockwise and the second running normally (anti-clockwise): JSFiddle: http://jsfiddle.net/TrueBlueAussie/gs3WY/246/ In the defaults I added clockwise: defaults = { ...[snip]... clockwise: false }; In the start method I made it conditionally draw the "stroke" (the outer ring): start: function () { ...[snip]... this._drawCountdownShape(Math.PI * 3.5, !this.settings.clockwise); ...[snip]... }, and in the _draw method I added a conditional calculation of the angle. Also when the timer ends, it conditionally draws the outer ring again based on the clockwise flag (previously it always redrew the entire outer ring before rendering the changes): _draw: function () { var secondsElapsed = Math.round((new Date().getTime() - this.startedAt.getTime()) / 1000); if (this.settings.clockwise) { var endAngle = (((Math.PI * 2) / this.settings.seconds) * secondsElapsed) - (Math.PI * .5); } else { var endAngle = (Math.PI * 3.5) - (((Math.PI * 2) / this.settings.seconds) * secondsElapsed); } this._clearRect(); if (secondsElapsed &lt; this.settings.seconds) { this._drawCountdownShape(Math.PI * 3.5, false); this._drawCountdownShape(endAngle, true); this._drawCountdownLabel(secondsElapsed); } else { this._drawCountdownShape(Math.PI * 3.5, this.settings.clockwise); this._drawCountdownLabel(this.settings.seconds); this.stop(); this.settings.onComplete(); } } You simply add a clockwise: true when you create the countdown: var countdown = $("#countdown").countdown360({ radius: 60, seconds: 20, label: ['sec', 'secs'], fontColor: '#FFFFFF', autostart: false, clockwise: true, // &lt;&lt;&lt;&lt;&lt; Added this onComplete: function () { console.log('done'); } });
upvote count: 3

http://stackoverflow.com/q/27201761
has comment: http://stackoverflow.com/comment/42887488
has answer: http://stackoverflow.com/a/27233784
tagged with: javascript
has answer: http://stackoverflow.com/a/58944997
has comment: http://stackoverflow.com/comment/42892641
has comment: http://stackoverflow.com/comment/42887905
has answer: http://stackoverflow.com/a/27251496
tagged with: jasmine
answer count: 4
favorite count: 0
type: UnansweredQuestion
has title: indexedDB.deleteDatabase() throws error
has answer: http://stackoverflow.com/a/29409630
score: 2
linked to: http://stackoverflow.com/q/24111035
has body: I am trying to delete a database for unit testing: var DeleteDb = indexedDB.deleteDatabase(dbName); this piece of code gets directly called in the first beforeEach in jasmine. with chrome devTools i can see that DeleteDb.error has the following value: error: [Exception: DOMException: Failed to read the 'error' property from 'IDBRequest': The request has not finished.] DeleteDb.onsuccess or DeleteDb.onerror are never fired. Also i am never trying to read an 'error' property in the code. Does somebody know what this error means, where it is coming from or how i can solve it? UPDATE: This code still sometimes fails for me. it gives me the same error as above. &lt;html&gt; &lt;head&gt; &lt;script&gt; var deleteDb = window.indexedDB.deleteDatabase('fakeNonExistentDatabase'); deleteDb.onsuccess = function() { console.log('complete'); }; &lt;/script&gt; &lt;/head&gt; &lt;/html&gt; I am still not sure why this is happening. sometimes opening a new tab or closing another one works. Also it never gives an error when removing the onsuccess callback UPDATE 2 Well it seems that the code is actualy working, but the onsuccess event is never getting fired because no events are getting fired anymore when pressing F8 in chrome devtools. The error i;m getting now is: Uncaught InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. I thought the above error message was a result of the first error message in this post but actualy it was the other way around. There are a few pages i can find about this topic on the internet but there isn't really provided a answer. Any thoughts?
downvote count: 0
tagged with: indexeddb
type: Question
upvote count: 2

http://stackoverflow.com/comment/43009164
type: Comment
type: QuestionComment
has text: Check this **[Link](http://stackoverflow.com/a/1055524)**. Possible duplicate
comment on: http://stackoverflow.com/q/27269291
score: 0

http://stackoverflow.com/comment/80920372
score: 0
type: AnswerComment
has text: @AdiDarachi : could you please mention the name of the library so that i can use it ?
type: Comment
comment on: http://stackoverflow.com/a/27166090

http://stackoverflow.com/a/44522072
has body: Basically removing a component doesn't make sense in React, you probably still thinking jQuery ways, basically in all modern and new JavaScript libraries including React, you should manage your component using state or a route to handle these things, deleting an element or component is not a good way to do these things in React or Angular for example. For example you can have a boolean in this case and if it's true, show your image, otherwise hide it, or even return a different element in your component. So in this case, you have a component which will return differently depends on props or state... something like this: //// var MyImage = React.createClass({ render: function() { if(this.state.showImage) { return ( ); } else { return no image! ; } } }); ////
upvote count: 8
type: Answer
downvote count: 1
score: 7
answers question: http://stackoverflow.com/q/27227792

http://stackoverflow.com/a/35208986
type: Answer
has body: Here is a sample working code and caters to the following: 1) increases and decreases the counter by one 2) does not use continuous iteration 3) does not use ng-init 4) works for $scope.count = 15 (The replies already provided by Rasalom and smallatom helped and so did the link: http://www.w3schools.com/angular/angular_events.asp ) Increment count: {{ count }} Decrement
score: 0
answers question: http://stackoverflow.com/q/27227535

http://stackoverflow.com/a/27287931
answers question: http://stackoverflow.com/q/27287720
has body: Since the markup hasn't been provided I'm taking a guess here: For HTML like: &lt;select&gt; &lt;option value="orange"&gt; &lt;option value="apple"&gt; &lt;/select&gt; &lt;input type="radio" id="Radiolst" value="Hello" name="some"&gt; jQuery should be like: $(document).ready(function () { $('select').on('change', function (e) { var optionSelected = $("option:selected", this); var valueSelected = this.value; $("#Radiolst").val(valueSelected); $("#txtEditor").text(valueSelected); }); }); Do remember to put this in the &lt;head&gt; tag of the document. &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; DEMO FIDDLE
has comment: http://stackoverflow.com/comment/43043233
has comment: http://stackoverflow.com/comment/43043531
downvote count: 0
has comment: http://stackoverflow.com/comment/43043213
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/43043914
upvote count: 1
has comment: http://stackoverflow.com/comment/43042757

http://stackoverflow.com/comment/43063410
type: Comment
score: 0
type: AnswerComment
has text: @Iwang135: Thats Brilliant. I'll try what you have mentioned and give you a shout. Thanks for the code sample. I'm new to this kinda testing. I'll try this out and let you know. Cheers.
comment on: http://stackoverflow.com/a/27299649

http://stackoverflow.com/comment/42811833
comment on: http://stackoverflow.com/q/27158572
score: 0
type: Comment
type: QuestionComment
has text: hmmm, is the video playing just fine when you press the key? (i don't see a play() anywhere)

http://stackoverflow.com/q/27163308
score: 0
answer count: 3
tagged with: regex
has comment: http://stackoverflow.com/comment/42819473
type: UnansweredQuestion
has title: regular expression for a folder name that never contain / at the start or end
has body: I have an input field for folder name and i want to check wither input contain / at the start or at the end. foldername/ wrong /foldername wrong foldername correct mainfolder/subfolder correct
has answer: http://stackoverflow.com/a/27165015
has answer: http://stackoverflow.com/a/27163345
has answer: http://stackoverflow.com/a/27163360
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42941584
comment on: http://stackoverflow.com/a/27222973
type: AnswerComment
score: 0
has text: right, sorry. you should also delete the line declaring `var pageObject;` I've fixed this in my answer
type: Comment

http://stackoverflow.com/q/27188002
has answer: http://stackoverflow.com/a/27191432
has answer: http://stackoverflow.com/a/35321884
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: Conditionally loading the Kik SDK
tagged with: kik
has body: I want to enable my mobile site as a Kik app but I wont to avoid loading the Kik JS SDK for the rest of the world. Looking at Kik's user agent there seems to be no mention of Kik.
type: UnansweredQuestion

http://stackoverflow.com/q/27192923
has body: I'm using Bxslider for my div slider. But I need my next slide to slide over my old slide - effectively once a slide has animated in it remains there stacked on top of the others that went before it. When prev slide button is pressed then it needs to animate out - similar to this effect: http://storiesbylove.com (don't try it out on a tablet though). Does anyone know how to do this with boxslider?
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27324610
score: 0
answer count: 1
has title: How to get new slide to slide over previous slide in Bxslider?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27324610
favorite count: 0
tagged with: slider
type: AnsweredQuestion
tagged with: bxslider

http://stackoverflow.com/comment/42927525
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27224061
score: 0
has text: can you give me plunker?

http://stackoverflow.com/q/27261250
type: UnansweredQuestion
has title: Monkey Patch jquery function contents
has body: Thanks in advance for the help. I am trying to monkeypatch an existing javascript function so that one of its lines point to a new location. It would be easy to just redefine the function, except that it is rendered from server side code that has dynamic contents in it. function GoPrint() { $.cookie('edit_child','on',{expires:28,path:'/'}); //Dynamically created (edit child could be off) window.open('../../Common/Output/HTMLtoPDF.aspx','print'); //Always static, need to change this call. } In my example, the first line creating the cookie, is created dynamically server side, so the property could be set to off. I need to the change the window.open to call a different page instead of the htmltopdf page. Although nasty, I would like to just redefine the function with a replace on the HTMLtoPDF text to point to the new page. I have started this below, but do not know how to get the existing contents of the function to change it. function($){ var _oldPrint = $.fn.GoPrint; $.fn.GoPrint = function(arg1,arg2){ return _oldPrint.call(this,'',); }; })(jQuery); Any suggestions?
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27261744

http://stackoverflow.com/q/27232858
has answer: http://stackoverflow.com/a/32817625
favorite count: 0
possible better answer: http://stackoverflow.com/a/29150370
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42964579
has answer: http://stackoverflow.com/a/29150370
tagged with: jsf
downvote count: 0
has answer: http://stackoverflow.com/a/27245587
accepted answer: http://stackoverflow.com/a/27245587
has body: I'd like to have the colour selected from a Primefaces ColourPicker sent to my backend on change. This seems not to be supported though. &lt;p:colorPicker value="#{colorView.colorPopup}" /&gt; I can see it will submit the value when the page is submitted. &lt;p:colorPicker value="#{colorView.colorPopup}" /&gt; &lt;p:commandButton value="Submit" oncomplete="PF('dlg').show();" update="grid" /&gt; Even some Javascript being called on change would be great. Update: I would like the backing bean to updated on colour change, not just when I submit the form. The main reason for this is that I have several colourpickers on the page and the form is submitted I don't know which value is from which colour picker.
type: Question
score: 3
tagged with: primefaces
tagged with: javascript
has title: Primefaces ColourPicker, how to get ajax event of change
tagged with: jsf-2
upvote count: 3
answer count: 3

http://stackoverflow.com/q/27295889
tagged with: javascript
downvote count: 0
favorite count: 0
has title: D3 Range Based Filter
tagged with: d3.js
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
type: Question
has body: I am working on a D3 bar chart that would visualize a few ranges (massaged data already coming from somewhere else) and allow the user to select a number of ranges for filtering of their search criteria. Fiddle here: http://jsfiddle.net/qear2g9b/ The mechanics of it work pretty well I think. The part I am running into problems with, is capturing user input and mapping it to the data. Once finished, the user should be able to select and drag a range (along the x axis) for the categories they would like to see. I am using d3.brush to let the user select an area on the chart (I haven't looked into how to get it to select the entire chart height yet). On endbrush I am capturing coordinates that I need to map back to the categories that were on the x axis. Since it is an ordinal scale, it doesn't have invert, so I am kind of suck. Any help would be much appreciated. Code snippet below: function brushend() { console.log("BRUSH END"); console.log(brush.extent()); var pos = brush.extent(); var out = []; for (var i = 0; i&lt;pos.length;i++) { for (var j = 0; j&lt;pos[i].length;j++) { console.log(pos[i][j] + " " + x.invert(pos[i][j])); // Doesn't work because x doesn't have invert method } } }

http://stackoverflow.com/a/27161920
has comment: http://stackoverflow.com/comment/42896038
type: Answer
has comment: http://stackoverflow.com/comment/42834106
has body: Make your code modular and your concepts explicit. You can start by creating a MobileMenu object which encapsulates the logic. Note: The following code was not tested. var MobileMenu = { _snapper: null, _$button: null, _direction: 'left', init: function (button, snapper, direction) { this._$button = $(button); this._snapper = snapper; if (direction) this._direction = direction; this._toggleSnapperVisibilityWhenButtonClicked(); }, _toggleSnapperVisibilityWhenbuttonClicked: function () { this._$button.click($.proxy(this.toggle, this)); }, toggle: function () { var snapperClosed = this._snapper.state().state == 'closed', operation = snapperClosed? 'open' : 'closed'; this._snapper[operation](this._direction); } }; Then in your page you can just do the following to initialize your feature: var mobileMenu = Object.create(MobileMenu).init('#btn-menu', snapper); Modularizing your code will make it more maintainable and understandable in the long run, but also allow you to unit test it. You also gain a lot more flexibily because of the exposed API of your component which allows other code to interact with it. E.g. you can now toggle the menu visibility with mobileMenu.toggle().
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42819244
accepted answer of: http://stackoverflow.com/q/27161581
answers question: http://stackoverflow.com/q/27161581
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42970174
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27247771
has text: look at [element-selector](http://api.jquery.com/element-selector/)
type: QuestionComment

http://stackoverflow.com/q/27200134
has answer: http://stackoverflow.com/a/27200211
has answer: http://stackoverflow.com/a/27200348
type: Question
linked to: http://stackoverflow.com/q/1409013
has comment: http://stackoverflow.com/comment/42884109
has comment: http://stackoverflow.com/comment/42884140
tagged with: javascript
has comment: http://stackoverflow.com/comment/42884098
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/27200348
has comment: http://stackoverflow.com/comment/42884054
tagged with: php
has title: how to get values when using javascript in form
possible better answer: http://stackoverflow.com/a/27200179
has comment: http://stackoverflow.com/comment/42884129
type: AnsweredQuestion
has body: I am a beginner in java-script, I would like to send my values to another page with using java-script . my codes : name email phone comment refresh send now how can I get name,phone .. values in savenazar.php page ?
has answer: http://stackoverflow.com/a/27200179

http://stackoverflow.com/comment/42804628
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27155138
has text: @DrewKennedy that´s it
score: 0

http://stackoverflow.com/q/27291353
has title: Javascript: Make table fit on screen vertically by hiding rows
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43048588
has body: I have an (almost) "endless" table (those kind of things which are typically shown only a certain amount of rows and a navigation bar below to show the next page, for example "show next 30 results" or "show next page"). The rows have also variable heights. Is there a way to hide all rows that don't fit on the screen so that the whole table reliably fits on the page and the navigation row at the end is always visible without scrolling? The idea is basically to send to the browser a simple HTML-table, like this: Data1 More data Data2 More data in larger row Data3 More data that may be wrapped around because the user may not have a wide enough window for it Data4 More data Data5 More data Data6 More data Data7 More data Data8 More data Data9 More data NAVIGATION ROW If for example only rows 1-4 (plus navigation row) fit on the screen, rows 5 to 9 should be hidden/collapsed and set (or some equivalent to know where to continue on the next page). That way the content should always fit the screen and the user would never need to scroll. The table is the only visible thing on the page. PS: The solution from this question works only with equal-height rows and is not applicable for variable height rows. Is it possible?
score: 0
has comment: http://stackoverflow.com/comment/43048756
answer count: 1
has comment: http://stackoverflow.com/comment/43048648
accepted answer: http://stackoverflow.com/a/27292287
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27292287
linked to: http://stackoverflow.com/q/12037595
type: Question
has comment: http://stackoverflow.com/comment/43048481

http://stackoverflow.com/a/27177574
has body: You could call a scoped function in your ng-if statement that will check if the item.type === "big" and also keeps track of the number of times item.type !== "big" and subtract that number from the index of the repeated element. Inside your Angular controller: $scope.skipped = 0; $scope.isBig = function(type) { if (type === "big") { return true; else { $scope.skipped++; return false; } } HTML: &lt;div ng-repeat="item in items"&gt; &lt;span ng-if="isBig(item.type)"&gt;{{$index - skipped}}&lt;/div&gt; &lt;p&gt; ..... &lt;/p&gt; &lt;/div&gt;
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/27177453
upvote count: 3
type: Answer

http://stackoverflow.com/q/27283373
has title: Only add unique files to container?
has answer: http://stackoverflow.com/a/27283854
accepted answer: http://stackoverflow.com/a/27283854
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am using jQuery File Upload plugin - I have the auto upload file upload set to false and the behavior I have is that as files are added I build up a table showing the file name and a remove button to allow the user to remove the file before uploading. There is then an upload all files button? So if a user adds a file called foo.txt a row will be created. However if they add foo.txt again it will create another row. I want to check the existing table for that scenario and alert that to the user and not create the row. The code for the upload so far is: $('#uploadFile').fileupload({ replaceFileInput: false, singleFileUploads: true, add: function(event, data) { $.each(data.files, function (index, file) { var rows = $('#files &gt; tr'); // always getting length 0?? data.url = myUrl; data.type = 'POST'; data.context = $('&lt;tr&gt;' + '&lt;td&gt;&lt;strong&gt;Selected File : &lt;/strong&gt;' + file.name + '&lt;/td&gt;' + '&lt;td&gt;&amp;nbsp;&lt;/td&gt;' + '&lt;td&gt;&lt;button type="button" class="removeBtn btn btn-default"&gt;' + '&lt;span class="glyphicon glyphicon-remove-circle"&gt;&lt;/span&gt;' + 'Remove File&lt;/button&gt;&lt;/td&gt;' + '&lt;/tr&gt;') .appendTo('#files') .data('data', data); }); }); Note the add function gets called once for each file added which is what I want. However when I try to get the rows in the table I am getting a length of 0 all the time - even when I add a file to the table and then add another file - the second time hitting the add method rows length is still 0 when I was expecting it to be 1? If I am able to get all the rows before I append then I guess I would have to do a $.each on each row to check the current file name against the filename in the row - if it equals any of them then skip out and not run the append code but instead display an alert?
tagged with: jquery-file-upload
upvote count: 1
has comment: http://stackoverflow.com/comment/43036686
favorite count: 0
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/27247806
has answer: http://stackoverflow.com/a/63916933
has body: I want to generate a unique id for each device. Currently I am using fingerprint.js for this. My code is: var fingerprint = new Fingerprint().get(); But I want to generate unique id with out using any plugins. Can any one help me please?
has answer: http://stackoverflow.com/a/27249628
has comment: http://stackoverflow.com/comment/42973396
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42973509
has comment: http://stackoverflow.com/comment/42970621
possible better answer: http://stackoverflow.com/a/27247865
upvote count: 5
has answer: http://stackoverflow.com/a/27247865
linked to: http://stackoverflow.com/q/105034
type: Question
score: 5
tagged with: uniqueidentifier
accepted answer: http://stackoverflow.com/a/27249628
has comment: http://stackoverflow.com/comment/55499657
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42970481
tagged with: logic
has title: Generate unique id for each device
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27247915

http://stackoverflow.com/q/27226761
tagged with: jquery
has answer: http://stackoverflow.com/a/27227312
type: Question
answer count: 1
tagged with: jssor
has body: I am using Jssor Slider to display multiple images. I have a separate thumbnail section which when clicked, should show the larger image in the slider. Jssor Slider has an API to do this: jssor_slider1.$GoTo(2); How ever, I don't understand how to run this from a hyperlink. I have tried doing onClick="jssor_slider1.$GoTo(2);" but this shows up an error in the console that "jssor_slider1" is undefined. &lt;script src="js/slider-master/js/jquery-1.9.1.min.js"&gt;&lt;/script&gt; &lt;script src="js/slider-master/js/jssor.slider.mini.js"&gt;&lt;/script&gt; &lt;script&gt; jQuery(document).ready(function($) { var options = { $ArrowNavigatorOptions: { $Class: $JssorArrowNavigator$, $ChanceToShow: 2 } }; var jssor_slider1 = new $JssorSlider$('slider1_container', options); }); &lt;/script&gt; How would be correct way of doing this be? Thank you.
score: 0
has title: Jssor Slider - Text hyper link to a particular slide?
accepted answer: http://stackoverflow.com/a/27227312
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/a/27271119
answers question: http://stackoverflow.com/q/27268884
type: Answer
has body: Give a a href link tag for each menu item Menu Item 1 Menu Item 2 Will work
score: 0

http://stackoverflow.com/comment/61942246
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27282437
type: Comment
has text: Problem is that if `describe()` is placed inside `module.exports` then the spec won't run separately anymore!

http://stackoverflow.com/a/27275649
has comment: http://stackoverflow.com/comment/43044059
has comment: http://stackoverflow.com/comment/43020956
has comment: http://stackoverflow.com/comment/43021951
answers question: http://stackoverflow.com/q/27275575
has comment: http://stackoverflow.com/comment/43020440
has body: You have to use the Id selector of jquery $("#formId") and not the class 'form' that you use. Your simplified HTML: &lt;form id="form1"&gt; &lt;input type="submit" id="submit1"/&gt; &lt;/form&gt; &lt;form id="form2"&gt; &lt;input type="submit" id="submit2"/&gt; &lt;/form&gt; The simplified JS: var form1 = $('#form1'); var submit1 = $('#submit1'); form1.submit(function(e) { alert('hey1'); // prevent default action e.preventDefault(); // send ajax request }); var form2 = $('#form2'); var submit2 = $('#submit2'); form2.submit(function(e) { alert('hey2'); e.preventDefault(); }); The result in JSFIDDLE: http://jsfiddle.net/jzb2hn9j/
has comment: http://stackoverflow.com/comment/43020424
has comment: http://stackoverflow.com/comment/43043969
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43020673
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43020689
score: 2
has comment: http://stackoverflow.com/comment/43044031
accepted answer of: http://stackoverflow.com/q/27275575

adobe-brackets
tags question: http://stackoverflow.com/q/27226613
type: Tag
tag name: adobe-brackets

http://stackoverflow.com/comment/42993027
type: QuestionComment
has text: I think you are jumping to conclusions... However, from the looks of fiddle #60+, you seem to be getting it. BTW. You do not need to update the fiddle every time your run it...
comment on: http://stackoverflow.com/q/27254354
score: 0
type: Comment

google-maps
tags question: http://stackoverflow.com/q/27290098
tags question: http://stackoverflow.com/q/27167971
tags question: http://stackoverflow.com/q/27249745
tag name: google-maps
tags question: http://stackoverflow.com/q/27223214
tags question: http://stackoverflow.com/q/27265596
tags question: http://stackoverflow.com/q/27254080
tags question: http://stackoverflow.com/q/27215900
tags question: http://stackoverflow.com/q/27264006
tags question: http://stackoverflow.com/q/27292068
tags question: http://stackoverflow.com/q/27223856
tags question: http://stackoverflow.com/q/27228768
tags question: http://stackoverflow.com/q/27236802
tags question: http://stackoverflow.com/q/27239365
tags question: http://stackoverflow.com/q/27284251
tags question: http://stackoverflow.com/q/27300537
tags question: http://stackoverflow.com/q/27235456
tags question: http://stackoverflow.com/q/27264829
tags question: http://stackoverflow.com/q/27266012
tags question: http://stackoverflow.com/q/27162449
tags question: http://stackoverflow.com/q/27271573
tags question: http://stackoverflow.com/q/27268744
tags question: http://stackoverflow.com/q/27230586
tags question: http://stackoverflow.com/q/27197717
tags question: http://stackoverflow.com/q/27308462
tags question: http://stackoverflow.com/q/27268319
tags question: http://stackoverflow.com/q/27304352
tags question: http://stackoverflow.com/q/27308302
tags question: http://stackoverflow.com/q/27278541
tags question: http://stackoverflow.com/q/27308371
tags question: http://stackoverflow.com/q/27199355
tags question: http://stackoverflow.com/q/27272506
tags question: http://stackoverflow.com/q/27266481
tags question: http://stackoverflow.com/q/27274450
tags question: http://stackoverflow.com/q/27182832
tags question: http://stackoverflow.com/q/27178268
tags question: http://stackoverflow.com/q/27175254
tags question: http://stackoverflow.com/q/27290671
tags question: http://stackoverflow.com/q/27174806
tags question: http://stackoverflow.com/q/27268262
tags question: http://stackoverflow.com/q/27271948
tags question: http://stackoverflow.com/q/27290300
tags question: http://stackoverflow.com/q/27252965
tags question: http://stackoverflow.com/q/27304749
tags question: http://stackoverflow.com/q/27192224
tags question: http://stackoverflow.com/q/27253723
tags question: http://stackoverflow.com/q/27282601
type: Tag
tags question: http://stackoverflow.com/q/27221625
tags question: http://stackoverflow.com/q/27216180
tags question: http://stackoverflow.com/q/27226554
tags question: http://stackoverflow.com/q/27268834
tags question: http://stackoverflow.com/q/27225718
tags question: http://stackoverflow.com/q/27178283
tags question: http://stackoverflow.com/q/27167295
tags question: http://stackoverflow.com/q/27158012
tags question: http://stackoverflow.com/q/27160979
tags question: http://stackoverflow.com/q/27304976
tags question: http://stackoverflow.com/q/27292179
tags question: http://stackoverflow.com/q/27307432
tags question: http://stackoverflow.com/q/27302919
tags question: http://stackoverflow.com/q/27214681
tags question: http://stackoverflow.com/q/27307110
tags question: http://stackoverflow.com/q/27232851
tags question: http://stackoverflow.com/q/27289134
tags question: http://stackoverflow.com/q/27193831
tags question: http://stackoverflow.com/q/27251690

http://stackoverflow.com/a/27196298
type: Answer
has comment: http://stackoverflow.com/comment/42878337
upvote count: 1
has comment: http://stackoverflow.com/comment/42877547
score: 1
has comment: http://stackoverflow.com/comment/42877911
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42878122
accepted answer of: http://stackoverflow.com/q/27196186
answers question: http://stackoverflow.com/q/27196186
has body: $(document).ready(function(){ $( ".navi li" ).has( "ul" ).mousemove(function(){ $(this).css('background','#222'); }); $( ".navi li" ).has( "ul" ).mouseleave(function(){ $(this).css('background','#fff'); }); }); and to avoid any conflict with :hover in css just add !important .navi li:hover{ background : #222 !important; }

rootscope
tags question: http://stackoverflow.com/q/27271162
type: Tag
tag name: rootscope

http://stackoverflow.com/comment/42838054
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27174108
has text: thanks, that's already great for the half filled button, but how can i style the three buttons differently? So that one button if clicked is completely filled, another one if clicked is half filled and for the third one only the border gets green.
score: 0

http://stackoverflow.com/comment/42957893
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27240716
has text: That would work, but then you could not use more than 1 of these within the same scope, and you would populate a `showIt` property on whatever scope is active for the element you use this directive on. What happens if you already have a `showIt` property on that scope?
type: AnswerComment

http://stackoverflow.com/q/27227461
has comment: http://stackoverflow.com/comment/42932464
has body: I'm quite new to Javascript, and I've been reading the documentation for the last couple of days trying to figure this out. I've finally had to resort to parading my ignorance here. I have an integer, which is the index of a character within a paragraph. I want to find the bounding rect of this character. I have been trying to do this by making a range that contains the character. So I have tried: var range = document.createRange(); range.setStart (node, offsetInsideNode); and for node I tried passing in the paragraph element, and for the offsetInsideNode I passed in the characterOffset integer. But then I found: "If the node element can have child nodes, then the offsetInsideNode parameter specifies the position of a child node in the childNodes collection of the node element, else it specifies a character position in the text content of the node element." But I want to ONLY use the character position. And I can't figure out how to do this, as it only seems to want to use child node position. I'm guessing I'm missing something. Say I have a paragraph: The quick brown fox jumps over the lazy dog And I want to find the bounding rect of the nth character, how would I go about this? Am I barking up the wrong tree and there is a much simpler way that I have overlooked? Thanks. notes: javascript only no libraries no jquery for UIWebview on an iOS device
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 8
upvote count: 8
possible better answer: http://stackoverflow.com/a/32477841
accepted answer: http://stackoverflow.com/a/27228805
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27228805
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/32477841
tagged with: ios
downvote count: 0
tagged with: javascript
has title: range.setStart using only character offset?

vb6
type: Tag
tag name: vb6
tags question: http://stackoverflow.com/q/27301955

http://stackoverflow.com/q/27260930
type: Question
has title: FancyBox iFrame - Link in iFrame to close FancyBox and open in original parent page
accepted answer: http://stackoverflow.com/a/27262357
has comment: http://stackoverflow.com/comment/42996415
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: fancybox
has answer: http://stackoverflow.com/a/27262357
has comment: http://stackoverflow.com/comment/42996268
type: AnsweredQuestion
has body: I have FancyBox link that opens a FancyBox (lightbox) iFrame php page. This php page has links on it and I want any of the links when clicked to close the FancyBox Lightbox and open the link in the original parent window... Here is my code so far... Launch Remote Control {literal} Any ideas?
score: 0
tagged with: fancybox-2

http://stackoverflow.com/a/27155652
type: Answer
answers question: http://stackoverflow.com/q/27155512
accepted answer of: http://stackoverflow.com/q/27155512
has body: zClip works by using zeroclipboard Adobe Flash plug-in to do the actual click handling and copying to the clipboard (since such functionality is not allowed in regular Javascript). This is for security reasons. The Adobe Flash plugin will allow copying to the clipboard if it is directly as the result of a user action in the Adobe Flash plugin such as a click. It will not allow it any other way. So, in order to support something like Alt-click, but not a regular click, the Adobe Flash plug-in that zclip uses would have to support that capability directly. When I look at the zeroclipboard source code, I do not see such a capability so I do not think it is possible without modifying the zeroclipboard source and creating a new .SWF flash program.
has comment: http://stackoverflow.com/comment/42811138
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/27272640
score: 1
has comment: http://stackoverflow.com/comment/43024165
upvote count: 1
has comment: http://stackoverflow.com/comment/43031690
has comment: http://stackoverflow.com/comment/43045643
has comment: http://stackoverflow.com/comment/43022334
has comment: http://stackoverflow.com/comment/43023544
has comment: http://stackoverflow.com/comment/43034696
has comment: http://stackoverflow.com/comment/43022681
answers question: http://stackoverflow.com/q/27272506
has body: map is a local variable inside your file. An ugly fix would be to replace it with window.map You should think about the scope of your variables and your dependencies. Its a huge topic. In the first place I'd do as follows: Gmaps = buildMap: (callback = -&gt;)-&gt; myOptions = center: new google.maps.LatLng 39.729001, -94.902342 zoom: 3, mapTypeId: google.maps.MapTypeId.ROADMAP Gmaps.map = new google.maps.Map $('.map')[0], myOptions callback() window.Gmaps = Gmaps then to create the map in your views: Gmaps.buildMap() to create and change center: Gmaps.buildMap(function(){ Gmaps.map.setCenter(43.652976, -79.390409); })
downvote count: 0
has comment: http://stackoverflow.com/comment/43023198
has comment: http://stackoverflow.com/comment/43023172
type: Answer
has comment: http://stackoverflow.com/comment/43022379
has comment: http://stackoverflow.com/comment/43022964

http://stackoverflow.com/comment/42942238
has text: @FredericLeFeurmou [Please stop using Programmers.se as your toilet bowl](http://meta.stackexchange.com/questions/73382/please-stop-using-programmers-se-as-your-toilet-bowl). [programmers.se] is for whiteboard development questions. Speculative conversations like this one are off topic most everywhere on the SE network *except for chat*.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27162387

http://stackoverflow.com/comment/42877226
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27196088
score: 0
has text: @Blackhole yes, its a keyword issue, can you make it as an answer, I will accept it?

http://stackoverflow.com/q/27302889
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27308156
score: 0
answer count: 1
has body: I have stuck by this problem for the last two days, and it's time for me to ask... Basically I've successfully draw the voronoi diagram on a map based on a .csv file look like this: salaryLevel, lat, lon -0.263031898 -1.957862 30.058205 -0.263031898 -1.960236 30.018172 0.510327701 -1.979509 30.044363 0.510327701 -1.919366 30.046766 0.510327701 -1.900015 30.034252 0.510327701 -1.926512 30.08714 -0.263031898 -1.923729 30.072793 0.510327701 -1.938892 30.07126 0.510327701 -1.950085 30.079418 Now I'm trying to add color the each section of the map based on the value of salary level as shown above. So basically for salary level between -1-0, using blue, between 0-0.5, using green, something like that. Here is the code I have for now: var vertices = salary.map(function(d) { return [+d.lon, +d.lat]; }); var median = salary.forEach(function(d) { d.median = +d.salaryLevel; }); var voronoi = d3.geom.voronoi() .clipExtent([0, 0], [width, height]); var max = d3.max(median, function(d) { return d; }); var min = d3.min(median, function(d) { return d; }); var color = d3.scale.quantize().domain([min, max]).range([0, 0.1, 0.3]); layer4.selectAll("path") .data(voronoi(vertices)) .enter().append("svg:path") .classed("voronoi", true) .attr("d", function(d) { return "M" + d.map(function(d) { return projection([d[0], d[1]]); }).join("L") + "Z"; }); I didn't find out a solution for the last two days, can someone help me? Thank you so much!
has comment: http://stackoverflow.com/comment/75441833
has answer: http://stackoverflow.com/a/27308156
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has comment: http://stackoverflow.com/comment/43072373
has title: How to add color to voronoi diagram based on certain value in d3.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43071475

http://stackoverflow.com/comment/43047326
has text: @kumar jerry: You will obviously need to minify the modified plugin script, but there are plenty of tools around to do that. Do you have any feedback on my answer?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27268404

http://stackoverflow.com/comment/42831457
comment on: http://stackoverflow.com/q/27153613
has text: @phtrivier Yes I am sending the items as a JSON Array. My question is what is a good way to handler changes of order on the client side? Should the client poll every x minutes to the get actual order or refresh the list by clearing and loading again. How would you do that?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42881022
score: 0
has text: No, I dont believe you have to define a max
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27197964

http://stackoverflow.com/comment/42882323
type: Comment
has text: what problem you are having with your current code ?
type: QuestionComment
comment on: http://stackoverflow.com/q/27198693
score: 0

http://stackoverflow.com/a/27190239
downvote count: 0
answers question: http://stackoverflow.com/q/27189944
type: Answer
score: 1
has body: Seeing that you're using Angular, you can use the angular.isDefined utility method, docs: function goError(thing){ if(angular.isDefined(thing)){ return thing; } throw 'Error: ' + thing; }
upvote count: 1

http://stackoverflow.com/comment/42992795
score: 0
type: Comment
has text: Right, my bad there, I was using the original code in my fiddle all along, updated now. I popped your blue color into [this example](http://www.html5canvastutorials.com/three/html5-canvas-three-js-lambert-material/) and it turned blue. I can't help you any further but good luck.
comment on: http://stackoverflow.com/a/27204195
type: AnswerComment

http://stackoverflow.com/q/27157248
has body: In this code window.onload is used to delay the execution of the script to prevent references to the canvas occurring before the canvas is loaded. Withing start() the code map.fillStyle="CCFFEE runs as expected. I did not use var when declaring the map variable so as to make global to be referenced by other functions such as draw() and start(). However, for some reason start() accepts the variable as is, and uses it as expected, drawing the rectangle (in this case the background) to the screen while draw() throws an error when trying to use the variable. Error: Uncaught ReferenceError: map is not defined. This also occurs in the update() function as well as in the global scope outside of any functions. This has been tested with console.log("Map: " + map);. I hope that was concise enough for you to help. window.onload=function() { init(); } var fps = 30; var now; var then = Date.now(); var interval = 1000/fps; var delta; function Player(x, y, w, h) { this.x = x; this.y = y; this.w = w; this.h = h; } function Collider(x, y, w, h) { this.x = x; this.y = y; this.w = w; this.h = h; } function init() { canvas = document.getElementById('map'); map = canvas.getContext('2d'); start(); } function start() { //Player Object player1 = new Player(gameMap.w / 3, (gameMap.h / 7) * 5, 30, 30); //Player Collider Object p1Collider = new Collider(player1.x - 15, player1.y - 5, player1.w + 30, player1.h + 130); //fillStyle and fillRect work here map.fillStyle="#CCFFEE"; map.fillRect(0, 0, 1280,800); } function update(){ //Error happens here too } function draw() { requestAnimationFrame(draw); now = Date.now(); delta = now - then if (delta &gt; interval) { then = now - (delta % interval); } //Character Collider //fillStyle and fillRect do not work here //Throws error: Uncaught ReferenceError: map is not defined map.fillStyle="#CCFFEE"; map.fillRect(p1Collider.x, p1Collider.y, p1Collider.w, p1Collider.h); } update(); draw;
type: Question
has comment: http://stackoverflow.com/comment/42809443
has comment: http://stackoverflow.com/comment/42808728
tagged with: javascript
tagged with: scope
score: 0
has title: Global object declared in function not accessible by other functions
tagged with: canvas
answer count: 1
tagged with: global
has comment: http://stackoverflow.com/comment/42827809
linked to: http://stackoverflow.com/q/2485423
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27157298
accepted answer: http://stackoverflow.com/a/27157298

http://stackoverflow.com/a/68164279
score: 0
type: Answer
has body: This worked for me in Bootstrap 5: const toggler = document.querySelector('#popoverspan'); const popover = bootstrap.Popover.getInstance(toggler); if (popover) { popover.dispose(); } new bootstrap.Popover(toggler, options);
answers question: http://stackoverflow.com/q/27238938

http://stackoverflow.com/q/27261402
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27261803
has comment: http://stackoverflow.com/comment/42995892
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27261803
has title: How to get a name of a number based on its value?
has body: I want to have a function getNumName() which, when given a number, will output a string that is that number's name and vice versa. I have not been able to achieve the former nor the latter, but the latter I've gotten frustratingly close to: function getNameNum(num){ // string =&gt; num var x = document.createElement("div"); $(x).load("https://www.google.com/search?q="+num+"+plus+zero #cwos"); return x.innerHTML; } Which would force Google to return its calculator, then grab that number, and return it. However, I get a CORS (Cross-Origin Request Blocked) error (Darn! Google has protection!). I had an idea for a solution for the former: function getNumName(num){ // num -&gt; string var names = ["zero","one","two","three","four",...] return names[+num]; } But this seems highly impractical. If I have these two functions for the natural numbers, I can easily extend it to the negative numbers (with Math.sign().replace("-","negative ")), then extend that to the real numbers (num+"".split(".")[1].split("").forEach(...)...). The big problem is: How can I achieve these two functions? I am willing to use an external library of sorts and jQuery. getNameNum() -&gt; name =&gt; num getNumName() -&gt; num =&gt; name
upvote count: 2
downvote count: 1
type: Question

http://stackoverflow.com/comment/42933855
has text: @Doge - Where is the definition of `riteg`?
comment on: http://stackoverflow.com/q/27228048
type: Comment
type: QuestionComment
score: 1

variables
tag name: variables
tags question: http://stackoverflow.com/q/27277412
tags question: http://stackoverflow.com/q/27220348
tags question: http://stackoverflow.com/q/27198359
tags question: http://stackoverflow.com/q/27290190
tags question: http://stackoverflow.com/q/27247557
tags question: http://stackoverflow.com/q/27251854
tags question: http://stackoverflow.com/q/27261478
type: Tag
tags question: http://stackoverflow.com/q/27277629
tags question: http://stackoverflow.com/q/27196320
tags question: http://stackoverflow.com/q/27275903
tags question: http://stackoverflow.com/q/27213418
tags question: http://stackoverflow.com/q/27272115
tags question: http://stackoverflow.com/q/27171572
tags question: http://stackoverflow.com/q/27203383
tags question: http://stackoverflow.com/q/27237944
tags question: http://stackoverflow.com/q/27269335
tags question: http://stackoverflow.com/q/27255127
tags question: http://stackoverflow.com/q/27196224
tags question: http://stackoverflow.com/q/27197695
tags question: http://stackoverflow.com/q/27254983
tags question: http://stackoverflow.com/q/27257129
tags question: http://stackoverflow.com/q/27204283
tags question: http://stackoverflow.com/q/27158119
tags question: http://stackoverflow.com/q/27170423

http://stackoverflow.com/a/27236811
has comment: http://stackoverflow.com/comment/42984388
type: AcceptedAnswer
has body: Upon investigating it further, I found that module.parent was exactly what I was looking for. What I was trying to avoid was having to pass it in to every single require statement every single time. By utilizing module.parent, I was able to simply pass it to the initial required module, and then the children simple uses the parent to retrieve the request, if it is not explicitly being passed to it already. I can then access the request object without having to explicitly pass it down tens of levels.
has comment: http://stackoverflow.com/comment/42952836
has comment: http://stackoverflow.com/comment/42951983
has comment: http://stackoverflow.com/comment/42952242
type: Answer
has comment: http://stackoverflow.com/comment/42953028
has comment: http://stackoverflow.com/comment/42952209
has comment: http://stackoverflow.com/comment/42953192
accepted answer of: http://stackoverflow.com/q/27236542
has comment: http://stackoverflow.com/comment/42983968
has comment: http://stackoverflow.com/comment/42952942
answers question: http://stackoverflow.com/q/27236542
has comment: http://stackoverflow.com/comment/42950222
has comment: http://stackoverflow.com/comment/42953221
score: 0

http://stackoverflow.com/comment/42827343
type: QuestionComment
has text: You might want to check your regional settings or try another browser. See if the problem still occurs
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27167655

http://stackoverflow.com/q/27221839
upvote count: 1
has body: I am trying to solve the problem of giving a unique code to each each address. I am currently aiming this towards India where each home is identified by apartment number(like 101), apartment name, street name, locality, city. Typical address looks like Flat No 101, john hopkins Apartment,5th cross, 1st main, Banneghatta 3rd layout, bangalore, Pincode - 500781 Flat No 101, john reddy Apartment, Sunset Road, Banneghatta 3rd layout, bangalore, pincode - 500765 Even though pincodes are widely used, it represents an area with few thousands of houses rather than a home. I want to give a unique code to each home which would be easy to remember, uniqueto address and used by everybody. These address can be anything ranging from sectors, street numbers, street names, locality names, landmark etc Some of the formats I am currently thinking are 101johnhopbanblr,101johnredbanblr etc which I point to the gps coordinates of the home and with internet and correct code, we can navigate to correct location. What is the best way to design those codes? If the gps coordinates point to a building and apartment inside that building is navigated by its number, that number should be easily understandable from code.
answer count: 1
has comment: http://stackoverflow.com/comment/42922931
has title: Simple Suggestion / Recommendation Algorithm for readable shortner
tagged with: autosuggest
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27223195
score: 1
type: Question
tagged with: performance
tagged with: readability
tagged with: algorithm
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27245235
has title: Money.js + LocalStorage rates
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: intel-xdk
has body: I'm using Intel XDK to make a conversion tool, my script detects if the device has internet connection, if YES use this to get the latest rate from openexchangerates via JSON and storage it in localstorage: $.getJSON('https://openexchangerates.org/api/latest.json?app_id=XXXXXXXXXXXXXXXXXXXXXXXXXX',function(data) { var localData = JSON.stringify(data); localStorage.setItem('convrates', localData); // Check money.js has finished loading: if ( typeof fx !== "undefined" &amp;&amp; fx.rates ) { fx.rates = data.rates; fx.base = data.base; } else { // If not, apply to fxSetup global: var fxSetup = { rates : data.rates, base : data.base } } }); This is ok! But when try to get this info from localstorage, nothing happens... var localData = JSON.parse(localStorage.getItem('convrates')); $.getJSON(localData,function(data) { // Check money.js has finished loading: if ( typeof fx !== "undefined" &amp;&amp; fx.rates ) { fx.rates = data.rates; fx.base = data.base; } else { // If not, apply to fxSetup global: var fxSetup = { rates : data.rates, base : data.base } } }); This is the JSON data exemple: { "disclaimer": "Exchange rates are provided for informational purposes only, and do not constitute financial advice of any kind. Although every attempt is made to ensure quality, NO guarantees are given whatsoever of accuracy, validity, availability, or fitness for any purpose - please use at your own risk. All usage is subject to your acceptance of the Terms and Conditions of Service, available at: https://openexchangerates.org/terms/", "license": "Data sourced from various providers with public-facing APIs; copyright may apply; resale is prohibited; no warranties given of any kind. Bitcoin data provided by http://coindesk.com. All usage is subject to your acceptance of the License Agreement available at: https://openexchangerates.org/license/", "timestamp": 1417507252, "base": "USD", "rates": { "AED": 3.673268, "AFN": 57.871426, "ALL": 112.5408, "AMD": 439.297503, "ANG": 1.7891, "AOA…
type: Question
has answer: http://stackoverflow.com/a/27266688
possible better answer: http://stackoverflow.com/a/27261566
tagged with: money.js
tagged with: javascript
has answer: http://stackoverflow.com/a/27261566
answer count: 2
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27266688
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/38757381
downvote count: 0
answers question: http://stackoverflow.com/q/27250780
type: Answer
upvote count: 3
score: 3
has body: function fillArray(n, i, a) { a.push(i); return a.length &lt; n ? fillArray(n, ++i, a) : a; } console.log(fillArray(10, 0, []));

http://stackoverflow.com/q/27236960
favorite count: 0
has answer: http://stackoverflow.com/a/32672897
linked to: http://stackoverflow.com/q/23551418
has comment: http://stackoverflow.com/comment/42952205
score: 5
accepted answer: http://stackoverflow.com/a/28664505
tagged with: generator
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42950638
has comment: http://stackoverflow.com/comment/42952921
has title: ES6 generators- are they really an alternative to async/await?
type: Question
possible better answer: http://stackoverflow.com/a/27238926
tagged with: typescript
has comment: http://stackoverflow.com/comment/42950583
has answer: http://stackoverflow.com/a/27238926
upvote count: 5
tagged with: async-await
tagged with: javascript
tagged with: ecmascript-6
has answer: http://stackoverflow.com/a/28664505
answer count: 3
has comment: http://stackoverflow.com/comment/42952171
has comment: http://stackoverflow.com/comment/42950612
downvote count: 0
has body: One of the posts in the comments section of this typescript blog post says: If I have to wait until 2.0 for ES6 generator support, I'm just gonna stick with Traceur. Generators are a big deal, they give you async/await support today using libraries such as Koa, Co, Bluebird, etc. Async/await keywords would allow applications to retain a logical structure that resembles synchronous code. How would one use a generator to accomplish something similar? For example, how would you use a generator in conjunction with an ajax call to produce synchronous style code that avoids using callbacks?

http://stackoverflow.com/q/27164404
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27165104
has answer: http://stackoverflow.com/a/37229736
score: 50
upvote count: 50
tagged with: jasmine
possible better answer: http://stackoverflow.com/a/55822482
has answer: http://stackoverflow.com/a/47646145
favorite count: 0
tagged with: promise
has answer: http://stackoverflow.com/a/55822482
answer count: 5
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/47702698
has answer: http://stackoverflow.com/a/27165104
has title: Test if a promise is resolved or rejected with Jasmine in Nodejs
type: Question
has body: I know how to do it in Mocha but want to know how to do it with Jasmine. I tried this describe('test promise with jasmine', function() { it('expects a rejected promise', function() { var promise = getRejectedPromise(); // return expect(promise).toBe('rejected'); return expect(promise.inspect().state).toBe('rejected'); }); }); However, the state is always pending and, of course, the test fails. I couldn't find any example online that I could make it work. Can someone please help me with this? Thanks.

http://stackoverflow.com/q/27164957
type: AnsweredQuestion
type: Question
tagged with: angular-ui-router
accepted answer: http://stackoverflow.com/a/27165429
has comment: http://stackoverflow.com/comment/42822459
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27165429
answer count: 1
tagged with: angular-ui
has title: Retain parent state in AngularUI Router
tagged with: angularjs
has body: I'm developing an application with AngularJS which has a phonebook. The state page.phonebook contains a list with users and companies and a form with filters. The data is loaded via ngResource from the backend. If I click on a user, I'm getting to the users detail page. When I now do a browser back (backspace), I'm getting back to the phonebook list, but with a new $scope. That means that I lost the old state with all my filters, data, etc. I guess the problem is that I load the state page.phonebook.user in the page view, which replaces the page.phonebook state. But is it somehow possible to retain the old state? This includes the scroll position, the filter values and the data from the server. This is my state configuration: $stateProvider .state('page', { abstract: true, controller: 'PageController', templateUrl: 'app/templates/page.html', }) .state('page.phonebook', { url: "^/phonebook", templateUrl: 'app/templates/page.phonebook.html', controller: 'PhonebookController' }) .state('page.phonebook.user', { url: "^/user/:userId", views: { '@page': { controller: 'UserController', templateUrl: 'app/templates/page.user.html' } } });

http://stackoverflow.com/a/27302232
has body: Check out this approach: JS var table = document.getElementById('table'); function addRows(table, rows, columns){ var row = ''; for (var i = 0; i &lt; rows; i++){ row = '&lt;tr&gt;'; for(var j = 0; j &lt; columns; j++){ row += '&lt;td&gt;' + j +'&lt;/td&gt;' } row += '&lt;/tr&gt;'; table.innerHTML += row } } addRows(table, 24, 8); HTML &lt;table id="table"&gt; &lt;/table&gt; Check out this codepen.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27301768
answers question: http://stackoverflow.com/q/27301768
upvote count: 1
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42869221
comment on: http://stackoverflow.com/a/27191602
type: AnswerComment
score: 0
type: Comment
has text: the HTML string *will be* very large (see my project with potentially thousands of text elements)

http://stackoverflow.com/comment/47499950
type: Comment
comment on: http://stackoverflow.com/q/27302242
score: 0
has text: @proyecthd I'm replying late and probably you already found a solution for this, but I added an answer that could help you to the link that jsalonen commented. It wouldn't require to modify anything on the header/footer, and it doesn't need jQuery to be included before the scripts (so no `$ is not defined`)
type: QuestionComment

http://stackoverflow.com/comment/42948133
type: Comment
comment on: http://stackoverflow.com/a/27214337
has text: OK. I'm workong on code subset and will post it as a new issue,
score: 0
type: AnswerComment

postgresql
tags question: http://stackoverflow.com/q/27239762
tag name: postgresql
tags question: http://stackoverflow.com/q/27289231
type: Tag

http://stackoverflow.com/comment/42828402
comment on: http://stackoverflow.com/a/27168426
score: 0
type: AnswerComment
has text: Wow. i am out of mind and It solved my problem. Simple solutions are always difficult find. Thanks a lot
type: Comment

http://stackoverflow.com/a/27243579
upvote count: 1
answers question: http://stackoverflow.com/q/27243151
downvote count: 0
type: Answer
has body: function myData(){ x = document.getElementById("GridView2").rows.length; for(i=1;i<x;i++){ var tr = document.getElementsByTagName("tr")[i]; var tdl = tr.getElementsByTagName("td").length; for(j=0;j<tdl;j++){ var td = tr.getElementsByTagName("td")[j]; alert(td.innerHTML); } } } hname haddress hphone hhours hrating hlat hlong Kaiser Permanante 200 Fremont boulevard 5105199000 Mon-Fri : 8:00 AM - 11:00 PM, Sat, Sun: 10:00 AM- 6:00PM 3 37.23961 -121.800278 click
score: 1

http://stackoverflow.com/q/27185588
accepted answer: http://stackoverflow.com/a/27214029
score: 0
answer count: 1
tagged with: jsp
tagged with: dojo
type: AnsweredQuestion
tagged with: java
has body: As I am trying to upload my profile pic using dojox Uploader,I am unable to upload a file using form with methods post or put(as I can update my pic).Below I have added my part of the function, request.post(url, { data: { data:domForm.toObject("profileForm"), //complete form attachment:dijit.byId("attachment")._files[0].name // attachment }, handleAs : "json", timeout: 2000, headers: { 'userId' : userId, 'companyId' : companyId, 'token' : token, "Content-Type" : "multipart/form-data", 'Accept': 'application/json' } my HTML part, &lt;form id="profileForm" enctype="multipart/form-data" action="" method="post"&gt; &lt;input name="attachment" multiple="false" type="file" data-dojo-type="dojox/form/Uploader" label="Select Some Files" id="attachment" /&gt; &lt;input type="button" class="submit" value="submit" id="profilebtnId" onclick="changeProfilePic();" /&gt; &lt;/form&gt; the Java code: @Path(UserRESTOperations.PROFILE_PIC) @POST //@PUT @Consumes({ MediaType.MULTIPART_FORM_DATA}) public Response setUserProfilePic(@PathParam(RestPathConstants.ID_PARAM) Integer userId, @Context HttpServletRequest request) {} I am able hit the API but not able pass the content(request) to the backend (java).Sorry for my grammer.
type: Question
has title: Unable to Upload a file using dojo 1.9
tagged with: javascript
has answer: http://stackoverflow.com/a/27214029

http://stackoverflow.com/a/27289876
answers question: http://stackoverflow.com/q/27250591
score: 1
upvote count: 1
has body: I removed file saver from applicationModuleVendorDependencies and it worked
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42976272
comment on: http://stackoverflow.com/a/27250983
type: AnswerComment
score: 0
type: Comment
has text: did you call the jquery library in your code.?

http://stackoverflow.com/a/27190062
type: Answer
answers question: http://stackoverflow.com/q/27189849
has body: The options parameter of the exec command is not there to contains your argv. You could put your parameters directly with the child_process.exec function : var exec = require('child_process').exec; var args = " -d '{'title': 'Test' }' -H 'Content-Type: application/json' http://125.196.19.210:3030/widgets/test"; exec('curl ' + args, function (error, stdout, stderr) { console.log('stdout: ' + stdout); console.log('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } }); If you want to use the argv arguments, you can use child_process.execFile function: var execFile = require('child_process').execFile; var args = ["-d '{'title': 'Test' }'", "-H 'Content-Type: application/json'", "http://125.196.19.210:3030/widgets/test"]; execFile('curl.exe', args, {}, function (error, stdout, stderr) { console.log('stdout: ' + stdout); console.log('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } });
upvote count: 10
has comment: http://stackoverflow.com/comment/72363758
score: 10
downvote count: 0

http://stackoverflow.com/comment/43165415
comment on: http://stackoverflow.com/q/27291021
has text: Just as a note about jQuery event: Events emitted with `$(elm).trigger(yourEvent)` are no real events and do not do real DOM bubbling (at least the last time I looked into jQuery), cause of that those event are only detected by jQuery itself.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42959793
type: Comment
comment on: http://stackoverflow.com/q/27229135
has text: Sorry, was in a hurry. To explain myself: random characters appearing at one end of a buffer is indicative of bad buffer re-use somewhere. That line I gave you to try will hook on some debug events in the `FastBufferList` implementation the websocket lib is using and allow me to trace the code path its taking.
score: 0
type: QuestionComment

http://stackoverflow.com/q/27268262
has comment: http://stackoverflow.com/comment/43012309
type: Question
linked to: http://stackoverflow.com/q/11126396
score: 1
has answer: http://stackoverflow.com/a/74486748
has title: How to add multiple markers in embedded Google map
tagged with: google-maps
has comment: http://stackoverflow.com/comment/43011793
upvote count: 1
has comment: http://stackoverflow.com/comment/43018892
tagged with: google-maps-embed
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44643892
favorite count: 0
has comment: http://stackoverflow.com/comment/43009403
has comment: http://stackoverflow.com/comment/43019919
has comment: http://stackoverflow.com/comment/43018640
has comment: http://stackoverflow.com/comment/43009322
has comment: http://stackoverflow.com/comment/43009232
has body: I want to put multiple markers in my embedded map. I'm using iframe to embed the map. for 1 origin and 1 destination, it is working perfectly, but my requirement is to show multiple destinations with markers in the embedded map. I searched a lot but They say that you can't add multiple markers in an embedded map. Is it true? if not then please help me out here.Here is the 1 line code which I'm using to display the origin and destination.Thanks in advance &lt;iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/directions?key=API_KEY&amp;origin=Mumbai&amp;destination=Nagpur&amp;avoid=tolls|highways"&gt; It is working perfectly but I want to add multiple destinations along with "Nagpur". working example using waypoints https://maps.googleapis.com/maps/api/directions/json?origin=mumbai&amp;destination=pune&amp;waypoints=raigad|nashik
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43019277

wamp
tags question: http://stackoverflow.com/q/27195210
tag name: wamp
type: Tag

http://stackoverflow.com/comment/44603524
type: Comment
score: 0
has text: Hi, Could you elaborate this on code pelase? Also write that as an answer so we can vote.
type: QuestionComment
comment on: http://stackoverflow.com/q/27299721

http://stackoverflow.com/a/27176549
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27160485
answers question: http://stackoverflow.com/q/27160485
has body: Expanding upon your own answer, you could use moment.js, wrap it into an AngularJS service, and create a really flexible solution: .directive('dateFormat', ['moment', function (moment) { return { restrict: 'A', require: 'ngModel', link: function ($scope, $element, $attrs, ngModelCtrl) { ngModelCtrl.$parsers.unshift(function (viewValue) { return moment(viewValue, $attrs.dateFormat).toDate(); }); ngModelCtrl.$formatters.push(function (modelValue) { return moment(modelValue).format($attrs.dateFormat); }); } }; }]) which would be used like this: &lt;input type="text" ng-model="some.model" date-format="MM/DD/YYYY"&gt;

http://stackoverflow.com/q/27169725
tagged with: ruby-on-rails
answer count: 1
tagged with: javascript
tagged with: jsplumb
type: UnansweredQuestion
type: Question
has title: jsplumb disable adding the class
has body: I use jsPlumb library and I run into problem: in object $(".#{instance_id}") added class _jsPlumb_endpoint_anchor_. How disable adding class to this object? My code on coffee script: jsPlumb.connect source: port_id target: instance_id
score: 0
has answer: http://stackoverflow.com/a/27182111
tagged with: coffeescript

http://stackoverflow.com/comment/42890214
score: 0
type: AnswerComment
type: Comment
has text: It seems to me you are suggesting a valid methodology to solve the highlighting part only. Am I right? What about the linking part? Thanks, michele.
comment on: http://stackoverflow.com/a/27201904

http://stackoverflow.com/a/27214463
has comment: http://stackoverflow.com/comment/42910588
has body: if 'i' is the number of circle clicked, starting from 0, this should work. $('#'+(i+1)).show();
downvote count: 0
has comment: http://stackoverflow.com/comment/42916937
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27214203
score: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27214203

http://stackoverflow.com/a/27171782
type: Answer
answers question: http://stackoverflow.com/q/27170942
has body: You could connect to the change event from your dateTextBox and hook up a handler. You should note that this won't prevent the form from submitting when a user presses enter. var dateTextBox = registry.byId('dateTextBox'); var submitButton = registry.byId('submitButton'); dateTextBox.on('change', function(e){ var result = dateTextBox.validate(); submitButton.set('disabled', result); }); If you want more control over your forms i would recommend wrapping your form element in a dijit/form/Form. Check the reference: http://dojotoolkit.org/reference-guide/1.10/dijit/form/Form.html for examples.
score: 0
has comment: http://stackoverflow.com/comment/42894614
has comment: http://stackoverflow.com/comment/43197760

http://stackoverflow.com/q/27216221
tagged with: grunt-contrib-copy
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
answer count: 0
has body: Looks like it's not re-copying my files when I click save anywhere on my development files (so I want to re-copy onto the Production folder immediately). Here is the part from my Gruntfile.js. Location of this file: /development/Gruntfile.js Where I want to copy some files: /production [...] copy: { watch: { options: { livereload: true }, files: [ {expand: true, src: ['css/*'], dest: '../production/', filter: 'isFile'}, {expand: true, src: ['js/*'], dest: '../production/', filter: 'isFile'}, {expand: true, src: ['js/vendor/*'], dest: '../production/', filter: 'isFile'}, {expand: true, src: ['images/**'], dest: '../production/'}, {expand: true, src: ['public/**'], dest: '../production/'}, {expand: true, src: ['.htaccess', '404.html', 'apple-touch-icon-precomposed.png', 'crossdomain.xml', 'favicon.ico', 'humans.txt', 'index.html', 'index.php', 'LICENSE.md', 'README.md', 'robots.txt'], dest: '../production/'} ] } }, php: { watch: { options: { livereload: true, bin: 'C:/php/php.exe', ini: 'C:/php/php.ini', base: '../production', port: 8000 } } }, watch: { options: { livereload: true }, site: { files: ['*.html', '*.php', 'public/*.html', 'public/*.php'], tasks: ['php'], options: { spawn: false } } } [...] grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-php'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['uglify', 'replace', 'stylus', 'cssmin', 'copy:watch', 'php:watch', 'watch']); I always need to restart the script, to re-send the files into "production" folder. Thank You for your help! UPDATE I made an alter solution: everything happening in development folder, and if I want I can push to the production folder with command line. This way I see the final product in local PHP webserver in the development folder, not production. grunt.registerTask('default', ['uglify', 'replace', 'stylus', 'cssmin', 'php:watch', 'watch']); grunt.registerTask('copytoproduction', ['copy']);
upvote count: 1
tagged with: grunt-contrib-watch
type: Question
has title: grunt-copy not re-sending the files from my 'development' folder into 'production', when I modify a file
score: 1
tagged with: gruntjs

http://stackoverflow.com/q/27184627
type: Question
has answer: http://stackoverflow.com/a/35296932
upvote count: 2
tagged with: twitter-bootstrap
tagged with: animation
tagged with: scroll
answer count: 1
has body: I did add JavaScript code for animating scrolling with menu to each block with an ID. Then I added Bootstrap's tabs which got messed up because of my animation scrolling. I wonder how I can make my scroll animation stop working on bootstrap tabs? Scroll animation code $(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 }, 800); return false; } } }); }); Bootstrap tabs Home Profile Messages Settings ... ... ... ...
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
has title: Exclude scroll animation function from some ID's

http://stackoverflow.com/comment/42980548
comment on: http://stackoverflow.com/q/27252907
type: Comment
has text: Why do this with JavaScript? Remove your dependency on the client having JavaScript enabled and just add the random number when the HTML is generated (server-side)
score: 0
type: QuestionComment

http://stackoverflow.com/a/27265982
type: AcceptedAnswer
has body: The jQuery Solution: First you need to put this in the &lt;head&gt; of the markup : &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; Change: &lt;input type="button" name="test" value="Edit" id="amol" onclick="check();"/&gt; To: &lt;input type="button" name="test" value="Edit" id="amol"/&gt; And jQuery snppet be like: $(document).ready(function () { $("table tr").click(function () { alert(this.rowIndex); // alert the index number of the clicked row. }); }); Working Fiddle
type: Answer
accepted answer of: http://stackoverflow.com/q/27265898
answers question: http://stackoverflow.com/q/27265898
score: 0

http://stackoverflow.com/q/27283709
has answer: http://stackoverflow.com/a/33166567
answer count: 1
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43036302
has comment: http://stackoverflow.com/comment/43036942
has body: I'm adapting this jQuery autocomplete plugin into a directive - https://github.com/devbridge/jQuery-Autocomplete. I have a directive that works: App.directive('autocomplete', -&gt; return { restrict: 'A', link: ($scope, elem, attr) -&gt; console.log(attr.autocomplete) elem.autocomplete({ serviceUrl: '/videos/autocomplete/' + attr.autocomplete }) } ) However, when I select something in the autocomplete list, the two way data-binding messes up, and only the input is updated. Any ideas on how to fix this?
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: angularjs
has title: Angular directive throws off two-way data binding
type: Question
has comment: http://stackoverflow.com/comment/43035739
has comment: http://stackoverflow.com/comment/43035819
tagged with: data-binding
score: 0

http://stackoverflow.com/q/27272656
tagged with: javascript
has title: how to use knockout validation
tagged with: breeze
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27277590
has answer: http://stackoverflow.com/a/27276408
linked to: http://stackoverflow.com/q/26570638
type: Question
has comment: http://stackoverflow.com/comment/43019125
linked to: http://stackoverflow.com/q/23478929
tagged with: knockout.js
linked to: http://stackoverflow.com/q/8996449
score: 0
tagged with: knockout-validation
answer count: 2
has comment: http://stackoverflow.com/comment/43019161
has body: I am following this link to create validations. But i dont understand how can i use this extend method in my code. I load data into my observable with records coming from calling breeze query. I load data in below manner dataObsArray= ko.observableArray() datacontext.getData(id,dataObsArray) .then(function () { // some logic }) .fail("Data not found"); Then i bind this obs array to my view as below name So i dont understand how can i use extend method because i am just using binding my view with properties in my observable array. Please guide me.

http://stackoverflow.com/comment/42808103
comment on: http://stackoverflow.com/a/27156872
has text: @brhardwick My bad, I wasn't aware of that feature, however, looking at the docs, that `#Navigation` would actually only load that section, so it's not a way of jumping either.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42898373
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27207948
has text: As @JLRishe said You need a callback to be triggered when the promise is satisfied, but that is only part of your code I don't see that you analyze the Json properly...
type: Comment

http://stackoverflow.com/comment/43055103
type: Comment
has text: I think that makes sense! How wrong would it be to, say, change the command in the method to "console.log(view.currentMove);"?
comment on: http://stackoverflow.com/a/27295104
type: AnswerComment
score: 0

http://stackoverflow.com/q/27302778
has body: I can spawn a gpg child process and decrypt a file normally if I just run the app normally. /app.js var spawn = require('child_process').spawn; function decrypt() { var gpg = spawn('gpg', ['--no-use-agent', '--passphrase', 'My Passphrase', './test.pdf.asc']); gpg.on('close', function (code) { console.log(code); // code == 0 }); } decrypt(); run the app.js as regular process and can decrypt the file node app.js However, when I try to run the app.js as daemon using pm2, upstart, etc... I got the error code (2) and could not decrypt the file run the app.js a a daemon pm2 start app.js
tagged with: child-process
favorite count: 0
has comment: http://stackoverflow.com/comment/43074374
has comment: http://stackoverflow.com/comment/43073364
has comment: http://stackoverflow.com/comment/43073147
has comment: http://stackoverflow.com/comment/43070457
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43091121
tagged with: encryption
tagged with: node.js
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43072888
has title: How to spawn a gpg child process from a daemon in nodejs?
has comment: http://stackoverflow.com/comment/43073388
tagged with: gnupg
type: Question
has comment: http://stackoverflow.com/comment/43071290
tagged with: javascript
has answer: http://stackoverflow.com/a/27315745
downvote count: 0
answer count: 1

http://stackoverflow.com/q/27197175
has comment: http://stackoverflow.com/comment/42880648
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/42880312
type: Question
has comment: http://stackoverflow.com/comment/42879148
has title: Javascript Total Duration of Function Execution?
score: -1
has comment: http://stackoverflow.com/comment/42915555
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27197304
favorite count: 0
has comment: http://stackoverflow.com/comment/42879294
has comment: http://stackoverflow.com/comment/42879181
has comment: http://stackoverflow.com/comment/42879789
has body: //this is a loop every 10 seconds it will run again and again. function GetSomthing(){ start = new Date().getTime() //do someting end = new Date().getTime() } TotalTime = (end - start);//Total Time reset every time the function restart execution We will get total time taken to execute the GetSomthing function on the variable "TotalTime". When The GetSomthing function calls again the "TotalTime" Starts Again from Zero. I need to save "TotalTime" to a variable that shows overall the Time taken by Main Function regardless of GetSomthing Function. Can We save TotalTime = (end - start); to an array and sum all array values to a new variable?
has comment: http://stackoverflow.com/comment/42879675

http://stackoverflow.com/a/27170795
has comment: http://stackoverflow.com/comment/42837357
type: Answer
upvote count: 1
has body: You could just add this document.getElementById("msg").value=''; before the following statement: return false;
score: 1
has comment: http://stackoverflow.com/comment/42837782
downvote count: 0
answers question: http://stackoverflow.com/q/27170746

http://stackoverflow.com/a/27174391
has body: I have had the exact same problem, the solution was to remove the timezone component of the date part. To solve the problem in a more generic way I had written a directive csapp.directive("csDateToIso", function () { var linkFunction = function (scope, element, attrs, ngModelCtrl) { ngModelCtrl.$parsers.push(function (datepickerValue) { return moment(datepickerValue).format("YYYY-MM-DD"); }); }; return { restrict: "A", require: "ngModel", link: linkFunction }; }); above directive removes the timezone part and only considers the date part of the ISO date format input. I do use moment.js for date manipulations. But you can easily convert above to not use moment.js EDIT use it like below &lt;input ng-model='abc' cs-date-to-iso ui-datepicker&gt;
has comment: http://stackoverflow.com/comment/56414317
type: Answer
accepted answer of: http://stackoverflow.com/q/27172394
upvote count: 19
answers question: http://stackoverflow.com/q/27172394
score: 19
has comment: http://stackoverflow.com/comment/45274007
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27165821
score: 2
accepted answer of: http://stackoverflow.com/q/27165686
upvote count: 2
has body: use this
answers question: http://stackoverflow.com/q/27165686
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/27227436
has body: I am trying to write a horizontally scrolling, draggable/sortable list using packery. Basically I want to make a horizontal version of this codepen: http://codepen.io/desandro/pen/cbhDG I have tried to modify it, and can get a horizontal list with scrollbar going no problem, the trouble is that as soon as i apply packery it wants to wrap the cells down vertically and it seems to remove the overflow, i cant find a way to control the size of the packery container here is my attempt so far: http://codepen.io/anon/pen/dPYXJG haml: %div.all-slides %div.slides - (1..12).each do |i| %div.slide %div#cloned-slides.cloned-slides css: html, body { height: 100%; width:100%; overflow: hidden; background: #8D939D; margin: 0; } .all-slides { width: 100%; height: 120px; white-space: nowrap; overflow-y: hidden; overflow-x: scroll; -webkit-overflow-scrolling: touch; padding: 1rem; background-color: #ccc; } .slide { display:inline-block; width: 100px; height: 60px; background: green; position: relative; margin:3px; z-index: 5; user-select: none; } javascript: docReady( function() { var slidesElem = document.querySelector('.slides'); var slideSize = getSize( document.querySelector('.slide') ); var pckry = new Packery( slidesElem, { columnWidth : slideSize.outerWidth, rowHeight: slideSize.outerHeight }); // get item elements var itemElems = pckry.getItemElements(); // for each item... for ( var i=0, len = itemElems.length; i &lt; len; i++ ) { var elem = itemElems[i]; // make element draggable with Draggabilly var draggie = new Draggabilly( elem, { axis: 'x' }); // bind Draggabilly events to Packery pckry.bindDraggabillyEvents( draggie ); } // re-sort DOM after item is positioned pckry.on( 'dragItemPositioned', function( _pckry, draggedItem ) { var index = pckry.items.indexOf( draggedItem ); var nextItem = pckry.items[ index + 1 ]; if ( nextItem ) { slidesElem.insertBefore( draggedItem.element, nextItem.element ); } else { slidesElem.appendChild( draggedItem.element ); } }); }); any help…
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27228855
type: Question
score: 0
answer count: 1
tagged with: horizontal-scrolling
tagged with: packery
has answer: http://stackoverflow.com/a/27228855
has title: Packery horizontal scrolling layout issue

http://stackoverflow.com/a/28957938
answers question: http://stackoverflow.com/q/27229398
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Persona/BrowserID is not a general-puropse signature scheme. For that, you might want to look at JSON Web Signature (JWS), for which there is library support in many languages. The navigator.id.request API does not provide a way to pass arbitrary data into the provisioning workflow, so the standard Persona JavaScript would not be able to accomplish this. You would have to use customised JavaScript that provides the provisioning callback with custom data rather than a public key object. If you get this far, whether you can get the identity provider to sign arbitrary data will depend on how the IdP software treats the public key argument. For example, the Haskell persona library treats the public key argument opaquely; it will certify any arbitrary JSON 'Value' (see source). On the other hand, if the IdP software expects to parse a valid key object in the format generated by the JavaScript mediator code, then you will not be able to sign arbitrary data. In conclusion: if you host customised JavaScript to pass arbitrary data to the IdP rather than a public key, and if the IdP's software treats the public key as an opaque value, then you can sign arbitrary data with Persona.
has comment: http://stackoverflow.com/comment/46260846
accepted answer of: http://stackoverflow.com/q/27229398
score: 1
upvote count: 1

http://stackoverflow.com/a/71522578
has body: I would loop through the elements the example page is https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select let optionList = []; for (let index = 1; index < 99999; index++) { try{ const optionValue = await driver.findElement(By.xpath(`//*[@id="cars"]/option[${index}]`)); optionList.push(optionValue.getText()); } catch { break; } }
type: Answer
answers question: http://stackoverflow.com/q/27273262
score: 0

http://stackoverflow.com/comment/42968604
type: Comment
type: QuestionComment
has text: No, cause it should be like this: http://jsfiddle.net/RokoCB/dypo5czr/
score: 0
comment on: http://stackoverflow.com/q/27246828

slider
tags question: http://stackoverflow.com/q/27260225
tags question: http://stackoverflow.com/q/27202294
tags question: http://stackoverflow.com/q/27199314
tags question: http://stackoverflow.com/q/27253361
tags question: http://stackoverflow.com/q/27215861
tag name: slider
tags question: http://stackoverflow.com/q/27235057
type: Tag
tags question: http://stackoverflow.com/q/27192923

http://stackoverflow.com/q/27297163
tagged with: button
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27375715
has body: I have this code in the file button.html Add button that clicking invokes this function that is in the file button.js and creates a button $(function(){ var max_button = 100; //maximum input boxes allowed var wrapper = $(".light_ponte"); //button wrapper var add_button = $(".add_button"); //Add button on ID var i = 1; var x = 1; //initlal button count $(add_button).click(function(e){ //on add input button click e.preventDefault(); if(x < max_button){ //max button create x++; //button increment i++; $(wrapper).append(' ` OI X `'); //add button } }); }); This button, however it must create index.html. That is, by clicking on the add button that is in the file button.html, is created a button in the file index.html. is there a way to do it?
type: UnansweredQuestion
tagged with: addition
has comment: http://stackoverflow.com/comment/43059337
has answer: http://stackoverflow.com/a/27297676
has comment: http://stackoverflow.com/comment/43058766
has title: Add button from button.html to index.html
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43058756

http://stackoverflow.com/comment/43038799
type: Comment
type: QuestionComment
has text: I mean, you can construct HTML structure with JS and inject, but it's not likely you can request a HTML file and inject to the page. Plus it's forbidden because you'll have to face the CORS policy.
comment on: http://stackoverflow.com/q/27284400
score: 0

http://stackoverflow.com/comment/42846068
comment on: http://stackoverflow.com/a/27178581
type: Comment
has text: That's exactly what he is doing. he gets the container `this.parentNode` and then set the height.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42964863
score: 0
comment on: http://stackoverflow.com/q/27244802
type: Comment
type: QuestionComment
has text: It uses the built in http cache which caches based on the URL. What do you need to know specifically? Are you having a problem getting it to work?

http://stackoverflow.com/comment/42808948
score: 0
comment on: http://stackoverflow.com/q/27154503
has text: [This question](http://stackoverflow.com/questions/21122811/transition-from-one-forced-directed-graph-to-another-graph-in-d3js) may help.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42989399
type: Comment
type: QuestionComment
has text: sorry that is a mistake when I write this post..is `id` I already edited that
comment on: http://stackoverflow.com/q/27257732
score: 0

http://stackoverflow.com/a/27227521
upvote count: 1
has body: Make the html legal and put double quotes around the onclick value - at the moment the space is making the browser think it is a separate attribute. You are also mixing up your single and double quotes a bit: echo '&lt;input type="checkbox" name="'.$next.'" id="'.$next.'" onclick="my1(this.form,this.checked,'.$cid.',\''.$vfet['file_name'].'\',\''.$id.'\');"&gt;';
downvote count: 0
answers question: http://stackoverflow.com/q/27227396
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27227396
score: 1

http://stackoverflow.com/q/27306844
has answer: http://stackoverflow.com/a/27320296
has body: I'm using gulp in Visual Studio, as a client-side build tool only. I have lots of tasks which are common across various projects, so I moved them to separate files, and reference them in a project's gulpfile.js as follows: require("../path/to/task/files/fooCommon.js"); // has a task called "fooCommon" And then in the gulpfile.js I wrap it in a task: gulp.task("foo", ["fooCommon"], function () { }); This works nicely, and I can reuse common tasks across projects. BUT, some tasks require configurations which are only accessible in gulpfile.js - how can I pass them as arguments to a task?
has comment: http://stackoverflow.com/comment/43079095
score: 1
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: gulp
favorite count: 0
accepted answer: http://stackoverflow.com/a/27320296
tagged with: node.js
has comment: http://stackoverflow.com/comment/43077086
has title: Can I pass arguments to a gulp task?
upvote count: 1
type: Question
tagged with: visual-studio
type: AnsweredQuestion

http://stackoverflow.com/comment/42854342
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27183056
has text: I apologize for being unbelievably dense but I am doing something wrong here:` <?php echo "$content"?> ` The `_POST` reports `["content"]=> string(4) "This"` no matter what I put in the text area. IE the text area always says just "This"! This was working. Any thoughts on what I have done? PS have moved the text field in with all the other fields to test this.

http://stackoverflow.com/comment/43016286
score: 0
type: QuestionComment
type: Comment
has text: @VijayWadnere But so in custom.css, write more detailed CSS rules to get highest priority, e.g prefixing them using `html body ...`. I meant something like that: http://jsfiddle.net/uxefx9oj/
comment on: http://stackoverflow.com/q/27272760

http://stackoverflow.com/a/29191004
type: Answer
has comment: http://stackoverflow.com/comment/86271768
has body: I realize this is an older post, however I recently had this requirement and this post was one of the first to come up...thought I would put my resolution here in case anyone else needs it. Set pace options for the ignoreURLs before you load the pace.min.js library &lt;script&gt; paceOptions = { ajax: {ignoreURLs: ['some-substring', /some-regexp/]} } &lt;/script&gt; &lt;script src="../dist/js/pace.min.js"&gt;&lt;/script&gt; Example of one of my ignoreURLs: &lt;script&gt; paceOptions = { ajax: {ignoreURLs: ['staffNameAutoComplete']} } &lt;/script&gt; &lt;script src="../dist/js/pace.min.js"&gt;&lt;/script&gt; Where 'staffNameAutoComplete' is part of the ajax URL I am calling. http://www.website.com/json.php?request=staffNameAutoComplete
score: 7
upvote count: 7
downvote count: 0
answers question: http://stackoverflow.com/q/27286473
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27286473

http://stackoverflow.com/q/27206075
score: -1
has answer: http://stackoverflow.com/a/78406355
type: Question
has answer: http://stackoverflow.com/a/27206150
answer count: 2
upvote count: 0
possible better answer: http://stackoverflow.com/a/78406355
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27206150
has title: javascript addEventListener and alert box
has body: I don't know where is the error in my code because I am not familiar with addEventListener method, can I know what is the difference between addEventListner and onsubmit ? addEventlistener must use in my code but I am familiar with onsubmit method only, how to change it to addEventListenr ?
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/q/27155789
has answer: http://stackoverflow.com/a/27165545
accepted answer: http://stackoverflow.com/a/27165545
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has answer: http://stackoverflow.com/a/27160136
favorite count: 0
has body: I am working with ckeditor I want to ask how can we set the font-family and font-size in this plugin, I have tried using CKEDITOR.config.font_defaultLabel = 'Arial'; CKEDITOR.config.fontSize_defaultLabel = '12px'; but these commands just change the front-end (font name and size) Whats the way out?
upvote count: 2
has title: Setting font-size and font-family in CKEditor
tagged with: plugins
possible better answer: http://stackoverflow.com/a/27160136
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/27244682
has body: Get the direct children of ol element: var children = $("ol &gt; li"); Get the specific element: var element = children.last(); Get the text from the element: var text = element.html();
answers question: http://stackoverflow.com/q/27244516
type: Answer
score: 0

http://stackoverflow.com/a/27154459
answers question: http://stackoverflow.com/q/27154328
score: -1
has comment: http://stackoverflow.com/comment/57794440
has comment: http://stackoverflow.com/comment/42803251
downvote count: 1
type: Answer
upvote count: 0
has body: Test this one : var hasTimeFormat = function (input) { var timeFormat = /([0-9]{2})\:([0-9]{2})\:([0-9]{2})\,([0-9]{3})$/; if (typeof String.prototype.trim !== 'function') { String.prototype.trim = function () { return input.replace(/^\s+|\s+$/g, ''); } } return timeFormat.test(input.trim()); } This works well (for example for "05:03:02,677") and if you wanna add something more, you can add easily.

http://stackoverflow.com/a/27250145
type: Answer
has comment: http://stackoverflow.com/comment/42975028
has comment: http://stackoverflow.com/comment/42974779
score: 0
has body: you can use a jquery plugin like this one. HERE: http://designwithpc.com/Plugins/ddSlick#demo
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27250091

http://stackoverflow.com/comment/135706096
has text: There are many words that do not have only the letter s added at the end, these words can be completely different words, that nothing is added to them, or that something else is added besides s. For example firmware, fish, furniture, gold, hardware.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/76564559

http://stackoverflow.com/a/27204348
answers question: http://stackoverflow.com/q/27204283
score: 0
type: Answer
has body: Make answerChoices an object, not an array, whose keys are the answers and values are the values you want to associate: answerChoices: { 'Answer 1': value1, 'Answer 2': value2, 'Answer 3': value3 } Or it could be an array of object: answerChoices: [ { answer: 'Answer 1', value: value1 }, { answer: 'Answer 2', value: value2 }, { answer: 'Answer 3', value: value3 } ] The first is appropriate if you only need to be able to look up values based on the answer. The second is appropriate if the order of answers must be maintained; to find the value based on an answer, you'll have to search the choices with a loop.

http://stackoverflow.com/q/27264172
possible better answer: http://stackoverflow.com/a/27264408
favorite count: 0
has answer: http://stackoverflow.com/a/27264408
upvote count: 1
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27264229
has answer: http://stackoverflow.com/a/27264541
score: 1
has title: How to change label text using jquery
has answer: http://stackoverflow.com/a/27264335
has answer: http://stackoverflow.com/a/27264286
type: Question
has answer: http://stackoverflow.com/a/27264352
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 6
accepted answer: http://stackoverflow.com/a/27264229
has body: This is div tag some text 1 another text 1 button Whenever I click on the button, I will add the div tag. when the next div tag is added, it should change the digit in the label text. For example: In the first div, it should be 1 and in the next div it should be 2. I am getting the label text using var labelValue = $('div').find('label').map(function() { return $(this).text().replace(/\d/,2); }).get(); What I want is to change digit in the label text to 2. I am getting the value but the label value is not getting changed in the html. How to get the updated label value? Sorry if there are any mistakes
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27285141
tagged with: http://stackoverflow.com/tag/html
tagged with: nokogiri
tagged with: ruby
type: AnsweredQuestion
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27451349
type: Question
has comment: http://stackoverflow.com/comment/43340008
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27451349
has title: Using Nokogiri to parse JavaScript hidden HTML
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43038809
has comment: http://stackoverflow.com/comment/43038153
favorite count: 0
possible better answer: http://stackoverflow.com/a/27285937
has answer: http://stackoverflow.com/a/27285937
has body: I'm trying to use Nokogiri to parse this ASCAP website to retrieve some song/artist information. Here's an example of what I'd want to query https://mobile.ascap.com/aceclient/AceClient/#ace/writer/1628840/JAY%20Z I can't seem to access the DOM properly because the source seems to be hidden behind some kind of JavaScript. I'm pretty new to web scraping so it has been pretty difficult trying to find a way to do this. I tried using Charles to see if data was being drawn from another site, and have been using XHelper to generate accurate XPath queries. This returns nil, where it should return "1, 2 YA'LL" page = Nokogiri::HTML(open('https://mobile.ascap.com/aceclient/AceClient/#ace/writer/1628840/JAY%20Z')) puts page.xpath('/html/body/div[@id="desktopSearch"]/div[@id='ace']/div[@id="aceMain"]/div[@id="aceResults"]/ul[@id="ace_list"]/li[@class="nav"][1]/div[@class="workTitle"]').text
has comment: http://stackoverflow.com/comment/43340131

http://stackoverflow.com/q/27261891
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27262076
has body: In my application, redirecting from Page1 to Page2 is taking almost 6 seconds. So meanwhile I need to display a popup window immediately on click of a hyperlink on page1, which should be there till the entire data loads on page2. I tried to implement in normal way (open the popup on click of the hyperlink and meanwhile the page redirects to page2), but the moment page url is getting changed to page2 the popup is getting closed as the page2 DOM gets started loading. This is not my requirement. Can someone please suggest me how to implement this.
type: UnansweredQuestion
tagged with: http-redirect
type: Question
has answer: http://stackoverflow.com/a/27262418
tagged with: javascript
score: 0
answer count: 2
has title: Display popup window even after redirecting to another page
tagged with: popupwindow

http://stackoverflow.com/a/27299763
has body: Have you looked at Infinite scrolling?
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27299333

http://stackoverflow.com/a/27307803
type: Answer
answers question: http://stackoverflow.com/q/27306938
score: 0
has body: You could have the style of a div for the sections set to display:none on each section, when the button is pressed you can use something like: $("#button").click(function(){ $("#section2").css({'display':'block'}); }); This is obviously just for one extra section, but you can extend it pretty easily for multiple.

http://stackoverflow.com/q/27226233
answer count: 2
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27227825
has comment: http://stackoverflow.com/comment/42932221
has body: I am building a web application and I’m want to our web application open on fullscreen in browser by default I want, as our application run on browser at the same time it will open in full screen mode. I’m getting output on button click but this is not working on onload event of body. Javascript Code: &lt;script&gt; function show() { var elem = document.body; if ((document.fullScreenElement !== undefined &amp;&amp; document.fullScreenElement === null) || (document.msFullscreenElement !== undefined &amp;&amp; document.msFullscreenElement === null) || (document.mozFullScreen !== undefined &amp;&amp; !document.mozFullScreen) || (document.webkitIsFullScreen !== undefined &amp;&amp; !document.webkitIsFullScreen)) { if (elem.requestFullScreen) { elem.requestFullScreen(); } else if (elem.mozRequestFullScreen) { elem.mozRequestFullScreen(); } else if (elem.webkitRequestFullScreen) { elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); } else if (elem.msRequestFullscreen) { elem.msRequestFullscreen(); } } else { if (document.cancelFullScreen) { document.cancelFullScreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } } } &lt;/script&gt; HTML Code: This is working &lt;input type="button" value="click to toggle fullscreen" onclick="show()"&gt; But this is not working &lt;body onload="show()"&gt; Please help me how can I achieve this. Thanks.
has comment: http://stackoverflow.com/comment/42930734
has answer: http://stackoverflow.com/a/27227322
type: Question
tagged with: javascript
has title: How to open Web page in Fullscreen mode (F11 functionality) on body load
score: 0

selenium-ide
tags question: http://stackoverflow.com/q/27241433
tag name: selenium-ide
tags question: http://stackoverflow.com/q/27201382
type: Tag

http://stackoverflow.com/q/27258077
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42989840
score: 2
has body: I clone a row and append it to the end of a table the following function add_record(). My question is how to append it to the beginning of the table. I tried using $("#main_table_id tbody").prepend(clone) and $("#main_table_id tbody").prepend(clone.innerHtml) but it didn't work. function add_record(){ var row = document.getElementById("template_no_1_id"); var table = document.getElementById("main_table_id"); var clone = row.cloneNode(true); clone.id = "newID"; table.appendChild(clone); }
has answer: http://stackoverflow.com/a/27258841
linked to: http://stackoverflow.com/q/13870348
type: Question
has comment: http://stackoverflow.com/comment/42990738
downvote count: 0
tagged with: javascript
has title: How to add row to the beginning of table using javascript
answer count: 1

http://stackoverflow.com/q/27252785
has comment: http://stackoverflow.com/comment/42979786
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42979589
has title: Random with button in jquery
has answer: http://stackoverflow.com/a/27253087
accepted answer: http://stackoverflow.com/a/27253087
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has body: I got code where you enter some text and pressing #val makes the text be shown as a paragraphs. Then i got another button with id="#kor" and when pressing it i want the computer to random choose between all these paragraphs. I have come this far : $(document).ready(function() { $('#val').click(function() { var toAdd = $("input[name=message]").val(); $('#messages').append("&lt;p&gt;"+toAdd+"&lt;/p&gt;"); }); $('#kor').click(function() { var random = Math.floor((Math.random()*10); $("p").eq(random).click(); }); });
type: AnsweredQuestion
downvote count: 1
type: Question

http://stackoverflow.com/comment/42926266
has text: I did test and that's not true. I've updated my answer, please take a look.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27223756

http://stackoverflow.com/q/27249705
has title: Angular SPA not showing API data on state activation
type: Question
has answer: http://stackoverflow.com/a/27249827
tagged with: javascript
tagged with: ionic-framework
score: 0
answer count: 1
has body: I have an Angular.js Single Page Application app (Ionic Framework) communicating with the Rails backend. I use a $http service to get data from my backend API. I'm facing a problem which demontrates itself by sometimes not showing the data fetched from backend. I start the app, the $http.get call is issued and data is returned (I can see it in logs) but it's not shown. So, upon calling the data app activates the state which should show the data returned (in html template through ng-repeat…), and it’s empty. If I then change the app state and return to the previous state, the data is shown. When I use Angular’s $resource service (like here: http://www.sitepoint.com/creating-crud-app-minutes-angulars-resource/) I get data fetched and showed but I run into some problems later and therefore cannot use $resource. I suppose the template is empty because it is shown before the data is actually returned from API. How can I fix this problem? I've tried everything I could think of, all flavours of $http.get, .success() or .then(), promises, even $timeout... Below are the code snippets from actual app: controllers.js: .controller('EnemiesCtrl', function($scope, $stateParams, Enemies ) { $scope.enemies = Enemies.all(window.localStorage['id']); }) services.js: .factory('Enemies', ['$http', function($http, userId) { // Use a resource here that returns a JSON array var enemies = null; userId = window.localStorage['id']; $http({ url:"http://localhost:3000/home/api", method: "GET", params: {user_id: userId} }).then(function(resp){ enemies = resp.data; console.log('Success', resp.data); },function(err) { console.error('ERR', err.status); alert('Error: '+err.status); // err.status will contain the status code }); return { all: function() { return enemies; } } }]); template.html: &lt;ion-item ng-repeat="enemy in enemies" type="item-text-wrap" href="#/tab/place/{{enemy.id}}"&gt; enemy.name&lt;/br&gt; &lt;/ion-item&gt;
accepted answer: http://stackoverflow.com/a/27249827
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/a/27305725
answers question: http://stackoverflow.com/q/27288165
type: Answer
has body: Try tmp['MSH']['MSH.4']['MSH.4.1'] = '[xyz]';
score: 0

http://stackoverflow.com/a/27186429
has comment: http://stackoverflow.com/comment/42860099
has comment: http://stackoverflow.com/comment/42860500
has body: You can treat your arrays as points in an n-dimensional space and calculate the Euclidean distance between them: function dist(a, b) { return Math.sqrt(a.reduce(function(sum, _, i) { return sum + Math.pow(a[i] - b[i], 2) }, 0)); } and then minions.sort(function(a, b) { return dist(master, a.imitation) - dist(master, b.imitation); });
upvote count: 2
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42860529
answers question: http://stackoverflow.com/q/27185909
type: Answer

http://stackoverflow.com/comment/42984745
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27255409
has text: It would be a very good idea to declare your "xmlhttp" variable with `var` in that function. Without that, it's a global variable, and successive calls to "process_xml" with overwrite its previous value.
type: Comment

http://stackoverflow.com/q/27170196
tagged with: javascript
has body: I have a situation where I want to run the same test file twice. Let's say I have a test1.js and login.js and I define my suite in such a way in configuration: specs: [ 'test1.js', 'login.js', 'test1.js' ] So as you can see I want to run test1.js twice, but protractor runs test1.js, login.js and then finishes. Do you have any idea how I can achieve this? Regards Adam
has answer: http://stackoverflow.com/a/27282437
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
score: 3
upvote count: 3
has title: How to run same test file twice in protractor?
type: Question
has answer: http://stackoverflow.com/a/44181422
tagged with: protractor

bash
tags question: http://stackoverflow.com/q/27159350
tags question: http://stackoverflow.com/q/27237883
type: Tag
tags question: http://stackoverflow.com/q/27280249
tag name: bash

http://stackoverflow.com/comment/43085883
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27312480
type: Comment
has text: ok i got it figured out how to reload the page.. now is there a way to get the checkbox value runtime?

http://stackoverflow.com/q/27195851
has comment: http://stackoverflow.com/comment/42958038
favorite count: 0
has comment: http://stackoverflow.com/comment/42985395
possible better answer: http://stackoverflow.com/a/56358386
has comment: http://stackoverflow.com/comment/54796714
has answer: http://stackoverflow.com/a/33484784
tagged with: firebase
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42902132
has comment: http://stackoverflow.com/comment/42907875
upvote count: 10
downvote count: 1
score: 9
type: Question
tagged with: pagination
has title: How to retrieve paginated children in ascending or descending order in Firebase?
accepted answer: http://stackoverflow.com/a/33484784
tagged with: javascript
has comment: http://stackoverflow.com/comment/42945863
has comment: http://stackoverflow.com/comment/42879194
linked to: http://stackoverflow.com/q/38005039
answer count: 2
has answer: http://stackoverflow.com/a/56358386
has body: Suppose I'm using firebase for a commenting system and I want to retrieve the comments for a given topic, but there are so many comments in one topic that I don't want to retrieve them all at once. I also want the newest comments to be displayed on top. It seems that the only way to display firebase records in reverse order is to retrieve them all and then iterate over them in reverse. This could get very unwieldy on large datasets, especially for mobile clients. Is there any better way? What is the generic and preferred solution to query paginated data from Firebase, in ascending or descending order?

http://stackoverflow.com/comment/42953857
type: QuestionComment
type: Comment
has text: Possibly [`contentEditable`](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable).
score: 0
comment on: http://stackoverflow.com/q/27238594

http://stackoverflow.com/q/27295985
has body: I'd like to use the Google Url Shortener API within a crossplatform App developed using Intel XDK. At least in the emulator, no SOP seems to be enforced. Anyway, I get this response: {"readyState":4,"responseText":"{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"global\",\n \"reason\": \"required\",\n \"message\": \"Required parameter: shortUrl\",\n \"locationType\": \"parameter\",\n \"location\": \"shortUrl\"\n }\n ],\n \"code\": 400,\n \"message\": \"Required parameter: shortUrl\"\n }\n}\n","responseJSON":{"error":{"errors":[{"domain":"global","reason":"required","message":"Required parameter: shortUrl","locationType":"parameter","location":"shortUrl"}],"code":400,"message":"Required parameter: shortUrl"}},"status":400,"statusText":"Bad Request" Code: $.ajax( { url: "https://www.googleapis.com/urlshortener/v1/url", contentType: "application/json", data: { longUrl: "firec.at" }, success: function (data) { $("#txtUsernameLogin").val(JSON.stringify(data)); }, error: function(data) { $("#txtUsernameLogin").val(JSON.stringify(data)); } }); Looks like it's not sending the longUrl param. I have no idea why that fails, and appreciate any advice. Thank you.
tagged with: xmlhttprequest
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27296101
accepted answer: http://stackoverflow.com/a/27296101
tagged with: intel-xdk
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Intel XDK Google API JQuery
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/27225279
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27226749
score: 1
tagged with: floating-point
has body: There is a demo created DEMO and it is working as i expect but i am not able to add any value more after 24.99 but i need value which can be upto 99.99 Tried modifying the demo regex but it is not working as expected. this is the Regex ^(0+)?(24(\.00?)?|(\.00?)?|\.[0-9]+|0?[0-9](\.[0-9]{0,2})?|(0+)?[0-2][0-3](\.[0-9][0-9]?)?)$ can some one help me on this?
type: Question
tagged with: decimal
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27226749
favorite count: 0
has title: Accept decimal value upto 99.99
tagged with: regex
possible better answer: http://stackoverflow.com/a/27225343
has comment: http://stackoverflow.com/comment/42928486
has answer: http://stackoverflow.com/a/27225343
has comment: http://stackoverflow.com/comment/42929479
upvote count: 1

http://stackoverflow.com/comment/42837684
has text: @Snatch the link suggested(anchors) does indeed what you seems asking.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27173899

http://stackoverflow.com/q/27246944
has title: jquery window.resize not working
has comment: http://stackoverflow.com/comment/42968801
score: 0
has answer: http://stackoverflow.com/a/27247250
has answer: http://stackoverflow.com/a/27247122
has comment: http://stackoverflow.com/comment/42968871
has answer: http://stackoverflow.com/a/27247058
answer count: 5
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/27247133
tagged with: responsive-design
type: Question
has body: Guys i wrote a very simple jquery script to place elements properly on a webpage, basically making it responsive without media queries. Now it works just fine but the window.resize is not triggering so on document.ready it works on window resize it does not. Any help would be highly appreciated. Putting the link to the page at the bottom // JavaScript Document $(document).ready(PlaceContents); $(window).ready(PlaceContents); $(window).on('resize',PlaceContents); function PlaceContents() { var Wheight = $(document).height(); var Wwidth = $(document).width(); var contentPos = Wwidth/4; var contentH = Wheight/5; //adjust menubar height $('#menubar').height(Wheight); //center main content $("#maincontent").css({top: contentH, left: contentPos, position:'absolute'}); }; http://www.mobileapplicationlabs.com/goldentreehotels/
has comment: http://stackoverflow.com/comment/42969759
has answer: http://stackoverflow.com/a/27247471
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42894762
comment on: http://stackoverflow.com/a/27206051
type: AnswerComment
type: Comment
score: 1
has text: It does in strict mode, that's one of the differences between them.

http://stackoverflow.com/comment/43074597
has text: Sorry, I ignored that you have the 2d box in screen space. In this case I think you should try 'frustum culling'. See: http://stackoverflow.com/questions/16396874/manual-frustrum-culling-with-three-js
type: AnswerComment
comment on: http://stackoverflow.com/a/27305792
score: 0
type: Comment

http://stackoverflow.com/tag/csv
type: Tag
tags question: http://stackoverflow.com/q/27225575
tag name: csv
tags question: http://stackoverflow.com/q/27174760
tags question: http://stackoverflow.com/q/27290041
tags question: http://stackoverflow.com/q/27238457
tags question: http://stackoverflow.com/q/27301583
tags question: http://stackoverflow.com/q/27208589
tags question: http://stackoverflow.com/q/27290098
tags question: http://stackoverflow.com/q/27269519
tags question: http://stackoverflow.com/q/27207605
tags question: http://stackoverflow.com/q/27154774
tags question: http://stackoverflow.com/q/27250857
tags question: http://stackoverflow.com/q/27165939
tags question: http://stackoverflow.com/q/27230304
tags question: http://stackoverflow.com/q/27227349
tags question: http://stackoverflow.com/q/27200897

http://stackoverflow.com/a/27200023
has body: Follow this link and get the twitter library: https://dev.twitter.com/overview/api/twitter-libraries java script example on git. https://github.com/BoyCook/TwitterJSClient
answers question: http://stackoverflow.com/q/27199999
type: Answer
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27199999

http://stackoverflow.com/q/27279758
score: -1
type: Question
has answer: http://stackoverflow.com/a/27280086
accepted answer: http://stackoverflow.com/a/27280086
tagged with: javascript
answer count: 1
downvote count: 1
has body: Given this example how can I push each result found by the filter into the obj rather than reset it once for each item found by the filter? The filter grabs the first result from the filter and sets obj[0] to that value. Suppose I have 10 results from the filter how do I append the values to obj rather than set it to a single value. I thought I would need to use push. var obj = array.filter(function ( obj ) { return obj.name === name; })[0];
has title: Push objects in to Filtered JavaScript Array
favorite count: 0
has comment: http://stackoverflow.com/comment/43028366
has comment: http://stackoverflow.com/comment/43028335
has comment: http://stackoverflow.com/comment/43028621
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/q/27200295
has body: Here's something interesting: In any JS window run: val = document.body.getBoundingClientRect(); console.log(val) val.left += 10; console.log(val) or any other modification to the return value. How is this object be immutable? This makes it hard to duck-punch the getBoundingClientRect() for an element, changing the original values. Although I suppose you could recreate the object, I didn't know JS even had the capability of immutable objects. Is this correct?
has title: How is return value of getBoundingClientRect Immutable?
upvote count: 3
has answer: http://stackoverflow.com/a/27200745
type: AnsweredQuestion
score: 3
type: Question
accepted answer: http://stackoverflow.com/a/27200745
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/13117771

http://stackoverflow.com/a/27301950
type: Answer
downvote count: 0
score: 1
has body: If I were you I would leave the Bootstrap file as it is and import it into your custom style file instead. The main advantage of this solution is that you can use variables, mixins and actually everything from the original Bootstrap less file in your custom style definitions. my-custom-reset-for-bootstrap @import "bootstrap.less"; .my-custom-class { color: @gray-light; //var from Bootstrap variable.less file } In this case you won't need to do anything after upgrading Bootstrap files to newer version.
accepted answer of: http://stackoverflow.com/q/27295343
upvote count: 1
answers question: http://stackoverflow.com/q/27295343
type: AcceptedAnswer

http://stackoverflow.com/comment/42852931
score: 0
has text: I need to check if font size is declared for an element or is it inheriting it from parent.
comment on: http://stackoverflow.com/q/27182339
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42843394
type: QuestionComment
has text: @JamesHill: Yes, I did read that. The question still stands. Seems like a waste to burden working code with the overhead of a library. I could see it on a new project where it's actually needed. Seems like a more productive way to learn.
type: Comment
comment on: http://stackoverflow.com/q/27176987
score: 0

http://stackoverflow.com/comment/42996654
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27261902
has text: Yes; you can connect via IMAP and use the SEARCH command.
score: 4

http://stackoverflow.com/comment/43036313
comment on: http://stackoverflow.com/a/27273268
score: 0
type: Comment
has text: I reworked the json file in this way. `[{"polnocno-wschodni":"9"},{"wschodni":"80"},{"polnocno-zachodni":"448"},{"zachodni":"638"},{"poludniowo-wschodni":"701"},{"poludniowo-zachodni":"710"},{"poludniowy":"1055"}]` Also does not work: `http://jsfiddle.net/e39taLt5/6/`
type: AnswerComment

http://stackoverflow.com/comment/42848247
has text: Please add your javascript files to Resources.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27179782

http://stackoverflow.com/a/27257907
downvote count: 0
score: 13
has body: Why are they using (!!err) to test that err's truthiness? There's no reason. Maybe they're overcautious, having heard some wrong things about thruthiness? Or they want to emphasize the ToBoolean cast that occurs in the evaluation of the if condition? Isn't that the same as if (err)? Yes. if (err) if (Boolean(err)) if (!! err) all mean exactly the same thing. The latter two only doing unnecessary steps in between before arriving at the same result.
type: AcceptedAnswer
upvote count: 13
answers question: http://stackoverflow.com/q/27257803
accepted answer of: http://stackoverflow.com/q/27257803
type: Answer

http://stackoverflow.com/q/27241748
type: Question
accepted answer: http://stackoverflow.com/a/27243274
has comment: http://stackoverflow.com/comment/42959843
tagged with: javascript
has answer: http://stackoverflow.com/a/27243274
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42959873
has body: The error does not show up in the developer tool so I guess its probably got to do with the data itself and how its read. Both {{upVote}} and {{downVote}} starts with no value and show null on click. Somehow the buttons are all linked? I was setting up each vote to each item. Background Voting system, with separate up and down scores (not netted as a single vote score). Would like for the scores to persist in the database. I have not thought about limiting votes per user but if you have thoughts there, feel free to include in your reply. Thanks! The JS files $scope.upVote = function () { if ($scope.voteType == "down") { $scope.upVote++; } $scope.upVote++; $scope.voteType = "up"; }; $scope.downVote = function () { if ($scope.voteType == "up") { $scope.downVote++; } $scope.downVote++; $scope.voteType = "down"; }; Post is saved in the $scope.post as: $scope.post = { title: '', upVote: 0, downVote: 0 }; The button is in the html as such: &lt;i ng-click="downVote()" class="fa fa-chevron-circle-down fa-2x" ng-class="{true:'downVote', false:''}[vote=='downVote']"&gt;&lt;/i&gt;
tagged with: angularjs
linked to: http://stackoverflow.com/q/24942861
has title: JS vote system {{bindings}} gives null on click?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42959918
has comment: http://stackoverflow.com/comment/42959809

authentication
tags question: http://stackoverflow.com/q/27308034
tags question: http://stackoverflow.com/q/27198422
tags question: http://stackoverflow.com/q/27199523
tag name: authentication
tags question: http://stackoverflow.com/q/27198547
type: Tag
tags question: http://stackoverflow.com/q/27312079
tags question: http://stackoverflow.com/q/27199995
tags question: http://stackoverflow.com/q/27169445

http://stackoverflow.com/comment/42807722
type: AnswerComment
has text: if I add an "invisible" cls2 item at the beginning, and then add the others by ajax, will it work?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27156667

http://stackoverflow.com/a/27191015
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27185940
has comment: http://stackoverflow.com/comment/42877961
has comment: http://stackoverflow.com/comment/42897388
has body: What do you want according to your approach will be something like this : if (!$this->validate_id_member($_POST["id_member"])) { echo " Invalid Memeber ID "; return; } and here will be the simple validation function : function validate_id_member($id_member){ $member_data=$this->db->query("select id from tablename where id='$_POST[id_member]' ")->row(); if(!$member_data){ return false; } return true; } But I recommend you start using codeigniter form validation instead of doing it manually , it might be harder at first but later all you'll do will be just copy/paste your earlier validation rules . also I've tried to reshape your conditions to be easily followed up later , will look like this : if (empty($_POST["id_member"]) || empty($_POST["balance"])) { echo " Input valid Member ID and balance!! "; return; } if (empty($idcek)) { echo " Member ID:'$_POST[id_member]' not in DB. Use Valid Member ID! "; return; } if ($cekdep['act']) { echo " Input balance for '$_POST[id_member]' = '$bal' already succeed. You can only input balance once for same member and same balance in one day. "; return; } if ($conn -> multi_query($sql) !== TRUE) { echo "Error: " . $sql . " " . $conn -> error; return; } echo " Balance input success: '$_POST[id_member]' for '$bal'. ";

http://stackoverflow.com/a/28319539
score: 0
answers question: http://stackoverflow.com/q/27292479
type: Answer
has body: I had the same error in an app for the iPhone. I am porting an app from BlackBerry 10 to iOS. By the way we updated the cordova version. The cordova API in cordova 4.0.0 has changed or is different on iOS. In the BB10 app this code is working: navigator.notification.alert("Test", function() {}, ["Info"]); On iOS the array had to be removed: navigator.notification.alert("Test", function() {}, "Info");

http://stackoverflow.com/comment/42905520
type: QuestionComment
type: Comment
has text: David Thomas, Thank u for this advice. I have no idea about Stack Snippets. I will try.
comment on: http://stackoverflow.com/q/27211439
score: 0

http://stackoverflow.com/q/27251844
tagged with: datetime
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27252002
type: Question
possible better answer: http://stackoverflow.com/a/27251983
tagged with: c#
has answer: http://stackoverflow.com/a/27251983
has answer: http://stackoverflow.com/a/27252015
tagged with: javascript
has body: So I'm pulling a DateTime from a database and I want to display it in an HTML text input (&lt;input type="text"&gt;). By the time the C# DateTime is sent to Javascript, it looks something like this: fooDate: {6/22/2011 2:30:00 PM}. But when it is displayed in the &lt;input&gt;, it ends up looking like this: 2011-06-22T14:30:00. It's kind of annoying because I only care about displaying the date. Why is this this conversion happening, and is there a way to just get it to display the 6/22/2011 2:30:00 PM bit? Can this be accomplished without the use of regular expressions?
has title: Display C# DateTime in HTML Text Input
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42977811
answer count: 4
accepted answer: http://stackoverflow.com/a/27252015
score: 0
has answer: http://stackoverflow.com/a/27252192

http://stackoverflow.com/q/27182714
possible better answer: http://stackoverflow.com/a/27182846
has answer: http://stackoverflow.com/a/27182780
has answer: http://stackoverflow.com/a/27182846
has title: how to add url from json data in the href tag in javascript
tagged with: anchor
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42853295
accepted answer: http://stackoverflow.com/a/27182780
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: i have a url value from the json response which is like url=response.url.urlname;(//suppose this contains the value like www.google.com) now i want to include it in anchor tag in my javascript code web is div in html page &lt;div id="web&gt; $("#web").append('&lt;a href="http://"'+url+'"" rel="external" data-direction="reverse"&gt;'+url+'&lt;/a&gt;'); i am unable to load the page.can anybody help me for this concatenation?

http://stackoverflow.com/comment/42939233
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27231246
has text: This is why i wrote: `on strings`.
score: 0

http://stackoverflow.com/a/27245412
answers question: http://stackoverflow.com/q/27245082
has body: You can do this with Ajax http://www.w3schools.com/jquery/jquery_ajax_get_post.asp Php-script in a separate File like: First you JavaScript file: $(document).on('click', '.dropdown-menu li a', function() { var categoryName = $(this).html(); $.post("php-file.php",{cat_Name: categoryName}); }); then you php-file.php looks like: &lt;?php $categoryname = $_POST['cat_Name']; $one = mysqli_query($con, "SELECT id FROM tb_category WHERE category_name = '?' "); ?&gt; if you want to use them again: add to your PHP on the end: $return = new array(); $return[0] = ;//your results in this array echo json_encode($return); then in your JavaScript should look like: $(document).on('click', '.dropdown-menu li a', function() { var categoryName = $(this).html(); $.post("php-file.php",{cat_Name: categoryName}, function(data){ sccess_function(data);}, "json"); }); then add a function: function succsess_function(data){ //do thing here }
type: Answer
score: 0

http://stackoverflow.com/comment/43037911
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27285032
type: Comment
has text: I think this is my problem, trying that now.

http://stackoverflow.com/comment/90895924
has text: @Charlie, Are you using mongoose ODM or any other..... Can you also please specify the version you are using? I think that will help to replicate the error.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27212984
type: Comment

http://stackoverflow.com/a/27236029
has body: It would vary based on your template system but the basics are like this: In controller - make the env available to your template: res.render("template", { env: process.env.NODE_ENV || 'development' }); Template: {% if env === 'development' %} &lt;script&gt;....&lt;/script&gt; &lt;script&gt;....&lt;/script&gt; {% else %} &lt;script src="prod.min.js"&gt;&lt;/script&gt; {% endif %} In addition use the answer by @vernak2539 to build your minify your prod.min.js file using gulp or grunt and the minify/uglify/concat plugins or do it 'manually' using things like CodeKit.
type: Answer
has comment: http://stackoverflow.com/comment/42980240
answers question: http://stackoverflow.com/q/27227581
has comment: http://stackoverflow.com/comment/42973999
score: 0

http://stackoverflow.com/a/27291301
has comment: http://stackoverflow.com/comment/43049935
has comment: http://stackoverflow.com/comment/43048792
downvote count: 4
has comment: http://stackoverflow.com/comment/43048819
has comment: http://stackoverflow.com/comment/43048711
upvote count: 8
has comment: http://stackoverflow.com/comment/43051887
type: Answer
has comment: http://stackoverflow.com/comment/43051266
has comment: http://stackoverflow.com/comment/43051702
has body: Try using console.log inside console.table and use the styles working and tested code: console.table(console.log('%c test1 ', 'background: #cdcdcd; color: #000000'),console.log('%c test2 ', 'background: #ff0000; color: #ffffff')); for your case you can do this var x = { status: 'failed', function: 'Validate.int', asserted: true, result: false }; console.table( console.log('%c '+ x.status + x.function + ' ', 'background: #cdcdcd; color: #000000'), add other elements of the array); replace my x with elements of your array
has comment: http://stackoverflow.com/comment/43050140
has comment: http://stackoverflow.com/comment/43048864
answers question: http://stackoverflow.com/q/27290486
score: 4

http://stackoverflow.com/q/27271573
answer count: 1
tagged with: javascript
tagged with: marker
favorite count: 0
has answer: http://stackoverflow.com/a/27275777
has comment: http://stackoverflow.com/comment/43016839
upvote count: 2
type: UnansweredQuestion
has body: I use Google Maps API v3 to display some locations on a map. Basically it works as follows: There is an admin area to add new locations to the database. When a new location is added, I check the LatLng values with Geocoder service and save the address + LatLng to the database. Afterwards I simply display the map + marker by LatLng values. This works just fine. var myLatlng = new google.maps.LatLng(52.494406, 13.429538); var mapOptions = { zoom: 15, center: myLatlng } var map = new google.maps.Map(document.getElementById('gmap'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map }); What I miss here is the address highlighting like in the following screenshot.
downvote count: 1
has title: How to highlight an address with Google Maps API v3?
score: 1
tagged with: google-maps-api-3
type: Question
tagged with: google-maps

http://stackoverflow.com/q/27182787
type: UnansweredQuestion
upvote count: 1
has title: How do I get id of server removed/update collection items at client side?
score: 1
has answer: http://stackoverflow.com/a/27182862
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/42853408
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I would like to run some functions whenever server modifies/deletes collection items. Through help pages I got how to handle additions as below for example {{#each marker}} {{&gt; drawMarker}} {{/each}} and the template for drawMarker as &lt;template name="drawMarker"&gt; {{draw}} &lt;/template&gt; and the corresponding helper js file contains Template.drawMarker.helpers({ draw: function(){ //function to add marker } }); I would like to know how to handle deletions/updates for each marker if collection is updated from server side?
tagged with: meteor

http://stackoverflow.com/q/27236673
type: Question
has answer: http://stackoverflow.com/a/27237109
has comment: http://stackoverflow.com/comment/42954598
tagged with: javascript
has comment: http://stackoverflow.com/comment/42950039
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: I have the following code. Obviously what I want is for the method window.xl.timectrl.Tuio.prototype.tcHour12Changed to get called when this.hour12 gets changed. I'm absolutely sure this.hour12 refers to an actual select box, but nothing happens when I change it. What is wrong here? window.xl.timectrl.Tuio = function(label_base, update_ui){ this.update_ui = update_ui; this.hour12 = $('#' + label_base + '_hour12'); this.hour12.off('change').on('change', getSelectBoxHandler(this.hour12, $.proxy(this.tcHour12Changed), this)); } window.xl.timectrl.Tuio.prototype.tcHour12Changed = function(event, ui, value, id){ //handle event this.update_ui(); } function getSelectBoxHandler(select_box, onchange){ var handler = function(event, ui){ var id = select_box.attr('id'); var value = select_box.find('option:selected').attr('value'); onchange(event, ui, value, id); } return handler; } The point here is for getSelectBoxHandler() to return a handler which is bound to the particular select box and provided handler with a closure. When this returned handler is called when the select box is changed, it will know both the select box to extract the current value from, and the actual onchange handler to pass the value to, in this case, window.xl.timectrl.Tuio.prototype.tcHour12Changed(). i would like this actual handler to have access to members of the object, like this.update_ui(), which is why I wanted the actual handler to be a member of the object instead of a stand-alone function. This way, this code that extracts the value from the select box does not have to be repeated in every handler, and no explicit call to any function has to be in every such handler to do this work. This approach has worked fine with stand-alone functions, but broke when I tried to use an object member as the handler. I am very interested in why this doesn't work.
has title: JQuery binding to object method via closure

http://stackoverflow.com/comment/43008719
type: QuestionComment
comment on: http://stackoverflow.com/q/27268884
has text: @johnSmith that's the question - does he really want a "single page website"? if he is so new to it, maybe Quentin's suggestion would be sufficient.
score: 0
type: Comment

http://stackoverflow.com/q/27275957
type: UnansweredQuestion
tagged with: node.js
has title: Webstorm 9 autocompletion + Node.js module + JSDoc
answer count: 0
type: Question
tagged with: autocomplete
tagged with: javascript
score: 4
has body: I racked my brain with this issue for a last few days but haven't managed to find out the right way. I'm trying to write my Node.js module in a way that Webstorm will automatically process and enable autocompletion but there is no luck. Below is the code of module I'm working on (simple wrapper for built-in Javascript Error object): /** * @module some-module */ 'use strict'; var util = require('util'); var httpErrors = { /** * HTTP status code 400 * * @constructor * @name BadRequest * @memberOf errors */ 400: { name: 'BadRequest', description: 'Invalid data was sent to the server' }, /** * HTTP status code 403 * * @constructor * @name Forbidden * @memberOf errors */ 403: { name: 'Forbidden', description: 'You\'re not allowed to perform such action' } }; /** * @private * @constructor * * @name HttpError * @augments WError * * @param {Number} code * * @returns {HttpError} */ function HttpError (code) { this.statusCode = code; if (arguments.length &lt; 2) Error.call(this, httpErrors[this.statusCode].description); else Error.apply(this, Array.prototype.slice.call(arguments, 1)); return this; } util.inherits(HttpError, Error); /** * @private * @constructor * * @name E * * @param {Number} code HTTP status code * * @returns {HttpError} */ function E (code) { return HttpError.bind(this, code); } /** * @constructor * @name errors */ var errors = {}; Object.keys(httpErrors).forEach(function (errorCode) { var error = httpErrors[errorCode]; errors[error.name] = new E(+errorCode); }); module.exports = exports = errors; How it is supposed to be used: var errors = require('./lib'); var err = new errors.BadRequest(); console.log(err.statusCode); // should output 400 The problem is that it dynamically creates errors object, so Webstorm doesn't 'pick up' properties for autocompletion, however, I would like to make it work using JSDoc explicitly declaring properties of module.exports object. The way I'm doing it doesn't work for some reason. I'd appreciate if you'd give me some advice…
tagged with: webstorm
upvote count: 4
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42826062
has text: If i were to upload only media files (because i will be using the webapp on ipad and thr an applet is not possible) , so the only alternative is to do a POST as sourcestream to the server. In this scenario which would be the simplest way to proceed using javascript that also helps when using safari browser
comment on: http://stackoverflow.com/a/27166380
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/27274173
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27273208
has comment: http://stackoverflow.com/comment/43017853
accepted answer of: http://stackoverflow.com/q/27273208
has comment: http://stackoverflow.com/comment/43017911
has body: Create array to hold top champions (could be multiple if it is a tie) Loop through the champions array Use > to get the champion with highest totalSessionsPlayed value; and use === to determine whether there was already a different champion with same top score. If it is a tie, add current champion to array, else create new array with new champion. Solution code: var highestSession = -1; // set it low initially var topChamps = []; // array since could be a N-way tie $.each(json.champions, function(idx, champion) { if (champion.id > 0 && champion.stats) { if (champion.stats.totalSessionsPlayed > highestSession) { // new top score broke any possible ties topChamps = [champion]; // new array highestSession = champion.stats.totalSessionsPlayed; // save new max value } else if (champion.stats.totalSessionsPlayed === highestSession) { // it's a tie, add to list topChamps[topChamps.length] = champion; } } }); Run this example snippet against the OP's actual JSON data: // fake json for example only var json = { "summonerId": 22421317, "modifyDate": 1414692614000, "champions": [{ "id": 110, "stats": { "totalSessionsPlayed": 5, "totalSessionsLost": 5, "totalSessionsWon": 0, "totalChampionKills": 32, "totalDamageDealt": 725106, "totalDamageTaken": 113405, "mostChampionKillsPerSession": 13, "totalMinionKills": 937, "totalDoubleKills": 3, "totalTripleKills": 0, "totalQuadraKills": 0, "totalPentaKills": 0, "totalUnrealKills": 0, "totalDeathsPerSession": 52, "totalGoldEarned": 62141, "mostSpellsCast": 0, "totalTurretsKilled": 6, "totalPhysicalDamageDealt": 613669, "totalMagicDamageDealt": 105253, "totalFirstBlood": 0, "totalAssists": 55, "maxChampionsKilled": 13, "maxNumDeaths": 14 } }, { "id": 21, "stats": { "totalSessionsPlayed": 7, "totalSessionsLost": 1, "totalSessionsWon": 6, "totalChampionKills": 54, "totalDamageDealt": 1143509, "totalDamageTaken": 132528, "mostChampionKillsPerSession": 18, "totalMinionKills": 1420, "totalDoubleKills": 7, "totalTripleKills": 1, "totalQuadraKi…
has comment: http://stackoverflow.com/comment/43018019
downvote count: 1
has comment: http://stackoverflow.com/comment/43017711
has comment: http://stackoverflow.com/comment/43017793
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43018986
score: 1
has comment: http://stackoverflow.com/comment/43018876
has comment: http://stackoverflow.com/comment/43018637

http://stackoverflow.com/a/27231134
has comment: http://stackoverflow.com/comment/42940055
answers question: http://stackoverflow.com/q/27230913
type: Answer
has comment: http://stackoverflow.com/comment/42939634
has comment: http://stackoverflow.com/comment/42940219
has body: At first, you have to set the page template for this action in layout xml. Like following: page/2columns-left.phtml And you put your block code to in ..... block.
has comment: http://stackoverflow.com/comment/42939792
score: 0
has comment: http://stackoverflow.com/comment/42939344
has comment: http://stackoverflow.com/comment/42940105

http://stackoverflow.com/q/27270848
has body: I have an input XML File: What I want to transform to following output file with Saxon-CE. JS: function TransformXML() { xsltData = Saxon.requestXML("transformXML.xsl"); xmlData = Saxon.requestXML("myxml.xml"); var xsltProcessor = Saxon.newXSLT20Processor(xsltData); var result = xsltProcessor.transformToDocument(xmlData); } I have a mapping, that tells me the value of an item and the NewValue it should have after the transformation. What I have so far: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*" /> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" name="xml" /> <xsl:variable name="Items"> </xsl:variable> <xsl:template match="Items"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="Item"> <xsl:copy> <xsl:if test="not($Items/Item[@Name=current()/@Name]/Value[@OldValue = current()/@Value])"> </xsl:if> <xsl:attribute name="Value"> <xsl:value-of select="$Items/Item[@Name=current()/@Name]/Value[@OldValue = current()/@Value]/@NewValue"/> </xsl:attribute> <xsl:copy-of select="@*[name()!= 'Value']" /> </xsl:copy> </xsl:template> </xsl:stylesheet> This is working, but what I want to do now is to check if there is a value mismatch. If yes then the script should stop and throw an exception what I can catch in the Javascript function. Is there a way to realize this? Can I set a callback function for this?
has title: XSLT 2.0 error handling: throw exception to javascript
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
accepted answer: http://stackoverflow.com/a/27272008
downvote count: 0
tagged with: xslt
type: Question
has answer: http://stackoverflow.com/a/27272008
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/45496558
type: Answer
answers question: http://stackoverflow.com/q/27170037
has body: Thanks for this help. If you are using windows, like me, and want a desktop shortcut and you already have the nice node.js desktop icon, edit the shortcut properties like this: right click and select properties click change Icon, select the current icon and click OK (to lock it in) in the target box, change it all to simply say cmd or c:\windows\System32\cmd.exe if you are pedantic. now you have a command prompt, with the node.js icon, that opens in the folder you expect, that responds correctly to the node -v command.
score: 0

http://stackoverflow.com/q/27214736
favorite count: 0
has comment: http://stackoverflow.com/comment/42909634
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42909856
has answer: http://stackoverflow.com/a/27214752
accepted answer: http://stackoverflow.com/a/27214752
type: Question
has title: How to add var javascript in appendTo?
has body: How to add var javascript in appendTo ? var i = 1; $('&lt;input type="text" id="num" size="20" name="num[]"/&gt;').appendTo(scntDiv); How to add var i into id="num" to id="num_1"
tagged with: javascript
score: -1
answer count: 1
downvote count: 1

http://stackoverflow.com/q/27195350
has comment: http://stackoverflow.com/comment/42875850
type: Question
has comment: http://stackoverflow.com/comment/42876136
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/42875943
has comment: http://stackoverflow.com/comment/42875864
favorite count: 0
has title: Why does onkeypress function keeps calling itself?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42892409
has body: HTML File: &lt;input onkeypress="addAnother(event)" id="item1"/&gt; Javascript file: function addAnother(event) { if (event.keyCode == 13) { var next = document.createElement('input'); document.body.insertBefore(next); next.focus(); next.onkeypress = addAnother(event); } } Why is it recursively calling itself here? (The input tags are added infinitely). Sorry I am a novice. Edit: I want it to wait for me to press 'Enter' before adding another input tag.
has comment: http://stackoverflow.com/comment/42876046
downvote count: 0
score: 1

http://stackoverflow.com/q/27166001
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27166032
score: -1
has comment: http://stackoverflow.com/comment/42824316
has title: Why I'm not able to dynamically add the HTML to the page using jQuery?
has body: I've following HTML code of Bootstrap Modal dialog box: &lt;div class="modal fade" id="rebateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Submit Form&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;p style="text-align: justify;"&gt;&lt;span style="font-weight: 700;"&gt;&lt;/p&gt; &lt;br/&gt; &lt;!-- Here I want to dynamically add the HTML from AJAX response --&gt; &lt;form id="request_form" method="post" class="form-horizontal" action=""&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; In the above code I want to add the HTML code dynamically after &lt;div class="modal-body"&gt; &lt;p style="text-align: justify;"&gt;&lt;span style="font-weight: 700;"&gt;&lt;/p&gt; &lt;br/&gt; using jQuery AJAX. For it I tried below code: $('#request_form').submit(function(e) { var form = $(this); var formdata = false; if(window.FormData) { formdata = new FormData(form[0]); } var formAction = form.attr('action'); $.ajax({ url : 'xyz.php', type : 'POST', cache : false, data : formdata ? formdata : form.serialize(), contentType : false, processData : false, success: function(response) {alert(response); // Below variable contains the HTML code that I want to add after &lt;br/&gt; var htmlString = "&lt;div class='alert alert-danger alert-dismissible' role='alert'&gt;&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;&lt;/button&gt;"+response+"&lt;/div&gt;" $(htmlString).insertBefore('div.modal-body:first-child'); } }); e.preventDefault(); }); But I'm not able to do so. Getting error in console as ReferenceError: htmlString is not defined No new HTML is coming in Bootstrap modal. The variable response contains following string : Id can't …
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27166032
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: twitter-bootstrap
downvote count: 2

http://stackoverflow.com/a/27320296
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27306844
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/43113696
has comment: http://stackoverflow.com/comment/54343684
answers question: http://stackoverflow.com/q/27306844
has body: Two things come to mind. The first would be that instead of fooCommon.js creating tasks, it could create something usable as a gulp plugin, so then to use it, you just pass your config arguments to the plugin. If that doesn't fit well in this case, then you can move your task logic into a wrapper function, e.g. fooCommon.js module.exports = function(gulp, config){ gulp.task("fooCommon", function () { // Use the config here }); }; Gulpfile // Define whatever config you need var gulp = require('gulp'); var config = {...} var taskCreator = require('../path/to/task/files/fooCommon.js'); // Call the function in 'fooCommon.js', which will be passed the config, and // will create all the tasks you have in common. taskCreator(gulp, config); // Register a task depending on the task created by the exported function. gulp.task("foo", ["fooCommon"], function () { });
has comment: http://stackoverflow.com/comment/43113615
type: Answer
has comment: http://stackoverflow.com/comment/54343532
upvote count: 4

http://stackoverflow.com/q/27261252
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/469357
has answer: http://stackoverflow.com/a/27261397
tagged with: jquery
has body: I have an text input for pagination page changing. I need to limit typing of page numbers to some number f.e. 15 (max pages number). So i'm trying with this code below but always when number is higher than 15 value is changing to 15 and actual typing number. actual.on('keypress', function() { console.log('test'); var t = $(this); if (t.val() &lt; 1) t.val('1'); if (t.val() &gt; 15) t.val('15'); }); Fiddle: http://jsfiddle.net/v6fhobr7/ Can anybody help?
has answer: http://stackoverflow.com/a/27261454
has answer: http://stackoverflow.com/a/27261438
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27261300
accepted answer: http://stackoverflow.com/a/27261300
type: Question
has title: How to limit typing number in text input
possible better answer: http://stackoverflow.com/a/27261454
tagged with: pagination

http://stackoverflow.com/comment/42967752
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27246328
score: 1
has text: you don't need to loop through all `li's` to remove class. `$('li').removeClass('active');` will do.

http://stackoverflow.com/a/27204123
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27204104
has body: If you're seeing "johnson" in your alert, then it's working exactly correctly. When you add a property to an object directly, it takes precedence over any property with the same name on its prototype. So in var a = new b(); ...even though a's prototype has name="david", a itself has name="johnson" (assigned within the call to b), and so that wins. Reading the value of an object property basically works like this (assume __proto__ is a magic property of an object that refers to its prototype [which it will be, in ES6]): function getPropertyValue(obj, propertyName) { // Start with the object itself var o = obj; // Loop until we find an object in the prototype chain that has a property called "name" while (!o.hasOwnProperty(propertyName)) { // This one doesn't, look to its prototype o = o.__proto__; // Did it have one? if (!o) { // No, property not found return undefined; } } return o[propertyName]; }
type: Answer
score: 2

http://stackoverflow.com/a/27267641
has body: If you want the variable to be set with a function upon calling it, you need to have a function for each variable individually: var url = "?request=execRltdSrv&amp;parentSrvObjRef=" + parentSrvObjRefW1() + "&amp;lat=-1&amp;long=-1&amp; slctdOffsets=" + slctdOffsets() + "&amp;srvRef=IAWMblztnExpert-ListSIBCs-ListIICsInSIBC_MB&amp; tatRef=" + tat_Name() + "&amp;suppressID=1"; and then the function: function parentSrvObjRefW1() { var result = ''; // do your stuff return result; } function slctdOffsets() { var result = ''; // do your stuff return result; } function tat_Name() { var result = ''; // do your stuff return result; }
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27267273
type: Answer
has comment: http://stackoverflow.com/comment/43006377
answers question: http://stackoverflow.com/q/27267273

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/27226528
tags question: http://stackoverflow.com/q/27213805
tag name: openlayers-3
tags question: http://stackoverflow.com/q/27210362

dom-events
tags question: http://stackoverflow.com/q/27271472
tags question: http://stackoverflow.com/q/27270906
tags question: http://stackoverflow.com/q/27270291
tags question: http://stackoverflow.com/q/27176123
tags question: http://stackoverflow.com/q/27204131
tags question: http://stackoverflow.com/q/27245040
tags question: http://stackoverflow.com/q/27295052
tags question: http://stackoverflow.com/q/27256128
tags question: http://stackoverflow.com/q/27261723
tags question: http://stackoverflow.com/q/27161793
type: Tag
tags question: http://stackoverflow.com/q/27309713
tags question: http://stackoverflow.com/q/27176983
tags question: http://stackoverflow.com/q/27290851
tag name: dom-events
tags question: http://stackoverflow.com/q/27205584
tags question: http://stackoverflow.com/q/27240557
tags question: http://stackoverflow.com/q/27291607
tags question: http://stackoverflow.com/q/27206268

http://stackoverflow.com/q/27263961
answer count: 1
tagged with: jquery
has title: Display the file upload percentage in text box with progress bar on click browse button using jquery,javascript and html
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27264458
accepted answer: http://stackoverflow.com/a/27264458
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43000146
has body: On click browse button multiple files selected and multiple progress bar display but the value of only first textbox goes to 100% while other textbox values remain static.My code is as follows: I have to display the file upload percentage in a textbox with progress bar.
has comment: http://stackoverflow.com/comment/43000261
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43000432
score: 0

http://stackoverflow.com/a/27223263
answers question: http://stackoverflow.com/q/27222681
has comment: http://stackoverflow.com/comment/42927381
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42927112
type: Answer
has comment: http://stackoverflow.com/comment/42933673
has comment: http://stackoverflow.com/comment/42927781
score: 1
has body: You can add @keyframes to do this. I've used some JavaScript code to add couple CSS rules to .img:hover when the animation ends. var imgs = document.getElementsByClassName('img'); var event = ['webkitAnimationEnd', 'animationend']; for (i = 0; i < imgs.length; i++) { for (j = 0; j < event.length; j++) { imgs[i].addEventListener(event[j], function() { var ss = document.styleSheets; for (k = 0; k < ss.length; k++) { var rules = ss[k]; for (l = 0; l < rules.cssRules.length; l++) { var r = rules.cssRules[l]; if (r.selectorText == ".img:hover") { r.style.backgroundSize = "170px 170px"; r.style.backgroundPosition = "-10px -10px"; } } } }); } } body { background-color: black; } .img { background: url(http://lorempixel.com/150/150/); width: 150px; height: 150px; background-size: 150px 150px; display: inline-block; margin: 2px; cursor: pointer; text-align: center; line-height: 150px; color: transparent; font-size: 25px; -webkit-animation: shrink 0.5s 1; animation: shrink 0.5s 1; opacity: 1; } .img:hover { -webkit-animation: grow 0.5s 1; animation: grow 0.5s 1; opacity: 0.5; color: white; } @-webkit-keyframes grow { 0% { background-size: 150px 150px; background-position: 0px 0px; opacity: 1; color: transparent; } 100% { background-size: 170px 170px; background-position: -10px -10px; opacity: 0.5; color: white; } } @-moz-keyframes grow { 0% { background-size: 150px 150px; background-position: 0px 0px; opacity: 1; color: transparent; } 100% { background-size: 170px 170px; background-position: -10px -10px; opacity: 0.5; color: white; } } @-webkit-keyframes shrink { 0% { background-size: 170px 170px; background-position: -10px -10px; opacity: 0.5; color: white; } 100% { background-size: 150px 150px; background-position: 0px 0px; opacity: 1; color: transparent; } } @-moz-keyframes shrink { 0% { background-size: 170px 170px; background-position: -10px -10px; opacity: 0.5; color: white; } 100% { background-size: 150px 150px; background-position: 0px 0px; opacity: 1; color: transpare…
has comment: http://stackoverflow.com/comment/42927081
upvote count: 1
has comment: http://stackoverflow.com/comment/42927270
accepted answer of: http://stackoverflow.com/q/27222681
has comment: http://stackoverflow.com/comment/42927173

http://stackoverflow.com/a/36301895
answers question: http://stackoverflow.com/q/27155440
has body: found - https://www.npmjs.com/package/libxml-xsd - https://www.npmjs.com/package/xsd-schema-validator Both not much stared yet :/
downvote count: 0
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/109644946

http://stackoverflow.com/a/27283875
has body: //Function to Sum Array function sum(params){ var total = 0 ; for (i = 0; i &lt; params.length; i++){ var temp = parseInt(params[i]); total += temp; } return total; }
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43035990
upvote count: 1
answers question: http://stackoverflow.com/q/27283810
score: 1

http://stackoverflow.com/q/27269406
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27269856
has comment: http://stackoverflow.com/comment/43009601
type: UnansweredQuestion
tagged with: iframe
has answer: http://stackoverflow.com/a/27269536
tagged with: css
has title: Change Style of an element inside iframe - cross domain (I own the second domain)
has answer: http://stackoverflow.com/a/27269739
has body: I am the owner of 2 domains 1. www.example1.com 2. www.example2.com I want to accomplish the following two tasks. I want to load the html page from example2.com into an iframe. (done) i want to change the style of an element exists in the html inside the iframe content. i have tried document.domain in both the pages, but it does not work. Please note: i have the full control on both the domains. Please help, i have been stucked in this issue since 2 days.
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3

http://stackoverflow.com/comment/42952008
type: Comment
comment on: http://stackoverflow.com/a/27237602
score: 0
type: AnswerComment
has text: the db records look like: '{ "timeToEat" : "amSnack", **"dayOfTheWeek" : "0"**, "onTheMenu" : "apples", "_id" : "xTziTnHYmgh5obYDB" }'

http://stackoverflow.com/comment/42986084
comment on: http://stackoverflow.com/q/27256133
type: Comment
has text: sure. With js after page loading delete the required from your tag =)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42898486
type: QuestionComment
type: Comment
has text: Did you notice that your `random` function does not include `high` and `low`?
score: 0
comment on: http://stackoverflow.com/q/27208147

http://stackoverflow.com/q/27236431
has answer: http://stackoverflow.com/a/27260514
tagged with: firefox-addon
tagged with: css
tagged with: firefox-addon-sdk
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/27085661
tagged with: dom
has comment: http://stackoverflow.com/comment/43008188
has comment: http://stackoverflow.com/comment/42989279
has body: I want to automatically open a website and reveal details about the rendered DOM. For that purpose I use a page-worker (https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-worker). When in the content script I execute something like the following: var body = document.getElementsByTagName("body")[0]; console.log(getComputedStyle(body).width); console.log(body.getBoundingClientRect().width); The output is "0" for both of the width values. The same also applies to other elements. Should I conclude that DOM elements are not rendered properly when using a page-worker? Is there a way to gain authentic data from that? Or is there any other proper way to get details about the rendered DOM that behave exactly like the website was opened in a web browser by hand? Because if I open the same website manually and execute the same commands, it reveals (correctly) the width of the window (1440), of course. edit I probably should have said that before, but: It's not that gaining the values does not work at all. If I go deeper in the DOM structure, I get correct values. I only have problems with the root body element, I think. Weirdly enough if I execute the exact same commands on the firefox console, the return values are perfectly correct.
tagged with: javascript
type: UnansweredQuestion
has title: Content Scripts: Page-worker - element with 0 width
type: Question

http://stackoverflow.com/a/27252180
accepted answer of: http://stackoverflow.com/q/27199031
answers question: http://stackoverflow.com/q/27199031
type: AcceptedAnswer
type: Answer
has body: I ended up using this Angular.JS directive : https://github.com/glaucocustodio/angular-initial-value You can find more informatino in that blog : http://blog.glaucocustodio.com/2014/10/20/init-ng-model-from-form-fields-attributes/ Just in case the links dies you need to put this code before the declaration of your Angular application: var initialValueModule = angular.module('initialValue', []) .directive('initialValue', function() { return{ restrict: 'A', controller: ['$scope', '$element', '$attrs', '$parse', function($scope, $element, $attrs, $parse){ var getter, setter, val, tag; tag = $element[0].tagName.toLowerCase(); val = $attrs.initialValue || $element.val(); if(tag === 'input'){ if($element.attr('type') === 'checkbox'){ val = $element[0].checked ? true : undefined; } else if($element.attr('type') === 'radio'){ val = ($element[0].checked || $element.attr('selected') !== undefined) ? $element.val() : undefined; } } if($attrs.ngModel){ getter = $parse($attrs.ngModel); setter = getter.assign; setter($scope, val); } }] }; }); /* commonjs package manager support (eg componentjs) */ if (typeof module !== "undefined" &amp;&amp; typeof exports !== "undefined" &amp;&amp; module.exports === exports){ module.exports = initialValueModule; } Then you can do : &lt;script&gt; var app = angular.module('myApp', ['initialValue']); //Pass the directive to the app &lt;/script&gt; &lt;body ng-app="myApp"&gt; &lt;!-- Add the "initial-value" directive to the html input --&gt; &lt;input type="text" value="John" name="text" initial-value ng-model="text" id="text"/&gt; &lt;/body&gt;
score: 0

http://stackoverflow.com/comment/42913391
has text: I know how to use `===` but I just wonder, which algorithm PHP follows for things like this. Your answer seems to be wrong, because `[] == ""` returns false, despite of both arguments being `empty()`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27216768

http://stackoverflow.com/comment/42960281
score: 0
type: Comment
has text: While this does submit the form, it does not trigger the onsubmit event.
comment on: http://stackoverflow.com/a/27159992
type: AnswerComment

http://stackoverflow.com/q/27192439
type: UnansweredQuestion
has body: Here's a link of my demo! If it's not clear enough, please see this link of fisheye demo2. fisheye.copy = function() { return d3_fisheye_scale(scale.copy(), d, a); }; fisheye.nice = scale.nice; fisheye.ticks = scale.ticks; fisheye.tickFormat = scale.tickFormat; return d3.rebind(fisheye, scale, "domain", "range"); I want my fisheye to move smoothly, which means when I go over the plain space, it will do fisheye also.
tagged with: fisheye
type: Question
has title: I have a d3 project using fisheye, But why I have to point my mouse on the data point
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27194130
tagged with: d3.js

http://stackoverflow.com/q/27170004
has title: Mark up ASP.net validator
has comment: http://stackoverflow.com/comment/42832134
tagged with: jquery
tagged with: asp.net
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42831487
answer count: 0
type: UnansweredQuestion
has body: I have created a simple webform using the designer in ASP.net (Vs2013). The system really works well, I only had to use a few textboxes and custom validation controls from the Toolbox. The form checks client sided if the input is correct and shows an error message if not. However the errormessage just gets shown on the page in ugly red text atm. I would very much like to mark-up this error message, for example use the Jquery fade-in function on the error or use any custom javascript to hook in this emited js from ASP. What and where would be the best way to do this? code: &lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="registreren.aspx.cs" Inherits="registreren" %&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;script type="text/javascript" src="scripts/jquery.js"&gt;&lt;/script&gt; &lt;title&gt;&lt;/title&gt; &lt;link href="WebsiteStyle.css" type="text/css" rel="stylesheet" /&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div style="height: 244px"&gt; &lt;table class="auto-style1"&gt; &lt;tr&gt; &lt;td class="auto-style2" rowspan="1"&gt;Username&lt;/td&gt; &lt;td class="auto-style7" rowspan="1"&gt; &lt;asp:TextBox ID="TextBoxUsername" runat="server" Width="240px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;td rowspan="1"&gt; &lt;asp:RequiredFieldValidator ID="RequiredUsername" runat="server" ControlToValidate="TextBoxUsername" ErrorMessage="Please enter an username." CssClass="validationError"&gt;&lt;/asp:RequiredFieldValidator&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="auto-style3" rowspan="1"&gt;Email&lt;/td&gt; &lt;td class="auto-style6" rowspan="1"&gt; &lt;asp:TextBox ID="TextBoxEmail" runat="server" Width="240px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;td class="auto-style4" rowspan="1"&gt; &lt;asp:RequiredFieldValidator ID="RequiredEmail" runat="server" ControlToValidate="TextBoxEmail" ErrorMessage="Please enter your emailaddress." CssClass="validationError…
type: Question
tagged with: javascript
score: 0
tagged with: servercontrols

http://stackoverflow.com/a/27237728
score: 0
has comment: http://stackoverflow.com/comment/42981846
type: Answer
answers question: http://stackoverflow.com/q/27237324
has comment: http://stackoverflow.com/comment/42952135
has body: I'm not too sure what you mean, but dynamic content can be created using JQuery and Javascript. $("#createButton").click(function() { if($("#createHTML").val() != "") { $("#creationArea").append("" + $("#createHTML").val() + ""); } }); Type in HTML into text box (try creating a span with style="color:green")
has comment: http://stackoverflow.com/comment/42958791

http://stackoverflow.com/comment/42808773
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27157295
score: 0
has text: what is the value of items in if(angular.equals(value,items)) ?

single-page-application
tags question: http://stackoverflow.com/q/27312750
tags question: http://stackoverflow.com/q/27274485
tags question: http://stackoverflow.com/q/27268691
tag name: single-page-application
tags question: http://stackoverflow.com/q/27230723
tags question: http://stackoverflow.com/q/27248043
type: Tag

http://stackoverflow.com/a/27193755
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27193672
score: 1
answers question: http://stackoverflow.com/q/27193672
has body: You can't do this. Put simply: in someone else's browser, this isn't your decision to make.
upvote count: 1
has comment: http://stackoverflow.com/comment/44018398

http://stackoverflow.com/comment/43031972
score: 0
comment on: http://stackoverflow.com/q/27281528
has text: I don't see that code anywhere in your question.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27308302
tagged with: google-maps-api-3
has body: I have a problem with on my google map I am using MarkerWithLabel and importing my own image label, the problem is when I zoom in and out the marker is moving south east from the original point. I don't know why because using a normal marker everything is normal and the marker stick on its positions. Below the link to the fiddle of my map. Can someone tell me how to make this marker not moving from original point when zooming ? Thanks. http://jsfiddle.net/pfxvno07/1/ var latLng = new google.maps.LatLng(48.864716, 2.349014); var map; var mapOptions = { zoom: 15, center: new google.maps.LatLng(48.864716, 2.349014), disableDefaultUI: true, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: true, panControl:true, zoomControl:true, mapTypeControl:true, scaleControl:true, streetViewControl:true, overviewMapControl:true, rotateControl:true } map = new google.maps.Map(document.getElementById('map'), mapOptions); var marker = new MarkerWithLabel({ position: latLng , draggable: false, //raiseOnDrag: true, map: map, labelContent: 10+1, labelAnchor: new google.maps.Point(0, 0), labelClass: "label"+2, //the CSS class for the label labelStyle: {opacity: 1}, icon: { url: '', size: null, origin: null, anchor: null} });
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/27310132
has title: MarkerWithLabel moving when zooming
answer count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43081086
score: 0
has answer: http://stackoverflow.com/a/27310132
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42829436
comment on: http://stackoverflow.com/q/27168993
has text: Pls, provide more information. Browser cache, IE version, does your IE shows alerts on other web pages, have you enabling or disabling javascript in IE and this alert and, have you try to re-setup IE, what about other versions of IE and so on. At current stage question can be closed for low quality
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42897284
type: QuestionComment
has text: Thanks for the answer. I don´t seem to work it out. Do you have a simple plunkr example?
comment on: http://stackoverflow.com/q/27206759
score: 0
type: Comment

http://stackoverflow.com/comment/43044569
comment on: http://stackoverflow.com/q/27289049
score: 0
type: QuestionComment
type: Comment
has text: possible duplicate of [Jquery- Get the value of first td in table](http://stackoverflow.com/questions/2931234/jquery-get-the-value-of-first-td-in-table)

http://stackoverflow.com/q/27224008
has answer: http://stackoverflow.com/a/68158347
has comment: http://stackoverflow.com/comment/42937275
possible better answer: http://stackoverflow.com/a/68158347
answer count: 4
favorite count: 0
has title: WebRTC: force peers to use TURN server
score: 19
has body: I have a webrtc application, it works fine, but for testing purposes, I need to test if my TURN server works, but because both the testing devices are within the same network, I am unable to test, thought below code would restrict candidates to only the ones using TURN server, function onIceCandidate(event, targetSessionID, targetUserName) { if (event.candidate) { var candidate = event.candidate.candidate; if(candidate.indexOf("relay")&lt;0){ // if no relay address is found, assuming it means no TURN server return; } sendMessage(candidate); // using socket.io to send to the otherside ... but I noticed that( with much frustration), this does not work, because when peer is creating answer description, .... a=candidate:0 1 UDP 2128609535 13.198.98.221 58779 typ host a=candidate:0 2 UDP 2128609534 13.198.98.221 58780 typ host .... this means, the communcation is direct and not through TURN server, am I correct in assuming this? Now, how do I force the webrtc to use the TURN server?
has comment: http://stackoverflow.com/comment/42977199
type: AnsweredQuestion
upvote count: 19
has answer: http://stackoverflow.com/a/27392580
has answer: http://stackoverflow.com/a/39491392
has answer: http://stackoverflow.com/a/28849022
has comment: http://stackoverflow.com/comment/43470327
has comment: http://stackoverflow.com/comment/42965586
type: Question
accepted answer: http://stackoverflow.com/a/27392580
linked to: http://stackoverflow.com/q/34030188
downvote count: 0
tagged with: webrtc
tagged with: javascript

http://stackoverflow.com/a/27252700
has body: I would avoid using table-row and table-cell values whe doing what you do. The layout and content of your part of the page is not a table, therefore using display: block or display: inline-block would be more appropriate. Inline-block elements can be aligned as inline content (text-align) and you can give them width (33% for example). If you want narrow screens to show divs in one column, use media queries.
answers question: http://stackoverflow.com/q/27251101
has comment: http://stackoverflow.com/comment/42979505
score: 0
type: Answer

http://stackoverflow.com/comment/42993663
has text: Yeah, just make a nice unobtrusive newsletter subscription box, that doesn't block the user
comment on: http://stackoverflow.com/q/27259760
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/103842363
score: 0
type: AnswerComment
has text: @vicR I don't remember which solution I ended up with, haven't been into this project for a while. Check https://github.com/emnh/rts/blob/master/src.client/game/client/selection.cljs. IIRC I ended up projecting each 3D object bounding sphere on screen circle and then intersecting that with selection rectangle. Also made GPU solution I think in engine2_selection.cljs. Sorry for late reply.
type: Comment
comment on: http://stackoverflow.com/a/37136190

http://stackoverflow.com/comment/42987203
has text: First: I didn't know `items` was a collection of objects. Second: I started my answer saying "I'm not sure if indexOf looks for matching a value in an array". I'm just trying to help.
type: AnswerComment
comment on: http://stackoverflow.com/a/27256193
score: 0
type: Comment

http://stackoverflow.com/q/27281560
has answer: http://stackoverflow.com/a/27284000
tagged with: ember.js
possible better answer: http://stackoverflow.com/a/27284000
tagged with: ember-cli
favorite count: 0
has body: In old school Ember, I had an initializer that injected application controller into a component: Ember.Application.initializer({ name: "TopBreadcrumbs", initialize: function(container, application) { application.register("component:top-breadcrumbs", App.TopBreadcrumbsComponent); application.inject("component:top-breadcrumbs", "router", "router:main"); return application.inject("component:top-breadcrumbs", "applicationController", "controller:application"); } }); Converting this initializer to Ember-CLI and therefore ES6 modules, I have this: // initializers/top-breadcrumbs.js export default { name: "top-breadcrumbs", initialize: function(container, application) { application.register("component:top-breadcrumbs", App.TopBreadcrumbsComponent); application.inject("component:top-breadcrumbs", "router", "router:main"); return application.inject("component:top-breadcrumbs", "applicationController", "controller:application"); } }; The issue is: How do I make that reference to the AppTopBreadcrumbsComponents in this new format? App does not exist anymore, and that component is no longer a global like before... it is a es6 module like everything else. How do I reference that in Ember-CLI? Thanks!
upvote count: 1
has answer: http://stackoverflow.com/a/27284645
type: AnsweredQuestion
score: 1
has title: Injection within app initializer in Ember-CLI?
type: Question
tagged with: ecmascript-6
answer count: 2
accepted answer: http://stackoverflow.com/a/27284645
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/43027229
score: 0
type: AnswerComment
has text: Cheers John - great help
type: Comment
comment on: http://stackoverflow.com/a/27241778

http://stackoverflow.com/comment/43048819
type: Comment
comment on: http://stackoverflow.com/a/27291301
has text: Check my code. I am passing an array of objects (for that is what the table is for).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42881813
comment on: http://stackoverflow.com/q/27197702
score: 0
type: Comment
type: QuestionComment
has text: The JSON appears to be correct

http://stackoverflow.com/q/27201417
type: Question
has body: I simply want to get the "minLength" parameter of a typeahead control anywhere in my code. How can I do this? The controle is defined like this: $('#typeahead').typeahead({ hint: true, highlight: true, minLength: 3 }, ....
upvote count: 1
tagged with: javascript
favorite count: 0
tagged with: typeahead.js
answer count: 1
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Get bootstrap typeahead parameters
downvote count: 0
has answer: http://stackoverflow.com/a/27201523
score: 1

http://stackoverflow.com/a/27155192
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42805125
downvote count: 0
has comment: http://stackoverflow.com/comment/42804963
has body: randomnumber == 1 | 5 Should be: randomnumber == 1 || randomnumber == 5 Final result: function LF(lottery_number){ if (lottery_number == 1) { randomIntFromInterval(1, 5); if (randomnumber == 1 || randomnumber == 5) { Points = Points * 2; }else if (randomnumber == 2 || randomnumber 4) { Points = Points + 10; }else if (randomnumber == 3) { Bitcoins = Bitcoins + 1; } }else if (lottery_number == 2) { //i'm gonna add something here later and i have tried removing it } randomnumber = 0; } '|' is a Bitwise OR, something you're not attempting to do. || is a conditional OR. This should correctly give you your if statement checks.
accepted answer of: http://stackoverflow.com/q/27155138
type: Answer
answers question: http://stackoverflow.com/q/27155138
score: 1
has comment: http://stackoverflow.com/comment/42805207
has comment: http://stackoverflow.com/comment/42804835
has comment: http://stackoverflow.com/comment/42805262
has comment: http://stackoverflow.com/comment/42804704
has comment: http://stackoverflow.com/comment/42804781
upvote count: 1

http://stackoverflow.com/comment/42807099
comment on: http://stackoverflow.com/q/27155589
score: 0
has text: Gotcha. Weird that Batarang won't start. Can you post a jsfiddle or more code so I can try emulating the environment?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27311519
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: sharepoint
has title: How to send attachment and set email priority using javascript REST API in SharePoint Hosted App?
has answer: http://stackoverflow.com/a/29679568
answer count: 1
downvote count: 0
favorite count: 0
has body: I have a requirement where in i need to send email with priority set and with attachment. Currently I am using "/_api/SP.Utilities.Utility.SendEmail" REST API to send email; but not sure how to set email priority and attachment to email using REST. Here is my code: var urlTemplate = SPAppWebUrl + "/_api/SP.Utilities.Utility.SendEmail"; $.ajax({ contentType: 'application/json', url: urlTemplate, type: "POST", data: JSON.stringify({ 'properties': { '__metadata': { 'type': 'SP.Utilities.EmailProperties' }, 'From': from, 'To': { 'results': [to] }, 'Body': emailBody, 'Subject': subject } } ), headers: { "Accept": "application/json;odata=verbose", "content-type": "application/json;odata=verbose", "X-RequestDigest": $("#__REQUESTDIGEST").val() }, success: function (data) { //console.log('success') alert('email send successfull..'); }, error: function (err) { //console.log(JSON.stringify(err)); alert(JSON.stringify(err)); } }); Any help or other approach/pointers would be greatly appreciated. Thanks
tagged with: rest

http://stackoverflow.com/comment/42924085
comment on: http://stackoverflow.com/a/27222731
has text: @remus, Thank you for comment. I updated the answer to include it.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27253358
answers question: http://stackoverflow.com/q/27253232
type: Answer
score: 2
downvote count: 0
has body: You will have to tell Angular to bind the content as HTML like so: {{widget.title}} However, since 1.2, Angular ships with $sce enabled, which means you have to explicitly tell Angular that you trust that HTML like so: // You will have to inject $sce in your controller. $scope.contentHere = $scope.contentHere.map(function(entry){ entry.content = $sce.trustAsHtml(entry.content); return entry; }); Also, not sure if it's just a copy paste issue, but in second object in your array, the content is encoded in HTML entities, you will want proper, un-encoded, HTML in there.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27253232
type: AcceptedAnswer

http://stackoverflow.com/comment/43054463
comment on: http://stackoverflow.com/q/27293716
has text: @PawełFus thanks for the reply. but the format of the date in my database is: `%d.%m.%y %H:%i` so `01.12.10 = 01 jan 2010` and not `jan 10 2010`. Is it the problem is with my date format?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42931734
type: AnswerComment
comment on: http://stackoverflow.com/a/27226397
type: Comment
has text: where i should pass the details via context? as you have mentioned in the first line
score: 0

http://stackoverflow.com/comment/42843651
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27160640
has text: (Changed the image url to an external placeholder so as not to deal with relative references)

http://stackoverflow.com/q/27181370
has body: I have a grid panel, I am using ExtJS 3.4 . I want to select a row and then when I click the update button, the values of the row selected has to be populated in a window. I tried using the rowselect and rowclick event, but both of it did not work. Can someone tell me how to do this. Also,how to align the paging toolbar to the bottom of the screen? this.grid= new Ext.grid.GridPanel({ layout: 'fit', //autoHeight: true, height: 556, store: store, columns:[ {header: "Book Name", dataIndex: 'bookName'}, {header: "Author Name", dataIndex: 'authorName'} ], sm: new Ext.grid.RowSelectionModel({singleSelect: true}), bbar: new Ext.PagingToolbar({ store: store, // grid and PagingToolbar using same store displayInfo: true, pageSize: pgSize }), listeners:{ 'rowselect': function(){ alert("Here"); } } });
favorite count: 0
tagged with: extjs
downvote count: 0
has title: extjs3.4 gridpanel rowselect event not working
tagged with: grid
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27182404
accepted answer: http://stackoverflow.com/a/27182404
type: Question
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/42962250
type: Comment
type: QuestionComment
has text: As well, Check browser console for errors
comment on: http://stackoverflow.com/q/27242992
score: 0

http://stackoverflow.com/q/27197296
tagged with: canvas
has answer: http://stackoverflow.com/a/27198224
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: scatter
has comment: http://stackoverflow.com/comment/42881153
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: plot
has body: I posting my question because I couldn't find info anywhere, most tutorials require the use of fancy libraries and I just wan't to draw a html5 canvas scatter plot from two json multidimensional arrays containing the following data example: { 'dataset1' [ { "p0" : "0.69", "log(p0)" : "14", "p0_name" : "cn95" }, ] and for the other axis { "p1" : "0.69", "log(p1)" : "14", "p1_name" : "dn95" }, the example I'm trying to recreate is something like <a href="http://www.atnf.csiro.au/people/pulsar/psrcat/proc_form.php?version=1.51&amp;JName=JName&amp;P0=P0&amp;P1=P1&amp;startUserDefined=true&amp;c1_val=&amp;c2_val=&amp;c3_val=&amp;c4_val=&amp;sort_attr=jname&amp;sort_order=asc&amp;condition=&amp;pulsar_names=&amp;ephemeris=short&amp;coords_unit=raj%2Fdecj&amp;radius=&amp;coords_1=&amp;coords_2=&amp;style=Long%20with%20last%20digit%20error&amp;no_value=*&amp;fsize=3&amp;x_axis=p0&amp;x_scale=linear&amp;y_axis=p1&amp;y_scale=linear&amp;state=query&amp;plot_bottom.x=55&amp;plot_bottom.y=34" rel="nofollow">this. The biggest problem I have is getting the canvas use logarithmic scales. You can see from the example link that that is required to see something from the data. A fiddle would be great to play with and create my own! This is what I have so far: http://jsfiddle.net/3L4humdv/ and this is the data im using <a href="http://www.atnf.csiro.au/research/pulsar/psrcat/proc_form.php?version=1.51&amp;P0=P0&amp;P1=P1&amp;startUserDefined=true&amp;c1_val=&amp;c2_val=&amp;c3_val=&amp;c4_val=&amp;sort_attr=jname&amp;sort_order=asc&amp;condition=&amp;pulsar_names=&amp;ephemeris=short&amp;coords_unit=raj%2Fdecj&amp;radius=&amp;coords_1=&amp;coords_2=&amp;style=Long%20with%20last%20digit%20error&amp;no_value=*&amp;fsize=3&amp;x_axis=&amp;x_scale=linear&amp;y_axis=&amp;y_scale=linear&amp;state=query&amp;table_bottom.x=62&amp;table_bottom.y=34" rel="nofollow">link
has comment: http://stackoverflow.com/comment/42879431
has title: drawing scatter plot with html5 canvas and pure javascript no libraries with logarithmic axes
type: Question
score: 0

http://stackoverflow.com/comment/43048654
has text: use `window.setTimeout()` if you want to execute once, `setInterval` will iterate each 5 second
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27291460
score: 1

http://stackoverflow.com/q/27222640
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27222731
score: 1
has title: incrementing the last digit of a string using regular expression
type: Question
has body: how to increment the last digit of a string using regular expression, ie 44test1222 to 44test1223 i have incremented but how to change that. my regular expression in JavaScript code is as given below var email='44test1222'; var number = email.match(/\d+$/); number++;
has comment: http://stackoverflow.com/comment/42923932
answer count: 1
tagged with: javascript
tagged with: string
favorite count: 0
accepted answer: http://stackoverflow.com/a/27222731
tagged with: regex
has comment: http://stackoverflow.com/comment/42923952
has comment: http://stackoverflow.com/comment/42923846
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/42877588
score: 0
type: Comment
has text: Seeing as you're passing a jQuery object containing DOM elements to the `data` option, and that it's invalid data, I don't see why you would want to add a string to that as well ?
type: QuestionComment
comment on: http://stackoverflow.com/q/27196320

http://stackoverflow.com/q/27266696
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I am working on a WP theme, and am having some trouble with the navigation. The basic markup looks like this: #navbar ul.main-nav li.menu-item.drop-submenu ul.submenu li.menu-item.drop-submenu ul.submenu li.menu-item.drop-submenu etc. (any menu item can have unlimited submenus) li.menu-item.drop-submenu ul.submenu li.menu-item li.menu-item li.menu-item Now the problem I'm having is that a menu item with 2 or more submenus spanning to the right will eventually overflow off viewport. I'm using jquery to calculate the width and offset of the submenus and apply a class that will cause the submenus to drop on the left instead should they cause overflow. This was relatively easy to do for the "top-level" submenus, but i'm drawing a blank for the nested submenus. Basically, i'm looking for a way to find out what set of submenus spans most to the right, but not the collective width of all nested subs, if that makes any sense... I'm not even sure how to explain this properly, so if something is unclear i will try my best to clarify. Thank you in advance, any push in the right direction will be much appreciated. EDIT: Made a JSFiddle
has comment: http://stackoverflow.com/comment/43005527
has comment: http://stackoverflow.com/comment/43005269
has answer: http://stackoverflow.com/a/27268334
accepted answer: http://stackoverflow.com/a/27268334
tagged with: css
possible better answer: http://stackoverflow.com/a/27266976
downvote count: 0
has comment: http://stackoverflow.com/comment/43012344
has answer: http://stackoverflow.com/a/27266976
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43006600
has comment: http://stackoverflow.com/comment/43004586
has title: Find out how wide a set of children is

http://stackoverflow.com/a/27230998
type: Answer
answers question: http://stackoverflow.com/q/27227657
has body: Put your callback(out1+ ' e o l'); inside the .query callback. In your code, callback is called before the connection.query executes.
score: 0

http://stackoverflow.com/a/27291978
accepted answer of: http://stackoverflow.com/q/27291230
type: Answer
score: 2
has body: Finally found it ! You have to use on: {...} like this: var drp_nt = $('&lt;select /&gt;', { 'id': 'drp_' + nt, 'name': 'drp_' + nt + '[]', on: { change: check_data }, 'multiple': true }); var drp_cnt = $('&lt;select /&gt;', { 'id': 'drp_' + cnt, 'name': 'drp_' + cnt + '[]', on: { change: check_data }, 'multiple': true }); As in the JQuery documentation
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27291230
upvote count: 2

http://stackoverflow.com/a/27300277
answers question: http://stackoverflow.com/q/27299194
type: AcceptedAnswer
downvote count: 0
has body: No, File objects are not immutable. You can always extend them with new properties. It seems like you have been fooled by your console. For some reason it didn't output the lat and lng properties, but you still will be able to access them on your object. Also try expanding ("inspecting") the logged object
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27299194

http://stackoverflow.com/comment/42852271
has text: Also note that `(row1 + 1 != row2 || row1 - 1 != row2)` is always `true`.
score: 1
comment on: http://stackoverflow.com/a/27182162
type: AnswerComment
type: Comment

codeigniter
tags question: http://stackoverflow.com/q/27251013
type: Tag
tags question: http://stackoverflow.com/q/27283378
tags question: http://stackoverflow.com/q/27289129
tags question: http://stackoverflow.com/q/27201699
tag name: codeigniter
tags question: http://stackoverflow.com/q/27271169
tags question: http://stackoverflow.com/q/27157128
tags question: http://stackoverflow.com/q/27185940
tags question: http://stackoverflow.com/q/27171394
tags question: http://stackoverflow.com/q/27204342
tags question: http://stackoverflow.com/q/27185961

http://stackoverflow.com/q/27228090
has comment: http://stackoverflow.com/comment/42933779
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has body: why is the prototype property of the instance throwing undefined?. function Test(name){ this.name = name; } Test.prototype = { constructor: Test, sayHello : function(){ console.log(this.name); } } var z = new Test("Hello"); console.log(z.prototype); //undefined console.log(zUtils.constructor); // Test I am able to access the sayHello method via z.sayHello(), then why is my instance prototype returning me undefined instead of Test.prototype?.
answer count: 3
possible better answer: http://stackoverflow.com/a/27228294
duplicate of: http://stackoverflow.com/q/572897
has answer: http://stackoverflow.com/a/27228294
has answer: http://stackoverflow.com/a/27228588
has title: Prototype property throwing undefined
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/572897
tagged with: oop
accepted answer: http://stackoverflow.com/a/27228588
has comment: http://stackoverflow.com/comment/42933562
has answer: http://stackoverflow.com/a/27228321
type: Question
upvote count: 4

http://stackoverflow.com/q/27312511
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27312571
tagged with: regex
has comment: http://stackoverflow.com/comment/43085520
has answer: http://stackoverflow.com/a/27312601
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27312601
has title: validation of javascript regular expression
has answer: http://stackoverflow.com/a/27312571
type: Question
answer count: 2
has body: I have the following string of javascript: #d1{width:100px;} it looks like css code now I wrote a regular expression that finds of an element starting with # or . in the string. the regular expression is like this: /(?:(#|\.)([A-Za-z0-1\-]+))/g and the above regular expression matches successfully such strings like the above one. but now when I tested this regular expression on the above string in Google console with then it returns false the which I wrote was: var str = "#d1{width:100px} " // returns undefined var regex = / (?:(#|\.)([A-Za-z0-1\-]+)) /g //undefrined regex.test(str) // returns false Why it is not working?

vba
tags question: http://stackoverflow.com/q/27234824
tag name: vba
type: Tag
tags question: http://stackoverflow.com/q/27278022
tags question: http://stackoverflow.com/q/27222444

http://stackoverflow.com/a/27213948
upvote count: 1
type: Answer
has body: I don't really see a problem with your code to be honest, it should work, and if you see null as result is because the query didn't return any document, try mongoose.set('debug', true) and execute the queries yourself. Anyway, if you just need all results at once, just use co-each as follow: var each = require('co-each') var styles = ['font-color', 'back-color', 'font-family', 'back-image', 'back-repeat'] // executed in parallel var results = yield each(styles, function *getStyle(style) { return yield css.findOne({ css_name: style }).exec() }) console.log(results)
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27202411

http://stackoverflow.com/comment/92562046
has text: This is actually not true, there is more to it than what is described here. See https://stackoverflow.com/a/52820058/2427596
type: Comment
comment on: http://stackoverflow.com/a/27307263
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43080353
type: AnswerComment
has text: Note that this is the *exact* example for the dangers of ASI that is shown in pretty much every JS tutorial, styleguide, book, etc. ever created in the history of JS. Anybody who has spent even 3 seconds learning JS knows this.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27309378

http://stackoverflow.com/a/27188948
has body: did you take a look at your HTML coverage report ? Only 3 of 22 functions are tested, in regard of travis trace... you may have to test all possibles outputs, the HTML report is more helpful than LCOV report in this case. Regards,
has comment: http://stackoverflow.com/comment/42871693
has comment: http://stackoverflow.com/comment/42864496
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42870678
answers question: http://stackoverflow.com/q/27187043

http://stackoverflow.com/comment/47260732
comment on: http://stackoverflow.com/a/29554778
type: AnswerComment
has text: I suppose it should be a comment.
score: 0
type: Comment

http://stackoverflow.com/comment/77900697
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27234528
has text: well then I have no idea how to do it except for your answer ^^ :(
score: 0

http://stackoverflow.com/q/27184053
has comment: http://stackoverflow.com/comment/42855319
accepted answer: http://stackoverflow.com/a/27184162
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42855370
has comment: http://stackoverflow.com/comment/42855675
possible better answer: http://stackoverflow.com/a/27184512
has body: i'm not sure if i gave the right term. I'm having an issue on how to remove the cache on the hovered item. Html 01 02 03 04 05 06 07 08 09 10 11 12 Javascript function growLine(e) { e.find('span').stop(false,true).animate({ width: 22 }, 400); } function shrinkLine(e) { e.find('span').stop(false,true).animate({ width: 0 }, 400); } $('.gallery-nav li').each(function() { $(this).append(''); }); $('.gallery-nav li:first-child').addClass('active'); $('.gallery-nav li').hover(function() { if( !$(this).hasClass('active') ) { growLine($(this) ); } }, function() { if( !$(this).hasClass('active') ) { shrinkLine( $(this) ); } }); $('.gallery-nav li a').click( function () { var allList = $('.gallery-nav li'); var e = $(this); allList.removeAttr('class'); e.parent().addClass('active'); }); jsFiddle There is a line below the numbers when hovered. The problem is the line is not removed once i click on other numbers. This works but only once.
has comment: http://stackoverflow.com/comment/42855488
has answer: http://stackoverflow.com/a/27184162
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42855297
tagged with: javascript
tagged with: jquery
score: 0
has title: How to remove jquery cache on hovered item
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27184512
tagged with: css

http://stackoverflow.com/q/27290012
has body: I've been looking online and have found that the stuff about SSJS is a bit confusing. How do I get started with Server-Side JavaScript? Can it be used with any web host? So far, I've downloaded the Node.js program from the official website, installed it, setup PATH (which the installer does) and I've copied/pasted the code snippet: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/'); that is displayed on the main page into example.js, then opened the node cmd and entered: "node.js example.js" (without quotes) and all I get in return is: ... But I should be getting: "Hello, world!" Am I doing something wrong?
has comment: http://stackoverflow.com/comment/43046243
has comment: http://stackoverflow.com/comment/44326496
has title: How do I get started with Node.js?
type: Question
linked to: http://stackoverflow.com/q/2353818
tagged with: javascript
score: -1
upvote count: 2
downvote count: 3
has comment: http://stackoverflow.com/comment/43046323
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27290067
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/2353818
tagged with: node.js

http://stackoverflow.com/comment/42877536
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27195538
type: Comment
has text: Try giving them a class name and then use document.getElementsByTagName(".classname"). Because the returned value by the methods you used returns an object and you have to parse that object to really get the checked value whether clicked or not.

http://stackoverflow.com/a/27271736
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27271667
upvote count: 1
type: Answer
has body: One solution is to use jquery .map() and save each li element height in an array: var hei = $("div ul li").map(function() { return $(this).height(); }); console.log(hei); div ul li { height: 50px; } If you want to sum the height you can use .each() like: var sumHeight = 0; var hei = $("div ul li").each(function() { return sumHeight += ~~$(this).height(); }); console.log(sumHeight); div ul li { height: 50px; }
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27271667

http://stackoverflow.com/comment/42893097
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27205278
has text: Maybe `load` handlers don't wait for background images? I'm not sure about that one, or if that's his issue.
type: AnswerComment

http://stackoverflow.com/comment/42975535
has text: thanks. You are right since I change the order of my file (by changing their names) I got different results. I might do like you and avoid the * sign. By the way any idea on how to avoid thoses dependencies in javascript files?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27244419
score: 0

http://stackoverflow.com/q/27232057
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42941075
favorite count: 0
has body: Would like to test with javascript if browser support typed array http://caniuse.com/#feat=typedarrays i tryed this but seems not the good way because some browser have just a partial support..: if(window.ArrayBuffer){alert('typed array supported')}
has title: How to check if javascript typed arrays are supported?
upvote count: 6
tagged with: typed-arrays
type: AnsweredQuestion
score: 6
has answer: http://stackoverflow.com/a/27232152
type: Question
accepted answer: http://stackoverflow.com/a/27232152

http://stackoverflow.com/q/27177224
has comment: http://stackoverflow.com/comment/42844940
has comment: http://stackoverflow.com/comment/42844671
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42844458
favorite count: 0
type: UnansweredQuestion
has body: Following this question: Can a cookie that was generated with Javascript (not send in the header by the server) be stolen / used by an attacker? This is driving me crazy. How can one ever keep state at the client using a FB access token? One should use it to access resources on one's own server, and also from the FB server. Assuming that one uses a js framework (Backbone / Marionette) and REST authentication. It cannot be encrypted as such, and yet there is no other way than to use a cookie to keep state at the client. I have done plenty of research. Every source mentions to keep state at the client, to avoid server sessions, yet I can't find a single source that explains how to do it safely. If you know the answer, please share. Thanks.
tagged with: php
tagged with: laravel
has comment: http://stackoverflow.com/comment/42844414
has comment: http://stackoverflow.com/comment/42844358
tagged with: cookies
score: 1
has title: How to keep state at the client SAFELY?
linked to: http://stackoverflow.com/q/27177064
upvote count: 1
has comment: http://stackoverflow.com/comment/42844528
has answer: http://stackoverflow.com/a/27177995
type: Question
has comment: http://stackoverflow.com/comment/42843469
tagged with: javascript
has comment: http://stackoverflow.com/comment/42843402
tagged with: security

http://stackoverflow.com/comment/42978497
type: Comment
type: QuestionComment
has text: @PabloRomeo - Thanks, unfortunately it's a big app with i18n and l10n already implemeneted in a certain way (duplicating the html files per language) so i can't change it to work the way requireJS wants it.
score: 0
comment on: http://stackoverflow.com/q/27248043

http://stackoverflow.com/comment/43007922
type: Comment
type: QuestionComment
score: 1
has text: Unfortunately, this isn't straightforward (see e.g. [this question](http://stackoverflow.com/questions/11503151/in-d3-how-to-get-the-interpolated-line-data-from-a-svg-line)). I would get the unprojected points from the geometry of the feature, project them, and then jitter each one.
comment on: http://stackoverflow.com/q/27241216

http://stackoverflow.com/q/27239279
has comment: http://stackoverflow.com/comment/42955483
possible better answer: http://stackoverflow.com/a/27239395
type: Question
has answer: http://stackoverflow.com/a/27239392
has answer: http://stackoverflow.com/a/27239395
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27239392
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: Hi I have a script that appends a set of constant string to a textarea it works fine if I click the button first but as soon as I input text on the textarea, the button does not append the constant string on the textarea if clicked again here is my code for the click event: $("#apply").on("click",function() { var orange = $("#agent_option").val(), lock = $("#agent_disallowed").val(); $("#textareaFixed").html(orange + " " + lock ); }); and Here is my html form: User-Agent : All Banana Apple Melon Lynx Liger Disallow : <input class="form-control input-sm" id="ax_disallowed" type="text" value="<?=ax_default_disallow;?>"> Register Player This is my textarea: <?=file_get_contents($open); ?> please help me I tried google it but found irrelevant results. you guys are my only hope now :(
has comment: http://stackoverflow.com/comment/42955318
has comment: http://stackoverflow.com/comment/42955272
has title: Text input from jquery not working
has comment: http://stackoverflow.com/comment/42955186
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27239417

http://stackoverflow.com/a/27246453
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27245152
has body: If you want to load a specific div element from the url then use it this way: j("ul.casesholder").load(j(this).attr("href") + " .holder"); What seems to me that you have a .holder div on the href page you are loading, so you can pass that div's class name which you want to load with a space for ex. page.html .holder.
accepted answer of: http://stackoverflow.com/q/27245152

http://stackoverflow.com/q/27274485
tagged with: single-page-application
downvote count: 0
has comment: http://stackoverflow.com/comment/80680612
favorite count: 0
type: UnansweredQuestion
tagged with: safari
has comment: http://stackoverflow.com/comment/135213516
has comment: http://stackoverflow.com/comment/126262679
answer count: 0
score: 7
has title: Single Page Apps: Visible Flicker When Using Swipe Navigation in Safari OS X
linked to: http://stackoverflow.com/q/68472768
upvote count: 7
type: Question
has body: We have an single page application (built using Backbone) that uses Backbone.Router to handle route/URL changes. When a route changes, we typically load some data asynchronously and then render the page. This works well in all browsers, including Safari on OS X, while using the back/forward buttons. In Safari, however, the swipe to navigate backwards or forwards (where the previous page is revealed as you swipe) flickers momentarily between the just navigated to page and the page that was just left. Given pages A and B, the example flow is: User loads page A User clicks a link to go to page B User swipes back Page A is revealed while swiping Page B flickers momentarily after page A has reloaded and rendered its content The following JS Bin demonstrates the issue: http://jsbin.com/tumeka/1 (edit here since the route handling messes with JS Bin's edit link). If there is no delay in the route handing, (uncheck the Delay box) then there is no visible issue. Is this a Safari bug? Are we doing something wrong? Is there a workaround? I've got Safari 6.2 but the issue was originally reported by someone with Safari 7.
tagged with: pushstate
has comment: http://stackoverflow.com/comment/113564865
tagged with: javascript

http://stackoverflow.com/comment/42858991
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27186027
has text: open developer console in your browser, and see if the hidden element's html is being rendered. if you want the elements not to be rendered, you need to create them in the code behind and add them to the page on `page_load`

http://stackoverflow.com/comment/42898527
type: AnswerComment
comment on: http://stackoverflow.com/a/27208258
type: Comment
has text: Wow, thank you so much for clearing that up for me. I was only trying to use one as practice so that I could wrap my head around how the functions were working. I appreciate the help!
score: 0

http://stackoverflow.com/q/27245179
has comment: http://stackoverflow.com/comment/42965606
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42967244
tagged with: javascript
has comment: http://stackoverflow.com/comment/42965630
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27247641
has comment: http://stackoverflow.com/comment/42966973
has comment: http://stackoverflow.com/comment/42968487
has title: Check on/off of checkbox doesn't work anymore
has body: Since many years I have a website running (direct link to the table-page). Now, suddenly, I realise that the checkbox doesn't work anymore as one would expect (same for the "Completeness" button below): once the checkbox for "per capita"-calculation has been checked, it doesn't go off anymore. No idea why that is; really frustrating. The page has two forms: &lt;form name="tableForm" action=""&gt; Per Capita: &lt;input type='checkbox' name='per_capita' onchange=' document.formGeneric.per_capita.value=document.tableForm.per_capita.value; document.formGeneric.action="table.php"; document.formGeneric.submit() '&gt; &lt;/form&gt; and &lt;form method="post" name="formGeneric" action=""&gt; &lt;input type='hidden' name='per_capita' value='on' /&gt; &lt;/form&gt; Looks alright (although perhaps old-style writing) to me. The "offing" off seems not to work at all. If I put a "alert(document.tableForm.per_capita.value)" in the onChange event, it still says "on". I would very much appreciate any tip on what I am doing wrong here.
accepted answer: http://stackoverflow.com/a/27247641
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox

http://stackoverflow.com/q/27285884
answer count: 1
tagged with: tomcat
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27286210
tagged with: javascript
has body: I would like a high level suggestion on how to get individuals loading my page to report back to the webserver (tomcat) that images have not been loaded. Note: the images would be from another server which I have no control over. The goal is to know when an image is no longer available. Javascript and XMLHttRequests seems to be what I will try to do, but I'd like to know if there is a simpler or better way.
type: Question
has title: Reporting images not found to my webserver
score: 0

http://stackoverflow.com/q/27292947
score: 0
has comment: http://stackoverflow.com/comment/43089139
answer count: 1
has body: I use Highsharts to render my image. Now I want to make two donut charts in same row just like this one. jsfiddle: http://jsfiddle.net/wergeld/e2qpa/47/ jsfiddle I have try to set container's width,but can't achieve that result. Below demo is the area where I stucked in now. So who can give me some advice? Thanks in advance ! jsfiddle: http://jsfiddle.net/lazybios/7nydybqa/ Demo-jsfiddle
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27293076
type: Question
accepted answer: http://stackoverflow.com/a/27293076
has title: highcharts.js how to make double donut charts in one raw?
tagged with: highcharts
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27262142
score: 0
answers question: http://stackoverflow.com/q/27261932
has body: activeSet is an object. activeSet.reps is an array. push is an array method. push the new object to the array activeUser.sets.push({reps:{laps: lapList}});
type: Answer

http://stackoverflow.com/comment/42829082
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27168678
has text: May be this will help you. [BootBox](http://bootboxjs.com/)
type: Comment

http://stackoverflow.com/a/29554778
has comment: http://stackoverflow.com/comment/47260732
score: 0
answers question: http://stackoverflow.com/q/27199872
has body: Please check the below links which has similar Q&amp;A. Only one concurrent login per user in Asp.net Only one concurrent login per UserID in Asp.net
type: Answer

passport.js
tags question: http://stackoverflow.com/q/27275458
tags question: http://stackoverflow.com/q/27216731
tags question: http://stackoverflow.com/q/27308279
tag name: passport.js
type: Tag

geojson
tags question: http://stackoverflow.com/q/27174806
tags question: http://stackoverflow.com/q/27274125
tag name: geojson
tags question: http://stackoverflow.com/q/27308762
type: Tag

http://stackoverflow.com/q/27299218
possible better answer: http://stackoverflow.com/a/27299327
has answer: http://stackoverflow.com/a/27299464
downvote count: 1
has body: I have some code for an audio recorder that uses input tags for the record and stop buttons: I'd like to change those input tags to < button > tags that execute the same functions, but I can't figure out how. The code uses jquery, and I think the actual functions in the code are written to work with jquery. Here's the part of the code that I think carries out the "start" and "stop" functions: $('.recorder .start').on('click', function() { $this = $(this); $recorder = $this.parent(); navigator.getUserMedia({audio: true}, function(stream) { var recorderObject = new MP3Recorder(audio_context, stream, { statusContainer: $recorder.find('.status'), statusMethod: 'replace' }); $recorder.data('recorderObject', recorderObject); recorderObject.start(); }, function(e) { }); }); $('.recorder .stop').on('click', function() { $this = $(this); $recorder = $this.parent(); recorderObject = $recorder.data('recorderObject'); recorderObject.stop(); The program has other .js files it uses, so perhaps more info about them is needed to answer this question. I tried the following, but they didn't work: Record Record
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27299464
score: -1
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: html change input tag to a button tag
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27299327
has comment: http://stackoverflow.com/comment/43062756

http://stackoverflow.com/comment/43028983
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27280169
type: QuestionComment
has text: Try sharing a jsfiddle.

http://stackoverflow.com/comment/42962679
comment on: http://stackoverflow.com/a/27243430
type: AnswerComment
has text: @nileshsurve...now you are asking a whole new question in comment **what should be the code in refresh.php**...this is not the way of asking question just show us what you have tried and then we will try to help you out...
type: Comment
score: 0

http://stackoverflow.com/q/27171562
downvote count: 1
has comment: http://stackoverflow.com/comment/42834049
has comment: http://stackoverflow.com/comment/42833966
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/42834061
answer count: 1
has body: I have a DIV on my page with position absolute and ID magnify and under this DIV there is another DIV with some auto moving/scrolling small images... what i'm trying to do is to make the DIV magnify to act like a magnifying glass.. so as each small image goes under that DIV, it shows the image a bit bigger like a magnifying glass. here is what I have so far but this code doesn't make the magnify div like a magnifying glass and I don't understand why! &lt;script&gt; $(document).ready(function () { function () { $('#magnify').animate({ 'zoom': 1}); } }); &lt;/script&gt; could someone please advise on this? EDIT: This is an example of what I am referring to: so the icons moving/scrolling under the magnifying glass/DIV... Also the Magnifying Div doesn't move. the only thing that moves is the images/icons under the magnifying glass.
tagged with: javascript
tagged with: jquery
has title: magnifying DIV using jquery?
favorite count: 0
has comment: http://stackoverflow.com/comment/42834166
has answer: http://stackoverflow.com/a/27171929
score: -1
has comment: http://stackoverflow.com/comment/42834528
has comment: http://stackoverflow.com/comment/42833971
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42834207

http://stackoverflow.com/q/27302919
tagged with: javascript
has comment: http://stackoverflow.com/comment/43069942
upvote count: 4
answer count: 1
accepted answer: http://stackoverflow.com/a/27303212
favorite count: 0
has comment: http://stackoverflow.com/comment/43069218
type: AnsweredQuestion
has body: I am trying to use a function from the google maps api from the server side (using node.js) https://developers.google.com/maps/documentation/javascript/geometry#poly I want to see if a point is in the google maps directions for going between point A to point B. isLocationOnEdge(point:LatLng, poly:Polygon|Polyline, tolerance?:number) I used the example code on the google maps documentation, and added a console.log statement. however, it isn't outputting anything to the console. function initialize() { var mapOptions = { zoom: 5, center: new google.maps.LatLng(24.886, -70.269), mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var cascadiaFault = new google.maps.Polyline({ paths: [ new google.maps.LatLng(49.95, -128.1), new google.maps.LatLng(46.26, -126.3), new google.maps.LatLng(40.3, -125.4) ] }); var myPosition = new google.maps.LatLng(43.0, -125.9, 10e-7); console.log('google.maps.geometry.poly.isLocationOnEdge(myPosition, cascadiaFault))'); } another stack overflow question said to use include this url in the http request http://maps.googleapis.com/maps/api/js?v=3.exp&amp;libraries=geometry&amp;sensor=TRUE_OR_FALSE but i know i need to actually include the islocationonedge parameters somehow. should i be requesting http://maps.googleapis.com/maps/api/js?v=3.exp&amp;libraries=geometry&amp;sensor=TRUE_OR_FALSE&amp;islocationonedge(point:latlong, polyline: [adfasd,sdfs,adfasdf,adfasd], 0.0001) ? thank you very much for your help
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27303212
score: 3
has comment: http://stackoverflow.com/comment/43069422
tagged with: google-maps
has title: how to use google maps islocationonedge for servers?

http://stackoverflow.com/a/37319395
has body: I know the question is a bit old but I think this is a good solution to manage nested-list and in my opinion it's more 'clean' way. Here the link of a blogger who posted about recursive templates in angular. This method is very useful when you don't know the depth of your hierarchical list: angularjs-recursive-templates the hierarchical list: [ { title: 'Computers', categories: [ { title: 'Laptops', categories: [ { title: 'Ultrabooks' }, { title: 'Macbooks' } ] }, { title: 'Desktops' }, { title: 'Tablets', categories: [ { title: 'Apple' }, { title: 'Android' } ] } ] }, { title: 'Printers' } ] His angular sample: And you can see the final in this JSFiddle I hope this might help some people. Tchuss!
upvote count: 11
type: Answer
downvote count: 0
score: 11
answers question: http://stackoverflow.com/q/27252097

http://stackoverflow.com/q/27254681
score: 0
has body: Hi i have an array of objects cards = [ { Asset: "2C.jpg", CardName: "2C", CardPlayed: 0, Playbell: 0, PlayerName: "player1", Rank: 2, Suit: "C" }, { Asset: "9S.jpg", CardName: "9S", CardPlayed: 0, Playbell: 0, PlayerName: "player2", Rank: 9, Suit: "S" }, { Asset: "6D.jpg", CardName: "6D", CardPlayed: 0, Playbell: 0, PlayerName: "player1", Rank: 6, Suit: "D" }]; and i need to sort those objects base on Suit property but only for the object that have the PlayerName property value equal to "player1" and many thanks in advance for any help.
has title: How to sort array objects base on two properties
possible better answer: http://stackoverflow.com/a/27254770
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27254930
accepted answer: http://stackoverflow.com/a/27254930
has answer: http://stackoverflow.com/a/27254770
tagged with: javascript

http://stackoverflow.com/comment/42900344
type: QuestionComment
has text: I'm not sure what you mean by console. When I right-click on the page in the browser preview in firefox and select "Inspect Element", it does tell me "style sheet could not be loaded. file:///Users/MyName/Downloads/Vitae-pack/web/web/css/bootstrap.css"
score: 0
comment on: http://stackoverflow.com/q/27209211
type: Comment

http://stackoverflow.com/comment/42920211
comment on: http://stackoverflow.com/q/27220348
score: 0
has text: @CaseyRule It is the **tries** variable.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/31783517
downvote count: 0
answers question: http://stackoverflow.com/q/27174083
accepted answer of: http://stackoverflow.com/q/27174083
score: 42
type: AcceptedAnswer
has body: "WebdriverJS" is another name for selenium-webdriver, the official Node.JS implementation of the JSONWire (WebDriver Wire) Protocol by the Selenium team. "WebdriverIO" is an independent implementation of the JSON Wire Protocol by Christian Bromann (SO profile), who works at Sauce Labs, a provider of cloud-base cross-browser testing. WebdriverIO wraps its lower level requests into useful commands, with a concise syntax: client .url('http://google.com') .setValue('#q','webdriver') .click('#btnG') The same test with selenium-webdriver is more complicated: driver.get('http://www.google.com'); driver.findElement(webdriver.By.id('q')).sendKeys('webdriver'); driver.findElement(webdriver.By.id('btnG')).click(); There are at least seven Webdriver clients written in Node.JS.
type: Answer
upvote count: 42

http://stackoverflow.com/comment/43072051
score: 0
type: QuestionComment
type: Comment
has text: The first nor the second question on the duplicate answer referenced an array of objects?...
comment on: http://stackoverflow.com/q/27304341

http://stackoverflow.com/comment/42928599
score: 1
comment on: http://stackoverflow.com/q/27224715
type: QuestionComment
type: Comment
has text: Thanks! Also I'm trying MutationEvents (and reading that there are some pref issues): http://updates.html5rocks.com/2012/02/Detect-DOM-changes-with-Mutation-Observers

http://stackoverflow.com/a/27235306
type: Answer
answers question: http://stackoverflow.com/q/27231563
has body: After more fiddling, I was able to get it to work with minification, although I still wasn't able to save the minified and non-minified versions in a single task. The use of a function for the rename was required because just adding a suffix ends up with the map being named 'file.css.min.map' instead of 'file.min.css.map' which is what's required to get them to match up. I added the gulpif to save time running the .less files through the csswring command. gulp.task('less-css-and-minify', function () { return gulp.src(lessFiles) .pipe(sourcemaps.init()) .pipe(less()) .pipe(gulpif('**/*.css', postcss([csswring]))) .pipe(rename(function (path) { if (path.extname === '.map') { path.basename = path.basename.replace('.css', '.min.css'); } if (path.extname === '.css') { path.basename += '.min'; } })) .pipe(sourcemaps.write('.')) .pipe(gulp.dest(targetCss)); });
score: 0

http://stackoverflow.com/q/27282044
type: Question
has body: So I'm making this site to display bike trips. Users can search for trips by entering their ID. When they push the search button, the trips will appear in the browser. The problem I have is that I want them centered and not floating to the left. This may seem like a simple problem but I tried several things and I ran out of options. Problem is in fact that the width of my div, containing all trips, is the same as the width of my page. This disables me to use automargins left and right. I want to display as many images possible in the width of my screen but when I leave out float:left, they only appear one above the other. Link of website: Just type CW1A1 as GroupID and click search to see the trips #tripimages p { cursor:pointer; float:left; position: relative; text-align:center; color:black; margin:10px; padding:0; border:0; width:250px; height:50px; padding-top:250px; } #tripimages { text-align:center; padding-bottom:50px; min-height: 100%; overflow-y: hidden; position: relative; }
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43032912
score: 0
possible better answer: http://stackoverflow.com/a/27282082
accepted answer: http://stackoverflow.com/a/27282136
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27282082
has title: center images in div with max width
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27282136

http://stackoverflow.com/a/27310042
answers question: http://stackoverflow.com/q/27309921
score: 8
has body: You can use this code with HTML 5 its tested Demo : Demo for this &lt;input type="file" id="file" /&gt; var _URL = window.URL || window.webkitURL; $("#file").change(function(e) { var image, file; if ((file = this.files[0])) { image = new Image(); image.onload = function() { alert("The image width is " +this.width + " and image height is " + this.height); }; image.src = _URL.createObjectURL(file); } });
has comment: http://stackoverflow.com/comment/43081461
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/100804772
upvote count: 8

http://stackoverflow.com/q/27219508
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/54955791
type: Question
linked to: http://stackoverflow.com/q/24651944
tagged with: wow.js
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: I am using the wow.js plugin &amp; a jquery preload tutorial. The preloader works fine but when it has preloaded the elements on the page, the wow.js animation is already over. I want to edit my code so after that everything is preloaded the animations will start. I have read this question &amp; answer but it didn't work for my code. My code: // makes sure the whole site is loaded jQuery(window).load(function() { // will first fade out the loading animation jQuery("#status").fadeOut(); // will fade out the whole DIV that covers the website. jQuery("#preloader").delay(500).fadeOut("slow"); }) It would be great if anyone would help me, Thank you!
favorite count: 0
has answer: http://stackoverflow.com/a/30617891
has title: Jquery preloader & wow.js

http://stackoverflow.com/comment/86192492
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27282907
has text: If it avoids Stack Overflow, why is it here?

http://stackoverflow.com/q/27202701
has comment: http://stackoverflow.com/comment/42888931
has answer: http://stackoverflow.com/a/27202920
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27202848
possible better answer: http://stackoverflow.com/a/27202781
accepted answer: http://stackoverflow.com/a/27202848
downvote count: 1
type: Question
has title: How do I loop through json and generate table rows? jsbin attached
has comment: http://stackoverflow.com/comment/42888327
tagged with: javascript
score: 0
upvote count: 1
has answer: http://stackoverflow.com/a/27202781
favorite count: 0
has body: I have worked on looping through json and creating a tr, td, and content then appended them together. I tried using the same technique for looping through each property inside of each object however It's not working the same way. How do I create json and loop through it to individual table rows that include each json property? For example I want to loop through food[0] and post food[0].serving, etc http://jsbin.com/mohamavemo/3/edit?html,js,console,output Thank you for your time --Brian Story
has answer: http://stackoverflow.com/a/27202887
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/a/27231035
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42938980
answers question: http://stackoverflow.com/q/27230893
downvote count: 0
has body: You cannot do this. Websites have no permission to access Your computer local system. With HTML &lt;input type="file"&gt; You can only send files to the chosen website directory. Eventually, You can download those files later and put them on the other place in Your system.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27230893
has comment: http://stackoverflow.com/comment/42946687
type: Answer

http://stackoverflow.com/comment/42904332
comment on: http://stackoverflow.com/a/27211687
type: AnswerComment
type: Comment
score: 1
has text: what he said. beat me by a minute

http://stackoverflow.com/q/27256136
type: AnsweredQuestion
has body: I'm developing a dashboard with sortable, dockable, floatable widgets. One of the controls I'm using generates the floating widgets as HTML at the bottom of the DOM, before the closing body tag. This effectively removes actions done in the window controls from the controller scope they are generated in. I'm developing this dashboard controller using controllerAs syntax available, but I can't figure out how to effectively update the view with this syntax when an external component does an action that affects the data for the view? Note: This is not the only I'm facing that forces me to manually update the main view. There are also directives elsewhere on the page that perform actions that impact the view. Ideally, I would never have to update the view manually, because I would be using all commands that happen within the built in Angular commands affecting digest loop - but this was not an option for me. So... if I was using $scope I would be able to simply do: $scope.$digest Or $scope.$apply But how do I achieve the same affect using controller as? var vm = this; vm.array = [item, item]; vm.something = something; //External something changes something on a vm.variable vm.update! //How??
possible better answer: http://stackoverflow.com/a/37147808
has answer: http://stackoverflow.com/a/37147808
has title: How to manually update AngularJS view using ControllerAs syntax?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27256680
downvote count: 0
tagged with: javascript
favorite count: 0
upvote count: 8
score: 8
accepted answer: http://stackoverflow.com/a/27256680
tagged with: angularjs

http://stackoverflow.com/q/27249419
has title: Problems positioning text in tabs
tagged with: javascript
score: 0
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has body: I'm currently building a practice website and need some help with positioning text. The website has a system of events that creates tabs as shown in the image.There are 2 sections, highlights and events; events tabs are one smaller size and gives the error that shows the image.I am choosing tabs one by one as shown in the image to get to the tab that interests me marked with the arrow.When I put the text css style in correct position, the other styles of other tabs get all messed up. How it could not affect other tabs and simply change the position of the text in that tab? My website is plan10.es if you want to see the error and I have not been clear enough. Thanks a lot http://subefotos.com/ver/?2dd8df8c55583522e391a5da7572ef1ao.jpg#codigos The css class is as follows input.paypalBuyBig { background: none repeat scroll 0 0 transparent; border: none; color: ".$textoYovipAmarillo."; cursor: pointer; font-size: 20px; font-weight: bold; margin-left: -217px; margin-top: 49px; position: absolute; }
has comment: http://stackoverflow.com/comment/42973786
answer count: 0
has comment: http://stackoverflow.com/comment/42973931
type: Question

currency
tag name: currency
tags question: http://stackoverflow.com/q/27161181
type: Tag
tags question: http://stackoverflow.com/q/27177155

http://stackoverflow.com/comment/42851651
has text: @Huangism Not quite. The `number` field should only be visible when focus is on that particular `text`/`number` pair. Otherwise, the `text` field is visible. Based on the other input here, this is now working in Chrome but not yet in Firefox.
comment on: http://stackoverflow.com/q/27178451
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27301932
has body: .controller('Ctrlajax', ['$scope', 'version','$sce', '$resource', '$http', function ($scope, version,$sce,$resource,$http) { $scope.answer = 'Ожидание ответа от сервера.....'; require('ajax_module'); }]) ajax_module.js define('ajax_module',['angular'],function($http){ var path = './././data/' $http.get(path+'res.php').success(function(data){ debugger $scope.answer = data; }); }) Error:Uncaught TypeError: undefined is not a function How to pass $scope,$http?
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
has title: How pass $http,$scope by require?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27302184
type: Question

http://stackoverflow.com/a/27268332
has comment: http://stackoverflow.com/comment/43008035
upvote count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/43008088
has body: You could use the following code : var form = document.getElementById("myForm"); var inputs = form.getElementsByTagName("input") for (i = 0; i &lt; inputs.length; i++) { if(i != 0) { inputs[i].value = ""; } }
score: 1
answers question: http://stackoverflow.com/q/27268174
has comment: http://stackoverflow.com/comment/43007885
type: Answer

http://stackoverflow.com/q/27228275
type: Question
tagged with: c#
linked to: http://stackoverflow.com/q/610995
tagged with: javascript
tagged with: jquery
duplicate of: http://stackoverflow.com/q/610995
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42935036
answer count: 0
type: UnansweredQuestion
has title: Injecting HTML and Scripts into a element via jquery
has body: I need to inject some HTML, an and some script content including tag is not being rendered as a string literal and is being parsed by the page, this means that the Which gets rendered as: ';;$('#booking-form').text(str).html();} As you can see, the closing script tag from the IframeHtml is closing the parent script block which causes the call to set the #booking-form html to fail. I'm escaping newlines/carriage returns and HtmlDecoding the string in the code behind: public string IframeHtml { get { return HttpUtility.HtmlDecode(this.CurrentBookingForm.IframeHtml) .Replace("\n", string.Empty) .Replace("\r", string.Empty) .Replace("'", "\""); } } How can I inject both markup and script content into the targeted element?
tagged with: escaping
has comment: http://stackoverflow.com/comment/42933926
has comment: http://stackoverflow.com/comment/42933862

http://stackoverflow.com/q/27268396
has answer: http://stackoverflow.com/a/27268660
score: -1
favorite count: 0
has answer: http://stackoverflow.com/a/27268688
type: UnansweredQuestion
has body: I have some html, that had a bunch of JS code inside a script tag. So I moved it to a separate .js file. JS code also loaded some variables from CGI, using strings in a form of &lt;%ejGet(var)%&gt;. But after separating the code from HTML file, the strings don't get replaced with data from the server. Is there a way to include a JS file as if it was written inside a script tag or is there another way to do this? &lt;script language="javascript"&gt; &lt;!-- hide var syncNvram = '&lt;%ejGetWl(wlSyncNvram)%&gt;'; ...about 1000 lines more... &lt;/script&gt; So after moving this code to a separate file, the variables don't load.
has comment: http://stackoverflow.com/comment/43008826
downvote count: 1
has comment: http://stackoverflow.com/comment/43008692
has comment: http://stackoverflow.com/comment/43007961
has comment: http://stackoverflow.com/comment/43008119
has title: Include a JavaScript file as it was written in a script tag
has comment: http://stackoverflow.com/comment/43007949
type: Question
has comment: http://stackoverflow.com/comment/43007866
answer count: 2
has comment: http://stackoverflow.com/comment/43007988
has comment: http://stackoverflow.com/comment/43007696
has comment: http://stackoverflow.com/comment/43008228
upvote count: 0
has comment: http://stackoverflow.com/comment/43008014
tagged with: javascript
linked to: http://stackoverflow.com/q/9653331
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/45044885
has text: I'm getting the same thing, still.
comment on: http://stackoverflow.com/q/27201193
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27209943
has answer: http://stackoverflow.com/a/27209987
tagged with: css
has body: I know this has been asked many times here, actually I found plenty of questions, each of them with a very good answer, I also followed those answers, used the different ways I found but I still don't get it to work. What I'm trying to do is to load an image into a div, after clicking a link, instead of redirecting to a new page. I'm using Pure Css (http://purecss.io/) to create a menu, the menu is made of a list, and each list item has a link inside it, like so: Models Menu heading Model 1 In that same html file, I have another div where I want to load the image: I've tried the following ways, using jquery, in a separate js file: I followed the selected answer for this question, which seemed to have the best approach (Can I get the image and load via ajax into div) $(document).ready(function(){ console.log("ready"); //this shows on console $('.model-selection').click(function () { console.log("clicked"); //this doesn't show after clicking var url = $(this).attr('href'), image = new Image(); image.src = url; image.onload = function () { $('#model-map').empty().append(image); }; image.onerror = function () { $('#model-map').empty().html('That image is not available.'); } $('#model-map').empty().html('Loading...'); return false; }); }); As you see, the console.log("clicked") never executes, I'll be ashamed if it's something stupid, cause it seems that the function is not handling the click event properly. I get the image of course, but in a new page (default behavior of clicking the href) and I want it to load on the div without being redirected. I hope you can help me. Thanks in advance! Edit The code above is working, and both answers are correct, the issue was due to some code inside tags in my html ( YUI code to create the dropdowns for the menu) and it was conflicting with my js file. I moved it to the actual js file and now it works as expected. Thanks!
has title: jquery load image to div after clicking href
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/4337917
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/27210004
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42919048

http://stackoverflow.com/comment/42911971
has text: Thanks a lot of the answer. However, because the 'search-result-container' contains a lot of information (text and image), the aim is to actually create a new div on mousedown with just a snippet of this information (the text) that can then be dropped into the queue area, rather than a clone of the whole 'search-result-container'. Could you please amend your answer to help me achieve this? Many thanks
comment on: http://stackoverflow.com/a/27215315
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/32848333
type: Answer
answers question: http://stackoverflow.com/q/27196873
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/53531329
upvote count: 0
has body: try to use following instead: $window.location.href = '/users'

http://stackoverflow.com/comment/51802794
has text: I like this answer a lot! I think injecting the state model into the view instead of instantiating it inside of the initialize function is more appropriate though. This way, you can share the same state model across several different views and avoid coupling. Also, depending on the application, utilizing a pub/sub system can take the place of an application state model as well.
comment on: http://stackoverflow.com/a/27236255
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42954003
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [How to serve a file using iron router or meteor itself?](http://stackoverflow.com/questions/21565991/how-to-serve-a-file-using-iron-router-or-meteor-itself)
comment on: http://stackoverflow.com/q/27238457

http://stackoverflow.com/q/27245445
type: Question
has body: I would like to know how to receive RowId from popupmenu and name from menuitem on which i clicked. This is my code: &lt;script&gt; function OnWorkflowChanged(popup) { alert(menuitem.name + popup.RowId);} &lt;/script&gt; &lt;def:PopupMenu ID="popup" ClientInstanceName="popup" runat="server" AutoPostBack="false" PopupElementID="imgState" RowId='&lt;%# Eval("ItemNodeId") %&gt;' PopupAction="RightMouseClick"&gt; &lt;ClientSideEvents ItemClick='function(s, e) { OnWorkflowChanged(s) }' /&gt; &lt;Items&gt; &lt;def:menuitem name="type1" text="&lt;%$ Resources: type1%&gt;" Image-Url="~/images/checkbox0.png" /&gt; &lt;def:menuitem name="type2" text="&lt;%$ Resources: type2%&gt;" Image-Url="~/images/checkbox1.png" /&gt; &lt;def:menuitem name="type3" text="&lt;%$ Resources: type3%&gt;" Image-Url="~/images/checkbox2.png"/&gt; &lt;def:menuitem name="type4" text="&lt;%$ Resources: type4%&gt;" Image-Url="~/images/s_all.png" ItemStyle-BorderTop-BorderStyle="Solid" ItemStyle-BorderTop-BorderWidth="1px" ItemStyle-BorderTop-BorderColor="LightGray" /&gt; &lt;def:menuitem name="type5" text="&lt;%$ Resources: type5%&gt;" Image-Url="~/images/z_all.png" /&gt; Thank you. Edit: So I figured out how to pass menuitem. It's really easy - e.item.name. But I still have no idea how to pass RowId.
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27249903
tagged with: devexpress
type: UnansweredQuestion
has title: Accessing attribute from devexpress PopUpMenu

http://stackoverflow.com/comment/43071772
comment on: http://stackoverflow.com/q/27304129
type: Comment
has text: You haven't explained what you mean by minimized. Several of us asked you.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42874515
comment on: http://stackoverflow.com/a/27194355
has text: if i save the page by selecting the MD and come again back to the same page, I see that MD item selected but in that case, the div does not display, basically it should show, all good, i think this is causing one last issue we are having, else we are all good...
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42860374
has text: Don't use the same ID for each add button. See updated answer.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27186253

http://stackoverflow.com/a/27204416
type: Answer
has body: you can use videojs for custom html5 video player. Video.js is pretty easy to set up. It can take a matter of seconds to get the player up and working on your web page.
downvote count: 0
answers question: http://stackoverflow.com/q/27203863
accepted answer of: http://stackoverflow.com/q/27203863
score: 5
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/comment/42981977
type: Comment
type: AnswerComment
score: 0
has text: Do I have to add the correct positions to the circle in the `cx` and `cy` attribute?
comment on: http://stackoverflow.com/a/27248859

http://stackoverflow.com/comment/43070777
score: 0
comment on: http://stackoverflow.com/q/27303369
type: Comment
type: QuestionComment
has text: @juvian how easy it is? using ``[].concat.apply([], arr);`` won't do the trick for multiple nestings :/

createjs
tags question: http://stackoverflow.com/q/27170490
tags question: http://stackoverflow.com/q/27311386
type: Tag
tag name: createjs

http://stackoverflow.com/a/27241162
type: Answer
downvote count: 0
upvote count: 4
answers question: http://stackoverflow.com/q/27240776
has body: The template gets inserted into your custom tag, so your becomes a child of the tag. In the link() function, the element argument is the tag--not the --therefore unhiding the tag does not unhide a child which has been styled with display: none. In other words, if you have this: Show this in three seconds. that won't display the . If you don't load jQuery before loading angularjs, then angularjs uses something it calls jqLite to wrap elements. The wrapped elements act like jQuery wrapped sets, but they have reduced functionality, e.g. show() and hide() are not provided. So if you load jQuery and then load angularjs, you can do this: app.js: var app = angular.module('myApp', []); app.directive('hideMe', ['$timeout', function($timeout) { var directive = {}; directive.restrict = 'E'; directive.link = function(scope, element, attrs) { element.html( ' ' + element.text() + ' ' ); $timeout(function() { element.children().show(); }, 3000); }; return directive; }]); index.html: AngularJS Examples Show this after three seconds. However, I notice that the text flashes briefly on the page before being hidden. Edit: If I replace element.text() with element.html(), then there's no flash. On the other hand, if you don't load jQuery you can do this: var app = angular.module('myApp', []); app.directive('hideMe', ['$timeout', function($timeout) { var directive = {}; directive.restrict = 'E'; directive.link = function(scope, element, attrs) { var hideme = element[0]; hideme.innerHTML = ' ' + hideme.innerHTML + ' '; $timeout(function() { var div = hideme.childNodes[0]; div.style.display = "block"; }, 3000); }; return directive; }]); Then the text doesn't flash on the screen before being hidden.
score: 4

http://stackoverflow.com/q/27192164
type: UnansweredQuestion
upvote count: 1
tagged with: css
score: 1
has title: Spinner icon doesnt seem to work in tags
has comment: http://stackoverflow.com/comment/42870359
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: flask
favorite count: 0
has comment: http://stackoverflow.com/comment/43229862
has comment: http://stackoverflow.com/comment/42870151
has comment: http://stackoverflow.com/comment/42870410
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has body: I am trying to recreate the buttons with spinners when clicked from this example: http://jsfiddle.net/AndrewDryga/GY6LC/ HTML A and Button tags: Foo Foo CSS .spinner { display: inline-block; opacity: 0; max-width: 0; -webkit-transition: opacity 0.25s, max-width 0.45s; -moz-transition: opacity 0.25s, max-width 0.45s; -o-transition: opacity 0.25s, max-width 0.45s; transition: opacity 0.25s, max-width 0.45s; /* Duration fixed since we animate additional hidden width */ } .has-spinner.active { cursor:progress; } .has-spinner.active .spinner { opacity: 1; max-width: 50px; /* More than it will ever come, notice that this affects on animation duration */ } JS $(function(){ $('a, button').click(function() { $(this).toggleClass('active'); }); }); I am able to recreate the tag button to work but not the tag. In his site (linked at top) they both work the same. Is there anything Im missing? I am impletementing this in flask and using WTFforms, so i am getting the events through request.form.get['btn'], it appears that having the html inside the flask tags is whats causing the issue Any help would be greatly appreciated. EDIT: Sorry, i've narrowed down the issue to appear when i include the name for the button
has comment: http://stackoverflow.com/comment/42870251

http://stackoverflow.com/comment/42863144
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27188382
has text: @TrueBlueAussie Thanks for the catch. However, my solution still fixes his original bug (`click` not being called at all). So technically, it still answers the question. You are a quick down-voter :p
type: Comment

http://stackoverflow.com/a/27181721
has comment: http://stackoverflow.com/comment/42851925
answers question: http://stackoverflow.com/q/27181682
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: Solution 1: Do it using .css() in jQuery: $('#box').click(function(event) { $(this).css('background-color', 'yellow'); $('nav').animate({height:'toggle'},200); } Learn about .css() in jQuery Solution 2: You can also do it using .addClass() in jQuery and some CSS: $('#box').click(function(event) { $(this).addClass('yellowify'); $('nav').animate({height:'toggle'},200); } CSS: .yellowify{ background-color: yellow; } Learn about .addClass() in jQuery
accepted answer of: http://stackoverflow.com/q/27181682

http://stackoverflow.com/q/27184909
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42866375
score: 0
has title: Indesign get Colors from selected object?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27197615
has body: I searched through stackoverflow and the adobe community to find an answer for this. I can't figure out, how to get the color of the selected Object in Indesign. I know now that I need to check for it to be a swatch or a normal color added. But I just don't know how to then get the color seperated in CMYK out of it for each case. Any help is greatly appreciated!
answer count: 1
tagged with: scripting
accepted answer: http://stackoverflow.com/a/27197615
tagged with: adobe-indesign
has comment: http://stackoverflow.com/comment/42860860

http://stackoverflow.com/q/27286463
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/27286591
score: 0
has title: how to write to div the value of a .net drop down
has body: I am trying to write to a div the dynamic value of a drop down list, like this: JQuery looks like this $.each($('.shoppingCart_qty-select'), function () { var br = document.createElement('br'); $("#qtyOrderPreview").append($(this).html()).append(br); }); Markup looks like this QTY @group.First().Count But, I cannot see any value being put on the page, although @group.First().Count has a value. What do I have to do different to be able to get the value from the drop down list and place it on the div, using jquery? Many thanks.
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27286591
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27230567
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Cannot get backbone view to render
tagged with: backbone.js
type: UnansweredQuestion
tagged with: backbone.js-collections
tagged with: backbone-views
type: Question
has answer: http://stackoverflow.com/a/27230971
has body: I looping through a collection in an attempt to add a row to a table on every loop. Here is the code that loops the collection, and build the single view, App.Views.OrganisationMembersTab = Backbone.View.extend({ el: '#members', template: _.template( $('#tpl-members-tab-panel').html() ), events: { }, initialize: function() { this.$el.html( this.template() ); this.render(); }, render: function() { this.addAll(); }, addAll: function() { this.collection.each( this.addOne, this); }, addOne: function(model) { console.log(model); var tableRow = new App.Views.OrganisationsMemberRow({ model: model }); tableRow.render(); } }); The single view that gets called to build the row looks like this, App.Views.OrganisationsMemberRow = Backbone.View.extend({ el: '.members-list tbody', template: _.template($('#tpl-organisation-member-row').html() ), events: { }, initialize: function() { }, render: function() { this.$el.prepend( this.template({ member: this.model.toJSON() })); return this; } }); The model that is being used once it has been parsed to JSON using toJSON() looks like this, email: "john.doe@email.com" first_name: "John" last_name: "Doe" The template for the row looks like this, The above builds the main table components, and the next template is actually for a data row. All I get output the the main table and then in the main tbody I get either nothing prepended or an empty why is this?
tagged with: javascript
has answer: http://stackoverflow.com/a/27231126

http://stackoverflow.com/q/27309802
upvote count: 1
has comment: http://stackoverflow.com/comment/43080998
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: change a value depending on javascript's value
has comment: http://stackoverflow.com/comment/43080991
favorite count: 0
has comment: http://stackoverflow.com/comment/43081115
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43080968
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43080949
has comment: http://stackoverflow.com/comment/43081098
type: Question
has body: I need to change the label depending on the value of the textbox. I tried the code below, but it doesn't change. I think its because that i didn't put any value on my textbox, so if anyone know the best way to achieve this, tell me. =) function changeval(){ var x = document.getElementById("sff").value; document.getElementById("jffx").innerHTML = x; } $(document).ready(function(){ $("#state").change(function(){ if($(this).val() == 'AL'){ $("#entity").change(function(){ if($(this).val() == 'LP'){ $('#sff').val('$186.00'); $('#osf').val('$119.00'); $("#desc").hide(); }else ($(this).val() == 'LLC'){ $('#sff').val('$186.00'); $('#osf').val('$99.00'); $("#desc").show(); $("#alLLC").show(); } &lt;input type="text" id="sff" placeholder="$0.00" value="" onchange="changeval()"/&gt; &lt;label id="jffx"&gt;&lt;/label&gt;
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27309859
accepted answer: http://stackoverflow.com/a/27309859

http://stackoverflow.com/q/27252989
has answer: http://stackoverflow.com/a/27256178
has answer: http://stackoverflow.com/a/27255087
has comment: http://stackoverflow.com/comment/42980251
has comment: http://stackoverflow.com/comment/42980066
answer count: 3
has comment: http://stackoverflow.com/comment/42980078
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42980216
has comment: http://stackoverflow.com/comment/42980012
has comment: http://stackoverflow.com/comment/42980046
has title: Call Click Event Once After Element Appears?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42980516
has comment: http://stackoverflow.com/comment/42980402
has comment: http://stackoverflow.com/comment/42980370
has body: I use jQuery 1.6.2. I want to call a click event just for once when that element appears at page. This is my selector: span[resizer='north'][title=''] :first-child" This can work for triggering click event: $("span[resizer='north'][title=''] :first-child").click(); How can I make it work only once or after that element appears on the page?
has answer: http://stackoverflow.com/a/27254493
type: Question
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42980003
has comment: http://stackoverflow.com/comment/42980110
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/27171652
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27171572
answers question: http://stackoverflow.com/q/27171572
type: Answer
has comment: http://stackoverflow.com/comment/42834508
has body: As the event is being raised on the element which has the value you're trying to retrieve you can use the this reference to get at it: $("#firstName").on("blur keyup paste", function(){ var firstname = this.value; // or $(this).val(); }); With regard to the usage of on, your first example is to be used when the element you're attaching the event to exists in the DOM. The second method is for when the element does not yet exist, but may do in the future. You should use the nearest static parent element for the primary selector though, not document.
has comment: http://stackoverflow.com/comment/42834576

http://stackoverflow.com/comment/42854375
comment on: http://stackoverflow.com/q/27183448
score: 0
type: Comment
type: QuestionComment
has text: $('#tableTickets').find('select') would select all select boxes

http://stackoverflow.com/q/27186113
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42859176
tagged with: jquery
has comment: http://stackoverflow.com/comment/42859097
tagged with: ajax
has comment: http://stackoverflow.com/comment/42859188
has answer: http://stackoverflow.com/a/27186253
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42859422
has comment: http://stackoverflow.com/comment/42859336
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27186641
has answer: http://stackoverflow.com/a/27186641
type: Question
accepted answer: http://stackoverflow.com/a/27186253
has body: I have a search input #submit, once an ISBN is submitted a div fades in below showing the results (from Google Books Api). I then have a button 'Add to Library' #add - this successfully adds the info into my db via Ajax and fades out the div, all good so far. However when I input another ISBN and click #submit - nothing appears. The div is still hidden (or faded out). How can I make the div 'reset' to it's default setting after it has faded-out? I have to manually refresh the page each time I want to search. I am most likely doing something very silly as I am new to JS, however any help/direction is much appreciated. I have been looking at the jQuery fadeToggle() Method - is this correct? My Code $(document).ready(function() { $('#submit').click(function(ev) { ev.preventDefault(); $.getJSON(url,function(data){ $("#add").prop('disabled', false); $.each(data.items, function(entryIndex, entry){ var html = ' '; html += ' ' + ( entry.volumeInfo.title || '' )+ ' '; html += ' add to library '; $(html).hide().appendTo(".result").fadeIn(1000); $('#add').click(function(ev) { ev.preventDefault(); $.ajax({ type: 'POST', url: 'addIsbnScript.php', data: { 'isbn' : isbn, 'title' : entry.volumeInfo.title }, success: function () { //when form has been submitted successfully do below $('.result').fadeOut(1000); //fade out the results div }//end success function });//end ajax });//end add button funct });//end of each function });//end getJSON });// end submit.click });//end
has title: JavaScript Fade In/Out Div

http://stackoverflow.com/q/27171067
answer count: 1
downvote count: 0
has body: I have been working on a lib for Angular, using 1.2.27, and to my surprise I am looking at this result: $scope.myClickMethod = function () { $scope.$$phase; // $apply $scope.$apply(); // Gives digest error, of course }; $timeout(function () { $scope.$$phase; // null $scope.$apply(); // Does not give a digest error }); $http.get('/').then(function () { $scope.$$phase; // $digest $scope.$apply(); // Gives digest error }); The problem is that you can not identify that a digest loop is ready to run when using $timeout, $http etc. only ng-clicks etc. My questions is... why are they different? I thought Angular did something like this in both cases: $scope.myClickMethod = function AngularWrapper () { $rootScope.$apply(function myOriginalMethod () { // My code }); }; $timeout(function AngularWrapper () { $rootScope.$apply(function myOriginalTimoutFunction () { // My code }); }); Why is $$phase = $apply on UI-events, $$phase = $digest on $http and $$phase = null on $timeout? They are all async in nature, it does not make sense that they behave so differently. I am sure there is a perfectly good reason though. Anyone know? I see that 1.3 has some changes to $http with a new $applyAsync method. Not tested that though.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27171163
type: UnansweredQuestion
has title: Why is the Angular digest loop different on UI events, $timeout and $http?
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/27288606
accepted answer of: http://stackoverflow.com/q/27288468
has comment: http://stackoverflow.com/comment/43043678
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/43043762
has comment: http://stackoverflow.com/comment/43044585
has body: Completely ignore my previous answer, although it is a problem which you will definitely encounter should you continue with these large numbers, your actual issue is a misplaced bracket in your code. If you use this (simply replaced variable names with values): Math.round((1130000000000*Math.pow(120,1.85))/(Math.pow(150,1.85)*Math.pow((200*(1-2/17)),4.8655))) It returns 9 (a rounded 8.76), the bracket you misplaced is around the 1-2 mark. For future reference, the largest number Javascript can comprehend without fault is +/- 9007199254740992. References: What is JavaScript's highest integer value that a Number can go to without losing precision? ECMA-262 - The Number Type
upvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27288468
score: -1

http://stackoverflow.com/a/27160125
type: Answer
downvote count: 0
score: 1
has body: What you want is most likely jquery serialize and post your form. Look at following blog post, Using jQuery to submit ASP .NET MVC form.
answers question: http://stackoverflow.com/q/27160000
upvote count: 1

http://stackoverflow.com/comment/43065210
type: QuestionComment
has text: What is the value you are getting and what is expected?
score: 1
type: Comment
comment on: http://stackoverflow.com/q/27300739

http://stackoverflow.com/comment/42966488
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27245600
has text: instead of `event.preventDefault();` try using `return false;`
score: 0

http://stackoverflow.com/comment/42975197
type: Comment
type: QuestionComment
has text: Can you show, what have you tried so far?
comment on: http://stackoverflow.com/q/27250504
score: 0

http://stackoverflow.com/comment/43080273
type: Comment
has text: hi, i used ur code but it throwing error `ReferenceError: id_array is not defined` my code is `var frmData = frm.serialize(); frmData.push({name: id_array, value: extra_data});`
type: AnswerComment
comment on: http://stackoverflow.com/a/27309233
score: 0

http://stackoverflow.com/a/27190561
type: Answer
has comment: http://stackoverflow.com/comment/42868732
has comment: http://stackoverflow.com/comment/42868505
has body: I think that what you want is this: $(function() { $('#pword1').tooltip(); $('#pword1').tooltip( "disable" ); $(".ui-helper-hidden-accessible").hide(); }); function passwordValidation(){ var uname = document.getElementById("pword1").value; var pword = document.getElementById("cPassword").value; var cPassword = document.getElementById("cPassword"); var matchCol = "#009900"; var noMatchCol = "#CC0000"; var noBg = "#FFFFFF"; var match =""; if (uname.length &lt; 1){ cPassword.style.backgroundColor = noBg; match = ""; }else if (uname.length &lt; 6){ $('#pword1').tooltip( "enable" ); $('#pword1').tooltip("open"); }else if (pword.length &lt; 1){ cPassword.style.backgroundColor = noBg; match = ""; }else if (pword1.value == cPassword.value){ match = "Match!"; cPassword.style.backgroundColor = matchCol; } else if (pword1.value != cPassword.value){ match = "No Match!"; cPassword.style.backgroundColor = noMatchCol; } document.getElementById("combination").innerHTML = match; } The tooltip is disabled when the page loads. It is enabled and shown when the user clicks validation button and your condition is met. Here is a fiddle: http://jsfiddle.net/4wrj6da3/
answers question: http://stackoverflow.com/q/27190083
score: 0

http://stackoverflow.com/q/27313479
has answer: http://stackoverflow.com/a/27314126
type: Question
has comment: http://stackoverflow.com/comment/43087909
score: 3
has answer: http://stackoverflow.com/a/27313760
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27313583
accepted answer: http://stackoverflow.com/a/27314126
has answer: http://stackoverflow.com/a/27313583
downvote count: 0
tagged with: jquery
has body: On selection of all values in the List(using ctrl+A) the text is getting cut. I need the full text without the truncation. This is jsfiddle example. I tried different combinations, just couldn't get why this is happening or fix for it. HTML Code: GPRS_L(Bytes) GPRytes) GPRS_D_DL(Bytes) ol(Bytes) G_Volume_DL(Bytes) GPRS_Data_Volume_DL(Bytes) GPRS_Data_Volume) GPRytes) CSS: .leftList { width: 115px; overflow-x: scroll; height:200px; }
favorite count: 0
tagged with: html-select
has comment: http://stackoverflow.com/comment/43088022
has comment: http://stackoverflow.com/comment/43088376
has comment: http://stackoverflow.com/comment/43087323
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has title: text getting cut after all values of list are selected
tagged with: css
has answer: http://stackoverflow.com/a/27313593
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/27314021
has comment: http://stackoverflow.com/comment/43088762
has comment: http://stackoverflow.com/comment/43088725

http://stackoverflow.com/comment/43071668
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27304086
has text: MJB is right. Add console.log statements in to show where each steps is being called. E.g. inside the loop and inside the setTimeout. http://jsfiddle.net/3pop4g76/ . Firstly you'll see in the console that it loops through and prints out 'inside for loop - iteration 49' before the first setTimeout thing is called. After that it prints out 'inside setTimeout - comparing x:50 to timeCheck:4' 50 times. This is the closure that MJB was referring to.

http://stackoverflow.com/comment/42838516
has text: Thank you so much! This is exactly the solution I was looking for.
comment on: http://stackoverflow.com/q/27173564
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42800315
score: 0
comment on: http://stackoverflow.com/q/27152939
has text: Where is the ` `
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42935998
has text: I'm trying to fade in when (c <= 7).
comment on: http://stackoverflow.com/q/27229127
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27253132
type: Answer
answers question: http://stackoverflow.com/q/27252990
upvote count: 1
has comment: http://stackoverflow.com/comment/42980205
downvote count: 0
score: 1
has body: This is very possible with jQuery ... you would end up with something like ... $("#googleButton").on('click', function() { /* navigation with search criteria */ }); $("#wikipediaButton").on('click', function() { /* navigation with search criteria */ });

http://stackoverflow.com/comment/42831012
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27169612
type: Comment
has text: if you do that you get the red box error

http://stackoverflow.com/comment/43006333
type: AnswerComment
has text: Okay, but I do think you'll have a hard time switching the template as soon as the language changes if you're using the text plugin. If you have a custom template loader, you could also handle the switching of the template inside that loader.
type: Comment
comment on: http://stackoverflow.com/a/27252931
score: 0

http://stackoverflow.com/q/27207998
accepted answer: http://stackoverflow.com/a/27208129
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27208129
upvote count: 2
has title: make a for-loop of several js functions
score: 2
type: AnsweredQuestion
has body: i have several js functions doing the same thing width different values for different divs. Here is the HTML-code: I have about 15 radio button groups and for each group I have to execute this function with different values: function animateKunst(val) { var div = $('#kunstmuseum'); if(div.data('originalWidth') == undefined) div.data('originalWidth', div.width()); var width = div.data('originalWidth'); if (val=="voll") width *= .6; else if (val=="halb") width *= .8; $('#kunstmuseum').animate({width: width}, 500); } function animateHist(val) { var div = $('#historisch'); if(div.data('originalWidth') == undefined) div.data('originalWidth', div.width()); var width = div.data('originalWidth'); if (val=="voll") width *= .7; else if (val=="halb") width *= .9; $('#historisch').animate({width: width}, 500); } Can I put all the values in an array and then make a for-loop? How can I do that?

http://stackoverflow.com/q/27191554
tagged with: javascript
tagged with: jquery
score: 0
has title: JQuery - If Statement div 'height' and 'scrollTop' conflict
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42871257
answer count: 0
has comment: http://stackoverflow.com/comment/42871489
type: Question
has body: i'm currently having a problem with a script i've created. Essentially the code works out when to activate a fixed div based on the scroll position and on the width of the window; as the divs height gets smaller for responsive viewing. The problem with this is that it seems registers both of these at the same time, so the priority goes to the last of the two. Any help understanding why it's avoiding the statements would be greatly appreciated. HTML <?php echo the_field('mast_head_title');?> <?php echo the_field('mast_head_subtitle');?> jQuery $(window).scroll(function(){ if (($("#homeBannerContainer").height() === 876) || ($(window).scrollTop() >= 780)){ console.log("1 "); $('#headerContainer').css({background: 'url("http://yesyesdev.info/preventec/wp-content/themes/preventec/images/-homebanner.jpg")', position:'fixed', boxShadow: '5px -2px 15px #333'}); $('body.home #click-menu .threeLines .line').addClass('lineAdapt'); $('#headerContentLeft img').addClass('headerImageSmall'); $('#headerContentRight').css({paddingTop: '25px'}); } else { $('#headerContainer').css({background:'transparent', position:'fixed', boxShadow: '0px 0px 0px #333'}); $('body.home #click-menu .threeLines .line').removeClass('lineAdapt'); $('#headerContentLeft img').removeClass('headerImageSmall'); $('#headerContentRight').css({paddingTop: '60px'}); } if (($("#homeBannerContainer").height() === 440) || ($(window).scrollTop() >= 280)){ console.log("2 "); $('#headerContainer').css({background: 'url("http://yesyesdev.info/preventec/wp-content/themes/preventec/images/-homebanner.jpg")', position:'fixed', boxShadow: '5px -2px 15px #333'}); $('body.home #click-menu .threeLines .line').addClass('lineAdapt'); $('#headerContentLeft img').addClass('headerImageSmall'); $('#headerContentRight').css({paddingTop: '25px'}); } else { $('#headerContainer').css({background:'transparent', position:'fixed', boxShadow: '0px 0px 0px #333'}); $('body.home #click-menu .threeLines .line').removeClass('lineAdapt'); $('#h…

http://stackoverflow.com/comment/42981780
has text: hint: if the answer solves your question, you may gracefully accept it;-)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27250364

http://stackoverflow.com/q/27180134
tagged with: javascript
score: 0
answer count: 1
tagged with: asp.net-ajax
tagged with: jquery
tagged with: ajax
has body: I am using Ajax to create comments and its not working , and i am not sure where the problem is. I am thinking it might be in the way i am reading UserID and VideoID I have UserID saved in a session, and the videoID is saved in Query String. am i reading them wrong?! if yes how can i read them? here is my js code: &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#btnPost').click(function (e) { $.ajax({ url: "Ajax/ProcessAddComment.aspx", data: { commenttext: $('.txtcomment').val(), videoid: Request.QueryString["d"], userid: $.session.get('UserID') }, success: function (data) { alert(data); }, error: function () { } }); }); $.ajax({ url: "Ajax/ProcessFindComment.aspx", data: { videoid: Request.QueryString["id"] }, success: function (data) { // Append to the bottom // of list while prepend // to the top of list $('.postlist').html(data); }, error: function () { alert('Error'); } }); });
type: UnansweredQuestion
has title: Sending Query String and Session information using Ajax
has answer: http://stackoverflow.com/a/27181988
type: Question
tagged with: session

http://stackoverflow.com/a/27215233
downvote count: 0
has comment: http://stackoverflow.com/comment/42910678
has body: Honestly, I'd use Moment.js http://momentjs.com/docs/#/displaying/difference/ var a = moment('2014-11-30T15:41:51.012+0000'); var b = moment('2014-11-30T15:41:51.012+0000'); var dayDiff = a.diff(b, 'days'); You could do it natively, but this does it for you, it's lightweight, it'll handle all your locale woes and chances are you're going to want other date manipulation elsewhere that you can also use it for
has comment: http://stackoverflow.com/comment/42910426
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27215173
type: Answer
has comment: http://stackoverflow.com/comment/42910396

http://stackoverflow.com/comment/43064593
has text: jQuery method `hasClass` returns either `true` or `false`. It cannot be used to chain. You should try something similar to this: `jQuery("#slideshow article.previous").css("z-index", "1");`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27297605

http://stackoverflow.com/comment/42923076
has text: Are you familiar with how `==` compares objects in JS (and indeed, most languages)? The answer follows immediately from that.
score: 2
comment on: http://stackoverflow.com/q/27222223
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43073147
score: 0
has text: Unfortunately I don't know `pm2` well, but it is likely that your node process is starting with a different working directory, so when it tries to resolve your relative file path, it resolves to a different place.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27302778

http://stackoverflow.com/a/49890315
upvote count: 8
score: 7
has body: The basic example of async rendering of components is below: import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; export default class YourComponent extends React.PureComponent { constructor(props){ super(props); this.state = { data: null } } componentDidMount(){ const data = { optPost: 'userToStat01', message: 'We make a research of fetch' }; const endpoint = 'http://example.com/api/phpGetPost.php'; const setState = this.setState.bind(this); fetch(endpoint, { method: 'POST', body: JSON.stringify(data) }) .then((resp) => resp.json()) .then(function(response) { setState({data: response.message}); }); } render(){ return ( {this.state.data === null ? Loading : {this.state.data} } ); } }
downvote count: 1
answers question: http://stackoverflow.com/q/27192621
type: Answer

http://stackoverflow.com/comment/42890328
has text: *"...I can't seem to get it to work?"* ***How*** does it not work when you try it?
score: 0
comment on: http://stackoverflow.com/q/27203780
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27273983
answers question: http://stackoverflow.com/q/27273810
score: 0
has body: try: JSON.parse(receivedMessage).type
type: Answer

http://stackoverflow.com/comment/43054784
has text: Ok, ignoring the code style... what error are you getting?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27295021
score: 1

http://stackoverflow.com/a/27207538
score: 0
answers question: http://stackoverflow.com/q/27206991
has comment: http://stackoverflow.com/comment/42903938
type: Answer
has comment: http://stackoverflow.com/comment/42903224
has body: After a redirect (res.redirect), the res and req objects are recreated. That means if you added any parameters to these objects, you need to be sure they are re-added to the req or res objects on each request.
has comment: http://stackoverflow.com/comment/42903387

http://stackoverflow.com/comment/42894118
type: AnswerComment
has text: Actually, `select[name="menu"]` *is* a valid jQuery selector.
type: Comment
comment on: http://stackoverflow.com/a/27205454
score: 0

http://stackoverflow.com/a/27181388
has comment: http://stackoverflow.com/comment/42851714
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27181341
has body: Check whether your data is coming correctly.Might be there is a problem with accessing object. try printing your object variants.selected_car.specs. I created a plunker for a demo to print key value table . AngularJS Plunker Hello {{name}}! {{key}} {{val}} var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { $scope.name = 'World'; $scope.obj={name:'John', age:25, gender:'boy'} });
upvote count: 1
has comment: http://stackoverflow.com/comment/42851133
has comment: http://stackoverflow.com/comment/42851100
type: Answer

http://stackoverflow.com/comment/43217848
comment on: http://stackoverflow.com/a/27290365
score: 0
type: Comment
has text: Thanks but till couldn't fix it with it
type: AnswerComment

angularjs-scope
tags question: http://stackoverflow.com/q/27227681
tags question: http://stackoverflow.com/q/27284511
tags question: http://stackoverflow.com/q/27295164
tags question: http://stackoverflow.com/q/27174262
tags question: http://stackoverflow.com/q/27168650
tags question: http://stackoverflow.com/q/27176846
tags question: http://stackoverflow.com/q/27230239
tags question: http://stackoverflow.com/q/27312580
tags question: http://stackoverflow.com/q/27166901
tags question: http://stackoverflow.com/q/27275462
tags question: http://stackoverflow.com/q/27255009
tags question: http://stackoverflow.com/q/27267197
tags question: http://stackoverflow.com/q/27282792
tags question: http://stackoverflow.com/q/27252500
tags question: http://stackoverflow.com/q/27240607
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/27279123
tags question: http://stackoverflow.com/q/27255419
tags question: http://stackoverflow.com/q/27250359
tags question: http://stackoverflow.com/q/27189430
tags question: http://stackoverflow.com/q/27170654
tags question: http://stackoverflow.com/q/27161198
tags question: http://stackoverflow.com/q/27228217
tags question: http://stackoverflow.com/q/27236322
type: Tag

http://stackoverflow.com/comment/43015221
type: Comment
has text: Yes(same way) but remember to change id to class. You can't have multiple id's insise the DOM.
comment on: http://stackoverflow.com/a/27270623
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42989104
type: QuestionComment
comment on: http://stackoverflow.com/q/27256311
has text: hm , i tested this out before. Niet the Dark Absol pointed out the same thing and it looked like that didn't help either but it seems like it does :/
score: 0
type: Comment

http://stackoverflow.com/q/27214964
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42950010
has answer: http://stackoverflow.com/a/27236023
score: 1
has title: How to display overNode label in Sigma.Js programmatically?
upvote count: 1
tagged with: sigma.js
type: Question
has comment: http://stackoverflow.com/comment/42937906
tagged with: javascript
has comment: http://stackoverflow.com/comment/42910147
has comment: http://stackoverflow.com/comment/42918360
answer count: 1
downvote count: 0
has body: I'm using Sigma.Js library to display graph visualization in my Node.Js app. There's an overNode event, which displays the label of the node in a white rectangle when you hover over it. I want to display this label rectangle when the node is clicked, does anybody know how to do it?
favorite count: 0

javascript-objects
tags question: http://stackoverflow.com/q/27293581
tags question: http://stackoverflow.com/q/27208278
tags question: http://stackoverflow.com/q/27261932
tags question: http://stackoverflow.com/q/27239211
type: Tag
tag name: javascript-objects
tags question: http://stackoverflow.com/q/27255886

http://stackoverflow.com/comment/43015881
score: 0
type: QuestionComment
type: Comment
has text: @Ankit vadariya Of course, its a live test server, Debian, and I am on a windows PC.
comment on: http://stackoverflow.com/q/27272730

http://stackoverflow.com/q/27253648
tagged with: c#
has comment: http://stackoverflow.com/comment/43008005
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43000271
has comment: http://stackoverflow.com/comment/42981297
upvote count: 0
answer count: 1
tagged with: arrays
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/27253760
linked to: http://stackoverflow.com/q/227624
has title: How to pass an array from Asp.net to JavaScript
type: UnansweredQuestion
downvote count: 2
type: Question
has body: i wrote this code to pass array from asp.net code to javascript: aspx File: &lt;script type="text/javascript"&gt; var loc_array; var loc_array_two; function AssignValues(loc, loc_two){ loc_arary= loc; loc_array_two = loc_two; alert(loc_array[0]); } &lt;/script&gt; aspx.cs File: StringBuilder sb = new StringBuilder(); sb.Append("var loc = ["); foreach (var str in lb1) //lb1 is list { sb.Append("['" + str.Value1 + "','" + str.Value2 + "','" + str.Value3 + "'],"); } sb.Append("];"); StringBuilder sb2 = new StringBuilder(); sb2.Append("var own = ["); foreach (var str2 in lb2) //lb2 is list { sb2.Append("['" + str2.Value1 + "','" + str2.Value2 + "','" + str2.Value3 + "'],"); } sb2.Append("];"); if (lb1.Count &gt; 0 &amp;&amp; lb2.Count &gt; 0) { string arrayStr1 = string.Format("[{0}]", sb.ToString().TrimEnd('{','}')); string arrayStr2 = string.Format("[{0}]", sb.ToString().TrimEnd('{', '}')); Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "AssignValues(" + arrayStr1 + "," + arrayStr2 + ")", true); } The array that created is [var loc = [['New York','33.6306686','73.1175653'],];] - Now this array passed to the function of javascript. But nothing prints. Can anyone help me to solve this problem.

http://stackoverflow.com/comment/71983410
type: AnswerComment
comment on: http://stackoverflow.com/a/27298369
type: Comment
score: 1
has text: @jpwizer does this plugin knows the user has already rated our app, and will disable the popup in the future ? Just don't want to annoy the users.

http://stackoverflow.com/q/27203772
answer count: 2
tagged with: highcharts
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27203870
favorite count: 0
accepted answer: http://stackoverflow.com/a/27203870
type: AnsweredQuestion
has title: how to sum up all values with same keys in an object inside an array and get their average
upvote count: 1
type: Question
has body: so i have this json and i need to add the values of each the same keys that the object has and will also compute their average, here is my json var arraySeries = [{"country":"United States","data":2}, {"country":"Venezuela","data":0}, {"country":"Singapore","data":3}, {"country":"United States","data":0}, {"country":"Germany","data":2}, {"country":"United States","data":2}, {"country":"Canada","data":2}, {"country":"Germany","data":-4}]; and here is my expected result var newArraySeries = [{"country":"United States","data":[1.33333]}, {"country":"Venezuela","data":[0]}, {"country":"Singapore","data":[3]}, {"country":"Canada","data":[2]}, {"country":"Germany","data":[-1]}]; the data in newArraySeries should be in array, I'm going to use it in my highchart map.. i did some google research but i can't find any article like this.I hope you can help me
score: 1
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/27587054
has answer: http://stackoverflow.com/a/27587054

http://stackoverflow.com/comment/43037777
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27284806
has text: What you want to do is set the `selected` attribute on the _option_ that corresponds to the `var value = result.value` that you retrieve, _*not*_ set the "value" of the select control itself.

http://stackoverflow.com/comment/42821022
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27164145
has text: popup opens automatically or you have written some code to open popup on document ready??
score: 0

http://stackoverflow.com/comment/42882756
comment on: http://stackoverflow.com/a/27199094
type: Comment
has text: @Tico Whoops. I fixed it.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27297621
has comment: http://stackoverflow.com/comment/43059553
score: 3
downvote count: 0
has title: How to add multiple dropdown form with submit button combine value and go to url
type: Question
has answer: http://stackoverflow.com/a/27297867
has answer: http://stackoverflow.com/a/27297878
has answer: http://stackoverflow.com/a/27299292
has comment: http://stackoverflow.com/comment/43059600
tagged with: javascript
tagged with: jscript
has comment: http://stackoverflow.com/comment/43060141
upvote count: 3
answer count: 3
has body: I want the submit button to act on the combined values in the two didferent dropwdown menu's in the form. For example... west and winter is a different URL then west and summer I'm struggeling for days to make this work. I feel some how this must be possible. Please help! This is the code I use. When I replace the value to a URL. The URL will be loaded on submit (go). I want the values of the first dropdown and second dropdown to be counted and the result should be a URL on submit. Finaly there should be 16 different URLs. $(document).ready(function () { $(".go-btn").click(function () { location = $("#selection option:selected").val(); }); }); pick an option West East North South Winter Spring Summer Fall Go
favorite count: 0
has comment: http://stackoverflow.com/comment/43059796
type: UnansweredQuestion

http://stackoverflow.com/comment/42803899
comment on: http://stackoverflow.com/q/27154637
type: Comment
type: QuestionComment
score: 1
has text: @minseong: Like I said, it doesn't matter. There's no rational recommendation to make either way, because they'll have the same outcome.

web-services
type: Tag
tags question: http://stackoverflow.com/q/27309293
tags question: http://stackoverflow.com/q/27244377
tags question: http://stackoverflow.com/q/27267263
tags question: http://stackoverflow.com/q/27179875
tags question: http://stackoverflow.com/q/27264970
tags question: http://stackoverflow.com/q/27246332
tags question: http://stackoverflow.com/q/27272660
tag name: web-services
tags question: http://stackoverflow.com/q/27218440
tags question: http://stackoverflow.com/q/27209829

http://stackoverflow.com/comment/42850316
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27180726
has text: @Nit the OP originally tagged it with moment.js, but I removed the tag since this question did not have anything to do with it.
score: 0

http://stackoverflow.com/comment/43070233
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27303122
has text: yeah in the code there is allready a jquery loaded above, but if i left out the line the image map responsive function dont work anymore.
type: AnswerComment

http://stackoverflow.com/q/27159086
possible better answer: http://stackoverflow.com/a/27159124
has answer: http://stackoverflow.com/a/27159124
tagged with: asp.net-mvc-4
upvote count: 3
accepted answer: http://stackoverflow.com/a/27196587
type: Question
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27159311
has answer: http://stackoverflow.com/a/27159129
tagged with: asp.net-mvc
has title: JQuery passing 'null parameters to MVC controller method
linked to: http://stackoverflow.com/q/10757001
has body: Question background. I have a view that contains a button that when clicked passes the contents of a 'p' tag and 'h3' tag. These tags are populated from a passed list of models from the corrosposnding controller. I have an 'AddToCart' method on the controller that has the parameters passed to it from a Ajax JQuery function in the View. The issue: The following shows the JQuery Ajax call and the cshtml markup. Ideally I would like to pass the contents to the function. Currently I get the info from the tags based on their id's. View Markup: &lt;h3 class="panel-title boldFeatures" id="name"&gt;@(Model.ElementAt(0).ProductName)&lt;/h3&gt; &lt;div class="panel-body"&gt; &lt;img src="~/Images/LionToy.png" class="img-circle" id="featuresImages" alt="Work"&gt; &lt;p&gt;@(Model.ElementAt(0).ProductSummary)&lt;/p&gt; &lt;p id="qty"&gt;@(Model.ElementAt(0).productPrice)&lt;/p&gt; @Html.ActionLink("Add To Cart", "AddToCart", null, new { id = "addToCart" }, new { @class = "btn btn-primary btn-block" }) The Ajax Function: &lt;script&gt; $("#addToCart").click(function (e) { e.preventDefault(); $.ajax({ url: '/HomePage/AddToCart', type: 'POST', data: { name: $('#name').val(), qty: $('#qty').val() }, }); }); &lt;/script&gt; Controller AddToCart method: public void AddToCart(string name, string qty) { //Add to cart logic. } Issue: As shown the controller method is having both parameters passed as 'null'. EDIT: I have tried all of the suggestions below and still both of the parameters are being passed as 'null'.
has comment: http://stackoverflow.com/comment/42881895
downvote count: 0
answer count: 7
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27196532
favorite count: 0
has answer: http://stackoverflow.com/a/27196587
tagged with: ajax
has answer: http://stackoverflow.com/a/27159165
has comment: http://stackoverflow.com/comment/42813671
has answer: http://stackoverflow.com/a/27159334

http://stackoverflow.com/a/27230835
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42952537
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/42939105
has body: you need to call ko.applyBindings. try this: &lt;script type="text/javascript"&gt; var viewModel = { myMessage: ko.observable() // Initially blank }; ko.applyBindings(viewModel) // you need to initialize ko :) viewModel.myMessage("Hello, world!"); // Text appears &lt;/script&gt;
answers question: http://stackoverflow.com/q/27230744
score: 3
accepted answer of: http://stackoverflow.com/q/27230744

http://stackoverflow.com/comment/43043789
has text: I have removed unecessary code.My question is not related to upload to s3.It is about how to re-render/refresh directive template when i click on a button that triggers 'emptyfile()' function from the code.I mean what should i write in emptyfile() function to refresh my directive template..I have searchrd in the internet but couldnt find an proper solution
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27288242
score: 0

http://stackoverflow.com/a/27189534
score: 1
answers question: http://stackoverflow.com/q/27172746
has body: There is an excellent article "Accessible Dropdown Menus" all about the various ways to do this at http://terrillthompson.com/blog/202 It includes examples of various methods. One of the simplest can be seen at http://staff.washington.edu/tft/tests/menus/dropperdown/index.html. It is a pure CSS solution (no JavaScript) that was billed on it's invention as "the world's most accessible dropdown menu.". However other more advanced methods are demoed as well. I hope it provides everything you need.
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42800496
has text: Another day, another Chrome idiosyncrasy. Cannot reproduce this in any other browser.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27152935
type: Comment

http://stackoverflow.com/q/27250945
has comment: http://stackoverflow.com/comment/43013316
possible better answer: http://stackoverflow.com/a/27271536
has title: flashing text issue
has body: I have a script that makes text alternate between a specific color and grey. It blinks every second or so between the two colors. My code for it is this: HTML bit &lt;script&gt; setInterval(function() { flashtext('flashingtext','&lt;? echo $name_color ?&gt;'); }, 500 ); &lt;/script&gt; &lt;span id="flashingtext" style="color: &lt;? echo $name_color ?&gt;"&gt;&lt;? echo $name ?&gt;&lt;/span&gt; JavaScript function flashtext(ele,col) { var tmpColCheck = document.getElementById( ele ).style.color; if (tmpColCheck === 'gray') { document.getElementById( ele ).style.color = col; } else { document.getElementById( ele ).style.color = 'gray'; } } The problem I have with this is that the section of the page that runs the HTML is refreshed every 10 seconds. This results in the timing of the blinking being messed up. It'll start blinking like I said every second, then when that page section refreshes it'll blink really fast and continue unless the whole page is manually refreshed again. Any idea how to stop this? Figure the timer isn't getting reset or something... Or when its grabbing the current color it catches it on gray? Not sure :s
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42976637
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27251440
accepted answer: http://stackoverflow.com/a/27251440
has comment: http://stackoverflow.com/comment/42977003
has answer: http://stackoverflow.com/a/27271536
has comment: http://stackoverflow.com/comment/42976310
tagged with: jquery
has comment: http://stackoverflow.com/comment/42977532

http://stackoverflow.com/q/27299441
tagged with: jquery
has body: I'm using an API that someone else in my company made, and one of the endpoints he's created accepts GET requests with an access key header provided from another endpoint. I use the following jQuery AJAX to call it: $.ajax({ type:'GET', url: 'http://myapi.com', crossDomain: true, headers: { "token": data.AccessKey } }) In Chrome, this returns 2 error messages in the console: OPTIONS http://myapi.com jquery.min.js:4k.cors.a.crossDomain.send jquery.min.js:4n.extend.ajax jquery.min.js:4(anonymous function) (index):69j jquery.min.js:2k.fireWith jquery.min.js:2x jquery.min.js:4(anonymous function) jquery.min.js:4 XMLHttpRequest cannot load http://myapi.com. Invalid HTTP status code 405 (index):1 In Firefox I get a different error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myapi.com. This can be fixed by moving the resource to the same domain or enabling CORS. But we enabled CORS on the API server (we were getting that message on Chrome, too, before we did) so I don't know why it's saying that. I know that this endpoint is expecting a GET request. If I send this request with no headers at all, it returns a 200 status and a response containing the expected "You need a key to access this information". If we try it on hurl.it, the GET request with a valid key as a header returns the expected results. Because of CORS, it's running the pre-flight OPTIONS request, which I think is what's giving the 405 error, but shouldn't the server accept OPTIONS methods? How do we ensure this method is accepted? Is there something else going on that I'm not catching? CORS is a new concept to me so feel free to ELI5 your answers.
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43063418
has comment: http://stackoverflow.com/comment/43063683
answer count: 0
has comment: http://stackoverflow.com/comment/43063371
has comment: http://stackoverflow.com/comment/43064046
has comment: http://stackoverflow.com/comment/43063328
type: Question
has comment: http://stackoverflow.com/comment/43063294
has title: jQuery AJAX request yielding 405 error despite knowing the method is right
tagged with: javascript
has comment: http://stackoverflow.com/comment/43063112
has comment: http://stackoverflow.com/comment/43062885
has comment: http://stackoverflow.com/comment/43062972
score: 0

http://stackoverflow.com/q/27180726
favorite count: 0
has comment: http://stackoverflow.com/comment/42850303
type: Question
has answer: http://stackoverflow.com/a/27180959
answer count: 3
has title: How can I find the difference between two dates in JavaScript?
has body: I want to find the difference between two dates, inclusive. For example, 11/1/2014 (Nov 1) - 10/1/2014 (Oct 1) == 32 days I was checking my results with the following page var date1 = new Date(2013, 10, 01); var date2 = new Date(2015, 10, 15); var diff = new Date(date2.getTime() - date1.getTime()); console.log("diff.getUTCDate: " + diff.getUTCDate() ); // diff is: Thu Jul 05 1973 04:00:00 GMT+0300 (EEST) if(diff.getUTCDate() == 1){ console.log(diff.getUTCDate() ); // Gives day count of difference }else{ console.log( diff.getUTCDate() + 1 ); }
has comment: http://stackoverflow.com/comment/42849935
has answer: http://stackoverflow.com/a/27180977
linked to: http://stackoverflow.com/q/3224834
tagged with: javascript
type: UnansweredQuestion
score: -4
has answer: http://stackoverflow.com/a/27180922
has comment: http://stackoverflow.com/comment/42850316
downvote count: 4
has comment: http://stackoverflow.com/comment/42850343
upvote count: 0

http://stackoverflow.com/a/27181097
type: Answer
score: 2
upvote count: 2
has body: You can create your object first, then pass it like this: var obj= new Object(); obj.name=getValue($('label.name input')); ... obj.values:values etc $.ajax({ type:"POST" ,url : "YOUR URL" ,data: JSON.Stringify(obj) }); THAT'S IT Good Luck
downvote count: 0
answers question: http://stackoverflow.com/q/27181021

http://stackoverflow.com/a/27258195
answers question: http://stackoverflow.com/q/27258161
type: Answer
score: 2
upvote count: 2
has body: 1) Sort of. Simply do ""+dt and you'll get the date formatted according to the browser's locale. In theory at least, if your computer is set to 12-hour, then the result will be too. 2) You can zero-pad with ("0"+dt.getHours()).slice(-2)
downvote count: 0

http://stackoverflow.com/comment/42864515
has text: change selector. it's easy!change selector like `$('iframe')` or if you have iframe's , you can change selector by eq like `$('iframe').eq(0)` or eq(n+1...)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27189079

http://stackoverflow.com/q/27257462
score: 0
has comment: http://stackoverflow.com/comment/42989303
has body: I have created a validation error in my models.py that shows when people try to save an appointment in the past (my app is a kind of calendar). This all works. (btw: I use ugettext_laxy as _) raise ValidationError(_('SomeText') However, now I'm using ajax post calls to create new appointments. They give back the 400 BAD REQUEST response, which I capture in the .fail() block in the javascript and show in a popup: .fail(function(jqXHR, textStatus, errorThrown) { showPopupMessage(jqXHR.responseJSON.error, 'danger'); }); So far so good. The popup and everything works. However, the showed text inside the jqXHR.responseJSON.error object is like this: "[u'SomeText']" Which means that the text inside the popup shows like this: [u'SomeText']. ie, it looks like a unpacked python string inside a list. Is there a way to unpack this using javascript/jquery? I've been working on this for several hours, for something that should be so easy for a javascript guru... (I'm new to javascript)... So thanks a lot! EDIT: I'm using tastypie, so I guess I use those views?
tagged with: python
answer count: 0
type: UnansweredQuestion
has title: Django validationError from jquery post.fail() into normal message (displays "[u'text here']")
tagged with: django
type: Question
has comment: http://stackoverflow.com/comment/43003566
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/45519874
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27204131
score: 0
has text: Please look at http://stackoverflow.com/questions/13607252/getting-border-width-in-jquery for valid border width calculation

header
type: Tag
tags question: http://stackoverflow.com/q/27165625
tag name: header

http://stackoverflow.com/a/27201278
score: 0
answers question: http://stackoverflow.com/q/27201132
type: Answer
has body: Since the user can only see one of the two links at any moment, you could use a single function jQuery('.post').on('click', 'a.more, a.less', function() { jQuery(this).closest('li').toggleClass('active'); });

http://stackoverflow.com/q/27257690
tagged with: analytics
has body: I have a CMS application that universally loads google analytics code. It looks like this &amp; is dynamically loaded in the &lt;head&gt; tag on each of my clients sites. &lt;script type="text/javascript"&gt; var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-000000-1']); _gaq.push(['_setDomainName', 'example.com']); _gaq.push(['_trackPageview']); _gaq.push(['_setCustomVar', 1, 'Product','my-application',3]); _gaq.push(['_setCustomVar', 2, 'Sport','hockey',3]); _gaq.push(['_setCustomVar', 3, 'SiteID','121',3]); _gaq.push(['_setCustomVar', 4, 'State','MN',3]); _gaq.push(['_setCustomVar', 5, 'DMA','',3]); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); &lt;/script&gt; My client has implemented Google Tag Manager code just below the opening &lt;body&gt; tag (it looks like this) &lt;noscript&gt; &lt;iframe src="//www.googletagmanager.com/ns.html?id=GTM-O8EFGG" height="0" width="0" style="display:none;visibility:hidden"&gt;&lt;/iframe&gt; &lt;/noscript&gt; &lt;script&gt; (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&amp;l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-O8EFGG'); &lt;/script&gt; I am under the impression that my application code will not conflict with the GTM code &amp; vice verse. I want to confirm but haven't been able to dig up information on weather or not these can co-exist or if I need to migrate my UA code into my own GTM code. Can someone confirm my assumptions are correct, that both the GTM code and the UA codes can run without conflicts?
has title: Does Google Tag Manager code conflict with Google Analytics code implemented on the same site?
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27258948
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27258948
tagged with: google-analytics
tagged with: google-tag-manager
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27261006
has comment: http://stackoverflow.com/comment/43163852
score: 1
has body: It seems that you want instances to have a standard set of properties that are defined in some object, not explicitly assigned in the constructor. The "standard" pattern would be: function Foo(a, b) { this.a = a; this.b = b; } Foo.prototype.fn = function() { // do stuff } However, you seem to want to create an object that has standard properties and perhaps default values. Maybe that should be a property of the constructor: Foo.standardProps = { a: 'a', b: 'b' } Now in the constructor you can do: function Foo() { cloneObj(Foo.standardProps, this); } Where cloneObj does the copy to your specification. Note that there are lots of questions and answers about how to copy or clone a javascript object. It's quite difficult do to in a general case as there are differing opinions on what a copy is vs a clone, the different types of object and also how to treat non–Object objects like Arrays, Dates and Functions and also host objects like DOM elements or even the Window object. So best to define a limited case for the types of Object you wish to make "deep" copies of. You may even want to use getters and setters to deal with each case explicitly.
upvote count: 1
answers question: http://stackoverflow.com/q/27240585
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43055805
comment on: http://stackoverflow.com/a/27282443
has text: HOLY S@^#$! by declaring analyser as a global and removing it from the signature of frameLooper and the scope of frameLooper, the issue was solved. @spender, even though your solution didn't initially solve my problem, it still sparked my brain to fix my issue. So you get the points, thank you.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27233111
has comment: http://stackoverflow.com/comment/42946841
has answer: http://stackoverflow.com/a/33754048
has title: Keep Zurb Foundation dropdown open when clicking
type: Question
has body: I am using a Foundation dropdown, and inside it I have multiple things I need to interact with, including colpick, adding and removing components, etc. Anytime I do any of these actions, the dropdown closes, as it should since it is a dropdown. Is there a good way to have the dropdown ignore my clicks and only close if I click the close button instead?
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/42947062
upvote count: 1
tagged with: zurb-foundation
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27243807
type: UnansweredQuestion
tagged with: css
score: 1

http://stackoverflow.com/q/27198437
downvote count: 0
has answer: http://stackoverflow.com/a/27198566
has comment: http://stackoverflow.com/comment/42881552
tagged with: cross-platform
has comment: http://stackoverflow.com/comment/42881358
score: 13
has body: From this, I found out that JavaScript is written in C++. I also have found out/deduced that a majority of JavaScript is C++ (e.g. Math.atan+"" and Math.atan.toString() yielding "function atan() { [native code] }"). The [native code I assume to be C++, else what would be the point of 'hiding' it? My question is there a way to utilize C++ in JavaScript? To use it in a function or in the JavaScript platform?
type: Question
has answer: http://stackoverflow.com/a/51885369
has title: Is there a way to use C++ in JavaScript?
has comment: http://stackoverflow.com/comment/42881516
tagged with: javascript
upvote count: 13
has comment: http://stackoverflow.com/comment/103233888
answer count: 3
tagged with: emcc
has answer: http://stackoverflow.com/a/27198513
favorite count: 0
has comment: http://stackoverflow.com/comment/42881353
possible better answer: http://stackoverflow.com/a/51885369
accepted answer: http://stackoverflow.com/a/27198566
tagged with: c++
type: AnsweredQuestion

http://stackoverflow.com/comment/43175090
comment on: http://stackoverflow.com/a/27279211
type: Comment
has text: Yes this is firefox-addon code. Firefox has a built in popup blocker though thats a good thing to use.
score: 1
type: AnswerComment

http://stackoverflow.com/q/27262642
has title: Multiple synced owl carousel
tagged with: owl-carousel
type: Question
has answer: http://stackoverflow.com/a/40770314
answer count: 2
has body: I've edited the code provided from here to cater for two carousel without it being id dependent, which works fine, except that I can't get the tabs to work properly upon click. (E.g, removing the class "synced" and adding them onto the clicked tab properly.) Think I'm not doing something right with both function syncPosition and function left. Where did I miss out, or did wrong? HTML: 1 2 3 4 5 Content 1 Content 2 Content 3 Content 4 Content 5 1 2 3 4 Content 1 Content 2 Content 3 Content 4 Script:
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/77142695

http://stackoverflow.com/comment/43075213
comment on: http://stackoverflow.com/a/27305048
type: AnswerComment
score: 0
type: Comment
has text: `// rectangle-specific things could be added here` this is what I would be concerned about.

http://stackoverflow.com/a/27271032
downvote count: 1
score: 7
has comment: http://stackoverflow.com/comment/43011882
has comment: http://stackoverflow.com/comment/43012177
type: AcceptedAnswer
has body: You could just use the UTF-8 character for superscripted ². Also be sure to set the charset of the document to UTF-8. &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;/head&gt; &lt;body&gt; &lt;input class="form-control" name="gla" placeholder="m²" type="text" /&gt; &lt;/body&gt; &lt;/html&gt; Also this answer might be of help.
upvote count: 8
answers question: http://stackoverflow.com/q/27270820
type: Answer
has comment: http://stackoverflow.com/comment/43012246
has comment: http://stackoverflow.com/comment/43012359
accepted answer of: http://stackoverflow.com/q/27270820

http://stackoverflow.com/comment/42876790
has text: This answer might help (have a look at the comments): [http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit][1] [1]: http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27195868

http://stackoverflow.com/q/27204572
answer count: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42891745
has answer: http://stackoverflow.com/a/27205028
accepted answer: http://stackoverflow.com/a/27205361
has comment: http://stackoverflow.com/comment/42892681
has comment: http://stackoverflow.com/comment/42894371
type: AnsweredQuestion
score: 1
has body: I am receiving an unexpected this type in the following JavaScript: var MyReservationsViewModel = (function () { function MyReservationsViewModel() { this.availableMeals = [ { mealName: "Standard (sandwich)", price: 0 }, { mealName: "Premium (lobster)", price: 34.95 }, { mealName: "Ultimate (whole zebra)", price: 290 } ]; this.self = this; this.self.seats = ko.observableArray([ new SeatReservation("Steve", this.availableMeals[0]), new SeatReservation("Bert", this.availableMeals[0]) ]); } MyReservationsViewModel.prototype.addSeat = function () { this.self.seats.push(new SeatReservation("", this.availableMeals[0])); }; MyReservationsViewModel.prototype.removeSeat = function (seat) { this.self.remove(seat); }; return MyReservationsViewModel; })(); ; var SeatReservation = (function () { function SeatReservation(name, initialMeal) { var _this = this; this.name = name; this.meal = ko.observable(initialMeal); this.formattedPrice = ko.computed(function () { var price = _this.meal().price; return price ? "$" + price.toFixed(2) : "None"; }); } return SeatReservation; })(); var seat = new MyReservationsViewModel(); ko.applyBindings(seat); The exception I receive is in: MyReservationsViewModel.prototype.removeSeat = function (seat) { this.self.remove(seat); }; The problem is this is a type of SeatReservation The HTML page for it is: Your seat reservations Passenger name Meal Surcharge Remove Reserve another seat
has answer: http://stackoverflow.com/a/27205361
upvote count: 1
has title: Unexpected this type in javascript
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/27205263
possible better answer: http://stackoverflow.com/a/27205028
tagged with: javascript

http://stackoverflow.com/a/27307524
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27307432
type: Answer
accepted answer of: http://stackoverflow.com/q/27307432
downvote count: 0
score: 3
has body: a google.maps.LatLng object takes two numbers as its arguments. This is not correct: pictureLocations[i] = new google.maps.LatLng(tempLat + ", " + tempLong); should be pictureLocations[i] = new google.maps.LatLng(tempLat,tempLong); and safer to be: pictureLocations[i] = new google.maps.LatLng( parseFloat(tempLocation.latitude), parseFloat(tempLocation.longitude)); as coming from JSON, they are both strings. You could even verify they are valid numbers, by testing "isNaN" before using them to construct the google.maps.LatLng.

http://stackoverflow.com/q/27189566
score: -1
has comment: http://stackoverflow.com/comment/42865300
answer count: 1
downvote count: 1
has body: prime number calculator I have studied javascript before this but the method I use is onclick or onload, I've never used addEventListener before, my code didn't function at all. First, when the page loads, I register an event to trigger the other function and register an event for the button, after that I call the other function for further calculation but it wouldn't work at all. I don't know which lines of codes are inappropriate, this condition must use addEventListener.
accepted answer: http://stackoverflow.com/a/27189807
tagged with: javascript
has comment: http://stackoverflow.com/comment/42865310
has comment: http://stackoverflow.com/comment/42865303
has comment: http://stackoverflow.com/comment/42865846
type: AnsweredQuestion
upvote count: 0
has title: addEventListener in javascript
has comment: http://stackoverflow.com/comment/42865339
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27189807

http://stackoverflow.com/a/27156532
has comment: http://stackoverflow.com/comment/42807499
score: 1
upvote count: 2
downvote count: 1
has body: That solution outlined in your question only works if it's a pseudo-element. You'll need to either make it a background-image on the a or td and change it that way, or use a jQuery function like this: $('a').on('mouseover', function() { $(this).find('img').attr('src', 'path/to/my/image.png'); }); Or native JavaScript document.querySelectorAll('a img[alt=Link1]').addEventListener('mouseover', function() { this.src = 'path/to/my/image.png'; });
has comment: http://stackoverflow.com/comment/42807561
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27156483
has comment: http://stackoverflow.com/comment/42807355
answers question: http://stackoverflow.com/q/27156483
has comment: http://stackoverflow.com/comment/42807534
type: Answer

http://stackoverflow.com/q/27223606
accepted answer: http://stackoverflow.com/a/27223682
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27223707
favorite count: 0
has answer: http://stackoverflow.com/a/27223707
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
type: AnsweredQuestion
has title: Refresh a particular div when I click on that div.Without reloading the whole page.I specifically want it using onclick function
has answer: http://stackoverflow.com/a/27223682
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42925594
has comment: http://stackoverflow.com/comment/42925531
answer count: 2
score: 2
has body: $(document).ready(function () { var j = jQuery.noConflict(); j(document).ready(function () { j(".refresh").everyTime(2000, function (i) { j.ajax({ url: "refresh.php", cache: true, success: function (html) { j(".refresh").html(html); } }) }) }); j('.refresh').css({ color: "" }); }); &lt;?php echo time(); ?&gt; It works for refreshing page after particular time interval .I want this to be working after I click on particular div.

http://stackoverflow.com/a/27281983
has comment: http://stackoverflow.com/comment/43032672
type: Answer
has comment: http://stackoverflow.com/comment/43032680
answers question: http://stackoverflow.com/q/27280424
score: 0
has body: if i get you right . you need to define two button like: Save First //define second js $scope.saveFirst = function(){ $http.post('post_es.php', {'firstname': $scope.userDetails.first_name, 'lastname': $scope.userDetails.last_name} ).success(function(data, status, headers, config) {} } and check this Site hope it'll help you
has comment: http://stackoverflow.com/comment/43032743
has comment: http://stackoverflow.com/comment/43032791
has comment: http://stackoverflow.com/comment/43032589

http://stackoverflow.com/comment/42804034
has text: He wants to validate that #txtfname is 5 or more characters as seen in the message... however he lists 2 as the length which is a bit confusing to begin with. I've posted what I believe is the answer he is looking for
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27154501
type: Comment

http://stackoverflow.com/a/44471696
score: 0
upvote count: 1
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27191150
has body: with the loadComplete() method, you can do like this: $(table).find(".ui-inline-del").each(function() { var delDivBtn = $(this); var id_reg = /(\w+)([_]{1})(\w+$)/; // remove the delete event $(delDivBtn).removeAttr("onclick"); // add new click event $(delDivBtn).click(function() { var rowid = delDivBtn.attr("id").replace(id_reg, '$3'); alert(rowid); }); });

http://stackoverflow.com/comment/42975238
type: Comment
comment on: http://stackoverflow.com/q/27250484
type: QuestionComment
has text: Just change the height to auto when you click the menu so it will expand with the newly displayed content and change back to 27px when the menu is closed do this using javascript...
score: 0

http://stackoverflow.com/q/27290671
possible better answer: http://stackoverflow.com/a/27415833
has comment: http://stackoverflow.com/comment/43249899
has comment: http://stackoverflow.com/comment/43156977
has answer: http://stackoverflow.com/a/27562753
tagged with: google-maps
has body: I am getting this error in google maps. Error: InvalidValueError: setIcon: not a string; and no url property; and no path property Earlier it was working fine and i never changed my code. I have seen a post Google Maps Error: Uncaught InvalidValueError: setIcon: not a string; and no url property; and no path property with same issue and applied the change mentioned in the answer. Earlier it was working and now it also stopped working. It Seems that google has changed something in their API but not sure what exactly. I found the same issue found by some other users too @ https://code.google.com/p/gmaps-api-issues/issues/detail?id=7423 My website link is http://www.advantarealty.net/Search//Condo,Single-Family-Home,Townhome_PropertyType/True_ForMap/ just open in firefox and see the error console. I have included below js files for map. hello Below is the complete javascript code which i used.
tagged with: javascript
has title: Google Map:- InvalidValueError: setIcon: not a string; and no url property; and no path property
score: 6
has comment: http://stackoverflow.com/comment/43469012
type: Question
tagged with: google-maps-markers
has comment: http://stackoverflow.com/comment/43275273
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27562753
has comment: http://stackoverflow.com/comment/43468973
favorite count: 0
has comment: http://stackoverflow.com/comment/43240021
has comment: http://stackoverflow.com/comment/43274604
answer count: 2
tagged with: maps
has comment: http://stackoverflow.com/comment/43253183
linked to: http://stackoverflow.com/q/25750692
has answer: http://stackoverflow.com/a/27415833
upvote count: 9
has comment: http://stackoverflow.com/comment/43469566
has comment: http://stackoverflow.com/comment/43469419
downvote count: 3
has comment: http://stackoverflow.com/comment/43275684

http://stackoverflow.com/q/27263891
has comment: http://stackoverflow.com/comment/43000149
type: Question
has comment: http://stackoverflow.com/comment/43000123
tagged with: javascript
has answer: http://stackoverflow.com/a/27264299
score: 0
has body: Ok i finally got my minesweeper game made just needing one more thing if anyone could help me with. The part when you click on an unnumbered square and it will reveal some of the board. I have been playing around on this for sometime just drawing a blank. This is a simple minesweeper game just in java script. I have everything labeled where things should go to make it easier to find and i will bold it on where my code ive been working on is. //Global //store the value of each square var gaValue = new Array(8) for (i = 0; i <= 8; i++) gaValue[i] = new Array(8) for (i = 0; i <= 8; i++) { //loop through each item in those row for (j = 0; j <= 8 ; j++) gaValue[i][j] = 0 } //Store the status of each square var gaSquare = new Array(8) for (j = 0; j <= 8; j++) gaSquare[j] = new Array(8) for (j = 0; j <= 8; j++) { //loop through each item in those row for (i = 0; i <= 8 ; i++) gaSquare[i][j] = "C" } //Track of whether the game is over or not (starts this with false) var gbGameOver = false function vInit() { var strHTML var i var j strHTML = " " strHTML += " MineSweeper " strHTML += " " //Loop through the rows to build the table of tiles for (i = 0; i < 8; i++) { strHTML += " " for (j = 0; j < 8; j++) strHTML += ' '; strHTML += " "; } strHTML += ' ' strHTML += " " frmGrid.innerHTML = strHTML //Place bombs var iBomb = 0 var iRow = Math.floor(Math.random() * 8) var iCol = Math.floor(Math.random() * 8) while (iBomb < 8) { while (gaValue[iRow][iCol] == 9) { iRow = Math.floor(Math.random() * 8) iCol = Math.floor(Math.random() * 8) } gaValue[iRow][iCol] = 9 iBomb++ } //Calculate clue values around mines var iMine = 0 for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { for (k = (i - 1) ; k <= (i + 1) ; k++) for (m = (j - 1) ; m <= (j + 1) ; m++) if (k >= 0 && k <= 9 && j >= 0 && j <= 9) if (gaValue[k][m] == 9) iMine++ if (gaValue[i][j] != 9) gaValue[i][j] = iMine iMine = 0 } } } //Get the ID of the image I need to change function vClick(iRow, iCol) { var gaSquare = "square" + iRow …
tagged with: arrays
answer count: 1
tagged with: minesweeper
type: UnansweredQuestion
has title: Having issues with clearing area around blank squares in minesweeper

http://stackoverflow.com/comment/43138197
comment on: http://stackoverflow.com/a/27296993
has text: How can you be new here when you have 2000+ in reputation? I had 100 before this bounty, and I've been here for 2 years, haha (not entirely active, though).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42961508
has text: it's pointing on line 3 of upload.php. I don't know what's wrong with it.. this line <?php . . $uploaded = []; . . . ?>
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27187314
score: 0

http://stackoverflow.com/comment/42906629
score: 0
type: Comment
has text: The first way is not owrking for me. And the sceond is not a valid way bacause I want to make it easy for the user to select the date.
type: AnswerComment
comment on: http://stackoverflow.com/a/27212792

http://stackoverflow.com/a/27200348
answers question: http://stackoverflow.com/q/27200134
accepted answer of: http://stackoverflow.com/q/27200134
has body: The following code will help you achieve what you are looking for and it does it with AJAX so no need to refresh the page name email phone comment refresh send add the following js to your file or include it $('#submit').click(function() { name = document.getElementById('name').value; email = document.getElementById('email').value; mobile = document.getElementById('mobile').value; $.post('savenazar.php', {'name': name, 'email': email, 'mobile'" mobile}, function(data) { var parsed = JSON.parse(data); var html = 'HTML to show when data is passed'; $('#requestStatus').append(html); }).success(function() { $('#comment').val(''); $('#sentSuccess').html('data Sent!').show().delay(5000).fadeOut(); }).fail(function() { $('#sentFailed').html('data not sent').show().delay(5000).fadeOut(); }); }); // In savenazar.php <?php $name = $_GET['name'];
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/27274034
score: 11
has comment: http://stackoverflow.com/comment/43017991
downvote count: 0
has comment: http://stackoverflow.com/comment/43018261
has comment: http://stackoverflow.com/comment/43017813
upvote count: 11
accepted answer of: http://stackoverflow.com/q/27273984
has body: Use a simple condition var elem = document.querySelector('link[rel="service"]'); var canLink = elem ? elem.href : ""; Now in your code you could check in your code for "" (empty string) and take further measures like if(canLink !== "") { // could be just written as if(canLink){ ... } // do something with the canLink now }
answers question: http://stackoverflow.com/q/27273984
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43027340
type: Answer

http://stackoverflow.com/q/27231754
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42940342
has title: Order json array alphabetically in angular.js when there is no key/value association
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17936078
duplicate of: http://stackoverflow.com/q/14493116
type: Question
linked to: http://stackoverflow.com/q/14493116
answer count: 1
tagged with: javascript
has body: I'm trying to alphabetize a list based on a json array, but I cant seem to get it to work. My current code looks like this. Here is a link to the jsfiddle http://jsfiddle.net/hxxLaxL3/ HTML {{f}} Angular function Ctrl($scope) { $scope.friends = ['C', 'B', 'Z', 'S']; } Output C B Z S Desired Output B C S Z
score: 0
has answer: http://stackoverflow.com/a/27232102
accepted answer: http://stackoverflow.com/a/27232102
has comment: http://stackoverflow.com/comment/42940959
duplicate of: http://stackoverflow.com/q/17936078

http://stackoverflow.com/q/27240657
linked to: http://stackoverflow.com/q/27258609
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/27240883
answer count: 1
has body: Goal: I want to make make a loop over an it block that tests if an element text matches. Error: Error: No element found using locator: by.cssContainingText(".submenu li a", "undefined") Question: How do I write a for loop to test multiple list items'? Moreover, How do i make var title visible to the inner it block For this example: I have 2 test that I want to DRY up via a loop this next test example is just psuedocode doesn't work working test below. var config = require('../../protractor.conf.js').config; describe('this Homepage Body Tests', function(){ browser.driver.get(config.homepageUrl); describe('sub navigation functionality', function () { //creates teh array of strings for this sample var title = ['find a store', 'clinic']; for(var i = 0; i < title.length; i++){ it("should open find a" + title[i] + "page", function(){ browser.driver.sleep(2000); browser.ignoreSynchronization = true; var link = element(by.cssContainingText('.submenu li a', title[i])); expect(link.getText()).toEqual(title[i]); }); }; }); }); HTML: <a >find a store clinic Working Tests example: it("should open find a store page", function(){ browser.driver.sleep(2000); browser.ignoreSynchronization = true; var title = 'find a store'; var link = element(by.cssContainingText('.submenu li a', title)); expect(link.getText()).toEqual(title); }); it("should open find a clinic page", function(){ browser.driver.sleep(2000); browser.ignoreSynchronization = true; var title = 'clinic'; var link = element(by.cssContainingText('.submenu li a', title)); expect(link.getText()).toEqual(title); }); Update: it("should open find a store page", function(){ browser.driver.sleep(2000); browser.ignoreSynchronization = true; var string = 'find a store'; var main = '.main'; var link = element(by.cssContainingText('.submenu li a', string)); expect(link.getText()).toEqual(string); //I WANT OT CLICK ON THAT TOO! link.click().then(function() { browser.driver.sleep(3000); var title = element(by.cssContainingText(main, str…
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/21736191
has title: Is it possible to use a for loop for DRY protractor test? *var coming up undefined*
tagged with: angularjs-e2e
tagged with: selenium-webdriver
linked to: http://stackoverflow.com/q/22806379
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: protractor
accepted answer: http://stackoverflow.com/a/27240883

http://stackoverflow.com/comment/43059796
type: QuestionComment
comment on: http://stackoverflow.com/q/27297621
has text: I'm just finding code online and this was the closest but if anyone can help out would be great. I need to have 2 dropdowns. Dropdown 1 will have eg: 1. I am working with my hands, 2. I am working with my feet, 3. I am working with my body. Dropdown 2 will have eg: 1. Acne, 2. Dry Skin, 3. Redness, 4. Sensitive Skin. I need to be able to do the following: If user selects eg: from Dropdown 1: I am working with hands and Dropdown 2: Dry Skin ... when the user clicks submit it will take them to a URL eg: www.google.ca
score: 0
type: Comment

http://stackoverflow.com/comment/42803637
score: 0
type: AnswerComment
has text: @Malvolio: Yeah, sorry about that. Turned out it was all just a big misunderstanding. I thought he ate my lunch, but then after I remembered that I didn't bring a lunch that day. Awkward...
type: Comment
comment on: http://stackoverflow.com/a/27154273

http://stackoverflow.com/comment/43010435
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27269410
has text: It seems the value attribute is being retrieved within the div element. I removed the duplicate ids and implemented sanki's change.

http://stackoverflow.com/comment/43071179
type: AnswerComment
comment on: http://stackoverflow.com/a/27304029
type: Comment
score: 0
has text: But the number of rows i have varies from situation to situation

http://stackoverflow.com/comment/42991220
comment on: http://stackoverflow.com/a/27258819
has text: By default ` ` elements _do_ submit a form. Assuming they are actually in a form. If the `type` attribute is not specified it defaults to `type="submit"`.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27307622
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Ok, let's say we have the font-size set at 1.2em /*CSS:*/ body{ font-size: 1.2em; } in JS if you test: console.log( document.body.style.fontSize ); // *(and empty string)* So you need to do like: var style = window.getComputedStyle(document.body, null); console.log( style.fontSize ); // "19.2px" bummer, but we expected em, right? For every browser sets the default font size to 16px (google it) you can retrieve any em value by simply dividing the px value that is returned by our getComputedStyle by 16. var style = window.getComputedStyle(document.body, null); // .fontSize = "19.2px" var currentFontSize_EM = parseFloat( style.fontSize ) / 16 // 1.2 document.body.style.fontSize = (currentFontSize_EM + fontChange) + "em"; that' s it.
answers question: http://stackoverflow.com/q/27307486

http://stackoverflow.com/q/27236251
type: Question
possible better answer: http://stackoverflow.com/a/27236348
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27236348
has answer: http://stackoverflow.com/a/27236339
has body: The problem here is that when the code runs, it gets to running the function newJob, then it tells me intelligence is undefined, I define it wheather colleageChoice == 5, or anything between 1 and 5, but it seems not to be defining it. If anyone could diagnose why it isn't being defined it would help tremendously. Thanks in advance! Please tell me if you need more info! Code needed to diagnose/fix problem: var transactionSubVar = 0 function transaction() { transactionSubVar = prompt("Here's a bank transaction. Put in a positive number to deposit, or a negative to withdrawl. if your deposit will give you a negative pocketMoney, the bank won't allow it.") transactionSubVar = parsefloat(transactionSubVar) if((pocketMoney - transactionSubVar) &lt; 0) { confirm("The bank won't allow this transaction, sorry.") } if((pocketMoney - transactionSubVar) &gt; 0) { bankMoney = bankMoney + (transactionSubVar - (transactionSubVar * 0.09)) pocketMoney = pocketMoney - (transactionSubVar - (transactionSubVar * 0.09)) } round() alert("Your bank Money is now $" +bankMoney +randomVariable3 +pocketMoney) } function parsefloat(number) { var numberNoCommas = number.replace(/,/g, ""); return parseFloat(numberNoCommas); } function random(high,low) { return Math.floor((Math.random()*((high + 1) - low)) + low) } var job = "Unemployed" function round() { bankMoney = Math.ceil(bankMoney * 100) / 100; pocketMoney = Math.ceil(pocketMoney * 100) / 100; } function intrest() { if(bankMoney &gt; 0) { positiveIncome(0) } if(bankMoney &lt; 0) { negativeIncome(0) } round() } function payDay() { bankMoney = bankMoney + (salary - (salary * 0.05)) intrest() propertyIncome() round() alert("You have been paid,and your bank account has been given intrest. your new bank balance is: $" +bankMoney) } payDay() transaction() function colleage() { var currentColleagePrice = random(300000,75000) alert("The current average price for colleage is: $" +currentColleagePrice +" Keep this in mind when choosing a colleage.")…
has comment: http://stackoverflow.com/comment/42949101
tagged with: javascript
has comment: http://stackoverflow.com/comment/42949149
has comment: http://stackoverflow.com/comment/42949187
score: 0
answer count: 2
tagged with: syntax-error
has title: Uncaught Syntax error: x is not defined
has comment: http://stackoverflow.com/comment/42949073
has comment: http://stackoverflow.com/comment/42949135
has comment: http://stackoverflow.com/comment/42949130
accepted answer: http://stackoverflow.com/a/27236339

http://stackoverflow.com/a/27201245
score: 0
has body: After looking at your fiddle on this PC and seeing it didn't work, I went on another machine and found it DID work. Both machines on same OS and version of IE. Turns out it was a problem with browser and after a reset to factory settings and a reboot the fiddle and my code work
type: Answer
answers question: http://stackoverflow.com/q/27196942

http://stackoverflow.com/comment/42859594
has text: Its because the DOM is not ready. try doing a angular.element(document).ready(function() { element.ribbon(); }); from inside your link function. That should work too. But if you want to update UI elements when the model changes, then use $timeout instead
comment on: http://stackoverflow.com/a/27186212
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27263360
has comment: http://stackoverflow.com/comment/42999227
upvote count: 0
has body: Simply declare the variable outside your function, like this: var url; then, when you update the variable in your function, its value will simply be updated, and it will be available other functions. var hello; function changeVar() { hello = 'hello'; } function displayVar() { alert(hello); } Change the variable to "hello" Display the variable's value
downvote count: 1
has comment: http://stackoverflow.com/comment/42999123
has comment: http://stackoverflow.com/comment/42999165
has comment: http://stackoverflow.com/comment/42999090
score: -1
answers question: http://stackoverflow.com/q/27263253
has comment: http://stackoverflow.com/comment/42999175
type: Answer

http://stackoverflow.com/comment/42805938
score: 1
comment on: http://stackoverflow.com/q/27155765
has text: Paste the code also in SO so we don't have to go to pastebin. SO also supports snippets.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27234057
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42945421
answers question: http://stackoverflow.com/q/27234005
has comment: http://stackoverflow.com/comment/42946974
has comment: http://stackoverflow.com/comment/42946441
has comment: http://stackoverflow.com/comment/42953197
has comment: http://stackoverflow.com/comment/42946476
has comment: http://stackoverflow.com/comment/42945363
downvote count: 0
has body: You should never hard-code URLs in MVC. Instead use @Url.Action. url: '@Url.Action("FunctionName", "ControllerName")', If this doesn't fix your problem tell us what kind of error(s) are you getting. Also, for the sake of your sanity, use the fail method. $.ajax("http://url") .done(function() { alert("success"); }) .fail(function() { alert("error"); }) One last note, success is deprecated as of jQuery 1.8; you should use done instead.
has comment: http://stackoverflow.com/comment/42945273

http://stackoverflow.com/comment/42996502
score: 1
comment on: http://stackoverflow.com/a/27261560
type: AnswerComment
type: Comment
has text: While maximizing flexibility, it looks like this would actually create a clone if you pass a jQuery object into this function: http://api.jquery.com/jquery/#cloning-jquery-objects (incurring a bit of performance hit)

http://stackoverflow.com/comment/42803610
type: Comment
has text: @NikunjDesai But could you explain what is the expected behaviour? What is the purpose of your jsfiddle?
comment on: http://stackoverflow.com/a/27154501
score: 0
type: AnswerComment

http://stackoverflow.com/q/27285796
type: Question
accepted answer: http://stackoverflow.com/a/27285842
has comment: http://stackoverflow.com/comment/43039107
possible better answer: http://stackoverflow.com/a/27285825
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27285825
has answer: http://stackoverflow.com/a/27285852
has body: How to update input type="text" value with var javascript onchange even ? http://jsfiddle.net/A4wxX/84/ First, Fill 10000.225 into input type="text" and then it's will be alert 10,000.23 (with my function auto ReplaceNumberWithCommas AND roundFloat) This is my question, i want to update input type="text" with var zzz (replace old value EG: replace 10000.225 with 10,000.23 ) , How can i do that ? &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function SetCard() { var number_var = document.getElementById("number").value; function ReplaceNumberWithCommas(yourNumber) { //Seperates the components of the number var components = yourNumber.toString().split("."); //Comma-fies the first part components [0] = components [0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); //Combines the two sections return components.join("."); } function roundFloat(num,dec){ var d = 1; for (var i=0; i&lt;dec; i++){ d += "0"; } return Math.round(num * d) / d; } var xxx = number_var; var yyy = Math.round(xxx * 100) / 100; var zzz = (ReplaceNumberWithCommas(yyy)); alert(zzz); } &lt;/script&gt; &lt;input type="text" id="number" onchange="SetCard()"&gt;
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has title: How to update input type="text" value with var javascript onchange even?
favorite count: 0
has answer: http://stackoverflow.com/a/27285842
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/43210746
type: Comment
type: QuestionComment
has text: I am using this one now: http://www.99points.info/2010/08/ajax-stylish-captcha-and-contact-form-using-jquery-and-php/
comment on: http://stackoverflow.com/q/27217778
score: 0

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/27191323
type: Tag

http://stackoverflow.com/a/27204689
accepted answer of: http://stackoverflow.com/q/27204336
type: AcceptedAnswer
upvote count: 1
type: Answer
has body: The error you're getting isn't related to Facebook. "request is not defined" means you're trying to do something with the variable request (call its .get() function in this case) but the variable request hasn't been set anywhere. Your tags indicate this is in Node. Do you have this line already? var request = require('request'); If not, add that before the code in your question. That loads the 'request' module you're trying to use.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27204336

http://stackoverflow.com/comment/42896588
comment on: http://stackoverflow.com/a/27207237
score: 0
type: AnswerComment
type: Comment
has text: @Alexander I'm sorry, I was wrong. I've removed that question.

http://stackoverflow.com/comment/127851957
comment on: http://stackoverflow.com/a/27190253
has text: The original question was how to do it with curl, not with HTTP library
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27220581
has body: Easy to accomplish with a loop, the number in i&lt;n let's you decide how often to log / how often to run the loop. // \/ make i incrementing with every loop for (var i = 0;i &lt; 20 ; i++){ // ^set var i ^set number of loop runs console.log('hello'); }
score: 3
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27220543
answers question: http://stackoverflow.com/q/27220543
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/34012324
has comment: http://stackoverflow.com/comment/61060933
downvote count: 0
has comment: http://stackoverflow.com/comment/61789634
type: Answer
upvote count: 114
has body: You can hack around the lack of colspan support by adding an "invisible" cell for every cell that's eliminated: Wide column Normal column Normal column Normal column DataTables doesn't complain, the table renders normally and sorting works (invisible columns sort as the empty string). I haven't tried this with rowspan.
has comment: http://stackoverflow.com/comment/60254724
has comment: http://stackoverflow.com/comment/135790474
answers question: http://stackoverflow.com/q/27290693
score: 114
has comment: http://stackoverflow.com/comment/100218920
has comment: http://stackoverflow.com/comment/61797451

http://stackoverflow.com/q/27180962
tagged with: django
type: Question
type: AnsweredQuestion
has body: I am new to django and know almost nothing of js. I am wondering what is the best way to integrate smileys to my app, preferably using jQuery. I have seen some Django smileys packages like this but they seem abandoned or quite outdated and did not work for me. So appreciate your hints.
has title: How to add smileys to django?
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27183249
accepted answer: http://stackoverflow.com/a/27183249
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27278972
has body: I have a ul that is set to display inline-block and list elements that are set to display inline block. The ul is set to have a width of auto so it shrinks if the container does (responsive). The list items are set to be auto width of their content which is set to whitespace nowrap and so if they dont all fit in a line they drop down to the next line. I am trying to detect with jQuery if this is happening. So I am getting the inner width (using width()) of the ul and the calculating the total width of each li by getting each outerWidth() and adding them together. Then I check if the total li width is greater than the inner width of the ul. But heres the problem, jQuery is returning a value of 933.6800003051758 for the nav's inner width and a value of 934 for the list items. So you'd think that the list items would be breaking onto a second line- but they aren't! So I suppose that the browser is rounding up the nav's innerwidth to be 934. What I'd like to know is, if I round up the nav's inner width before I compare the value to the total list items width will that be reliable or will my function sometimes think the list items are not breaking on to a second line when in fact they are?
answer count: 0
has comment: http://stackoverflow.com/comment/43030522
has comment: http://stackoverflow.com/comment/43029272
type: Question
tagged with: subpixel
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43027522
score: 0
has comment: http://stackoverflow.com/comment/43029682
has comment: http://stackoverflow.com/comment/43027087
has title: How to deal with sub-pixel jQuery.width() results
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/43027475

http://stackoverflow.com/comment/95444702
has text: To add a filename to the resulting file use: `fd.set('a', blobData, 'filename')`
type: AnswerComment
comment on: http://stackoverflow.com/a/48763919
type: Comment
score: 3

http://stackoverflow.com/comment/43011989
comment on: http://stackoverflow.com/a/27270304
type: AnswerComment
has text: Yes, you're absolutely right! I got it later while struggling with my problem.
type: Comment
score: 0

http://stackoverflow.com/comment/43013575
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27271581
has text: Okay, so I was on the right track then, you literally do have to figure out what dependencies are required by a plugin (docs are rarely forthcoming with this sort of information I find) and link to each in turn. I like the concatenation idea. I suppose that makes things much easier.

http://stackoverflow.com/q/27259115
tagged with: javascript
answer count: 1
has body: In underscore or pure javascript, is there a shorthand for _.each(data.data, function(user){ _.each(user.apilog, function(event){ //the stuff }) })
favorite count: 0
type: UnansweredQuestion
has title: Is there a shorthand to loop through all objects within objects with underscore?
tagged with: underscore.js
score: 0
has answer: http://stackoverflow.com/a/27259195
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/120228008
score: 0
comment on: http://stackoverflow.com/a/40889696
type: AnswerComment
type: Comment
has text: is it possible to save the Dom elements when removing the Layer?

http://stackoverflow.com/comment/43023686
score: 0
has text: everything defined on `window` is *global*. define it somewhere else to keep it out of global scope.
type: Comment
comment on: http://stackoverflow.com/q/27277412
type: QuestionComment

http://stackoverflow.com/comment/43049090
type: Comment
comment on: http://stackoverflow.com/a/27290889
type: AnswerComment
score: 0
has text: @Saswat I think my code is working fine .. what is the issue you have ,can you make sample in fiddle

http://stackoverflow.com/comment/42908990
has text: So if oneTuple is visible on screen and you add another to the list, then you don't want the list to scroll? Is it actually the cursor moving or is the page moving under the cursor so to speak?
type: Comment
comment on: http://stackoverflow.com/q/27206383
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43020787
comment on: http://stackoverflow.com/q/27275176
has text: The console shows `Uncaught SyntaxError: Unexpected token else `. [Learn how to debug JavaScript](https://developer.chrome.com/devtools/docs/javascript-debugging), Stack Overflow is not a debugging service.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/126072784
comment on: http://stackoverflow.com/q/27177661
has text: @Basj Yes, HTML applications. They're a windows only solution, because it uses windows built-in html rendering stack, so it loses some points there. But it gains points because its basically unrestricted in modifying files on your system. I don't think it can be launched from a browser tab or server easily, but because simply double-clicking it in explorer opens it, it should be fine I think. See [my example of an HTA](https://giansinghsarao.github.io/String-Encrypter/) if you're curious about it, but to be honest it doesn't really showcase any of the filesystem access stuff, just HTAs.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43044665
type: AnswerComment
has text: Thank you so much! i has been working on this problem for a WEEK!
type: Comment
comment on: http://stackoverflow.com/a/27288810
score: 0

http://stackoverflow.com/q/27182451
type: Question
has answer: http://stackoverflow.com/a/27182522
accepted answer: http://stackoverflow.com/a/27182549
tagged with: javascript
has body: My pop up form is working very well in JSFIDDLE, but not working in my server. The following code: I don't forget to put in : HTML: Register Login Login Form Username : password : CSS: #login-PopUp-box { display:none; } Lastly, Script is here: And here is JSFIDDLE. The code in both server and jsfiddle are totally the same. I tried to view source page in the browser, and the files for are staying there. But it's not working in my server. Am I missing something?
tagged with: jquery
has answer: http://stackoverflow.com/a/27182530
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27182530
tagged with: css
has title: PopUp Form failed but in JsFiddle, it works
has answer: http://stackoverflow.com/a/27182549
type: AnsweredQuestion

http://stackoverflow.com/comment/53927799
type: AnswerComment
comment on: http://stackoverflow.com/a/27278035
type: Comment
has text: I think we should pass to the woocommerce_add_to_cart_validation filter the $variation_id and $variation variables. (Reference: https://docs.woothemes.com/wc-apidocs/source-class-WC_Form_Handler.html#650)
score: 1

http://stackoverflow.com/comment/43012158
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27270926
has text: If I do that, and then call the function via console.log, I get the contents of the string object instead of blahblahblah being printed.

http://stackoverflow.com/a/27155077
has body: This is not possible. Try using a mixin pattern, or have a property of C inherit from B and another property inherit from A. Then access through these properties.
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27154991
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27154991

http://stackoverflow.com/comment/43037220
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27169045
has text: I guess you'd need to figure out the specific add on that is causing your routes to break. That way you'll know better what's happening and why it is. Do you know what particular add on is causing this?

http://stackoverflow.com/a/27222907
has comment: http://stackoverflow.com/comment/42933601
upvote count: 3
has comment: http://stackoverflow.com/comment/42924904
score: 3
has body: A DOM element contains circular references and you can't call JSON.stringify() on any object that contains circular references or contains objects with circular references. For example, it contains .parentNode which then contains .childNodes which then points right back to the same element. As soon as JSON.stringify() detects such a circular reference, it stops because it can't record all the properties. Basically, you can't stringify a DOM node or a list of DOM nodes. Perhaps if you help us understand what problem you're really trying to solve, we can help with an alternative way of doing this. For example, maybe all you need to save it the img.src property in order to save these images.
answers question: http://stackoverflow.com/q/27222809
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27222809
type: Answer

http://stackoverflow.com/a/27156667
answers question: http://stackoverflow.com/q/27156623
downvote count: 0
has comment: http://stackoverflow.com/comment/42807722
type: Answer
has body: If I understand correctly, your issue is you're adding event listeners to elements that don't exist yet. You have to add the .cls2 listeners after those elements are created by your ajax call. Something like this (converted form Coffeescript, sorry): $.ajax("path/to/call", { success: (function(_this) { return function() { return _this.addItems; }; })(this) }); ({ addItems: function() { // add new items &amp; listeners here } }); Alternately, and better I think, is to use event delegation, like this: $( "parent_selector" ).on( "click", ".cls2", function( event ) { event.preventDefault(); console.log( "clicked!" ); });
has comment: http://stackoverflow.com/comment/42807731
upvote count: 2
score: 2

http://stackoverflow.com/q/27199946
tagged with: php
score: 2
downvote count: 0
has title: Angular trigger a download on api response with filename
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/33672384
answer count: 2
has body: I am using angular and laravel. on a post request PHP creates a file and responds with the filename. How to use that filename and trigger download from angular. api request var promise = $http.post('api/admin/ecs/singleecs', data). success(function (response) { //trigger file download }) php PDF::loadHTML($html)-&gt;setPaper('a4')-&gt;setWarnings(false)-&gt;save('public/temp/'.$filename.'.pdf'); return $filename;
has answer: http://stackoverflow.com/a/27203112
tagged with: javascript
linked to: http://stackoverflow.com/q/11620698
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/27259109
answers question: http://stackoverflow.com/q/27258448
has body: Well the best way to solve the problem would be to invert how you are putting the messages into the box (newest at top) but if you want them at the bottom. var chatBox = document.getElementById("chatdisplay"); chatBox.scrollTop = chatBox.scrollHeight; Should do it. http://www.w3schools.com/jsref/prop_element_scrolltop.asp For more info on the Dom property *Kris beat me to it
has comment: http://stackoverflow.com/comment/43001569
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43001024

http://stackoverflow.com/q/27289240
type: UnansweredQuestion
tagged with: socket.io
type: Question
has answer: http://stackoverflow.com/a/39919302
score: 0
answer count: 2
has title: TypeError: Object #<Socket> has no method 'set'
tagged with: javascript
has answer: http://stackoverflow.com/a/27289297
has body: hi i'm trying to make a collaborative canvas with socket.io, this is my server side code var sanitizer = require('validator').sanitize; var app = require('express')(); var server = require('http').createServer(app); var io = require('socket.io')(server), chat = io.of('/chat'), canvas = io.of('/canvas') ; function sanitize(string) { return sanitizer(string).entityDecode() } app.get(/(^\/.*$)/, function(request, response) { var fileName = request.params[0]; if (fileName == '/') fileName = '/index.html'; response.sendFile(__dirname + '/client' + fileName); }); io.sockets.on('connection', function(socket) { socket.on('setName', function (name) { name = sanitize(name); socket.set('name', name); socket.broadcast.emit('receive', { sender:'Server', message:name + ' has joined.' }) }); socket.on('send', function (message) { socket.get('name', function(error, name) { if (name) socket.broadcast.emit('receive', { sender:name, message:sanitize(message) }) }) }); socket.on('draw', function (command) { io.sockets.emit('draw', command) }); socket.on('updateCursor', function(position) { socket.get('name', function(error, name) { if (name) socket.broadcast.emit('updateCursor', { name:name, position:position }); }); }); socket.on('disconnect', function() { socket.get('name', function(error, name) { if (name) { socket.broadcast.emit('receive', { sender:'Server', message:name + ' has left.' }); socket.broadcast.emit('removeCursor', name); } }) }); }); server.listen(3000, function(){ console.log('listening on *:3000'); }); but when i try to run it on localhost:3000 my console log said this C:\h&gt;node server.js listening on *:3000 events.js:72 throw er; // Unhandled 'error' event ^ TypeError: Object #&lt;Socket&gt; has no method 'set' at Socket.&lt;anonymous&gt; (C:\h\server.js:26:16) at Socket.emit (events.js:95:17) at Socket.onevent (C:\h\node_modules\socket.io\lib\socket.js:327:8) at Socket.onpacket (C:\h\node_modules\socket.io\lib\socket.js:287:12) at Client.ondecoded (C:\h\node_mod…
tagged with: node.js

http://stackoverflow.com/q/27302878
has answer: http://stackoverflow.com/a/27303255
tagged with: addition
type: Question
tagged with: javascript
score: 0
answer count: 3
tagged with: intervals
has title: Adding 1 every second to a certain variable
has answer: http://stackoverflow.com/a/27302927
has body: I just want to add 1 to a certain variable every second while the program is running. So basically it kind of performs something like x++ every second. I see many setIntervals but they use var which is not working. I'm new to Java so please bear with me.
has comment: http://stackoverflow.com/comment/43069611
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43068910
has answer: http://stackoverflow.com/a/27303522

http://stackoverflow.com/a/27197570
answers question: http://stackoverflow.com/q/27197102
has body: This is working partially for me: var addedFiles = 0; var uploadedFiles = 0; $('#uploadFile').fileupload({ replaceFileInput: false, singleFileUploads: true, autoUpload: false, add: function (e, data) { $.each(data.files, function (index, file) { data.url = 'my_url'; data.type = 'POST'; data.submit(); addedFiles += 1; }); }, done: function (e, data) { uploadedFiles += 1; if (addedFiles === uploadedFiles) { alert("Done"); addedFiles = 0; uploadedFiles = 0; } } });
score: 0
type: Answer

http://stackoverflow.com/q/27284400
answer count: 1
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/27286545
has comment: http://stackoverflow.com/comment/43039136
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/43038799
has body: I am trying to create a Chrome extension that creates a button like a normal one that displays a custom page I made (this has already been done and works on my extension) but the next thing I wish to do, and I am not sure how to implement, is to inject markup into a specific webpage... Here is my manifest.json: { "manifest_version": 2, "name": "BattleNetwork", "description": "Your onestop BattleNetwork info center!", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "http://robloxdatabase.x10.bz/" ] } Pretty standard. I know about the "Content Scripts" (https://developer.chrome.com/extensions/content_scripts) however, I am not sure if those will work for what I want, I wish to inject the following HTML: Battle Network See All Battlenetwork Hub by Battlenetwork ...at the top of a division with id="GamesListsContainer" on the website "http://www.roblox.com/games/" Is this possible? Any advice? Again, this is in a Chrome extension, I have the popup.html and stuff.
has comment: http://stackoverflow.com/comment/43039768
favorite count: 0
has comment: http://stackoverflow.com/comment/43039094
has comment: http://stackoverflow.com/comment/43038694
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43040161
has title: Can HTML markup be added to a website using a chrome extension?
tagged with: roblox
has comment: http://stackoverflow.com/comment/43038765
tagged with: google-chrome
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/43039355
has comment: http://stackoverflow.com/comment/43038301

http://stackoverflow.com/comment/43038343
has text: not clear what the problem is. create a demo in jsfiddle.net that replicates your issue
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27284905
score: 0

http://stackoverflow.com/a/27234722
type: AcceptedAnswer
downvote count: 0
has body: That's a nice effect. Here's one way to do it. Put each image in a fixed position div, which takes up the entire viewport (initially) and has overflow:hidden. Set each div's z-index to be higher than the next div's. As the window scrolls, adjust the height of the divs as a function of the window height times the div's position (index) in the DOM, minus the window's scrollTop: $(window).scroll(function() { $('.D').each(function(index) { $(this).css({ height: $(window).height()*(index+1) - $(window).scrollTop() }); }); }); Additional content will need a higher z-index than the image divs. And note that z-index works with positioned elements only. Fiddle
has comment: http://stackoverflow.com/comment/42975579
accepted answer of: http://stackoverflow.com/q/27233147
type: Answer
answers question: http://stackoverflow.com/q/27233147
score: 2
has comment: http://stackoverflow.com/comment/42946542
upvote count: 2
has comment: http://stackoverflow.com/comment/42946715
has comment: http://stackoverflow.com/comment/42978509

http://stackoverflow.com/comment/42955056
comment on: http://stackoverflow.com/a/27230463
type: Comment
score: 0
type: AnswerComment
has text: I update the code to use the DocumentCompleted event rather than the Navigated event...

http://stackoverflow.com/comment/42818145
has text: I got this from my WAMP server log file: 27-Nov-2014 04:12:21 Europe/Paris] PHP Fatal error: Call to a member function fetch_assoc() on a non-object in C:\Program Files (x86)\wamp\www\WSFinal\public_html\submitName.php on line 27 [27-Nov-2014 04:12:21 Europe/Paris] PHP Stack trace: [27-Nov-2014 04:12:21 Europe/Paris] PHP 1. {main}() C:\Program Files (x86)\wamp\www\WSFinal\public_html\submitName.php:0
type: Comment
comment on: http://stackoverflow.com/a/27161981
score: 0
type: AnswerComment

http://stackoverflow.com/a/27191358
downvote count: 0
score: 24
has body: Credit to @Ultimater in the comments for the suggested change to prevent an infinite requesting loop.
has comment: http://stackoverflow.com/comment/137044328
has comment: http://stackoverflow.com/comment/109564257
type: AcceptedAnswer
upvote count: 24
answers question: http://stackoverflow.com/q/27191267
has comment: http://stackoverflow.com/comment/84098188
has comment: http://stackoverflow.com/comment/66089940
accepted answer of: http://stackoverflow.com/q/27191267
type: Answer
has comment: http://stackoverflow.com/comment/109539717

http://stackoverflow.com/a/27178459
has body: Since I am unable to comment, I will just post this as an answer. I tried recreating this issue using the provided code in Chrome and Firefox and it seems to work just fine. Since the map-canvas has a height and width and it's parent has a fixed height as well, I don't see why this could be happening. It could also just be a network issue. Works fine on JSbin as well: Link: http://jsbin.com/moqeyumane
has comment: http://stackoverflow.com/comment/42846761
score: 0
has comment: http://stackoverflow.com/comment/42854629
has comment: http://stackoverflow.com/comment/42887169
type: Answer
answers question: http://stackoverflow.com/q/27178268

http://stackoverflow.com/comment/43104867
type: Comment
type: QuestionComment
has text: @LarsKotthoff ya, i ran though all the different ideas in that question. some pretty creative stuff, but no luck.
score: 0
comment on: http://stackoverflow.com/q/27284421

http://stackoverflow.com/comment/42804781
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27155192
has text: is you want to use the `indexOf` method you actually need to compare against -1 `[1,5].indexOf(randomNumber) > -1` (`[1,5].indexOf(1)` => `0`, which is falsy)
type: AnswerComment

http://stackoverflow.com/a/27238774
upvote count: 1
has comment: http://stackoverflow.com/comment/43039785
accepted answer of: http://stackoverflow.com/q/27238328
answers question: http://stackoverflow.com/q/27238328
has comment: http://stackoverflow.com/comment/43029271
type: AcceptedAnswer
downvote count: 0
has body: I just added a jQuery "each" loop to re placerholder, name, and value each input field every time a remove link is clicked. When using each the value passed to the function is the index of item in the loop's current iteration, I used the variable elm. Since each input field is classed with camerasCounter, you can use $(this) to easily call the input element in the loop. Each is a very useful part of jQuery, if you ask me. http://jsfiddle.net/v76zn30o/2/ The HTML + Add Camera and The jQuery $(document).ready(function() { var max_fields = 32; //maximum input boxes allowed var wrapper = $(".cameras"); //Fields wrapper var add_button = $(".add-camera"); //Add button ID var x = 1; //initlal text box count $(add_button).click(function(e){ //on add input button click e.preventDefault(); if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).append(' Remove '); //add input box } }); $(wrapper).on("click",".remove-camera", function(e){ //user click on remove text e.preventDefault(); $(this).parent('div').remove(); $(".camerasCounter").each(function(elm){ x = elm + 1 $(this).attr({ "placeholder": "Camera " + x, "name": "Camera " + x, "value": "Camera " + x }); }); }); });
type: Answer
score: 1

http://stackoverflow.com/comment/42820128
score: 0
comment on: http://stackoverflow.com/q/27162217
type: QuestionComment
type: Comment
has text: Hi Dave Walker, if the content is less ?

http://stackoverflow.com/q/27198316
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has body: The client wants a form in which entered numbers behave like Excel in certain ways. In particular, the data saved and the data displayed can be different, as it can in Excel. For example, the data saved could be 32425.537342 and the data displayed could be $32,425.54. The approach we have taken to accomplish this is by using input pairs, one of type='text' and one of type='number'. The number input, which is by default hidden, stores the data to be sent and the text input displays it to the user. The number input is only displayed when the corresponding text input is focused, at which time such text input is hidden. This following code behaves as expected in Chrome. HTML: &lt;input type="text"&gt; &lt;input type="number"&gt; &lt;br&gt; &lt;input type="text"&gt; &lt;input type="number"&gt; jQuery: $(document).ready(function(){ $("[type='number']").hide(); $("[type='text']").on("focus",function(){ $(this).next().show().focus(); $(this).hide(); }); $("[type='number']").on('blur',function(){ $(this).prev().show(); $(this).hide(); }); }); Fiddle. However, in Firefox (version 33.1.1) for Mac OS, the same is not working at all. When the text input is focused on, it disappears completely, without the number input ever being displayed. In trying to ascertain where the problem is, I cut the code back to this: $(document).ready(function(){ $("[type='number']").hide(); $("[type='text']").on("focus",function(){ $(this).next().show().focus(); $(this).hide(); }); }); Fiddle. This actually works as expected in both Chrome and Firefox; on focus, the text input is permanently hidden and the number input is permanently displayed. So it seems that the issue is in the second half of the code. If you take out the $(this).hide();, the code behaves consistently in Chrome and Firefox (although not in a way that's particularly useful): $(document).ready(function(){ $("[type='number']").hide(); $("[type='text']").on("focus",function(){ $(this).next().show().focus(); $(this).hide(); }); $("[ty…
has title: jQuery's .on blur function executes incorrectly in Firefox
type: AnsweredQuestion
score: 2
linked to: http://stackoverflow.com/q/27181708
linked to: http://stackoverflow.com/q/24635536
accepted answer: http://stackoverflow.com/a/27198317
upvote count: 2
type: Question
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/58732441
has answer: http://stackoverflow.com/a/27198317

http://stackoverflow.com/a/27162641
score: 1
upvote count: 1
has body: I am using following solution in my projects: Define a global controller and react to the state change event: //GLOBAL controller angular.module("app.controllers").controller("GlobalController", ["$rootScope", "$state", //Check state authentication $rootScope.$on("$stateChangeStart", function(event, toState) { if (toState.data.public === false &amp;&amp; !($rootScope.user)) { event.preventDefault(); $state.go("login"); } }); } ]); In each state, use custom data attribute data.public to prevent unauthorized access: angular.module("app").config(["$stateProvider", function($stateProvider){ $stateProvider.state("login", { url: "/login", templateUrl: "loginTpl.html", controller: "LoginCtrl", data: { public: true } }); }]); At a successful login, set $rootScope.user to the corresponding user object! Edit: For your specific use case, you can use url params (checkout?sender=cart) to solve the problem. In your checkout controller use following: if($stateParams.sender == "cart") //ok }else{ $state.go("cart"); } In the button of your cart: ui-sref="checkout({sender: 'cart'})"
downvote count: 0
answers question: http://stackoverflow.com/q/27162072
type: Answer

http://stackoverflow.com/a/27198909
upvote count: 1
has comment: http://stackoverflow.com/comment/42882118
has comment: http://stackoverflow.com/comment/42884256
downvote count: 0
answers question: http://stackoverflow.com/q/27198819
type: Answer
score: 1
has body: With any modern browser you could write getJSONP('https://steamgaug.es/api&amp;format=js&amp;callback=?', function(data) { data = JSON.parse(data); var firstValue = !data.ISteamClient; var secondValue = !data.ISteamFriends; ... });

http://stackoverflow.com/comment/42942792
comment on: http://stackoverflow.com/q/27233048
type: Comment
type: QuestionComment
has text: $eName is not an array. I get a single name from my database. such as: "VIP", "8 Ball". Not sure I understand the global PHP scope question, I'll read on it.
score: 0

http://stackoverflow.com/comment/42960824
type: Comment
has text: why -1 for this ans??
comment on: http://stackoverflow.com/a/27242385
score: 2
type: AnswerComment

http://stackoverflow.com/comment/42984528
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27254192
has text: @Paul I know, thus a comment and not an answer. I think we can agree it's bad form though

http://stackoverflow.com/a/27165380
answers question: http://stackoverflow.com/q/27165101
has comment: http://stackoverflow.com/comment/42823959
has body: Object.keys is probably what you are looking for. response = $.post(YOUR_AJAX_PAAGE) aColumns = [{ sTitle: "Week"}, { sTitle: "Winkelformule" }]; registerredKeys = []; for(i = 0; i&lt;response.length; i++){ keycolumns = Object.keys(response[i]); //Get keys of each object for(j = 0; j &lt; keycolumns.length; j++){ if($.inArray({sTitle: keycolumns[j]},registerredKeys)&lt;=0){ aColumns.push({sTitle: keycolumns[j]}) //Checks if registerredKeys.push( keycolumns[j]); } } } Then render aColumns. Solves problem a. For problem b you probably need to craft your json response so that you can get all keys before hand otherwise you'd end up initializing thead over and overagain because you don't know all the data. You could keep a running list to see if new columns have been registered. (make PreviousKeys public and run this after the above piece of code. if(Object.toJson(registerredKeys) === PreviousKeys){ //Ignore }else{ PreviousKeys = Object.toJson(registerredKeys) //Render new thead }
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42826587
has comment: http://stackoverflow.com/comment/42823808
accepted answer of: http://stackoverflow.com/q/27165101
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42949149
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27236251
has text: Don't forget to not use var when set it inside a function.

http://stackoverflow.com/comment/42875769
score: 0
type: Comment
type: QuestionComment
has text: So if I understand correctly, you want Javascript to remove the row containing the anchor "incompatibilidades"?
comment on: http://stackoverflow.com/q/27195281

http://stackoverflow.com/comment/43065998
type: AnswerComment
type: Comment
has text: Thanks, I ended up using a backwards class. However, even with your new code, it doesn't trigger when it goes from the first slide to the third. The third acts as the previous when on the first one, if you understand the logic in it
comment on: http://stackoverflow.com/a/27297605
score: 0

http://stackoverflow.com/q/27223088
downvote count: 1
has body: url = "https://example.com/"; casper.start(url, function () { this.echo('url: ' + url); this.echo('myCloud requested...'); this.echo('Page title: ' + this.getTitle()); }); casper.then(function () { this.echo('Clicking submit button...'); this.click('input#SubmitButton'); ... When I request portalUrl ("https://example.com/") in a normal browser it redirects to ADFS Login page "ADFSloginUrl", but using CasperJS it cannot access login page of ADFS. In above code requested page not loaded. So 'this.getTitle()' is empty and cannot access submit button from CasperJS. When accessing submit button it gives following error: "Message: CasperError: Cannot dispatch mousedown event on nonexistent selector: input#SubmitButton" Does this have anything to do with casper.start?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/28659048
has comment: http://stackoverflow.com/comment/42930343
tagged with: javascript
has answer: http://stackoverflow.com/a/27246686
favorite count: 0
tagged with: casperjs
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42930353
tagged with: phantomjs
score: 1
has title: CasperJS' start is not working when there should have been a redirect

replace
tags question: http://stackoverflow.com/q/27275214
tags question: http://stackoverflow.com/q/27203383
tags question: http://stackoverflow.com/q/27211304
type: Tag
tags question: http://stackoverflow.com/q/27158329
tag name: replace
tags question: http://stackoverflow.com/q/27174130

http://stackoverflow.com/comment/42961044
has text: Because html string in a variable, not in brower document, I just can get it by `find`. @Aditya
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27242438

http://stackoverflow.com/a/27180417
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27177898
type: Answer
upvote count: 1
has body: so this is suffering from a security mechanism called Cross Origin Scripting. The issue here is that the service you are calling from has not given permission for you to call that resource in an ajax call. To read more look at http://en.wikipedia.org/wiki/Cross-origin_resource_sharing To prove this is happening look at the JS Fiddle : http://jsfiddle.net/dgohczvf/1/ You can see in the console: (index):1 XMLHttpRequest cannot load http://api.wolframalpha.com/v2/query?appid=77P9PL-2QAWEY86WV&amp;input=2x&amp;format=image,plaintext. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://fiddle.jshell.net' is therefore not allowed access. Another answer here suggested that you need to call this server to server: Wolfram API javascript cross origin sharing issue
score: 1
answers question: http://stackoverflow.com/q/27177898

http://stackoverflow.com/q/27203580
linked to: http://stackoverflow.com/q/24199942
tagged with: javascript
has comment: http://stackoverflow.com/comment/42890203
linked to: http://stackoverflow.com/q/26092517
score: 0
has body: After having manually created a record within an object named "Cards" in parse.com with an objectId of 9e9JAIYSFa, I am attempting to retrieve attributes (attack and defense) of this record by closely following the documentation. alert("1"); var Cards = Parse.Object.extend("Cards"); alert("2"); var cards = new Cards(); alert("3"); var query = new Parse.Query(cards); alert("4"); query.get("9e9JAIYSFa", { success: function (cards) { alert("5"); }, error: function (object, error) { alert("6") } }); alert("7") var attack = cards.get("attack"); var defense = cards.get("defense"); alert("8"); alert(attack); alert(defense); alert("9"); This returns the error in chrome: Uncaught TypeError: Cannot read property 'className' of undefined which is pointing to line 3 of the parse-1.3.2.min.js file. A point worth noting is that only alerts 1, 2 and 3 are displayed. After looking at these questions: Parse - Uncaught TypeError: Cannot read property 'get' of undefined Uncaught TypeError: Cannot read property 'get' of undefined - How do I solve this? how can i update current object in parse.com with javascript? I tried accessing the objectId manually using this code: query.equalTo("objectId", "9e9JAIYSFa"); query.find({ success: function (cards) { alert("Working"); }, error: function (object, error) { alert("Not working"); } }); But this also results in the same error. Any ideas?
has title: Parse.com Uncaught TypeError: Cannot read property 'className' of undefined JavaScript
answer count: 1
linked to: http://stackoverflow.com/q/13251955
accepted answer: http://stackoverflow.com/a/27203949
tagged with: parse-platform
has answer: http://stackoverflow.com/a/27203949
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42890325
type: Question

http://stackoverflow.com/q/27268321
type: Question
tagged with: angularjs-directive
answer count: 2
possible better answer: http://stackoverflow.com/a/27268914
has answer: http://stackoverflow.com/a/27269139
accepted answer: http://stackoverflow.com/a/27269139
tagged with: javascript
has answer: http://stackoverflow.com/a/27268914
has title: Angular Directives how to use for repeating data
upvote count: 1
favorite count: 0
has body: So I am doing a webservice call returning address data i.e. Address Line 1-10 twice. My view looks something like this : {{ address.address.addressLine1}} {{ address.address.addressLine2}} {{ address.address.addressLine3}} {{ address.address.addressLine4}} {{ address.address.addressLine5}} {{ address.address.addressLine6}} {{ address.address.addressLine7}} {{ address.address.addressLine8}} {{ address.address.addressLine9}} {{ address.OtherAddress.addressLine1}} {{ address.OtherAddress.addressLine2}} {{ address.OtherAddress.addressLine3}} {{ address.OtherAddress.addressLine4}} {{ address.OtherAddress.addressLine5}} {{ address.OtherAddress.addressLine6}} {{ address.OtherAddress.addressLine7}} {{ address.OtherAddress.addressLine8}} {{ address.OtherAddress.addressLine9}} And this works fine, but doesn't seem very angular, should I be creating a directive to handle this which maybe could work for both lists ?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43007625
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/27222924
answer count: 0
has body: SO I am back with another question this time. After solving the parsing issue I had. I cant seem to upload my datbase with my sql statement which some how looks very wrong to me. I have search the net for 5 days but to no avail. I want to update the database table. Using the where clause. And the where clause will use the selected Value from the drop down list. Here are my codings: Edit.php Kinder App - Edit Kinder App Edit Drag and Drop to upload WARNING: uploading files with the same file name will oveerwrite the uploaded one. Module ID: "; <?php define("DB_USER", "root"); define("DB_PASSWORD", ""); define("DB_HOST", "localhost"); define("DB_NAME", "kp2admin"); //echo ' '; $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $result = mysqli_query($dbc, "SELECT Module_ID FROM module ORDER BY Module_ID"); if ($result != null) { echo ' Select '; $num_results = mysqli_num_rows($result); for ($i=0; $i<$num_results; $i++) { $row = mysqli_fetch_array($result); $mId = $row['Module_ID']; echo ' ' .$mId. ' '; } //echo ' '; } mysqli_close($dbc); ?> Module Name: Description: Icon: Version: Location: See all files Copyright © All Rights Reserved edit_file.php: Kinder App Login - Administrator Kinder App Kinder App - Add Details <?php $ds = DIRECTORY_SEPARATOR; //1 $storeFolder = 'uploads'; //2 if (!empty($_FILES)) { $tempFile = $_FILES['file']['tmp_name']; //3 $targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds; //4 $targetFile = $targetPath. $_FILES['file']['name']; //5 move_uploaded_file($tempFile,$targetFile); //6 } define ("DB_USER", "root"); define ("DB_PASSWORD", ""); define ("DB_HOST", "localhost"); define ("DB_NAME", "kp2admin"); $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $moduleId=$_POST["mID"]; $moduleName=$_POST["mName"]; $description=$_POST["mDesc"]; $icon=$_POST["icon"]; $version=$_POST["mVersion"]; $location=$_POST["mLocate"]; $sql = "UPDATE module SET 'Module_Name' = '".$moduleName."', 'Description' = '".$description."', 'I…
tagged with: mysql
type: Question
has title: How to use dropdownlist selected value in Where clause of Update statement?
has comment: http://stackoverflow.com/comment/42926960
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42959095
has comment: http://stackoverflow.com/comment/42959017
has comment: http://stackoverflow.com/comment/42959329
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42959496
tagged with: php
has comment: http://stackoverflow.com/comment/42959355

http://stackoverflow.com/comment/42901345
has text: $interval is by far the best solution. You don't need a for loop for one you just call it. If you want to limit the number of iterations then that's the third argument. E.g. $interval(someMethod, 1000, 10)
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27209744

http://stackoverflow.com/comment/42878930
type: AnswerComment
comment on: http://stackoverflow.com/a/27196587
type: Comment
has text: Many thanks C Bauer this has finally sorted my issue. I will award you the bounty in 22 hours time when SO will allow me! Again many thanks!.
score: 0

http://stackoverflow.com/comment/43057436
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27291535
type: Comment
has text: if it's a long running animation it could be due to JS GC. could you add a fiddle with a demo?

http://stackoverflow.com/q/27291544
linked to: http://stackoverflow.com/q/7102299
type: Question
has answer: http://stackoverflow.com/a/27317377
has title: Spring Tool STS 3.6.2 hangs on working with javascript file
tagged with: spring-tool-suite
tagged with: javascript
has body: I am EE developer, apprentice with Spring platform. Nowadays, I try to use Restful services as controller on my web project with angularjs which exists on frontend. Env: Win8.1, I5, 8GB Ram I use STS 3.6.2 at my maven project. I can work on java files without any problem, but if i edit something or insert only space and save, scroll down-up etc. i mean on any action on java script files, IDE is starting to consume extremely memory and CPU resource, even though server or grunt watch does not work. In a couple minute, just becomes to impossible to continue working. I tried everyting whatever i found on net including this question . There is 32 GB free storage on disk where located the sts_bundle folder. I turned off validation, auto build etc., nothing changes. Additionally, -i dont know if any related with this issue- some js files(especially in placeholders folder) seem to be sometimes under vendor folder have some build errors that i can not understand why, because they are vendor js libraries which are ebsolutely not modified untill maven update. Here is my screenshot: Here is log file that belogs to today which is under .metadata/.log: !ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2014-12-04 09:41:33.714 !MESSAGE Connection to http://dist.springsource.com/release/STS/doc/updates.xml failed on dist.springsource.com. Retry attempt 0 started !STACK 0 java.net.UnknownHostException: dist.springsource.com at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source) at java.net.InetAddress.getAddressesFromNameService(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278) at org.…
tagged with: eclipse
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27317377
tagged with: angularjs
tagged with: spring
linked to: http://stackoverflow.com/q/2727040
type: AnsweredQuestion

http://stackoverflow.com/a/27220090
has comment: http://stackoverflow.com/comment/42919778
has comment: http://stackoverflow.com/comment/42919918
type: Answer
accepted answer of: http://stackoverflow.com/q/27219964
answers question: http://stackoverflow.com/q/27219964
has comment: http://stackoverflow.com/comment/42919881
downvote count: 0
has comment: http://stackoverflow.com/comment/42920329
has body: You need to concat your data, not replace it each time: dynamodb.listTables(params, function (err, data) { if (data.LastEvaluatedTableName) { data.concat(module.exports.ListTables(data.LastEvaluatedTableName)); } callback(err, data); }); UPDATE Based on the info from the comment, sounds like you need something like this: module.exports.ListTables = function (start, callback, totalData) { var params; if (start) { params = { "ExclusiveStartTableName": start }; } if (!totalData) { totalData = []; } dynamodb.listTables(params, function (err, data) { totalData = totalData.concat(data.TableNames); if (data.LastEvaluatedTableName) { module.exports.ListTables(data.LastEvaluatedTableName, callback, totalData); } else { callback(err, totalData); } }); }
score: 1
has comment: http://stackoverflow.com/comment/42920140
has comment: http://stackoverflow.com/comment/42920320
upvote count: 1
has comment: http://stackoverflow.com/comment/42919803
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42919838

http://stackoverflow.com/comment/43079426
type: QuestionComment
comment on: http://stackoverflow.com/q/27308773
has text: don't forget to wrap your jquery code inside `$(document).ready(function(){//Your Jquery Code//});`
score: 0
type: Comment

http://stackoverflow.com/comment/43164060
type: Comment
comment on: http://stackoverflow.com/a/27306153
has text: Thanks, this solved the problem. Just a note to the note: I do not need to substract 1, because "preview_1" matches to imgURL[1] in my case. So this worked well in the code of my example.
score: 1
type: AnswerComment

http://stackoverflow.com/a/27265599
answers question: http://stackoverflow.com/q/27265066
type: Answer
has body: I have 3 files: 1-Javascript 2-ADMIN.php 3-Class.php (where I store my functions) In java script I use AJAX and JSON and allways send a objectEvent (ObjEvn) to ADMIN.php: //Your javaScript code $(document).on("event", "#idElement", function(){ //Data you want to send to php evaluate var dt={ ObjEvn:"btn_Login",//This is the controller to ADMIN.php dataJsToPHP: $("#txt_EmailLogin").val(), asManyasYouWant: use jQuery to grab values.... }; //Ajax var request =$.ajax({//http://api.jquery.com/jQuery.ajax/ url: "ADMIN.php", type: "POST", data: dt, dataType: "json" }); //Ajax Done catch JSON from PHP request.done(function(dataset){ for (var index in dataset){ dataPHPtoJsJS=dataset[index].dataPHPtoJs; asManyasYouWantJS=dataset[index].asYouWant; } //JavaScript conditions. Here you can control the behaivior of your //html object, based on your PHP response if(dataPHPtoJsJS){ $( "#idYourHtmlElement" ).removeClass( "class1" ) $( "#idYourHtmlElement" ).addClass( "class2" ) } }); //Ajax Fail request.fail(function(jqXHR, textStatus) { alert("Request failed: " + textStatus); }); } Now in ADMIN.php $ObjEvn=$_POST["ObjEvn"];//Call this before all test $asManyasYouWant = $_POST["asManyasYouWant "]; if($ObjEvn==="btn_Login"){ $login=$_POST["login"]; $passwd=$_POST["passwd"]; //call your function to test login in class.php //finally, at the end, return your result to jquery. It could be another jquery code to //be loaded dynamiclly, it could be a html tag, it could be a value... it could be almost //everyting.. $arrToJSON = array( "dataPHPtoJs"=>"yourData", "asYouWant"=>" soemting " ); return json_encode(array($arrToJSON)); } elseif($ObjEvn==="btn_NewUser"){ //retrieve anoter values //and call your functions to create new user //finally, at the end, return your result to jquery. It could be another jquery code to //be loaded dynamiclly, it could be a html tag, it could be a value... it could be almost //everyting.. $arrToJSON = array( "dataPHPtoJs"=>"yourData", "asYouWant"=>" soemting "…
score: 0

http://stackoverflow.com/comment/42860980
has text: No problem - glad to have helped :)
score: 0
comment on: http://stackoverflow.com/q/27169537
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42965773
score: 0
has text: but how i can I get the data from the query?? I want it because i want to use it to these code echo "$('#region').val('" . $rowOne['category_name'] . "');";
type: Comment
comment on: http://stackoverflow.com/a/27245204
type: AnswerComment

http://stackoverflow.com/a/27304734
downvote count: 0
answers question: http://stackoverflow.com/q/27304704
has comment: http://stackoverflow.com/comment/43073158
has body: Change ng-style="{'border-right-color':[currentData.colorCode]}"&gt; to ng-style="{'border-right-color':'{{currentData.colorCode}}'}"&gt; Demo : http://jsfiddle.net/aykw1ufe/
type: Answer
score: 1
upvote count: 1

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/27177485
tags question: http://stackoverflow.com/q/27194448
tags question: http://stackoverflow.com/q/27156841

http://stackoverflow.com/comment/42955651
score: 0
type: Comment
type: QuestionComment
has text: Given that the conditions are (intended to be) exclusive, consider using `else`.
comment on: http://stackoverflow.com/q/27239287

http://stackoverflow.com/a/27174376
has comment: http://stackoverflow.com/comment/42886890
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42898525
accepted answer of: http://stackoverflow.com/q/27158580
downvote count: 0
answers question: http://stackoverflow.com/q/27158580
has comment: http://stackoverflow.com/comment/42878094
score: 1
has body: The first step would be extending the engage (mousedown) function because the way you have it now only works for a single functionality (putPoint). Then, you need to set a different event handler for mousemove for the same reason. Your app needs to have states, like free drawing, rectangle, triangle, etc. The engage function first needs to read the current state (you can store the state in a variable), so if it's free drawing, it would work just as it works now, but if it is, for example, rectangle, then it would call a different function that you use for drawing rectangles. You can go different ways about the implementation: you can simply click on the starting coordinates and click another time on the ending coordinates. Or you can start drawing the rectangle on mousedown and finish drawing it on mouseup. Both approaches still use 2 parameters: starting coordinates and ending coordinates. With triangles it's a bit different since you obviously can't use the second approach from above (holding the mouse down while creating it) because the triangle requires three parameters (three dots). UPDATE And here is a super simple example of rectangle drawing using the mouse-down method I described above. http://jsfiddle.net/egpr99k9/45/ This is the function that does the trick - it's call both on mouseup and mousedown events: var rectData = {}; function drawRect(e, start) { var bounds = canvas.getBoundingClientRect(); var mouseX = e.clientX + bounds.left - 20; var mouseY = e.clientY - bounds.top; if (start) { rectData.start = { x: mouseX, y: mouseY } } else { if (rectData.start) { context.beginPath(); context.rect( rectData.start.x, rectData.start.y, mouseX - rectData.start.x, mouseY - rectData.start.y ); context.fillStyle = document.getElementById('color1').value; context.fill(); } rectData.start = {}; } } The next step here would be creating a live preview of the rectangle you're currently drawing (currently you won't see anything until you actually finish drawing it by re…
has comment: http://stackoverflow.com/comment/42890942

http://stackoverflow.com/a/27250735
score: 2
has comment: http://stackoverflow.com/comment/42975597
upvote count: 2
has comment: http://stackoverflow.com/comment/42976380
has comment: http://stackoverflow.com/comment/42975560
type: AcceptedAnswer
downvote count: 0
has body: Promises signal completion via return values, so you should return your updateItem and insertIntoTable chain. Aggregating promises is done via Promise.all (or $q.all, Q.all, $.when etc depending on the library): A corrected code would do these two: fetchAjaxData() .then(function(data) { // Update or insert the data - cannot use a merge // map is like `each` with return values for each item var ps = data.map(function(item) { return updateTable(item) .then(function(result)) { // If no rows were updated, insert the item if (result.rowsAffected == 0) { return insertIntoTable(item); // note the return .then(function(result)) { console.log("item added"); }); } }); }); return Promise.all(ps).then(function(){ return data.length; }); }).then(function(l) { useInsertedItems(l); });
accepted answer of: http://stackoverflow.com/q/27250675
type: Answer
answers question: http://stackoverflow.com/q/27250675
has comment: http://stackoverflow.com/comment/42978064
has comment: http://stackoverflow.com/comment/42975777

http://stackoverflow.com/q/27239428
type: Question
answer count: 1
has body: I am using disable_with, and cannot get the button text change to persist (because it is being overwritten by the disable_with functionality). As soon as I remove , data: { disable_with: '...' the buttons are updated as expected. Is there a way to perform actions after the disable_with functionality has completed? form: &lt;%= form_for @user, html: {id: 'follow-form'}, remote: true do |f| %&gt; &lt;%= button_tag id: 'follow-btn', data: { disable_with: '...' } do %&gt; Follow &lt;% end %&gt; &lt;% end %&gt; js: $('#follow-form').on('ajax:success',function(data, status, xhr){ if (status.action == 'follow') { $('#follow-btn').text('Unfollow'); } else { $('#follow-btn').text('Follow'); } }
tagged with: javascript
tagged with: ajax
score: 0
accepted answer: http://stackoverflow.com/a/27240870
tagged with: ruby-on-rails
type: AnsweredQuestion
has title: How to execute Javascript after Rails' remote form `disable_with` functionality has completed?
has answer: http://stackoverflow.com/a/27240870

http://stackoverflow.com/q/27233028
accepted answer: http://stackoverflow.com/a/27234939
type: AnsweredQuestion
has title: JS file shows up in source code, but Javascript isn't executing?
score: 1
tagged with: wordpress
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/27250406
has answer: http://stackoverflow.com/a/27234939
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
has body: I'm adding a CSS responsive, animated accordion-type portfolio to my WordPress site. My JS file shows up in the source code, but the effect still doesn't work. For some reason, the javascript is not executing. Here's my JS (/inc/js/accordion.js) /*! * classie - class helper functions * from bonzo https://github.com/ded/bonzo * * classie.has( elem, 'my-class' ) -> true/false * classie.add( elem, 'my-new-class' ) * classie.remove( elem, 'my-unwanted-class' ) * classie.toggle( elem, 'my-class' ) */ /*jshint browser: true, strict: true, undef: true */ /*global define: false */ jQuery(document).ready(function($) { function(window) { 'use strict'; // class helper functions from bonzo https://github.com/ded/bonzo function classReg(className) { return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); } // classList support for class management // altho to be fair, the api sucks because it won't accept multiple classes at once var hasClass, addClass, removeClass; if ('classList' in document.documentElement) { hasClass = function(elem, c) { return elem.classList.contains(c); }; addClass = function(elem, c) { elem.classList.add(c); }; removeClass = function(elem, c) { elem.classList.remove(c); }; } else { hasClass = function(elem, c) { return classReg(c).test(elem.className); }; addClass = function(elem, c) { if (!hasClass(elem, c)) { elem.className = elem.className + ' ' + c; } }; removeClass = function(elem, c) { elem.className = elem.className.replace(classReg(c), ' '); }; } function toggleClass(elem, c) { var fn = hasClass(elem, c) ? removeClass : addClass; fn(elem, c); } var classie = { // full names hasClass: hasClass, addClass: addClass, removeClass: removeClass, toggleClass: toggleClass, // short names has: hasClass, add: addClass, remove: removeClass, toggle: toggleClass }; // transport if (typeof define === 'function' && define.amd) { // AMD define(classie); } else { // browser global window.classie = classie; } })(window); //fake jQuery var $ = function(selector) { r…

http://stackoverflow.com/a/29521254
upvote count: 2
answers question: http://stackoverflow.com/q/27175603
downvote count: 0
has body: Pulling out GavinR's answer, Dojo is relying on the now-deprecated position property of the progress event object. A bug has been filed and its progress can be tracked.
type: Answer
score: 2

http://stackoverflow.com/a/27205753
answers question: http://stackoverflow.com/q/27184641
score: 0
has body: I have not work with easysocial ever but I think it's simple. At first check at backend. If no configuration for it then you have to change code at this view files. Pick the user type. If the logged user type is super admin or group admin, then the delete button will appear. Simple "if" condition. It would be better to check user type at controller function of it too.
type: Answer

http://stackoverflow.com/comment/42984986
type: Comment
comment on: http://stackoverflow.com/a/27255151
score: 0
has text: @FelixKling Because he never clicks on the .square elements, he clicks on the content-wrappers. If he properly changes the ids to classes, hides the elements which contain those classes, adds some text to the .square elements then he can listen to _them_.
type: AnswerComment

http://stackoverflow.com/comment/62818444
type: AnswerComment
type: Comment
has text: then how you know that you should pass null parameter and bind this method which eventually solves the problem ?
comment on: http://stackoverflow.com/a/27172892
score: 0

http://stackoverflow.com/a/27158238
has body: Because helloworld is in a closure, you'll need to export it to an outer scope to use it somewhere else: $(document).ready(function(){ var rectangle = canvas.display.rectangle({ x: 77, y: 77, width: 200, height: 100, fill: "#0aa" }); function helloworld(){ alert(rectangle.x); }; window.helloworld = helloworld; // make it global }); However, the script you pasted calls the function immediately, and it won't be defined until after this runs. So you'd have to wait until the DOM is loaded before calling helloworld().
answers question: http://stackoverflow.com/q/27158171
score: 0
has comment: http://stackoverflow.com/comment/42810554
type: Answer

http://stackoverflow.com/a/27202781
has body: Some sourcecode would help..but here are some pointers.. Run the JSON loop and populate the JSON property into an ArrayList. Once the entire JSON is processed, pass the ArrayList as an adapter for your table rows.
answers question: http://stackoverflow.com/q/27202701
type: Answer
score: 0

http://stackoverflow.com/comment/43083549
type: QuestionComment
comment on: http://stackoverflow.com/q/27310608
score: 0
type: Comment
has text: You can do three different buttons: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPromptService?redirectlocale=en-US&redirectslug=nsIPromptService#confirmEx_example. But for three checks boxes you have to make your own prompt either with XUL or HTML.

http://stackoverflow.com/q/27250780
has title: Recursive function in Javascript to fill Array?
has comment: http://stackoverflow.com/comment/42975607
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43001496
has answer: http://stackoverflow.com/a/27250881
tagged with: javascript
has body: I am trying to fill an array with ranges of values in a recursive function, but i see a weird thing happening while returning the array, though the array has values, when i alert it outside the function it gives me undefined. Not Sure whether its my code issue or any kind of behavior. Same implementation when i tired using simple for loop it worked fine. I don't know what title to give for this problem, please suggest me a good one. JS Fiddle With Recursion var arr = []; function fillArray(n,i){ if(arr.length !== n){ if(i===0) arr[i] = i; else arr[i] = arr[i-1] + 1; fillArray(n,++i); } else{ console.log(arr); return arr; } } console.log(fillArray(10,0)); With For Loop var arr = []; function fillArray(start,end){ for(var i=start,j=0;i&lt;=end;i++,j++){ arr[j] = i; } return arr; } alert(fillArray(1,10));
favorite count: 0
has comment: http://stackoverflow.com/comment/42975666
linked to: http://stackoverflow.com/q/3895478
answer count: 3
has answer: http://stackoverflow.com/a/38757381
has answer: http://stackoverflow.com/a/27250908
linked to: http://stackoverflow.com/q/10073699
type: UnansweredQuestion
upvote count: 1
downvote count: 1
tagged with: recursion
has comment: http://stackoverflow.com/comment/98795184
has comment: http://stackoverflow.com/comment/42975752

http://stackoverflow.com/q/27190472
has answer: http://stackoverflow.com/a/27711741
accepted answer: http://stackoverflow.com/a/27711741
type: AnsweredQuestion
type: Question
has body: I'm downloading a webpage from an Octave script and storing it with urlwrite. Problem is that the webpage is not "readable HTML", but instead a set of scripts which build the (text) page on the browser. urlread, of course, yields the same result. How can I read the actual webpage that I see in the browser? Don't know of any method to run JS from Octave.
tagged with: octave
tagged with: javascript
score: 0
has title: How to read a Javascript-based webpage from octave?
answer count: 1

http://stackoverflow.com/q/27248185
has answer: http://stackoverflow.com/a/27250600
upvote count: 1
has title: Advanced Compilation in google closure compiler
accepted answer: http://stackoverflow.com/a/27250600
type: AnsweredQuestion
score: 1
type: Question
tagged with: google-closure-compiler
downvote count: 0
answer count: 1
tagged with: javascript
has body: I have this code and i am trying to use closure compiler to optimize the code. var HrevertGraph = HrevertGraph || {}; HrevertGraph.CircularProgress = (function(){ function Progress(){ //Properties } Progress.prototype.getCenter = function() { //method } //and other methods return Progress; })(); window["HrevertGraph.CircularProgress"] = HrevertGraph.CircularProgress; I compiled this on advanced option mode and the problem is the compiled code doesn't show the constructor function Progress and its prototype methods. What should I do in this case?
favorite count: 0

http://stackoverflow.com/comment/42954345
type: QuestionComment
has text: The dynamic content is loaded with javascript/jquery i think. Its a plugin for wordpress but i think it would be impossible to track where that value comes from.
type: Comment
comment on: http://stackoverflow.com/q/27238614
score: 0

http://stackoverflow.com/comment/42833977
has text: Apparently my move function was at fault. The `parseInt` did help me after I changed my whole function. +1 thanks.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27170769

http://stackoverflow.com/comment/42881242
type: Comment
comment on: http://stackoverflow.com/a/27187775
score: 0
type: AnswerComment
has text: Do you have any way to exclude the comma after word , because I just want to get the word @suchit

http://stackoverflow.com/comment/43092469
comment on: http://stackoverflow.com/a/27313162
has text: I understand the question perfectly, I am just suggesting that maybe you're approaching this problem in the wrong way.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/58627793
type: QuestionComment
has text: How are you adding this middleware to your app?
comment on: http://stackoverflow.com/q/27266857
score: 0
type: Comment

http://stackoverflow.com/comment/42929456
score: 0
comment on: http://stackoverflow.com/a/27225689
type: AnswerComment
has text: Thanks for the reply. I have tried this previous. It doesn't worked for me :(
type: Comment

http://stackoverflow.com/q/27280273
has title: gettin checkbox value generated by ajax
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27280364
has body: I have a small php code in which on change dropdown . values are fetched from database by ajax call and then are displayed with checkboxes . now since these checkboxes are generated by ajax so i am confused how to get the values of checkboxes on the main file . simply my questions how to get values of checkboxes that are generated by ajax . If someone could help . thanking you in anticipation of your response . &lt;?php $id=$_GET["q1"]; $conn=oci_connect("system","ashfaq","localhost/xe"); $sql=oci_parse($conn,"select item_code, Item_description from pos_item where item_category_id=$id"); ociexecute($sql); $row=oci_fetch_array($sql); while($row=oci_fetch_array($sql)) { echo "&lt;br&gt;"; echo "&lt;input type=\"checkbox\" name=\"hob[]\" value=\"\"&gt;"; echo "$row[0] &amp;nbsp; $row[1] "; } ?&gt;
has comment: http://stackoverflow.com/comment/43029203
type: Question
tagged with: php
tagged with: checkbox
answer count: 1
score: 0
accepted answer: http://stackoverflow.com/a/27280364

http://stackoverflow.com/a/27176378
accepted answer of: http://stackoverflow.com/q/27176292
has body: On a modern browser, you can get a list of an object's "own" property names (not ones from its prototype) via Object.keys. If the object has only one property, you'll get back only one name: var name = Object.keys(obj)[0]; // [0] = get the first (only) On older browsers, you can via a for-in loop: (Or, you can get a "shim" or "polyfill" for Object.keys, which would use one under the covers) var name, n; for (n in obj) { if (obj.hasOwnProperty(n)) { name = n; break; } } Once you know the name, you can use that to get the value: var value = obj[name]; Side note: It's generally best to design objects so that the property names are consistent, and the values vary. So for instance, rather than {id: value} where both id and value are variable, perhaps {id: "the ID", value: "the value"} where the property names are consistent and the values vary. Then you could just use obj.id and obj.value.
upvote count: 1
score: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27176292
downvote count: 0
type: Answer

http://stackoverflow.com/a/27154883
score: 1
answers question: http://stackoverflow.com/q/27154764
type: Answer
accepted answer of: http://stackoverflow.com/q/27154764
upvote count: 1
has body: You should construct a table or Date in Javascript (be careful of your month length 28 - 31 ?) : $scope.days = []; for (var i = 1; i <= 31; i++){ $scope.days.push(new Date(2014, 1, i); } And then in your html file :
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27209856
has body: I'm using imgData to check if the alpha value of the pixels that surround any object = 255 ( and is therefore opaque) and then if so my moving objects (2 rectangles) cannot move into them (i.e. a wall). Because of this I can't use the rectsCollide function to check if they touch (because that requires an instance where the pixels overlap which my method does not allow). So in a 2 step question I need to know how to check if these two rectangles are touching and 2 if they are how to start a timer when they touch. I'll show you my jsfiddle so that you can see how I check for collision detection... `http://jsfiddle.net/22r0L6a4/
tagged with: rect
has comment: http://stackoverflow.com/comment/42902054
answer count: 0
tagged with: collision-detection
type: Question
tagged with: javascript
has title: How do you start a timer when two objects touch each other(without pixels ever overlapping (simply side by side))?
has comment: http://stackoverflow.com/comment/42901467
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: timer
type: UnansweredQuestion

http://stackoverflow.com/a/43694151
downvote count: 0
has comment: http://stackoverflow.com/comment/101114907
type: Answer
answers question: http://stackoverflow.com/q/27261281
upvote count: 12
has comment: http://stackoverflow.com/comment/75890860
score: 12
has body: I use the following functions for netmask to CIDR and CIDR to netmask conversions: var netmask2CIDR = (netmask) =&gt; (netmask.split('.').map(Number) .map(part =&gt; (part &gt;&gt;&gt; 0).toString(2)) .join('')).split('1').length -1; var CIDR2netmask = (bitCount) =&gt; { var mask=[]; for(var i=0;i&lt;4;i++) { var n = Math.min(bitCount, 8); mask.push(256 - Math.pow(2, 8-n)); bitCount -= n; } return mask.join('.'); } Hope this helps!

http://stackoverflow.com/q/27251953
answer count: 3
upvote count: 112
has body: DataTransferItemList.add allows you to override copy operation in javascript. It, however, only accepts File object. Copy event The code in my copy event: var items = (event.clipboardData || event.originalEvent.clipboardData); var files = items.items || items.files; if(files) { var blob = Blob.fromDataURL(_this.editor.selection.getSelectedImage().toDataURL("image/png")); files.add(blob); } The error in chrome: Uncaught TypeError: Failed to execute add on DataTransferItemList: parameter 1 is not of type File. Trying the new File(Blob blob, DOMString name) In Google Chrome I tried this, according to the current specification: var blob = Blob.fromDataURL(_this.editor.selection.getSelectedImage().toDataURL("image/png")); var file = new File(blob, "image.png"); Problem here is, that Google Chrome doesn't stick to specifications very much. Uncaught TypeError: Failed to construct File: Illegal constructor Neither does Firefox in this case: The method parameter is missing or invalid. Trying the new File([Mixed blobParts], DOMString name, BlobPropertyBag options) Solution suggested by @apsillers doesn't work too. This is non stadard method used (but useless) in both Firefox and Chrome. Binary data I tried to avoid blob, but the file constructor failed anyway: //Canvas to binary var data = atob( //atob (array to binary) converts base64 string to binary string _this.editor.selection.getSelectedImage() //Canvas .toDataURL("image/png") //Base64 URI .split(',')[1] //Base64 code ); var file = new File([data], "image.png", {type:"image/png"}); //ERROR You can try that in console: Chrome <38: Chrome >=38: Firefox: Blob Passing Blob is probably correct and works in Firefox: var file = new File([new Blob()], "image.png", {type:"image/png"}); Firefox: Chrome <38: Chrome >=38: Q: So how can I make File from Blob? Note: I added more screenshots after @apsillers reminded me to update Google Chrome.
downvote count: 0
has comment: http://stackoverflow.com/comment/42978486
has comment: http://stackoverflow.com/comment/113978338
has title: How to create File object from Blob?
has comment: http://stackoverflow.com/comment/42978632
has comment: http://stackoverflow.com/comment/42982774
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/58534665
has comment: http://stackoverflow.com/comment/42978541
has comment: http://stackoverflow.com/comment/42979887
possible better answer: http://stackoverflow.com/a/58534665
type: Question
has comment: http://stackoverflow.com/comment/42979501
score: 112
has answer: http://stackoverflow.com/a/58334891
has comment: http://stackoverflow.com/comment/42983111
linked to: http://stackoverflow.com/q/27159179
tagged with: javascript
has comment: http://stackoverflow.com/comment/132299780
favorite count: 0
tagged with: fileapi
has answer: http://stackoverflow.com/a/27256755
accepted answer: http://stackoverflow.com/a/27256755

http://stackoverflow.com/comment/42936268
has text: My text file is the same that above.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27228777
score: 0

http://stackoverflow.com/comment/42855986
has text: Basically. But you might want to notify clients of "wheel spin start" at the same time (using websockets or [long polling](http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery)) and then notify them at the same time about "end of betting" (and the number that the wheel "stopped at").
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27183880
type: AnswerComment

http://stackoverflow.com/comment/42974854
type: Comment
comment on: http://stackoverflow.com/a/27250378
score: 0
type: AnswerComment
has text: Down voting with out comment is pet peeve of mine

http://stackoverflow.com/comment/42990350
score: 0
comment on: http://stackoverflow.com/q/27258292
type: Comment
type: QuestionComment
has text: Is the limitation of up to 3 per state or in total?

http://stackoverflow.com/a/27217719
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42915981
has comment: http://stackoverflow.com/comment/42915234
has comment: http://stackoverflow.com/comment/42915963
type: Answer
answers question: http://stackoverflow.com/q/27217600
has body: EDITED ANSWER: If you can choose 11. and 12. month, if (month &gt;= 11) is enough. You cannot see now if your code like this, because we are not December now. If you want to check your code, you can put this code: if (month &gt;= 9) Its work. Also, your month variable was undefined and working version is here: Updated: DEMO
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27217600
score: 1

http://stackoverflow.com/comment/42861764
comment on: http://stackoverflow.com/a/27187379
type: AnswerComment
score: 0
has text: On the inner setTimeout you can change src = "www.whatever.com"
type: Comment

http://stackoverflow.com/comment/42987460
comment on: http://stackoverflow.com/q/27256752
score: 0
has text: How can i acess the inputs on the form from the js file?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42987853
type: AnswerComment
comment on: http://stackoverflow.com/a/27240944
type: Comment
has text: This is the jQuery that I already have in the HTML above: Unfortunately changing "$(this).closest("form").submit();" to "$("form").submit();" didn't change anything.
score: 0

http://stackoverflow.com/q/27283552
has answer: http://stackoverflow.com/a/27283728
has body: Here's my scenario: I have a layout template that needs to check to see if a User belongs to at least one Team. If not, then display a div across the entire site. A user can only see the teams they belong to, so I created a simple publication that works: (code samples are CoffeeScript) Meteor.publish 'teams', -&gt; return null if !@userId Teams.find {'members._id': @userId} This works great and Teams.find().fetch() in console gives expected results. However, if I put this code in, say, the Template.layout.rendered, it doesn't work. Template.layout.rendered = -&gt; teams = Teams.find().fetch() hasTeams = teams.length &gt; 0 if !hasTeams ...do stuff.. Obviously this doesn't work because the Teams find is async and not loaded when it needs to make the decision. With a normal template / page I would just use the IronRouter waitOn() but what do I do on the layout? I could do a waitOn in my router, but since the data is "global" and going to be used everywhere, and because a user could deep link into the site all over the place, I don't want to add that waitOn to EVERY single route. So what is the proper pattern? How do I get the meteor client to load global data and wait for the data before running the route?
linked to: http://stackoverflow.com/q/23977367
tagged with: meteor
has title: Loading and waiting for "global" meteor subscriptions
type: UnansweredQuestion
tagged with: coffeescript
type: Question
has answer: http://stackoverflow.com/a/34485610
answer count: 2
tagged with: javascript
score: 0

http://stackoverflow.com/a/27247718
answers question: http://stackoverflow.com/q/27247583
downvote count: 0
has body: You could check this module: angular-css-injector. Be warned it's currently only compatible with angular 1.2.x...
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/27163554
has comment: http://stackoverflow.com/comment/42859064
tagged with: centos7
has answer: http://stackoverflow.com/a/27186139
score: 1
upvote count: 1
type: Question
downvote count: 0
tagged with: webserver
tagged with: javascript
has title: method to save file in html?
has body: So I have been messing around with HTML and Literally Canvas, which basically just creates a drawing board for you, and got it so I have an export button on my page. When you hit this button it currently only opens a new page with the image; what I want to accomplish is have it save the file locally on my webserver when someone hits the button. The line that opens the drawing is: window.open(lc.getImage().toDataURL()); Is there any way to accomplish this? Here's my full code.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/13198131
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/43066640
score: 0
comment on: http://stackoverflow.com/a/27301469
type: Comment
type: AnswerComment
has text: Some items should show much more info than others. I've tried collection-repeat of ionic framework too.

http://stackoverflow.com/q/27235526
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/27236769
has answer: http://stackoverflow.com/a/27235640
accepted answer: http://stackoverflow.com/a/27235640
tagged with: javascript
answer count: 2
downvote count: 0
has title: How to add dynamic javascript alert box in asp.net?
has comment: http://stackoverflow.com/comment/42947619
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/27236769
tagged with: visual-studio
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42949851
score: 1
has body: Please help me .I am new to asp.net .How can I write dynamic javascript in asp.net web forms ? What I want to do is as the following code . The follow code is in button click event of server side ,written in c# . Please help me . if(Email.send()){ //show javascript alert box }else{ //show javascript alert box }
upvote count: 1

http://stackoverflow.com/q/27277148
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27663112
has comment: http://stackoverflow.com/comment/43023985
downvote count: 1
accepted answer: http://stackoverflow.com/a/27286259
tagged with: jshint
type: Question
upvote count: 15
tagged with: eslint
tagged with: jslint
tagged with: javascript
has answer: http://stackoverflow.com/a/27550610
answer count: 3
has comment: http://stackoverflow.com/comment/43023451
tagged with: static-code-analysis
has title: Treat the use of @author as code style violation
has body: Goal: Issue a warning in case an @author tag is used anywhere inside the .js files in the project. Question: Is it something that jshint or other static code check tools can help with? If not, what options do I have? Description: I completely agree with Paul's answer at Javadoc @author tag good practices thread and treat @author tag as an unnecessary noise. And, in the Python world, I've seen people checking for the tag usage. For example, Openstack Style Guidelines explicitly state not use @author tag. They have developed a set of custom flake8 checks which include: [H105] Don’t use author tags. Now, I'm trying to solve the same problem in JavaScript. Example (this should not pass a code quality check): /** * @author John Smith &lt;john@smith.com&gt; */ 'use strict';
possible better answer: http://stackoverflow.com/a/27550610
linked to: http://stackoverflow.com/q/21821528
favorite count: 0
has answer: http://stackoverflow.com/a/27286259
linked to: http://stackoverflow.com/q/17269843
score: 14

http://stackoverflow.com/comment/42961013
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27242102
has text: @TheThinker: This is working for above question. If your question is different then Please post your separate question for that? and if your question is same then let me know what error you geting?

http://stackoverflow.com/comment/43075126
score: 1
comment on: http://stackoverflow.com/q/27306184
has text: rename your js file by adding ?version at the end. The most possible solution is that you have some kind of caching and if you want to have good user experience on website, this is way to go. If you are just developing(for now) then you could just clear your cache
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42965718
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/66011/discussion-between-steven-keith-and-madhu-kumar).
type: AnswerComment
comment on: http://stackoverflow.com/a/27228494
score: 0
type: Comment

http://stackoverflow.com/a/27238585
has body: Here's a full explanation of why this is so fast: Stacker: a Turbolinks/PJAX technique for instant page loads Russian-doll caching: a low-hassle, automated way to do aggressive caching
answers question: http://stackoverflow.com/q/27171432
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27171432
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/27228943
type: Question
tagged with: canvas
has answer: http://stackoverflow.com/a/27241462
accepted answer: http://stackoverflow.com/a/27241462
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Hi, I am making a touch enabled signing app using 2 HTML Canvas. In the screenshot attached below, i am able to sign on my tablet on 1st canvas and on the second canvas as well without scrolling the scroll-bar on the right. If i scroll and bring the 2nd canvas in complete focus, then my signing stops working on the 2nd Canvas. It seems that on scrolling i am not calculating the coordinates well. Here is the code that i am using to get the co ordinates and pass that to my Drawer method. var coors = { x: event.targetTouches[0].pageX , y: event.targetTouches[0].pageY }; // Now we need to get the offset of the canvas location var obj = signCanvas; if (obj.offsetParent) { do { coors.x -= obj.offsetLeft; coors.y -= obj.offsetTop; } while ((obj = obj.offsetParent) != null); }
tagged with: android
type: AnsweredQuestion
has title: HTML Canvas Touch events with Scrollbar

http://stackoverflow.com/q/27154339
tagged with: javascript
tagged with: jquery
score: 0
has title: Drop Random Pins Onto Dumby Map
type: UnansweredQuestion
type: Question
has body: I'm working on a little project that uses the mapquest API. While the map is being populated with all the pins that get pulled in, I want to make it where I have a "dummy map" that is shown as a static map and has pins that will fall onto it at random points. The pins will be nothing more than a series of styled div's. I can get them to move about the dummy map, but I cannot get them to each have a different position. How can I get the div's to each drop at a different positions? Also, what would be the best way to stagger the animations so they don't all fire at once? I'll put together a fiddle and include it below. Thanks for any input. jsfiddle.net/45geyrzx/
has answer: http://stackoverflow.com/a/27158285
answer count: 1

http://stackoverflow.com/a/27185488
has comment: http://stackoverflow.com/comment/42858210
has comment: http://stackoverflow.com/comment/42858395
answers question: http://stackoverflow.com/q/27185416
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42858078
accepted answer of: http://stackoverflow.com/q/27185416
has comment: http://stackoverflow.com/comment/42858038
has comment: http://stackoverflow.com/comment/42859952
type: Answer
has comment: http://stackoverflow.com/comment/42858177
has body: $(zero) in your code means $("0") selector so it doesn't make sense to compare with $(zero). Moreover, since you have this syntax var sensorNumber = tr.find("#AmountOfSensors").html(); then sensorNumber is actually the variable that you want to compare with "0", so you don't need to use $(sensorNumber).val(). Assuming that sensorNumber always contains an integer, set zero as an integer and use parseInt function to make sure you're comparing two integers as below var zero = 0; if (parseInt(sensorNumber) != parseInt(zero)) or don't use zero variable at all if (parseInt(sensorNumber) != parseInt(0))
has comment: http://stackoverflow.com/comment/42859305
has comment: http://stackoverflow.com/comment/42859523
score: 1
upvote count: 1

http://stackoverflow.com/a/27176087
has comment: http://stackoverflow.com/comment/42841911
type: Answer
has comment: http://stackoverflow.com/comment/42842519
has comment: http://stackoverflow.com/comment/42841947
has comment: http://stackoverflow.com/comment/42841854
has body: the simplest way that i found: i've created a directive called 'dateformatter', that basically, define a $formatter to filter value viewed in input, and a $parser to treat value before set it into model: app.directive('dateformatter', function() { return { restrict: 'A', require: 'ngModel', link: function(scope, elm, attrs, ctrl) { ctrl.$parsers.unshift(function(viewValue) { return new Date(viewValue) }); ctrl.$formatters.push(function(modelValue) { return modelValue.toDateString() }); } }; }); and i added 'dateformatter' attribute in input tag: &lt;form role="form"&gt; &lt;div ng-repeat="fld in grid.columns"&gt; &lt;label&gt;{{fld.label}}&lt;/label&gt; &lt;input type="text" dateformatter ng-model="grid.currentRecord[fld.name]"&gt; &lt;/div&gt; &lt;/form&gt; it's working out!
score: 0
answers question: http://stackoverflow.com/q/27160485
has comment: http://stackoverflow.com/comment/42842308

http://stackoverflow.com/a/27161310
has body: This should work for you: function Conversion() { var val = document.getElementById("value").value, madeSelection = document.getElementById("Selection").value, ans if (madeSelection == 1) ans = val * 0.37; if (madeSelection == 2) ans = val * 0.30; if (madeSelection == 3) ans = val * 2.70; if (madeSelection == 4) ans = val * 0.80; if (madeSelection == 5) ans = val * 3.38; if (madeSelection == 6) ans = val * 1.25; document.getElementById("conversion").value = ans; } Chose Option EC to US EC to Euro US to EC US to Euro Euro to EC Euro to US Value Conversion
answers question: http://stackoverflow.com/q/27161181
score: 0
type: Answer

http://stackoverflow.com/comment/42930925
type: AnswerComment
type: Comment
has text: I am able to hide a content, but when I again click on a td it is not showing a content. The clicks works for only one time.
comment on: http://stackoverflow.com/a/27226354
score: 0

http://stackoverflow.com/comment/42847706
comment on: http://stackoverflow.com/a/27179469
score: 0
type: AnswerComment
type: Comment
has text: Thank you for your reply. The way I understand Reg Ex is your answer will match the string 'airplane737' and not 737 (or also 747 if gm)

http://stackoverflow.com/q/27278022
has title: Can I parse an html file for the value of a certain tag using excel, based on the value of a cell?
upvote count: 1
tagged with: excel
has comment: http://stackoverflow.com/comment/43066206
score: 1
has body: Apologies if the question isn't extremely clear. Here's a more thorough version: I have a spreadsheet with two columns: file path &amp; article title. File path contains the path to the article (html file) whose title I'm manually copy and pasting from the html file into the other column. I need to do this several hundred times, so I'm curious to know if there's a way I can automate it. The article title is found within the first &lt;span&gt; of the second &lt;h2&gt; on each html page. Example: Cell A1: F:\2003\030714.html Cell B1: The Art of Basket Weaving Cell A2: F:\2003\030718.html Cell B2: Cooking for Cats Is there some sort of wizardry that could help accomplish this? If I could just do a VLOOKUP, this would be a piece of cake, but unfortunately, both the beginning web dev and intermediate excel user in me are puzzled. Thanks in advance!
type: Question
downvote count: 0
tagged with: vba
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43025300
has answer: http://stackoverflow.com/a/27280680
has comment: http://stackoverflow.com/comment/43026389
type: UnansweredQuestion

http://stackoverflow.com/a/34037465
downvote count: 0
has body: You need to make sure dependency library is loaded before Angular. Try putting in the very bottom of your index.html, before the tag. Good luck.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27238904

http://stackoverflow.com/comment/42904507
comment on: http://stackoverflow.com/q/27211786
score: 1
type: Comment
type: QuestionComment
has text: does this help:: http://stackoverflow.com/questions/25038776/extjs-5-ext-application-is-not-a-function-why

http://stackoverflow.com/comment/42977199
has text: I believe so, if you remove the unwanted ice candidates before setting them locally and sending them off to the peer, that SHOULD work.
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27224008

http://stackoverflow.com/q/27239353
has comment: http://stackoverflow.com/comment/42955418
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/42955315
has title: Validating date input field with onsubmit
has comment: http://stackoverflow.com/comment/42955482
has comment: http://stackoverflow.com/comment/42955428
has comment: http://stackoverflow.com/comment/42955400
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42955452
tagged with: javascript
has body: I was looking everywhere, but I couldn't find a good code for my problem. I have some input fields, what the users are using to send online their requests. And one of the fields is a date field, what I would like somehow to validate in that way, that to be allowed only if the entered date to be somewhere between today and 8 days before. Example: if today is 29 November , they would be allowed to enter only date between 21st-29th November and nothing else And to be shown an alert window already when they have entered the wrong date They will pick up the days from minicalendar but that part is resolved, I need help only with the validating. If somebody could post a working code, I would be very grateful. Thank you
has comment: http://stackoverflow.com/comment/42955398
has answer: http://stackoverflow.com/a/27239493
has comment: http://stackoverflow.com/comment/42955284
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27569011
has comment: http://stackoverflow.com/comment/42955347
has comment: http://stackoverflow.com/comment/42955281
has comment: http://stackoverflow.com/comment/42955485
favorite count: 0
has comment: http://stackoverflow.com/comment/42955278
type: UnansweredQuestion

http://stackoverflow.com/q/27222061
favorite count: 0
has comment: http://stackoverflow.com/comment/42922842
has title: How might one recreate an image, e.g., .png or .jpg, using only web tech, e.g., HTML, CSS, and Javascript?
type: Question
has answer: http://stackoverflow.com/a/27222289
tagged with: http://stackoverflow.com/tag/html
score: -2
tagged with: css
accepted answer: http://stackoverflow.com/a/27222289
tagged with: http://stackoverflow.com/tag/svg
downvote count: 2
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42922841
tagged with: image
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42922895
has body: I'm interested in taking an image of any of the typical formats, e.g., PNG, JPEG, et cetera, and recreating it as a group of arranged, individually colored, 1 by 1 pixel HTML elements, or something like that. I want to be able to work with, i.e., style and script (movement, color change, et cetera), the individual pixels of an image. How might I achieve this? SVG comes to mind, but I'm not familiar enough with it to now if it's where I ought to be looking.

http://stackoverflow.com/a/27189019
score: 1
has comment: http://stackoverflow.com/comment/42866574
type: Answer
has comment: http://stackoverflow.com/comment/42864551
has body: Disclaimer: I am the author of Jsonix, an open-source JavaScript library for XML<->JS conversion. Jsonix is available for Node.js (see here). Jsonix can convert between XML and JSON (in both directions) based on a mapping. The mapping gives you the flexibility when transforming between JSON and XML. This may be what you need here. I'll let the code speak. Here's a demo case for your JSON->XML conversion: https://github.com/highsource/jsonix/tree/master/nodejs/demos/user Mapping: var Mapping = { name : 'Mapping', typeInfos : [ { localName : 'Data', propertyInfos : [ { name : 'user' }, { name : 'uri' }, { name : 'items', collection : true, typeInfo : '.Item' }, { name : 'info' } ] }, { localName : 'Item', propertyInfos : [ { name : 'uri' } ] } ], elementInfos : [ { elementName : { localPart : 'data' }, typeInfo : '.Data' } ] }; module.exports.Mapping = Mapping; Here we have two types: the root type (I called it Data) and another type Item. The Data type is used in the root XML element data. Ok, now the marshalling code: // Create Jsonix context var context = new Jsonix.Context([ Mapping ]); var data = { name : new Jsonix.XML.QName('data'), value : { "user" : "505723c5750c1fa2177682ed", "uri" : "http://localhost:3000/users/505723c5750c1fa2177682ed/items", "items" : [ { "uri" : "http://localhost:3000/items/1" }, { "uri" : "http://localhost:3000/items/2" } ], "info" : "blah." } }; var marshaller = context.createMarshaller(); console.log(marshaller.marshalString(data)); And here's the XML you get: 505723c5750c1fa2177682ed http://localhost:3000/users/505723c5750c1fa2177682ed/items http://localhost:3000/items/1 http://localhost:3000/items/2 blah. Links: Jsonix project on GitHub Jsonix documentation If you can match your XML with your JSON, check other libraries, for instance xml2js.
upvote count: 1
has comment: http://stackoverflow.com/comment/42864453
answers question: http://stackoverflow.com/q/27188054
downvote count: 0

http://stackoverflow.com/a/27285199
has comment: http://stackoverflow.com/comment/43038229
upvote count: 6
has comment: http://stackoverflow.com/comment/43038397
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27283401
type: Answer
score: 6
answers question: http://stackoverflow.com/q/27283401
has body: I know about the Promises A+ spec, but that only appears to deal with .then() Yes. The aim of the Promises/A+ spec is to "detail the behavior of the then method, providing an interoperable base which all Promises/A+ conformant promise implementations can be depended on to provide" and also describes promise assimilation, i.e. how to convert a promise-like object to a "real" Promise of your own library. In one word, it focuses on interoperability by speccing the minimum interface. I can't find standards for all the other useful functions. Yes. Every library does define its own. "Standards" emerge when a particular feature is present in (and copied to) many implementations. My motivation for wanting to understand what the current and future standards development looks like is to know which current functions offered in the various libraries are more likely to be consistent with future standards and which are not so I can write code that will need less maintenance in this area in the future. Probably watching the issue discussions of the big implementations is the best idea. However, most of the offered features are relatively easy to polyfill. The gold standard will be ES6 and ES7. Check the esdiscuss mailing list regularly for discussion of features, questions on the usage, and new drafts. I can see Promise.all() in an ES6 draft spec, but don't see any of the others. If you look more closely, the Promise section details: The Promise constructor, Promise.reject and Promise.resolve Promise.all and Promise.race Promise.prototype.catch and Promise.prototype.then .finally(), .catch(), .spread(), .settle() finally was discussed on esdiscuss (e.g. here), but probably won't make it into ES6. see above for catch spread is superseded by the spread operator and destructuring settle could be implemented using all, or at least using an algorithm very close to the all spec
downvote count: 0
has comment: http://stackoverflow.com/comment/43038326
has comment: http://stackoverflow.com/comment/43038143
has comment: http://stackoverflow.com/comment/43038339

http://stackoverflow.com/comment/43039847
comment on: http://stackoverflow.com/q/27284447
score: 0
type: Comment
type: QuestionComment
has text: use !important after adding color like document.getElementById("MainContent_TdTeam").style.color = "red !important";

http://stackoverflow.com/comment/43000917
score: 0
type: Comment
has text: You should enclose your data to prepend in a div which should be hidden. Then after prepending the data to your container, apply animation on the hidden div. $(" " + data + " ").prependTo("#load_current");$("#newdata").fadeIn();
comment on: http://stackoverflow.com/a/27264448
type: AnswerComment

http://stackoverflow.com/comment/42800999
type: AnswerComment
score: 0
type: Comment
has text: @Josh Burgess: The attribute is never implicitly set. `$('table:nth-of-type(2)').attr('border')` returns undefined. So there is no attribute to be removed in the first place. But now I'm more interested in the repainting part: why would it trigger a repaint in other browsers but not Chrome? Is this part of Chrome's weird habit of not triggering repaints like other browsers do?
comment on: http://stackoverflow.com/a/27153086

http://stackoverflow.com/comment/83943369
has text: Couple years later, this module is still going strong :) In the time since, we've introduced enter/leave animations, added more props for customizability, improved performance, and shrunk the bundle size (under 5kb gzip now!)
comment on: http://stackoverflow.com/a/35275535
type: Comment
score: 3
type: AnswerComment

http://stackoverflow.com/q/27290460
tagged with: actionhero
type: UnansweredQuestion
has body: I'm obviously missing something very important about how Node.js and Actionhero work. Can someone please explain to me why the following problem occurs: I have this simple code: Basically it reads a .css file . buildAdsHTML: function (ads, type) { var cssDir = path.normalize(__dirname + '/../public/css/'); switch (type) { case 'text': var result = ''; console.log("STEP 1"); fs.readFile(cssDir + type + 'Ads.css', {encoding: 'utf8'}, function (err, data) { console.log(err); console.log(data); if (!err) { console.log("STEP 2"); result += '&lt;style&gt;' + data + '&lt;/style&gt;'; } else { } }); break; } console.log('STEP 3'); return result; } Now when this code is run I get an empty string as result. The console output is the following: STEP 1 &lt;- so far so good STEP 3&lt;- this should be last! null &lt;- this is the error variable .some-random-css-class{ display: block; width: 100; min-height: 250px; } STEP 2 Now at some point I figured out that that fs.reafFile is async function. So I naturaly changed it to the sync version fs.readFileSync. Now the console output is even worse: STEP 1 STEP 3 Thats it! Nothing else. And I still get a empty string as result. Like the whole code isnt even going through the swich. I've noticed this behavior in all functions and methods of my actionhero project, most notebly when calling next(connection). You can't just call it at the end of the method. For every if or swich I have to call it inside to have any actual control over the result. Otherwise every new data I've added to the connection is lost. What's with that ? Please explain that functionality in detail so I don't make any dumn mistakes while coding.
tagged with: node.js
has answer: http://stackoverflow.com/a/35324176
has title: Node.js + Actionhero code not running consecutively
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27290848
has comment: http://stackoverflow.com/comment/43066441

http://stackoverflow.com/comment/43050276
type: QuestionComment
comment on: http://stackoverflow.com/q/27292249
has text: please provide a jsFiddle or a plnkr ...
score: 0
type: Comment

http://stackoverflow.com/comment/42964121
type: QuestionComment
has text: you can use like this i think : *new Date(toTime.getTime() + 30 * 60 * 1000)*
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27244341

http://stackoverflow.com/comment/53192304
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/32672897
type: Comment
has text: How would you use async/await with a 6-to-5 transpiler when they're not part of ES6?

http://stackoverflow.com/q/27199474
has comment: http://stackoverflow.com/comment/42883152
linked to: http://stackoverflow.com/q/1988499
type: Question
has body: When viewing my site on mobile device, the site is automatically viewed in mobile version, like the image i have attached below But i need to view it in desktop view like the image below. In other words, how to disable mobile view when the site is viewed in mobile device and use the desktop view instead?
has title: How to view full site in mobile devices instead of mobile view
score: 1
has answer: http://stackoverflow.com/a/44513332
tagged with: mobile
has answer: http://stackoverflow.com/a/44513257
upvote count: 1
has answer: http://stackoverflow.com/a/27199587
tagged with: javascript
has comment: http://stackoverflow.com/comment/42883226
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27199589
has comment: http://stackoverflow.com/comment/42883176
tagged with: css
has comment: http://stackoverflow.com/comment/42889703
answer count: 4
has comment: http://stackoverflow.com/comment/42883791
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27234925
has comment: http://stackoverflow.com/comment/42946565
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27235506
upvote count: 3
has comment: http://stackoverflow.com/comment/42947037
type: Question
score: 3
has body: I have a web site with few pages. Some of those pages need userId and userName for whatever processing in JavaScript context. Note: the user id is not being used for security, and is not being sent back to the server, so spoofing is not an issue. Question: what is a good way to pass userId and userName to the JavaScript context. UPDATE Ideally I would like a generic pattern that can be used for passing any data (e.g. default values for a list sort and filter settings) from the server to JavaScript code, so that I don't solve userId problem differently from problem of passing initialSort and initialFilter values. Here are some approaches I could think of. I do understand that all of these will work, but I am hoping for an even better pattern. I am also interested in learning other cons of the solutions I am considering here: 1. Pass userId and userName from server as a non-server cookie. Cons: cookie will be sent back to the server with every request, which is a waste (not a significant one though). 2. Use custom headers Cons: headers are not available to javascript for the initial request. 3. Make AJAX request to get data Cons: requires extra HTTP trip. 4. Render data in-line in the initial page HTML Cons: busts the cache and makes page non-cacheable. 5. Switch the polarity (works every time in Star Trek), my favorite so far Instead of getting most of HTML on the initial trip - rewrite the page so that initial page returns mostly data, while markup is loaded (and cached) separately. E.g.: &lt;html&gt;&lt;body&gt; &lt;div data-bind="template: 'pages/invoices'" /&gt; &lt;!-- using KO external template to load markup --&gt; &lt;script src="require.js"&gt;&lt;/script&gt; &lt;script&gt; require([...], function (...) { var vm = new PageViewModel('userId-bob', 'Bob Smart'); // &lt;-- content rendered by server ko.applyBindings(vm); }); &lt;/script&gt;&lt;/body&gt;&lt;/html&gt; Cons: page is search-crawlers hostile (not an issue in my case).
has comment: http://stackoverflow.com/comment/42946478
tagged with: javascript
has title: A pattern to make userId available to a JavaScript without busting the cache
has answer: http://stackoverflow.com/a/27234962
answer count: 2
downvote count: 0

http://stackoverflow.com/a/27268334
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43014020
accepted answer of: http://stackoverflow.com/q/27266696
answers question: http://stackoverflow.com/q/27266696
has comment: http://stackoverflow.com/comment/43014107
has comment: http://stackoverflow.com/comment/43013941
has body: Basically, i'm looking for a way to find out what set of submenus spans most to the right, but not the collective width of all nested subs, if that makes any sense... So, this will select all of the innermost submenus, which in your case would*(right?)* be those furthest to the right. var $rightmost = $(".main-nav").find('.submenu:not(:has(.submenu))'); You could repeatedly select elements in the following way, adding a .left class to all outlying .submenus until all pass the in-viewport check you're running. Maybe put it in a while loop and see if your query results have a length, then run your checking and handling logic within. var $rightmost = $(".main-nav").find('.submenu:not(:has(.submenu)):not(.left)'); lol. it's late here and i'm delirious, so if this sucks or doesn't make a clear argument, speak up! Admittedly: I did not check this, so also speak up if it's funky. Assumption because of this, I'm using jquery to calculate the width and offset of the submenus and apply a class that will cause the submenus to drop on the left instead should they cause overflow. I'm operating under the assumption that you've already coded the viewport logic. Edit: this works though it could be optimized... And I didn't at all do it in the I think cool way I proposed. GSD
has comment: http://stackoverflow.com/comment/43018834
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43013795

http://stackoverflow.com/a/27257180
has comment: http://stackoverflow.com/comment/42988416
has body: Your JavaScript is executing as the page loads. Because the JS code comes before the actual markup, the script is being executed before the #mosca element technically exists. Fix this by putting your script at the very bottom of the &lt;body&gt; Also, the mosca object will not simply exist - you do need to set it using document.getElementById: var mosca = document.getElementById('mosca');
has comment: http://stackoverflow.com/comment/42988128
has comment: http://stackoverflow.com/comment/42988675
upvote count: 1
has comment: http://stackoverflow.com/comment/42988211
type: Answer
answers question: http://stackoverflow.com/q/27257129
downvote count: 0
score: 1

http://stackoverflow.com/q/27176465
answer count: 2
downvote count: 0
tagged with: yii
tagged with: javascript
has answer: http://stackoverflow.com/a/27176597
tagged with: ajax
score: 7
has answer: http://stackoverflow.com/a/52565561
favorite count: 0
has comment: http://stackoverflow.com/comment/42842225
has body: I've looked around and none of the other similar posts have helped me. I have built an AJAx based form in Yii 2 and jQuery and it seems it submits the form twice. My form: $form = ActiveForm::begin([ 'id' =&gt; 'company_form', 'ajaxDataType' =&gt; 'json', 'ajaxParam' =&gt; 'ajax', 'enableClientValidation' =&gt; false ]); My JS code: $(document).ready(function() { /* Processes the company signup request */ $('#company_form').submit(function() { signup('company'); return false; }); }) function signup(type) { var url; // Set file to get results from.. switch (type) { case 'company': url = '/site/company-signup'; break; case 'client': url = '/site/client-signup'; break; } // Set parameters var dataObject = $('#company_form').serialize(); // Run request getAjaxData(url, dataObject, 'POST', 'json') .done(function(response) { //......... }) .fail(function() { //..... }); // End } Shouldn't the standard submit be stopped by me putting the return: false; in the javascript code? Why is it submitting twice? More Info: However the strange thing is, that only appears to happen the first time; if I hit submit again it only submits once; but if I reload the page and hit submit it will do it twice again.
accepted answer: http://stackoverflow.com/a/27176597
possible better answer: http://stackoverflow.com/a/52565561
upvote count: 7
tagged with: php
has comment: http://stackoverflow.com/comment/42842176
type: AnsweredQuestion
tagged with: yii2
has title: Ajax form submitting twice with Yii 2
type: Question

http://stackoverflow.com/q/27267942
has comment: http://stackoverflow.com/comment/43046718
has comment: http://stackoverflow.com/comment/43007564
favorite count: 0
upvote count: 8
has answer: http://stackoverflow.com/a/27291526
has comment: http://stackoverflow.com/comment/43018487
tagged with: razor
has body: How to submit partial view data from parent view . I am newbie to MVC, I have created a partial view _CurrentData which contains editor controls - textbox etc and added Submit button in the main view: &lt;div class="row"&gt; &lt;div class="col-md-12"&gt; @Html.Partial("_CurrentData", Model.CurrentItemDetails) &lt;/div&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;div class="col-md-2 col-md-offset-5"&gt; &lt;div&gt; &lt;input type="button" class="btn btn-primary" value="Submit" id="btnSubmit"/&gt; &amp;nbsp;&amp;nbsp; &lt;input type="button" class="btn btn-primary" value="Cancel" id="btnCancel" /&gt; &lt;br/&gt;&lt;br /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; ViewModel public class ProductionViewModel { public ItemDetails CurrentItemDetails { get; set; } } public class ItemDetails { public int ID { get; set; } public string Name { get; set; } } View &lt;div class="panel panel-default"&gt; &lt;div class="panel-heading"&gt; &lt;h3 class="panel-title"&gt;Editor&lt;/h3&gt; &lt;/div&gt; &lt;div class="panel-body"&gt; &lt;div class="row form-group"&gt; &lt;div class="col-sm-4 control-label text-right"&gt; &lt;strong&gt;Name:&lt;/strong&gt; &lt;/div&gt; &lt;div class="col-sm-8 control-label"&gt; @Html.TextBoxFor(m =&gt; m.Name , new { @class = "form-control" }) &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; now on clicking of 'btnSubmit' I want to submit data from _CurrentData view to the server and then refresh the partial view, How to accomplish this?
answer count: 4
linked to: http://stackoverflow.com/q/10300955
has answer: http://stackoverflow.com/a/31681372
type: AnsweredQuestion
has title: Submitting partial view data from parent view
linked to: http://stackoverflow.com/q/9978254
possible better answer: http://stackoverflow.com/a/31728549
linked to: http://stackoverflow.com/q/6279175
has answer: http://stackoverflow.com/a/27292486
has comment: http://stackoverflow.com/comment/43042027
has comment: http://stackoverflow.com/comment/43042059
type: Question
has answer: http://stackoverflow.com/a/31728549
score: 8
tagged with: asp.net-mvc
linked to: http://stackoverflow.com/q/8567114
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43007569
downvote count: 0
accepted answer: http://stackoverflow.com/a/27292486

http://stackoverflow.com/q/27182574
accepted answer: http://stackoverflow.com/a/27182798
type: Question
type: AnsweredQuestion
has title: creating a unique jquery dialog style for each id
tagged with: jquery-ui
has body: My code: blah blah blah My question is... why isn't the font-size being adjusted with that code? If I do .ui-dialog-titlebar, .ui-dialog-content it works just fine. What I don't like about that is that that's applying the style to all jquery dialog windows hence the #demo .ui-dialog-titlebar, #demo .ui-dialog-content. The JS fiddle with #demo .ui-dialog-titlebar, #demo .ui-dialog-content: http://jsfiddle.net/gucu9u75/ And a JS fiddle of it with just .ui-dialog-titlebar, .ui-dialog-content: http://jsfiddle.net/gucu9u75/1/
has answer: http://stackoverflow.com/a/27182707
has answer: http://stackoverflow.com/a/27182624
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/27182624
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27182798

http://stackoverflow.com/comment/43045142
type: Comment
comment on: http://stackoverflow.com/a/27289250
has text: @user2656713 see my updated answer, you need to make the XML in a format to get proper result for location2 and location4, currently it shows `undefined`. You can use a `if-condition` to by pass when the location tag doesn't exists.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27193307
score: 0
has body: DO use javascript's date object and do the following for sorting: array.sort(function(a, b) { return a.date.getTime()-b.date.getTime(); });
type: Answer
answers question: http://stackoverflow.com/q/27193232

http://stackoverflow.com/comment/42905858
type: AnswerComment
has text: Thanks for the answer, but the other one had the exact link I've been searching for! You were right though, MDN is the place to go haha
comment on: http://stackoverflow.com/a/27211435
type: Comment
score: 1

http://stackoverflow.com/a/27237530
answers question: http://stackoverflow.com/q/27236437
accepted answer of: http://stackoverflow.com/q/27236437
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has body: Instead of concatenating strings by yourself, you should be using path.join since it will take care of the proper slash, and following that path you can add a shorcut: var path = require('path'), p = function () { Array .prototype .unshift .call(arguments, __dirname); return path.join.apply(path, arguments); }; console.log(p('a', 'b', 'c')); Or, well, you can just: gulp.src(..., {cwd: __dirname}) gulp.dest(..., {cwd: __dirname}) Something like: var src = function (globs, options) { options = options || {}; options.cwd = __dirname; return gulp.src(globs, options); }; var dest = function (folder, options) { options = options || {}; options.cwd = __dirname; return gulp.dest(folder, options); }; Look here and here.
has comment: http://stackoverflow.com/comment/42960091
has comment: http://stackoverflow.com/comment/42964486
type: Answer

http://stackoverflow.com/comment/42904870
has text: Also, services are not returned as objects. The code for your 'topicContent' is actually a factory. This will result in `app.factory('topicContent', [function(){`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27211983

http://stackoverflow.com/q/27163873
type: AnsweredQuestion
has title: how to update a list inside ng-repeat using angular?
downvote count: 0
has answer: http://stackoverflow.com/a/27164978
accepted answer: http://stackoverflow.com/a/27164978
score: 1
has answer: http://stackoverflow.com/a/27164482
tagged with: ionic-framework
has body: i lave an ionic list &lt;ion-list&gt; &lt;ion-item ng-repeat="item in items"&gt; Hello, {{item.name}}! &lt;/ion-item&gt; &lt;/ion-list&gt; then, in the controller i have a event: $scope.items = someData(); itemsRef.on('event', function (response) { console.log(response); // this is an object containing he "name" property }); i would like append the response as a ion-item, without inserting html, but somehow adding the response to the items edit: I've tried: $scope.items.push(response); but weirdly enough i get Uncaught TypeError: undefined is not a function edit: it looks like one doesn't just $scope.items.push(response);, but $scope.items[next_key_here] = response; see jsfiddle
type: Question
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: angularjs-ng-repeat
possible better answer: http://stackoverflow.com/a/27164482
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42821397

http://stackoverflow.com/comment/42977102
has text: is the variable `loader` defined where you call it?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27214957
type: AnswerComment

http://stackoverflow.com/comment/42976784
has text: in the question there it is email_error in the php and email_errors in the js... sorry i just paste it in
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27251099

http://stackoverflow.com/comment/42845896
has text: Nope. Maybe if you gave me more to work with such as replicating this in jsfiddle, then I'd have some ideas stirring in my head but you don't... so sadly, I've got nothing for you.
comment on: http://stackoverflow.com/q/27178438
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43035854
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27283793
has text: angularjs is itself a javascript, what the heck is this info?

http://stackoverflow.com/comment/43099880
comment on: http://stackoverflow.com/a/27302482
type: Comment
score: 1
type: AnswerComment
has text: @SimenMangseth True, If this is just one time case.. go with the simple condition. Thanks for checking out my answer.

http://stackoverflow.com/comment/108875958
type: Comment
score: 0
type: AnswerComment
has text: @Corey, can you perhaps show an example of a situation where there are more than two different background colors? So let's say black, white, green, blue backgrounds and the color of the navbar also has a different color for each specific background color? Le's say white, black, yellow, pink. Would be super helpful!
comment on: http://stackoverflow.com/a/27299120

http://stackoverflow.com/comment/42989050
type: AnswerComment
comment on: http://stackoverflow.com/a/27257659
score: 0
type: Comment
has text: you could un-register and re-register the event handlers on button click, but that would not be more elegant...

http://stackoverflow.com/q/27253396
tagged with: css
has comment: http://stackoverflow.com/comment/42980887
has answer: http://stackoverflow.com/a/27253537
has body: I have a map area and I want to add border when hover each area. &lt;map name="Map" id="Map"&gt; &lt;area shape="rect" coords="350,2521,479,2592" href="http://www.iba.org.il/" target="_blank" class="tooltip-blue" data-tooltip-position="left" data-tooltip="?? ???????? ?? ????? ?????? ??????." data-hasqtip="87"&gt; &lt;area shape="rect" coords="625,454,760,523" href="http://easyvie.yolasite.com/#meas" class="tooltip-red" data-tooltip-position="left" data-tooltip="More info" data-hasqtip="88"&gt; &lt;/map&gt; Please help.
type: Question
tagged with: javascript
answer count: 2
downvote count: 4
upvote count: 0
has title: Add border on hover in Map area using jquery
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43123247
type: UnansweredQuestion
score: -4
has answer: http://stackoverflow.com/a/27253565
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27173196
has comment: http://stackoverflow.com/comment/42836666
accepted answer: http://stackoverflow.com/a/27173298
possible better answer: http://stackoverflow.com/a/27173416
has answer: http://stackoverflow.com/a/27173416
linked to: http://stackoverflow.com/q/27172383
type: AnsweredQuestion
has title: Not able to load the script file inside another script file
type: Question
has comment: http://stackoverflow.com/comment/42836779
has comment: http://stackoverflow.com/comment/42836654
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27173298
has body: Not able to load the script file inside another script file when using $.getJson(); inside the loaded script files. Consider fisrt.html: &lt;script&gt; $.getScript("second.js",function(){ // some code here }); &lt;/script&gt; my second js file is like: second.js: $.getJSON("somefile.json",function(){ }); When remove the $.getJSON from the second.js the files load perfectly without any problem. How can I load the my json file with $.getJSON? EDIT: complte json calling: $.getJSON('js/offline.json', function(data) { alert("success"); }.error(function(data){ alert(JSON.stringify(data)); });
tagged with: jquery

http://stackoverflow.com/comment/43065780
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27300733
has text: You might want to look at the drag event ... `srcElement` Gets the element that the event was originally dispatched to. `Target` Gets the element that is the target of the event. You might be grabbing the incorrect piece of data ...
score: 0

http://stackoverflow.com/q/27236203
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
score: 0
has title: Backbone - bind and unbind events on current view
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27236255
has body: I'm trying to understand whether is necessary to unbind an event that is binded on the current instance of a view. For instance when I do: $(this.el).on('click', callback); is it necessary to unbind the events (e.g. using off() or $(this).unbind('click') inside the callback function) or maybe the view will destroy the event and will give it to garbage collector?

http://stackoverflow.com/q/27168451
score: 4
tagged with: dom
downvote count: 0
has comment: http://stackoverflow.com/comment/42828566
tagged with: javascript
tagged with: jquery
has title: jQuery data(...) not stored in the DOM?
has answer: http://stackoverflow.com/a/27168529
favorite count: 0
has comment: http://stackoverflow.com/comment/42828420
accepted answer: http://stackoverflow.com/a/27168526
answer count: 3
has comment: http://stackoverflow.com/comment/42828474
upvote count: 4
possible better answer: http://stackoverflow.com/a/27168557
has answer: http://stackoverflow.com/a/27168526
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27168557
has body: If data-x is in the DOM like this : Hello and I modify it with $('#blah').data('x', 13687) then it seems that the data-x is not modified in the DOM (use browser's Inspect feature on the snippet code below) : Is this the normal behaviour? Example: console.log($('#blah').data('x')); $('#blah').data('x', 13687) console.log($('#blah').data('x')); Hello
type: Question
has comment: http://stackoverflow.com/comment/42828408

http://stackoverflow.com/comment/43075769
type: QuestionComment
has text: "*functionally equivalent*" does not mean they are the same thing. They are totally separate things that **behave** the same.
comment on: http://stackoverflow.com/q/27306633
score: 1
type: Comment

http://stackoverflow.com/comment/42808190
type: Comment
type: QuestionComment
has text: Explaining the final outcome that you expect makes it easier to find the correct answer.
score: 0
comment on: http://stackoverflow.com/q/27155301

http://stackoverflow.com/comment/43046732
has text: What do you mean you have taken care to delete all the references of 5.0 and you still get the same result ? Do you mean the parameters in the end like `?ln=primefaces&v=5.0`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27287779
score: 0

http://stackoverflow.com/comment/43093150
type: QuestionComment
has text: @plalx `my-service.js` is not loaded in the test. I do not know how to load it.
comment on: http://stackoverflow.com/q/27306336
score: 0
type: Comment

http://stackoverflow.com/a/27364649
upvote count: 1
score: 1
has body: Okay I fixed the code there were two things that I changed: -changed target to srcElement. -removed the a tags(parents of images) The a tag was removed because it changed the outcome of the data variable.(this wasn't a problem with chrome) So overall it seems that it might have been a problem with browser compatibility. Code that I changed from: ev.dataTransfer.setData("text", ev.srcElement.id); to: ev.dataTransfer.setData("text", ev.target.id); I want to thank rfornal for helping me with this question.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27300733
answers question: http://stackoverflow.com/q/27300733
type: Answer

http://stackoverflow.com/a/27307172
type: Answer
downvote count: 1
score: 1
has body: Definitely stick with the latter one as the first one is an implicit array construction and the same as: new Array().slice.call(this) Its constructing a new array that needs to be garbage collected afterwards since you dont use it. While both statements "work", the above mentioned does a lot of extra work, first you construct a new instance, then you look up if the instance itself has a slice property, as this is false the prototype chain is traversed and the slice is found on the Array.prototype and then called. Then you call it with your other array as scope, so essentially render the instance you created useless by using your other one. Thats why Array.prototype.slice.call(myarr) is the proper way of accessing the slice method.
has comment: http://stackoverflow.com/comment/43076639
answers question: http://stackoverflow.com/q/27307133
upvote count: 2

http://stackoverflow.com/comment/43069030
has text: It is possible to use rowSpan to create a desired table. Not sure why your other question was unanswered, I just posted an answer on how to use rowSpan http://stackoverflow.com/a/27303000/297641
comment on: http://stackoverflow.com/q/27302706
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43071667
type: Comment
has text: Are you calling the function `checkValue()`, and then expecting the code that starts with `if(document.getElementById("selecteErrorcat")...` to also be executed? If so, it won't be, because that code is not contained within the `checkValue()` function.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27303515

http://stackoverflow.com/a/63704014
type: Answer
answers question: http://stackoverflow.com/q/27178680
score: 5
upvote count: 5
has body: You have to create your own ctrl-click directive. To do this, navigate to your "directives" folder in your editor and create ones. You can do it by terminal writting: ng generate directive ctrl-click Once created, you have to edit it like following: import { Directive, ElementRef, EventEmitter, OnDestroy, OnInit, Output, Renderer2 } from '@angular/core'; @Directive({ // tslint:disable-next-line:directive-selector selector: '[ctrl-click]', }) export class CtrlClickDirective implements OnInit, OnDestroy { private unsubscribe: any; // tslint:disable-next-line:no-output-rename @Output('ctrl-click') ctrlClickEvent = new EventEmitter(); constructor(private readonly renderer: Renderer2, private readonly element: ElementRef) {} ngOnInit() { this.unsubscribe = this.renderer.listen(this.element.nativeElement, 'click', event => { if (event.ctrlKey) { event.preventDefault(); event.stopPropagation(); // unselect accidentally selected text (browser default behaviour) document.getSelection().removeAllRanges(); this.ctrlClickEvent.emit(event); } }); } ngOnDestroy() { if (!this.unsubscribe) { return; } this.unsubscribe(); } } If there is a conflict with "spec.ts" file, you can comment its constructor. Finally, you need to add to app.modules.ts file if it has not been added automatically: import { CtrlClickDirective } from './shared/directives/ctrl-click.directive'; @NgModule({ imports: [ ... CtrlClickDirective ], And then, you can use it in your html files. NOTE: You can not add listeners for both (click) and (ctrl-click) on the same element. The (click) event will fire every time. If you need both event listeners, then you need to nest them, like this: New Tab This should work fine, I hope I help you.
downvote count: 0

http://stackoverflow.com/q/27255375
upvote count: 2
type: UnansweredQuestion
score: 2
type: Question
has title: Div follow mouse and avoid browser boundaries
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27256980
has comment: http://stackoverflow.com/comment/42984696
has body: I've figured how to get a div to follow a mouse, but how can I get it to reposition when the div comes close to the edge of the browser window? For example, on Youtube, if you hover over the video makers name the div will always stay in the browser and never go off screen. Click here, hover over Lindsey Stirling and resize your browser a few times for a live example. Does anyone know how to do this?
tagged with: css

http://stackoverflow.com/a/27242789
answers question: http://stackoverflow.com/q/27242319
type: Answer
has body: try this without reload it should work: &lt;script&gt; function check(){ if(document.getElementById('3w').checked) { alert('3w'); }else if(document.getElementById('6w').checked) { alert('6w'); } } &lt;/script&gt; &lt;body onload="check()"&gt; &lt;input type="radio" name="pnltype" id="3w" value="3w" onclick="check()"/&gt; 3W &lt;input type="radio" name="pnltype" id="6w" value="6w" checked onclick="check()"/&gt; 6W &lt;/body&gt;
score: 0

http://stackoverflow.com/q/27227681
has answer: http://stackoverflow.com/a/27227785
accepted answer: http://stackoverflow.com/a/27227785
tagged with: angularjs
has body: In Angular, I have a variable var1 which is defined in an ng-init (I am aware that this isn't recommended practice). From my controller, if I do console.log($scope), I can see the variable var1 with its initialised value. If I console.log($scope.var1), I find that it is undefined app.controller('app', function($scope) { console.log($scope); // var1 appears here with it's initialised value console.log($scope.var1); // this is undefined }); Why might the first log show the initialised variable but the second not? ----- EDIT ------ Note if I do setTimeout(function() { console.log($scope.var1); }, 0); then var1 is defined.
type: AnsweredQuestion
tagged with: angularjs-controller
type: Question
has title: Variable visible in $scope but undefined when actually accessed in Angular
tagged with: javascript
tagged with: angularjs-scope
score: 0
answer count: 1

http://stackoverflow.com/q/27263543
tagged with: css
type: AnsweredQuestion
downvote count: 3
has answer: http://stackoverflow.com/a/27263674
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42999375
has title: Select custom file in a file upload
accepted answer: http://stackoverflow.com/a/27263674
has body: I want to use Choose File to select a file in a file upload. CAn anyone help me fix this using Javascript, Jquery, CSS, or some other method?
tagged with: file-upload
favorite count: 0
score: -3

http://stackoverflow.com/comment/42935266
score: 0
type: AnswerComment
has text: That's not the reason this doesn't work. The console shows a 'failed to load module' error because it didn't initiates a myApp module. It's no problem to have undefined {{variables}} in your HTML, it will just stay emtpy
type: Comment
comment on: http://stackoverflow.com/a/27229032

http://stackoverflow.com/comment/42880117
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27197662
has text: is this php, js & css all in separate files / places? Because obviously this code would not work... Does `el` give you the right DOM object?

http://stackoverflow.com/comment/42986945
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27255511
has text: @JBarry465 Also another thought would be using HTML5 data attributes to designate which need validation, then use a selector such as `$('[data-validation = true]')` to get a list of elements that need to be validated and run through it.

http://stackoverflow.com/comment/43076261
type: Comment
comment on: http://stackoverflow.com/q/27306938
type: QuestionComment
has text: yes it is possible. if the page is that large you'll want to read up on AJAX, jquery is especially handy for this. `html()`, `append()`, `appendTo()`, `empty()` and `remove()` are a few jquery methods you can use to achieve this...
score: 0

http://stackoverflow.com/comment/43081444
comment on: http://stackoverflow.com/a/27306692
has text: The ECMAScript specification uses that notation to indicate an object's internal `Prototype` rather than the public *prototype* such as that associated with a constructor, see [*ES5 table 8*](http://ecma-international.org/ecma-262/5.1/#sec-8.6.2).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27238691
answer count: 2
has comment: http://stackoverflow.com/comment/42954802
linked to: http://stackoverflow.com/q/1868333
downvote count: 0
accepted answer: http://stackoverflow.com/a/27239065
favorite count: 0
has comment: http://stackoverflow.com/comment/42954507
has body: I have a JSON array object as follows: var orders = [{ orderId: 1, firstName: 'John', lastName: 'Smith', address: { street: '123 Main Street', city: 'New York', zip: 10001 } }, { orderId: 2, firstName: 'John', lastName: 'Smith', address: { street: '456 Main Street', city: 'New York', zip: 10001 } }, { orderId: 3, firstName: 'John', lastName: 'Smith', address: { street: '123 Main Street', city: 'New York', zip: 10001 } }, { orderId: 4, firstName: 'John', lastName: 'Smith', address: { street: '123 Main Street', city: 'New York', zip: 10002 } }]; I am trying to use underscore.js to create a new array object, grouped by the address to meet the use case of displaying all orders that have been shipped to 123 Main Street, New York, 1001. Is underscore.js the right approach to do this? If so, how should I do so? Any hints will be helpful.
type: AnsweredQuestion
tagged with: underscore.js
has title: Group by on JSON array using Underscore JS
possible better answer: http://stackoverflow.com/a/27238804
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27238804
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/27239065

http://stackoverflow.com/comment/43060687
type: Comment
has text: @VladZ. Aaa, I was confused. Haha
score: 0
comment on: http://stackoverflow.com/q/27298150
type: QuestionComment

http://stackoverflow.com/q/27160198
upvote count: 1
has title: $.extend changes value for both parameters
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/27160225
type: AnsweredQuestion
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27160221
has body: There are 2 objects var var1 = {a: 1, b: 2}; var var2 = {b: 3, c:5}; Now, I want var 3 with value like this - var3 = {a:1, b:3, c:5} I want to achieve that without changing the values of var1 and var2 using jquery extend() method. How can I achieve that? After I run following command var var3 = $.extend(var1, var2) Now, the result is this var1 = {a: 1, b: 3, c: 5} // var1 is getting changed and i dont want this var2 = {b: 3, c:5}; var3 = {a: 1, b: 3, c: 5} var1 is now equal to var3 where as I do not want to change the value of var1 or var2
has answer: http://stackoverflow.com/a/27160324
has answer: http://stackoverflow.com/a/27160225
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27160221
answer count: 3

http://stackoverflow.com/a/27243713
answers question: http://stackoverflow.com/q/27243624
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27243624
type: AcceptedAnswer
has body: I assume that app.send converts the value to JSON. JSON.stringify only considers (own) enumerable properties and message is not enumerable: &gt; Object.getOwnPropertyDescriptor(new Error('foo'), 'message'); Object {value: "foo", writable: true, enumerable: false, configurable: true}
upvote count: 2

http://stackoverflow.com/comment/43028063
type: Comment
comment on: http://stackoverflow.com/a/27241778
has text: Ok John - I will give that a go and post a separate question if still having difficult getting it to behave as expected.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42827645
has text: i just want to trigger or simulate the click event onto that element. i dont need the event handler.
type: AnswerComment
comment on: http://stackoverflow.com/a/27167984
type: Comment
score: 0

http://stackoverflow.com/a/27164627
has comment: http://stackoverflow.com/comment/42821739
score: 0
answers question: http://stackoverflow.com/q/27164525
has comment: http://stackoverflow.com/comment/42821717
type: Answer
has comment: http://stackoverflow.com/comment/42821754
has body: $(document).ready(function(){ $('.block-leftnav ul li .parent a').prepend(''); });

http://stackoverflow.com/a/27170707
answers question: http://stackoverflow.com/q/27170294
type: Answer
has comment: http://stackoverflow.com/comment/42834910
has comment: http://stackoverflow.com/comment/42833457
score: 0
has body: You would just call phantomjs.exe rasterize.js http://someurl.com yourlocalfile.pdf. You can also add options like papaerformat and zoom. Take a look at the quick start page
has comment: http://stackoverflow.com/comment/42833446

http://stackoverflow.com/a/27219740
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27219107
has body: Take a look at the jQuery.ajaxSetup() method. It allows you to set default values for all Ajax requests. You can find more about it here: http://api.jquery.com/jQuery.ajaxSetup The options/settings that you can provide to ajaxSetup are the same as in jQuery.ajax() - more info here: http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings Here is an example that sets the X-CSRF-Token header for ajax requests: $.ajaxSetup( { beforeSend: function(xhr) { xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content')); } }); Here is another way of doing the same thing: $.ajaxSetup( { headers: { 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') } }); Please note that you have to execute the examples above before making any actual requests. Edit: Regarding the X-CSRF-Token header, if you are using jQuery with the jquery-rails gem this happens automatically. More here: http://apidock.com/rails/ActionView/Helpers/CsrfHelper/csrf_meta_tags Update: I must have misread your question; sorry about that! The solution I provided is specifically for Ajax requests. In JavaScript, HTTP basically means Ajax. If you're concerned with all client side requests, including Ajax, form submissions, clicking links, typing in the URL bar, asset requests for things like &lt;img&gt; and &lt;script&gt; tags, etc., you have to save a cookie in the Browser for a value to be available on every HTTP request. If you don't want to store anything on the client-side, then you are certainly out of luck because that kind of magic simply doesn't exist. It's like asking: How can I fly, but without an airplane or any other man-made device? At least that's how I interpret your question based on the information you've provided.

http://stackoverflow.com/q/27155207
has title: adding more than one list item into List at a time when the items are generated dynamically (using NAPA)
accepted answer: http://stackoverflow.com/a/27156165
tagged with: sharepoint-2013
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27156165
tagged with: sharepoint
type: Question
score: 0
has body: I am using the below code to insert an item into the list. function createitem() { var selectListBox = document.getElementById("txtFormName"); var selectedListTitle = selectListBox.value; var selectedList = web.get_lists().getByTitle(selectedListTitle); var listItemCreationInfo = new SP.ListItemCreationInformation(); var newItem = selectedList.addItem(listItemCreationInfo); newItem.set_item('Title','abc'); newItem.update(); context.load(newItem); context.executeQueryAsync(onItemCreationSuccess, onItemCreationFail); } Its working fine. Now I want to use newItem.set_item('Title1','def'); newItem.set_item('Title2','xyz'); . . . and so on in loop for more than one item in the same row to insert. How can i achieve that. kindly guide.
answer count: 1
tagged with: javascript

grunt-contrib-copy
type: Tag
tags question: http://stackoverflow.com/q/27216221
tag name: grunt-contrib-copy

http://stackoverflow.com/a/27229370
has body: I guess the problem is the server round-trip. For better user experience you should publish/subscribe the keywords list, e.g. make it available in the client, and then search client side. You should keep in mind, that the keyword list might grow very long. In my search package (Spomet, not 1.0 ready, though) I'm publishing only the 1000 most often used words (besides the most common stop words, like 'and'). My code isn't very tidy, but it might help nevertheless: Here is the client side handling. Searching at the client and than later update the client side results with real results from the server: https://github.com/Crenshinibon/spomet-pkg/blob/master/client.coffee Here is the server side code. The publishing happens close to the end of this file: https://github.com/Crenshinibon/spomet-pkg/blob/master/server.coffee One other aspect. You might consider reversing the data representation for your keywords. Use the keywords as the lookup (in a separate collection) and store the article ids, were the keyword in question is used, in an array. Search wikipedia for 'Inverted Index' for some background.
type: Answer
answers question: http://stackoverflow.com/q/27217769
score: 0

http://stackoverflow.com/comment/43087323
type: QuestionComment
type: Comment
has text: Not sure it's possible to help here. This is how browser renders it in this case.
comment on: http://stackoverflow.com/q/27313479
score: 0

http://stackoverflow.com/q/27197599
has answer: http://stackoverflow.com/a/27197994
has body: I've seen this question answered a number of ways, but none of the answers given work in my project. My application displays the user's previous choices in several divs. At the start of the application, none of the divs are populated. As the user answers questions, each of his/her previous answers are displayed in a div, until the user reaches a result page. Problem is, I can't figure out how to hide the divs until they are populated. My previous attempts have mostly centered around jQuery's $('.div:empty').hide, with no luck. Any Idea what I'm doing wrong? Views/Layouts/_user_choices.html.erb &lt;div class = "default_test" id = "first_bar" &gt; &lt;% if @category != nil %&gt; &lt;p&gt;&lt;%= @category.title %&gt;&lt;/p&gt; &lt;% else %&gt; &lt;!-- the div remains empty --&gt; &lt;% end %&gt; &lt;/div&gt; assets/javascripts/application.js: $(document).ready(function() { $('.default_test:empty').hide(); // this does not work });
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27197994
possible better answer: http://stackoverflow.com/a/27197714
tagged with: ruby-on-rails
tagged with: css
has title: Hiding a Dynamically Populated Div when Empty -- Rails 4
has answer: http://stackoverflow.com/a/27197714
has comment: http://stackoverflow.com/comment/42880938
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/27260140
has title: Is there a difference between Element and Attribute directives when using transclusion?
tagged with: angularjs-directive
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42993630
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27276679
has body: I am attempting to make a table directive that will have some more advanced functionality but when I was writing the basic version to build from I came across something I don't understand. I have a directive named "njTable" When I use it as an Attribute it works: Name Age State {{person.name}} {{person.age}} {{person.state}} However, when I used the exact same directive as an element it breaks: Name Age State {{person.name}} {{person.age}} {{person.state}} Here is the broken Plunker: http://plnkr.co/edit/zkpPcJG1ZZ5XjORJOoy6?p=preview Here is the functional Plunker: http://plnkr.co/edit/9W56YRREyuR4ew2rgVUc?p=preview Maybe I don't fully understand the difference between using a directive as an attribute vs using it as an element?
has answer: http://stackoverflow.com/a/27261168
downvote count: 0
has comment: http://stackoverflow.com/comment/42993611
has answer: http://stackoverflow.com/a/27276679
tagged with: javascript
favorite count: 0
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/42993720
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27261168
upvote count: 2

http://stackoverflow.com/a/41843250
has body: Make sure you grab the experience id from the video. var vid = document.getElementById('expirienceIdGoesHere'); var dataString = vid.data; dataString = dataString.replace('autoStart=false','autoStart=true'); vid.data = dataString; and set this on your popup click function
type: Answer
answers question: http://stackoverflow.com/q/27248378
score: 0

http://stackoverflow.com/comment/42978039
comment on: http://stackoverflow.com/q/27251318
type: Comment
type: QuestionComment
has text: Yep, you should have something like this: `[{ ... }, { ... }, { ... }]`.
score: 0

http://stackoverflow.com/comment/43006644
has text: Dealing with derived data was actually the original reason why Flux was developed at Facebook. Lots of benefits later emerged, however.
comment on: http://stackoverflow.com/a/27267083
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/q/27240951
possible better answer: http://stackoverflow.com/a/27241028
has answer: http://stackoverflow.com/a/27241028
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27241084
has answer: http://stackoverflow.com/a/27241031
type: Question
accepted answer: http://stackoverflow.com/a/27241031
tagged with: textarea
has title: jQuery empty out text area then append data does not work
tagged with: javascript
tagged with: jquery
answer count: 3
tagged with: append
has body: I have a textarea, I am supposed to empty out all the data, then append a new data. I tried something like this, but it always ended up empty data. The textarea is just a standard html input: myOldData //This resulting in empty data $('#mytextarea').val(''); $('#mytextarea').append("myData1"); $('#mytextarea').append("myData2"); but if: //This resulting in just myData1 $('#mytextarea').val(''); $('#mytextarea').val("myData1"); $('#mytextarea').append("myData2"); case 3 is if I don't need to empty out data and just append that will work fine: //This resulting in just myData1myData2 $('#mytextarea').val("myData1"); $('#mytextarea').append("myData2"); What is happening here? How can I empty out the data first, then append some new data?
score: 0
tagged with: input

http://stackoverflow.com/a/27211253
answers question: http://stackoverflow.com/q/27211053
score: 0
has comment: http://stackoverflow.com/comment/42903878
has body: Simple markers check this above example
type: Answer

http://stackoverflow.com/comment/42930353
type: QuestionComment
has text: Also which version of PhantomJS and CasperJS are you using?
score: 0
comment on: http://stackoverflow.com/q/27223088
type: Comment

http://stackoverflow.com/a/27161993
has body: I forked your fiddle and removed the space and new line before the container closing tag. Because you are setting display: inline-block, it will be treated as text and spaces behind the tags will be rendered as well. You can use display: block; float: left; instead. http://jsfiddle.net/1ancpbfm/1/
has comment: http://stackoverflow.com/comment/42817448
score: 1
accepted answer of: http://stackoverflow.com/q/27161908
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27161908
type: Answer
downvote count: 0

http://stackoverflow.com/a/27285551
upvote count: 2
type: Answer
score: 2
has body: It should be like this: $("tbody").on("focusout", "input", function() { alert("Focusing out"); }); Note that the "input" is moved to the second argument of on, this way it can apply to all future inputs on tbody instead of just the one that exists when it's first called. I recommend you read the jQuery.on docs
answers question: http://stackoverflow.com/q/27285528
accepted answer of: http://stackoverflow.com/q/27285528
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43006741
type: Comment
comment on: http://stackoverflow.com/q/27267894
has text: did you set the viewport?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/76554442
type: AnswerComment
comment on: http://stackoverflow.com/a/44327872
type: Comment
has text: I came to know about this issue while using jQuery and broke a function while matching a tagName.
score: 1

http://stackoverflow.com/comment/43012042
comment on: http://stackoverflow.com/q/27271100
score: 2
has text: `JSON.parse(yourJSONstring);`
type: Comment
type: QuestionComment

http://stackoverflow.com/a/63844458
downvote count: 0
score: 1
has body: Here is the straight forward approach function closeSidebar() { var html = HtmlService.createHtmlOutput(" "); SpreadsheetApp.getUi().showSidebar(html); } // anywhere on the server-side script (or code.gs) closeSidebar()
answers question: http://stackoverflow.com/q/27294656
upvote count: 1
type: Answer

http://stackoverflow.com/a/27213960
score: 0
has body: I think the best way to solve is to simply use a regex replace to do this: String.prototype.character = function() { return this.replace(/[aeiou]+/g, ''); //replace a, e, i, o and u with nothing. } function submit() { var input = document.getElementById('input').value; document.getElementById('output').innerHTML = input.character(); } Go!
type: Answer
answers question: http://stackoverflow.com/q/27213826
has comment: http://stackoverflow.com/comment/42908160

http://stackoverflow.com/comment/42881035
type: QuestionComment
has text: This is what I want but if I just require at the beginning the module gets executed at the wrong time.. it just executes when I run the application instead of in my specific function. is there some way to cache without launching?
score: 0
comment on: http://stackoverflow.com/q/27198191
type: Comment

http://stackoverflow.com/comment/42995749
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27231616
has text: thanks! using your updated code with "scrollLeft" did exactly what I wanted it to do! :-)
type: AnswerComment

http://stackoverflow.com/comment/42828869
comment on: http://stackoverflow.com/q/27168651
type: Comment
type: QuestionComment
has text: @Baart I am storing filter in variable filtername .. the quotes are being put by me to get the filtername from query string.
score: 0

http://stackoverflow.com/comment/42888926
type: Comment
has text: So is not considered a bad practice to commit the vendor js in phonegap apps?
type: AnswerComment
comment on: http://stackoverflow.com/a/27203067
score: 0

http://stackoverflow.com/comment/43039748
type: AnswerComment
type: Comment
has text: Do you understand what the issue is exactly? From what I understand the user needs to match string patterns and regex would be a very good approach, switching to indexOf if no wildcards are needed in the pattern. But regex can give the asker another perspective with which to tackle the issue. For users wondering why 'google.com' also matches 'googleacom' its because the .(dot) in regexes matches any character, if you need to match a dot exactly you need to escape it like so \.
comment on: http://stackoverflow.com/a/27285998
score: 0

http://stackoverflow.com/comment/43036253
has text: If it's `empty` there is no more child, that's why `removeChild` will be taken as an attempt of remove a non-existing property.
score: 0
comment on: http://stackoverflow.com/a/27283942
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27203565
tagged with: navigationbar
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27203714
has title: StopPropogation() not working
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
has body: I am coding a multilevel drop down menu in which when the parent is hovered, the submenu drops down with JQuery fadeIn(). But the effect is getting propagated to the child elements. They are also having fadeIn() when hovered on. The code is HTML ABOUT PRACTICE RESEARCH Papers Articles PhD Students Presentations JQuery $(document).ready(function() { $('nav > ul > li > ul').hide(); $('nav > ul > li').hover(function() { $(this).find('ul').fadeIn(400); },function() { $(this).find('ul').fadeOut(400); }); }); CSS nav { position: absolute; min-width:30%; float:right; right:12%; top: 16%; } nav ul li { display: inline-block; min-width: 20px; text-transform: uppercase; } nav ul li a{ float: left; padding: 0px 10px 0px 10px; } nav ul li ul { display: inline-block; position: absolute; width: auto; margin-left:-35%; margin-top:7%; } nav ul li ul li { display: inline-block; min-width:10px; } nav ul li ul li a { color:#7f8c8d; } When you hover your mouse over the child elements, they again fadeIn(). I tried e.stopPropagation() and e.preventDefault() but none of them are working. Please help

http://stackoverflow.com/comment/42884580
score: 0
type: Comment
type: QuestionComment
has text: Please provide the minimal HTML/CSS required to reproduce this or an online demo such as the inbuilt code snippet or jsfiddle. See [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
comment on: http://stackoverflow.com/q/27197964

http://stackoverflow.com/q/27248912
has title: give custom style to neighbours li with same class (active)
tagged with: javascript
has comment: http://stackoverflow.com/comment/42972238
score: 0
has comment: http://stackoverflow.com/comment/42972423
answer count: 1
has answer: http://stackoverflow.com/a/27249149
has comment: http://stackoverflow.com/comment/42972360
has comment: http://stackoverflow.com/comment/42972392
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to give a custom style to neighbours items with the same class, this is the example on jsfiddle i tried this code, but this gives style to the second, not the first or middle items .. ul li.active+li.active div { border-radius: 0 50% 50% 0; } the second line describe what i want to do exactly, the same idea if there is more than 2 active items .. how could i do that using css !
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42972502
tagged with: list
accepted answer: http://stackoverflow.com/a/27249149
type: Question

http://stackoverflow.com/q/27231579
tagged with: java
has title: Cannot escape a quotation(") character when retriveing a string containg quotation inside a string from DB in jsp
has answer: http://stackoverflow.com/a/27231880
has comment: http://stackoverflow.com/comment/42940062
type: Question
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/42940386
score: 0
answer count: 2
tagged with: string
type: UnansweredQuestion
has body: I have saved quotation(") in a string using escape character i database. That is working ok. But when i am retrieving the value in a jsp field from database, the string is being ended at the first quotation it gets in the whole string. I am giving an example below: Lets take a string that i have stored in database as - " Hello David. This is a "customer"." Now, i am somehow need to save the string back from databse into a hidden field in a jsp page like below- &lt;input type="hidden" name="string_from_database" id="string_from_database" value="&lt;%=some varibale that holds the data from database%&gt;"&gt; issue is - Part of the string is getting exposed (means it is being written on top of the page) which i do not want. In this case,the below phrase is written on the beginning of the jsp page, which i don't want. customer". kindly suggest on how to resolve this issue.
tagged with: html-escape-characters
has answer: http://stackoverflow.com/a/27241562

http://stackoverflow.com/q/27283008
favorite count: 0
possible better answer: http://stackoverflow.com/a/27283562
has comment: http://stackoverflow.com/comment/43034438
upvote count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/43034410
has title: I Need some javascript assistance
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27283562
score: -2
tagged with: javascript
has body: I recently made a post about this, but I phrased my question(s) wrong and stuff and deleted it so I go again. Ok so I have a website for a schoolproject, it's pretty hasty because we're gonna deliver soon and we're just adding some visual stuff to make the site look nicer and more appealing, so yes, its for homework/project. So therefore I went and copied a clock-code somewhere which i managed to get working and i dont fully understand every bit of it. Here is the code: tday =new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); tmonth=new Array("January","February","March","April","May","June","July","August","September","October","November","December"); function GetClock(){ d = new Date(); nday = d.getDay(); nmonth = d.getMonth(); ndate = d.getDate(); nyear = d.getYear(); nhour = d.getHours(); nmin = d.getMinutes(); nsec = d.getSeconds(); if(nyear<1000) nyear=nyear+1900; if(nhour == 0) {ap = " AM";nhour = 12;} else if(nhour <= 11) {ap = " AM";} else if(nhour == 12) {ap = " PM";} else if(nhour >= 13) {ap = " PM";nhour -= 12;} if(nmin <= 9) {nmin = "0" +nmin;} if(nsec <= 9) {nsec = "0" +nsec;} document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyear+" "+nhour+":"+nmin+":"+nsec+ap+""; setTimeout("GetClock()", 1000); } window.onload=GetClock; <h:body onload="updateClock(); setInterval('updateClock()', 1000 )"> x Ok, since my experience with javascript is pretty dire, I dont understand the IF-sentences, like what does 1000 and 1900 mean in this sort of scenario? where does AP come from? in the nmin and nsec, i understand what happens but can't explain... also the clockbox, what is innerHTML in this case? I hope this post and explanation is better..
answer count: 2
has answer: http://stackoverflow.com/a/27283157
accepted answer: http://stackoverflow.com/a/27283157

http://stackoverflow.com/comment/42981591
type: Comment
comment on: http://stackoverflow.com/a/27253844
score: 2
has text: Wow this one trolled in quite a crowd :)
type: AnswerComment

http://stackoverflow.com/comment/109080797
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27222562
has text: The code above does not add a link rel="canonical" - I suggest you test with that scenario, just in case the behavior is different.
score: 0

http://stackoverflow.com/a/27205181
has comment: http://stackoverflow.com/comment/42893129
type: Answer
has body: Your code is not working as expected because you're not closing the in HTMLString: $('ul').append(' '); So jQuery will create two and append it to all existing on each iteration it should be $('ul').append(' '); or just $('ul').append(' '); or $('ul').append($(' ')); You can create the grid as shown below: $(document).ready(function () { $('button').click(function () { var height = prompt("Enter your height (less than 64)"); var width = prompt("Enter your width (less than 64)"); if (height > 64) { alert("You can't make height more than 64!"); return; } if (width > 64) { alert("You can't make width more than 64!"); return; } for (i = 0; i < height; i++) { // iterate n number of times according to height // upon each iteration create one ul $(" ").appendTo('#container') // create n number of li according to width and append them to the ul .append(new Array(parseInt(width)+1).join(" ")); } $('li').hover(function () { $(this).css('background-color', 'red'); }); }); }); quotes { margin-left: 25px; margin-top: 10px; } button { margin-left: 130px; margin-top: 4px; } ul { margin: auto; padding: auto; } ul li { list-style: none; display: inline-block; height: 20px; width:30px; border: 1px solid black; } Press the button to create your own Grid New Grid
has comment: http://stackoverflow.com/comment/42893238
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42892975
has comment: http://stackoverflow.com/comment/42893098
downvote count: 0
has comment: http://stackoverflow.com/comment/42893181
answers question: http://stackoverflow.com/q/27205048

http://stackoverflow.com/q/27309713
linked to: http://stackoverflow.com/q/25248286
has comment: http://stackoverflow.com/comment/43081416
linked to: http://stackoverflow.com/q/1687296
answer count: 1
tagged with: javascript
tagged with: event-handling
tagged with: dom-events
has comment: http://stackoverflow.com/comment/43081449
score: 0
has comment: http://stackoverflow.com/comment/43080986
has body: I want to know how exactly event delegation works internally in JS ? People in Stack Overflow have already answered what is Even Delegation (What is Event Delegation) but I don't see any point or note on how it works. How does parent node know which child node is clicked? Somewhere it should be stored right?
has title: How Event Delegation Works internally in JavaScript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27310091
type: Question

http://stackoverflow.com/comment/42926392
comment on: http://stackoverflow.com/a/27224015
type: Comment
has text: Perhaps I'm not implementing it right, but I tried it both in my .mousemove callback function and in my countSeconds function and in both cases I'm keep getting some huge numbers, starting with 0 and reaching hundreds in a matter of a few seconds. Here's a JSFiddle of what I'm having: http://jsfiddle.net/jore6jgn/1/
type: AnswerComment
score: 0

http://stackoverflow.com/q/27197822
has comment: http://stackoverflow.com/comment/42880356
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42880598
has comment: http://stackoverflow.com/comment/42880464
answer count: 2
has answer: http://stackoverflow.com/a/27197980
has answer: http://stackoverflow.com/a/27197998
has comment: http://stackoverflow.com/comment/42880584
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/42880610
has comment: http://stackoverflow.com/comment/42880632
possible better answer: http://stackoverflow.com/a/27197998
type: AnsweredQuestion
upvote count: 0
score: -5
accepted answer: http://stackoverflow.com/a/27197980
has body: Your Javascript must follow the following guidelines: If the income is $70,000 or above the tax rate starts at 70% (the % sign will not show) If the income is $20,000 or below the tax rate starts at 10% (the % sign will not show) Otherwise the tax rate starts at 25% I know there are likely 1000 mistakes but anything that would help me get through this question would help my function isn't working and i am pretty sure im not even on the right track The Taxman Your Tax Information Income RRSP Tax Rate Taxes Paid Refund or Due Extra Deductions- Children Spouse Both None Over age 65? Special Cases None Hardship Claimed Mercy Lawyer Your Tax Rate
has comment: http://stackoverflow.com/comment/42894452
favorite count: 0
has title: beginner trying to apply a tax rate to an individual's income
type: Question

http://stackoverflow.com/q/27278765
has body: i have a canvas 1 of 500w * 500h which contains the wide background image of 5000w * 500h. i wrapped the canvas with a div 500*500 to create a viewport by setting overflow:hidden so that background is loaded first but only 500w of the background is shown and the rest will be shown by scrolling the viewPort division using scrollLeft property .i added an event listener which checks if -> or &lt;- key is pressed and scrolls the viewport accordingly. my problem is With everything loaded and setup properly (images of background properly loaded and drawn on canvas) , when i use following code window.onload=function (){ //images are loaded and drawn //necessary variables defined here //view is the element id of the viewport div and is also properly accessed window.addEventListener("keydown",function(e){ keyPressFlag = true; if(e.keyCode == 39) //-&gt; key {view.scrollLeft+=3;} }); }; the scrolling effect is obtained. But when i try to implement the same effect following way, i the same effect is not obtained. i can see that RIGHT MOVED is logged into console, but the scrolling doesnot takeplace. window.onload=function (){ //images are loaded and drawn //necessary variables defined here //view is the element id of the viewport div and is also properly accessed //keyPressFlag = false; and keyPressed = 0 initially function move() { if(keyPressed == 37) { console.log("LEFT MOVED"); view.scrollLeft -=3; } if(keyPressed == 39) { console.log("RIGHT MOVED"); view.scrollRight +=3; } } window.addEventListener("keydown",function(e){ console.log("Key Pressed"); keyPressFlag = true; keyPressed = e.keyCode; move(); }); window.addEventListener("keyup",function(e){ console.log("key Released"); keyPressFlag = false; }); }; what should i do to make the background scroll by calling move function when the event is triggered?
has answer: http://stackoverflow.com/a/27279067
tagged with: html5-canvas
answer count: 1
favorite count: 0
tagged with: css
accepted answer: http://stackoverflow.com/a/27279067
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
has title: HTML 5 canvas scroll event listener not working
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27448505
upvote count: 1
has body: You can try to use canvas-fingerprinting. The idea behind this is that every hardware generates unique sparks on the html-canvas. By saving and analyzing the generated canvas you can reidentify your user. Example source code: https://github.com/Valve/fingerprintjs There is even a testpage here: http://valve.github.io/fingerprintjs/ Scroll down until you see Your browser fingerprint. Works for me even after changing the UserAgent completely.
answers question: http://stackoverflow.com/q/27184381
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42852337
score: 1
type: AnswerComment
type: Comment
has text: @minitech: Yup! I type slowly... :p
comment on: http://stackoverflow.com/a/27182182

http://stackoverflow.com/a/27194673
score: 15
answers question: http://stackoverflow.com/q/27194558
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27194558
has comment: http://stackoverflow.com/comment/42874765
type: Answer
upvote count: 15
has body: Try this: var event1 = {id: 1, title: 'ABC', start: '10'}; var event2 = {id: 2, title: 'ABC', start: '10'}; var event3 = {id: 3, title: 'DEF', start: '12'}; var event4 = {id: 4, title: 'DEF', start: '20'}; var events = [event1, event2, event3, event4]; var result = events.reduce(function(memo, e1){ var matches = memo.filter(function(e2){ return e1.title == e2.title &amp;&amp; e1.start == e2.start }) if (matches.length == 0) memo.push(e1) return memo; }, []) console.log(result)
downvote count: 0

http://stackoverflow.com/a/27204235
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27204130
answers question: http://stackoverflow.com/q/27204130
upvote count: 1
type: Answer
has body: It parses HTML and removes tags in a manner that is really pretty loose. It can fail in certain circumstances. For example if there's a &gt; inside an attribute value, or if there's a &lt; in the text without a tag name directly after it, it'll mess up the result. It also optionally truncates the text returned. The while loop ensures that the truncated text happens at a space character. So if you pass it a string of HTML, aside from the problems I noted above, it'll give you back the string without the tags. And if you pass it a number as the second argument, it'll limit the length to that number (again, except that it'll add to it to avoid chopping a word in half).
downvote count: 0
score: 1

http://stackoverflow.com/q/27211653
tagged with: javascript
has comment: http://stackoverflow.com/comment/42904338
has answer: http://stackoverflow.com/a/27211687
has comment: http://stackoverflow.com/comment/42904289
possible better answer: http://stackoverflow.com/a/27211777
tagged with: time-complexity
has answer: http://stackoverflow.com/a/27211777
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/42904354
accepted answer: http://stackoverflow.com/a/27211687
type: AnsweredQuestion
tagged with: performance
upvote count: 5
has answer: http://stackoverflow.com/a/27211693
has comment: http://stackoverflow.com/comment/42904325
has answer: http://stackoverflow.com/a/27211842
type: Question
has title: Another way to get all combination of integers of an array Javascript
score: 5
has comment: http://stackoverflow.com/comment/42904274
linked to: http://stackoverflow.com/q/3978492
has body: I want to iterate an array and find all pairs where their difference is 2 This is what i have so far: var numberOfCases = 5; var diff = 2; var input = [1,5,3,4,2]; getPossiblepairs(input); function getPossiblepairs(input){ for(cmp in input){ for(number in input){ if((input[cmp] - input[number]) == diff){ console.log("("+input[cmp]+","+input[number]+")"); } } } } This works but i still feel guilty using two for loops as the bigO is O(n^2) Is this the only way to do this?
tagged with: arrays
downvote count: 0

http://stackoverflow.com/q/27268174
linked to: http://stackoverflow.com/q/22697157
score: 19
has answer: http://stackoverflow.com/a/27268332
type: AnsweredQuestion
tagged with: forms
has answer: http://stackoverflow.com/a/70392220
type: Question
linked to: http://stackoverflow.com/q/10395665
has answer: http://stackoverflow.com/a/27268196
accepted answer: http://stackoverflow.com/a/27268196
has title: Reset a form except one field with Javascript
tagged with: javascript
has body: For some reason, I need to reset a form but I want one field to remain unchanged. This following code clears all the fields but I would like to keep the first one unchanged. Reset If possible, I would like to avoid jQuery.
possible better answer: http://stackoverflow.com/a/34916946
downvote count: 2
linked to: http://stackoverflow.com/q/5716642
upvote count: 21
has answer: http://stackoverflow.com/a/34916946
favorite count: 0
has answer: http://stackoverflow.com/a/57149045
linked to: http://stackoverflow.com/q/34906790
has comment: http://stackoverflow.com/comment/57569180
answer count: 5

http://stackoverflow.com/a/27239392
answers question: http://stackoverflow.com/q/27239279
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27239279
has body: Change .html(...) to .val(...) $("#apply").on("click",function() { var orange = $("#agent_option").val(), lock = $("#ax_disallowed").val(); $("#textareaFixed").val(orange + " " + lock ); });

http://stackoverflow.com/a/27285842
type: Answer
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: using pure javascript: document.getElementById("number").value = zzz;
answers question: http://stackoverflow.com/q/27285796
accepted answer of: http://stackoverflow.com/q/27285796

http://stackoverflow.com/q/27166417
has answer: http://stackoverflow.com/a/27207325
tagged with: angularjs
type: Question
has body: I fill a dropdown list with an array containing objects with a date attribute. The list is binded on a date variable. An angular boostrap calendar is binded on this variable. mm/dd/yyyy The binding works when I select an element in the select, the element is selected in angular boostrap calendar. When I select the element in the calendar, the date is not selected in the dropdown list. I think angular can't find the matching object in the dropdown based on the date. Is angular bootstrap calendar can be bind on a string ?
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: angular-ui-bootstrap
has title: angular : how can i bind select containing date with angular bootstrap calendar?

http://stackoverflow.com/q/27233774
has title: Getting called method instance based on name/signature using JQuery
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42945350
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42945457
score: 0
has body: We have a JQuery plugin that scans for attributed instructions and does some internal wire up of routines. We would like to allow content owners to provide us with a Name of a method that matches a predefined signature which we will call within our process at the appropriate time. At design time you might normally do something like this: myplugin.callback = function (){ /* Do stuff */ } We want the caller to describe the reference and we will scan it and set things up once the DOM is ready. Something like the following: Content owner defines their intent &lt;div callback="MyMethodName"&gt; We find the instruction and then attach it to the required callback point in our plugin var methodRef = ?????; myplugin.callback = methodRef Is there a mechanism in JQuery to find a method by its name/signature and create an invokable reference to it?
linked to: http://stackoverflow.com/q/359788
tagged with: jquery

http://stackoverflow.com/comment/42988269
comment on: http://stackoverflow.com/q/27257166
has text: Can you post the PHP code for getdata.php?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27169375
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27176287
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
has title: How to update bound data in d3.js?
accepted answer: http://stackoverflow.com/a/27176287
has body: I want to update a network graph dynamically in D3.js. Now my code is: var color = d3.scale.category20(); var my_nodes = [{"cluster": 0, "x": 50, "y": 50}, {"cluster": 0, "x": 100, "y": 50}, {"cluster": 1, "x": 100, "y":100}]; var vis = d3.select("body").append("svg").attr("width", 500).attr("height", 500); var nodes = vis.selectAll("circle.node").data(my_nodes).enter().append("g") .attr("class", "node"); var circles = nodes.append("svg:circle") .attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }) .attr("r", 5) .style("fill", function(d) {return color(d.cluster)}); This code works. But when I update data like: var new_nodes = [{"cluster": 0, "x": 50, "y": 50}, {"cluster": 2, "x": 100, "y": 50}, {"cluster": 2, "x": 100, "y":100}]; nodes.data(new_nodes); doesn't work. How can I update bound data? EDIT: What I want to do is replacing old data my_nodes with new data new_nodes. Is there any way to update the attribute cluster of each bound data? EDIT2: Suppose I do: d3.select("body").select("svg").selectAll("circle").data(mydata).enter().append("svg:circle"); Can I modify mydata?
favorite count: 0
possible better answer: http://stackoverflow.com/a/27171893
has answer: http://stackoverflow.com/a/27171893
tagged with: d3.js
has comment: http://stackoverflow.com/comment/42830945
score: 11
upvote count: 11

http://stackoverflow.com/a/27260499
type: Answer
has comment: http://stackoverflow.com/comment/42994234
has comment: http://stackoverflow.com/comment/42994256
has comment: http://stackoverflow.com/comment/42994426
has comment: http://stackoverflow.com/comment/42995188
score: 0
answers question: http://stackoverflow.com/q/27260383
has body: The link does not show the .html on about ... try: About Us

http://stackoverflow.com/comment/43084360
comment on: http://stackoverflow.com/a/27311318
has text: tnx,it's a kind of a thing that i need.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27169931
tagged with: ember.js
answer count: 1
tagged with: ember-cli
has comment: http://stackoverflow.com/comment/42874090
has comment: http://stackoverflow.com/comment/42832079
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27173290
has comment: http://stackoverflow.com/comment/42832094
type: Question
has body: I have a requirement to make what is essentially a dynamic form (wizard) that has multiple steps. Now I want to be able to quickly add new steps to the wizard in the future (or remove them) so I don;t to create separate routes for each step like so: this.resource('wizard', { path: '/' }, function() { this.route('step1', { path: '/' }); this.route('step2'); this.route('step3'); this.route('step4'); this.route('step5'); }); I would much prefer to have a dynamic segment that takes in the name of the step and loads the corresponding template of the same name, like so this.resource('wizard', { path: '/' }, function() { this.route('step', { path: '/:step' }); }); Is this at all possible or is this just wishful thinking.
has title: Templates on dynamic segments
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27173290

http://stackoverflow.com/q/27199728
has body: I have the form with text area.In the text area user can enter keywords per line. I want to do like this. After click the button send ajax request to the server and get result of the first keyword.Then display/append it.After that finished send second ajax request for 2nd keyword.Like this for per each keyword. I want to do this because of server response is little slow per keyword.If display all keyword output at once that is getting too many time to see the result. So in above method I think user no need to wait for see the all results.User can see one by one keyword output. My code is like this and I'm using this in the wordpress plugin.Get result as json. jQuery(document).ready(function () { jQuery('#get_seo_rank').click(function() { var keywordLines = jQuery('#keywords').val().split(/\n/); var current = 0; var total = keywordLines.length; for (var i=0; i &lt; total; i++) { jQuery.ajax({ type : "post", dataType : "json", url : process.php, data : { action: "get_rank", keywords: keywordLines[i] }, beforeSend:function(){ }, success:function(response){ if(response.type == "success") { jQuery("#resultWrap").append(response.result); } else if(response.type == "error") { jQuery("#resultWrap").html(response.result); } else { jQuery("#resultWrap").html(response.result); } }, error:function(response){ } }); } // end loop }); // end click event }); If anyone can help regarding this that would really appreciate. Thank you very much !
tagged with: php
linked to: http://stackoverflow.com/q/22233650
has answer: http://stackoverflow.com/a/27201872
has comment: http://stackoverflow.com/comment/42883575
type: AnsweredQuestion
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/27201872
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: jQuery send and display ajax result per line of textarea
has comment: http://stackoverflow.com/comment/42886779
score: 0

http://stackoverflow.com/q/27159193
has body: A quick summary: From a Phone Call Activity I have a related Entity Contact, I then relate a Contact to an Account. So, from Phone Call I want to get some data from the related Contact's Account and do this by: var lookup = Xrm.Page.getAttribute("regardingobjectid").getValue(); XrmServiceToolkit.Rest.Retrieve(lookup[0].id, 'ContactSet', 'ParentCustomerId', null, function (account) { alert(String(account)); }, function (error) { alert("in error handler"); alert(error.message); }, true); Where ParentCustomerId is of type 'Entity' in Contact. I can get the Name of the account (by account.Name) and a few other (seemingly) random fields (none of which are the one I need), but not the ID of the account (which then I can use in another Retrieve). Thoughts?
upvote count: 1
has title: XrmServiceToolkit Retrieve an Entity
score: 1
type: Question
tagged with: dynamics-crm-2011
has comment: http://stackoverflow.com/comment/42947998
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42843248
has answer: http://stackoverflow.com/a/32480226
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27209130
has body: I'm not entirely sure what you're asking, but let me introduce getter functions. Like var object = { x: 1, get y() { return this.x; }, z: function () { return this.x // works fine } } console.log(object.y); // 1 Such a method is still a function, but it behaves like a property. Maybe this will help you in any way. Having that said, there is no way or more precisely, no syntax in Javascript where you can access object properties the way you propose.
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42900192
answers question: http://stackoverflow.com/q/27209114
has comment: http://stackoverflow.com/comment/42900175
has comment: http://stackoverflow.com/comment/42900230
has comment: http://stackoverflow.com/comment/42900170
accepted answer of: http://stackoverflow.com/q/27209114

http://stackoverflow.com/q/27245168
has answer: http://stackoverflow.com/a/27245251
upvote count: 1
has body: Sometimes when I do front-end development, I use MAMP as a web-server so that I don't have to deal with CORS-errors. Since I upgraded to mavericks MAMP won't work any more and it is pretty heavy. Is there something simpler or more lightweight built in or easily installed?
has answer: http://stackoverflow.com/a/27245197
possible better answer: http://stackoverflow.com/a/27245213
has title: Is there a simple html-webserver for mac?
has answer: http://stackoverflow.com/a/27611842
has answer: http://stackoverflow.com/a/27245213
has answer: http://stackoverflow.com/a/27245218
accepted answer: http://stackoverflow.com/a/27245251
answer count: 5
tagged with: javascript
tagged with: mamp
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: macos
favorite count: 0
type: Question

http://stackoverflow.com/comment/42809477
score: 0
type: Comment
type: QuestionComment
has text: You can try writing code to solve this problem.
comment on: http://stackoverflow.com/q/27157667

http://stackoverflow.com/comment/42917740
type: Comment
has text: That's why you have that extra check before the rest of your code after it. See above.
comment on: http://stackoverflow.com/a/27219153
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42818958
comment on: http://stackoverflow.com/a/27162972
score: 2
type: AnswerComment
has text: Just `^[\w.]+$` would do the same thing.
type: Comment

http://stackoverflow.com/comment/42971747
has text: In that case, instead of having URLs that look like `http://example.org/bla/Page_1` and so on, you probably want them to look like this: `http://example.org/bla?Page_1`. Notice the question mark :). I'm asuming `bla` is the `html` file of your webapp and that the server redirects it to `bla.html`.
comment on: http://stackoverflow.com/a/27239037
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27178725
downvote count: 2
type: Question
has body: I would like to use grunt serve command to serve my Angular/Cordova App from www directory. I installed Grunt but if im tryed to use Grunt serve i got: A valid Gruntfile could not be found. So i tried to Grunfile.js from another project but i got a lot of errors. I cannot use Yeoman in this case, because project is quite large and under git controll. I would like just simple serve content of the www foler into browser. What should to contain gruntfile.js for this? Thanls for any advice.
score: -2
has title: Grunt serve inside the Cordova App, how to?
tagged with: javascript
tagged with: gruntjs
upvote count: 0
answer count: 1
favorite count: 0
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27178825

http://stackoverflow.com/q/27262998
has comment: http://stackoverflow.com/comment/42998670
answer count: 1
tagged with: websocket
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27263223
score: 0
has body: [deprecated] ok I'm opening a connection to a specific port, and keeping it open therefore I cannot open a second connection to the same port. Seeing that it took me too long to find the answer, I'm going to leave this question. I would like to know if I can have more than one instance of a websocket running in the same webpage. I'm building an application just for learning , and I would like to display in the same page the notifications and a separated notification box. I'm creating the websocket in java ,i m using the struts 2 framework, and javascript for handling the client side. &lt;script language="javascript" type="text/javascript"&gt; var wsPath = "&lt;s:url value='/websocket' /&gt;" + isComment + id; var wsUri = "ws://" + window.location.host + wsPath; var websocket = new WebSocket(wsUri); I'm going to try creating a secondary "set" of functions and a new instance of the same websocket class to have something like this: websocket.onopen = function(evt) { onOpen(evt) }; websocketnotifications.onopen = function(evt) { onOpenNotifications(evt) }; I would like to know if this is the normal way to do it or if there is a better way. Because I'm not finding any other solution, and I would like to implement it in the right way.
has comment: http://stackoverflow.com/comment/42998629
has title: Multiple websockets java
has answer: http://stackoverflow.com/a/27263223
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42998513
tagged with: java
type: Question
has comment: http://stackoverflow.com/comment/42998587

http://stackoverflow.com/comment/47852597
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27184704
type: Comment
has text: Thanks Bass, I don't really see how that helps. Cheers.

http://stackoverflow.com/comment/43080049
comment on: http://stackoverflow.com/a/27309173
score: 0
type: Comment
has text: there is no `.text()` for textarea instead use `.val()` as shown in my answer.
type: AnswerComment

http://stackoverflow.com/comment/42981691
type: AnswerComment
score: 0
type: Comment
has text: Have you tried to remove [code] var enemies = null; [/code]?
comment on: http://stackoverflow.com/a/27249827

http://stackoverflow.com/a/27283979
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27283810
has body: Do everything the same, just parse the user input to an integer. The issue here is that the numbers are being treated as strings. Modify your sum function like this: //Function to Sum Array function sum(params){ var total = 0 ; for (i = 0; i &lt; params.length; i++){ $num = parseInt(params[i]); total += $num; } return total; } That's it, you're done.

http://stackoverflow.com/q/27212733
has title: I want to print sum of two numbers in Javascript
score: -4
type: Question
tagged with: javascript
downvote count: 4
upvote count: 0
answer count: 1
has body: My code is not working and I don`t know why. I want to make simple thing that input two numbers and prints the sum of them. This is my code: &lt;script type="text/javascript"&gt; var num1, num2, sum; num1 = window.prompt("Enter number one"); num2 = window.prompt("Enter number two"); sum = num1 + num2; window.alert(num1 + "+" + num2 + "=" + sum); &lt;/script&gt;
favorite count: 0
linked to: http://stackoverflow.com/q/8976627
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/8976627
has answer: http://stackoverflow.com/a/27212758

http://stackoverflow.com/comment/42951812
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27229592
has text: @MichaelPerrenoud, thanks for the answer. `home_ctrl.js` is accessible from the browser, the issue was in duplication of module loading. I posted an answer with details
score: 0

http://stackoverflow.com/q/27210449
has comment: http://stackoverflow.com/comment/42919330
tagged with: node.js
answer count: 0
type: Question
tagged with: mongoose
tagged with: javascript
has body: if i have a schema called stores with the properties { storeid: ???, Address: String, Phone: Number } ect... how do i set the storeid's value to equal the _id value of that same schema so that they are duplicates? The only idea I have is to go back and set the storeid value manually after creating a new store but I am hoping there is a way to do this when the document is being created.
score: 0
has title: How to set schema field value as document _id value in mongoose?
has comment: http://stackoverflow.com/comment/42913978
has comment: http://stackoverflow.com/comment/42904839
type: UnansweredQuestion

http://stackoverflow.com/comment/42822981
type: AnswerComment
has text: Fixed the greedy quantifier.
type: Comment
comment on: http://stackoverflow.com/a/27152982
score: 0

http://stackoverflow.com/q/27287549
has comment: http://stackoverflow.com/comment/43042419
type: Question
has comment: http://stackoverflow.com/comment/43041997
has body: I have a jquery mobile page that has a textbox and a button. When the button is clicked, I want to add an additional textbox. However, the new textbox is not styled properly. I've tried using .trigger('create') when appending my textbox but it is still not styling. Here is a working fiddle And here is my code: HTML: Name of the Author Javascript:
has comment: http://stackoverflow.com/comment/43041976
tagged with: jquery-mobile
has title: I can't dynamically style my added content to my jquery mobile site
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/507138
score: 0
linked to: http://stackoverflow.com/q/19591958
has comment: http://stackoverflow.com/comment/43042064
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/19591958
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43042926
has comment: http://stackoverflow.com/comment/43042094
has comment: http://stackoverflow.com/comment/43042403

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/27225600
type: Tag

http://stackoverflow.com/comment/43052327
type: QuestionComment
comment on: http://stackoverflow.com/q/27293581
has text: this is just an example of the logic, syntax might not be correct
score: 0
type: Comment

http://stackoverflow.com/q/27287962
tagged with: php
has body: I am trying to implement jQuery File Upload (blueimp) with zend framework 2. I put all the js and css files inside public folder and trying to upload the files inside public folder. But unfortunately when I submit the Start upload button its giving below error SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data But my browser and server supports json, I have tested. Its running fine when test for jQuery File Upload (blueimp) demo on my local server. Please help me if you have any idea. Thanks in advance.
downvote count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/43042588
score: 1
type: Question
has title: jQuery File Upload (blueimp) with zend framework 2 (zf2)
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/43043201
has comment: http://stackoverflow.com/comment/43042665
upvote count: 1
has comment: http://stackoverflow.com/comment/68864638
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: zend-framework2

http://stackoverflow.com/comment/42848318
has text: my `enemies[id] = baddie;` seems like doing nothing, I tried to `setInterval(function() { for (var i = 0; i < enemies.length; i++) { $('#debug').text(enemies); } },500);` (sorry for the code it's just to see what the array contains everytime an enemy is created So I created `enemy = new Array; enemy.push('#enemy' + baddie.id);` and the setInterval + for worked for enemy maybe should I use this array ? I'm really disturbed by the enemies array
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27178913

http://stackoverflow.com/comment/43071157
comment on: http://stackoverflow.com/q/27303981
has text: What if i add _1, _2, _3, _4 on every id on each row? That would make them unique.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42805555
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/27155645
type: Comment
has text: It's a pretty useless function if I do say so myself. Lmao

http://stackoverflow.com/q/27167655
score: 1
has comment: http://stackoverflow.com/comment/42827167
type: Question
has comment: http://stackoverflow.com/comment/42827049
tagged with: javascript
tagged with: jquery
has title: jQuery Datepicker Show Current Date
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42827343
favorite count: 0
has body: Datepicker script: $(function(){ $( "#task_start_date").datepicker({ dateFormat: 'dd-M-yy', showOn: 'button', buttonImage :image_us, buttonImageOnly: true }); HTML Input: &lt;input type="text" class="form-control validate[required,custom[date]]" name="task_start_date" id="task_start_date" /&gt; When clicked in calendar icon, dateFormat: 'dd-M-yy', outputs 27-Nov-2014 and shows the current date highlighted, but dateFormat: 'dd-M-y', outputs 01-MAR-12 and shows 01-MAR-12 as highlighted instead of current. I am using jQuery Validation Engine to validate the date format. The below fiddle works fine but not with the expected date format. JS Fiddle: Fiddle Thanks.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27168554
tagged with: datepicker
has comment: http://stackoverflow.com/comment/42827127
downvote count: 0

http://stackoverflow.com/q/27310018
has comment: http://stackoverflow.com/comment/43081354
tagged with: javascript
has answer: http://stackoverflow.com/a/27310656
has answer: http://stackoverflow.com/a/27311636
has answer: http://stackoverflow.com/a/27310072
has body: Add Comment In the conversation field,after Add Comment the page redirects to the next page..how it will be fixed on the same page..??
has title: How to redirect to the same page after comment
score: 0
has answer: http://stackoverflow.com/a/27310178
has comment: http://stackoverflow.com/comment/43082196
type: UnansweredQuestion
answer count: 4
has comment: http://stackoverflow.com/comment/43082102
tagged with: java
type: Question

http://stackoverflow.com/comment/43009256
type: AnswerComment
comment on: http://stackoverflow.com/a/27269393
score: 0
type: Comment
has text: socket.io requires nodejs though

http://stackoverflow.com/comment/42843764
type: Comment
has text: Please, make your own answer instead of copying mine.
score: 0
comment on: http://stackoverflow.com/a/27177298
type: AnswerComment

http://stackoverflow.com/comment/43031672
has text: When you talk about using the add_to_cart() action for example, I really don't understand how I am supposed to use that client-side via an Ajax call. The example of an Ajax call that I have in my OP is all I can basically perform on the client. There are no WC functions available for me in the window to call. So how do I combine what's in the PHP code you have provided with an Ajax call ont he client? e.g.What should my Ajax Request URL be? What about the data format containing all the relevant item details or the query parameters syntax in my Request URL?This is what I'm having trouble with..
comment on: http://stackoverflow.com/a/27278035
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42870858
has text: [This may help u](http://stackoverflow.com/questions/5767325/remove-specific-element-from-an-array)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27191614
type: Comment

http://stackoverflow.com/a/27169599
score: 4
upvote count: 4
type: AcceptedAnswer
has body: As you are adding img and span to a new created div, you can delete the whole div: $(this).closest('div').remove(); JSFiddle Demo.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27169499
answers question: http://stackoverflow.com/q/27169499
type: Answer

http://stackoverflow.com/a/27221539
upvote count: 3
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27221496
answers question: http://stackoverflow.com/q/27221496
has body: At first, to use multiline string in JavaScript, you have to put backslashes to the end of each line. Example: var str = "This\ is\ multiline\ sting."; Also, if you want to ADD html to body, not to replace it, do it in that way: if ($('#checkbox:checked').length &gt; 0) { $("body").append("\ &lt;style&gt;\ .selected{\ background-image: url('http://www.website.com');\ }\ &lt;/style&gt;\ "); } (I added .length to your selector, because you can not compare 0 with array) I didn't tested, but it should work.

http://stackoverflow.com/q/27253877
tagged with: object
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42981836
has title: Assign dynamic array to object
has comment: http://stackoverflow.com/comment/42981802
has answer: http://stackoverflow.com/a/27254865
has comment: http://stackoverflow.com/comment/42981776
has answer: http://stackoverflow.com/a/27257095
has comment: http://stackoverflow.com/comment/42982260
tagged with: arrays
has body: I want to pass following payload to the API params[field1]: value1 params[field2]: value1 .... params[fieldN]: valueN I have field and value coming from an object. var params = {}; jQuery.each($scope.linkParams, function(a, b) { params.params[a] = b; // returns undefined variable error // I also tried other options but all result in one or another error // Some doesn't result into an erro but doesn't get merged. See below merge requirement }); I also wants to merge the above created object to another object with jQuery.extend(extraParams, params); How to achieve the rquired object? Update $scope.linkParams = { field1: 'value1', field2: 'value2', .... };
has comment: http://stackoverflow.com/comment/42984161
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42982725
score: 0

http://stackoverflow.com/q/27173248
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/37337332
has answer: http://stackoverflow.com/a/27173385
has answer: http://stackoverflow.com/a/27173383
upvote count: 1
possible better answer: http://stackoverflow.com/a/27173385
accepted answer: http://stackoverflow.com/a/27173383
has body: I know there are lots of ways to detect the click outside of an element. Mostly all of them use event.stopPropagation. Since event.stopPropagation will break other stuff, I was wondering if there is another way to achieve the same effect. I created a simple test for this: HTML: Click me Javascript: $(function() { var $click = $('.click'), $html = $('html'); $click.on( 'click', function( e ) { $click.addClass('is-clicked').text('Click outside'); // Wait for click outside $html.on( 'click', clickOutside ); // Is there any other way except using .stopPropagation / return false event.stopPropagation(); }); function clickOutside( e ) { if ( $click.has( e.target ).length === 0 ) { $click.removeClass('is-clicked').text('Click me'); // Remove event listener $html.off( 'click', clickOutside ); } } }); http://jsfiddle.net/8p4jhvqn/ This works, but only because i stop the bubbling with event.stopPropagation();. How can i get rid of event.stopPropagation(); in this case?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42836887
has title: Click outside element without using event.stopPropagation
has answer: http://stackoverflow.com/a/27174422
answer count: 4
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery

http://stackoverflow.com/comment/42835930
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27172555
has text: @ machineaddict - in my use code div id="out" will cover many div.
type: AnswerComment

http://stackoverflow.com/q/27311256
tagged with: servlets
score: 0
has body: I want to display Username or password incorrect message in a particular in the Login page. Here is my login.html code. Login Login Here is my servlet code protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); RequestDispatcher rd=request.getRequestDispatcher("/login.html"); out.println(" "); rd.include(request, response); } The message is not displaying in the in login file
has answer: http://stackoverflow.com/a/27312361
has answer: http://stackoverflow.com/a/67216502
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27312361
answer count: 4
has answer: http://stackoverflow.com/a/51302909
type: AnsweredQuestion
tagged with: java
has title: Display password error message in login page itself using servlet
has comment: http://stackoverflow.com/comment/43084692
possible better answer: http://stackoverflow.com/a/27311387
type: Question
has answer: http://stackoverflow.com/a/27311387
has comment: http://stackoverflow.com/comment/43083892
has comment: http://stackoverflow.com/comment/43083557
tagged with: javascript

http://stackoverflow.com/comment/42936857
type: Comment
has text: Seems bundle-collapser did the trick. fullPaths: false alone did not help.
type: AnswerComment
comment on: http://stackoverflow.com/a/27228895
score: 0

http://stackoverflow.com/q/27205582
tagged with: javascript
possible better answer: http://stackoverflow.com/a/30935900
has body: I want to set up a WooCommerce shop for a WordPress site (which I've never done before by the way). However, I do not want to use any type of WooCommerce generated pages. What I want is to add/remove products (along with all other relevant product data), create categories, subcategories etc.. using the WooCommerce "control panel" from inside the Wordpress Dashboard and every time I do that, I want a WooCommerce object (containing all that data) to be updated/generated and made available across all (or some specific) pages. The reason for that is because I want to build everything myself (product pages, cart page, checkout page, category pages, subcategory pages). In order to populate these pages with the relevant data, however, I'll need to have access to the whole of WooCommerce data from any of those pages. Some examples will explain better what I'm trying to achieve. (note : I'll be using Javascript and generating everything on the client) Case #1 Let's say I am in the "Shop" page, and I want to populate a column with all available product categories. I need to be able to do something like that : var wooCommerceShopData = getAllWooCommerceShopData(); // an Ajax request that will fetch me all that data var arrayOfAllAvailableCategories = wooCommerceShopData.categories; Case #2 Now suppose I am in the "sportswear" category. I need to be able to do something like that : var wooCommerceShopData = getAllWooCommerceShopData(); var productsObjectForCurrentCategory = wooCommerceShopData.categories["sportswear"].products; Case #3 If I am on a "sportwear"-category product page, I need to be able to do something like that : var wooCommerceShopData = getAllWooCommerceShopData(); var currentProductData = wooCommerceShopData.categories["sportswear"].products["BLK123XMENSHORTS"]; var currentProductPrice = currentProductData.price; // etc...... Is this possible and is there an WooCommerce/Wordpress API for that ?
favorite count: 0
accepted answer: http://stackoverflow.com/a/27205949
upvote count: 5
has answer: http://stackoverflow.com/a/27205949
has answer: http://stackoverflow.com/a/30935900
type: AnsweredQuestion
downvote count: 0
tagged with: woocommerce
tagged with: http://stackoverflow.com/tag/json
tagged with: wordpress
type: Question
answer count: 2
score: 5
has title: How do I retrieve a JSON of all WooCommerce data on any Wordpress page?

http://stackoverflow.com/comment/43075428
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27306413
has text: Server side ... it would have to use something like Pretty Print: http://stackoverflow.com/questions/12875375/module-for-pretty-printing-html

http://stackoverflow.com/comment/42926870
comment on: http://stackoverflow.com/a/27224015
type: AnswerComment
has text: OK, never mind, I just moved your `setInterval` inside my `init()` function, which is being called once the body is loaded, and it worked great! Thank you so very much! :)
type: Comment
score: 0

http://stackoverflow.com/q/27276176
score: 0
answer count: 1
tagged with: url-rewriting
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27276379
type: Question
has body: I'm building my own website using AngularJS. I want my site's navigation to behave without the "browser flash" that exists when you go between pages, e.g. clicking a link on index.html that takes you to foo.html. I also want clean URLs, so for instance I can go to mysite.com/foo and have the browser display the content in foo.html. Angular's client-side routing in HTML5 mode is an effective solution, but there are exceptions: If I go to mysite.com, I can configure $routeProvider to map the view to the appropriate partials (e.g. index.html or foo.html) and modify the URL the browser displays. However, if I go to mysite.com/foo by directly typing that URL into the browser, I will get a 404 error because the server is looking for something in mysite.com/foo/ that isn't there. The same will happen if I refresh the page while Angular is pointing to mysite.com/foo. In short, navigating to mysite.com/foo is only handled properly if navigated from within the Angular app. How can I handle this so that my site behaves the way I want? Do I use PHP and/or mod_rewrite to redirect the browser back to mysite.com upon 404? In essence, I want the URL mysite.com/foo to display the mysite.com view + the foo.html partial whether the URL is set by Angular or manually typed in the browser URL bar.
tagged with: javascript
has title: How should I structure my AngularJS routing to handle URL rewriting and page refreshes?

email
tags question: http://stackoverflow.com/q/27298194
tags question: http://stackoverflow.com/q/27273672
tags question: http://stackoverflow.com/q/27186595
tags question: http://stackoverflow.com/q/27313734
tags question: http://stackoverflow.com/q/27271169
tags question: http://stackoverflow.com/q/27176849
tags question: http://stackoverflow.com/q/27247912
tags question: http://stackoverflow.com/q/27228780
type: Tag
tag name: email

http://stackoverflow.com/comment/42853296
type: AnswerComment
type: Comment
has text: @makenai: Because not every browser supports `String#trim` yet. *edit:* Actually, most of them do: https://kangax.github.io/compat-table/es5/#String.prototype.trim . Maybe you are using IE8 ?
comment on: http://stackoverflow.com/a/27182664
score: 1

http://stackoverflow.com/q/27304409
tagged with: meteor
possible better answer: http://stackoverflow.com/a/41922649
upvote count: 11
has answer: http://stackoverflow.com/a/41922649
score: 11
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/32042886
accepted answer: http://stackoverflow.com/a/27310881
has answer: http://stackoverflow.com/a/27310519
has comment: http://stackoverflow.com/comment/52399928
answer count: 3
downvote count: 0
tagged with: javascript
has body: I suspect I'm not doing this the Meteor way. I'm making a shared, interactive calendar. I have a calendar template: Calendar {{#each days}} {{> day}} {{/each}} With a helper that returns a day object: { date: thisDate.getDate(), dateString: dateString, done: done, today: isToday } I have a day template: {{date}} With some helpers (meetingID is hardcoded for now for development): Template.day.helpers({ state: function(){ // retreive from DB var s = Meetings.findOne({"_id":meetingID}).dates[this.dateString]; return s; } stateString: function(){ var stateString; switch(this.state){ case -1: stateString = "unknown"; break; case 0: stateString = "unavailable"; break; case 1: stateString = "available"; break; } if(this.done) stateString = "done"; return stateString; } }); state() gets the state from the db and stateString() picks the right class name for that state. When you click on it, you cycle through states (1: available, 0: not available, -1: unknown): Template.day.events({ "click": function(){ if(this.done) return false; // no state changes for past days! console.log(e); var newState = this.state + 1; if(newState > 1) newState = -1; var q = "dates."+this.dateString+"."+Meteor.userId()+".state"; console.log(q+ " / "+this.state+" / "+newState); Meetings.update(meetingID, {$set:{q:newState}}); return false; } }) I'm having at least two specific problems: 1) How do I call the state() helper from the click event? 2) My db update doesn't seem to work—it's creating a 'q' document instead of using the string stored in q. I'm sure this is missing some fundamental understanding of the right way to do this—please help!
favorite count: 0
has answer: http://stackoverflow.com/a/27310881
has title: Meteor.js: how to call helper method from event?

http://stackoverflow.com/a/27185968
downvote count: 0
answers question: http://stackoverflow.com/q/27185817
score: 1
upvote count: 1
has body: If you have multiple lines for a single statement in javascript you should use " at the end of each line and + " at the beginning of the next line (or vice versa). This is called concatenation $(document).ready(function(){ var i=1; $("#add_row").click(function(){ $('#addr'+i).html(" "+ (i+1) +" " +" " +" Select " +" Telephonic Interview " +" Skype Interview " +" Personal Interview " +" " +" "); $('#tab_logic').append(' '); i++; }); $("#delete_row").click(function(){ if(i>1){ $("#addr"+(i-1)).html(''); i--; } }); }); #add_row, #delete_row { cursor: pointer; } # Recruitment Stage Remark Comments 1 Select Telephonic Interview Skype Interview Personal Interview Add RowDelete Row
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27185817

http://stackoverflow.com/a/27237380
has comment: http://stackoverflow.com/comment/42955337
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42953062
score: 1
answers question: http://stackoverflow.com/q/27234366
type: Answer
accepted answer of: http://stackoverflow.com/q/27234366
has body: If you just want to add a link to the image that is shown in fancybox, then .wrap() method is the way to go, however you may need to know exactly what selector you need to target and wrap it within the onComplete (v1.3.4) callback So try this code : jQuery(document).ready(function ($) { jQuery.fancybox({ autoScale: false, width: 783, // or whatever needed height: 700, transitionIn: 'elastic', transitionOut: 'none', // type: 'iframe', // you don't need this for images titlePosition: 'inside', overlayColor: '#fff', href: '/img/treeofdreams.jpg', // the URL of the image title: "the title", // you may need this onComplete: function () { jQuery("#fancybox-img").wrap(jQuery("&lt;a /&gt;", { href: "http://facebook.com/", // the URL to open after clicking the image target: "_blank", // opens in a new window/tab title: "go to facebook" // optional, shows on mouse hover })) } }); }); // ready Notice #fancybox-img is the selector ID of the fancybox image. See JSFIDDLE Note: this is for fancybox v1.3.4
upvote count: 1
has comment: http://stackoverflow.com/comment/42955675
has comment: http://stackoverflow.com/comment/42954152
has comment: http://stackoverflow.com/comment/56626541
has comment: http://stackoverflow.com/comment/42955218

apache
tag name: apache
tags question: http://stackoverflow.com/q/27260383
tags question: http://stackoverflow.com/q/27311362
type: Tag
tags question: http://stackoverflow.com/q/27181630

http://stackoverflow.com/a/27245540
score: 0
has body: Etai is right, Following is a code example : data = getHighlights(); chrome.storage.local.set({"userData": data}); and also add "permissions":[ "storage", ] to your manifest
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27223319
accepted answer of: http://stackoverflow.com/q/27223319
type: Answer

http://stackoverflow.com/comment/43052672
comment on: http://stackoverflow.com/q/27293758
type: QuestionComment
has text: @lexicore I have looked at many types, trying anything I just get confused, to be honest I am not a JavaScript programmer, so I am trying to teach myself, I have the basics but this is a little beyond me and thats why I came here, I (honestly) don't know where to start
score: 0
type: Comment

http://stackoverflow.com/a/27197911
answers question: http://stackoverflow.com/q/27197875
has comment: http://stackoverflow.com/comment/42880613
has comment: http://stackoverflow.com/comment/42880501
has comment: http://stackoverflow.com/comment/42880757
type: Answer
score: 0
has body: You're probably best not to add the selected values/ids together and use them separately in an IF statement. E.g. if (location == 1) { if (place == 1) { document.getElementById("info").innerHTML = relief[0]; } else if (place == 2) { document.getElementById("info").innerHTML = relief[1]; } else if (place == 3) { document.getElementById("info").innerHTML = relief[2]; } } else if (location == 2) { ... } else if (location == 3) { etc... Hope this helps. Edit - might be slightly better and more condense like this, can interchange switches and ifs depending on preference: switch (location) { case 1: switch (place) { case 1: document.getElementById("info").innerHTML = relief[0]; break; case 2: document.getElementById("info").innerHTML = relief[1]; break; case 3: document.getElementById("info").innerHTML = relief[2]; break; } break; case 2: switch (place) { ... } break; case 3: switch (place) { ... } break; }
has comment: http://stackoverflow.com/comment/42880560

http://stackoverflow.com/comment/42892621
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27155644
has text: @VinothS Any luck brother?

http://stackoverflow.com/q/27194558
has answer: http://stackoverflow.com/a/27194876
has answer: http://stackoverflow.com/a/27194673
score: 6
has title: jQuery unique objects based on specific object properties
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/58339390
accepted answer: http://stackoverflow.com/a/27194673
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I want an array of unique objects, removing duplicate objects which have some specific property values. For example: in the code snippet below, event1 and event2 have same title and same start value, event3 and event4 have same title but different start times. I want to remove event2 from the object array (as it has same title and start value as event1) but not event4 (as it has only same title). My code looks like: var event1 = {id: 1, title: 'ABC', start: '10'}; var event2 = {id: 2, title: 'ABC', start: '10'}; var event3 = {id: 3, title: 'DEF', start: '12'}; var event4 = {id: 4, title: 'DEF', start: '20'}; var a=[]; a.push(event1); a.push(event2); a.push(event3); a.push(event4); //I tried this, but this code checks for title only. var titles = []; var b = []; $.each(a, function(index, event) { if ($.inArray(event.title, titles) === -1) { titles.push(event.title); b.push(event); } }); console.log(b); //Gives output as [Object { id=1, title="ABC", start="10"}, Object { id=3, title="DEF", start="12"}] // The right output should be: [Object { id=1, title="ABC", start="10"}, Object { id=3, title="DEF", start="12"}, Object { id=3, title="DEF", start="20"}] My code above only checks for title. I was unable to make it work for two different properties. Thanks for the help in advance.
upvote count: 6
possible better answer: http://stackoverflow.com/a/27194876
type: AnsweredQuestion

http://stackoverflow.com/q/27165569
favorite count: 0
upvote count: 3
tagged with: regex
tagged with: node.js
downvote count: 0
has body: I have developed couleurs NPM package which can be set to append rgb method to String.prototype: &gt; console.log("Hello World!".rgb(255, 0, 0)) // "Hello World!" in red Hello World! undefined &gt; "Hello World!".rgb(255, 0, 0) '\u001b[38;5;196mHello World!\u001b[0m' This works fine. What's the proper way to get the ANSI color/style of character at index i? Probably this can be hacked with some regular expressions, but I'm not sure if that's really good (however, if a correct implementation is available I'm not against it)... I'd prefer a native way to get the color/style by accessing the character interpreted by tty. &gt; function getStyle (input, i) { /* get style at index `i` */ return style; } &gt; getStyle("Hello World!".rgb(255, 0, 0), 0); // Get style of the first char { start: "\u001b[38;5;196m", end: "\u001b[0m", char: "H" } &gt; getStyle("Hello " + "World!".rgb(255, 0, 0), 0); // Get style of the first char { start: "", end: "", char: "H" } Things get complicated when we have multiple combined styles: &gt; console.log("Green and Italic".rgb(0, 255, 0).italic()) Green and Italic undefined &gt; getStyle("Green and Italic".rgb(0, 255, 0).italic(), 0); { start: "\u001b[3m\u001b[38;5;46m", end: "\u001b[0m\u001b[23m", char: "G" } &gt; getStyle(("Bold &amp; Red".bold() + " but this one is only red").rgb(255, 0, 0), 0); { start: "\u001b[38;5;196m\u001b[1m", end: "\u001b[22m\u001b[0m", char: "B" } &gt; getStyle(("Bold &amp; Red".bold() + " but this one is only red").rgb(255, 0, 0), 11); { start: "\u001b[38;5;196m", end: "\u001b[0m", char: "u" } &gt; ("Bold &amp; Red".bold() + " but this one is only red").rgb(255, 0, 0) '\u001b[38;5;196m\u001b[1mBold &amp; Red\u001b[22m but this one is only red\u001b[0m' Like I said, I'm looking for a native way (maybe using a child process). So, how to get the complete ANSI style for character at index i?
type: Question
type: AnsweredQuestion
score: 3
has title: Get ANSI color for character at index
accepted answer: http://stackoverflow.com/a/27167940
answer count: 2
possible better answer: http://stackoverflow.com/a/27167486
tagged with: javascript
tagged with: ansi-colors
has answer: http://stackoverflow.com/a/27167486
has answer: http://stackoverflow.com/a/27167940

http://stackoverflow.com/a/42578893
has body: You can randomly spawn points in the geometry bounding box and than check if point belongs to geometry, respawn if not. Checking if point belongs to geometry is computationally expensive operation. You can use Binary space partitioning (BSP) https://github.com/electricessence/ThreeBSP or voxelising If your geometry does not have holes you can try to use raycasting to check point belongingness Another cheaper approach @WestLangley mentiond in comments you can use THREE.GeometryUtils.randomPointsInGeometry() from examples/js/utils/GeometryUtils.js to distribute points on the faces.
answers question: http://stackoverflow.com/q/27285274
score: 0
type: Answer

http://stackoverflow.com/q/27194763
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27194801
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: local-storage
type: Question
has title: Store and set all localstorage in variable
has body: I need to save all domain localStorage in variable and later set it again from variable. I trying save localstorage with this code: for (var i = 0, len = localStorage.length; i &lt; len; ++i) { objects = JSON.stringify(localStorage.getItem(localStorage.key(i))); } console.log(objects); But it gives me a error. And how can i set all localstorage from variable? Something like this? for (var i = 0, len = objects.length; i &lt; len; i++) { localStorage.setItem(len, objects(i); }

http://stackoverflow.com/a/27296403
type: Answer
has body: Short answer What you exactly want is impossible. Objects cannot have multiple keys. My suggestion Have an object where the value of each key is an array. If an animal have multiple sound, you'll only have to push it into the array. var animals = ['Cow', 'Cow', 'Dog', 'Cat'], sounds = ['Moo', 'Oink', 'Woof', 'Miao'], result = {}; for(i = 0; i &lt; animals.length; i++) { result[animals[i]] ? result[animals[i]].push(sounds[i]) : result[animals[i]] = [sounds[i]]; } Fiddle
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27295855
downvote count: 0

http://stackoverflow.com/a/27218909
answers question: http://stackoverflow.com/q/27218843
score: 1
accepted answer of: http://stackoverflow.com/q/27218843
type: AcceptedAnswer
downvote count: 0
has body: try with span.social_icon {display:block; float:left; margin: 5px;} http://jsfiddle.net/alemarch/tkn02tut/1/ is this?
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42839840
type: QuestionComment
comment on: http://stackoverflow.com/q/27175047
type: Comment
has text: Can you please explain a bit more?
score: 0

http://stackoverflow.com/q/27177658
type: Question
has title: Javascript sort function with grouping
has comment: http://stackoverflow.com/comment/42844264
downvote count: 0
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/27177839
has answer: http://stackoverflow.com/a/27177792
favorite count: 0
accepted answer: http://stackoverflow.com/a/27177754
has answer: http://stackoverflow.com/a/27177753
possible better answer: http://stackoverflow.com/a/27177792
answer count: 4
upvote count: 2
has comment: http://stackoverflow.com/comment/42844274
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27177754
has body: Having issues writing a javascript sort function that would let me do the following: UPDATE: this is javascript for node.js I have a bunch of files and folders as JSON objects with the following properties [ {"name":"Folder B","isFolder":true}, {"name":"File A","isFolder":false}, {"name":"Folder A","isFolder":true}, {"name":"File B","isFolder":false} ] I want to sort this array so the folders are grouped at the top and alphabetically ordered, then files alphabetically ordered like so [ {"name":"Folder A","isFolder":true}, {"name":"Folder B","isFolder":true}, {"name":"File A","isFolder":false}, {"name":"File B","isFolder":false} ] After much researching on stackoverflow here I've come up with this, but it just groups the folders at the top, and does not sort by the name .. thoughts? array.sort(function(a,b){ return (b.isFolder-a.isFolder) || (b.name - a.name); }));

http://stackoverflow.com/comment/43468973
score: 0
comment on: http://stackoverflow.com/q/27290671
type: Comment
type: QuestionComment
has text: Do you have something like this in your code? `marker.setIcon(/** @type {google.maps.Icon} */({ url: place.icon, size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(35, 35) }));`

http://stackoverflow.com/a/27183598
type: Answer
has comment: http://stackoverflow.com/comment/42855057
has comment: http://stackoverflow.com/comment/42855583
accepted answer of: http://stackoverflow.com/q/27183497
answers question: http://stackoverflow.com/q/27183497
has body: This is because the div container doesn't have a fixed height. If you want to make it a fixed height just add this to your files HTML: Change this &lt;div class="container"&gt; to &lt;div class="container fixed-height"&gt; CSS: Add this to css file div.fixed-height { height: 900px !important; } You can change the height to whatever you want. Also I don't advise this if you are just trying to keep the footer to the bottom of the page. There are other ways to do that if you look around the internet.
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42855279
has comment: http://stackoverflow.com/comment/42855361
upvote count: 2

http://stackoverflow.com/a/27153790
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42802765
downvote count: 0
type: Answer
has body: You need to maintain an external variable to work as a counter and increment it in the handler var clicks = 0; // counter var a = document.getElementById('avalue'); // element a.onclick = function(b) { // onclick not onClick console.log(++clicks); // increment it } From your comment, you could do this a.ondblclick = function(){ alert(clicks); // double click to know the number of clicks so far }
answers question: http://stackoverflow.com/q/27153750
accepted answer of: http://stackoverflow.com/q/27153750
has comment: http://stackoverflow.com/comment/42802786
score: 5
upvote count: 5

http://stackoverflow.com/q/27291703
favorite count: 0
has comment: http://stackoverflow.com/comment/43051323
upvote count: 2
has title: How can I sort documents using Mongoose.js 3.8.20 and MongoDB 2.6.5?
accepted answer: http://stackoverflow.com/a/27291785
tagged with: node.js
type: AnsweredQuestion
score: 2
has body: Sorting documents using Mongoose 3.8.20 doesn't work with MongoDB 2.6.5. With previous versions of MongoDB I was able to use .sort({ orgName: 'ASC' }) without a problem, now it causes an error. database.model.clients.find({ myField: 'value' }) .sort({ orgName: 'ASC' }) // Error: { [MongoError: Can't canonicalize query: BadValue bad sort specification] name: 'MongoError' } .sort({ orgName: 1 }) // Sorting is ignored. .sort('orgName') // Sorting is ignored. .exec(function (err, docs) { console.log(err); }); How can I sort the documents?
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/43050711
downvote count: 0
tagged with: mongoose
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/27291785
answer count: 1
has comment: http://stackoverflow.com/comment/43051043

http://stackoverflow.com/q/27193232
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27193334
score: 1
tagged with: date
possible better answer: http://stackoverflow.com/a/27193307
answer count: 3
has answer: http://stackoverflow.com/a/27193307
has body: In JavaScript I'm trying to sort an array of objects, each having a date, by date, but I ran into an obstacle. Also the date's are input from 3 dropdown boxes on a site, so I just want 3 numbers. This means I cannot use JavaScript's Date() object, since it also adds a time, timezone and writes month names in letters etc. Example: I added 5 objects into an array. I have tried using the JavaScript sort function, this one to be specific: array.sort(function(a, b) { if(a.date == b.date){ return 0; } else if (a.date &lt; b.date){ return 1; } else { return -1; } }) However, this only sorts by year. So If I add: 2014 7 12 2017 8 16 2017 4 14 2017 1 31 2017 2 26 I get: 2014 7 12 2017 2 26 2017 8 16 2017 1 31 2017 4 14 This is the constructor I use to make different Label objects. function Label(name, date, type) { this.name = name; this.date = date; this.type = type; } var a = new Label("name1", "2016 5 16", 5); var b = new Label("name2", "2016 7 20", 3); var c = new Label("name3", "2016 3 15", 2); My date attributes are just 3 numbers in a string. So I tried rewriting the sort function to this: array.sort(function(a,b){ a = a.date.split(" "); b = b.date.split(" "); if(a[0] === b[0] &amp;&amp; a[1] === b[1] &amp;&amp; a[2] === a[2]){ return 0; } else if ((a[0] &gt; b[0]) || (a[0] === b[0] &amp;&amp; a[1] &gt; b[1]) || (a[0] === b[0] &amp;&amp; a[1] === b[1] &amp;&amp; a[2] &gt; b[2])){ return -1; } else { return 1; } }); I.e. I tried to use the .split function to seperate the 3 numbers, which are then stored in an array. Date a is then assigned the array with 3 numbers, as is date b. Then I check if the values in both arrays are equal, if so, return 0 (do nothing). If the year in array a is bigger than year in array b, move it down 1 space in the output array. If the year is equal, then check the month. If the month is bigger in a than in b, move a down 1 space in the output array. Etc. However this doesn't happen. It basically gives me the same output, only sorting by year…
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: sorting
favorite count: 0
accepted answer: http://stackoverflow.com/a/27193334
has title: How to sort date strings (format example: 2014 7 23) in JavaScript?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27193330

http://stackoverflow.com/a/27313367
downvote count: 0
answers question: http://stackoverflow.com/q/27313247
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43088822
has body: Use outerWidth() $('body').outerWidth() Also you can get better idea of Width, OuterWidth, Inner by Click here

http://stackoverflow.com/a/27232525
score: 50
answers question: http://stackoverflow.com/q/27230293
upvote count: 52
type: Answer
has comment: http://stackoverflow.com/comment/42957196
has comment: http://stackoverflow.com/comment/94154931
has comment: http://stackoverflow.com/comment/67357957
downvote count: 2
has comment: http://stackoverflow.com/comment/79254552
has comment: http://stackoverflow.com/comment/81791395
type: AcceptedAnswer
has body: For inline SVG you'll need to: Convert the SVG string to a Blob Get an URL for the Blob Create an image element and set the URL as src When loaded (onload) you can draw the SVG as an image on canvas Use toDataURL() to get the PNG file from canvas. For example: function drawInlineSVG(ctx, rawSVG, callback) { var svg = new Blob([rawSVG], {type:"image/svg+xml;charset=utf-8"}), domURL = self.URL || self.webkitURL || self, url = domURL.createObjectURL(svg), img = new Image; img.onload = function () { ctx.drawImage(this, 0, 0); domURL.revokeObjectURL(url); callback(this); }; img.src = url; } // usage: drawInlineSVG(ctxt, svgText, function() { console.log(canvas.toDataURL()); // -&gt; PNG data-uri }); Of course, console.log here is just for example. Store/transfer the string instead here. (I would also recommend adding an onerror handler inside the method). Also remember to set canvas size using either the width and height attributes, or from JavaScript using properties.
has comment: http://stackoverflow.com/comment/42946520
accepted answer of: http://stackoverflow.com/q/27230293
has comment: http://stackoverflow.com/comment/55996294

http://stackoverflow.com/q/27297625
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/27297729
upvote count: 3
has title: get link with javascript regex
type: Question
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27297729
has body: How can I get the first function parameter with javascript regex? For example, I have this element in the page and I want to retrieve the inline link when clicking on a tag. sample: news I want this text : http://moi.ir/Portal/RssPage/ShowRss.aspx?CategoryID=541ac873-3706-4f31-97e7-5cd6d51170eb

http://stackoverflow.com/a/27211120
downvote count: 0
has comment: http://stackoverflow.com/comment/42903949
type: Answer
has body: It looks like you do need to load jQuery on your page to use the code you added. jQuery is a JavaScript library; it provides the "$" function. To load jQuery in your page, add this before your fixed sidebar code:
has comment: http://stackoverflow.com/comment/42903802
has comment: http://stackoverflow.com/comment/42904035
has comment: http://stackoverflow.com/comment/42903441
score: 4
answers question: http://stackoverflow.com/q/27211077
has comment: http://stackoverflow.com/comment/42903643
has comment: http://stackoverflow.com/comment/42929476
accepted answer of: http://stackoverflow.com/q/27211077
upvote count: 4
has comment: http://stackoverflow.com/comment/42903596
type: AcceptedAnswer

http://stackoverflow.com/comment/43112380
type: AnswerComment
comment on: http://stackoverflow.com/a/27309378
has text: Well, _maybe_ four seconds... :-)
score: 0
type: Comment

http://stackoverflow.com/comment/42857597
comment on: http://stackoverflow.com/q/27178796
score: 0
type: QuestionComment
has text: @JonathanGray Thanks for that John, I will have another look today see what is going on. As for the table, the table element is a new element its just inside a cell - which is completely legit. Once I have the solution I will also try and frame an answer that actually makes sense and can be searched. Once again thanks for your time.
type: Comment

http://stackoverflow.com/comment/42908064
type: Comment
comment on: http://stackoverflow.com/a/27213642
score: 0
type: AnswerComment
has text: function makeChart(input){ //input.value //do something }

http://stackoverflow.com/comment/43049372
type: AnswerComment
comment on: http://stackoverflow.com/a/27270341
type: Comment
has text: No you cannot access the `parent` from a cross-domain iframe.
score: 0

http://stackoverflow.com/q/27154861
has comment: http://stackoverflow.com/comment/42828094
answer count: 2
has body: I am trying to code a "page" which asks user a question with a yes/no answer. If they answer "yes" a new "page" will be shown if they answer "no" a different "page" will be shown. In total there will be 6 different "pages". I will load all "pages" in a div's and hide all but the first one. I'm not really sure where to start with JS Code, should I code show/hide for each page separetely or can I combine in a single case 0: case 1 type function ? .page { display:none; width:100%; } #p1 {display: inline-block;} This is Page 1 Yes No This is Page 2 Yes No This is Page 3 Yes No This is Page4 Yes No This is Page 5 Yes No This is Page 6 Yes No
downvote count: 0
tagged with: javascript
tagged with: show
favorite count: 0
has title: Show Hide Div's Dependant on Click
has answer: http://stackoverflow.com/a/27155029
has comment: http://stackoverflow.com/comment/42804301
score: 2
tagged with: onclick
upvote count: 2
type: UnansweredQuestion
tagged with: hide
has comment: http://stackoverflow.com/comment/42804260
type: Question
has answer: http://stackoverflow.com/a/27154968

http://stackoverflow.com/q/27309951
has answer: http://stackoverflow.com/a/27310048
has comment: http://stackoverflow.com/comment/43081254
type: Question
has body: I am trying to setup a mysql database to capture the information from an html form, but when I test it, it comes back with the below error. The file is located on the same server as the database. My php is located below the error. Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'inmoti6_ted_seminar'@'localhost' (using password: YES) in /home/westcl5/public_html/drjseminars.com/thankyou.php on line 92 Could not connect: Access denied for user 'inmoti6_ted_seminar'@'localhost' (using password: YES) if( $_POST ) { $con = mysql_connect("localhost","inmoti6_ted_seminar","Polarbear5"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("inmoti6_westcl5_ted_sem", $con); $users_firstName = $_POST['first_name']; $users_lastName = $_POST['last_name']; $users_street = $_POST['street']; $users_street2 = $_POST['street2']; $users_city = $_POST['city']; $users_state = $_POST['state']; $users_zip = $_POST['zip']; $users_country = $_POST['country']; $users_email = $_POST['email']; $users_telephone = $_POST['telephone']; $users_practice = $_POST['practice']; $users_firstName = mysql_real_escape_string($users_firstName); $users_lastName = mysql_real_escape_string($users_lastName); $users_street = mysql_real_escape_string($users_street); $users_street2 = mysql_real_escape_string($users_street2); $users_city = mysql_real_escape_string($users_city); $users_state = mysql_real_escape_string($users_state); $users_zip = mysql_real_escape_string($users_zip); $users_country = mysql_real_escape_string($users_country); $users_email = mysql_real_escape_string($users_email); $users_telephone = mysql_real_escape_string($users_telephone); $users_practice = mysql_real_escape_string($users_practice); $query = " INSERT INTO `westcl5_ted_sem`.`ted_seminar` (`First Name`, `Last Name`, `E-mail`, `Phone #`, `Street Address`, `Street Address 2`, `City`, `State`, `Zip Code`, `Country`, `Practice`) VALUES ('$users_firstName', '$users_lastName', '$users_email'…
tagged with: javascript
answer count: 2
upvote count: 0
has title: Why am I recieving this error?
has comment: http://stackoverflow.com/comment/43081195
favorite count: 0
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/27312006
type: UnansweredQuestion
downvote count: 3
tagged with: mysql

http://stackoverflow.com/q/27223252
has comment: http://stackoverflow.com/comment/42925727
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42925201
has answer: http://stackoverflow.com/a/27223805
has body: below is the html code i would like to get the values of checkboxes seperated with comma in the textbox of id='selchk' and get the count of checkbox clicked in textbox of id='getcnt' and on uncheck the value should be removed and count should be reduced using jquery.i have tried but didn't achieve the result.need help &lt;input type='checkbox' class='chk' value='1'&gt; &lt;input type='checkbox' class='chk' value='2'&gt; &lt;input type='checkbox' class='chk' value='3'&gt; &lt;input type='checkbox' class='chk' value='4'&gt; &lt;input type='checkbox' class='chk' value='5'&gt; &lt;input type='checkbox' class='chk' value='6'&gt; &lt;input type='text' class='getcnt' id='getcnt'&gt; &lt;input type='text' class='selchk' id='selchk'&gt;
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42925089
possible better answer: http://stackoverflow.com/a/27223805
has comment: http://stackoverflow.com/comment/42925428
score: 0
has comment: http://stackoverflow.com/comment/42925878
has comment: http://stackoverflow.com/comment/42925524
has comment: http://stackoverflow.com/comment/42925269
has answer: http://stackoverflow.com/a/27223752
has comment: http://stackoverflow.com/comment/42925403
has comment: http://stackoverflow.com/comment/42926109
has title: Get count and values of checkbox on click of it in the textbox and on uncheck the value should be removed and count should decreased in textbox
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17367889
has comment: http://stackoverflow.com/comment/42925989
accepted answer: http://stackoverflow.com/a/27223752

http://stackoverflow.com/a/27190876
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42868091
answers question: http://stackoverflow.com/q/27190779
upvote count: 2
has comment: http://stackoverflow.com/comment/42868039
has body: You need to move countdownTimer variable into your timer() function.
has comment: http://stackoverflow.com/comment/42868109
has comment: http://stackoverflow.com/comment/42868095
type: Answer

http://stackoverflow.com/q/27231174
possible better answer: http://stackoverflow.com/a/27231246
type: Question
accepted answer: http://stackoverflow.com/a/27231223
has title: Addition of a positive number and a negative number
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27231223
has answer: http://stackoverflow.com/a/27231246
has comment: http://stackoverflow.com/comment/42939129
has comment: http://stackoverflow.com/comment/42939116
has answer: http://stackoverflow.com/a/27232901
tagged with: addition
type: AnsweredQuestion
has body: I made a function to move an element base on there left CSS value. My function work in one direction but I realize a strange problem in the other direction. First I extract the left value of a element : $left_position = element.css('left').replace(/[^-\d\.]/g, ''); // left_position = -400 now when I add a positive value to that, for the new position : $new_left_position = $left_position + 400; The result I was expected was 0 but instead the result is : -400400 If I replace the "+" sign by a "-" sign it work the result is -800 Any idea why? Thanks

http://stackoverflow.com/q/27266923
tagged with: css
has comment: http://stackoverflow.com/comment/43004973
score: 0
has title: Why `IE7 , 8` call function onchange immediately using javascript?
answer count: 1
tagged with: internet-explorer
tagged with: javascript
type: UnansweredQuestion
has body: Why IE7 , 8 call function onchange immediately using javascript ? When i test on other browser EG: firefox, chrome , when i checked or unchecked input type="checkbox". It's will be alert immediately. But on IE7 , 8 when i checked or unchecked input type="checkbox". I must to click page area again. It's will alert. How to apply my code for IE7 ,8 will alert immediately. http://jsfiddle.net/Fp4sJ/819/ TICK
tagged with: jquery
has answer: http://stackoverflow.com/a/27266979
type: Question
linked to: http://stackoverflow.com/q/11068196
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42989593
type: Comment
comment on: http://stackoverflow.com/a/27240944
score: 0
type: AnswerComment
has text: It's all up there in poll.php. Thanks @Rafael!

http://stackoverflow.com/comment/42965033
comment on: http://stackoverflow.com/q/27244942
has text: Are you getting errors ? What does the debugger say ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43079689
has text: No I didn't downvote. Just edited your tags.
comment on: http://stackoverflow.com/q/27305026
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42844752
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27177313
type: Comment
has text: Just saw this after I figured it out myself, legend.

http://stackoverflow.com/q/27217596
type: Question
accepted answer: http://stackoverflow.com/a/27218463
score: -1
tagged with: image
has title: Stop a moving image in HTML5 Canvas
upvote count: 0
tagged with: html5-canvas
answer count: 1
tagged with: javascript
favorite count: 0
has body: Im pretty new to the canvas element in HTML5. What i want to do is move an image from the right hand side of the screen to the left, once it reaches the left i want it to begin again from the right hand side. I only want it to do this maybe 2/3 times and then stop. I tried to add in a for loop so that it would limit the iterations but this was unsuccessful. Any help at all would be appreciated. Heres my code: &lt;canvas id="myCanvas" width="600" height="400"&gt;&lt;/canvas&gt; &lt;script&gt; window.addEventListener('load', function () { var img = new Image, ctx = document.getElementById('myCanvas').getContext('2d'); img.src = 'pies.png'; img.addEventListener('load', function () { var interval = setInterval(function() { var x = 650, y = 194; return function () { ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); ctx.drawImage(img, x, y); x -= 1; if (x &lt; -500) { x = 650; } }; }(), 1000/40); }, false); }, false); &lt;/script&gt;
has answer: http://stackoverflow.com/a/27218463
type: AnsweredQuestion
downvote count: 1

http://stackoverflow.com/q/27259760
has comment: http://stackoverflow.com/comment/42993051
score: 1
has title: Popup div when window close
type: Question
has comment: http://stackoverflow.com/comment/42993377
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42993473
tagged with: jquery
has comment: http://stackoverflow.com/comment/42993663
linked to: http://stackoverflow.com/q/276660
has comment: http://stackoverflow.com/comment/42993120
has body: I want to make a POPUP div when user clicks on close window button. At the moment i have this code: JS: &lt;script type="text/javascript"&gt; function PopIt() { $("a#trigger").trigger('click'); window.onbeforeunload = UnPopIt; return "Would you like to join our mailing list for other offers?"; } function UnPopIt() { /* nothing to return */ } $(document).ready(function() { window.onbeforeunload = PopIt; $("a#trigger").fancybox({ 'hideOnContentClick': false, 'showCloseButton': false }); $("a[id!=trigger]").click(function(){ window.onbeforeunload = UnPopIt; }); }); &lt;div style="display: none;"&gt; &lt;a id="trigger" href="#popup"&gt;&amp;nbsp;&lt;/a&gt; &lt;div id="popup" style="width: 250px; height: 400px;"&gt; &lt;p&gt;This would be an aweber form.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; It works, but not really the way I need. It popups the standard browser box with two buttons, stay or leave. I want to popup the div with id POPUP. Please, can some one help me to fix my code? FIDDLE Thank you!
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/42993397
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/42995653
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27261098
has text: @JonathanBechtel As I asked in the comments above (you may have missed it), where **exactly** is the error message pointing (as in file name and line number)? What is on that line?

http://stackoverflow.com/comment/42939767
has text: This is a ridiculously terse piece of code. Well done.
type: Comment
comment on: http://stackoverflow.com/a/27231383
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42875373
score: 0
type: Comment
type: QuestionComment
has text: `confirm` method returns boolean. do `if(answer==false)` and then execute.
comment on: http://stackoverflow.com/q/27194980

ios
tags question: http://stackoverflow.com/q/27184544
tags question: http://stackoverflow.com/q/27296227
tags question: http://stackoverflow.com/q/27191282
tags question: http://stackoverflow.com/q/27243169
type: Tag
tags question: http://stackoverflow.com/q/27245123
tags question: http://stackoverflow.com/q/27263808
tags question: http://stackoverflow.com/q/27175412
tags question: http://stackoverflow.com/q/27177601
tags question: http://stackoverflow.com/q/27227461
tags question: http://stackoverflow.com/q/27167748
tags question: http://stackoverflow.com/q/27246251
tag name: ios
tags question: http://stackoverflow.com/q/27300611
tags question: http://stackoverflow.com/q/27292479
tags question: http://stackoverflow.com/q/27164241
tags question: http://stackoverflow.com/q/27300095
tags question: http://stackoverflow.com/q/27153613
tags question: http://stackoverflow.com/q/27218268
tags question: http://stackoverflow.com/q/27223013
tags question: http://stackoverflow.com/q/27294045
tags question: http://stackoverflow.com/q/27250338
tags question: http://stackoverflow.com/q/27243125
tags question: http://stackoverflow.com/q/27221921
tags question: http://stackoverflow.com/q/27275016
tags question: http://stackoverflow.com/q/27198558
tags question: http://stackoverflow.com/q/27215426
tags question: http://stackoverflow.com/q/27200070
tags question: http://stackoverflow.com/q/27187097
tags question: http://stackoverflow.com/q/27272838

http://stackoverflow.com/comment/42918111
comment on: http://stackoverflow.com/q/27207605
type: Comment
has text: Good question, Dan. My thought was to avoid making two calls to the server if the data were already encapsulated in a Javascript object on the client. If that's not an option, and is sounds as though it isn't, then I'll compare the time to download the formatted data via PHP vs restructuring the data in Javascript.
type: QuestionComment
score: 0

http://stackoverflow.com/a/27188818
score: 0
has comment: http://stackoverflow.com/comment/42866104
has comment: http://stackoverflow.com/comment/42869127
answers question: http://stackoverflow.com/q/27186172
type: Answer
has body: Alex, thank you for your solution. This is my solution (still in the middle, works for values and doesn't go back to the previous state yet): $(".other").click(function(){ $("table").each(function() { var $this = $(this); var newrows = []; var firstRow = $this.first("tr"); var rowsNum = firstRow.find("th").length; var colNum = $this.find("tr").length; //populate the first column var j; for (j=0; j&lt; (colNum-1)*rowsNum; j++){ newrows[j] = $("&lt;tr&gt;&lt;/tr&gt;"); //newrows[j].append("&lt;td&gt;"+firstRow.find("th").eq(j%rowsNum).text()+"&lt;/td&gt;"); newrows[j].append(firstRow.find("th").eq(j%rowsNum)[0].outerHTML); } var i = 0; $this.find("tr:not(:first)").each(function(){ $(this).find("td").each(function(){ //newrows[i].append("&lt;td&gt;"+$(this).text()+"&lt;/td&gt;"); newrows[i].append($(this)[0].outerHTML); i++; }); }); $this.find("tr").remove(); $.each(newrows, function(){ $this.append(this); }); }); return false; });
has comment: http://stackoverflow.com/comment/42863963

http://stackoverflow.com/comment/43074137
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27305497
has text: var $injector = angular.injector(['ng']); and then $injector.invoke(function($rootScope, $compile) { //compile and inject here });
type: Comment

http://stackoverflow.com/comment/42894463
has text: https://github.com/HubSpot/offline, or this helpful explanation: http://stackoverflow.com/questions/3181080/how-to-detect-online-offline-event-cross-browser
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27205742

http://stackoverflow.com/q/27279768
has comment: http://stackoverflow.com/comment/43028295
has comment: http://stackoverflow.com/comment/43028611
type: Question
has comment: http://stackoverflow.com/comment/43028461
has comment: http://stackoverflow.com/comment/43028446
has comment: http://stackoverflow.com/comment/43028402
tagged with: javascript
has answer: http://stackoverflow.com/a/27280025
score: 0
answer count: 1
tagged with: asynchronous
has body: My Process1() function has a database loop, so Process2() and Process3() calling more than once. Which function should I use in async, to wait for a for loop? async.waterfall([ function(callback){ Process1(yyy, function(){ //process1 function has a for loop. callback(); }) }, function(callback){ Process2(function(){ // so process2() is calling more than once callback(); }) } ], function (callback) { Process3() }); Process1() : function Process1(yyy, pass){ user.find({}).exec(function(e, users){ _.each(users, function(_user){ user.findOneAndUpdate( {'_id' : user_id}, {$inc : {'xxx' : yyy}}, function(e){ !e &amp;&amp; pass() }) }) }) }
has title: Node.Js Async usage
has comment: http://stackoverflow.com/comment/43028538
accepted answer: http://stackoverflow.com/a/27280025
tagged with: node.js
has comment: http://stackoverflow.com/comment/43028361
type: AnsweredQuestion

http://stackoverflow.com/comment/43169507
type: QuestionComment
has text: I don't know, but you could add `a[href*="_ga="] { color: purple; }` to style all GA links purple if that helps.
comment on: http://stackoverflow.com/q/27299227
score: 0
type: Comment

http://stackoverflow.com/comment/42856039
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27184285
type: Comment
has text: But i really dont understand why it didnt work js before the html ?

http://stackoverflow.com/q/27201477
score: 0
tagged with: jwplayer
downvote count: 1
has title: JW Player with Youtube link don't work on IE9
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27210158
has comment: http://stackoverflow.com/comment/42921442
tagged with: internet-explorer-9
type: Question
has body: Please help me! I have code such as! This code good working on Firefox and Chrome, but when run on IE then the page is blank. &lt;body&gt; &lt;div id='player'&gt;&lt;/div&gt; &lt;script type='text/javascript'&gt; jwplayer('player').setup({ file: 'http://www.youtube.com/v/8pjJ-Czqpps?modestbranding=1&amp;rel=0&amp;fs=0', width: '100%', aspectratio: '16:9', skin: 'five', logo: { file: "https://sites.google.com/site/gitluutru/home/khuluutrufilegmit/logo.png", link: 'http://www.youtube.com/v/8pjJ-Czqpps?modestbranding=1&amp;rel=0&amp;fs=0', } }); &lt;/script&gt; &lt;/body&gt;
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42886532

http://stackoverflow.com/comment/43086231
has text: Yes, the first row is the Year (2014) the second row is the Month (December with a rowspan of 2), the third row contains the dates(always starts with 1, obviously) and the fourth is the day header.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27311908
type: QuestionComment

http://stackoverflow.com/comment/43071163
comment on: http://stackoverflow.com/q/27303875
type: Comment
type: QuestionComment
has text: I just relooked over it, and my loop goes to length of the list, and counts, but the times are all beyond that. Changing the length to a arbitrary number still yields nothing
score: 0

http://stackoverflow.com/comment/43002483
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27265456
has text: i asked, do you get any error in console? like something is not defined

http://stackoverflow.com/q/27274125
upvote count: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43019701
favorite count: 0
has comment: http://stackoverflow.com/comment/43021603
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27275257
score: 2
has title: Adding GeometryCollections with Mongoose
has comment: http://stackoverflow.com/comment/43019839
tagged with: forms
tagged with: geojson
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/43018193
tagged with: mongoose
tagged with: javascript
has body: I've build a form in Angular to add GeoJSON features to MongoDB using Mongoose. The features include several properties and a GeometryCollection with a point and a lineString. Here comes the trouble: I was able to create features with just a single point in my geometry but I'm unable to create features with a geometry collection that uses a lineString. I get either: 16755 Can't extract geo keys from object, malformed geometry? or: { [CastError: Cast to number failed for value "0,0,1,1" at path "coordinates"] message: 'Cast to number failed for value "0,0,1,1" at path "coordinates"', name: 'CastError', type: 'number', value: [[0,0],[1,1]], path: 'coordinates' }' I do realize it says type: 'number' while my schema is set to an array of arrays: var featureSchema = new mongoose.Schema({ 'type': { type: String, default: "Feature" }, geometry: { 'type': { type: String, default: 'GeometryCollection', }, geometries: [{ 'type': { type: String, default: 'Point' }, coordinates: [Number] }, { 'type': { type: String, default: 'LineString' }, coordinates: { type: [Array], default: [[0,0], [1,1]] } }] }, properties: { title: String } }); So my first question is: does anyone know how to properly add features using GeometryCollections with Mongoose? My second question is how to add an array of arrays when using forms? When I use a text input now I get my array of arrays delivered as a string. I was able to convert the point coordinates using: var array = req.body.feature.geometry.geometries.coordinates.split(','); for(var i=0; i&lt;array.length; i++) { array[i] = +array[i]; } Is there a way to convert a string (ie "[ [0,0], [1,1] ]") to an array of arrays to create the lineString coordinates? Thanks in advance!

http://stackoverflow.com/comment/42936081
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27228805
type: Comment
has text: Wow, I REALLY appreciate the effort! I did make one small change, to fix an error when the character was the last character before an html tag, I added: "if (nth == count && !tag && arr[i] != '>')". And with that, it all seems to work (although I haven't thoroughly checked it yet). Thanks again :)

http://stackoverflow.com/comment/43066651
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27301512
has text: It turns out I also forgot to add **class="display"** I've changed this, and changed "dat" to an ID instead of a class. More stuff gets initialized (formatting), but it still doesn't work with this method. I am not calling DataTable() until after the table is created.
type: Comment

http://stackoverflow.com/q/27224061
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42926292
has comment: http://stackoverflow.com/comment/42927619
has comment: http://stackoverflow.com/comment/42927525
score: 2
has comment: http://stackoverflow.com/comment/42926807
downvote count: 0
has comment: http://stackoverflow.com/comment/42926835
has comment: http://stackoverflow.com/comment/42926251
type: Question
tagged with: javascript
has body: for a repeat in view: ng-repeat="item in list" in some routes item is: { "name": "john", "id": 1 } and in other { "value": { "name": "john", "id": 1 } } is it possible to rename item in ng-repeat? may be like: ng-repeat="item as item.value in list" so I can use a common partial view (e.g post-item.html) for all of them.
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/42927762
has title: Is it possible to rename item in ngRepeat
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/42926661
favorite count: 0
has answer: http://stackoverflow.com/a/27230923
has comment: http://stackoverflow.com/comment/42926763
tagged with: angularjs

http://stackoverflow.com/comment/43081934
score: 0
comment on: http://stackoverflow.com/q/27310142
has text: Yes, I call the web service from javascript and get the response in JSON format like that. The web service return the result and I check the "status" first, if it is "OK" then I get the "encodedFile". If the "status" is "FAIL", I get the "message". That was the format of the web service response we develop (always return "status" key). So now the "encodedFile" contains the array of bytes (of a file in the server) which has been encoded using Base64. Can I return that array of bytes to a file after decode it from javascript?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42982468
type: AnswerComment
has text: Heh, was just typing this out, but you got to it first. Upvote.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27254286

http://stackoverflow.com/comment/43036267
has text: So, I guess its ok to ignore it?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27283942

http://stackoverflow.com/a/27308897
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: As one commenter said, you've re-invented the notion of HTML templates. People have already written dozens if not hundreds of templating engines. To do this, you do not need to "parse HTML". You essentially view the HTML as a big string with magic placeholders (in your case, things between #), and the template engine is essentially a kind of macro processor which does string replacement. You can do anything you want with the resulting, interpolated HTML: save it to a file, or send it down to the browser, or if you are already in the browser stick it in the DOM. Write your template like so (let's say this is in a string called templateSource): //Header Data Here {{ID_MainTitle}} {{ID_Para1}} Define your values for interpolation: data = { ID_MainTitle: "Hello World", ID_Para1: "This is a test!" }; Then compile the template and run it: var template = Handlebars.compile(templateSource); var result = template(data); Your resulting, interpolated HTML will be in result. There are minor differences depending whether you want to do this in a server like node, or on the browser. These days, JS programmers do less "programming", and more calling of APIs. A key skill is to find the thing that has already been written and figure out how to use it and glue it together with other components.
accepted answer of: http://stackoverflow.com/q/27293758
score: 2
answers question: http://stackoverflow.com/q/27293758
upvote count: 2

http://stackoverflow.com/comment/43049779
type: Comment
has text: @lwang135 Thanks for Replying back. The object is local to the scope of the function. Adding a Sample snippet of the code above in my question. Thanks to take a look into that. Awaiting any response.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27278655

http://stackoverflow.com/comment/43030916
comment on: http://stackoverflow.com/a/27278035
score: 0
type: AnswerComment
has text: Ok, so then you are talking about variable products. WooCommerce doesn't have anything built-in for adding those to the cart via ajax, probably because the options need to be configured first on the product page. I do think this is possible. You'll have to use the `add_to_cart()` action (is mentioned in the code block I already posted and can be found in the `WC_Cart` class. That function has 5 parameters, 2 of which specifically concern variations.
type: Comment

http://stackoverflow.com/a/27301595
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43066897
has comment: http://stackoverflow.com/comment/43067075
accepted answer of: http://stackoverflow.com/q/27301496
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27301496
has comment: http://stackoverflow.com/comment/43067188
has comment: http://stackoverflow.com/comment/43067015
has comment: http://stackoverflow.com/comment/43066763
has body: Add this to your child theme's functions.php file. function fullcalendar_jquery_enqueue() { wp_register_script('fullcalendar', "http//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.3/fullcalendar.min.js", false, null, true); wp_enqueue_script('fullcalendar'); } add_action("wp_enqueue_scripts", "fullcalendar_jquery_enqueue", 11); function load_styles() { wp_register_style('fullcalendarcss', 'http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.3/fullcalendar.min.css'); wp_register_style('fullcalendarprintcss', 'http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.3/fullcalendar.print.css'); wp_enqueue_style( 'fullcalendarcss'); wp_enqueue_style( 'fullcalendarprintcss'); } add_action('wp_print_styles', 'load_styles');
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43066852
has comment: http://stackoverflow.com/comment/43067049

http://stackoverflow.com/comment/42960107
comment on: http://stackoverflow.com/a/27227858
score: 0
type: AnswerComment
has text: okay good one @TheGr8_Nik its working but they are not closed bydefault...the divs must be closed on loading or refreshing
type: Comment

http://stackoverflow.com/q/27236802
answer count: 2
tagged with: google-maps
upvote count: 1
downvote count: 1
has title: Preserving Google map zoom to kml layer on checkbox click
tagged with: kml
favorite count: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/33004499
has answer: http://stackoverflow.com/a/27238471
accepted answer: http://stackoverflow.com/a/27238471
type: Question
has answer: http://stackoverflow.com/a/33004499
has body: I'm attempting to add multiple kml layers to a map that can be turned on and off with check boxes. I got that part working (yay!). When I click on a layer to turn it on, it zooms in (this is fine), but when I unclick to turn the layer off, it zooms back out to my map extent. How do I get it to preserve the zoom of the last loaded layer? Code below. &lt;script&gt; var map; var watershedLayer = new google.maps.KmlLayer ({ url: 'http://mvihes.bc.ca/mapping/watersheds.kmz' }); var ere1949Layer = new google.maps.KmlLayer ({ url: 'http://mvihes.bc.ca/mapping/ere1949.kmz' }); function initialize() { var parksville= new google.maps.LatLng(49.316786, -124.308768); var mapOptions = { zoom: 9, center: parksville }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); check(); } function check() { if(document.getElementById('watersheds').checked) {watershedLayer.setMap(map);} else {watershedLayer.setMap(null);} if(document.getElementById('ere1949').checked) {ere1949Layer.setMap(map);} else {ere1949Layer.setMap(null);} } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; I tried using the preserveViewport function but it just stopped the layer from zooming in, which is not what I wanted. I'm new to javaScript so possibly I'm missing something obvious...any help would be appreciated! jsfiddle
tagged with: javascript
has comment: http://stackoverflow.com/comment/42950454
score: 0

http://stackoverflow.com/comment/42847731
type: AnswerComment
type: Comment
has text: It puts 737 into the capture group. You can see it on Regex101. There's also a Code Generator for Javascript. Love that website.
score: 2
comment on: http://stackoverflow.com/a/27179469

http://stackoverflow.com/a/27199812
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27199783
has body: When you declare a variable in JavaScript, you don't use the variables type. So even if it is a date object (or any other type of object or primitive), you use the var keyword. var date = 1322018752992; var date1 = new Date(date); Earlier answer before question was edited: There is an l at the end of your number (the letter L in lowercase). This would, in a language with multiple type of number structures, indicate that it is a long. But JavaScript does not have multiple number types, only number, and a number is a 64b floating point value. So, if you remove the l, it should work.

http://stackoverflow.com/a/27292693
type: AcceptedAnswer
downvote count: 0
has body: The first element is the full match of the regex. If you tried this: const str = "Here is somereg1 and somereg2"; str.match(/.*(somereg1|somereg2)/) Your result would be [ "Here is somereg1 and somereg2", "somereg2" ]. This same behaviour occurs with an .exec(str) method call. You might want to read about .match and .exec. About the “sub parentheses matches”: in regexes, parentheses delimit capture groups. So, if you had this regex: /.*(somereg1).*?(somereg2)/ Your .match result would be [ "Here is somereg1 and somereg2", "somereg1", "somereg2" ]. So, as you can see, the result array consists of the full match followed by all capture groups matches. And to force a group not to be captured, just delimit with (?: and ): "Here is somereg1 and somereg2".match(/.*(?:somereg1).*?(somereg2)/); // Will result in [ "Here is somereg1 and somereg2", "somereg2" ]. Note that the g (global) flag changes the return semantics of match: they will return an array of full matches and capture groups will be ignored. exec, on the other hand, always returns the full match and capture group matches of the match which is after the current lastIndex of the RegExp instance. For convenience, matchAll can be used instead, which returns an iterator of all matches, including all capture groups.
has comment: http://stackoverflow.com/comment/43059772
type: Answer
has comment: http://stackoverflow.com/comment/43051694
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27292602
answers question: http://stackoverflow.com/q/27292602

http://stackoverflow.com/comment/42930721
comment on: http://stackoverflow.com/q/27226554
score: 2
type: QuestionComment
type: Comment
has text: maybe you could try to provide some more code (maybe even embedded in SO or at least a fiddle) which reproduces the issue?

http://stackoverflow.com/q/27286134
score: 7
type: Question
tagged with: reactjs
has body: I'm working on a flux application and am considering adopting immutable.js to maintain state. I saw that react supplies its own helper for updating immutable objects (http://facebook.github.io/react/docs/update.html), but couldn't tell how it was much different from immutable's own setIn and updateIn methods (i.e, i can already compare objects with === to se if they changes with setIn). Is there a reason to use the react helper with immutable.js? Is it just syntactic sugar? TL;DR is: var map = Immutable.fromJS({bar: 'baz'}); map2 = React.addons.update(map, { bar: {$set: 'foo'} }); different from var map = Immutable.fromJS({bar: 'baz'}); map2 = map.set('bar', 'foo');
answer count: 1
tagged with: javascript
tagged with: reactjs-flux
upvote count: 7
has title: Using React's immutable helper with Immutable.js
favorite count: 0
downvote count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27286329
accepted answer: http://stackoverflow.com/a/27286329

reset
tags question: http://stackoverflow.com/q/27304599
type: Tag
tag name: reset
tags question: http://stackoverflow.com/q/27162864

http://stackoverflow.com/a/61299470
type: Answer
has body: As the error states you need a window object to work with jquery. You will need JSDOM to use Jquery methods. Try this. const { JSDOM } = require( "jsdom" ); const { window } = new JSDOM( "" ); const $ = require( "jquery" )( window ); // or const jquery = require( "jquery" )( window );
answers question: http://stackoverflow.com/q/27184300
score: 0

http://stackoverflow.com/a/27307927
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27292794
has body: ideas on what might be going on? Seems like a bug. They might have broken parsing in the compiler rewrite. I'd do : tsc input.ts --out output.js --declaration

http://stackoverflow.com/comment/42837387
type: AnswerComment
type: Comment
has text: However I think this is an anomalous behavior due to a bug of spectrum.
comment on: http://stackoverflow.com/a/27173642
score: 0

http://stackoverflow.com/comment/42902081
type: Comment
has text: (OT) @GrooveChampion :) kind from you! Don't worry, I never get offended (I adore constructive criticism) and I can assure you the same for almost every other (10000+) user I know on this site! We strive to give the most accurate answers but we expect the same from Questions! Warm welcome to SO and see you around! Happy coding and hope to see some nice answers of yours! GL
comment on: http://stackoverflow.com/a/27198142
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42855716
type: QuestionComment
comment on: http://stackoverflow.com/q/27184049
score: 0
has text: edited, this is the very very first part of the code.
type: Comment

http://stackoverflow.com/a/27305658
type: Answer
upvote count: 4
downvote count: 0
has body: One of the primary reasons your site looks worse in IE 8 is that it's loading in Quirks Mode. This is likely due to the fact you have a misplaced &lt;script&gt; tag above your doctype declaration: &lt;script type="text/javascript"&gt; var selectedVarsity = 0; var searchText = ""; var varName = ""; var selectedCampus = ""; &lt;/script&gt; &lt;!DOCTYPE html&gt; You'll need to move this into the &lt;head&gt; in order for it to be valid. No spaces or other characters can precede the doctype declaration. Another observation is your use of Flexbox, something that wasn't supported in Internet Explorer until version 10. As such, Internet Explorer 8 won't understand how to properly layout your elements when you have a direct reliance upon modern practices like this. It's important to note that Document Mode switching in modern version of Internet Explorer aren't meant to serve as emulation for older versions of Internet Explorer. I recently blogged about this, comparing Document Modes to an A99 Aquata Breather (if you're into Star Wars). If you wish to support Internet Explorer 8, you should do your development in Internet Explorer 8 rather than treating it as an after-thought. You can download a free IE 8 virtual machine from http://modern.ie, or access streaming virtual machines in your browser on http://browserstack.com. To understand briefly what types of CSS support differences exist between IE 8 and IE 11, see this side-by-side comparison courtesy of caniuse.com.
score: 4
has comment: http://stackoverflow.com/comment/43074601
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27305403
answers question: http://stackoverflow.com/q/27305403

http://stackoverflow.com/q/27181183
has body: I'm working on a module to save browser memory and stuck at some point. Taking an example, I have a webpage with two frames. Let's say these two frames are exactly the same web page, which means that they should share DOM and Javascript object. However, the current Firefox browser still treat them differently, which means I have duplicate DOM and Javascript Object in my memory. I want to add a feature that they can share DOM and Javascript Object. I tried the approach to modify the Firefox source code but it introduces a lot of new bugs which makes the browser crash again and again. I know there is a DOM inspector which can find all the DOMs, insert new ones, or delete the existing ones. So I want to ask if I can implement this sharing feature using a browser plugin. Or, I would really appreciate it if you can give me some inspiration.
has title: DOM and Javascript Object manipulation in Firefox
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/42956883
tagged with: dom
type: Question
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/42850795
type: UnansweredQuestion

http://stackoverflow.com/comment/42985440
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27255829
type: Comment
has text: WTH do you mean by "*within the window object*"? And yes, your function declaration obviously works, as you can see by trying it out.

http://stackoverflow.com/q/27208407
has comment: http://stackoverflow.com/comment/50864430
has body: I'm trying to put image in clipboard when user copies canvas selection: So I thought the right way would be to convert canvas tu dataURL, dataURL to blob and blob to binary string. Theoretically it should be possible to skip the blob, but I don't know why. So this is what I did: function copy(event) { console.log("copy"); console.log(event); //Get DataTransfer object var items = (event.clipboardData || event.originalEvent.clipboardData); //Canvas to blob var blob = Blob.fromDataURL(_this.editor.selection.getSelectedImage().toDataURL("image/png")); //File reader to convert blob to binary string var reader = new FileReader(); //File reader is for some reason asynchronous reader.onloadend = function () { items.setData(reader.result, "image/png"); } //This starts the conversion reader.readAsBinaryString(blob); //Prevent default copy operation event.preventDefault(); event.cancelBubble = true; return false; } div.addEventListener('copy', copy); But when the DataTransfer object is used out of the paste event thread the setData has no longer any chance to take effect. How can I do the conversion in the same function thread?
type: Question
has title: Convert Blob to binary string synchronously
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27212339
favorite count: 0
has answer: http://stackoverflow.com/a/27212339
accepted answer: http://stackoverflow.com/a/27208593
has comment: http://stackoverflow.com/comment/50901052
upvote count: 6
score: 6
linked to: http://stackoverflow.com/q/27262879
tagged with: filereader
type: AnsweredQuestion
tagged with: synchronous
has comment: http://stackoverflow.com/comment/51054195
has answer: http://stackoverflow.com/a/27208593

http://stackoverflow.com/comment/43039195
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27285802
has text: you are measuring 2 different things

http://stackoverflow.com/a/37951361
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/27266550
has comment: http://stackoverflow.com/comment/81982813
downvote count: 0
has body: Inspired by code from Eloquent JavaScript and the answer provided by @axelduch function flatten(array, mutable) { var nodes = (mutable &amp;&amp; array) || array.slice(); // return a new array. var flattened = []; for (var node = nodes.shift(); node !== undefined; node = nodes.shift()) { if (Array.isArray(node)) { nodes.unshift.apply(nodes, node); } else { flattened.push(node); } } return flattened; }
score: 4
has comment: http://stackoverflow.com/comment/63961210

http://stackoverflow.com/comment/42917410
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27215496
has text: This code should go in main.js and you are doing this from the addon-sdk right? You have to download and set that up: https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation

http://stackoverflow.com/comment/43330995
type: Comment
comment on: http://stackoverflow.com/a/27440962
type: AnswerComment
score: 0
has text: This is what I told you in my answer. Why did you answer it again and accept yours?

http://stackoverflow.com/a/27283582
answers question: http://stackoverflow.com/q/27281891
has body: This will do it the way you're suggesting: by pushing the formulas to an array and then writing the array to the sheet. But I don't see a reason to do it this way, and I think @KRR posted the more elegant solution (I originally wrote similar code until I saw he or she beat me to it). function copiaFormula(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var numCols = 10; var formulas = []; for(var i=0 ; i&lt;numCols ; i++){ formulas[i] = "=SUM(R[-3]C[0]:R[-1]C[0])"; } sheet.getRange(5, 1, 1, formulas.length).setFormulasR1C1([formulas]); }
has comment: http://stackoverflow.com/comment/43035569
score: 0
type: Answer

http://stackoverflow.com/comment/43050554
has text: Yes I had attached the Schema, but it didn't work with insecure off for some reason. Mentioned here by the author that you have to define your own allow / deny rules if insecure is off: https://github.com/aldeed/meteor-autoform/issues/380
comment on: http://stackoverflow.com/q/27281645
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42958013
score: 0
comment on: http://stackoverflow.com/q/27240752
has text: And I was thinking to divide the user input into parts like: If a user input is 10, then I will divide it into 4,4,2, And will run for loop inside a for loop. But not able to divide the number without if condition.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43085950
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27312700
has text: Can't do that server-side (Class A is a c# class on the server - an MVC model as it goes...)
score: 0

http://stackoverflow.com/q/27210061
score: 2
upvote count: 2
has body: see i have one form which contains select drop downlist and 2 textbox .In one textbox click option i am going to one page which contains contact list. i am appending the value from that page and again i am returning back to my old page.so after this whatever the value i changed in dropdown select list before its get changed to default value as 1.its not remain same as before.below is my code. this is my html form. 1 2 and this is my js function getPri(sel) { var value = sel.value; if(value=="2") { $("#to").show(); } else { $("#to").hide(); }} where as in contact.html,i am havving contact list, i am appending the one of the contact from that and appending it to the same textbox which is havving id to. function main() { var contact = ""; if ( sessionStorage.getItem("contact") ) { contact = sessionStorage.getItem("contact"); $("#to").val(postneedcontact); } Now the problem is as suppose i m selected value 2 then contact textbox will show.now after clicking on this i am able to append this value and everything is working correctly.the problem is that the value which i get selected now its changed to again 1.which i want it to set it what it was previously selected by me as 2 because if 1 is selected then contact textbox will hide as shown in the code.so any solution for this?
tagged with: html.dropdownlistfor
type: Question
has title: select list value not remains constant after making call to another html page
has answer: http://stackoverflow.com/a/27210318
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/9709182
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27210155
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

mongodb
tags question: http://stackoverflow.com/q/27217769
tags question: http://stackoverflow.com/q/27184775
tags question: http://stackoverflow.com/q/27255235
tags question: http://stackoverflow.com/q/27209552
tags question: http://stackoverflow.com/q/27306978
tags question: http://stackoverflow.com/q/27222003
tags question: http://stackoverflow.com/q/27196475
tags question: http://stackoverflow.com/q/27219418
tags question: http://stackoverflow.com/q/27296180
tags question: http://stackoverflow.com/q/27253669
tags question: http://stackoverflow.com/q/27162617
tags question: http://stackoverflow.com/q/27166856
tag name: mongodb
tags question: http://stackoverflow.com/q/27217704
tags question: http://stackoverflow.com/q/27310732
tags question: http://stackoverflow.com/q/27198060
tags question: http://stackoverflow.com/q/27249983
tags question: http://stackoverflow.com/q/27235720
tags question: http://stackoverflow.com/q/27271849
type: Tag
tags question: http://stackoverflow.com/q/27202418
tags question: http://stackoverflow.com/q/27243824
tags question: http://stackoverflow.com/q/27178314
tags question: http://stackoverflow.com/q/27226884
tags question: http://stackoverflow.com/q/27274125
tags question: http://stackoverflow.com/q/27238457
tags question: http://stackoverflow.com/q/27194587
tags question: http://stackoverflow.com/q/27206252
tags question: http://stackoverflow.com/q/27212713
tags question: http://stackoverflow.com/q/27202411
tags question: http://stackoverflow.com/q/27267770
tags question: http://stackoverflow.com/q/27304685
tags question: http://stackoverflow.com/q/27164008
tags question: http://stackoverflow.com/q/27199895
tags question: http://stackoverflow.com/q/27304542
tags question: http://stackoverflow.com/q/27182787
tags question: http://stackoverflow.com/q/27256161
tags question: http://stackoverflow.com/q/27291703
tags question: http://stackoverflow.com/q/27284585
tags question: http://stackoverflow.com/q/27272074

http://stackoverflow.com/q/27271373
answer count: 2
has comment: http://stackoverflow.com/comment/43012557
has comment: http://stackoverflow.com/comment/43012807
has comment: http://stackoverflow.com/comment/43012705
has comment: http://stackoverflow.com/comment/43013347
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27272099
has title: javascript: Form is not getting submiited only IE, but, it works all other browsers
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43012635
has comment: http://stackoverflow.com/comment/43012533
has comment: http://stackoverflow.com/comment/43012679
has comment: http://stackoverflow.com/comment/43012561
type: Question
tagged with: internet-explorer-8
possible better answer: http://stackoverflow.com/a/27271891
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27272099
has body: On this code, this is working perfectly, it checks all the if condition and its okay in all the browsers except IE8 and IE. when all the login values are entered correctly, then, while submiting the form, it working all browsers except IE, IE8, why it is not working in IE8? Any clue? This below will be displayed when all the inputs are okay. This is not working in IE8. Any help? Form submitted successfully I don't know where the exact problem. It works in rest of the browsers. Bootstrap Example <!--[if IE]> <![endif]--> Form submitted successfully Name should not be empty Password does not be match Email is not valid Invalid Website URL
has answer: http://stackoverflow.com/a/27271891
has comment: http://stackoverflow.com/comment/43013084
score: 0

http://stackoverflow.com/q/27269459
favorite count: 0
has answer: http://stackoverflow.com/a/27269610
tagged with: angularjs
has title: Protractor cannot find angular
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27269610
type: Question
tagged with: protractor
answer count: 1
downvote count: 0
tagged with: javascript
has body: I am trying to set up unit/e2e tests for the angular app. Following the instructions on the protractor web site and numerous other samples I have set it up and being able to run tests unless they are referring to the angular objects. Here is the sample html page I want to have tests for: ..... ... The test: describe('Logon page', function () { beforeEach(function () { browser.get('default.html'); angular.module("app"); }); it('should have a title', function () { expect(browser.getTitle()).toEqual('Logon'); }); }); as soon as I run it I got an exception: "ReferenceEror: angular is not defined". If I remove line "angular.module("app");" - it works fine. By looking at console output of the protractor it looks like Protractor.waitForAngular() is internally called after I try to access "angular" object. But as far as I understand browser.get - should load it before? I use angular 1.3.4 and protractor 1.4.0. Thanks in advance.

http://stackoverflow.com/a/70782523
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27311226
has body: A way, too late for the party but I ended up doing this: function resolveTemplate(id) { return $(id).contents(); } ... var $searchIcon = resolveTemplate('#search-icon-template'); $('#div').append($searchIcon);
downvote count: 0

http://stackoverflow.com/comment/42985721
comment on: http://stackoverflow.com/q/27255977
score: 2
type: Comment
type: QuestionComment
has text: Because `#app` is a div and divs can't be checked?

http://stackoverflow.com/comment/43002559
type: Comment
has text: Updated the answer with fiddle.
comment on: http://stackoverflow.com/a/27265418
type: AnswerComment
score: 0

http://stackoverflow.com/a/27288422
accepted answer of: http://stackoverflow.com/q/27287766
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: try this code in movie.js function addStuff() { var movie_name_entered = document.getElementById("box").value; var movieList = document.getElementById("list"); var hr = new XMLHttpRequest(); var url = "movie.php"; hr.open("POST", url, true); hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); var param = "film=" + movie_name_entered; hr.setRequestHeader("Content-length", param.length); hr.setRequestHeader("Connection", "close"); hr.onreadystatechange = function() { if (hr.readyState == 4 &amp;&amp; hr.status == 200) { var return_data = hr.responseText; console.log(hr.responseText); document.getElementById("status").innerHTML = return_data; } } hr.send(param); document.getElementById("status").innerHTML = "processing..."; } Please change your php code to below if ($_POST) { $data = $_POST["film"]; $file = 'movie.txt'; $fp = fopen($file, "a+"); $encoded = json_encode($data); fwrite($fp, $encoded); fclose($fp); exit(); }
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/43072506
answers question: http://stackoverflow.com/q/27287766

http://stackoverflow.com/a/27305522
has comment: http://stackoverflow.com/comment/43074314
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27305268
downvote count: 0
has comment: http://stackoverflow.com/comment/43074743
has body: You can use .sort method like this var $wrapper = $('#ProductContainer'); $wrapper.find('.explore-cell').sort(function (a, b) { return a.getAttribute('data-name') &gt; b.getAttribute('data-name'); }) .appendTo( $wrapper ); But I don't sure about the cross browsing support
type: Answer

http://stackoverflow.com/q/27172353
tagged with: css
type: UnansweredQuestion
tagged with: color-picker
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42835839
score: 1
has title: SpectrumJS, dragger and slider position issue with display: none container
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: spectrum
has comment: http://stackoverflow.com/comment/42836341
has body: I need to use SpectrumJS inside a div that has the attribute "display: none", but when I remove the attribute to make the div visible, the position of the dragger and the slider does not correspond to the color set. If in container div the attribute "display" isn't set, everything works correctly. HELP!
has answer: http://stackoverflow.com/a/27173642

http://stackoverflow.com/a/27261263
has body: In the JS code, use the auto-populated parameters to your benefit on server-side: var nodeToGetHeight = "${nodeId}"; $("#" + nodeToGetHeight).height(); These auto-populated parameters could be used to populate an array that could then be looped through for multiple heights.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27261150
type: AcceptedAnswer
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/27261150

http://stackoverflow.com/comment/43018237
comment on: http://stackoverflow.com/a/27273920
type: Comment
has text: The problem is this is NOT a javascript question. He doesn't even know jack squat about javascript. I said "don't forget to" to imply that following piece of code works only with JQuery. I knew he would try this without including the library and fail. I actually care about him. Where is your answer, George ? Where did you help him ? All you do is commenting "Who said anything about jQuery?" under JQuery answers.
score: 1
type: AnswerComment

http://stackoverflow.com/a/27161200
type: AcceptedAnswer
has body: Assuming you are using the asset pipeline, change the file name back to .js.erb and then use this: var userDesIcon = "&lt;%= image_path('pin-red-48.png') %&gt;"; // rest of your JS code here
type: Answer
answers question: http://stackoverflow.com/q/27160979
accepted answer of: http://stackoverflow.com/q/27160979
score: 0

http://stackoverflow.com/comment/42834052
type: Comment
has text: I was thinking the same thing and was hoping it was going to be as simple as this, but the requirement here is not automation testing.
comment on: http://stackoverflow.com/a/27171225
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42843510
has text: Let me know if I'm wrong.
score: 0
comment on: http://stackoverflow.com/q/27177032
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27272060
has body: I have modified this javascript code that I found on jsfiddle. My aim is to display tables when a link has been clicked, and when clicking on a different link it displays a different table and hide the previous table. Here's my code: Untitled Document Business Cards Business card table Letterheads Letterhead table It worked on jsfiddle, but when I place it on my HTML page, it won't run. Any suggestions? Also, I have no knowledge of JavaScript, I have only modified it and it ran on jsfiddle, but not my HTML page.
favorite count: 0
has comment: http://stackoverflow.com/comment/43014046
has comment: http://stackoverflow.com/comment/43013947
has comment: http://stackoverflow.com/comment/43013885
downvote count: 2
has title: Javascript won't run on my HTML page
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43013882
upvote count: 0
accepted answer: http://stackoverflow.com/a/27272148
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43013844
has answer: http://stackoverflow.com/a/27272148
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/42932015
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27191092
has text: Your link [http://stackoverflow.com/questions/544993/official-way-to-ask-jquery-wait-for-all-images-to-load-before-executing-somethin] suggests using `$(window).load(function() {`, not document.load() as you suggest. I tried both and neither make any difference with Chrome. The image still loads larger than the window size in Chrome as explained above.

http://stackoverflow.com/comment/43085945
comment on: http://stackoverflow.com/a/27312645
type: AnswerComment
score: 0
has text: $("input[type='checkbox']").val(); If you have multiple checkboxes: $('#checkbox_id').val();
type: Comment

http://stackoverflow.com/comment/43075149
type: QuestionComment
has text: before using **data.email_error** or even **data.password_error** try to convert the data string to json format by calling **data = window.JSON.parse(data) then you can use data.email_error**
comment on: http://stackoverflow.com/q/27303351
score: 0
type: Comment

http://stackoverflow.com/comment/42913204
type: QuestionComment
has text: You mean I add the gmaps script to index.php and use initialize() on a certain page? EDIT: Can this approach increase load time?
comment on: http://stackoverflow.com/q/27216159
score: 0
type: Comment

http://stackoverflow.com/comment/43003896
comment on: http://stackoverflow.com/q/27265790
score: 0
type: Comment
type: QuestionComment
has text: did you try placing the `autocomplete="off"` attribute on the text inputs?

http://stackoverflow.com/q/27311274
tagged with: twitter-bootstrap-3
has body: I'm trying to get the response of a GET request inside a textfield on my webpage using jquery. Currently, I have the following code with which I can get the response on the console. $(document).on('click', '#get-button', function(e) { e.preventDefault(); $.ajax({ type: "GET", url: $("#url").val(), data: '', success: function(response, textStatus, XMLHttpRequest) { console.log(response); } }); return false; }); $(document).on('click', '#post-button', function(e) { e.preventDefault(); $.ajax({ type: "POST", url: $("#url").val(), data: $("#json-data").serialize(), success: function(response, textStatus, XMLHttpRequest) { console.log(response); } }); return false; }); Below is a part of the HTML code where I want to fit the response(in JSON) format. JSON Response
has title: Display response to a GET & POST request in a textbox
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27311374
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/27311374
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
favorite count: 0

http://stackoverflow.com/comment/42854067
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/27183204
has text: I'm not aware of any case other than NaN, which is not to say such an exotic case does not exist. Why does it matter? If this is a job interview question, you should withdraw your application to such a company that asks irrelevant trivia questions.
type: Comment

http://stackoverflow.com/comment/43042330
type: Comment
has text: So only this much part remains in query: `$sql = "SELECT name, image_url, amazon_url, plug_type FROM adapters_list WHERE plug_type = '$value' AND country LIKE '%$value2%'";`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27287425

http://stackoverflow.com/comment/42937416
has text: @Thanks leo. Vote if you think question is quality.
comment on: http://stackoverflow.com/a/27230052
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27284107
answers question: http://stackoverflow.com/q/27283677
type: AcceptedAnswer
downvote count: 0
has body: Your read callback is all wrong. The callback: function (data) { return data; } Is dead code, its returning the data to the jQuery function that called this callback, which is going to do nothing with it. You need to return the deferred itself: read: function () { return $.get("http://horodyski.me/api/skills"); } You also need the async extender here: http://smellegantcode.wordpress.com/2012/12/10/asynchronous-computed-observables-in-knockout-js/ ko.extenders.async = function(computedDeferred, initialValue) { var plainObservable = ko.observable(initialValue), currentDeferred; plainObservable.inProgress = ko.observable(false); ko.computed(function() { if (currentDeferred) { currentDeferred.reject(); currentDeferred = null; } var newDeferred = computedDeferred(); if (newDeferred &amp;&amp; (typeof newDeferred.done == "function")) { plainObservable.inProgress(true); currentDeferred = $.Deferred().done(function(data) { plainObservable.inProgress(false); plainObservable(data); }); newDeferred.done(currentDeferred.resolve); } else { plainObservable(newDeferred); } }); return plainObservable; }; Used like: var skills = ko.computed(...).extend({ async: null }); If you want to hook into the JSON before it is passed to your view: var skillsJson = ko.computed(...).extend({ async: null }); var skills = ko.computed(function () { return transformData(skillsJson()); }; Or: var skills = ko.computed(function () { return $.get("url").then(function (data) { return transform(data); }); });
has comment: http://stackoverflow.com/comment/43037443
score: 6
type: Answer
has comment: http://stackoverflow.com/comment/43037327
upvote count: 6
has comment: http://stackoverflow.com/comment/43037421
accepted answer of: http://stackoverflow.com/q/27283677

http://stackoverflow.com/comment/42805628
has text: Done this! get results for 3 characters, get all in a JS variable, serve the rest of requests from this JS varibale. SLOW :(
comment on: http://stackoverflow.com/q/27154361
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/37357916
answers question: http://stackoverflow.com/q/27303369
type: AcceptedAnswer
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/95427626
downvote count: 0
has comment: http://stackoverflow.com/comment/95427031
has body: You can use a stack. When you discover a nested array, just replace it with its items. function flatten(arr) { var result = []; var stack = arr, first; while (stack.length &gt; 0) { first = stack[0]; if (Array.isArray(first)) { // Replace the nested array with its items Array.prototype.splice.apply(stack, [0, 1].concat(first)); } else { result.push(first); // Delete the first item stack.splice(0, 1); } } return result; }
accepted answer of: http://stackoverflow.com/q/27303369
score: 5

http://stackoverflow.com/comment/42870233
has text: Still the same thing.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27192157

http://stackoverflow.com/a/27281661
has comment: http://stackoverflow.com/comment/43032343
has body: You are doing a two parseInt operations and adding them together, then getting the element. parseInt will strip the two digits after the decimal. UPDATE: Try parseFloat
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27281486
answers question: http://stackoverflow.com/q/27281486
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43032279

http://stackoverflow.com/comment/42867260
has text: it should be `typeof thing !== "undefined"`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27190190
type: AnswerComment

http://stackoverflow.com/a/27275610
answers question: http://stackoverflow.com/q/27275382
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43020703
has comment: http://stackoverflow.com/comment/43020878
score: 3
downvote count: 0
has body: I would really NOT advice you to use inline JavaScript but here is what the function should be: function countChar( elem ) { var max = 4000, len = elem.value.length, lbl = $('#lblcount'); if(len &gt;= max) { lbl.text(' you have reached the limit') .addClass("lblCountRed").removeClass('lblCountGreen'); } else { var ch = max - len; lbl.text(ch + ' characters left') .addClass("lblCountGreen").removeClass('lblCountRed'); } } If you wanted to accomplish this without inline JavaScript, you would: remove @onkeyup = "countChar(this)" then use the following code: - $(document).ready(function() { $("#Description").on('keyup', function() { var max = 4000, len = this.value.length, lbl = $('#lblcount'); if(len &gt;= max) { lbl.text(' you have reached the limit') .addClass("lblCountRed").removeClass('lblCountGreen'); } else { var ch = max - len; lbl.text(ch + ' characters left') .addClass("lblCountGreen").removeClass('lblCountRed'); } }); });
accepted answer of: http://stackoverflow.com/q/27275382
upvote count: 3

http://stackoverflow.com/q/27243773
score: 1
has answer: http://stackoverflow.com/a/27244072
has comment: http://stackoverflow.com/comment/42963150
type: Question
upvote count: 1
tagged with: javascript
has title: How to improve this regex
has comment: http://stackoverflow.com/comment/42963097
has comment: http://stackoverflow.com/comment/42963176
answer count: 3
has answer: http://stackoverflow.com/a/27243883
accepted answer: http://stackoverflow.com/a/27243883
tagged with: regex
has body: I have an regex to find the part of a &lt;a href=""&gt; within the innerHTML of a div. var b = this.innerHTML.match(/href="([^\'\"]+)/g); var c = b[0].split('#')[1]; window.location.assign('#'+c); and would like to get rid of the second line, the .split function. Is there a way to do this? Ideally, I'd like to keep the hashtag before the div, too: The hrefs are allways like this (only the number is subject to change): href="#div46" href="#div47" ...
favorite count: 0
downvote count: 0
possible better answer: http://stackoverflow.com/a/27243929
linked to: http://stackoverflow.com/q/1732348
has answer: http://stackoverflow.com/a/27243929
has comment: http://stackoverflow.com/comment/42963143
type: AnsweredQuestion

http://stackoverflow.com/q/27269291
favorite count: 0
has body: I have a html5 video player with custom controls attached in the same div play magic play and css; .controls { display: none; } .container:hover .controls { display: block; } then finally javascript function clickedFullScreenThing(clicked) { var container = clicked.parentNode // may need to extend to get .container container.requestFullscreen(); } When I set the video to fullscreen mode the video stretches to its full size using .container:full-screen .controls video { min-height:100%; min-width:100%; height:auto; width:auto; position:absolute; top:0; bottom:0; margin:auto auto; } and .container:-webkit-full-screen .controls { display: block; } .container:-moz-full-screen .controls { display: block; } .container:full-screen .controls { display: block; } .container:fullscreen .controls { display: block; } The video appears to stretch to its maximum size (it's fairly low resolution) but it doesn't fill the screen. The controls also sit underneath the video instead of nicely hovering over it like before. How do I make the video fill the screen N.B. javascript just a rough example of how it looks, there is more cross browser code in there but it's ugly.
type: Question
tagged with: css
tagged with: video
upvote count: 1
has comment: http://stackoverflow.com/comment/43009164
has title: html5 video player full screen
answer count: 0
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1055214
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43009315

http://stackoverflow.com/comment/42994862
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27260863
has text: @kittycat3141 the HTML does not mention any script...
score: 0

http://stackoverflow.com/comment/42975773
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27250655
has text: Code: the javascript function is accessible. I remove the <%# Eval("MECNUM")%> portion and replace it with any string and the function executes fine

http://stackoverflow.com/comment/43594802
type: Comment
comment on: http://stackoverflow.com/a/27551174
has text: @hankduan not sure why, but without `setTimeout()` protractor is exiting with error code 100 (no failing tests though). Here is a [complete traceback](https://gist.github.com/alecxe/446f15c78434665766db). With `setTimeout()` no errors, working.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42912685
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27216066
score: 0
has text: Thanks for your answer. But im getting this error. "Uncaught TypeError: Cannot read property 'unsubscribe' of undefined" according to this, is it possible to use the unsubscribe. but it dosen't seems like its working. https://pusher.com/docs/client_api_guide/client_public_channels

http://stackoverflow.com/comment/42803945
comment on: http://stackoverflow.com/q/27154684
score: 6
has text: Remove 2 `}` at the end, you have syntax error.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43075822
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27306692
has text: It just means that initially it's length is zero (i.e. it's an empty Array).

http://stackoverflow.com/comment/42896696
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27207365
has text: You can't have multiple elements with the same `id`.

http://stackoverflow.com/comment/43014571
comment on: http://stackoverflow.com/q/27272333
has text: i'm trying to parse a json,and adding some filters,if you uncheck the checkbox the variable for the id remove the selected id,or if you check it it will add the id
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27265258
answers question: http://stackoverflow.com/q/27265075
type: Answer
has comment: http://stackoverflow.com/comment/43003697
has body: but Current time is not been displayed When you create a Date object using two or more values, it is assumed that you are supplying all the values (year, month, day, hour, minute, second and millisecond). If you don't supply all of them, the missing values are set to zero. If you want to create a Date for a particular date that has the current time, then create a Date for now and set the year, month and date using setFullYear: var date = new Date(); date.setFullYear(year, month, day);
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43002253
downvote count: 0

http://stackoverflow.com/a/39987903
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27275712
answers question: http://stackoverflow.com/q/27275712
has body: The DTM interface only works if you have an element on the page that you can place the mbox in. If you do not have an element you can target on the page, but want to add a new mbox for any given rule, you can use a 3rd party tag to add the mbox. The below example uses jQuery. // add a new div to the page, and for simplicity sake I'll // give it an ID with the same name as the mbox $('body').append('&lt;div id="mboxName"&gt;&lt;/div&gt;'); mboxDefine('mboxName','mboxName'); mboxUpdate('mboxName');
score: 1

http://stackoverflow.com/comment/42884924
score: 2
comment on: http://stackoverflow.com/q/27200660
type: Comment
type: QuestionComment
has text: js won't support lookbehinds.

http://stackoverflow.com/a/27227659
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42983081
type: Answer
has comment: http://stackoverflow.com/comment/42974047
accepted answer of: http://stackoverflow.com/q/27227581
has body: You would probably need to do this via a build process. Good task runners include Grunt and Gulp. You could use something like grunt-usemin. This would allow you to put direct script/link tags in your html, then run a grunt command to combine them.
answers question: http://stackoverflow.com/q/27227581

http://stackoverflow.com/a/27229365
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/27229219
answers question: http://stackoverflow.com/q/27229219
has body: You could change changeFontSize() to accept an array of element identifiers, rather than one, then loop through each, carrying out your functionality: function changeFontSize(elements, step) { var i = 0, el = undefined, curFont = 14; for(; i < elements.length; i ++){ el = document.getElementById(elements[i]); if(el != undefined){ curFont = parseInt(window.getComputedStyle(el).fontSize, 10); el.style.fontSize = (curFont + step) + 'px'; } } } And then call your function with an array of ids: A+ A- JSFiddle Or use .querySelectorAll() which is arguably easier to call on, but has less support and is slower: function changeFontSize(elements, step) { var i = 0, elements = document.querySelectorAll(elements), curFont = 14; for(; i < elements.length; i ++){ if(elements[i] != undefined){ curFont = parseInt(window.getComputedStyle(elements[i]).fontSize, 10); elements[i].style.fontSize = (curFont + step) + 'px'; } } } A+ A- JSFiddle
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43073801
type: QuestionComment
has text: I work on the IE team, and just [blogged about Document Modes](http://sampsonblog.com/768/ie-doesnt-have-an-emulation-feature) a couple of days ago. You may find it helpful.
score: 0
comment on: http://stackoverflow.com/q/27305403
type: Comment

http://stackoverflow.com/q/27241326
type: Question
has comment: http://stackoverflow.com/comment/42959223
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42959382
upvote count: 1
downvote count: 1
tagged with: url
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27241721
has title: Why tag replaces spaces with %2520? how to solve the issue?
has body: In this case, I suppose explaining the problem as a scenario would be the best way to explain it. I have a search box in a page called A.html, parameters that are passed to this page should be replaced with the value of its search box. The problem is that, when I pass the parameters the spaces get replaced by %2520 therefore wrong value will be added to the search box. I need to solve it. Link Following address will be put into the address bar: www.example.com/a.html?value=Here%2520and%2520there This value will be replaced with the value of the search box: Here%2520and%2520there. I need to have this value "Here and There" in my search box. (without %2520)
has answer: http://stackoverflow.com/a/27241821
type: UnansweredQuestion

dicom
tag name: dicom
type: Tag
tags question: http://stackoverflow.com/q/27170199

http://stackoverflow.com/q/27189355
has title: Kendo grid column menu extension
answer count: 0
score: 1
upvote count: 1
tagged with: column-chooser
type: Question
tagged with: c#
tagged with: kendo-grid
tagged with: javascript
downvote count: 0
tagged with: jquery
favorite count: 0
has body: Kendo grid provides an option to choose columns when we set "columnMenu: true" I need to save the chosen columns in database. How to achieve the same in Kendo Grid?
type: UnansweredQuestion

http://stackoverflow.com/comment/55025491
score: 0
has text: @pmrotule Still a problem though. With `'(.)$' : '$1s'` pluralizing `page` would result in `pags`. So I converted back to `'$' : '$1s'` and added one rule above in case of an empty string: `'^$' : ''`. Now it works as expected on my side.
type: Comment
comment on: http://stackoverflow.com/a/27194360
type: AnswerComment

http://stackoverflow.com/q/27201301
has body: I have the following jquery code implemented: $( "#admitpage" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); $( "#admitpage li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); The HTML is similar to this: Tab 1 Tab 2 Tab 1 content Next Tab 2 content Now the problem is, a.next doesn't work. I guess because it is within a tab already. How do I make it work? Any help would be greatly appreciated. I've been trying to resolve this for the past hour.
upvote count: 1
type: Question
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/27201485
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has title: Jquery UI Tabs: Link to next/specific tab from within tab
favorite count: 0
possible better answer: http://stackoverflow.com/a/27201510
has answer: http://stackoverflow.com/a/27201510
accepted answer: http://stackoverflow.com/a/27201485
type: AnsweredQuestion
tagged with: tabs

http://stackoverflow.com/q/27175412
tagged with: touch
has answer: http://stackoverflow.com/a/27178128
has answer: http://stackoverflow.com/a/28334696
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: Is there way to interrupt iOS scrolling using javascript? Example 1: user is scrolling content by moving his finger through device screen. When some event happens user continue moving his finger without raising but there is no scrolling anymore. Example 2: user initiated scrolling but stopped his finger without raising. Some event happens and scrollbar disappears. Example 3: Momentum scrolling completely stops when some event happens.
score: 1
tagged with: mobile-safari
linked to: http://stackoverflow.com/q/2890361
type: Question
has title: Interrupt iOS scrolling using JavaScript
answer count: 2
downvote count: 0
tagged with: ios
tagged with: javascript

http://stackoverflow.com/q/27239812
upvote count: 1
has comment: http://stackoverflow.com/comment/42956314
tagged with: jquery
favorite count: 0
has title: defining local variables using an object in javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42956758
has body: May be a silly question, but just wanted to know if there's any difference (performance wise) between the following. SomeObject.prototype.myFunc = function() { var a = 123; var b = "something"; ... } SomeObject.prototype.myFunc = function() { var loc = {}; loc.a = 123; loc.b = "something"; ... } I've been doing the second way, just so its been easier to debug by doing console.log(loc) and it's also a habit from doing server side code where I've been defining local structures.
has comment: http://stackoverflow.com/comment/42956519
has answer: http://stackoverflow.com/a/27267062
has comment: http://stackoverflow.com/comment/42956360
has answer: http://stackoverflow.com/a/27266910
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42956206
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42956450
answer count: 2
has comment: http://stackoverflow.com/comment/42956287

http://stackoverflow.com/q/27256131
favorite count: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/42986252
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/43023289
linked to: http://stackoverflow.com/q/11684454
type: Question
upvote count: 4
has body: I'm new to Chrome extensions, and don't need a lot from an extension, so I haven't studied JS or the HTML5 Chrome API in great detail (however, I do know HTML). Other pages in Stackoverflow were not quite what I was looking for. Basically, I am writing a program that will take HTML page source data and parse certain information out of it for use with another program. What I need to be able to do is use a Chrome extension to get the source of a web page, then save it to a local HTML file for the program to use. I'm using most of the extension source code from this thread: Getting the source HTML of the current page from chrome extension This works very well, except I need the source to go to a local file and not in the popup. In the popup, I'm going to add in a message like "File saved" along with a button to open the external program (if that's even possible). Any help or a step in the right direction would be greatly appreciated.
downvote count: 0
tagged with: javascript
score: 4
has title: Using a Chrome extension, how to get page source and save to a local file?

http://stackoverflow.com/a/27309173
has body: This can be accomplished using the change event on the element. The value of the can be fetched using .val(). Here's a working snippet: $(function(){ var $select = $(".1-100"); for (i=1;i<=100;i++){ $select.append($(' ').val(i).html(i)) } $(document).on('change', 'select', function(){ alert($(this).val()); $('span').text($(this).val()); $('textarea').val($(this).val()); }); }); Select a value: Selected value = http://api.jquery.com/on/ http://api.jquery.com/val/ http://api.jquery.com/text/
answers question: http://stackoverflow.com/q/27308963
has comment: http://stackoverflow.com/comment/43080263
score: 0
has comment: http://stackoverflow.com/comment/43081264
has comment: http://stackoverflow.com/comment/43081482
has comment: http://stackoverflow.com/comment/43080049
type: Answer

http://stackoverflow.com/q/27198565
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: three.js
has title: Load .obj models from client's local machine via THREE.js
type: Question
tagged with: javascript
score: 0
has body: I know in HTML5, there is a FileReader API to load local files under user's selection. But I wanna display the .obj model selected by users. Since FileReader can only read things into string, so is there any objloader in THREE.js that can generate models from strings?
has answer: http://stackoverflow.com/a/27198730

http://stackoverflow.com/comment/42871666
has text: After re-reading it, I wonder how this is actually safer? If the server knows the secret key to decrypt the information and the browser stores the encrypted version, on request, it doesn't matter whether it's the browser or attacker who sends the encrypted information, is it? It would seem that the server will decrypt the encrypted information anyway.
comment on: http://stackoverflow.com/a/27177995
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27213222
tagged with: django
tagged with: python
has title: How to update model using angularjs, Django,Django rest framework
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has body: I have such json representation of a post by its id: http://127.0.0.1:8000/update/1?format=json {"title": "about me", "content": "I like program", "created": "2014-11-29T18:07:18.173Z", "rating": 1, "id": 1} I try to update rating by button click: Click me I have such javascript code: Peharps i have mistake because in json i have a single object. But i dont really know Besides i have such view to have a json by certain post by its id: class UpdateModel(generics.RetrieveUpdateDestroyAPIView): lookup_field = 'id' queryset = BlogPost.objects.all() serializer_class = BlogPostSerializer permission_classes = (AllowAny,)
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27213546
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/42898765
has text: I've check this by fiefox 34 and when paste code in notepat, show with new lines
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27208403

http://stackoverflow.com/comment/43077033
type: Comment
comment on: http://stackoverflow.com/q/27296615
has text: @user2727195 carefully read the question...
score: 0
type: QuestionComment

http://stackoverflow.com/a/27153780
has body: You should use JSON.stringify() instead of manually stringifying them. var str = "javascript:FunctionName(" + JSON.stringify(param1) + ", " + JSON.stringify(param2) + ")"; I'm not quite sure what the problem was, but this solved it.
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27153608

http://stackoverflow.com/q/27303875
tagged with: for-loop
tagged with: javascript
has answer: http://stackoverflow.com/a/27304523
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27304086
accepted answer: http://stackoverflow.com/a/27304086
has body: All Imtrying to do is have a loop to iterate over my nav elements, and every second check the data-time to the variable being counted, and change a div to have the text within the list item. Ill already have the list in increasing order so that wont be a issue. Ive tried 40 different ways to do this and this is my cloest to working solution, it just sets the innerHTML of the div to whitespace and I dont now why. <DOCTYPE! Html> test 1 test 2 test 3 test 4 placeholder placeholder
has answer: http://stackoverflow.com/a/27304627
has title: Delayed loop function not working properly
has comment: http://stackoverflow.com/comment/43071163
possible better answer: http://stackoverflow.com/a/27304523
type: AnsweredQuestion
tagged with: settimeout
has comment: http://stackoverflow.com/comment/43071138
type: Question

http://stackoverflow.com/a/46203797
answers question: http://stackoverflow.com/q/27176983
has comment: http://stackoverflow.com/comment/103818548
downvote count: 0
type: Answer
has body: I assembled bits and pieces of various approaches and got this to work: var customEvent = document.createEvent('HTMLEvents'); customEvent.initEvent('myCustomEvent', true, true); document.dispatchEvent(customEvent); To be honest, this doesn't make a lot of sense to me. It creates an event (naming it HTMLEvents seems to be required) on the document, then goes and initializes that event with another name. If anyone can explain this better please add a comment below so it can be incorporated into the answer. In any case, I'm able to listen to this custom event in IE11 (and modern browsers) with a standard event listener: document.addEventListener('myCustomEvent', function(){ console.log('Event received.'); });
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/113563646

http://stackoverflow.com/q/27221135
type: AnsweredQuestion
score: 1
has body: There is a title window including a 'Ext.tab.Panel' named 'mainTab', add all childrens under it are added dynamic just like below. JsVersionWin.js createPlanAppTab: function (planId) { var me = this; var tab = me.down("tabpanel#mainTab"); me.action.qryJsPlanAppListEdit(planId, function (result) { if (Ext.isEmpty(result)) { return; } var tabList = []; result.forEach(function (planAppExDto, index) { var typeCode = planAppExDto.typeCode; // was,docker if (JsServiceConstants.TYPE_CODE_WAS == typeCode || JsServiceConstants.TYPE_CODE_DOCKER == typeCode) { tabList[index] = { xtype: 'jsPlanAppCompTab', title: planAppExDto.appName, border: false, closable: true, planAppExDto: planAppExDto } } // other app else { tabList[index] = { xtype: 'jsPlanAppAttrValueCompTab', title: planAppExDto.appName, border: false, closable: true, planAppExDto: planAppExDto } } }); tab.add(tabList); tab.setActiveTab(0); }); } The xtype of the children is 'jsPlanAppCompTab' or 'jsPlanAppAttrValueCompTab'. the child component is initialized like below, the component listener on 'afterrender' event to initialize data. JsPlanAppCompTab.js initComponent: function () { var me = this; me.on({ 'afterrender': { fn: me.initData, scope: this, single: true } }); this.callParent(); }, initData: function () { var me = this; var planAppExDto = me.planAppExDto; var planAppId = planAppExDto.planAppId; // edit：attr_value var attrForm = me.down('ztesoftSmartForm#attrForm'); if (!Ext.isEmpty(planAppId)) { var action = Ext.create("ZTEsoft.action.JsVersionAction"); action.qryJsPlanAppAttrValueList(planAppId, function (result) { attrForm.loadConfig(result); }); } // add : query js_app_type_attr for initialize else { var typeAction = Ext.create("ZTEsoft.action.JsAppTypeAction"); var appTypeId = planAppExDto.appTypeId; typeAction.qryJsAppTypeAttrListByAppTypeIdForm(appTypeId, function (result) { attrForm.loadConfig(result); }); } }, getData: function () { var me = this; var attrForm = me.down('ztesoftSmartForm#attrForm');…
tagged with: render
has title: How to render all components under a tabpanel?
accepted answer: http://stackoverflow.com/a/27230482
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: extjs4
has answer: http://stackoverflow.com/a/27230482
upvote count: 1

http://stackoverflow.com/comment/42827019
type: Comment
type: QuestionComment
has text: what do you get, when you just alert() or console.log() your result inside the ajax success function?
comment on: http://stackoverflow.com/q/27167438
score: 0

http://stackoverflow.com/a/52790303
type: Answer
has body: You can use bind method as follows it will hold the scope for the render method this.controls.addEventListener( 'change', this.render.bind(this) );
score: 0
answers question: http://stackoverflow.com/q/27204203

http://stackoverflow.com/a/27248064
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27206268
score: 2
answers question: http://stackoverflow.com/q/27206268
type: AcceptedAnswer
downvote count: 0
has body: I'm the editor of the Clipboard APIs spec. First, sorry about the broken link. It is actually working in the official TR: http://www.w3.org/TR/clipboard-apis/ But not in the Editor's Draft, for somewhat messy process reasons (the "official" HTML5 spec dropped stuff the Clipboard API spec relies on, hard-coding a link to a specific historical snapshot of the official HTML5 spec seems like a bad idea - so I need to decide whether to simply link to the WHATWG spec or wait until a hypotethical HTML6-brings-DnD-back-in situation happens). Now, fixing this link doesn't actually solve your problem - because even in the supposedly bleeding-edge WHATWG spec, setData() is specified as taking a string. Web technology is a work in progress, and you've come across a use case that the (older) setData() API did not take into account. This part of the API dates back to the original Microsoft implementation To be fair, JavaScript itself didn't really have convenient ways to work with binary data back then.. What you probably want to use, is the clipboardData.items.add() API passing in a File object with the relevant data and type. Note that this isn't widely implemented yet, for example AFAIK it's not supported in any current version of Firefox. You can detect the lack of clipboardData.items and .items.add(), and for example tell users to right-click an image and choose "copy to clipboard" manually.

http://stackoverflow.com/q/27248394
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27249120
has title: {"code":101,"error":"object not found for update"} Parse.com Javascript SDK
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/42972171
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27249120
has answer: http://stackoverflow.com/a/41595453
type: Question
has comment: http://stackoverflow.com/comment/42971285
possible better answer: http://stackoverflow.com/a/41595453
has body: I'm trying to update certain column value of my class matching the objectId of the class , Here is my code below var GameScore = Parse.Object.extend("Address"); var query = new Parse.Query(GameScore); query.equalTo("objectId", "xxxx"); query.first({ success: function(object) { alert(JSON.stringify(object)); object.set("address","kkkkkk"); object.save(); }, error: function(error) { alert("Error: " + error.code + " " + error.message); } }); Now in the success function i get the row data for the given objectId, But the object.set and object.save alone not working , please advice what is gone wrong here. I get "{"code":101,"error":"object not found for update"}" error in the reponse. Thanks in advance :)
has comment: http://stackoverflow.com/comment/42971618
tagged with: javascript
has comment: http://stackoverflow.com/comment/42971533

http://stackoverflow.com/q/27294496
score: -1
type: Question
has title: Contact Form 7 Not Submitting
has comment: http://stackoverflow.com/comment/43054176
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Not sure what is causing this problem, if you click Request A Quote from this page you'll notice that even if you fill out the form, it doesn't submit! I'm pretty sure this may be down to a JS conflict but thought I'd post it up here in case I'm way off.... Any help would be much appreciated. Cheers!
favorite count: 0
type: UnansweredQuestion
tagged with: wordpress
tagged with: php
downvote count: 1
has answer: http://stackoverflow.com/a/27294582

jquery-boilerplate
tag name: jquery-boilerplate
tags question: http://stackoverflow.com/q/27230343
type: Tag
tags question: http://stackoverflow.com/q/27281865

http://stackoverflow.com/q/27253564
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27254107
tagged with: facebook-graph-api
tagged with: facebook
type: AnsweredQuestion
has body: I have been trying for 2 days to get a button on my website to open up a pre-populated facebook message for the user to post to their timeline. From the reading I've done it seems that the 'Feed' method no longer supports a custom message, but I think 'Share' does (source)? Nevertheless, I can't get it to actually work anyway. I have set up an app on facebook to get an appId; I've also used the code given directly by facebook developer site but to no avail. I would like this button to trigger a pre-populated (let's say, "this is a test") facebook message to pop up: &lt;a id="fb-share"&gt;&lt;img src="images/fb-logo.png" /&gt;&lt;/a&gt; The code I've simply copied direct from my app page on facebook dev is: &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : 'xxxMyappIDxxx', xfbml : true, version : 'v2.2' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); &lt;/script&gt; So then I believe the remaining script is to call the fb.ui share method from a click of the #fb-share button, so this is what I've got: &lt;script&gt; $('#fb-share').click(function () { FB.ui( { method: 'share', href: 'http://mywebsite.com', }, function(response) { if (response &amp;&amp; !response.error_code) { alert('Posting completed.'); } else { alert('Error while posting.'); } } ) }); &lt;/script&gt; I am also aware this is meant to share a link and not a message; through all my searching I've not found how to actually define a custom message. Fully prepared for being told this is an embarrassing excuse of an attempt, but help will be very much welcomed! Cheers Pinchy
has answer: http://stackoverflow.com/a/27254107
type: Question
has title: Cannot get FB.ui (share/feed) to work - lack knowledge/understanding

http://stackoverflow.com/q/27193177
has comment: http://stackoverflow.com/comment/42871893
tagged with: javascript
has comment: http://stackoverflow.com/comment/42871925
score: 0
has answer: http://stackoverflow.com/a/27193224
answer count: 1
has body: Is there a nice way to convert Math object into "real" javascript object? I want to use Object.keys on Math object. Is that possible to not hardcode it all the way down?
linked to: http://stackoverflow.com/q/10756948
has title: Convert Math object to real object
duplicate of: http://stackoverflow.com/q/10756948
accepted answer: http://stackoverflow.com/a/27193224
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42871967
type: Question

http://stackoverflow.com/a/27272644
has body: You haven't set classname sky to your &lt;body&gt; tag. Or maybe you can use var masthead = document.querySelector('body'); instead.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27272426
downvote count: 0

http://stackoverflow.com/a/27310528
type: Answer
score: 1
upvote count: 1
has body: Not sure what you want to do with the result but assuming you just want to test if the name is in a string the you use the .indexOf() method so: var n = text.indexOf("Eric"); Then the result of n will display the first characters index position and if fails to find the matching word then it will return -1. So then you add this to a simple test like: if(text.indexOf("Eric") &lt;0){ \\doStuff }
answers question: http://stackoverflow.com/q/27310365
downvote count: 0

http://stackoverflow.com/a/27260830
score: 1
has body: It's interesting that the update of the model value takes so long and gets set so late in the game. I looked at the textInput binding source and found that knockout defers the setting of the value by 4ms when the input is changed. Might explain why the value is not updated at the time the handler is run? var deferUpdateModel = function (event) { if (!timeoutHandle) { // The elementValueBeforeEvent variable is set *only* during the brief gap between an // event firing and the updateModel function running. This allows us to ignore model // updates that are from the previous state of the element, usually due to techniques // such as rateLimit. Such updates, if not ignored, can cause keystrokes to be lost. elementValueBeforeEvent = element.value; var handler = DEBUG ? updateModel.bind(element, {type: event.type}) : updateModel; timeoutHandle = setTimeout(handler, 4); } };
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/48602951
type: Answer
answers question: http://stackoverflow.com/q/27254011
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27254011
has comment: http://stackoverflow.com/comment/43019498

http://stackoverflow.com/a/27180763
type: Answer
upvote count: 1
has body: There is no way to access a var that's inside a closure as it is a private variable that is technically hidden inside the containing closure. Only functions inside that closure may have access to it.
accepted answer of: http://stackoverflow.com/q/27180680
score: 1
has comment: http://stackoverflow.com/comment/42872417
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27180680
has comment: http://stackoverflow.com/comment/42870631

http://stackoverflow.com/a/27202848
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27202701
answers question: http://stackoverflow.com/q/27202701
has comment: http://stackoverflow.com/comment/42989467
type: AcceptedAnswer
downvote count: 0
score: 1
has body: I think your question is the ideal use case for a JS template library. Below is given the solution with handlebars: http://handlebarsjs.com/. You only have to write your template: And then to compile it and inject it in your HTML page: var tplScript = $("#template").html(); var template = Handlebars.compile (tplScript); $("#genItems").html(template(food)); Below is the full code: Items Servings Note that JQuery is just used for convenience here. Pros/Cons of this solution over a pure JS solution: Pros: very concise clean: you don't mix your template with business logic preparation for next generation of web applications Cons: not as performant as pure JS Fiddle: http://jsfiddle.net/tr22rfmd/1/
type: Answer

http://stackoverflow.com/comment/42818157
type: Comment
comment on: http://stackoverflow.com/a/27161822
has text: I did a var_dump on $result, and what came bac kwas interesting. It was a mysqli result object, however every single field was NULL. What is happening?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/72092843
type: AnswerComment
comment on: http://stackoverflow.com/a/27278035
score: 0
type: Comment
has text: If you send a product ID and variation ID from the JS script, then my above code *should* work. If you are having a specific problem then perhaps create a new question with all the relevant details.

http://stackoverflow.com/a/27272570
type: Answer
accepted answer of: http://stackoverflow.com/q/27272426
answers question: http://stackoverflow.com/q/27272426
has body: This following part of the code returns null, this is why you cannot access the property clientWidth of it. document.querySelector('.sky')
downvote count: 0
score: 1
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/q/27232604
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/61744566
has comment: http://stackoverflow.com/comment/42942002
type: Question
answer count: 2
has title: JSON.stringify or how to serialize binary data as base64 encoded JSON?
tagged with: javascript
has answer: http://stackoverflow.com/a/28127002
favorite count: 0
upvote count: 6
type: UnansweredQuestion
tagged with: arraybuffer
score: 5
downvote count: 1
has body: I have a Javascript object which will consists of a non-cyclic object hierarchy with parameters and child objects. Some of these objects may hold binary data loaded from files or received via XHRs (not defined yet if Blob, ArrayBuffer or something else). Normally I would use JSON.stringify() to serialize it as JSON but how can I then specify that binary data will be base64 encoded? What binary data object (Blob, ArrayBuffer,...) would you recommend me then? EDIT: Other data formats than plain JSON is not an option.
tagged with: blob

http://stackoverflow.com/a/27211104
answers question: http://stackoverflow.com/q/27211010
accepted answer of: http://stackoverflow.com/q/27211010
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: the call to geocoder.geocode is asynchronous. the code execution gets to the declaration of var location before the asynchronous code has returned; therefore city will not be defined yet. declare location earlier and then add to the location object in the callback function var location = {lat: position.coords.latitude, lng: position.coords.longitude}; geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); geocoder.geocode({ 'latLng': latlng }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { //Check result 0 var result = results[0]; //look for locality tag and administrative_area_level_1 for (var i = 0, len = result.address_components.length; i &lt; len; i++) { var ac = result.address_components[i]; if (ac.types.indexOf("locality") &gt;= 0) location.city = ac.long_name; if (ac.types.indexOf("administrative_area_level_1") &gt;= 0) location.state = ac.long_name; } } });
upvote count: 1
score: 1

http://stackoverflow.com/a/27240176
answers question: http://stackoverflow.com/q/27239762
has comment: http://stackoverflow.com/comment/42959492
score: 2
downvote count: 0
upvote count: 2
has body: I've tried to do this in pure sql, because I think that's where the logic should belong. What you need to do is find the list of ids from parent to child, and order by that. Luckily, postgres has array types which can be ordered, so we can use a recursive CTE: with recursive threaded(id, reply_to, message, order_path) as ( select parent.id, parent.reply_to, parent.message, NULL::int[] || parent.id -- create an 1-element array with the parent id from conversation parent where parent.reply_to is null UNION ALL select reply.id, reply.reply_to, reply.message, t.order_path || reply.id -- append the reply id to the current path from threaded t join conversation reply on t.id = reply.reply_to where reply.reply_to is not null ) select * from threaded order by order_path; And the results: 1 NULL "Hello World" "{1}" 3 1 "Hello Back" "{1,3}" 5 1 "Who are you?" "{1,5}" 6 5 "Me of course" "{1,5,6}" 2 NULL "Make me a sandwich" "{2}" 4 2 "No Chance" "{2,4}" I'm not sure how this will perform though, so you should definitely test and profile this on your real dataset to make sure it's fine. If it's not, perhaps you could look at restructuring your data, and investigating different ways of storing "tree" data in a database. There is a library for django called django-mptt that can efficiently store and retrieve trees. The concept applies to databases in general, but the algorithms for pulling out trees and making sure they stay intact require changes to your application logic, better handled by a library. Edit: I should mention that I was originally using just the top-level id for "order_path" as a single number. This answer led me to using an array of ids to guarantee the order all the way down.
type: Answer

http://stackoverflow.com/q/27278259
linked to: http://stackoverflow.com/q/17022222
score: 0
has comment: http://stackoverflow.com/comment/43025429
has comment: http://stackoverflow.com/comment/43045479
has title: Trying to append html string fail with jQuery
has answer: http://stackoverflow.com/a/27291352
tagged with: javascript
answer count: 4
has answer: http://stackoverflow.com/a/27278594
has body: I'm trying to append the following string to head with jQuery : "&lt;script type='text/javascript'&gt; window['adrum-app-key'] = 'dummy';&lt;/script&gt;" But it always fails. Trying to do the same with 'Hello' string for example works as expected. Following the code snippet I use to append the string : var integrationScriptTag = handlebars.partials.integration(integrationData); $(document).ready(function() { $('head').append(integrationScriptTag.trim()); }); First string is the result of parsing integrationData. Any help will really be appreciated. Edit: I realize I misguided some of you with the first string. It is just a representation of what is produced by the first line of the second code snippet. So it doesn't really matter if it is some quote marks or not. The fact is I don't use a literal but rather a variable which is equal to the first string. I corrected the syntax so that there is no more confusion. Here is the jsFiddle reproducing the problem. jsFiddle
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27278334
tagged with: jquery
linked to: http://stackoverflow.com/q/9413737
possible better answer: http://stackoverflow.com/a/27278340
type: Question
accepted answer: http://stackoverflow.com/a/27291352
has answer: http://stackoverflow.com/a/27278340

google-chrome
tags question: http://stackoverflow.com/q/27297255
tags question: http://stackoverflow.com/q/27238702
tags question: http://stackoverflow.com/q/27188292
tags question: http://stackoverflow.com/q/27280461
tags question: http://stackoverflow.com/q/27166462
tags question: http://stackoverflow.com/q/27263831
tags question: http://stackoverflow.com/q/27175840
tags question: http://stackoverflow.com/q/27259469
tags question: http://stackoverflow.com/q/27262497
tags question: http://stackoverflow.com/q/27193948
tags question: http://stackoverflow.com/q/27291607
tags question: http://stackoverflow.com/q/27190252
tags question: http://stackoverflow.com/q/27278135
tags question: http://stackoverflow.com/q/27158572
tags question: http://stackoverflow.com/q/27270207
tags question: http://stackoverflow.com/q/27209046
tags question: http://stackoverflow.com/q/27184698
tags question: http://stackoverflow.com/q/27204932
tags question: http://stackoverflow.com/q/27290486
tags question: http://stackoverflow.com/q/27184591
tags question: http://stackoverflow.com/q/27294743
tags question: http://stackoverflow.com/q/27193484
tags question: http://stackoverflow.com/q/27166634
tags question: http://stackoverflow.com/q/27253855
tags question: http://stackoverflow.com/q/27236024
tags question: http://stackoverflow.com/q/27208403
tags question: http://stackoverflow.com/q/27242256
tags question: http://stackoverflow.com/q/27231572
tags question: http://stackoverflow.com/q/27241281
tags question: http://stackoverflow.com/q/27274238
tags question: http://stackoverflow.com/q/27158182
tags question: http://stackoverflow.com/q/27172288
tags question: http://stackoverflow.com/q/27255287
tags question: http://stackoverflow.com/q/27294046
tags question: http://stackoverflow.com/q/27225463
tags question: http://stackoverflow.com/q/27227740
tags question: http://stackoverflow.com/q/27192298
tags question: http://stackoverflow.com/q/27152935
tags question: http://stackoverflow.com/q/27242319
type: Tag
tags question: http://stackoverflow.com/q/27241815
tags question: http://stackoverflow.com/q/27166278
tags question: http://stackoverflow.com/q/27283610
tags question: http://stackoverflow.com/q/27231614
tags question: http://stackoverflow.com/q/27172020
tags question: http://stackoverflow.com/q/27157564
tag name: google-chrome
tags question: http://stackoverflow.com/q/27284400
tags question: http://stackoverflow.com/q/27246596
tags question: http://stackoverflow.com/q/27232969
tags question: http://stackoverflow.com/q/27306413
tags question: http://stackoverflow.com/q/27262428
tags question: http://stackoverflow.com/q/27289573
tags question: http://stackoverflow.com/q/27256131
tags question: http://stackoverflow.com/q/27158087
tags question: http://stackoverflow.com/q/27193966
tags question: http://stackoverflow.com/q/27168591
tags question: http://stackoverflow.com/q/27169475
tags question: http://stackoverflow.com/q/27267479
tags question: http://stackoverflow.com/q/27198201
tags question: http://stackoverflow.com/q/27216531
tags question: http://stackoverflow.com/q/27254810
tags question: http://stackoverflow.com/q/27262879
tags question: http://stackoverflow.com/q/27204293
tags question: http://stackoverflow.com/q/27222809
tags question: http://stackoverflow.com/q/27263212
tags question: http://stackoverflow.com/q/27207821
tags question: http://stackoverflow.com/q/27247462
tags question: http://stackoverflow.com/q/27237024
tags question: http://stackoverflow.com/q/27290161
tags question: http://stackoverflow.com/q/27225237
tags question: http://stackoverflow.com/q/27313226
tags question: http://stackoverflow.com/q/27169534
tags question: http://stackoverflow.com/q/27223319
tags question: http://stackoverflow.com/q/27206737

http://stackoverflow.com/comment/42813040
has text: You don't need Javascript to detect the text and change the font-size... The `vmin` (or the others I described), already fits the container at the percentage value that you specified... Then, all the html tags will resize as well...
type: AnswerComment
comment on: http://stackoverflow.com/a/27159259
type: Comment
score: 1

http://stackoverflow.com/q/27198693
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27199068
accepted answer: http://stackoverflow.com/a/27199068
has body: I m trying to show/hide textarea when clicked on particular radio button.I need to validate the textarea such that user has to enter details in the textarea.I m trying with 3 radio buttons when user clicks on 3rd radio button which is Other textarea should be displayed and it should be validated such that the user fills the textarea whereas for rest 2 radio buttons textarea should not be displayed. How can I do this? Here is the code if (isset($_POST['submit'])) { $error = ""; if (!empty($_POST['email'])) { $email = $_POST['email']; if (!preg_match("/^[_a-z0-9]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $email)){ $error .= "The e-mail address you entered is not valid. "; } } else { $error .= "You didn't type in an e-mail address. "; } if (empty($_POST["mail"])) { $error = "Reason is required"; } else { $mail = $_POST["mail"]; } E-mail: <input type="text" name="email" value="" style="margin-left:30px;"<?php if (isset($_POST['email'])) { echo $_POST['email']; } ?>" /> I receive too many e-mails I don’t find the e-mails interesting or useful Other, please give details:
has comment: http://stackoverflow.com/comment/42882206
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42882323
answer count: 1
has comment: http://stackoverflow.com/comment/42882493
has title: show/hide textarea with validation.when displayed clicked on radio button
has comment: http://stackoverflow.com/comment/42882166

http://stackoverflow.com/a/27227075
has body: Try this- document.getElementById("pil").innerHTML=" &lt;%- data[0].firstname %&gt;";
score: 2
has comment: http://stackoverflow.com/comment/42933068
answers question: http://stackoverflow.com/q/27226963
has comment: http://stackoverflow.com/comment/42932920
has comment: http://stackoverflow.com/comment/42932466
has comment: http://stackoverflow.com/comment/42932607
upvote count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42932939
has comment: http://stackoverflow.com/comment/42932540
has comment: http://stackoverflow.com/comment/42932807
type: Answer
has comment: http://stackoverflow.com/comment/42931830
has comment: http://stackoverflow.com/comment/42932429
has comment: http://stackoverflow.com/comment/42932514

http://stackoverflow.com/comment/42904228
comment on: http://stackoverflow.com/a/27211611
type: AnswerComment
score: 0
type: Comment
has text: You are right about the first tab, thank you. You can still post your solution, it's a little different, why not.

http://stackoverflow.com/comment/42851757
comment on: http://stackoverflow.com/q/27180321
score: 0
has text: For once try adding a ng-model. It did the trick for me when I faced similar kind of situation
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42913066
has text: Glad it worked out for you! THREE.js is a lot of fun.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27207838

http://stackoverflow.com/a/27250412
upvote count: 1
has comment: http://stackoverflow.com/comment/42975936
has comment: http://stackoverflow.com/comment/42976120
has comment: http://stackoverflow.com/comment/42975711
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27249900
has body: Looks like it is jshint results. It is not actual errors - it is possible errors detected by js jshint. About "is not defined" errors - you can define you globals in .jshintrc as following: "globals": { "Packery": false, "Draggabilly": false, "$": false } About "is defined but never used" - it is hints about useless variables defined in your code(variable is defined but actually never used - in general it can be safely removed) If you want - you can disable this hints by seetting "unused": false in your .jshintrc
score: 1
answers question: http://stackoverflow.com/q/27249900

http://stackoverflow.com/q/27188054
tagged with: npm
tagged with: node.js
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42862849
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/30989993
type: Question
has body: I am trying to convert a JSON object to XML in my Node js service with jstoxml module. My input structure is: { "user": "505723c5750c1fa2177682ed", "uri": "http://localhost:3000/users/505723c5750c1fa2177682ed/items", "items": [ { "uri": "http://localhost:3000/items/1" }, { "uri": "http://localhost:3000/items/2" } ], "info": "blah." } My expect result is: 505723c5750c1fa2177682ed http://localhost:3000/users/505723c5750c1fa2177682ed/items http://localhost:3000/items/1 http://localhost:3000/items/2 blah. Result i am gettings is: 505723c5750c1fa2177682ed http://localhost:3000/users/505723c5750c1fa2177682ed/items http://localhost:3000/items/1 http://localhost:3000/items/2 blah. If anyone faced similar issue, plese help me. Is there any other npm node package for getting this in expected structure? Thanks
has answer: http://stackoverflow.com/a/27193716
possible better answer: http://stackoverflow.com/a/27189019
has answer: http://stackoverflow.com/a/27189019
tagged with: javascript
has comment: http://stackoverflow.com/comment/42863488
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42862958
has title: jstoxml converter module in node not parsing data in correct structure
accepted answer: http://stackoverflow.com/a/27193716
favorite count: 0

http://stackoverflow.com/comment/42806680
has text: Yup it worked like that, thanks a ton. I can't seem to upvote your answer !
score: 0
comment on: http://stackoverflow.com/q/27155964
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27162864
has comment: http://stackoverflow.com/comment/42876926
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27163131
upvote count: 2
accepted answer: http://stackoverflow.com/a/27163131
has answer: http://stackoverflow.com/a/27164293
tagged with: reset
has comment: http://stackoverflow.com/comment/42818782
tagged with: countdown
favorite count: 0
has title: Stop countdown and display message daily
has body: I have the following javascript countdown timer that is supposed to reset at the same time every day. At the point in which it should stop and reset, it continues to count down into a "negative time". How can I fix this? ----- JSFiddle Link ----- function ShowHour() { var now = new Date(); var hrs = 19-now.getHours(); hourLeft = +hrs+ ''; $("#hour").html(hourLeft); } function ShowMin() { var now = new Date(); var mins = 60-now.getMinutes(); timeLeft = +mins+ ''; $("#min").html(timeLeft); } function ShowSec() { var now = new Date(); var secs = 60-now.getSeconds(); timeLeft = +secs+ ''; $("#sec").html(timeLeft); } var countdown; function StopTime() { clearInterval(countdown); } setInterval(ShowHour ,1000); setInterval(ShowMin ,1000); setInterval(ShowSec ,1000);
possible better answer: http://stackoverflow.com/a/27164293
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/q/27245452
downvote count: 2
upvote count: 7
has body: &lt;input class="inputVal"&gt; &lt;script type="text/javascript"&gt; var myVal = document.getElementsByClassName('inputVal')[0]; myVal.addEventListener('keyup', function(e){ var count = myVal.value; console.log(count) }); &lt;/script&gt;
accepted answer: http://stackoverflow.com/a/27245552
tagged with: addeventlistener
tagged with: javascript
tagged with: keycode
has title: addEventListener keyup Keydown with Keycode not working
type: AnsweredQuestion
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27245552
score: 5
has comment: http://stackoverflow.com/comment/42966102
answer count: 1

http://stackoverflow.com/q/27254258
tagged with: javascript
has comment: http://stackoverflow.com/comment/42983217
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42982442
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27254287
tagged with: draggable
has body: I made a div draggable with $("#divID").draggable(); and it works. Inside this div I have a second div. I'd like to have the inner div not draggable, so that the user can drag the whole thing using a "frame" around the inner div. The inner div contains a ScrollBar and other elements that conflict with the "draggable" feature. Is it possibile? Thank you. Edit: I made a test page: TEST The user should be able to drag everything (including "other elements") only in the upper or lower strip, where the cursor become a cross of arrows. I want the user to be unable to drag where the cursors become a pointer. Thanks again.
has title: Div inside draggable Div
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27254646

http://stackoverflow.com/comment/42928668
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27183370
has text: `var a = NaN;`//redefinition of isNaN `window.isNaN = function isNaN(p){ if (p == NaN){ return true;} else{return false;} };`

http://stackoverflow.com/comment/42847879
type: AnswerComment
comment on: http://stackoverflow.com/a/27178913
type: Comment
score: 1
has text: enemies is supposed to be an array with 'enemy' + id of each enemies created ? Am I not supposed to push each enemies to the array ? (I tried this code but didn't work but thanks for showing me the way to do it)

http://stackoverflow.com/comment/42979739
comment on: http://stackoverflow.com/q/27252801
type: QuestionComment
type: Comment
has text: You've got javascript errors with your posted code (and on the live site). The `on` event handler isn't closed properly with a `});` and you shouldn't have the `;` after your `one` event handler.
score: 0

http://stackoverflow.com/comment/42871778
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27193031
has text: What if those characters are inside a html tag? Then you probably don't want to replace, so you must parse html in order to know whether you should replace or not. But [you can't parse html with regex](http://stackoverflow.com/a/1732454/1529630).
type: Comment

http://stackoverflow.com/comment/42905213
comment on: http://stackoverflow.com/a/27212114
score: 0
type: AnswerComment
has text: ( ! ) Parse error: syntax error, unexpected '}' on line 37
type: Comment

http://stackoverflow.com/a/27286856
type: Answer
has body: You can use following code to achieve what you want $(window).bind("load", function() { // code here });
accepted answer of: http://stackoverflow.com/q/27286643
has comment: http://stackoverflow.com/comment/43041103
has comment: http://stackoverflow.com/comment/43042326
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27286643
score: 0

http://stackoverflow.com/comment/98569131
type: AnswerComment
type: Comment
score: 9
has text: By default the Event does not bubble and is not cancelable - see https://developer.mozilla.org/en-US/docs/Web/API/Event/Event. To get the same behaviour in both cases initiEvent('submit', false, false) should be called.
comment on: http://stackoverflow.com/a/49071358

http://stackoverflow.com/comment/42850614
type: AnswerComment
score: 0
type: Comment
has text: Thanks again for everything!
comment on: http://stackoverflow.com/a/27181089

http://stackoverflow.com/comment/42950777
comment on: http://stackoverflow.com/q/27237024
score: 0
has text: @Kevin OP never said they were the same website
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27195475
has comment: http://stackoverflow.com/comment/42876674
has answer: http://stackoverflow.com/a/27196491
has comment: http://stackoverflow.com/comment/42876290
answer count: 1
has comment: http://stackoverflow.com/comment/42876139
has comment: http://stackoverflow.com/comment/42876854
type: UnansweredQuestion
score: 0
has body: I have a visible and a hidden select option. When user selects something, I want to get the selected option and search text in hidden select option. Because I need the val of hidden select option that matches with the selected text. First I tried; var testx=document.getElementById("priceMatrix"); testx.options[testx.selectedIndex].text=toAdd+"|"+cupSize; it works, I can set text but still can not set the value. and I tried secondly; var myText = toAdd+"|"+cupSize; $('#priceMatrix').filter(function () { return $(this).html() == myText; }).prop('selected', true) var alertText = $("#priceMatrix option:selected").val(); alert(alertText); but still it does not work, $("#priceMatrix option:selected").val(); gives the first row's value, not the selected one. So, what is the problem? is it about button click?
tagged with: php
tagged with: select
has title: How to search in a select option by text in javascript
type: Question
tagged with: javascript

http://stackoverflow.com/a/27163966
type: Answer
has body: So I am assuming that $scope.data.Filters is an array of objects with a FilterName and FilterValue property. In that case, you actually need to search the array to see if a matching object exists before inserting it, by comparing the values of the properties of the object (a deep equality check, as opposed to a shallow equality check, which indexOf() does). If you use lodash or underscore, you can use the _.findWhere() helper to do this easily: if (!_.findWhere($scope.data.Filters, $scope.data1)) { $scope.data.Filters.push($scope.data1); } Otherwise, you could make your own function, so your full code looks like: $scope.addField = function ($type, $value) { $scope.data1 = { FilterName: $type, FilterValue: $value }; if (!filterExists($type)) { $scope.data.Filters.push($scope.data1); } $scope.data1 = ""; $scope.Json = angular.toJson($scope.data); }; function filterExists(type) { for (var i = 0, len = $scope.data.Filters.length; i &lt; len; i++) { if ($scope.data.Filters[i].FilterName === type) return true; } return false; }
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27163831
answers question: http://stackoverflow.com/q/27163831
has comment: http://stackoverflow.com/comment/42821577
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/43034473
comment on: http://stackoverflow.com/q/27282797
score: 0
type: QuestionComment
type: Comment
has text: @ncubica and how would I which word would (1st,2nd,etc) I be clicking? I need to know that.

http://stackoverflow.com/a/27298866
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43086421
has comment: http://stackoverflow.com/comment/43087877
answers question: http://stackoverflow.com/q/27295119
has comment: http://stackoverflow.com/comment/43199062
has body: The problem is in: image.on('load',function(){ image.css({ ... }); ... }); This function is called infinitely. I think it's because in this function you modify src attribute of the image and the load event fires again. image.on('load',function(){ console.log('Hi!!'); image.css({ '-webkit-transform' : 'scale(1)', '-moz-transform' : 'scale(1)', '-ms-transform' : 'scale(1)', '-o-transform' : 'scale(1)', 'transform' : 'scale(1)', 'top' : '0', 'left' : '0' }); sWidth = image.width(); sHeight = image.height(); image.attr('src',bigImage); image.width(sWidth); image.height(sHeight); }); I don't know why you attach this code to load event. I think it should be executed every time the image changes and ImageZoom is called. It works ok if you don't attach it: // image.on('load',function(){ image.css({ '-webkit-transform' : 'scale(1)', '-moz-transform' : 'scale(1)', '-ms-transform' : 'scale(1)', '-o-transform' : 'scale(1)', 'transform' : 'scale(1)', 'top' : '0', 'left' : '0' }); sWidth = image.width(); sHeight = image.height(); image.attr('src',bigImage); image.width(sWidth); image.height(sHeight); // }); JSFiddle
has comment: http://stackoverflow.com/comment/43096967

http://stackoverflow.com/comment/42921309
type: AnswerComment
has text: Thanks man I would prefer the mentioned pattern with newRegEXp ; I also updated my question; "test1" is an input and lets call it name! Do you knwo why my updated code is still returning -1 for all strings?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27220979

http://stackoverflow.com/comment/43048539
comment on: http://stackoverflow.com/a/27289652
score: 1
has text: Remove the `refresh id ` from body tag and make a div in body and apply that id to the div, currently, it would replace the stream code in body and your script and other elements would vanish.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42823458
type: Comment
has text: apparently yes, I'm going to use the AjaxFormRequest(result_id,form_id,url, method)
comment on: http://stackoverflow.com/q/27165647
score: 0
type: QuestionComment

http://stackoverflow.com/a/27288542
answers question: http://stackoverflow.com/q/27282309
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43063662
type: Answer
has body: Sorry to burst your bubble here, but there is no way for php to know which screen size the information is served to. Detecting of screen size is only done on client/browser side. The nearest you are going to get here related to Wordpress is with wp_is_mobile() which can detect mobile devices, but then again, wp_is_moble() is more that a joke as a proper function. Your only solution here would be to look at jquery to truncate the output text according to browser size.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27282309

http://stackoverflow.com/q/27275688
answer count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/27275882
type: UnansweredQuestion
tagged with: durandal
has answer: http://stackoverflow.com/a/27277786
upvote count: 0
favorite count: 0
has body: I am working with a client that has based the architecture of their application on a course on Pluralsite from Miguel Castro (http://www.pluralsight.com/courses/building-multi-client-end-to-end-service-oriented-applications) If the app were going to be serving data to many different systems, I could understand the desire for this framework, however it is simple intended to be a SPA. I am wanting to move the app (for maintainabilty and speed) to a Durandal based application. I am wanting to attack it on a piece by piece basis however. Is it possible to set up Durandal for the system, but not have the entire app under it yet? For example, say the app was a CRM. I want to optimize the scheduler component to only load what is needed on demand and to reduce the amount of data being loaded/returned. I don't want to touch the "Customer List/Add" section yet. I will eventually. Can I have the Scheduler running in Durandal but the Customers not, all within the same app? I hope I explained this well enough.
tagged with: knockout.js
type: Question
has title: Migrate an app to Durandal on a piecemeal basis?
tagged with: javascript
score: -1

http://stackoverflow.com/a/27224797
has comment: http://stackoverflow.com/comment/43005232
has comment: http://stackoverflow.com/comment/43007305
score: 0
has comment: http://stackoverflow.com/comment/43007378
type: Answer
has comment: http://stackoverflow.com/comment/43007607
answers question: http://stackoverflow.com/q/27223183
has comment: http://stackoverflow.com/comment/43007558
has comment: http://stackoverflow.com/comment/43007708
has body: JQ: // counter that allows you to get a new set of rows var step = 0; // set variable if you want to restrict the number of rows will be loaded var maxStep = 0;// // how many rows should be returned var count = 100; // if the cancel button is pressed var cancel = false; $(function() { $('#load').click(function(){ getData(); }) $('#cancel').click(function(){ cancel = true; }) }); function getData() { step++; //If cancel variable is set to true stop new calls if(cancel == true) return; // checks if the variable is set and limits how many rows to be fetched if(maxStep &gt;0 and step &gt;= maxStep) return; $.post('ajax.php' ,{ 'step':step, 'count':count, } ,function(data, textStatus, jqXHR){ // do something with the data // when it finishes processing the data, call back function getData(); } ,'json' ) } AJAX.PHP $step = 0; if(isset($_POST['step'])) $step = (int)$_POST['step']; $count = 0; if(isset($_POST['count'])) $count = (int)$_POST['count']; if($step&gt;0 and $count&gt;0) { $offset = ($step-1) * $count; $limit = $offset.','.$count; // -------------- // your code here // -------------- $sql = "SELECT * FROM $off_table,$cnt_table,$ctg_table WHERE $off_table.id = $cnt_table.id AND $off_table.id = $ctg_table.id AND ".$cond_api." AND ".$cond_nt." AND ".$cond_cnt." AND ".$cond_ctg." LIMIT ".$limit;// &lt;- limit $result = mysql_query($sql); $arr_result = array(); while($row = mysql_fetch_assoc($result)) { $arr_result[] = $row; } $arr_result_enc = json_encode($arr_result); echo $arr_result_enc; // echo rows echo json_encode($rows); }

http://stackoverflow.com/q/27201263
has answer: http://stackoverflow.com/a/27201300
has answer: http://stackoverflow.com/a/27201290
possible better answer: http://stackoverflow.com/a/27201286
accepted answer: http://stackoverflow.com/a/27201291
has title: Adding values in javascript
has answer: http://stackoverflow.com/a/27201286
has body: I am trying to add up the 2 values (bold) that are inputed by the user but instead of adding then mathematically (100+1 = 101) it adds them like this (100+1 = 1001). $('#inputcost').keyup(function(){ var price = $(this).val(); }); function checkboxcost() { var sum = 0; var gn, elem; for (i=0; i&lt;2; i++) { gn = 'extra'+i; elem = document.getElementById(gn); if (elem.checked == true) { sum += Number(elem.value); } } **var total = (price.value + sum.toFixed(2)); document.getElementById('totalcost').value = "$" + total;** } &lt;/script&gt; &lt;input id="totalcost" disabled/&gt;
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42886052
score: 0
has comment: http://stackoverflow.com/comment/42886014
has answer: http://stackoverflow.com/a/27201291
has answer: http://stackoverflow.com/a/27201287
has comment: http://stackoverflow.com/comment/42885983
answer count: 5
linked to: http://stackoverflow.com/q/18614374
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/18614374

http://stackoverflow.com/comment/42963658
comment on: http://stackoverflow.com/a/27200121
has text: added the sample...hope it helps
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27254735
answer count: 6
possible better answer: http://stackoverflow.com/a/27439632
linked to: http://stackoverflow.com/q/1451009
has body: I can't manage to get both the result of the filereader and some parameters in a onload function. This is my code: HTML of control: &lt;input type="file" id="files_input" multiple/&gt; Javascript function: function openFiles(evt){ var files = evt.target.files; for (var i = 0; i &lt; files.length; i++) { var file=files[i]; reader = new FileReader(); reader.onload = function(){ var data = $.csv.toArrays(this.result,{separator:'\t'}); }; reader.readAsText(file); } } Add event: files_input.addEventListener("change", openFiles, false); I use the filereader.result, in the onload function. If I use a parameter, like file, for this function, I can't not access to the result anymore. For example I'd like to use file.name in the onload function. How to resolve this issue ?
favorite count: 0
has comment: http://stackoverflow.com/comment/43318302
has title: FileReader onload with result and parameter
accepted answer: http://stackoverflow.com/a/27439524
has answer: http://stackoverflow.com/a/63503241
upvote count: 26
tagged with: filereader
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27439524
downvote count: 0
has answer: http://stackoverflow.com/a/27440059
has comment: http://stackoverflow.com/comment/43516162
has answer: http://stackoverflow.com/a/27539525
linked to: http://stackoverflow.com/q/750486
type: Question
has answer: http://stackoverflow.com/a/50448677
score: 26
has answer: http://stackoverflow.com/a/27439632
tagged with: javascript

http://stackoverflow.com/comment/42976514
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27250578
type: AnswerComment
has text: @Jonast92 i doubt OP knows about constants, let alone variables. i think he really just wanted them as literal strings, and got confused / messed up the formatting of `"Orange"`

http://stackoverflow.com/q/27298419
has answer: http://stackoverflow.com/a/27299982
accepted answer: http://stackoverflow.com/a/27299982
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43063576
has body: I'm trying to work out how to update an item that is stored in my Firebase. I've managed to get it to a point where I can create and remove items. I'd now like to edit and update an existing item. My items are repeated on the page, and each of them have an "Edit" button next to them. HTML Submit I'm adding items to my list like so: JS $scope.newProvider = {}; $scope.providers = []; providersRef.on('child_added', function(snapshot) { $timeout(function() { var snapshotVal = snapshot.val(); $scope.providers.push({ title: snapshotVal.title, name: snapshot.name() }); }); }); // Create Item $scope.createProvider = function() { var newProvider = { title: $scope.title, }; providersRef.push(newProvider); }; I can't work out how to update this item. I've got an update provider function that looks like this: $scope.updateProvider = function(name) { providersRef.child(name).update({ title: snapshotVal.title }); }; But that shows this error in the console: Error: Firebase.child failed: First argument was an invalid path: "undefined". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]" I've tried creating a function that finds the uses the snapshot.name() to check it against the item I'm editing to update the title with the new value, but it doesn't seem to work. Any idea what I'm doing wrong? I've set up a Plunker over here. Any help with what I'm doing wrong is appreciated.
tagged with: angularjs
tagged with: firebase
type: AnsweredQuestion
has title: Update Item from Firebase
type: Question

http://stackoverflow.com/comment/43097226
type: Comment
type: QuestionComment
has text: @pmverma: I like [promises](https://www.npmjs.org/package/bluebird), myself. zangw: https://groups.google.com/forum/#!topic/nodejs/reTInaFyC2s
comment on: http://stackoverflow.com/q/27307749
score: 1

http://stackoverflow.com/a/38456387
has body: Try opening up a new terminal (Run -> CMD) and then executing: node /your_file_name.js And to see which version you have installed, just execute: node -v
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27170037
type: Answer
score: 2

http://stackoverflow.com/comment/42831487
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27170004
type: Comment
has text: Have you tried anything yourself? It also might be better if you posted the generated HTML.

http://stackoverflow.com/comment/43076787
type: Comment
comment on: http://stackoverflow.com/a/27307263
score: 0
type: AnswerComment
has text: Thanks Andrew this make sense a lot

asp.net-mvc-3
tags question: http://stackoverflow.com/q/27184460
tags question: http://stackoverflow.com/q/27164540
tag name: asp.net-mvc-3
tags question: http://stackoverflow.com/q/27253409
type: Tag
tags question: http://stackoverflow.com/q/27170055

http://stackoverflow.com/a/27238384
has comment: http://stackoverflow.com/comment/42983419
score: 1
has comment: http://stackoverflow.com/comment/43039627
answers question: http://stackoverflow.com/q/27238043
accepted answer of: http://stackoverflow.com/q/27238043
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42983699
has comment: http://stackoverflow.com/comment/43064546
has body: Your controller doesn't need jQuery, best not to use it at all and learn the angular way. HTML: &lt;input type="text" id="phone_number" ng-model="myInput.phone" ui-mask="(***)***-****" placeholder="(___)___-____"/&gt; // inject $scope into controller, otherwise your ng-model is useless in your html .controller('phoneSubmitController', function($scope, $http, phoneService) { $scope.myInput = { phone: "" }; $scope.submitPhone = function() { // no need to pass anything into here // your phone service should take an input param, right? and send that number out? phoneService.sendData($scope.myInput.phone).then(function(successResponse) { console.log(successResponse); }, function(failureResponse){ console.log(failureResponse); }); }; }); Your factory should probably use take an input and follow a general pattern, here is my version of your factory: angular.module('myApp').factory('phoneService', function($http, $q) { // inject $ as well for use of promises var JAWN = null; // the factory is a singleton which is reusable, it can be called any time to send data, given an input return { sendData: function(phoneNumber){ var deferred = $q.defer(); // create a deferred object (think promise, this will either fail or succeed at some point) var phone1 = phoneNumber.substring(1,4); var phone2 = phoneNumber.substring(5,8); var phone3 = phoneNumber.substring(9,13); $http.get('http://dev.website.com:8080/api/get?areacode=' + phone1 + '&amp;exchange=' + phone2 + '&amp;lastdigits' + phone3, { headers: { 'Authorization': "Basic " + Base64.encode("Allen" + ":" + "Iverson1"), 'Content-Type': 'application/json' }, contentType: 'application/json', data: angular.toJson(JAWN), cache: false }) // handle some success/error here, like logging, and if needed in your controller as well .then(function(successResponse){ // handle success in factory console.log('success', successResponse); deferred.resolve(successResponse); // mark it as successful JAWN = data; }, function(errorResponse){ // handle f…
upvote count: 1

http://stackoverflow.com/a/46088862
answers question: http://stackoverflow.com/q/27268476
type: Answer
score: 0
has body: Just use one property in javascript as below &lt;script type="text/javascript"&gt; $(function () { $('#datetimepicker4').datetimepicker({ pickDate: false, minuteStepping:5, allowInputToggle: true }); }); &lt;/script&gt; allowInputToggle: true //if this property is set true, this will allow opening of datetimepicker dropdown on both icon click as well as on input field click.

http://stackoverflow.com/q/27305260
has body: I am using jquery and jquery-ui and want to animate attributes on "div" tag.I want to change height from numeric value to "auto" but this effect does not work. it's properly working when i'm using a numeric value for height but it does'nt work using auto! I've tried this so far: See demo: jsfiddle
type: Question
possible better answer: http://stackoverflow.com/a/27305330
answer count: 2
tagged with: jquery-animate
has answer: http://stackoverflow.com/a/27305330
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43073219
linked to: http://stackoverflow.com/q/5003220
has title: add animate effect to addClass/removeClass with jquery
has comment: http://stackoverflow.com/comment/43073326
tagged with: css
has answer: http://stackoverflow.com/a/27305577
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27305577

http://stackoverflow.com/q/27289398
type: Question
has answer: http://stackoverflow.com/a/27290233
tagged with: javascript
has body: I'm trying to generate Javascript from Java files using GWT. I'm using Maven to build my GWT project but now I'm trying to shorten the Maven build times. I'm no Maven expert and so I've come here.. It seems Maven is generating .class files from my Java files which I don't think is necessary because I just need the Javascript files and GWT is a source to source compiler. I don't need any jars, wars or anything else. Just Javascript files. Here is my POM file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.app webapp 1.0 jar org.timepedia.exporter gwtexporter 2.4.0 provided com.google.gwt gwt-user 2.7.0 provided org.apache.maven.plugins maven-compiler-plugin 3.2 1.6 1.6 org.codehaus.mojo gwt-maven-plugin 2.7.0 ${WEBAPP_DIRECTORY} compile src
accepted answer: http://stackoverflow.com/a/27290233
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has title: Maven GWT - Output only Javascript files
tagged with: maven
tagged with: gwt
type: AnsweredQuestion
tagged with: java
upvote count: 1

http://stackoverflow.com/a/64645585
type: Answer
downvote count: 0
has body: Do the following: npm update npm install underscore If that doesn't work do the following. rm -rf node_modules npm install -d npm update
score: 3
answers question: http://stackoverflow.com/q/27251651
upvote count: 3
has comment: http://stackoverflow.com/comment/131628158

http://stackoverflow.com/comment/43051033
type: Comment
comment on: http://stackoverflow.com/a/27292852
score: 0
type: AnswerComment
has text: Looks like i forgot the change the "" in the tags as well as removing the comment marks.. i must be to high or something. Thanks men!

http://stackoverflow.com/comment/43077335
comment on: http://stackoverflow.com/q/27284421
type: Comment
has text: the projection object is a function and some properties and thus i think special code needs to be written. this: var clone = $.extend(true, {}, projection); does not work.
score: 0
type: QuestionComment

http://stackoverflow.com/a/27184331
has body: This is a error in semantics, you misinterpreted what happens when you do this: watcher.on('delete', function(file, stats) { ... regex: /file/g, // file is something like this text/about.txt ... } Here, file in the RegExp object is looking for a string called file, not the actual variable contents of the String object you're passing into the function. Do this instead: regex: new RegExp(file, 'g'), // file is something like this text/about.txt See RegExp for more details.
accepted answer of: http://stackoverflow.com/q/27176767
answers question: http://stackoverflow.com/q/27176767
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42899939
has comment: http://stackoverflow.com/comment/42883718
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42844280
type: AnswerComment
comment on: http://stackoverflow.com/a/27168526
has text: Thanks! If at the end of a session (with modifications on data-x), we need to **serialize** the DOM (including the values of `data-x`), would you do that : 1) LOOP on each element, 2) Do `$('#blah').attr('data-x', $('#blah').data('x'))` to save data-x into the DOM, 3) Serialize the DOM ... Would you do that or something else @adeneo ?
type: Comment
score: 0

http://stackoverflow.com/a/27177634
downvote count: 0
has comment: http://stackoverflow.com/comment/42869650
type: Answer
has comment: http://stackoverflow.com/comment/42850086
accepted answer of: http://stackoverflow.com/q/27176105
upvote count: 1
answers question: http://stackoverflow.com/q/27176105
has body: The HTML injected by the reCaptcha in PHP contains the following HTML for the reload button: &lt;a title="Get a new challenge" id="recaptcha_reload_btn"&gt;&lt;img alt="Get a new challenge" src="http://www.google.com/recaptcha/api/img/red/refresh.gif" id="recaptcha_reload" height="17" width="25"&gt;&lt;/a&gt; This means you can add a Javascript event listener to the button and count the number of times it is clicked. This example uses jQuery to increment a global variable: var recaptcha_reloaded = 0; $(document).on("click", "#recaptcha_reload_btn", function() { recaptcha_reloaded++; }); How you send this information once it is captured is up to you. One possibility is injecting it into a hidden input field on a form before it is submitted. Also note that this only counts the number of times the button was clicked, not the number of times it was actually reloaded. There is a delay between clicking the recaptcha reload button and when the recaptcha is actually reloaded, and additional clicks during this interval will be ignored.
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27313363
has body: I have a path that is basically a rectangle with 4 points. I rotate it by adding transform="rotate(45)". Now I need to get coords of each corner point of the rotated path relatively to the container. Probably it should be not rotation at all, but calculating a new d value with some algorithm for the path then setting it and making path look like it was rotated. Please advise.
has comment: http://stackoverflow.com/comment/43103817
accepted answer: http://stackoverflow.com/a/27325989
has title: Convert rotation to points array for a SVG Path
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/43088024
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27325989
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43088934
score: 0

http://stackoverflow.com/comment/43083663
type: AnswerComment
type: Comment
has text: You probably mean `$template[0].content` (from the HTMLObject, not from the jQuery object) - but this doesn't work in Internet Explorer as far as I know: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template
comment on: http://stackoverflow.com/a/27311398
score: 0

http://stackoverflow.com/comment/42869972
has text: Thanks Alnitak for your answer and explaining. Although I am afraid not to be able to make it working this way. So I guess I will keep them globally. Further on all the animated elements are always the same so in my case it is a good thing that they will be overwritten. The module thought I will try to understand and read about…
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27187594

http://stackoverflow.com/q/27305666
favorite count: 0
has body: I recently found recently the JavaScript library - tracking.js Is there any way to detect what div I see now by image or camera? I have two elements on the desktop, the left and right columns, and I would like to check if I see left div ( with console.log() ) or right div. This library is simple, and I know how to add a script, but I don't know how to detect my eye and detect what element I see. Maybe there are other ways to detect this.
tagged with: eye-tracking
has title: track eye by tracking.js
type: UnansweredQuestion
downvote count: 2
tagged with: tracking.js
type: Question
score: -2
has answer: http://stackoverflow.com/a/27305955
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/97795388
comment on: http://stackoverflow.com/a/55505323
has text: Curious, why remove the nodes and then re-append them? Is it not possible to clone a childNode _inside_ a shadowRoot either?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42902693
type: Comment
has text: @MitchWheat is correct, but there's more than one way to use the principals of Fisher-Yates shuffling. I gave two options in my answer with some thought around proactive shuffling vs lazy shuffling.
score: 0
comment on: http://stackoverflow.com/q/27209118
type: QuestionComment

http://stackoverflow.com/a/27285029
score: 1
has body: Showing 3 alerts may be disturbing, use something like this: $(document).on('submit', 'form', function () { var empty = $(this).find('input[type=text]').filter(function() { return $.trim(this.value) === ""; }); if(empty.length) { alert('Please fill in all the fields'); return false; } }); Inspired by this post. Or you can do validation for each field this way using HTML data attributes: &lt;form data-alert="You must provide:" action="" method="post"&gt; &lt;input type="text" id="one" data-alert="Your Google Map's mileage" /&gt; &lt;input type="text" id="two" data-alert="Your business name" /&gt; &lt;input type="submit" value="Submit" /&gt; &lt;/form&gt; ... combined with jQuery: $('form').on('submit', function () { var thisForm = $(this); var thisAlert = thisForm.data('alert'); var canSubmit = true; thisForm.find('input[type=text]').each(function(i) { var thisInput = $(this); if ( !$.trim(thisInput.val()) ) { thisAlert += '\n' + thisInput.data('alert'); canSubmit = false; }; }); if( !canSubmit ) { alert( thisAlert ); return false; } }); Take a look at this script in action. Of course, you can select/check only input elements that have attribute data-alert (which means they are required). Example with mixed input elements.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27284934
has comment: http://stackoverflow.com/comment/43037901
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27284934

http://stackoverflow.com/comment/42857217
score: 0
type: Comment
type: QuestionComment
has text: changed all parseInt to parseFloat...dont work
comment on: http://stackoverflow.com/q/27184925

http://stackoverflow.com/a/27159132
accepted answer of: http://stackoverflow.com/q/27158885
answers question: http://stackoverflow.com/q/27158885
type: AcceptedAnswer
has body: It looks like you also want to match something like .3, right? But you have to be sure your regex doesn't match a decimal point by itself .. So you could do it with these alternations: myVar = q.match(/\d+\.\d*|\.?\d+/); \d+\.\d* matches 3., 3.3, 3.33 etc. \.?\d+ matches .3, .33, 3, 33, etc. ALTERNATE: If you need to allow commas for thousands, millions, etc., use the following: myVar = q.match(/\d{1,3}(,\d{3})*\.\d*|\d{1,3}(,\d{3})*|\.\d+/); \d{1,3}(,\d{3})*\.\d* matches 3., 3.3, 3.33, 3,333.3 etc. \d{1,3}(,\d{3})* matches 3, 33, 3,333 etc. \.\d+ matches .3, .33, etc.
has comment: http://stackoverflow.com/comment/42987949
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42836946
type: Answer

http://stackoverflow.com/q/27273984
has answer: http://stackoverflow.com/a/27274034
upvote count: 8
tagged with: firefox-addon
tagged with: firefox-addon-sdk
score: 8
has title: TypeError document.querySelector(...) is null
type: AnsweredQuestion
has body: I'm making a FF extension and I hit a snag. Here's what I have: var canLink = document.querySelector('link[rel="service"]').href; This finds a link with rel="service" and it works great. However, if the page does not have a link with rel=service, it returns null and breaks out of the rest of the program. How can I make it so that if canLink = null, it doesn't break? Is there a way to catch this error? Here is the file. Line 12 is self.port.emit, which works fine. //Get link if it exists var elem = document.querySelector('link[rel="service"]').href, canLink = elem ? elem.href : ""; if (canLink){ self.port.emit("link", canLink); } else { canLink = ""; self.port.emit("link", canLink); }
has comment: http://stackoverflow.com/comment/43017756
accepted answer: http://stackoverflow.com/a/27274034
has comment: http://stackoverflow.com/comment/43027379
type: Question
has comment: http://stackoverflow.com/comment/43027731
has comment: http://stackoverflow.com/comment/43027692
has comment: http://stackoverflow.com/comment/43017428
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/27156623
tagged with: jquery
has body: I have two lists with different classes, blah blah blah blah I have this script to handle click function. $(function(){ $('.cls1').click(function(e){ alert('cls1 clicked'); e.preventDefault(); ... //ajax call to load cls2 items }); $('.cls2').click(function(e){ alert('cls2 clicked'); e.preventDefault(); ... }); )}; Important The cls2 class items are loaded by an ajax function called in cls1 click function The cls1 items click function works fine, but when i click any cls2 item, nothing happens. Is there any problem by adding it after the whole page loads? (by ajax call) Another issue I notted is that if i refresh the page, and i change the cls1 class to cls2 in the code (using chrome console) the css changes correctly but it still doing the cls1 click function. Why??? Any Idea? I have tried to change the click function order, change the class names, even with another jquery library... (I am using v1.11.1) Issue example here: http://jsfiddle.net/f7o5y3ek/
accepted answer: http://stackoverflow.com/a/27156775
tagged with: ajax
has comment: http://stackoverflow.com/comment/42807658
has comment: http://stackoverflow.com/comment/42807405
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42807440
linked to: http://stackoverflow.com/q/1359018
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/1359018
type: Question
has answer: http://stackoverflow.com/a/27156667
has answer: http://stackoverflow.com/a/27156775
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27156667
score: 0
answer count: 2
has title: jQuery click function by class not working

http://stackoverflow.com/comment/42884412
comment on: http://stackoverflow.com/q/27200070
has text: If localstorage does not persist as per @shammon then you could use `sqlite` aka `WebSQL`. The sqlite should persists across updates. Look [here](https://cordova.apache.org/docs/en/3.0.0/cordova_storage_storage.md.html) for `WebSQL` documentation. Also have a look over [here](http://stackoverflow.com/questions/11278841/phonegap-what-happens-to-web-sql-database-on-app-update) for confirmation of persistance across updates regarding `WebSQL`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42983182
type: Comment
comment on: http://stackoverflow.com/q/27254507
has text: I'm looking for a solution and *explanation*, but thanks for mentioning these.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43086855
comment on: http://stackoverflow.com/q/27313217
type: Comment
type: QuestionComment
score: 1
has text: @mediaqueries can be helpfull in this certain case. You can tel it simply have a `display: none;` when you go under 100 pixels, if that is what you want. I must point that your second option is not gonna work, cause you ll change the format (the picture is getting stretched in ackward ways - verhoudingsgewijs als je me snapt). I would go for option 1.

http://stackoverflow.com/comment/42939129
has text: ... using `parseInt()`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27231174
score: 0

http://stackoverflow.com/q/27252337
has comment: http://stackoverflow.com/comment/42978879
has body: I’m using a slideshow on a wordpress site (Layerslider). It creates some javascript code inside the source code (like : &lt;script type="text/javascript"&gt; var lsjQuery = jQuery;&lt;/script&gt;&lt;script type="text/javascript"&gt; lsjQuery(document).ready(function() { // code from the slider } }); &lt;/script&gt; The issue is that when i search something on the website with the native search field, the javaScript is visible in the result. I've tried with a native theme (Twenty Fourteen) and the issue is still here. See screenshot : Do you know how to remove this code from the result ?
has comment: http://stackoverflow.com/comment/42979051
type: Question
has title: Wordpress : Remove JavaScript code from search result page
tagged with: javascript
has comment: http://stackoverflow.com/comment/42979674
has comment: http://stackoverflow.com/comment/42978753
score: 0
has comment: http://stackoverflow.com/comment/42979175
has comment: http://stackoverflow.com/comment/42979193
type: UnansweredQuestion
answer count: 0
tagged with: wordpress

http://stackoverflow.com/comment/78534265
type: Comment
score: 6
comment on: http://stackoverflow.com/a/27192753
type: AnswerComment
has text: @Timo initialize the state in the constructor

http://stackoverflow.com/q/27187730
has title: Error in injecting a controller into another controller in AngularJS
accepted answer: http://stackoverflow.com/a/27187757
tagged with: angularjs
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27187757
tagged with: javascript
has body: My code is like this Controller.JS angular.module('RateRequestApp.controllers', []).controller('ReadOnlyController', '$controller', function($scope, rateRequestService,$controller) { $controller('ModalDemoCtrl',{$scope : modalDCtrl }); $scope.rateData = []; rateRequestService.getData().success(function(response) { $scope.rateData = response; }).error(function (data, status, headers, config) { modalDCtrl.openModal(); }); }); angular.module('RateRequestApp.controllers').controller('ModalDemoCtrl', function ($scope, $modal, $log) { this.openModal = function (size) { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', size: size, }); }; }); App.JS angular.module('RateRequestApp', [ 'RateRequestApp.services', 'RateRequestApp.controllers', 'ui.bootstrap' ]); Everything looks okay to me, But this throws an error Error: [ng:areq] Argument 'ReadOnlyController' is not a function, got string Can any one point out what I am doing wrong?
type: AnsweredQuestion

http://stackoverflow.com/a/27227785
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27227681
has body: This might be occurring because you're trying to access the variable even before it's assigned a value by angular. try putting your console statement in a timeout. Avoid using ng-init for initializations.
answers question: http://stackoverflow.com/q/27227681
type: Answer
score: 2

http://stackoverflow.com/a/27313605
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/43100806
score: 2
has comment: http://stackoverflow.com/comment/43101341
has comment: http://stackoverflow.com/comment/43100525
downvote count: 0
has body: If id is definitely available within the scope acting on .mapinfowindow you could try: &lt;div class="mapinfowindow" data-ui-sref="display({id: '{{id}}'})"&gt; (Source: https://github.com/angular-ui/ui-router/issues/395#issuecomment-59136525) If that doesn't work, you'll probably need a custom directive.
answers question: http://stackoverflow.com/q/27308371

http://stackoverflow.com/a/27419692
type: Answer
has body: Not sure about the cause and therefore the solution, but to solve the issue at hand I had to make parent directive optional ?^. Maybe during tests it doesn't have enough time to load it. Again not sure about the reason and due to the change, now directive must either check the controller presence or throw error to inform, that controller is not available at the moment.
accepted answer of: http://stackoverflow.com/q/27180487
answers question: http://stackoverflow.com/q/27180487
type: AcceptedAnswer
score: 0

http://stackoverflow.com/q/27177095
has comment: http://stackoverflow.com/comment/42843520
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27210319
has comment: http://stackoverflow.com/comment/42843704
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42843806
has body: I am a newbie to jQuery. I want to make an chrome extension. But some webpages have HTML as follow, which I want to preprocess and make cleaner. Hello World !!!!!! Nice to meet you I want to wrap all the text nodes separated by tags into p tags, but skipping over a tags in between, and finally delete the tags. (It just skips over a tags, any other tag should not be skipped and the text should be wrapped up to that point). The above example should be transformed as following: Hello World!!!!!! Nice to meet you How can I do the above transformation using jQuery? I find a related answer, but don't know how to skip over the a tags. $("body br").each(function () { $.each([this.previousSibling, this.nextSibling], function() { if (this.nodeType === 3) { $(this).wrap(' '); } // Should skip over a tags }); $(this).remove(); }); Another attempt, but failed (the last element to be merged is appears two times). $("body br").each(function() { $.each([this.previousSibling, this.nextSibling], function() { if (this.nodeType === 3) { $(this).wrap(' '); } // Should skip over a tags }); $(this).remove(); }); //Wrap all tags with var to_be_deleted = new Array(); var just_finished = false; function is_finished() { return just_finished; } function set_finished(val) { just_finished = val; } $('body br').each(function() { $.each([this.previousSibling, this.nextSibling], function() { if (this.nodeType === 3) { // 3 == text if ($(this).parent().is("p")) { console.log("Parent is p"); } if (this.nextSibling) { var curr = this.nextSibling; var count = 0; // How many elements merged var till_now = $(' '); $(till_now).append($(this).clone()); while (curr) { if (curr.tagName === "A") { var a_elem = $(curr).clone(); $(till_now).append(a_elem); to_be_deleted.push(curr); count++; } else if (curr.nodeType === 3) { var n_elem = $(curr).clone(); $(till_now).append(n_elem); to_be_deleted.push(curr); count++; } else { break; } curr = curr.nextSibling; } if (count > 0) { $(this).before(till_now); $(this).r…
has comment: http://stackoverflow.com/comment/42843158
has comment: http://stackoverflow.com/comment/42843615
upvote count: 2
has comment: http://stackoverflow.com/comment/42843270
accepted answer: http://stackoverflow.com/a/27210319
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42843866
has title: How to wrap text nodes with mixed tags with jQuery?
type: Question
downvote count: 0

http://stackoverflow.com/q/27178286
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42845678
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27178529
has comment: http://stackoverflow.com/comment/42845721
has comment: http://stackoverflow.com/comment/42845435
has comment: http://stackoverflow.com/comment/42845550
has body: I would send form to one-page login and password https://rotaexata.centralizee.com/usuarios/login communication between http and https login form Rota Exata Login: Senha: Esqueceu a senha? JavaScript function log3(){ document.frmLogin.action='https://rotaexata.centralizee.com/usuarios/login'; documento.frmLogin.submit(); }
has title: Send form for one page
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/42837421
type: AnswerComment
has text: This is not deleting the javascript
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27173693

http://stackoverflow.com/a/27273968
has comment: http://stackoverflow.com/comment/43047774
has comment: http://stackoverflow.com/comment/43018578
answers question: http://stackoverflow.com/q/27271948
score: 0
type: Answer
has body: finaly i found problem, it was here: var marker = new MarkerWithLabel({......}); arrayMarker[id_map] = marker; //put marker in arrayMarker at indexMarker position the bug occur whene i filled my arrayMarker using MarkerWithLabel (3th lib) whene changed to native google.maps.Marker it work correcly: var marker = new google.maps.Marker({......}); arrayMarker[id_map] = marker;

http://stackoverflow.com/q/27174083
has body: I am trying to choose a tool for Javascript automation tests. Until now I used Selenium WebDriver in Java with TestNG to build my tests, but I have been asked to search for JavaScript solution to write tests. Of course the first thing on my mind was to move to WebDriverJs - it should be similar to my Java tests. But, I also found another framework: WebdriverIO. I could not find anything that could be done with WebdriverIO that is not possible with WebDriverJs. Please help me to understand the difference so I can choose the right framework for me.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27655837
accepted answer: http://stackoverflow.com/a/31783517
answer count: 2
has answer: http://stackoverflow.com/a/27655837
has title: Difference between webdriverjs and webdriverio
downvote count: 0
score: 30
favorite count: 0
upvote count: 30
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/31783517
tagged with: selenium
type: Question
has comment: http://stackoverflow.com/comment/51448119

http://stackoverflow.com/comment/42817466
comment on: http://stackoverflow.com/q/27162003
has text: How exactly? Remember I have arbitrary double values.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42819108
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27161900
type: QuestionComment
has text: i think that this is enough for you. [Resize image with jQuery][1] [1]: http://stackoverflow.com/questions/3817871/resize-image-with-jquery?rq=1

http://stackoverflow.com/a/27204207
has body: I fixed the problem by not doing the query to '/' route but instead to '/users.json'. Even if you do something like this: '/.json', it will not work.
answers question: http://stackoverflow.com/q/27192157
score: 0
type: Answer

http://stackoverflow.com/q/27282436
score: 3
tagged with: javascript
linked to: http://stackoverflow.com/q/25307407
has body: how do you update the content of bootstrap popover after ajax success, I specifically need to change the value of the input field that I have but once I close the popover and click on it, the original value of the input field shows up? can someone help me out? Edit JavaScript: $('.edit').popover({ placement: 'left', html: true, }); $('body').on("click", ".save", function() { var name = $('#name').val(); $.ajax({ type: "POST", url: "test.php", data: { name: name }, cache: false, success: function(response) { if (response.indexOf("success") != -1) { $('#name').val(name); $('.edit').popover('hide').next('.popover').remove(); } } }); }); after the data is saved the popover is closed and when I click edit again the old value shows in the input box.
has comment: http://stackoverflow.com/comment/43034033
upvote count: 3
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
has title: bootstrap popover update content
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27284090
has comment: http://stackoverflow.com/comment/43033746
accepted answer: http://stackoverflow.com/a/27284090
downvote count: 0
has comment: http://stackoverflow.com/comment/43033599
type: Question

http://stackoverflow.com/comment/42822132
type: QuestionComment
has text: Did you gve white listing access in your config.xml?
score: 0
comment on: http://stackoverflow.com/q/27164715
type: Comment

http://stackoverflow.com/comment/66554521
score: 0
type: AnswerComment
has text: `timeout` increases the allowed timeout, but does not seem to cause the script to "wait".
type: Comment
comment on: http://stackoverflow.com/a/27181803

http://stackoverflow.com/comment/42807650
score: 4
comment on: http://stackoverflow.com/q/27156754
has text: I do not see any memoization? Both examples are equivalent... there's one less variable declaration/assignation in the second one but in terms of performance it shouldn't change much.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42908355
comment on: http://stackoverflow.com/a/27214054
type: Comment
score: 0
has text: This only answers part of the question. And always beware with using regex when you don't need it.. This would also match 99:99XZ as being a time.
type: AnswerComment

angularfire
tags question: http://stackoverflow.com/q/27196952
tag name: angularfire
tags question: http://stackoverflow.com/q/27179400
tags question: http://stackoverflow.com/q/27221187
tags question: http://stackoverflow.com/q/27313696
tags question: http://stackoverflow.com/q/27274145
type: Tag
tags question: http://stackoverflow.com/q/27238545
tags question: http://stackoverflow.com/q/27166520

http://stackoverflow.com/q/27240898
tagged with: forms
has comment: http://stackoverflow.com/comment/42958291
type: Question
has answer: http://stackoverflow.com/a/27240944
answer count: 2
has answer: http://stackoverflow.com/a/27241267
has comment: http://stackoverflow.com/comment/42990088
tagged with: javascript
tagged with: jquery
upvote count: 3
has comment: http://stackoverflow.com/comment/42958434
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
has body: I'm using CSS Tricks' How To Design and Create a PHP Powered Poll tutorial to create my own poll. I'm trying to get the poll to submit when the user clicks one of the radio button options, instead of submitting when they click the "Vote" button. poll.php: <?php require_once('Connections/conn_vote.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO poll (id, question) VALUES (%s, %s)", GetSQLValueString($_POST['id'], "int"), GetSQLValueString($_POST['Poll'], "text")); mysql_select_db($database_conn_vote, $conn_vote); $Result1 = mysql_query($insertSQL, $conn_vote) or die(mysql_error()); $insertGoTo = "results.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } $colname_rs_vote = "-1"; if (isset($_GET['recordID'])) { $colname_rs_vote = $_GET['recordID']; } mysql_select_db($database_conn_vote, $c…
type: UnansweredQuestion
has title: How do I submit this PHP poll form on click of a radio button?
tagged with: php
score: 2
has comment: http://stackoverflow.com/comment/42988870

http://stackoverflow.com/comment/43837690
comment on: http://stackoverflow.com/a/27660188
type: AnswerComment
score: 0
has text: Well that's true. But then again, no RegExp is perfect. You'd have a 98% success rate or higher. Just never 100% sadly. As for files outside the ZIP, if you were referencing a file that's in "My Documents" (Windows), you'd need to know the current user's username because of the filepath, which I don't think you can determine through JavaScript.
type: Comment

http://stackoverflow.com/comment/43080626
type: QuestionComment
has text: Domains are very likely to be deprecated soon.
score: 1
comment on: http://stackoverflow.com/q/27307749
type: Comment

http://stackoverflow.com/comment/43035088
type: QuestionComment
has text: sorry, I think I meant a service, rather than a directive
score: 0
comment on: http://stackoverflow.com/q/27280424
type: Comment

http://stackoverflow.com/comment/42838512
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27173564
has text: Is requirement to utilize `hotelName` as both `option` `value` _and_ `option` text - _not_ `hotel1` for `option` text ?
type: Comment

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/27179514

response
tags question: http://stackoverflow.com/q/27214312
tag name: response
type: Tag

http://stackoverflow.com/comment/42883201
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27196273
has text: Your jsfiddle doesn't work at all. Route defined twice, etc...

http://stackoverflow.com/comment/42928717
comment on: http://stackoverflow.com/q/27224013
score: 0
type: Comment
type: QuestionComment
has text: can you provide fiddle with what you have and what you want?

http://stackoverflow.com/comment/42877376
type: QuestionComment
comment on: http://stackoverflow.com/q/27196186
has text: i used a dropdown plug in so im not sure i can..
score: 0
type: Comment

http://stackoverflow.com/comment/42977992
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27251267
type: Comment
has text: I see... I mean: I suppose it won't work as you expect... :-(

http://stackoverflow.com/q/27231250
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42979679
downvote count: 0
tagged with: asp.net-web-api
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: Hi i am using bootstrap date time picker in client side. Getting and setting value is achieved by following knockout binding. ko.bindingHandlers.datetimepicker = { init: function (element, valueAccessor, allBindingsAccessor) { var options = allBindingsAccessor().datepickerOptions || {}; $(element).datetimepicker(options); ko.utils.registerEventHandler(element, "change", function (event) { var value = valueAccessor(); if (ko.isObservable(value)) { var observable = valueAccessor(); observable($(element).data("DateTimePicker").getDate()._d); } }); }, update: function (element, valueAccessor) { if ($(element)) { var value = ko.utils.unwrapObservable(valueAccessor()); $(element).data("DateTimePicker").setDate(value); } } }; when i sent data to server using web api its in iso 8601 format (ex) 2012-07-27T18:51:45.53403Z (UTC) and its stored. When i retrieve data from server using jquery ajax, the date picker is updated using same binding. But it does not show value corresponds to local? How can i achieve that using same binding?
has title: how to set bootstrap date time picker value from ISO 8601 Utc format?
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/42952291
upvote count: 1
tagged with: knockout.js

http://stackoverflow.com/comment/42985396
type: QuestionComment
comment on: http://stackoverflow.com/q/27255726
type: Comment
has text: @HappyHamburger let me try that. Thank you
score: 0

http://stackoverflow.com/comment/42993984
comment on: http://stackoverflow.com/q/27260383
type: Comment
type: QuestionComment
score: 1
has text: The link you mention makes reference to the first in the list. It is missing the first slash (/) that the rest of the links have. Might this be the problem? Without more info about the server directory structure, it is hard to say more.

http://stackoverflow.com/comment/124715925
type: AnswerComment
has text: It doesn't appear to work.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/63595176

semantic-ui
tags question: http://stackoverflow.com/q/27278522
tags question: http://stackoverflow.com/q/27172703
tag name: semantic-ui
type: Tag

http://stackoverflow.com/comment/42880186
type: QuestionComment
comment on: http://stackoverflow.com/q/27197422
score: 0
has text: people arn't going to write the code for you. Your logic is fundamentally flawed though. As the first user pointed out, somebody will have to keep the page open for two hours. If you close the browser, it will reset. Unless this is some public thing that sits on a screen and people can see?
type: Comment

http://stackoverflow.com/a/27182077
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27181998
has body: Found the cause. Use this HTML: <circle id="c1" cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> Generate Use this Javascript: window.genRect = function() { var rect = document.createElementNS ("http://www.w3.org/2000/svg", "rect"); var svg = document.getElementById('svnContainer'); console.log (rect); console.log (svg); rect.setAttribute ("width", "50"); rect.setAttribute ("height", "50"); rect.setAttribute ("fill", "#e11a51"); rect.setAttribute ("stroke", "blue"); rect.setAttribute ("x", "75"); rect.setAttribute ("y", "150"); svg.appendChild (rect); } The change I made in the HTML might no be necessary, but is safer, because by using an ID (which should be unique) you guarantee that there is no other element in the page with the same (whereas if you use the name, you cannot be certain). The second change (the important one in order to make it work on jsfiddle), is the way in which you defined the function. You need to make it global as explained on this post (the reason being because of the way jsfiddle runs your code): JavaScript not running on jsfiddle.net
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27181998
type: Answer
score: 1

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/27231563

http://stackoverflow.com/a/27162688
has body: Add a method in your collection which filters the data you want and return a new collection with filtered results. var Transactions = Backbone.Collection.extend({ model: Transaction, byCategory: function(name) { filtered = this.filter(function(trans) { return trans.get("category") === name; }); return new Transactions(filtered); } }); var home_transactions = Transactions.byCategory("home")
answers question: http://stackoverflow.com/q/27161117
has comment: http://stackoverflow.com/comment/42818722
type: Answer
accepted answer of: http://stackoverflow.com/q/27161117
has comment: http://stackoverflow.com/comment/42818867
has comment: http://stackoverflow.com/comment/42819764
score: 0
has comment: http://stackoverflow.com/comment/42819059
type: AcceptedAnswer

http://stackoverflow.com/q/27198195
upvote count: 2
tagged with: iframe
has comment: http://stackoverflow.com/comment/42880879
type: UnansweredQuestion
tagged with: forms
has comment: http://stackoverflow.com/comment/42880887
score: 2
answer count: 0
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has body: I am loading a form in an iframe within another iframe. The form submit normally opens in the same window but seemingly due to the double iframe situation it now opens in a new tab. &lt;form action="http://example.com" method="POST" name="myform" id="myform" target="_parent"&gt; ... &lt;/form&gt; I have no control over the form or js within it. The only trouble here is that I end up with my original iframe still open in a tab with no content which looks awkward. Is there a way to trigger an event with jQuery or straight js so that my original window will close when the form opens a new tab? Or better yet - is there any way to manipulate the js inside the form so that it works as expected and open within the same window?
has title: iframe form submit opens in new window
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42882589

http://stackoverflow.com/comment/42869425
score: 0
has text: I think this is a bug to report at http://dartbug.com.
comment on: http://stackoverflow.com/q/27189499
type: Comment
type: QuestionComment

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/27291544
type: Tag

http://stackoverflow.com/comment/42833618
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27171343
has text: Tks dude... In true, my script have two similar issues, one of them is this return that you mentioned... another one is with the city name (var cidade), so I'm now receiving this from JSON too... Tks a lot!
score: 1

http://stackoverflow.com/comment/42925626
comment on: http://stackoverflow.com/a/27217299
has text: @Roamer-1888 it is not the anti-pattern you see here, I'm adding the additional options to the second promise, which is the clue of this solution. This also means 4 of your comments are based on the fact that you didn't read the answer.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42975590
comment on: http://stackoverflow.com/a/27250696
type: AnswerComment
score: 0
type: Comment
has text: Everything is already prepared on server side. Now you want to perform ajax call to the server on timeout. Check this [jQuery example](http://api.jquery.com/jQuery.get/), it should do the trick.

http://stackoverflow.com/comment/42847336
has text: You are not calling `onLoad` anywhere. Just defining it doesn't do much. You also have to "use" it.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27179301

http://stackoverflow.com/a/27282013
accepted answer of: http://stackoverflow.com/q/27278863
type: Answer
answers question: http://stackoverflow.com/q/27278863
score: 2
downvote count: 0
type: AcceptedAnswer
has body: You try to run nodemon and watch tasks twice. First, when you run concurrent task and second when you call themselves. Change your concurrent task config to concurrent: { tasks: ['nodemon', 'watch'], options: { logConcurrentOutput: true } }, And remove extra tasks from grunt dev declaration: grunt.registerTask('dev', ['env:dev', 'concurrent', 'jshint', 'nodeunit', 'sass']);
upvote count: 2

http://stackoverflow.com/q/27291230
has answer: http://stackoverflow.com/a/27291978
accepted answer: http://stackoverflow.com/a/27291978
linked to: http://stackoverflow.com/q/27290755
has body: i am creating two dropsdowns like this var drp_nt = $(' ', { 'id' : 'drp_' + nt, 'name' : 'drp_' + nt+'[]', 'onchange' : check_data(), 'multiple': true}); var drp_cnt = $(' ', { 'id' : 'drp_' + cnt, 'name' : 'drp_' + cnt+'[]', 'onchange' : check_data(), 'multiple': true}); Now i am defining the check_data_function like this function check_data() { if($("select option:selected").length==2) alert('Two Dropdown Selected'); else alert($("select option:selected").length); } but the issue is, the check_data() function isn't getting called. How can i achieve this..??? Here's my HTML http://api.hasoffers.com/v3/Affiliate_Offer.json Here's the full script function get_data(v) { var cnt = 'cnt'; var ctg = 'ctg'; var api = 'api'; var nt = 'nt'; $('#drp_'+cnt).remove(); $('#drp_'+ctg).remove(); $('#drp_'+api).remove(); $('#drp_'+nt).remove(); $('.btn-group').remove(); $('#drp_'+cnt+"_loader").show(); $('#drp_'+ctg+"_loader").show(); $('#drp_'+api+"_loader").show(); $('#drp_'+nt+"_loader").show(); $.post("ajax.php",{'version':v,'func':'get_nt'}, function(data) { $('#drp_'+nt+"_loader").hide(); var drp_nt = $(' ', { 'id' : 'drp_' + nt, 'name' : 'drp_' + nt+'[]', 'change' : check_data(), 'multiple': true}); for(i=0;i<data.length;i++) { content =" "+data[i].network+" "; $(drp_nt).append(content); } $('#cont_drp_'+nt).append(drp_nt); $(drp_nt).multiselect({ includeSelectAllOption: true, enableFiltering: true, maxHeight: 200, allSelectedText: 'No option left ...' }); }, "json"); $.post("ajax.php",{'version':v,'func':'get_api'}, function(data) { $('#drp_'+api+"_loader").hide(); var drp_api = $(' ', { 'id' : 'drp_' + api, 'name' : 'drp_' + api+'[]', 'multiple': true}); for(i=0;i<data.length;i++) { content =" "+data[i].api+" "; $(drp_api).append(content); } $('#cont_drp_'+api).append(drp_api); $(drp_api).multiselect({ includeSelectAllOption: true, enableFiltering: true, maxHeight: 200, allSelectedText: 'No option left ...' }); }, "json"); $.post("ajax.php",{'version':v,'func':'get_categ…
downvote count: 0
possible better answer: http://stackoverflow.com/a/27291273
score: 1
has title: Set set onchange event for dynamically created dropdown using jquery
has comment: http://stackoverflow.com/comment/43048739
has comment: http://stackoverflow.com/comment/43048563
type: Question
has comment: http://stackoverflow.com/comment/43048430
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43048922
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/203198
upvote count: 1
has answer: http://stackoverflow.com/a/27291273
has comment: http://stackoverflow.com/comment/43048678
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/43054068
has text: @torazaburo no I looked, not what I need.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27293758

http://stackoverflow.com/q/27245546
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43002011
favorite count: 0
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42966577
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42966507
score: 1
type: Question
has title: jquery bound event doesn't fire on mobile phones
tagged with: iphone
answer count: 1
has answer: http://stackoverflow.com/a/27245940
downvote count: 0
has body: Heyho, i want to bind an event to a HTML tablerow. This seems to work on common desktop browsers but not on mobile phone browsers. Tested on iPhone 6 and some Android devices. Here's a related fiddle, and this is my code: $("body").on("click", "tr", function(){ //do something }) I can't use an click event on the tablerow itself (which seems to work) because the table is generated after pageload. Thanks for your input.

http://stackoverflow.com/comment/42876183
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27195512
has text: No the the javascript code will be complete. As it reads above, would not run because it contains a chunk of PHP in the middle, btut that will have been replaced before sending to the browser.

http://stackoverflow.com/q/27270250
tagged with: jsf
type: UnansweredQuestion
has title: Process a jsf ajax request with a large data form
tagged with: primefaces
has body: I have a problem when I try to request a large data (image 6Mo base64 encoded) from my jsf page to my backing bean I push an image (size 6Mo) Base64 encoded from my websocket endpoint (jetty embedded) to my jsf page using javascript onmessage client &lt;h:inputHidden id="myInputHidden" value="#{myBean.base64DataImage}" /&gt; &lt;script&gt; document.getElementById("myForm:myInputHidden").value = data.value; &lt;/script&gt; 2. My action listener is not executed when my base64 string is greater than ~2300000 characters &lt;p:commandLink id="myLink" actionListener="#{myBean.myActionListener}" process="@this,myInputHidden" update="@form" /&gt; &lt;script&gt; document.getElementById("myForm:myLink").click(); &lt;/script&gt; N.B : If I put a small image my action listener is executed correctly and I can use my image in my backing bean Can someone help me to tell me what is the limit of requested form data, and if there's a way to make it larger.
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43010639
answer count: 1
tagged with: jboss7.x
tagged with: cdi
has answer: http://stackoverflow.com/a/55279005

http://stackoverflow.com/comment/42952942
type: AnswerComment
comment on: http://stackoverflow.com/a/27236811
type: Comment
has text: @Jordonias Per `request`. Certain modules need to function on a global level (the default behavior of `require`) and others need to be constructed and destructed each request. I've looked at simply making the `exports` a function that creates a new instance every time it is required, but I'm losing the ability to share the instance across other modules within that same request.
score: 0

http://stackoverflow.com/comment/42963428
type: QuestionComment
has text: You could disable the link after the first request has been sent to the server. Can you show us the *relevant* javascript code?
comment on: http://stackoverflow.com/q/27243604
score: 0
type: Comment

http://stackoverflow.com/comment/42963505
comment on: http://stackoverflow.com/a/27241163
score: 0
type: Comment
has text: In your latest edit, you are still not handling your logic in your callback. `$scope.another(function (result) { console.log(result); });` would work. The callback passed to `$scope.another` is not going to execute before the `console.log(new_data);` executes. Also, you are "getting" an empty array because you set `new_data` to an empty array on line 1. You don't even need the `new_data` variable, just get rid of it.
type: AnswerComment

http://stackoverflow.com/comment/43041007
comment on: http://stackoverflow.com/q/27286700
type: Comment
type: QuestionComment
has text: @AlienWebguy, this is coding style was recommended by John Papa for AngularJS https://github.com/johnpapa/angularjs-styleguide. It really does make a HUGE difference when you follow that guiding style.
score: 0

http://stackoverflow.com/q/27226963
has comment: http://stackoverflow.com/comment/42932560
has title: how to insert data to an HTML div
score: 0
has comment: http://stackoverflow.com/comment/42931442
tagged with: ejs
has answer: http://stackoverflow.com/a/27227073
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42932538
has comment: http://stackoverflow.com/comment/42931557
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27227075
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42931465
has body: I have a script which renders a sql query object to the view page. I am trying to retrieve the firstname from that object and want to print it on the UI. I have function which does res.render( 'login', {"data": data}); the data has a row [{id:9, user_name:'abc', email:'abc@ask.com', password: '1234', firstname: 'monica', lastname:'than'}] I am passing this to an .ejs file where I am getting the firstname 'monica' like below: Welcome! Search for Pilgrim the name is getting value monica - as observed from debugger console. But I dont get this printed on the UI anywhere. Can someone please tell me what is going wrong over here??
tagged with: javascript

http://stackoverflow.com/a/27253859
accepted answer of: http://stackoverflow.com/q/27253797
upvote count: 2
has comment: http://stackoverflow.com/comment/42982014
answers question: http://stackoverflow.com/q/27253797
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42981814
has comment: http://stackoverflow.com/comment/134015441
type: Answer
has comment: http://stackoverflow.com/comment/42986014
score: 1
has comment: http://stackoverflow.com/comment/42981740
downvote count: 1
has body: Make sure you set preload="auto" (and don't use autoplay) in the tag, then you can use the canplay event: var vid = $("#video"); vid.on("canplay", function() { vid[0].play(); vid.fadeIn(1000); }); $("#change").on("click", function() { vid.hide(); vid[0].src = "http://www.html5rocks.com/en/tutorials/video/basics/devstories.mp4"; }); Change source (mp4 only for this example)
has comment: http://stackoverflow.com/comment/42981858
has comment: http://stackoverflow.com/comment/42985535
has comment: http://stackoverflow.com/comment/42984900
has comment: http://stackoverflow.com/comment/42981768

http://stackoverflow.com/comment/43032503
type: Comment
has text: I have already included the <globalization culture="en-GB" uiCulture="en-GB" /> in web.config
comment on: http://stackoverflow.com/a/27256302
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43086385
comment on: http://stackoverflow.com/q/27313001
score: 0
type: QuestionComment
has text: NaN stands for not a number. If there is any type conversion in js, it throws NaN error. for exact help, plz post your code.
type: Comment

c#-3.0
type: Tag
tags question: http://stackoverflow.com/q/27227599
tag name: c#-3.0

http://stackoverflow.com/a/27265642
has body: Your problem seems a bit vague. But if you want to repeat setTimeout() function for a several time, it'll be better to use setInterval() function. I dont really get the result that you want, but it should work.
answers question: http://stackoverflow.com/q/27265179
score: 0
type: Answer

http://stackoverflow.com/comment/43070730
has text: Check the order they are loaded in ... jQuery FIRST.
comment on: http://stackoverflow.com/a/27303122
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43080696
score: 0
has text: When I add `el: '#menu'` the view will no longer render
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27309111

http://stackoverflow.com/q/27215173
has answer: http://stackoverflow.com/a/27215280
score: 0
linked to: http://stackoverflow.com/q/542938
tagged with: datetime
possible better answer: http://stackoverflow.com/a/27215233
has title: Accurately calculate days between two dates (including time)
has answer: http://stackoverflow.com/a/27215233
has comment: http://stackoverflow.com/comment/42910351
accepted answer: http://stackoverflow.com/a/27215280
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42910717
tagged with: date
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42910343
tagged with: javascript
has body: I'm working on a front-end app, and was trying to calculate number of days between two dates, and the more I read on proper/accurate way of working out the days between two dates, the more I got confused. So I thought, I shall post another question on here to finally shed some light on this confusion. Also I was trying to workout when it would be safest to do the calculation; is it when I get the raw UTC date I get from the backend below, after they're converted to Locale date and time? What I mean by this, would it be better to get the diff between UTC dates or diff between Locale date and time? Here are UTC dates: UTC Date 1: 2014-11-30T15:41:51.012+0000 UTC Date 2: 2014-01-09T02:56:36.000+0000 Here are Locale dates (On Windows; this will be diff format on Linux): Locale Date 1: 11/30/2014, 3:41:51 PM Locale Date 2: 1/9/2014, 2:56:36 AM So my questions are, which one of those would give accurate daysBetweenDates, UTC or Locale? Also how is this calculated, a JavaScript function snippet or demo would help me and others. Thanks!

http://stackoverflow.com/comment/87789291
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/50386484
has text: Although this might answer the question, please add some references and/or explanation of why/how this code works!

http://stackoverflow.com/comment/43050221
score: 0
comment on: http://stackoverflow.com/q/27292238
has text: Does `xmlhttp.responseText` give you anything?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27181000
answers question: http://stackoverflow.com/q/27180920
type: Answer
has body: when you pass data from ajax to php data: {variable : variable}, //var variable = $("#post_form").serialize(); and check your variable before pass it and get it in php echo ($_POST['variable']);
upvote count: 1
downvote count: 0
score: 1

http://stackoverflow.com/comment/42885717
has text: Your approach to validate/clean the input values for `$_POST['u']` is `getenv('REMOTE_ADDR')` are hilarious. Use a regex pattern to test the trimmed value you get against, instead of removing all characters you do not expect.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27201074

http://stackoverflow.com/q/27246813
answer count: 2
has title: Split array by tag and delete all similar element
tagged with: arrays
tagged with: javascript
score: 0
tagged with: regex
has body: I have some html page with text and need to output all inner HTML from tag b by alphabetical order in lower case. I'm just a begginer, so don't be strict. My code is here (text is just for example): http://jsfiddle.net/pamjaranka/ebeptLzj/1/ Now I want to: 1) save upper case for inner HTML from tag abbr; 2) delete all similar element from the array (as MABs). I was trying to find the way to split the array by tag, but all that I've done is: for(var i=0; i&lt;allbold.length; i++){ labels[i] = allbold[i].innerHTML; } var searchTerm = ['abbr']; var abbr = []; var keywordIndex; $.each(labels, function(i) { $.each(searchTerm, function(j) { var rSearchTerm = new RegExp('\\b' + searchTerm[j] + '\\b','i'); if (labels[i].match(rSearchTerm)) { keywordIndex = i; for(var j=0; j&lt;labels.length; j++){ abbr[i] = labels[i]; } } }); });
has answer: http://stackoverflow.com/a/27250421
has answer: http://stackoverflow.com/a/27247063
has comment: http://stackoverflow.com/comment/42968926
possible better answer: http://stackoverflow.com/a/27247063
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42968827
accepted answer: http://stackoverflow.com/a/27250421
type: Question

http://stackoverflow.com/comment/43025150
comment on: http://stackoverflow.com/a/27277998
type: AnswerComment
has text: Yes it sure will help me relate... :D... Do I just add that before the `[0]`?
score: 0
type: Comment

papaparse
type: Tag
tags question: http://stackoverflow.com/q/27250857
tag name: papaparse
tags question: http://stackoverflow.com/q/27209099

http://stackoverflow.com/comment/42957196
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27232525
type: AnswerComment
has text: @Julo0sS what errors d you get in the console? did you add an onerror handler? Try inserting console.log's for the various stages and see where your code stops. Output the vars to see if they actually contains data or are undefined. Check that you grab the SVG outerHTML properly. My 2 cents.

http://stackoverflow.com/q/27281399
tagged with: javascript
tagged with: jquery
score: -1
answer count: 1
favorite count: 0
has body: I want to use a button to create a form that ask user input and send it to php file without refreshing, but after i append the form to the html file and tried to submit it, the java function didnt run. The function that i used to append the form: function reporterror(){ if (document.getElementById("report")){ console.log("Still have report"); }else{ $(" Report Error Description: ").appendTo("#content"); } }; The function that didnt run: $(document).ready(function () { $("#report").on("submit",function(event){ event.preventDefault(); if (document.getElementById("description").value==""){ $(".warning").remove(); $("#description").after(" Description is required "); console.log("yes"); }else{ $.ajax({ type:"POST", url:"report.php", data:$("#report").serialize(), success:function(){ console.log("Great"); document.getElementById("report").innerHTML=" Thank You for helping us to improve! Your message have been successfully sented to this awesome website! "; } }) } }); }) this is what it look like right now : http://cs20p.site11.com/
has title: Appending Form with jQuery
has answer: http://stackoverflow.com/a/27281459
tagged with: php
downvote count: 1
type: AnsweredQuestion
tagged with: forms
has comment: http://stackoverflow.com/comment/43031413
type: Question
accepted answer: http://stackoverflow.com/a/27281459
upvote count: 0

http://stackoverflow.com/comment/42937027
has text: Do not use undocumented properties of the Google Maps Javascript API v3 (`polygon[i].k+','+polygon[i].B`), they can and will change with every release (every 6 months). Use the documented methods (`.lat()`, `.lng()`).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27225718

http://stackoverflow.com/comment/42932033
type: QuestionComment
has text: I was asking if i could change content in my html without using a function
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27227242

http://stackoverflow.com/comment/43041646
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27287024
has text: @Rohil_PHPBeginner added `error:...` right after `...alert(data);},` - nothing changed. Changed `$.ajax` to `jQuery.ajax` - still the same. And no errors in console.
score: 0

http://stackoverflow.com/q/27280201
accepted answer: http://stackoverflow.com/a/27280770
possible better answer: http://stackoverflow.com/a/27919608
type: Question
tagged with: polymer
has answer: http://stackoverflow.com/a/27919608
tagged with: javascript
score: 0
answer count: 2
has body: I'm trying to bind a method to an on-tap attribute of a paper-button. After much testing, I've found that I can only bind a (for lack of a better word) top-level function, and not a method of an object in the template. For example, I have a template, to which I have bound a number of objects, one of which is a user object. Object user has a bunch of methods and variables, like 'isNew' or 'reputation'. The user object also has a method 'addReputation' I can use the object variables like this : {{user.name}} And I can bind button taps like this: Add Rep But not like this: Add Rep Does anyone know why this may be?
tagged with: events
tagged with: templates
has answer: http://stackoverflow.com/a/27280770
tagged with: bind
type: AnsweredQuestion
has title: Polymer binding tap to an object method

http://stackoverflow.com/q/27172796
has answer: http://stackoverflow.com/a/27172919
has answer: http://stackoverflow.com/a/38409750
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42854174
tagged with: twitter-bootstrap-tooltip
has comment: http://stackoverflow.com/comment/42851080
has body: I am using Bootstrap 3 and showing "Tooltip" onMouseOver which is working as expected. But whenever I am moving out the cursor, screen is flickering. HTML: Mouse Over Script Initialization: I have tried with below options as well: etc... And also changing the script tag inside head element, inside body tag, outside body tag doesn't helped to achieve my desired result!
has title: Bootstrap 3 Tooltip - Flicking on MouseOut... Happening if it is inside iFrame
has comment: http://stackoverflow.com/comment/42836159
has answer: http://stackoverflow.com/a/49505226
type: Question
score: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42836180
has comment: http://stackoverflow.com/comment/42923004
answer count: 3

http://stackoverflow.com/comment/42808591
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27156976
has text: In your jsPerf, the tests are heavily slanted toward the `__proto__` version because you're reusing the functions in that one and not in the second one.

http://stackoverflow.com/q/27310608
has title: Firefox Addon SDK : prompt with multiple checkboxes
has body: I'm developing a Firefox Add-On for a client. When an user is uninstalling the Add-On, I need to show the user a prompt, which contains three checkboxes. These checkboxes will serve as an option to the user for restoring his/her previous browser settings. I've successfully created a prompt on uninstall/disable, using the confirmCheck method of the nsIPromptService interface : let value = {value: true}; let confirm = promptService.confirmCheck( null, "Uninstall My Extension", "You are uninstalling My Extension. You can chose these options to restore your settings to previous state.", "Remove My Extension as the default search engine, homepage, new tab landing page, and restore to my previous settings", value ); The only problem is, it only contains a single checkbox, and I need 3 different ones, for "Seach Engine", "Homepage", and "New Tab Url" each. I'm using chrome code through the Add-On SDK, and am not familiar with XUL. How should I go about this? Do I really need to learn XUL for creating a simple prompt?
tagged with: firefox-addon
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43083929
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43083611
has comment: http://stackoverflow.com/comment/43083549
has comment: http://stackoverflow.com/comment/43083967
has answer: http://stackoverflow.com/a/27322229
tagged with: firefox-addon-sdk
type: AnsweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43084732
tagged with: firefox
accepted answer: http://stackoverflow.com/a/27322229
tagged with: javascript
has comment: http://stackoverflow.com/comment/43084421

http://stackoverflow.com/a/27185121
type: Answer
has comment: http://stackoverflow.com/comment/42857883
has comment: http://stackoverflow.com/comment/42860788
has body: ^(?!flex_table\b).*$|(\[(\w+)\]\[(\d+)\]) Try this.Grab the captures.See demo. http://regex101.com/r/hQ9xT1/26
has comment: http://stackoverflow.com/comment/42861847
accepted answer of: http://stackoverflow.com/q/27185072
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27185072
score: 0

http://stackoverflow.com/comment/43086844
type: QuestionComment
comment on: http://stackoverflow.com/q/27312152
score: 0
has text: @RobG I am aware that I could convert this to a JS timestamp. However, I have quite a few of these objects in different places in the code and I need to compare them. I would prefer to avoid sending all the overhead data and then converting them all on the client side.
type: Comment

http://stackoverflow.com/q/27252819
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27253157
favorite count: 0
tagged with: backbone.js
tagged with: browserify
tagged with: marionette
has title: "el" must exist in DOM when use backbone marionette in browserify
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/27253157
type: Question
tagged with: javascript
has body: I use the backbone marionette in browserify. I met a problem about showing view. I have addRegions and want to show the ItemView. But the console show error: Uncaught Error: An "el" #tmp_area must exist in DOM. My HTML file have #tmp_area area. When I use require.js it doesn't show this problem, but it happened when I change to use browserify. I don't know what's wrong. Below is my code. app.js var Backbone = require('backbone'); var $ = require('jquery'); Backbone.$ = $; var Marionette = require('backbone.marionette'); var MyView = require('./views/my_view'); var app = new Marionette.Application(); app.addRegions({ tmp_area: "#tmp_area" }); app.addInitializer(function() { var myView = new MyView(); app.tmp_area.show(myView); }); app.on("initialize:after", function() { if (Backbone.history) { Backbone.history.start(); } }); app.start(); my_view.js var $ = require('jquery'); var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var templates = require('../templates/tmp.hbs'); Backbone.$ = $; module.exports = Marionette.ItemView.extend({ template: templates, }) Please help me! I do appreciate it!

http://stackoverflow.com/comment/42914591
has text: I need a generic solution for all these kind of chars like !@#$<>%
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27216412
type: QuestionComment

http://stackoverflow.com/a/27283530
has body: How about doing it as document is ready ... $(document).ready(function() { $("#getemoji").replace( new RegExp(ranges.join('|'), 'g'), '' ); });
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43035399
answers question: http://stackoverflow.com/q/27283508

http://stackoverflow.com/comment/42810424
type: Comment
comment on: http://stackoverflow.com/a/27158076
type: AnswerComment
has text: I didn't downvote, but it looks to me like it won't work. Did you test your answer? I see one typo that would prevent it from working (you define `var long = "51.326078";`, but the code uses lng).
score: 0

http://stackoverflow.com/comment/42828156
has text: @Scimonster no prob - updated my question
score: 0
comment on: http://stackoverflow.com/q/27168144
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42930364
has text: Thanks Mike, apologies for the incorrect reference in the fiddle, that was my mistake. I have researched this further and the problem appears to be down to the sequence that the calls are in relation to the calendar call. You can see what I mean here http://jsfiddle.net/t1nm4Lf2/12/. It appears as though the 'today' event only gets triggered if it physically positioned below/after the calendar, the rest of the header controls don't seem to mind where they are physically positioned. Is this behaviour explainable?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27196379
type: Comment

http://stackoverflow.com/q/27228237
tagged with: sql-server
has title: Show entered data on real time basis on other web page
has answer: http://stackoverflow.com/a/27228312
upvote count: 0
has body: I have a requirement to build a small application where the user will type in a text box and while he is typing the data should be displayed on real time basis on the other web page. Is there anyway I can achieve such a functionality using C#, ajax, javascript and Sql Server.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42934006
downvote count: 1
type: Question
tagged with: c#
score: -1
has comment: http://stackoverflow.com/comment/42933759
has comment: http://stackoverflow.com/comment/42933695
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42933702
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42933748

http://stackoverflow.com/comment/42965446
has text: I have date "12/02/2014" in this format I want to convert in "2014/12/02"
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27245128
type: Comment

http://stackoverflow.com/comment/42907509
has text: Brilliant, thank you hugely for this. I really don't think I would have got there on my own. Thank you thank you thank you.
comment on: http://stackoverflow.com/a/27204974
type: Comment
score: 0
type: AnswerComment

instafeedjs
tags question: http://stackoverflow.com/q/27237937
type: Tag
tag name: instafeedjs

http://stackoverflow.com/q/27296143
tagged with: javascript
has answer: http://stackoverflow.com/a/27298713
tagged with: ruby-on-rails-4
answer count: 1
tagged with: asset-pipeline
has body: I'm trying to using asset_path in a javascript file but I'm getting a error say the file was not found. The file is under app/assets/images/Elidium/items/. new Item(' &lt;%= asset_path '/Elidiun/items/ancienp_hair_olive.png' %&gt;'),
tagged with: ruby-2.0
has comment: http://stackoverflow.com/comment/43057230
accepted answer: http://stackoverflow.com/a/27298713
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43058621
score: 0
has title: Using Asset_path tag
type: Question

http://stackoverflow.com/q/27283505
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43128936
has comment: http://stackoverflow.com/comment/43104069
has title: chrome.hid.send fails on second use
has comment: http://stackoverflow.com/comment/43127849
has body: Something about my use of chrome.hid.send seems to be leaving the bus in a bad state. I consistently can NOT get my second usage of the API call to work. Sometimes, it will also fail on the first usage. WITH THE EXACT SAME CODE, I can come back and try a while later (maybe 10min) and the first send will work. The device I'm working with does not return a response to all messages sent to it. The test message for example, is just a dummy message that is ignored by the device. I've tested this both on a mac and a PC. My call stack depth is 2 at this point in my application (literally first one is kicked off by a button click and then a setTimeout calls the same method 5s later). I've testing sending buffers of length 64Bytes as well as 58Bytes. The properties from the HidDeviceInfo object read "maxInputReportSize":64,"maxOutputReportSize":64 Params on first usage: Params on second usage: I really can't identify how I'm using the API incorrectly. When messages do succeed, I can see them on the device side. // Transmits the given data // // @param[in] outData, The data to send as an ArrayBuffer // @param[in] onTxCompleted, The method called on completion of the outgoing transfer. The return // code is passed as a string. // @param[in] onRxCompleted, The method called on completion of the incoming transfer. The return // code is passed as a string along with the response as an ArrayBuffer. send: function(outData, onTxCompleted, onRxCompleted) { if (-1 === connection_) { console.log("Attempted to send data with no device connected."); return; } if (0 == outData.byteLength) { console.log("Attempted to send nothing."); return; } if (COMMS.receiving) { console.log("Waiting for a response to a previous message. Aborting."); return; } if (COMMS.transmitting) { console.log("Waiting for a previous message to finish sending. Aborting."); return; } COMMS.transmitting = true; var dummyUint8Array = new Uint8Array(outData); chrome.hid.send(connection_, REPORT_ID, outData, function() {…
answer count: 1
has comment: http://stackoverflow.com/comment/43133611
downvote count: 0
has comment: http://stackoverflow.com/comment/43127737
tagged with: javascript
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27341026
tagged with: google-chrome-app
tagged with: hid
has comment: http://stackoverflow.com/comment/43136229
accepted answer: http://stackoverflow.com/a/27341026
has comment: http://stackoverflow.com/comment/43103859
has comment: http://stackoverflow.com/comment/43104130
has comment: http://stackoverflow.com/comment/43127591
upvote count: 1
type: Question

http://stackoverflow.com/a/27242896
has comment: http://stackoverflow.com/comment/42963099
has body: There is no something like "connection between two browsers using socket.io-client." But there is "Both browsers are connected to a node.js app serving HTTP requests with Express, which keeps track of both clients's IP addresses (and ports when running locally)." If you want to have P2P connection between two browser, following may be a way to do so. when you get client A connection, join to a room "P2P" when you get client B connection, join to a room "P2P" to exchange between client A and client B, use socket.broadcast.to('P2P').emit("message", "Good Morning"); Hope this may help.
type: Answer
answers question: http://stackoverflow.com/q/27241132
score: 0

http://stackoverflow.com/comment/42881353
type: QuestionComment
has text: The term "utilize" is such a loosely defined one. It could mean lots of different things.
score: 1
comment on: http://stackoverflow.com/q/27198437
type: Comment

http://stackoverflow.com/comment/42879032
score: 1
comment on: http://stackoverflow.com/q/27196942
has text: Your function works for me in IE11 (see [fiddle](http://jsfiddle.net/0cmn1bn7/)). Here is a [screenshot](http://i.imgur.com/5CDYuZZ.png) of what the style pane looks like. Could you set up a fiddle/snippet showing how you're calling this?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27300470
has answer: http://stackoverflow.com/a/27300685
has body: So I know how to format a string or integer like 2000 to 2K, but how do I reverse it? I want to do something like: var string = "$2K".replace("/* K with 000 and remove $ symbol in front of 2 */"); How do I start? I am not very good regular expressions, but I have been taking some more time out to learn them. If you can help, I certainly appreciate it. Is it possible to do the same thing for M for millions (adding 000000 at the end) or B for billions (adding 000000000 at the end)?
has comment: http://stackoverflow.com/comment/43064822
type: Question
score: -2
tagged with: javascript
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27300572
has title: How to "unformat" a numerical string? JavaScript
favorite count: 0
has comment: http://stackoverflow.com/comment/43064667
tagged with: regex
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27300685
accepted answer: http://stackoverflow.com/a/27300572
downvote count: 2

http://stackoverflow.com/q/27261083
has title: Node.js relative require paths to executing script
type: Question
has body: How can I make require look in the relative path of the executing script (not whatever script has require'd the executing script)? Example: index.js require('lib/foo.js'); -- lib/foo.js var barFunction = require('./bar.js').barFunction; barFunction(); -- lib/bar.js module.exports.barFunction = function(){ return true; } When you node index.js, foo.js looks for bar.js instead of lib/bar.js. If foo.js is amended to require('lib/bar.js'), then node foo.js will stop working. How can I set up require in a way that I can both node index.js and node lib/foo.js and have then both work?
score: 0
answer count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/42995246
has answer: http://stackoverflow.com/a/27261177
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42995259
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27261177

http://stackoverflow.com/comment/43011204
score: 0
comment on: http://stackoverflow.com/a/27267962
type: Comment
has text: ```geometryPlane.vertices[intersects[0].face.(a|b|c)].z``` did the trick, thanks :)
type: AnswerComment

http://stackoverflow.com/comment/43026943
comment on: http://stackoverflow.com/a/27278996
has text: Why not just have one button to increment and one to decrement?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42891283
has text: for each post there is one button !
type: QuestionComment
comment on: http://stackoverflow.com/q/27204125
score: 0
type: Comment

http://stackoverflow.com/comment/43128328
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27312949
has text: I just stick with the regular MVC template then.

http://stackoverflow.com/comment/42803363
comment on: http://stackoverflow.com/q/27154360
score: 0
has text: `$("#txtfname").val() == "" && $("#txtfname").val().length >= 2`??? This is just silly. Will return false every single time
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27250435
score: 0
has body: I would do this with AngularJS, because there you don't have to care about history.js. It's working out of the box. Please check the following demo to get you started. You can also find the same code at jsFiddle here. At the links the active class are not set properly, but that's not difficult to do. That's described at some examples at AngularJS and here at SO. See this SO question 'use strict'; var pageTemplate = " {{page.title}} "; var pageTitles = ['Page1', 'Page2']; var app = angular.module('routingDemo', ['ngRoute']); app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { //$locationProvider.html5Mode(true); $routeProvider. when('/', { //templateUrl: 'partials/phone-list.html', template: " main page ", //controller: 'MainCtrl' }). when('/pages/:pageId', { //templateUrl: 'partials/phone-detail.html', template: pageTemplate, controller: 'PagesCtrl' }). otherwise({ redirectTo: '/' }); }]); app.controller('PagesCtrl', ['$scope', '$routeParams', function ($scope, $routeParams) { $scope.page = { 'title': pageTitles[$routeParams.pageId - 1] }; }]); Static pages demo Page 1 Page 2
type: Answer
answers question: http://stackoverflow.com/q/27236970

http://stackoverflow.com/comment/42934365
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27183813
has text: See https://www.npmjs.org/package/grunt-usemin for full comments on wiredep, out of the bucket it only does js and css

http://stackoverflow.com/q/27156088
possible better answer: http://stackoverflow.com/a/27156188
accepted answer: http://stackoverflow.com/a/27157281
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42806430
score: 2
has comment: http://stackoverflow.com/comment/42806953
upvote count: 2
has title: Handle flexible amout of parameters
type: Question
type: AnsweredQuestion
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/42806502
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/27156188
has body: I've this sentence on my code: .state('category', { url: '/categories/:parameter', templateUrl: 'templates/common/categories.html', controller: 'categoriesCtrl', resolve : { categoryList: ['Products', function (Products) { return Products.listByCategories($stateParams.parameter); }] } }) It's just a simple web shop, you know... list the products according to categories. The problem is that the number of categories must be dynamic... I can, for example request for: /categories/shoes /categories/shoes/man/ /categories/shoes/man/running /categories/shoes/man/running/nike So, the parameter must be dynamic and I've no clue how to do it. Can anyone help me? Thank you!
has answer: http://stackoverflow.com/a/27157281
tagged with: arrays
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42850812
type: QuestionComment
has text: @raneshu yes more precisely `The return statement is affected by automatic semicolon insertion (ASI). There is no line terminator between the return keyword and the expression allowed.`
type: Comment
comment on: http://stackoverflow.com/q/27181152
score: 0

http://stackoverflow.com/a/27308626
answers question: http://stackoverflow.com/q/27301556
has comment: http://stackoverflow.com/comment/43405965
type: Answer
has comment: http://stackoverflow.com/comment/43437839
has body: Draw a random invisible path inside the region get a random point inside that path and draw a random object using that point as center var radius1 = 80; var radius2 = 50; var center = 250; function circleToPath(c, r, d) { if(d == 1) { return "M "+(c-r)+","+c+" q 0,-"+r+" "+r+",-"+r+" "+r+",0 "+r+","+r+" 0,"+r+" -"+r+","+r+" -"+r+",0 "+"-"+r+",-"+r; } else { return "M "+(c-r)+","+c+" q 0,"+r+" "+r+","+r+" "+r+",0 "+r+",-"+r+" 0,-"+r+" -"+r+",-"+r+" -"+r+",0 "+"-"+r+","+r; } } region = paper.path(circleToPath(center, radius1, 1) + circleToPath(center, radius2, 0) + "z").attr({fill: "red", "fill-opacity": 0.5,stroke: "none"}); for(i=0;i&lt;5;i++){ randomRadius = Math.floor((Math.random() * (radius1 - radius2)) + radius2); vir = paper.path(circleToPath(center, randomRadius, 1)).attr({fill: "none", stroke: "none"}); len = vir.getTotalLength(); pointCenter = vir.getPointAtLength(Math.floor(Math.random() * len)); paper.circle(pointCenter.x,pointCenter.y,(Math.floor(Math.random() * 15)) + 5); } http://jsfiddle.net/5L9g0xh4/ UPDATE: A little bit cheating as path intersection exists but is not working well in Raphael constrain the random point and then rotate each: http://jsfiddle.net/crockz/opqhas0w/
score: 0

http://stackoverflow.com/q/27299086
has title: calling a function as data in D3.js
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/27300347
favorite count: 0
has body: Im just getting started on d3.js and was going through Nick's source code on github here and got stuck at the part where he is passing a function as data into d3.js. The var x in the function assigned to next var gets incremented from 0 to the loop counter as i show in the jsbin link below. I cant quite wrap my head around how x gets incremented automatically and how does it know the loop counter that it needs to get incremented upto everytime. the next variable is called from >> newdata from the >>render function ? I just setup a jsbin here
tagged with: d3.js
upvote count: 1
has answer: http://stackoverflow.com/a/27300347
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/27300213
accepted answer: http://stackoverflow.com/a/27300213
tagged with: javascript

http://stackoverflow.com/comment/42986967
has text: Yes, $(".texttohighlight span").contents().unwrap(); will get rid of the tags. Just put that inside of a click listener for a button and you should be all set
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27240503
type: AnswerComment

http://stackoverflow.com/comment/42904489
type: QuestionComment
comment on: http://stackoverflow.com/q/27211439
score: 0
has text: You might have a problem with your ID's. For example the id tutid is used 3 times and you select this by var inputTutid = $("#tutid");
type: Comment

drupal
type: Tag
tag name: drupal
tags question: http://stackoverflow.com/q/27286631

http://stackoverflow.com/comment/42944768
type: QuestionComment
type: Comment
score: 4
has text: wouldn't css be better?
comment on: http://stackoverflow.com/q/27234044

http://stackoverflow.com/comment/42902641
type: Comment
comment on: http://stackoverflow.com/a/27210318
has text: Please use updated version of browser and your browser must support HTML5. I have updated above code with program that is running in my browser perfectly.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27302748
score: 0
has comment: http://stackoverflow.com/comment/43280955
type: Answer
has body: Place form elements in a one container with some class attrbiute value, insert multiple containers into the html, find all containers with class name given, use querySelector to find child elements by theirs name or class attr(NOT id).
has comment: http://stackoverflow.com/comment/43239361
answers question: http://stackoverflow.com/q/27302099
has comment: http://stackoverflow.com/comment/43252792
has comment: http://stackoverflow.com/comment/43252913

http://stackoverflow.com/q/27193552
upvote count: 1
tagged with: validation
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42872769
has title: Having issues setting up function for form validation
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/27193730
has body: Gender: id="gender" name = "gender"> Select a gender Male Female Thats the form I'm trying to validate, and this is my javascript, but I can't see to get it to work: function validateGender(){ if("" == document.getElementsByID('gender')[0].selectedIndex){ alert("Please select a gender") return; } }
score: 1
has comment: http://stackoverflow.com/comment/42872646
has comment: http://stackoverflow.com/comment/42872618
has answer: http://stackoverflow.com/a/27193681
tagged with: forms
answer count: 2

http://stackoverflow.com/q/27212036
tagged with: mysqli
tagged with: php
has body: I have an HTML login form, and a php code that commences a database connection and enables logging in through simple HTML. What I want to do is to implement the php code on a certain design I have. I am having problems connecting that php code with the desired design(the HTML form) The login html form: Log in ▼ Keep me signed in Sign up FREE The PHP MySQL code including an HTML login form: <?php if (!isset($_POST['submit'])){ ?> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> Username: Password: <?php } else { require_once("db_const.php"); $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); # check connection if ($mysqli->connect_errno) { echo " MySQL error no {$mysqli->connect_errno} : {$mysqli->connect_error} "; exit(); } $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT * from users WHERE username LIKE '{$username}' AND password LIKE '{$password}' LIMIT 1"; $result = $mysqli->query($sql); if (!$result->num_rows == 1) { echo " Invalid username/password combination "; } else { echo " Logged in successfully "; // do stuffs } } ?>
has title: Login Form Mysqli php with HTML
tagged with: mysql
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27212114
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/a/27190156
score: 0
answers question: http://stackoverflow.com/q/27189947
type: AcceptedAnswer
has body: the function called for evaluation is valueOf() Not always. valueOf() is only meaningful for non-primitive types, since it is defined to return the primitive value of the given object. true by itself is a Boolean primitive and as such calling true.valueOf() would be completely redundant. The unary + and - sign operators always return a number by definition. Since a Boolean quite conveniently converts to a number, it only makes sense that +true returns 1. There is no reason +true and true.valueOf() should both correspond to the same value.
type: Answer
accepted answer of: http://stackoverflow.com/q/27189947

http://stackoverflow.com/q/27203869
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/27203894
tagged with: asynchronous
has answer: http://stackoverflow.com/a/27203883
favorite count: 0
has answer: http://stackoverflow.com/a/27203895
tagged with: node.js
type: AnsweredQuestion
has title: How does asynchrony deal with variables in Javascript?
downvote count: 0
score: 1
type: Question
has body: Suppose I have the following code var x = 5; for (var i = 0; i &lt; 1000; i++) { x = x + i; } launch(x); function launch(x) { console.log(x); } Does the async nature of javascript mean that the function launch may be called before the for cycle is over? Or is it called only after the operations on x are over? How to ensure the latter? UPDATE: I use it in a Node.Js app
tagged with: javascript
has comment: http://stackoverflow.com/comment/42890528
accepted answer: http://stackoverflow.com/a/27203883
has answer: http://stackoverflow.com/a/27203894

http://stackoverflow.com/q/27202013
has body: I am reading Json files and populate List of Items using Newtonsoft.Json. I have a problem reading some Json files were the name of the attribute has spaces and therefore it is not the same as the attributes of Item class. This is fine. Item object will assigned with the below values. [ { "FirstName": "John", "SecondName": "Smith" } ] But my Json file is like this thus Item object has null values for FirstName and SecondName [ { "First Name": "John", "Second Name": "Smith" } ] Therefore my Item which has properties of FirstName and SecondName (see below) will get a null value. public class Item { private string firstName = ""; private string secondName = ""; public string FirstName { get { return firstName; } set { firstName = value; } } public string SecondName { get { return secondName; } set { secondName = value; } } } Is there a simple way how to solve this problem. I have no control on the namings (e.g. FirstName or First Name in the Json string.
type: Question
tagged with: json.net
tagged with: c#
answer count: 2
tagged with: .net
downvote count: 0
tagged with: javascript
duplicate of: http://stackoverflow.com/q/19792274
linked to: http://stackoverflow.com/q/12856853
has title: Deserialize Json issue due to spaces
favorite count: 0
possible better answer: http://stackoverflow.com/a/27202069
upvote count: 1
has answer: http://stackoverflow.com/a/27203946
accepted answer: http://stackoverflow.com/a/27203946
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27202069
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/104908868
has text: Then maybe your type of authentication is different. Also, I don't know if you've already read this in the npm package notes, but this won't work with headless Chrome. And by the way, this doesn't "fill up the password within the pass prompt", i.e. there's no visual form to fill in, the login/authentication is done transparently, you don't see any pop-up prompt.
comment on: http://stackoverflow.com/a/59141343
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43031449
comment on: http://stackoverflow.com/q/27281065
type: Comment
type: QuestionComment
has text: If you're serving it up by serving the video data through your Apache server, then the data shouldn't be cross-origin. The browser doesn't know where Apache got its data from. It seems like the browser making a request to the original data source instead of your proxy.
score: 0

http://stackoverflow.com/comment/42910696
type: QuestionComment
has text: It is a duplicate. Vote for the best duplicate.
score: 0
comment on: http://stackoverflow.com/q/27214681
type: Comment

http://stackoverflow.com/a/27262612
answers question: http://stackoverflow.com/q/27262581
has comment: http://stackoverflow.com/comment/42997734
score: 0
has comment: http://stackoverflow.com/comment/42997747
type: Answer
has body: obj2 and obj1 refer to the same object. You'll need to clone it or new up two different references of an object with similar values. function Obj(name, hairColor){ this.name = name; this.hair = hairColor; }; var obj1 = new Obj('bob', 'brown'); var obj2 = new Obj('bob', 'brown'); delete obj2.hair; Another alternative, if defining an Obj function as depicted above, is not feasible, is to write a function that loops over the properties of an object and returns a new object with the same values.

http://stackoverflow.com/a/27205227
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27177502
accepted answer of: http://stackoverflow.com/q/27177502
has body: Take a look at this question: Assemble: Multiple points of content insertion in layout? It has information on how to use the helper layouts in assemble v0.4.x. These will still be available in assemble v0.6.0 but we'd like to be able to support more options for built-in layouts.
upvote count: 1
has comment: http://stackoverflow.com/comment/42899956
type: AcceptedAnswer

http://stackoverflow.com/q/27244321
has answer: http://stackoverflow.com/a/27351733
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42970754
has comment: http://stackoverflow.com/comment/42966095
has comment: http://stackoverflow.com/comment/43091123
tagged with: collectionview
has comment: http://stackoverflow.com/comment/42966161
has comment: http://stackoverflow.com/comment/42965575
answer count: 1
has body: I have a problem with Marionette collectionView. When I dont define the el like var featureditems = new View.CarouselItems({ collection: content }); the collectionview: View.CarouselItem = Marionette.ItemView.extend({ template: carouselItemTpl, tagName: 'div', attributes: function() { var clas = ''; if (this.model.get('ind') == 0) { clas = ' active' } return { 'data-slide-to': this.model.get('ind'), 'data-target': '#homeCarousel', 'class': 'item' + clas }; }, }); View.CarouselItems = Marionette.CollectionView.extend({ itemView: View.CarouselItem }); The collectionview renders the items encapsulated within a div tag, which is problematic. When I define the container element like so: var featureditems = new View.CarouselItems({ collection: content, el: $("#carousel-inner") }); The view renders the itemViews like, <!--div class="hero-video"></div--> which is what is desired, but when the whole collection renders the elements disappear and I remain with and empty view like Help! PS: I am using bootstrap-carousel to enable my carousel
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion
tagged with: marionette
has title: Backbone.Marionette collectionview resets when el is defined

http://stackoverflow.com/q/27287471
tagged with: sitecore6
answer count: 1
type: UnansweredQuestion
tagged with: sitecore
tagged with: xslt
has title: How to add javascript attribute in xslt file in sitecore
score: 0
has body: I have added attribute in asp.net hyperlink server control in sitecore as per given below: hlFile.Attributes.Add("onclick", "alert(website name" + ConfigurationManager.AppSettings["websitename"].ToString() + ")"); which is fine but now I have to do the same work in .xslt file and code is given below: &lt;sc:link field="Link Button" select="$thisItem"&gt; &lt;sc:text field="website name" select="$thisItem"/&gt; &lt;/sc:link&gt; Anybody suggest me how to do it. Thanks
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27547434

http://stackoverflow.com/comment/42906822
has text: But the OP asked about including the whole script at either the top or bottom of the html page - your second example wouldn't work either way.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27213196
type: Comment

http://stackoverflow.com/comment/42871180
type: Comment
has text: Yep, looks to work fine, the mistake I made was to double the [] foo[[0][0]], thanks !
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27192690

http://stackoverflow.com/a/27174584
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27174472
accepted answer of: http://stackoverflow.com/q/27174472
type: Answer
downvote count: 1
has body: You need to look for the input under the context of each iteration, like below, $(".myclass").each(function() { var $input = $(this).find("input"); alert ("Name: " + $input.attr("name")); alert ("Value: " + $input.val()); });
upvote count: 1
score: 0

http://stackoverflow.com/a/27155659
answers question: http://stackoverflow.com/q/27155480
score: 2
upvote count: 2
has body: This should do it: $(document).ready(function(){ var $content = $(".contentcone").hide(); $(document).on("click", function(e) { if( $(e.target).is(".togglecone") ) { $(this).toggleClass("expandedcone"); $content.slideToggle(); } else { $content.slideUp(); } }); }); DEMO
has comment: http://stackoverflow.com/comment/42867202
has comment: http://stackoverflow.com/comment/42866990
downvote count: 0
type: Answer

http://stackoverflow.com/a/27277333
has comment: http://stackoverflow.com/comment/43023615
score: 1
answers question: http://stackoverflow.com/q/27273945
downvote count: 0
has body: If you'd like to add some animations you could use animate.css like in the following demo. You could also use jQuery animations but animate.css is easier to use and a lot eaiser to try out different animations. You only have to change the animation names. Have a look at animate.css webpage for available animation styles. The tip from Hari Krishnan works perfectly. (I've used it in the demo.) The line $msg.show().removeClass().toggleClass(flag ? inAnimation : outAnimation); is a bit tricky. It shows the div and toggles to the css stored in inAnimation. In the next interval the flag is falsy and the css stored in outAnimation will be used. The removeClass() is required to have no other stlyes in the div before applying the animation css. (There is no hide() function because css fadeOut is hiding automatically.) The demo is available in this jsFiddle. $('document').ready(function () { var $msg = $('#msg'); var displayTime = 0.1; // in minutes 0.1 = 6 seconds / 1 = 1 min. var flag = true; $msg.hide(); setInterval( function () { var inAnimation = 'fadeIn animated'; var outAnimation = 'fadeOut animated'; //console.log(flag); $msg.show().removeClass().toggleClass(flag ? inAnimation : outAnimation); flag ^= true; }, displayTime * 1000 * 60); }); body { margin:0px auto; width:80%; height:80%; font-family: Verdana, Geneva, sans-serif; } /*container for all divs inside*/ #container { width:1450px; } /*map size*/ #map_size { width:1190px; height:1300px; background:#0099FF; border-style: solid; border-color: black; position: relative; float:left; } /*msg*/ .station_info_ { z-index: 100; position: absolute; background-color:white; border-radius: 5px; height: 200px; margin-left: 50px; width: 275px; border:4px solid black; } new records available.
type: Answer
upvote count: 1

http://stackoverflow.com/q/27283887
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27284170
tagged with: http://stackoverflow.com/tag/html
has title: Adding selected and disabled attributes to an option tag in IE 11
upvote count: 2
has answer: http://stackoverflow.com/a/27284179
accepted answer: http://stackoverflow.com/a/27284179
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27284170
tagged with: internet-explorer
type: Question
has body: I'm trying to debug some code that doesn't display properly. The code should add a default option to an drop down list that is disabled from selection. What I get is that the list option is displayed but not selected by default. After the page is loaded I inspect element on that list box and I am shown the following html for the first item of the list: When I select edit as HTML the tag expands to By simply creating a local html file using the tag with selected="" I can get the desired results but I'm not sure why it doesn't appear in the inspector until I select edit as HTML. Here is the rest of the code pertaining to this issue: Inquiry Type (required) Problem Report Usage or Technical Question Enhancement Request New Project Idea Other There are more scripts but I don't think they pertain to this error. Also I get the desired results in Chrome.
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/42923516
type: QuestionComment
type: Comment
has text: would probably be best to do this server side with whatever CGI programming language you prefer. In this case you'll use ASP.
comment on: http://stackoverflow.com/q/27222458
score: 0

http://stackoverflow.com/comment/42942724
score: 0
type: Comment
type: AnswerComment
has text: yes for facebook javascript API . But in hello . js inorder to pass 'publish_action' in the url you need to call the plugin with scope:publish. Please see line number 3476. of hello.js
comment on: http://stackoverflow.com/a/27232970

http://stackoverflow.com/q/27255347
has answer: http://stackoverflow.com/a/27255702
type: Question
has body: I am using graphite to get stats and want to render a justgage gauge for a variable. Graphite can spit out values using either json: [{"target": "snmp.ssbSubstation.realEnergy.1", "datapoints": [[4511552439.0, 1417540920]]}] or raw: snmp.ssbSubstation.realEnergy.1,1417540860,1417540920,60|4511552439.0 That's the entire one line of the source returned depending on if you specify either json or raw. The url is formatted like http://&lt;graphite server&gt;/render?target=snmp.ssbSubstation.realEnergy.1&amp;format=raw&amp;from=-1min Either way, I'd like to grab 4511552439.0 and set it as the value for the gauge and render in in a html panel in grafana. Is there a very simple way to do this?
tagged with: justgage
has title: How can I get a value from another webpage and store it as a variable?
tagged with: javascript
score: 0
tagged with: grafana
answer count: 1
tagged with: graphite
accepted answer: http://stackoverflow.com/a/27255702
type: AnsweredQuestion

function
tags question: http://stackoverflow.com/q/27171572
tags question: http://stackoverflow.com/q/27238973
tags question: http://stackoverflow.com/q/27238506
tags question: http://stackoverflow.com/q/27176067
tag name: function
tags question: http://stackoverflow.com/q/27277412
tags question: http://stackoverflow.com/q/27284461
tags question: http://stackoverflow.com/q/27283810
tags question: http://stackoverflow.com/q/27233629
tags question: http://stackoverflow.com/q/27254692
tags question: http://stackoverflow.com/q/27170423
tags question: http://stackoverflow.com/q/27154637
tags question: http://stackoverflow.com/q/27168653
tags question: http://stackoverflow.com/q/27245652
tags question: http://stackoverflow.com/q/27209784
tags question: http://stackoverflow.com/q/27232425
tags question: http://stackoverflow.com/q/27212286
tags question: http://stackoverflow.com/q/27198359
type: Tag
tags question: http://stackoverflow.com/q/27305786
tags question: http://stackoverflow.com/q/27190083
tags question: http://stackoverflow.com/q/27246828
tags question: http://stackoverflow.com/q/27296364
tags question: http://stackoverflow.com/q/27170810
tags question: http://stackoverflow.com/q/27212404
tags question: http://stackoverflow.com/q/27307915
tags question: http://stackoverflow.com/q/27190779
tags question: http://stackoverflow.com/q/27211205
tags question: http://stackoverflow.com/q/27283607
tags question: http://stackoverflow.com/q/27178330
tags question: http://stackoverflow.com/q/27311411
tags question: http://stackoverflow.com/q/27275176
tags question: http://stackoverflow.com/q/27269053
tags question: http://stackoverflow.com/q/27227412
tags question: http://stackoverflow.com/q/27229010
tags question: http://stackoverflow.com/q/27297675
tags question: http://stackoverflow.com/q/27301732
tags question: http://stackoverflow.com/q/27298974
tags question: http://stackoverflow.com/q/27282596
tags question: http://stackoverflow.com/q/27253705

http://stackoverflow.com/q/27189327
has answer: http://stackoverflow.com/a/27191336
has comment: http://stackoverflow.com/comment/42868175
tagged with: javascript
score: 0
answer count: 1
tagged with: meteor
has comment: http://stackoverflow.com/comment/42867982
has comment: http://stackoverflow.com/comment/42864907
has body: I have a set of buttons that repeat in all my templates. When I click on any of the sections with a class of content_editable I want the buttons next to the clicked section to show. What I've done so far is store the _id of the clicked section in a session but what I'm struggling with is how I will actually show the buttons after the click. I thought that I could use a helper and get the stored _id and then check that the buttons I want to show is a sibling of the clicked section then compare if the sibling has the same _id as the stored _id. This obviously doesn't work. //HELPERS UI.registerHelper('copy', function() { return ContentCollection.find(); }); UI.registerHelper('toggle', function() { var tog = this.nextElementSibling; var toggle = tog._id; var activeElement = Session.get('activeElement'); if(activeElement == toggle) { return true; } }); //EVENTS Template.layoutWrapper.events({ 'click .content__editable': function(e) { var clickedContainer = this._id; Session.set('activeElement', clickedContainer); } }); //TEMPLATES {{> layoutWrapper}} {{> mainLeft}} {{> mainRight}} {{#if toggle}} {{> editControls}} {{/if}} {{#each copy}} {{{content}}} {{/each}} {{#if toggle}} {{> editControls}} {{/if}} {{#each copy}} {{{content}}} {{/each}} edit save // The output would look like this. edit save Some text here
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27191336
type: Question
has title: Get sibling _id meteor

http://stackoverflow.com/q/27153808
tagged with: java
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27161093
type: Question
tagged with: javascript
tagged with: ajax
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27154195
linked to: http://stackoverflow.com/q/14570831
linked to: http://stackoverflow.com/q/4121629
has body: I am posting client side data to server in the following format. $.ajax({ type: 'post', url: 'rest/server', data: JSON.stringify(frmData), contentType: "application/json; charset=utf-8", success: function (data) { ... } }); How and what are the best options to either encrypt/decrypt or generate key value pair when send to server(java) in order to avoid posting data which is not supposed to be sent? E.g. if form element contains values pertains to user, that user could send other values to server to post. HTTPS/SSL is not an option for me for the time being.
has comment: http://stackoverflow.com/comment/42802048
type: UnansweredQuestion
tagged with: encryption
has answer: http://stackoverflow.com/a/27160812
has title: JSON data Encrypt/Decrypt or Key Value Pair

http://stackoverflow.com/q/27173899
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/27173987
has comment: http://stackoverflow.com/comment/42840050
answer count: 2
has comment: http://stackoverflow.com/comment/42837652
upvote count: 0
accepted answer: http://stackoverflow.com/a/27173987
tagged with: jquery
has answer: http://stackoverflow.com/a/27173976
favorite count: 0
has body: is it possible to jump to an other page and in the same action also to a page position (at the new website) by clicking only one link? For example index.html -> clicking "link1" -> news.html is shown and view position is anchor "article1". index.html -> clicking "link2" -> news.html is shown and view position is anchor "article2". Hope, someone can help me?
has comment: http://stackoverflow.com/comment/42837711
has comment: http://stackoverflow.com/comment/42837684
possible better answer: http://stackoverflow.com/a/27173976
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42837614
has comment: http://stackoverflow.com/comment/42840908
downvote count: 2
has title: Jump to page AND page position in one action
type: Question

http://stackoverflow.com/q/27312147
has answer: http://stackoverflow.com/a/27312455
answer count: 2
tagged with: arrays
accepted answer: http://stackoverflow.com/a/27312193
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27312455
has comment: http://stackoverflow.com/comment/43084841
has comment: http://stackoverflow.com/comment/43085148
tagged with: css
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/27312193
downvote count: 1
type: AnsweredQuestion
has body: I am struggling with fetching the class of my divs, that are planned to become tabs on a basic asp.net website. I wish to do this with jQuery as that would allow me more control for dynamic functions later. However, when I try to fetch the value of the certain "selectedTab", I just get "undefined". My question is how I can store the relevant class together with the name for that object (which I believe I have got right in my code), and then retrieve it. This is the relevant parts of my very simple html: &lt;div id="t1" class="tabs"&gt;&lt;/div&gt; &lt;div id="t2" class="tabs"&gt;&lt;/div&gt; &lt;div id="t3" class="selectedTab"&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; And my jQuery: var tabMatchList = [{ "tab1": "tabs" }, { "tab2": "tabs" }, { "tab3": "selectedTab" }]; $.each(tabMatchList, function (i, val) { if ($("#t3").attr("class") == val[0]) { $("p").append(i + " was the tab searched for"); } else { $("p").append(i + " was not the tab searched for." + val[0]); } }); All help and advice is very welcome.
has title: Accessing the class attribute in jQuery - Key, value pair
score: 1
type: Question

http://stackoverflow.com/comment/43074809
score: 0
type: Comment
has text: @BenjaminAllison - I'd love to help, but I can't really envision what you mean. If you could reproduce a simple `jsfiddle` with just your test case, I could understand what you mean.
type: QuestionComment
comment on: http://stackoverflow.com/q/27303127

http://stackoverflow.com/q/27311331
has comment: http://stackoverflow.com/comment/43083322
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18490199
linked to: http://stackoverflow.com/q/126100
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43083913
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/43083722
has title: How to get the length of a map in angularjs ng-show?
duplicate of: http://stackoverflow.com/q/126100
linked to: http://stackoverflow.com/q/17335108
upvote count: 1
has body: how can I get the length / size of a map in "ng-show"? var map = { "key1": "value1, "key2": "value2, "key3": "value2 } UPDATE 01 0"> or 0"> UPDATE 02 Issue with ngShow where and how to set the $scope.Object = Object; ?? when I set that I got the following error: Error: [$parse:isecobj] Referencing Object in Angular expressions is disallowed! Expression: Object.keys(selectedIdeas).length>0

http://stackoverflow.com/q/27166246
has answer: http://stackoverflow.com/a/27167114
score: 1
has comment: http://stackoverflow.com/comment/42824840
has answer: http://stackoverflow.com/a/27166854
type: Question
has comment: http://stackoverflow.com/comment/42825015
has comment: http://stackoverflow.com/comment/42825030
has comment: http://stackoverflow.com/comment/42824796
has title: On click event only fires once, why?
has body: I've been having this problem for the past week but I just skipped it for this time. So this is my jQuery code: jQuery(function ($) { $(function () { $('.mPicture').on('click', function (e) { e.preventDefault(); $(this).find('div').bPopup(); }); }); }); I have seen that people needed to use .live for getting it to work multiple times but that doesn't do anything with this code. This code is connected to a div which isn't visible until an image is clicked. So what my question is: Why doesn't this work and what do I need to change? HTML: Put your text here If any other information is needed, feel free to ask.
tagged with: javascript
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/42825287
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42824668
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42824770
upvote count: 1
has comment: http://stackoverflow.com/comment/42824475
has comment: http://stackoverflow.com/comment/42826027

http://stackoverflow.com/a/29569180
score: 0
type: Answer
has body: I am doing a content site project using Jekyll and as I was doing my research I came up with a possible answer: I suggest you to do it The Zurb Way
answers question: http://stackoverflow.com/q/27200796

http://stackoverflow.com/comment/43050346
has text: You are missing your `onreadystatechange` function. Think if you did add that, you will get your output.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27292238

http://stackoverflow.com/q/27183467
tagged with: window.open
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27183541
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27183491
has title: window.open doesn't do anything
has answer: http://stackoverflow.com/a/27183541
has body: I'm trying to show some info in a pop-up window usig a window.open.. but when I click nothing happens. This is the function that opens a new window. function goNewWin(sell_code){ // Set height and width var NewWinHeight=1000; var NewWinWidth=1000; // Place the window var NewWinPutX=10; var NewWinPutY=10; //Get what is below onto one line TheNewWin =window.open("renovations_history.php?sell_code=" + sell_code, 'Renovaciones','fullscreen=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=no'); //Get what is above onto one line TheNewWin.resizeTo(NewWinHeight,NewWinWidth); TheNewWin.moveTo(NewWinPutX,NewWinPutY); } &lt;/script&gt; Here's the HTML, with some PHP. &lt;form&gt; &lt;input type="button" value="Renovaciones" onClick="goNewWin(&lt;?php echo $row['sell_code']; ?&gt;)"&gt; &lt;/form&gt; Nor it works with: &lt;a href="javascript:goNewWin(&lt;?php echo $row['sell_code']; ?&gt;)"&gt;Renovaciones&lt;/a&gt; It's 2:22 am and I can think straight, please help.
tagged with: php
type: AnsweredQuestion
tagged with: popup
possible better answer: http://stackoverflow.com/a/27183491
type: Question
tagged with: javascript

http://stackoverflow.com/q/27301310
has body: With below code i am trying to change browser page. $pdf-&gt;Output($pdf_file_name, 'D'); //Downloading PDF header("Refresh: 3; url='http://example.com/search-form/'"); Problem : it is working in FireFox but not working in Chrome and IE. I need to work this in Chrome/IE.
tagged with: meta
type: Question
tagged with: refresh
tagged with: javascript
has answer: http://stackoverflow.com/a/27322033
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has title: How to redirect after download in Chrome
tagged with: php

http://stackoverflow.com/comment/42804724
type: Comment
has text: @DrewKennedy that would always evaluate to true...
comment on: http://stackoverflow.com/q/27155138
score: 0
type: QuestionComment

http://stackoverflow.com/a/28779140
answers question: http://stackoverflow.com/q/27284621
downvote count: 0
has body: Export your JSON data to a file or read directly then create a larger image using Imagick $print = new Imagick(); $print-&gt;setResolution(300, 300); $background = #ff00ff; $print-&gt;newImage(9000, 9000, new ImagickPixel($background)); $print-&gt;setImageFormat('png32'); $print-&gt;setImageUnits(imagick::RESOLUTION_PIXELSPERCENTIMETER); // Re-Scaling each Image/Text for Larger Canvas/Image foreach ($printData-&gt;json_data-&gt;objects as $i =&gt; $object) { addImage($object, $print, $printData); } function addImage($object, $print, $printData) { $widthScale = ($printData-&gt;width / 300); fabric canvas width $heightScale = ($printData-&gt;height / 500); fabric canvas height $fileDir = dirname(__FILE__) . DS . 'media' . DS . 'original' . DS; $src = new Imagick($fileDir . basename($object-&gt;src)); $size = $src-&gt;getImageGeometry(); $resizeWidth = ($object-&gt;width * $object-&gt;scaleX) * $widthScale; $resizeHeight = ($object-&gt;height * $object-&gt;scaleY) * $heightScale; $src-&gt;resizeImage($resizeWidth, $resizeHeight, Imagick::FILTER_LANCZOS, 1); $sizeAfterResize = $src-&gt;getImageGeometry(); $src-&gt;rotateImage(new ImagickPixel('none'), $object-&gt;angle); $sizeAfterRotate = $src-&gt;getImageGeometry(); $left = $object-&gt;left * $widthScale; $top = $object-&gt;top * $heightScale; $print-&gt;compositeImage($src, Imagick::COMPOSITE_DEFAULT, $left, $top); } try { // Saving High Quality Image in (300 dpi) $fileDir = dirname(__FILE__) . DS . 'media' . DS . 'prints'; if (!file_exists($fileDir) || !is_dir($fileDir)) { if (!mkdir($fileDir)) die("Could not create directory: {$fileDir}\n"); } $saved = $print-&gt;writeimage($fileDir . DS . $id . '.png'); header('Content-type: image/png'); echo $print; } catch (Exception $e) { echo $e-&gt;getMessage(); }
score: 1
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/58469096
has comment: http://stackoverflow.com/comment/92117723

http://stackoverflow.com/comment/102644798
comment on: http://stackoverflow.com/a/49071358
score: 1
has text: Doesn't work in Edge in the case of DragEvent https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14156632/
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42863249
has text: `The ternary operator syntax is wrong`: no, it's not. Clearly not the best way to do it, but definitively not wrong.
type: Comment
score: 3
comment on: http://stackoverflow.com/a/27188468
type: AnswerComment

http://stackoverflow.com/a/27251316
has comment: http://stackoverflow.com/comment/42977524
answers question: http://stackoverflow.com/q/27249556
score: 0
accepted answer of: http://stackoverflow.com/q/27249556
type: AcceptedAnswer
has body: Here you are http://jsfiddle.net/f0sbo0vd/3/ $(document).on('mouseenter', '#tblOrder tr a', function(event) { $(".proper a").qtip({ content: { text: 'Loading.....', ajax: { url: '&lt;%=Url.Action("Alarms") %&gt;', type: 'POST', success: function (data, status) { this.set('content.text', data); }, error: function (xhr) { console.log(xhr.responseText); } } }, show: { event: event.type, ready: true, effect: function () { $(this).slideDown(); } }, hide: { effect: function () { $(this).slideUp(); } } }, event); }); EDIT To show qtip on the link use this http://jsfiddle.net/f0sbo0vd/5/ Just change $(".proper a").qtip({ ... }); to $(this).qtip({ ... });
has comment: http://stackoverflow.com/comment/42976989
type: Answer

http://stackoverflow.com/a/27191639
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27188281
has body: The Simple Way: Analog to UNION statement of SQL ANSI. For more information, see the example of https://docs.angularjs.org/api/ng/directive/ngInit list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}}; Result: list[ 0 ][ 0 ] = a; list[ 0 ][ 1 ] = b; list[ 1 ][ 0 ] = c; list[ 1 ][ 1 ] = d;
score: 2
downvote count: 0

http://stackoverflow.com/comment/42934128
has text: I don't want to change the loading pattern. What I want to know is what is the optimal way of loading an image with that animation. If it's better a gif or a video that when finishes playing changes into the full image.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27213350

http://stackoverflow.com/q/27214074
has comment: http://stackoverflow.com/comment/42908774
has title: Javascript: compare previous url with current one
has comment: http://stackoverflow.com/comment/42908459
tagged with: javascript
upvote count: 2
answer count: 2
downvote count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42908366
has answer: http://stackoverflow.com/a/27214465
has body: Requirement: Compare the previous url with the current one and do some action. Problem: The document.referrer is still same after the page refresh. Question: Is there an elegant way of comparing urls other then storing a cookie or session?
linked to: http://stackoverflow.com/q/12039019
has comment: http://stackoverflow.com/comment/42908521
has comment: http://stackoverflow.com/comment/42908698
possible better answer: http://stackoverflow.com/a/27214465
score: 1
has answer: http://stackoverflow.com/a/27216318
accepted answer: http://stackoverflow.com/a/27216318
type: Question
has comment: http://stackoverflow.com/comment/42912412
type: AnsweredQuestion

http://stackoverflow.com/comment/42888309
comment on: http://stackoverflow.com/a/27202181
score: 0
type: AnswerComment
has text: Take hidden field with same class name . it will auto set value in hidden field
type: Comment

http://stackoverflow.com/q/27154991
tagged with: mixins
has answer: http://stackoverflow.com/a/27155077
tagged with: javascript
has comment: http://stackoverflow.com/comment/42804465
tagged with: inheritance
has comment: http://stackoverflow.com/comment/42804538
linked to: http://stackoverflow.com/q/9163341
accepted answer: http://stackoverflow.com/a/27155077
has comment: http://stackoverflow.com/comment/42804405
has body: How can I create a function that inherits from two functions and respects changes for their prototypes when the two base functions don't have an inheritance relationship? The example demonstrates the behavior I want because c gets modifications to A.prototype and B.prototype. function A() { } function B() { } B.prototype = Object.create(A.prototype); function C() { } C.prototype = Object.create(B.prototype); A.prototype.foo = "foo"; B.prototype.bar = "bar"; var c = new C(); console.log(c.foo); //prints foo console.log(c.bar); //prints bar However, I don't have the luxury where B inherits from A. function A() { } function B() { } function C() { } C.prototype = //something that extends A and B even though B does not extend A. A.prototype.foo = "foo"; B.prototype.bar = "bar"; var c = new C(); console.log(c.foo); //should print foo console.log(c.bar); //should print bar
has title: "Multiple inheritance" in prototypal inheritance
type: AnsweredQuestion
tagged with: prototypal-inheritance
score: 0
has answer: http://stackoverflow.com/a/27155154
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27155154

http://stackoverflow.com/comment/42934158
has text: @iamnotmaynard `document.body.attributes.class.value += " foo"` Bam! I've changed an attribute [without using](https://developer.mozilla.org/en-US/docs/Web/API/Element.attributes) `setAttribute()`.
type: QuestionComment
comment on: http://stackoverflow.com/q/27221604
score: 0
type: Comment

http://stackoverflow.com/q/27293730
has answer: http://stackoverflow.com/a/27293949
possible better answer: http://stackoverflow.com/a/27294105
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27294105
has comment: http://stackoverflow.com/comment/43052848
has body: I have a php array which I displaying with a while loop and it gets the data from a sql database, at the moment everything in the array appears instantly, but would it be possible to get them to display with a half second delay? Would i have to use Javascript?
tagged with: animation
accepted answer: http://stackoverflow.com/a/27293949
tagged with: php
has title: Display PHP array as animation?
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43052399
has answer: http://stackoverflow.com/a/27293938
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/42839839
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27175128
has text: @harish Appears `This request has no response data available.`, with a Error 500

http://stackoverflow.com/comment/42971955
has text: @Linda I apologize, my mistake, I forgot to remove it also from the if statement. Please try the updated version and let me know. Thanks !
type: Comment
comment on: http://stackoverflow.com/a/27247223
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43006614
comment on: http://stackoverflow.com/q/27267565
has text: I am in South Africa and when I ran the code it give me correct selected date. http://jsbin.com/luvolaboba/1/edit
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42856738
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27183712
has text: I updated code.Please check. or still you facing issue?
type: AnswerComment

http://stackoverflow.com/q/27165661
has comment: http://stackoverflow.com/comment/42825730
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27165938
has comment: http://stackoverflow.com/comment/42823731
has body: For example, I have a simple implementation of Angular's data binding mechanism - notification when data on object changes: // implementation var watchers = []; function watch(fn, cb) { var oldValue = fn(); watchers.push(function() { var newValue = fn(); if (newValue !== oldValue) { oldValue = newValue; cb(newValue); } }) } function digest() { watchers.forEach(function(fn) { fn() }); } // using implementation var some = { prop: 3 } watch(function() { return some.prop; }, function(newValue) { console.log('value changed to ' + newValue); }); Now I have two options of modifying some // option 1 delete some.prop; // this is optional here some.prop = 5; digest(); // outputs "value changed to 5" // option 2 // instead of changing the property on the same object, // I assign reference to the new object some = { prop: 11 } digest(); // outputs "value changed to 11" My question is which of two options is better to use? Usually objects contain a lot of fields, so reassing them as in option 1 is not always convenient. However, by using the second option I'm loosing reference to the original object and that potentially could lead to memory leaks if something had reference to this object. Is my thinking correct?
has title: Is there any value to redefining objects fields or array elements instead of assigning reference to other object
has comment: http://stackoverflow.com/comment/42824284
score: 1
has comment: http://stackoverflow.com/comment/42824996
has comment: http://stackoverflow.com/comment/42825166
upvote count: 1
type: Question
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/42846319
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27178670
has text: Is this all the JavaScript code? There are some errors popping up in the debugger.

http://stackoverflow.com/q/27200477
has answer: http://stackoverflow.com/a/27212617
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/14632260
tagged with: angularjs
linked to: http://stackoverflow.com/q/11913841
type: AnsweredQuestion
has title: AngularJS: Couldn't retrieve value from custom directive attribute to parse in custom directives
accepted answer: http://stackoverflow.com/a/27212617
has body: HTML &lt;div my-test="{{widget.code}}"&gt;&lt;/div&gt; AngularJS .directive('myTest', function() { return { templateUrl : function(elem, attr) { console.log(attr.myTest); return attr.myTest+'-widget.html' || 'blank-widget.html'; } }; }) I have this codes above and I am trying to retrieve the value under myTest which is the value that {{widget.code}} has. I also tried to search for solutions and possible workaround [1] [2] [3], and it seems I couldn't get through the problem. console.log(attr.myTest) always tells me {{widget.code}} but if I try to see the source it will display the value that I am needing. Can somebody point me to what solution I can do on this? Thank you! [1] https://docs.angularjs.org/guide/directive [2] Accessing attributes from an AngularJS directive [3] http://plnkr.co/edit/wWHZG97CviYrUxmxjSOb?p=preview
type: Question
tagged with: angularjs-directive
tagged with: javascript

http://stackoverflow.com/comment/42866094
score: 0
comment on: http://stackoverflow.com/a/27189756
type: Comment
has text: Thanks! I think they moved it and Google hasn't re-indexed it than.
type: AnswerComment

http://stackoverflow.com/comment/42978836
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27242092
has text: @SergeyK Is it possible to use an existing mysql server to query it without logging in or an api key, just with the url? That would be super cool since that's something I know how to setup.

http://stackoverflow.com/a/27237896
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27237746
type: Answer
has body: Use the complete (callback) function like so: $(function(){ $( "#test" ).animate({ opacity: 0.25, }, 1500, function() { alert('hello'); // callback }); }); Fiddle I can't see why it wouldn't work (or why it would fire immediately) unless maybe your animation duration is very short? Edit your question and add some code From the docs: If supplied, the complete callback function is fired once the animation is complete.

http://stackoverflow.com/comment/43020236
score: 1
has text: Math.random() will give you a number (float) between 0 and 1... Your condition doesn't make any sense. And @Fildor is right, == is the way to go to make a comparison.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27275365

http://stackoverflow.com/comment/42991063
type: Comment
has text: couldn't answer without how _.each is going on...that I could use conversion in conversions ...
comment on: http://stackoverflow.com/q/27258800
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42975283
type: QuestionComment
comment on: http://stackoverflow.com/q/27250504
score: 0
type: Comment

buttonclick
type: Tag
tag name: buttonclick
tags question: http://stackoverflow.com/q/27296236

http://stackoverflow.com/comment/42814619
type: AnswerComment
has text: I'm not sure to understand your question. Do you want to create an arrow with some text IN it ? If yes, I think the simplest way is to create an image of that.
type: Comment
comment on: http://stackoverflow.com/a/27160365
score: 1

http://stackoverflow.com/comment/42841102
type: QuestionComment
has text: http://jsfiddle.net/kbdgmtor/3/ - Thats more like it.
comment on: http://stackoverflow.com/q/27173204
score: 0
type: Comment

http://stackoverflow.com/comment/43002788
type: Comment
has text: I was wondering about that too, why would you want to match the hyphen?
comment on: http://stackoverflow.com/a/27265651
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42957552
type: Comment
comment on: http://stackoverflow.com/a/27240492
has text: This effectively achieves what I want, but I was thinking of something cooler where the position of the box on the right is always lined up to the equivalent position clicked on the left even if it doesn't run over. I can't explain this well at all...
type: AnswerComment
score: 0

http://stackoverflow.com/q/27278705
downvote count: 1
has body: HI i want to get nested table id based on text search.Please help me on this. i want to get id="nested1" by searching text "PCI Date". PCI Date New text
has comment: http://stackoverflow.com/comment/43026318
score: -1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43026471
favorite count: 0
has answer: http://stackoverflow.com/a/27278861
answer count: 1
type: UnansweredQuestion
has title: Get nested table id by searching td text

http://stackoverflow.com/comment/42886392
comment on: http://stackoverflow.com/q/27201492
type: Comment
type: QuestionComment
has text: download knockout.js and put it in the js dir?
score: 0

http://stackoverflow.com/a/27255808
has body: Edit, Updated Try (function($) { jQuery.fn.extend({ getPseudo: function(pseudo, prop) { var props = window.getComputedStyle( $(this).get(0), pseudo ).getPropertyValue(prop); return String(props); }, setPseudo: function(_pseudo, _prop, newprop) { var elem = $(this); var s = $("style"); var p = elem.getPseudo(_pseudo, _prop); var r = p !== "" ? new RegExp(p) : false; var selector = $.map(elem, function(val, key) { return [val.tagName , val.id ? "#" + val.id : null , val.className ? "." + val.className : null] }); var _setProp = "\n" + selector.join("") .toLowerCase() .concat(_pseudo) .concat("{") .concat(_prop + ":") .concat(newprop + "};"); return ((!!r ? r.test($(s).text()) : r) ? $(s).text(function(index, prop) { return prop.replace(r, newprop) }) : $(s).append(_setProp) ); } }) })(jQuery); i.e.g., initial css: .show-more:after { content : ' > '; } set pseudo element $(".show-more-after").on("click", function() { $(this).setPseudo(":after", "content", "'123'") }) github pseudo.js (function($) { jQuery.fn.extend({ getPseudo: function(pseudo, prop) { var props = window.getComputedStyle( $(this).get(0), pseudo ).getPropertyValue(prop); return String(props); }, setPseudo: function(_pseudo, _prop, newprop) { var elem = $(this); var s = $("style"); var p = elem.getPseudo(_pseudo, _prop); var r = p !== "" ? new RegExp(p) : false; var selector = $.map(elem, function(val, key) { return [val.tagName , val.id ? "#" + val.id : null , val.className ? "." + val.className : null] }); var _setProp = "\n" + selector.join("") .toLowerCase() .concat(_pseudo) .concat("{") .concat(_prop + ":") .concat(newprop + "};"); return ((!!r ? r.test($(s).text()) : r) ? $(s).text(function(index, prop) { return prop.replace(r, newprop) }) : $(s).append(_setProp) ); } }) })(jQuery); $(".show-more-after").on("click", function() { $(this).setPseudo(":after", "content", "'123'"); }) .show-more-after:after { content : ' > '; } click
downvote count: 0
upvote count: 8
type: Answer
score: 8
answers question: http://stackoverflow.com/q/27254674
has comment: http://stackoverflow.com/comment/101455315

http://stackoverflow.com/comment/42864264
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27188795
score: 0
has text: Try using `parent`. It may cause a *CORS* exception as well.

http://stackoverflow.com/a/27157395
score: 1
upvote count: 1
has body: sessionStorage can only store strings. You are storing the stringified versions of the arrays, and then looping over the characters in them when you pull them back out. Serialise the data to JSON before storing it, and parse it with a JSON parser when you read it back.
downvote count: 0
answers question: http://stackoverflow.com/q/27157181
type: Answer

http://stackoverflow.com/comment/43031947
score: 0
has text: I've updated my comment with a jsfiddle illustrating the problem.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27281502

http://stackoverflow.com/comment/43067257
type: AnswerComment
has text: I know that you are replicating OP answer as close as possible, but might be better to add these functions to the constructor prototype. e.g. b.prototype.name = function..., a.prototype.last = lastfunc, a.prototype.first = function...
comment on: http://stackoverflow.com/a/27301897
type: Comment
score: 0

http://stackoverflow.com/a/27186212
downvote count: 1
has comment: http://stackoverflow.com/comment/42859809
answers question: http://stackoverflow.com/q/27186069
has comment: http://stackoverflow.com/comment/42860623
score: -1
has comment: http://stackoverflow.com/comment/42859896
has comment: http://stackoverflow.com/comment/42859855
has comment: http://stackoverflow.com/comment/42859803
has comment: http://stackoverflow.com/comment/42859766
upvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42859920
has comment: http://stackoverflow.com/comment/42859519
has comment: http://stackoverflow.com/comment/42860543
has comment: http://stackoverflow.com/comment/42859625
type: Answer
has body: Try this: officeUIApplication.directive('tabsContainer', function($timeout) { var functionLink = function(scope, element, attrs) { $timeout(function() { element.ribbon(); }); }; return { restrict: 'E', link: functionLink }; }); jQuery plugins usually require the DOM to be ready for it to initialize properly. In angular, there is no real concept of DOM ready. $timeout is executed after the render phase, which is why it works.
has comment: http://stackoverflow.com/comment/42859594
has comment: http://stackoverflow.com/comment/42859356
accepted answer of: http://stackoverflow.com/q/27186069

http://stackoverflow.com/a/27301915
answers question: http://stackoverflow.com/q/27301821
has comment: http://stackoverflow.com/comment/43067346
score: 2
downvote count: 0
has body: function a(){ } a.prototype.last=function(){ return 'bbbb' } function b(){ this.name= a.prototype.last()//call method last of constructor a. } var person= new b(); console.log(person.name) //bbbbb
type: Answer
has comment: http://stackoverflow.com/comment/43067428
upvote count: 2

http://stackoverflow.com/a/27269193
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27269018
has body: sum.call(null, 1,2,3,4); or sum.call(window, 1,2,3,4); both are same thing... you will be get in this as ref inside function. sum.call(null, 1,2,3,4); function sum (a, b, c, d) { console.log(this); // null in this variable return a+b+c+d; } If you need to use ref in function then pass in first param in .call() function. According your question sum.call(null, 1,2,3,4); will fast because window ref always big size from null that you have passed as function ref in loop and more efficient will be call function direct as sum(1,2,3,4) because it exclude reduce one global ref object from function call. Speed test results demo
has comment: http://stackoverflow.com/comment/43017546
has comment: http://stackoverflow.com/comment/43024606

http://stackoverflow.com/q/27164572
answer count: 2
tagged with: javascript
tagged with: jquery
upvote count: 3
has comment: http://stackoverflow.com/comment/42821940
has body: I have two webpages internal.html and external.html I have the following piece of code in internal.html which loads external.html into div with id "result" &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; function autoRefresh_div() { $("#result").load("https://abc/external.html");// a function which will load data from other file after x seconds } setInterval('autoRefresh_div()', 5000); // refresh div after 5 secs &lt;/script&gt; I have a div with id "test" in external.html. How do I load only the div with id "test" of external.html into internal.html's div with id "result" and not the entire page?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27164640
accepted answer: http://stackoverflow.com/a/27164640
possible better answer: http://stackoverflow.com/a/27164611
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27164611
downvote count: 0
has title: How to load the div of another webpage and not the entire page into my webpage?
type: Question
score: 3

http://stackoverflow.com/q/27292508
possible better answer: http://stackoverflow.com/a/27292706
has comment: http://stackoverflow.com/comment/43050404
score: 1
linked to: http://stackoverflow.com/q/4411306
has answer: http://stackoverflow.com/a/27292566
upvote count: 1
has body: I'm trying to animate the background color of a div onclick but it's simply not changing it: HTML &lt;div id="list2" onclick="changeCol();"&gt; color &lt;/div&gt; CSS #list2{ width:200px; height:100px; border:1px solid #ccc; background-color:#ccc} JQuery/JS function changeCol(){ alert('foo'); // testing function called $("#list2").animate({ backgroundColor: "#8bed7e" }, 500).animate({ backgroundColor: "#ccc" }, 500); } Any ideas why? Here's a fiddle
type: Question
linked to: http://stackoverflow.com/q/190560
has comment: http://stackoverflow.com/comment/71480499
tagged with: javascript
has answer: http://stackoverflow.com/a/42157972
has answer: http://stackoverflow.com/a/27292542
has answer: http://stackoverflow.com/a/27292754
has answer: http://stackoverflow.com/a/27292550
downvote count: 0
answer count: 7
tagged with: jquery
has answer: http://stackoverflow.com/a/27292577
favorite count: 0
has answer: http://stackoverflow.com/a/27292706
accepted answer: http://stackoverflow.com/a/27292550
has title: Animate element background color onclick
type: AnsweredQuestion

http://stackoverflow.com/q/27164254
has comment: http://stackoverflow.com/comment/42821134
has comment: http://stackoverflow.com/comment/42830564
has comment: http://stackoverflow.com/comment/42821132
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42821183
has comment: http://stackoverflow.com/comment/42830597
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42821117
has title: How do i call external javascript function/lines in html?
has comment: http://stackoverflow.com/comment/42821152
has comment: http://stackoverflow.com/comment/42821200
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has body: In the javascript file i have this code: $(function() { $('#carousel span').append(' '); $('#thumbs a').append(' '); $('#carousel').carouFredSel({ responsive: true, circular: false, auto: true, infinite: true, items: { visible: 1, width: 200, height: '56%' }, scroll: { fx: 'directscroll', pauseOnHover: true, duration: 500 } }); $('#thumbs').carouFredSel({ responsive: true, circular: false, infinite: false, auto: false, prev: '#prev', next: '#next', items: { visible: { min: 2, max: 6 }, width: 150, height: '66%' } }); $('#thumbs a').click(function() { $('#carousel').trigger('slideTo', '#' + this.href.split('#').pop() ); $('#thumbs a').removeClass('selected'); $(this).addClass('selected'); return false; }); }); I want that when the pauseOnHover execute that something will happen in the html file. In the html file i included the javascript file already: Also added some style code for the test: And when the pauseOnHover execute happen in the javascript file i want to display on screen this two lines in the html file: Lorem ipsum dolor Lorem ipsum_for_testing dolor

http://stackoverflow.com/a/27304439
downvote count: 0
has comment: http://stackoverflow.com/comment/43071887
type: AcceptedAnswer
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43074772
accepted answer of: http://stackoverflow.com/q/27304281
score: 1
answers question: http://stackoverflow.com/q/27304281
has body: is this what you need ? http://jsfiddle.net/u3qtt6fo/11/ I edited your code a little, I added jQuery selector "animated" $("a").click(function () { var page = $(this).data("page"); if ($('div:animated').id != page) { var active = $(".fold.active"); // if there is visible fold element on page (user already clicked at least once on link) if (active.length) { active.animate({ width: "0" }, 200) .animate({ height: "0" }, 200, function () { // this happens after above animations are complete $(this).removeClass("active"); }) // clicking for the first time } else { $("#" + page) .addClass("active") .animate({ height: "500px" }, 1000, 'linear') .animate({ width: "500px" }, 400, 'linear') } } });

http://stackoverflow.com/comment/43094546
type: QuestionComment
has text: @JoachimRohde My question isn't about geocoding, which is the conversion from address into lat/long coordinates. I'm not getting a response at all for a search for a restaurant called "The wedge", but google maps gets four results.
type: Comment
comment on: http://stackoverflow.com/q/27304976
score: 0

http://stackoverflow.com/comment/42859523
score: 0
has text: Does it have anything to do with the fact that I get my sensorNumber from the database where it is designed as an int?
type: AnswerComment
comment on: http://stackoverflow.com/a/27185488
type: Comment

http://stackoverflow.com/q/27270537
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: Insert script to the loaded iframe
has body: I am trying to insert script to the loaded iframe. Tried this without any luck; document.write('&lt;iframe src ="http://example.com/" width ="100" height ="100"&gt; &lt;/iframe&gt;'); document.getElementsByTagName('iframe')[0].onload = function() { var curInnerHTML = document.body.innerHTML; curInnerHTML = curInnerHTML.replace("&lt;/a&gt;", "&lt;/a&gt;&lt;scr" + "ipt&gt; document.write='Hi.......';&lt;/sc" + "ript&gt;"); document.body.innerHTML = curInnerHTML; } What is the correct way to do that ?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27270851

http://stackoverflow.com/a/27263058
score: 0
answers question: http://stackoverflow.com/q/27261792
has body: Your biggest lag is primarily to do with having to constantly repaint things. If you use the Chome devtools timeline feature, you will see that comparatively little time is spent running script, most is spent painting, which takes a long time, because it repaints the entire document. So your major technique to speed things up is to try and figure out how to eliminate some of those redundant repaints. One small thing you can do to minimise any sluggishness AngularJS is causing is to use the ng-model-options attribute on the input to set a debounce delay. This is because otherwise, AngularJS runs a full $digest() loop of the whole scope tree for the application any time a key is pressed. Theoretically, that shouldn't take long with so few angular things going on, but it can be more heavy-handed than you would like. However, when I added this myself, there was still a delay in typing fast and seeing the characters show up, but it wasn't quite as bad as without it. (I used a debounce value of 10 ms, but experiment with it yourself).
type: Answer

http://stackoverflow.com/comment/42842828
score: 0
type: Comment
type: QuestionComment
has text: maybe you should do var slideName="images/img" + titles[++index] + ".jpg";
comment on: http://stackoverflow.com/q/27176778

http://stackoverflow.com/comment/43057056
score: 0
type: AnswerComment
has text: add `<%@ page contentType="text/html;charset=UTF-8" language="java"%>` to the top of your jsp file. If it's not work either please post your jsp file.
type: Comment
comment on: http://stackoverflow.com/a/27295549

http://stackoverflow.com/q/27169469
has body: Problem: I have a asp.net button and on click of that I am displaying another window using window.open() at the client side using "I actually, need a popup (alert message) to be displayed on my parent page where my button is located once the user closes the child window." Couple of things I tried are as follows: I tried using setTimeOut() to have a time out for some milliseconds. This does not work as the control is not waiting until the time out is complete. It just proceeds to execute next set of code. I tried using setInterval() but for some reason it is not working for me. Below is the code snippet of that: $(document).ready(function () { $('#<%=btnClick.ClientID%>').bind('click', function () { var newWindow = window.open("http://www.google.com/", "google", 'resizable=1,width=900,height=800,scrollbars=1', '_blank'); newWindow.moveTo(0, 0); var test = setInterval(function (e) { if (newWindow.closed) { alert("HEYY"); clearInterval(test); __doPostBack("<%= btnClick.UniqueID %>", ""); } else { e.preventDefault(); } }, 5000); }); }); . I also tried making an ajax call to open the new window and make it async : false, it again did not help me.
type: UnansweredQuestion
type: Question
score: 0
has answer: http://stackoverflow.com/a/27169790
answer count: 1
tagged with: javascript
has title: Sequencing two action on a button click
tagged with: jquery
tagged with: asp.net
tagged with: jquery-events

http://stackoverflow.com/comment/42812714
has text: No, they do not refer to the ID's differently. If you have an example of that, please post it here. I don't think you're going to find that is the case. Making classes for just that reason is kind of silly when you could set the ClientIDMode at the application or machine level and then use ID's and not have to bother using classes inappropriately.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27159257

http://stackoverflow.com/comment/42849031
comment on: http://stackoverflow.com/q/27180203
score: 0
type: QuestionComment
has text: I'm sorry, but i'm not familliar with the debug console. Could i get some info on how to do it?
type: Comment

http://stackoverflow.com/comment/43035543
comment on: http://stackoverflow.com/q/27283508
score: 0
has text: you can provide your working click event that will explain better what you trying to do
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27224075
answers question: http://stackoverflow.com/q/27224004
accepted answer of: http://stackoverflow.com/q/27224004
has comment: http://stackoverflow.com/comment/42965233
has comment: http://stackoverflow.com/comment/42965189
has comment: http://stackoverflow.com/comment/42967066
has comment: http://stackoverflow.com/comment/42965668
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42929197
has body: Some issues there: You cannot use the same id on more than one element The for attribute on a label must refer to the form field that it relates to, not a div You don't need or want a for attribute on a label that contains the input it relates to This: document.getElementById("price"+z).value < "1.5" does a string comparison. If you want to compare numbers, remove the quotes from 1.5 and JavaScript's algorithm for < will convert the value string to a number before doing the comparison. Or, since the number is entered by a person, you may want to use parseInt(..., 10) to explicitly ensure that you parse it in base 10, although parseInt allows extra characters after the number. In your code, the first time an element's value is < "1.5", you do return false. That stops the loop. You might want to have a variable, isValid or similar, that you set true to start with and then set false when you find a problem, then return that. Your loop goes from 1 to 10 but you only have three priceN inputs. Rather than hardcoding loop limits, it's usually best to let the markup drive the code. The =1 in var z=1 is pointless if you do it again on the next line; similarly, declaring a variable twice is pointless When you find yourself repeatedly calling a function to get the same thing over and over and over again (document.getElementById("price"+z")), consider doing it only once and saving the result to a variable A few suggestions (see comments): Working example: // Change: Rewrote; also removed archaic <!-- comments, you don't need them function checkform ( form ) { // Get a list of all of the elements with the "price" class var list = document.querySelectorAll(".price"); var z; var input; var isValid = true; var value; // Loop through the list for (z = 0; z < list.length; ++z) { console.log("z = " + z); // Get this input input = list[z]; // Check its value if (input.value != "" && parseInt(input.value, 10) < 1.5) { // Not valid, set border and flag that the form is invalid input.styl…
type: Answer

http://stackoverflow.com/a/27244286
has comment: http://stackoverflow.com/comment/42965628
upvote count: 1
has comment: http://stackoverflow.com/comment/42964961
has body: after changing the content(you have not mentioned that how they are getting added on page), You can simply use: $(".status span:contains(Out Of Stock)").css("color", "red"); Working Demo
has comment: http://stackoverflow.com/comment/42965145
has comment: http://stackoverflow.com/comment/42963864
accepted answer of: http://stackoverflow.com/q/27244269
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27244269
has comment: http://stackoverflow.com/comment/42963913
has comment: http://stackoverflow.com/comment/42965201
has comment: http://stackoverflow.com/comment/42965697
type: Answer
has comment: http://stackoverflow.com/comment/42963877
has comment: http://stackoverflow.com/comment/42963966
has comment: http://stackoverflow.com/comment/42964444
score: 1

http://stackoverflow.com/comment/42893553
type: QuestionComment
comment on: http://stackoverflow.com/q/27158744
score: 0
has text: @BGR: I don't understand this, why using callback function, if the function itself doesn't work?
type: Comment

http://stackoverflow.com/q/27219024
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has body: I'm running some programming example's and the server send me this message: [WARN]Unable to parse json returnde by the server. I'm using xampp stack in ubuntu 14.04, the warning points to the file ext-all.js, the page can't connect with the database. please help!! the code is in the ext-all.js file! i didn't touch the file!
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Unable to parse json returned by the server, in file ext-all.js
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42943415
has comment: http://stackoverflow.com/comment/42918541
tagged with: extjs
has comment: http://stackoverflow.com/comment/42929032

http://stackoverflow.com/comment/43012780
has text: I guess we need to use something like this.. var validator = $( "#From" ).validate(); validator.showErrors({ "From": "Please enter a valid date " });
comment on: http://stackoverflow.com/a/27256302
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27240459
has comment: http://stackoverflow.com/comment/42957542
has answer: http://stackoverflow.com/a/27240523
has answer: http://stackoverflow.com/a/27240540
has comment: http://stackoverflow.com/comment/42957584
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5468350
has body: I created a script when you can buy shirts, pants, etc.... The problem I am having is that when I run this script on my website it works perfectly. However, when I run it using JSFiddle, it doesn't work at all. I don't understand what I am dong wrong and I have other scripts on fiddle that work fine. I would appreciate it if someone can take a look at it and tell me where I made a mistake. Thank You. JS Fiddle - http://jsfiddle.net/rissandimo/Lo6jsuvu/ My Website - http://omidnassir.com/programs/shirts/shirts.html
has comment: http://stackoverflow.com/comment/42957437
tagged with: javascript
has comment: http://stackoverflow.com/comment/42957631
type: Question
score: 0
answer count: 2
has title: javascript calculation using jsfiddle

http://stackoverflow.com/comment/43039113
has text: @Felix Kling: But if that's the case, I believe in V8 engine you will see the output of `Object.keys(process)` to have `"constructor"`, however that's not the case.
comment on: http://stackoverflow.com/q/27285716
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27264860
tagged with: extjs
has answer: http://stackoverflow.com/a/27371780
accepted answer: http://stackoverflow.com/a/27371780
upvote count: 1
has title: ExtJS 5 - Dynamically add items to split button menu from store
type: AnsweredQuestion
has body: I want to associate a store to split button menu. I am using extjs version 5. I have searched on the web and even went through sencha documentation but I couldn't figure out a way to achieve this. Currently i'm holding the menu details in variable and assigning it to the splitbutton xtyoe menu property.I want to achieve the same using store, your help is much appreciated! Program Code:- var menuJSON = [{ text:'Menu1', menu:[{text:'Submenu1'},{text:'Submenu2'}] },{ text:'Menu2', menu:[{text:'Submenu1'},{text:'Submenu2'}] },{ text:'Menu3', menu:[{text:'Submenu1'},{text:'Submenu2'}] },{ text:'Menu4' },{ text:'Menu5', menu:[{text:'Submenu1'},{text:'Submenu2'}] }]; { region: 'south', fbar: [{ xtype:'splitbutton', id: 'app-starterMenu', text:'Start', scale:'small', iconCls:'icon-start', menuAlign: 'bl-tl', menu: menuJSON }] } Thanks in advance!
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/42844030
has text: If the answer works, don't downvote it unless you comment on it to explain your issue. They call that "basic civility".
comment on: http://stackoverflow.com/a/27177555
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42981745
comment on: http://stackoverflow.com/a/27253831
has text: Would it therefore be safe to use: `(function($) { $(document).ready(function() { $target.append(' New Text '); }); }(jQuery));` or would something like `(function( $ ) { var doSomeStuff = function() { var $target = $('div.target'); if ( $target.get(0) ) { $target.append(' New Text '); } }; $(document).ready(function() { doSomeStuff(); }); }( jQuery ));` Be better? Or would the latter be overkill?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27240537
upvote count: 1
answers question: http://stackoverflow.com/q/27240511
type: Answer
downvote count: 0
score: 1
has body: You need to include the jQuery UI plugin in your HTML in order to animate colors: The stylesheet is optional but you need the JS file. Also, make sure you include the UI module after jQuery itself. See an updated JSFiddle.

http://stackoverflow.com/q/27262635
tagged with: api
has comment: http://stackoverflow.com/comment/43007685
downvote count: 0
tagged with: javascript
tagged with: google-calendar-api
score: 1
favorite count: 0
has body: I am trying to insert an event in google calendar using google calendar api v3. I created add_event view in which form is display with various fields. I am passing data to controller using post method to insert_event method. I am receiving data but its not inserting an event. I think problem in this line : if ($client->getAccessToken()) { Someone explain me whats wrong? welcome.php // CI controller <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Welcome extends CI_Controller { public function index() { echo 'Google Calendar API EXA'; //$this->load->view('welcome_message'); $this->load->view('add_event'); $this->load->helper('url'); error_reporting(E_ALL); ini_set('display_errors', 'On'); //including google calendar api set_include_path(get_include_path() . PATH_SEPARATOR . $_ENV['OPENSHIFT_REPO_DIR']); include('application/libraries/google-api-php-client-exa/autoload.php'); include('application/libraries/google-api-php-client-exa/src/Google_Client.php'); include('application/libraries/google-api-php-client-exa/src/contrib/Google_CalendarService.php'); session_start(); if ((isset($_SESSION)) && (!empty($_SESSION))) { echo " ".'There are cookies'." "; echo " "; print_r($_SESSION); echo " "; } $client = new Google_Client(); $client->setApplicationName("Test Product"); $client->setClientId('its secret'); $client->setClientSecret('its secret'); $client->setRedirectUri('https://googlecalendar-apiexa.rhcloud.com/'); $client->setDeveloperKey('its secret'); $client->setUseObjects(true); $cal = new Google_CalendarService($client); if (isset($_GET['logout'])) { echo " Logging out"; unset($_SESSION['token']); } if (isset($_GET['code'])) { echo " Google APi= " . $_GET['code']; $client->authenticate($_GET['code']); $_SESSION['token'] = $client->getAccessToken(); header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); echo " I got the token = " . $_SESSION['token']; // <-- not needed to get here unless location uncommented } if (i…
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: calendar
tagged with: php
has title: Google Calendar API V3 insert event method
type: Question

http://stackoverflow.com/comment/42887367
score: 0
comment on: http://stackoverflow.com/a/27202069
has text: In that case he will have to implement custom formatting as I have suggested.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27286206
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/53717783
has answer: http://stackoverflow.com/a/27288832
tagged with: tracking
score: 1
tagged with: wordpress
has title: How to disable Google Analytics pageviews tracking but keep event tracking?
upvote count: 1
type: Question
tagged with: google-analytics
has body: I have a WordPress plugin which bloggers can opt-in for tracking. The data is used to improve the UX in yhe plugin's management dashboard settings pages. Since we are only interested to track some button click events and don't really need the "pageviews" tracking, is there any way to tell Google to disable the pageviews tracking? I want to respect the publishers privacy as much as I can, and if there's no reason to track pageviews I would prefer to block it.
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42921774
type: Comment
has text: Still not following. I don't know much about js and have a read-from-a-book teacher for a required class. He hasn't taught us anything all semester and tomorrow expects a group project. I'm trying to put together this page. I tried to copy a js form and using the provided instructions tried to mod it, but i cant make heads or tails of any of it. I've spent over five hours trying to figure it out and trying to learn and understand this mess on my own.
type: AnswerComment
comment on: http://stackoverflow.com/a/27221449
score: 0

http://stackoverflow.com/comment/42997284
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27262175
type: AnswerComment
has text: Great! I think this is close to what I want. One more question - what if I wanted to add a whole new set? I can't seem to do activeUser.push({sets: [{reps: [{laps: lapList}]}]}); Here is a fiddle - http://jsfiddle.net/bL9Lfyyy/

http://stackoverflow.com/comment/42836940
comment on: http://stackoverflow.com/a/27165512
type: AnswerComment
has text: yes..it is.. i just googled about the error. Its due to some loading problem. So, i echoed the javascript code in php just under the div. Now im not getting any error but again its not working.
score: 0
type: Comment

http://stackoverflow.com/q/27204198
has comment: http://stackoverflow.com/comment/42891948
has comment: http://stackoverflow.com/comment/42891562
has comment: http://stackoverflow.com/comment/42891433
tagged with: javascript
has answer: http://stackoverflow.com/a/27204598
tagged with: controller
has comment: http://stackoverflow.com/comment/42891299
score: 0
has body: I can't find the mistake in my application. The error stack that i receive is this one: Error: [ng:areq] Argument 'RepoController' is not a function, got undefined Here is the code of app.js (function() { var app = angular.module('gitHubViewer',["ngRoute"]); app.config(function($routeProvider) { $routeProvider.when("/main", { templateUrl: "main.html", controller: "MainController" }) .when("/user/:username", { templateUrl: "user.html", controller: "UserController" }) .when("/repo/:usermane/:reponame", { templateUrl: "repo.html", controller: "RepoController" }) .otherwise({ redirectTo:"/main" }); }); }()); here is the code of the controller (function() { var module = angular.module('gitHubViewer'); var RepoController = function($scope, github, $routeParams) { var onRepoDetailsComplete = function(data) { $scope.issues = data; github.getRepoCotributors($score.username, $scope.reponame).then(onRepoCotributorsComplete,onError); }; var onRepoCotributorsComplete = function(data) { $scope.repoContribuors = data; }; var onError = function(reason) { $scope.error = reason; } $scope.username = $routeParams.username; $scope.reponame = $routeParams.reponame; github.getRepoDetails($score.username, $scope.reponame).then(onRepoDetailsComplete,onError); }; module.controller('RepoController',["$scope","github","$routeParams",RepoController]); }()); Can you please have a look becuase I really can't find teh mistake that I made. Regards Fabio
has comment: http://stackoverflow.com/comment/42891472
has title: AngularJS controller is not a function
has comment: http://stackoverflow.com/comment/42891078
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42891892
accepted answer: http://stackoverflow.com/a/27204598
has comment: http://stackoverflow.com/comment/42891550
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42891880
type: Question
has comment: http://stackoverflow.com/comment/42891273

http://stackoverflow.com/q/27216892
has comment: http://stackoverflow.com/comment/42914058
answer count: 2
has body: I'm fascinated by this diagram and am curious how I would write the logic in Javascript. For example, I choose porcelain for skin type, ash blonde for hair and grey for eyes. The Light Summer color palette (light green) would bode well for me because there's a match of light green across each type. So far, I have stored all the color palettes in an array and assigned each skin/hair/eye variables with an object with its corresponding color dots. Is there a better way to approach this then what I've got? Thanks! You'll be the first to try out my app when it's done :)
downvote count: 0
has answer: http://stackoverflow.com/a/27217044
tagged with: javascript
has title: Compare variables that correspond to a result in Javascript
favorite count: 0
tagged with: logic
has answer: http://stackoverflow.com/a/27217193
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1

http://stackoverflow.com/comment/43051780
has text: Have you used `console.log` to show the results for both `.getTime()` functions?
comment on: http://stackoverflow.com/q/27293347
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42930405
comment on: http://stackoverflow.com/a/27226072
score: 0
type: AnswerComment
type: Comment
has text: thanks for quick answer. My focus is more on why the code seems to be not so fare. Where's the problem... is it possible that v8 is doing some optimization after first run or something like that ?

http://stackoverflow.com/q/27204733
accepted answer: http://stackoverflow.com/a/27224625
has comment: http://stackoverflow.com/comment/42996170
tagged with: code-conversion
type: Question
has comment: http://stackoverflow.com/comment/42909113
tagged with: javascript
has comment: http://stackoverflow.com/comment/42892255
tagged with: actionscript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27224625
has comment: http://stackoverflow.com/comment/42892055
has body: I've stumbled upon Jangaroo, and it seems to provide what i need. The problem is that to use it the docs say that i need to setup maven. I really have a single function, so all that is a bit of an overkill. The ideal solution would be something similar to the Telerik Code Converter(http://converter.telerik.com), but for AS3.
has comment: http://stackoverflow.com/comment/42964723
has comment: http://stackoverflow.com/comment/42893076
type: AnsweredQuestion
has title: How do I use Jangaroo to convert a single As3 function to javascript?

http://stackoverflow.com/a/27196204
has body: That's called a source map. This answer goes into detail about what they are, how they work, and why you would want to use it. EDIT Extracted answer from the above SO link for posterity. Answered by @aaronfrost The .map files are for js and css files that have been minified. They are called SourceMaps. When you minify a file, like the angular.js file, it takes thousands of lines of pretty code and turns it into only a few lines of ugly code. Hopefully, when you are shipping your code to production, you are using the minified code instead of the full, unminified version. When your app is in production, and has an error, the sourcemap will help take your ugly file, and will allow you to see the original version of the code. If you didn't have the sourcemap, then any error would seem cryptic at best. Same for CSS files. Once you take a SASS or LESS file and compile it to CSS, it looks nothing like it's original form. If you enable sourcemaps, then you can see the original state of the file, instead of the modified state. What is it for? To de-reference uglified code How can a developer use it? You use it for debugging a production app. In development mode you can use the full version of Angular. In production, you would use the minified version. Should I care about creating a js.map file? If you care about being able to debug production code easier, then yes, you should do it. How does it get created? It is created at build time. There are build tools that can build your .map file for you as it does other files. https://github.com/gruntjs/grunt-contrib-uglify/issues/71
upvote count: 7
score: 7
answers question: http://stackoverflow.com/q/27196117
downvote count: 0
type: Answer

http://stackoverflow.com/q/27201682
answer count: 1
has comment: http://stackoverflow.com/comment/42886869
has answer: http://stackoverflow.com/a/27201904
favorite count: 0
has comment: http://stackoverflow.com/comment/42893457
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42887615
tagged with: css
has title: Drawing links among words in a web page
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/42890194
downvote count: 1
has comment: http://stackoverflow.com/comment/42891398
type: Question
has body: I would like to know if something like this (see the picture above) is possible in HTML/CSS/Javascript and if so, what are the frameworks/technology that I should look at. I have a text in a HTML page and I would like to highlight some words in it using different colours according to different meanings (let's say 3 types, 'name of software': blue, 'numbers': grey, 'name of people: 'red'). Then, an this is the tricky part for me, I would like to draw directed arrows among these highlighted words in a way that resizing the window will automatically keep anchored the arrows regardless to the changed position of the words. Right now I am solving the highlighting part using a particular tag for the words to be highlighted and an ad-hoc CSS decorator with the property background colour accordingly set. The linking part is literally a mystery for me. I thank you all for your help, michele. PS. I would prefer doing that on the client side.
has comment: http://stackoverflow.com/comment/42886809
tagged with: javascript
has comment: http://stackoverflow.com/comment/42904955

http://stackoverflow.com/comment/43028497
type: Comment
type: QuestionComment
has text: here it is https://ssl5929.websiteseguro.com/sbpsp2/psicorreio/emailmarketing/2015/teste/ficha_inscricao.php
comment on: http://stackoverflow.com/q/27279826
score: 0

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/27292521
tag name: sequelize.js

http://stackoverflow.com/a/27308838
has comment: http://stackoverflow.com/comment/43082031
has comment: http://stackoverflow.com/comment/43079896
answers question: http://stackoverflow.com/q/27308498
has body: UPDATED :replace internal part of data( 'ui-autocomplete' )._renderItem = function( ul, item ) { to this: var elemHTML = $('').attr('href', item.url); elemHTML.append(' '); elemHTML.append('' + item.title + ''); // alert($('body').find('ul').hasClass("my_result")); if($("ul").hasClass("my_result")){ // console.log('if'); return $('ul').append($( ' ' ) .append( elemHTML ).append(' ')); }else{ // console.log('else'); return $(' ').append($( ' ' ) .append( elemHTML ).append(' ')).appendTo('body'); } it should work for you.
has comment: http://stackoverflow.com/comment/43079871
has comment: http://stackoverflow.com/comment/43079540
score: 0
has comment: http://stackoverflow.com/comment/43080018
type: Answer
has comment: http://stackoverflow.com/comment/43079625

http://stackoverflow.com/comment/42852257
comment on: http://stackoverflow.com/q/27182126
type: Comment
type: QuestionComment
has text: Open your Developer Tools, take a look what requests are made to get at the data.
score: 4

http://stackoverflow.com/comment/59574267
has text: This means audio playback is stopped, which is not the same as muted
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27443401
type: Comment

http://stackoverflow.com/a/27267452
type: Answer
has body: You can change var caption = item.value || item.caption || item.snippet; line at https://github.com/ajaxorg/ace/blob/v1.1.8/lib/ace/autocomplete.js#L449 to var caption = item.caption || item.value || item.snippet; You can also implement custom insertMatch method on completer https://github.com/ajaxorg/ace/blob/v1.1.8/lib/ace/autocomplete.js#L181, but making a pull request with first option is better
accepted answer of: http://stackoverflow.com/q/27245959
answers question: http://stackoverflow.com/q/27245959
has comment: http://stackoverflow.com/comment/43019338
score: 0
has comment: http://stackoverflow.com/comment/43025446
type: AcceptedAnswer

http://stackoverflow.com/q/27245332
accepted answer: http://stackoverflow.com/a/27253493
favorite count: 0
has comment: http://stackoverflow.com/comment/42977152
tagged with: node.js
type: AnsweredQuestion
has title: Async function depends on a external module in Protractor test
upvote count: 1
has comment: http://stackoverflow.com/comment/42965964
type: Question
has answer: http://stackoverflow.com/a/27253493
has comment: http://stackoverflow.com/comment/42976958
has body: I want to save the image file which is in remote web server, and upload it to another server in Protractor Test. // depend on a external module var fs = require('fs'); // save remote file(url) to local(dest) var download = function (url, dest) { // let this function be async browser.executeAsyncScript(function (url, dest, done) { var file = fs.createWriteStream(dest); var request = http.get(url, function (response) { response.pipe(file); file.on('finish', function () { file.close(done); }); }); }, url, dest); }; describe('', function () { it('', function () { browser.get('http://...'); download('http://.../foo.jpg', 'foo.jpg'); /*** DOESN'T WORK! ***/ var absolutePath = path.resolve(__dirname, 'foo.jpg'); $('input[type=file]').sendKeys(absolutePath); $('#uploadButton').click(); ... but this doesn't work: Stacktrace: UnknownError: javascript error: fs is not defined When I put var fs = require('fs'); in download function, the error message is below: Stacktrace: UnknownError: javascript error: require is not defined
tagged with: protractor
tagged with: javascript
has comment: http://stackoverflow.com/comment/42977001
tagged with: webdriver-io
downvote count: 0
answer count: 1
score: 1

http://stackoverflow.com/comment/42823464
has text: Check it out http://stackoverflow.com/questions/6515502/javascript-form-submit-confirm-or-cancel-submission-dialog-box
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27165686

http://stackoverflow.com/a/30662011
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27193160
answers question: http://stackoverflow.com/q/27193160
score: 0
has body: After investigation and the help of MikeSmithDev (thanks Mike - your help was invaluable), it appears as though the 'today' event only gets triggered if it physically positioned below/after the calendar, the rest of the header controls (button.fc-next-button etc) don't seem to mind where they are physically positioned. Likely the first function executes before the calendar is finished loading... so it works, there is just no button to bind it to.

http://stackoverflow.com/q/27301176
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27301340
type: UnansweredQuestion
tagged with: ember.js
has title: Handlebar.helper's view cannot use actions from controller
tagged with: model-view-controller
has body: How do I call an action that is inside a controller from a view that uses a handlebar helpers (not sure if the handlebar helper is relevant to getting the controller but I wanted to mention it anyway)? VpcYeoman.EditRecordCategoryView = Ember.TextField.extend({ //This is where i call the action from any controller click: function() { // might be a property or some other action this.get('controller').send('controllerActionName'); } }); Ember.Handlebars.helper('edit-recordCategory', VpcYeoman.EditRecordCategoryView); What would I do inside of that view to tell a controller that I want it to activate one of its actions? Edit 1: I added this.get('controller').send('controllerActionName'); to click:function(){}, and I receive the error Uncaught TypeError: undefined is not a function on that line of code. If I add this.get('controller').send('controllerActionName'); to didInsertElement: function(), i dont get any error at all. Edit 2: The handlebar helper is located in a list that uses an object controller named recordType. 'recordType' is where that action is that I'm looking to call from the handlebar help's click event. However in record_types.hbs {{#each itemController="recordType"}} {{#unless isEditing}} {{categoryName}} &amp;nbsp; {{/unless}} {{#if isEditing}} {{edit-recordCategory class="edit" value=category_name focus-out="acceptChanges" insert-newline="acceptChanges"}} //This is the handlebar helper {{/if}} {{/each}} We can assume that the isEditing property in the record is true since the handlebar helper will not be visible if it is false. Actually the action in the controller of my project is meant to toggle that property isEditing.
tagged with: handlebars.js
type: Question

http://stackoverflow.com/q/27228780
tagged with: javascript
has title: Email validation solution for front and backend
has body: We have to do email validation and there are a large number of solution. The email is not the primary email we are using across site so we are not planning on sending a email and verifying the account. Hence we we are relying on regex based validation solution. Now doing regex based validation in server-side(java) is generally discouraged and we are advised to use existing solution like EmailValidator or existing libraries. Now the problem is to achieve consistency between front end validation(which would be regex based and implemented in javascript) and backend implementation (which will be in java). Is there a solution to achieve consistency between these validation on front-end and backend automatically.
tagged with: validation
answer count: 1
tagged with: email
downvote count: 0
favorite count: 0
tagged with: regex
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42959461
type: UnansweredQuestion
tagged with: java
type: Question
has answer: http://stackoverflow.com/a/27228931

http://stackoverflow.com/comment/43018881
score: 0
type: Comment
has text: @user1523591 I don't myself knew about this till you asked this question. Glad to have helped you by the way :)
comment on: http://stackoverflow.com/a/27274248
type: AnswerComment

http://stackoverflow.com/comment/46713798
type: QuestionComment
score: 1
has text: Refer - http://stackoverflow.com/questions/26155019/facebook-php-sdk-v4-0-facebookjavascriptloginhelper-return-state-null
comment on: http://stackoverflow.com/q/27296633
type: Comment

datamapper
tag name: datamapper
tags question: http://stackoverflow.com/q/27269334
type: Tag

http://stackoverflow.com/comment/85704586
comment on: http://stackoverflow.com/a/33227005
type: AnswerComment
score: 0
type: Comment
has text: <use id=#foo> are the kind of _local_ references I meant... no downloading needed... but gathering of more text to serialize. Maybe if the references were non-local, the URLs would then work!?

http://stackoverflow.com/comment/56414317
score: 1
comment on: http://stackoverflow.com/a/27174391
type: AnswerComment
type: Comment
has text: Works like a charm! I had a minor issue of it returning an _undefined_ value, but adding a `ng-model-options="{ allowInvalid: true }"` to my html solved it

http://stackoverflow.com/comment/43048648
type: QuestionComment
has text: Get the table working with datatables (which will do pagination for you) and then you can ask a question with example code and take it from there.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27291353

http://stackoverflow.com/comment/43034166
type: AnswerComment
comment on: http://stackoverflow.com/a/27282321
score: 0
type: Comment
has text: I don't think there is an *official* name spacing convention in this case. However, I'd personally say that is is a level of over-optimization. I'd pick a reasonable function name and let it be. If you get complaints that yours conflicting then think about name spacing. You could also develop some kind of testing wrappers kinda like `noConflict()` does; but again that's a bit of pre-optimisation that you may not need. Finally, if this is something your going to use in your own project then you can manage conflicts as needed. Name spacing is more for public libraries concern (again as needed).

http://stackoverflow.com/a/27177995
has body: You can store information on the client safely if the server is delivering it. You can encrypt or sign the data using a secret key which only the server knows and decrypt/validate the information using it. However, by definition, you cannot store information safely which is also generated on the client itself. It's just the client playing with itself. Anyone can inspect what exactly is going on, so you can't sign or encrypt anything using any secret key, because by definition the key ceases to be secret if you give it to every client. You can also not trust any information the client is sending to the server because the client is free to send anything to the server it wishes. You cannot trust any code running on the client because it is entirely out of your control.
has comment: http://stackoverflow.com/comment/42871970
upvote count: 1
has comment: http://stackoverflow.com/comment/42871666
downvote count: 0
answers question: http://stackoverflow.com/q/27177224
type: Answer
has comment: http://stackoverflow.com/comment/42845004
score: 1

http://stackoverflow.com/comment/42849499
type: Comment
type: QuestionComment
has text: Jquery is a javascript library. You can read about it [here](http://api.jquery.com/)
comment on: http://stackoverflow.com/q/27180490
score: 0

http://stackoverflow.com/q/27188108
type: Question
tagged with: angular-ngmodel
has comment: http://stackoverflow.com/comment/42862652
tagged with: forms
score: 0
answer count: 1
tagged with: javascript
has body: The date not binding in to the input[type=date] (function(){ var app = angular.module('tableApp',[ ]); app.controller('tableController', function($scope){ $scope.items = [ { date: '12-March-2013', rate: 12.35, name: 'Konu konu'}, { date: '1-January-2011', rate: 60.54, name: 'Maanu meenu'}, { date: '12-December-2014', rate: 12.56, name: 'Konu konu'}, { date: '14-November-2014', rate: 0.99, name: 'Konu konu'}, { date: '2-November-2014', rate: 4.00, name: 'Konu konu'}, { date: '16-February-2014', rate: 6.54, name: 'Konu konu'}, { date: '30-November-2014', rate: 60.32, name: 'Konu konu'}, { date: '5-May-2014', rate: 5.12, name: 'Konu konu'}, { date: '12-April-2014', rate: 8.99, name: 'Konu konu'}, { date: '18-November-2014', rate: 34.54, name: 'Manjeri mmanjeri'}, { date: '28-June-2014', rate: 55.12, name: 'Konu konu'}, { date: '21-June-2014', rate: 99.54, name: 'Maanu meenu'}, { date: '31-December-2014', rate: 15.50, name: 'Maanu meenu'}, { date: '1-November-2014', rate: 34.05, name: 'Konu konu'}, { date: '3-November-2014', rate: 45.00, name: 'Maanu meenu'} ]; }); })(); Date Amount Member
tagged with: angularjs
has answer: http://stackoverflow.com/a/27188301
tagged with: http://stackoverflow.com/tag/html
has title: html5 type="date" do not show with ngmodel in AngularJS
type: UnansweredQuestion

http://stackoverflow.com/comment/42821710
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27164525
has text: or wait -- You want to append it after any `a` with class `parent`?

http://stackoverflow.com/a/27248341
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27218721
has body: A way to solve the problem is, to put the foreach part into a own function. You should also change the " and the '. Like this: function theme_output($url) { echo ' &lt;script type="text/javascript"&gt; var $products, $current_product = "default"; // List all the products here $products = { '; funct2($url); echo ' }; &lt;/script&gt;'; }; function func2($url) { $themes = array('cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'lumen', 'paper', 'readable', 'sandstone', 'simplex', 'slate', 'spacelab', 'superhero', 'united', 'yeti'); foreach ($themes as $theme) { echo $theme.' : { name : "'.ucfirst($theme).'", tag : "phpBB", img : "'.css_file($theme).'", url : "'.$url.'?theme='.$theme.'", purchase : "http://www.google.de", }, '; }; }
answers question: http://stackoverflow.com/q/27218721
type: AcceptedAnswer
upvote count: 1
type: Answer

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/27224715
tags question: http://stackoverflow.com/q/27276997

http://stackoverflow.com/comment/43059582
has text: 404 means that the requested path which is 'api/Customer/GetTest' does not exists in the asked server, can you check that path? Could you make a request from http client such as postman?
comment on: http://stackoverflow.com/a/27297270
score: 0
type: AnswerComment
type: Comment

asp.net
tags question: http://stackoverflow.com/q/27170004
tags question: http://stackoverflow.com/q/27189747
tags question: http://stackoverflow.com/q/27232239
tags question: http://stackoverflow.com/q/27287336
tags question: http://stackoverflow.com/q/27223512
tags question: http://stackoverflow.com/q/27227970
tags question: http://stackoverflow.com/q/27199031
tags question: http://stackoverflow.com/q/27252978
tags question: http://stackoverflow.com/q/27218679
tags question: http://stackoverflow.com/q/27309304
tags question: http://stackoverflow.com/q/27231536
tags question: http://stackoverflow.com/q/27273907
tags question: http://stackoverflow.com/q/27281186
tags question: http://stackoverflow.com/q/27172988
tags question: http://stackoverflow.com/q/27282731
tags question: http://stackoverflow.com/q/27272660
tags question: http://stackoverflow.com/q/27286463
tags question: http://stackoverflow.com/q/27167344
tags question: http://stackoverflow.com/q/27208611
tags question: http://stackoverflow.com/q/27190231
tags question: http://stackoverflow.com/q/27187778
tags question: http://stackoverflow.com/q/27268098
tags question: http://stackoverflow.com/q/27193147
tags question: http://stackoverflow.com/q/27208425
tags question: http://stackoverflow.com/q/27230360
tags question: http://stackoverflow.com/q/27199754
tags question: http://stackoverflow.com/q/27242992
tags question: http://stackoverflow.com/q/27304749
tags question: http://stackoverflow.com/q/27244517
tags question: http://stackoverflow.com/q/27211751
tags question: http://stackoverflow.com/q/27285114
tags question: http://stackoverflow.com/q/27181806
tags question: http://stackoverflow.com/q/27187360
tags question: http://stackoverflow.com/q/27188512
tags question: http://stackoverflow.com/q/27287734
tags question: http://stackoverflow.com/q/27258409
tags question: http://stackoverflow.com/q/27207063
tags question: http://stackoverflow.com/q/27235526
tags question: http://stackoverflow.com/q/27310286
tags question: http://stackoverflow.com/q/27159203
tags question: http://stackoverflow.com/q/27257364
tags question: http://stackoverflow.com/q/27167414
type: Tag
tags question: http://stackoverflow.com/q/27248022
tags question: http://stackoverflow.com/q/27249074
tags question: http://stackoverflow.com/q/27253648
tags question: http://stackoverflow.com/q/27191829
tags question: http://stackoverflow.com/q/27247923
tags question: http://stackoverflow.com/q/27185246
tags question: http://stackoverflow.com/q/27295247
tags question: http://stackoverflow.com/q/27199872
tags question: http://stackoverflow.com/q/27289851
tags question: http://stackoverflow.com/q/27173578
tags question: http://stackoverflow.com/q/27291879
tags question: http://stackoverflow.com/q/27275615
tags question: http://stackoverflow.com/q/27279870
tags question: http://stackoverflow.com/q/27228237
tags question: http://stackoverflow.com/q/27243572
tags question: http://stackoverflow.com/q/27243474
tags question: http://stackoverflow.com/q/27246560
tags question: http://stackoverflow.com/q/27256456
tags question: http://stackoverflow.com/q/27169469
tags question: http://stackoverflow.com/q/27277624
tags question: http://stackoverflow.com/q/27287512
tags question: http://stackoverflow.com/q/27222458
tags question: http://stackoverflow.com/q/27159518
tags question: http://stackoverflow.com/q/27189795
tags question: http://stackoverflow.com/q/27186027
tags question: http://stackoverflow.com/q/27229420
tags question: http://stackoverflow.com/q/27299266
tags question: http://stackoverflow.com/q/27266120
tags question: http://stackoverflow.com/q/27289138
tags question: http://stackoverflow.com/q/27266314
tags question: http://stackoverflow.com/q/27250655
tag name: asp.net
tags question: http://stackoverflow.com/q/27230860
tags question: http://stackoverflow.com/q/27296135
tags question: http://stackoverflow.com/q/27165468
tags question: http://stackoverflow.com/q/27289527
tags question: http://stackoverflow.com/q/27263736

http://stackoverflow.com/a/27261984
has comment: http://stackoverflow.com/comment/43008275
score: 1
upvote count: 1
downvote count: 0
has body: http://jsfiddle.net/u5sok220/2/ you must add class active to first item <img class="gal img-responsive" ... <img class="gal img-responsive" ... <img class="gal img-responsive" ... ...
has comment: http://stackoverflow.com/comment/43008371
has comment: http://stackoverflow.com/comment/43007163
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43006921
has comment: http://stackoverflow.com/comment/43005902
accepted answer of: http://stackoverflow.com/q/27260891
type: Answer
answers question: http://stackoverflow.com/q/27260891
has comment: http://stackoverflow.com/comment/43008110
has comment: http://stackoverflow.com/comment/43008369

http://stackoverflow.com/comment/42850032
type: QuestionComment
has text: Assuming you somewhere do a `$('#objectsButton').val("Objecten");` like you said in another comment, you could also do: `data: {objectsButton: $('#objectsButton').val()}`, if that value is somehow important in you php file.
comment on: http://stackoverflow.com/q/27180429
score: 0
type: Comment

http://stackoverflow.com/comment/42909729
score: 1
comment on: http://stackoverflow.com/q/27214718
type: Comment
type: QuestionComment
has text: "Equivalent to" is not the same as "the same as."

http://stackoverflow.com/q/27272977
tagged with: highcharts
tagged with: javascript
downvote count: 1
has body: Please help in creating 3D pie chart . I've a problem with loading the Json series. My code: jsfiddle.net/e39taLt5/1/ json file: ([["poludniowy","1040"],["poludniowo-zachodni","710"],["poludniowo-wschodni","692"],["zachodni","638"],["polnocno-zachodni","448"],["wschodni","80"],["","14"],["polnocno-wschodni","9"]])
favorite count: 0
accepted answer: http://stackoverflow.com/a/27273268
possible better answer: http://stackoverflow.com/a/27273178
has answer: http://stackoverflow.com/a/27273178
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27273268
score: 1
has title: Pie chart 3d json series
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
answer count: 2
tagged with: pie-chart

http://stackoverflow.com/comment/43073913
type: QuestionComment
comment on: http://stackoverflow.com/q/27305191
has text: I am trying that with Iframe.Can I download the iframe directly without using execCommand? Because Save As opens a new popup to save the file.I want it to be downloaded directly to the desktop
score: 0
type: Comment

http://stackoverflow.com/q/27239039
score: 0
tagged with: jquery-events
has title: event.preventDefault(); only works some of the time with submit form
answer count: 1
tagged with: jquery
tagged with: ajax
has body: I am using the Mailchimp API to submit a form. The goal is to prevent the default callback provided by Mailchimp. The majority of the time event.preventDefault() is behaving as it should. Then randomly it will not work: $(function () { var $form = $('#mc-embedded-subscribe-form'); $('#mc-embedded-subscribe').on('click', function(event) { if(event) event.preventDefault(); register($form); }); }); function register($form) { $.ajax({ type: $form.attr('method'), url: $form.attr('action'), data: $form.serialize(), cache : false, dataType : 'json', contentType: "application/json; charset=utf-8", error : function(err) { alert("Could not connect to the registration server. Please try again later."); }, success : function(data) { if (data.result != "success") { // Something went wrong, do something to notify the user. maybe alert(data.msg); var message = data.msg var messageSh = data.msg.substring(4); if (data.msg == '0 - Please enter a value' || data.msg == '0 - An email address must contain a single @') { $('#notification_container').html(''+messageSh+''); } else { $('#notification_container').html(''+message+''); } } else { // It worked, carry on... var message = data.msg; $('.popup-promo-container').addClass('thanks'); $('.checkboxes, #mc_embed_signup_scroll').addClass('hidden'); $('.complete-promo').html(message).removeClass('hidden'); setTimeout(function() { document.querySelector('.popup-promo').style.display = "none"; },20000); } } }); }
accepted answer: http://stackoverflow.com/a/27239062
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: forms
has answer: http://stackoverflow.com/a/27239062

http://stackoverflow.com/comment/42961799
has text: javascript isn't a library. jQuery is a javascript library.
type: Comment
comment on: http://stackoverflow.com/q/27242998
type: QuestionComment
score: 1

http://stackoverflow.com/q/27280335
has comment: http://stackoverflow.com/comment/43029752
tagged with: ajax
has title: .innerHtml text updates during script execution
has comment: http://stackoverflow.com/comment/43029836
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43029810
has body: I am confused as to why I cannot get text updates during a javascript/jquery/ajax execution. I have the following code. $("#updates").html("Collecting your team names."); YourTeamFirst(YourTeam, TeamValue); $("#updates").html("Collecting their team names."); TheirTeamNext(TheirTeam, TeamValue); $("#updates").html("Gathering ID's."); setNames(TeamValue); $("#updates").html("Setting Details."); setChampRatios(TeamValue); $("#updates").html("Setting Ratios."); setChampKDRS(TeamValue); $("#updates").html("Finished!"); i.e. Example function (the only ajax that occurs is in the sub-functions, the actual function calls and text updates are in a plain JS function, no ajax on that...) function TheirTeamNext(TheirTeam, TeamValue) { $.ajax({ url: "/PlayerLookUp/TheirRankedData", type: "POST", data: "IDList=" + T[i], dataType: "json", async: false, success: function (resp) { //just boring logic }, error: function (XMLHttpRequest, textStatus, errorThrown) { if (XMLHttpRequest.status == 0) { alert("Issue with reaching Riot API server. Pleast contact an Admin."); } } }); } And the only thing that ever appears is "Finished" (after the script is done), why won't anything else appear at all? The execution takes about 10 seconds so other updates should be popping up in the innerHtml/Html. I have also tried using document.getElementById("updates").innerHTML = ..., which also shows nothing then when its done will show the "Finished" text. Each function is either JQuery, Ajax, or javascript with a few back and forth's from my C# controller, but I feel like the text updates should still be updating my innerHtml text unless there is some script thing I am unaware of for innerHtml/Html... ALSO: If I toss in an alert() somewhere, the most previous text update will appear. So how come only an alert interruption or end of script execution will update/post my text. I would like my users to see updated messages on going with the script.
upvote count: 0
tagged with: innerhtml
type: AnsweredQuestion
score: -1
has comment: http://stackoverflow.com/comment/43029368
type: Question
has comment: http://stackoverflow.com/comment/43029400
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43029467
has comment: http://stackoverflow.com/comment/43029651
has answer: http://stackoverflow.com/a/27280368
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27280368
favorite count: 0

http://stackoverflow.com/a/27296101
upvote count: 1
has body: Because jQuery does not convert object in JSON string automatically. You can use JSON.stringify : data: JSON.stringify({ longUrl: "firec.at" }), Note that JSON.stringify is not available on all browsers. You may want to use a cross browser jQuery plugin to do that. By the way, it's look like you want to do a POST, so you may need to add this too : type : 'POST', By default, jQuery does a GET.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43056804
type: Answer
accepted answer of: http://stackoverflow.com/q/27295985
answers question: http://stackoverflow.com/q/27295985
score: 1

http://stackoverflow.com/comment/42958997
score: 0
type: Comment
has text: I agree Ajax is the way to go here. You can do many cool things like hide the form after it was submitted and display statistical data afterward.
comment on: http://stackoverflow.com/a/27241267
type: AnswerComment

http://stackoverflow.com/q/27266541
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27266576
tagged with: javascript
has title: Selecting an Element | Javascript vs Jquery
has answer: http://stackoverflow.com/a/27266549
has answer: http://stackoverflow.com/a/27266576
answer count: 2
downvote count: 0
has body: Whats the difference between an element selected by Javascript and the same element selected with jQuery? I ran into this problem, trying to select a Html5 data attribute from an element with jQuery, the dataset would return undefined even though it was clearly set. Selecting the element with regular javascript works perfectly fine however. So what behind the scenes is different that stops this example from working. var jsSelect = document.getElementById("jsSelect"); alert(jsSelect.dataset.name); var jqSelect = $("#jsSelect"); alert(jqSelect.dataset.name); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="jsSelect" data-name="Javascript"&gt;&lt;/div&gt;
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27266549

http://stackoverflow.com/comment/42988330
type: QuestionComment
has text: Whyare you choosing to use jQuery for this rather than CSS?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27257328

http://stackoverflow.com/comment/43003614
type: QuestionComment
has text: You can still use ul for the header and input checkboxes as the child
type: Comment
comment on: http://stackoverflow.com/q/27263807
score: 0

http://stackoverflow.com/comment/42844319
has text: @JeanlucaScaljeri How should your output look like if you do have characters in it, can you show us an example? Maybe we can tweak the CSS solution somehow...
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27177579
score: 0

http://stackoverflow.com/q/27158663
score: 0
answer count: 1
tagged with: php
tagged with: css
has body: I am looking to implement a "theme preview" of a WordPress theme I developed, like the ones you see on Themeforest where it basically wraps your website or WP theme in a frame and allows you to change the viewport to various device sizes to showcase the responsiveness. Example link below. SAMPLE LINK Where does one even start? I have looked for hours on Google to find a clue where to start... nothing! Is it really just about wrapping the website in an Iframe and using JS to control the size of the iframe? I feel like there would be a cleaner, lighter solution out there somewhere. I would like to build this myself or find an open source plug-in. I know there are pay versions out there but looking to gather opinions and find a clear solution. Thanks in advance!
type: AnsweredQuestion
has title: WordPress theme preview-er? Where to start?
tagged with: iframe
tagged with: wordpress
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27180262
accepted answer: http://stackoverflow.com/a/27180262

http://stackoverflow.com/comment/42855883
comment on: http://stackoverflow.com/q/27183992
score: 0
type: Comment
type: QuestionComment
has text: Try with ` Välj `

backbone.js
tags question: http://stackoverflow.com/q/27275736
tags question: http://stackoverflow.com/q/27255187
tags question: http://stackoverflow.com/q/27261137
tags question: http://stackoverflow.com/q/27309111
tags question: http://stackoverflow.com/q/27310727
tags question: http://stackoverflow.com/q/27270322
tags question: http://stackoverflow.com/q/27219921
tags question: http://stackoverflow.com/q/27153917
tags question: http://stackoverflow.com/q/27313268
tags question: http://stackoverflow.com/q/27172107
tags question: http://stackoverflow.com/q/27161117
tags question: http://stackoverflow.com/q/27225873
tags question: http://stackoverflow.com/q/27216331
tags question: http://stackoverflow.com/q/27281143
tags question: http://stackoverflow.com/q/27275263
tags question: http://stackoverflow.com/q/27290268
tags question: http://stackoverflow.com/q/27230567
tags question: http://stackoverflow.com/q/27244321
tags question: http://stackoverflow.com/q/27197702
tags question: http://stackoverflow.com/q/27206516
tags question: http://stackoverflow.com/q/27252819
tags question: http://stackoverflow.com/q/27227606
tags question: http://stackoverflow.com/q/27236203
tags question: http://stackoverflow.com/q/27191089
tags question: http://stackoverflow.com/q/27154854
tags question: http://stackoverflow.com/q/27176135
tags question: http://stackoverflow.com/q/27253643
tags question: http://stackoverflow.com/q/27172570
tags question: http://stackoverflow.com/q/27267168
type: Tag
tags question: http://stackoverflow.com/q/27239985
tags question: http://stackoverflow.com/q/27268368
tags question: http://stackoverflow.com/q/27268326
tags question: http://stackoverflow.com/q/27217772
tags question: http://stackoverflow.com/q/27198459
tags question: http://stackoverflow.com/q/27283378
tags question: http://stackoverflow.com/q/27235047
tags question: http://stackoverflow.com/q/27246397
tags question: http://stackoverflow.com/q/27281686
tag name: backbone.js

http://stackoverflow.com/q/27202118
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/27202168
has title: Logic to hide opened sub menu on click elsewhere?
downvote count: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/27202168
tagged with: frontend
has body: Suppose user goes to a ecommerce site and clicks on products, there is a submenu which drops down. What logic to write to ensure that when user clicks on any other blank space(or elements) that submenu is hidden back?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27202944
score: 1
accepted answer: http://stackoverflow.com/a/27202944
type: Question
tagged with: javascript

http://stackoverflow.com/a/27194373
accepted answer of: http://stackoverflow.com/q/27194196
score: 1
answers question: http://stackoverflow.com/q/27194196
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: JSFiddle if(y &gt;= s_body.top &amp;&amp; y &lt; e_body.top){ $('table thead').addClass('fixed_header'); } else { $('table thead').removeClass('fixed_header'); }

http://stackoverflow.com/comment/42942743
type: QuestionComment
comment on: http://stackoverflow.com/q/27233048
has text: Can you please post your `$eName` echo result in PHP?
score: 0
type: Comment

http://stackoverflow.com/comment/42829989
type: QuestionComment
has text: try put: else { alert('I'm here'); .... } just for know if pass on to this block
comment on: http://stackoverflow.com/q/27169364
score: 0
type: Comment

http://stackoverflow.com/comment/42955483
type: QuestionComment
score: 0
has text: My concern is that if a user types something on the textarea the button should still work but thats not the case it doesnt work anymore.. but if I refresh the page and click the button 1st it works but if I edit again the textarea and click the button again it wont work again
comment on: http://stackoverflow.com/q/27239279
type: Comment

http://stackoverflow.com/comment/135776157
has text: An array will work, it just has to follow certain rules which Vlad's answer describes. The array follows the format of `[left, top, right, bottom]`. `right` must be positive, and `bottom` must be negative.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27271793
type: AnswerComment

http://stackoverflow.com/comment/42915269
type: QuestionComment
has text: @AndersonGreen Emacs Lisp.
comment on: http://stackoverflow.com/q/27217854
score: 0
type: Comment

http://stackoverflow.com/comment/43073735
comment on: http://stackoverflow.com/q/27305497
has text: You should use $compile('your html')(scope) and append this to your table. I think
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/28756245
downvote count: 1
has comment: http://stackoverflow.com/comment/45891305
answers question: http://stackoverflow.com/q/27296555
score: 0
has body: This was happening to me as well, and after a lot of trial and error I was able to fix it, in my case, with the following JavaScript/jQuery code in the web content: $(window).on('resize', function () { setTimeout(function () { window.scrollTo(0, 0); window.scrollTo(0, 1); }, 700); }); A few notes about this solution: This works for me because the web content I'm loading consists entirely of fixed elements that have overflow: auto set for scrolling content within them. Thus, I never scroll the entire page, so I'm free to reset the scroll position to 0, 0. If your entire page scrolls you can probably adapt this technique by adding or subtracting 1 from the scroll position, but be careful; the page has to actually scroll for it to work. If the scrollY of your page maxes out at, say, 3000 and you try setting it to 3001 that won't work, you'd need to do 2999. The timeout value of 700 is probably excessive for your purposes; try reducing it. I tried just about everything else I could think of; the only solution I could find that work reliably was to force a scrolling change after the rotation event. Looking forward to this being fixed!
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42853874
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27182938
type: Comment
has text: Once again this snippet is for pulling dates not a set variable as displayed in the original source code in seconds and in the modified version as current_level

http://stackoverflow.com/comment/42861362
type: Comment
comment on: http://stackoverflow.com/q/27187097
has text: @User2413 do you mean it takes one second ( flicker ) to load ? there are 6 icons though not 3.
score: 0
type: QuestionComment

http://stackoverflow.com/q/27293716
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43054113
has comment: http://stackoverflow.com/comment/43054463
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/43055200
has body: I have a the format of the data as follows: {"01.12.10 00:00":-1.5821800231934,"01.12.10 00:05":-1.5570800304413,"01.12.10 00:10":-1.5885699987411,"01.12.10 00:15":-1.6257599592209,"01.12.10 00:20":-1.6307400465012,"01.12.10 00:25":-1.6432000398636,"01.12.10 00:30":-1.655179977417,"01.12.10 00:35":-1.646919965744,"01.12.10 00:40":-1.6347700357437,"01.12.10 00:45":-1.6490000486374,"01.12.10 00:50":-1.6404999494553,"01.12.10 00:55":-1.6160600185394,"01.12.10 01:00":-1.6089400053024,"01.12.10 01:05":-1.6082600355148,"01.12.10 01:10":-1.6159199476242,"01.12.10 01:15":-1.5781999826431,"01.12.10 01:20":-1.6013100147247,"01.12.10 01:25":-1.636440038681,"01.12.10 01:30":-1.6679799556732,"01.12.10 01:35":-1.6709300279617,"01.12.10 01:40":-1.7158499956131,"01.12.10 01:45":-1.7515499591827,"01.12.10 01:50":-1.7836400270462,"01.12.10 01:55":-1.7883299589157,"01.12.10 02:00":-1.8029299974442,"01.12.10 02:05":-1.8306200504303,"01.12.10 02:10":-1.8690099716187,"01.12.10 02:15":-1.8802800178528,"01.12.10 02:20":-1.890319943428,"01.12.10 02:25":-1.9045300483704,"01.12.10 02:30":-1.9173899888992,"01.12.10 02:35":-1.9262299537659,"01.12.10 02:40":-1.9494600296021,"01.12.10 02:45":-1.9754300117493,"01.12.10 02:50":-2.0177900791168,"01.12.10 02:55":-2.1353900432587,"01.12.10 03:00":-2.2930901050568,"01.12.10 03:05":-2.4463000297546,"01.12.10 03:10":-2.4375700950623,"01.12.10 03:15":-2.4210600852966,"01.12.10 03:20":-2.4662098884583,"01.12.10 03:25":-2.4880900382996,"01.12.10 03:30":-2.5205299854279,"01.12.10 03:35":-2.4987099170685,"01.12.10 03:40":-2.4680500030518,"01.12.10 03:45":-2.4702401161194,"01.12.10 03:50":-2.451080083847,"01.12.10 03:55":-2.4516499042511,"01.12.10 04:00":-2.4481599330902,"01.12.10 04:05":-2.4502699375153,"01.12.10 04:10":-2.4662299156189,"01.12.10 04:15":-2.5105600357056,"01.12.10 04:20":-2.50919008255,"01.12.10 04:25":-2.5130999088287,"01.12.10 04:30":-2.5451800823212,"01.12.10 04:35":-2.5562000274658,"01.12.10 04:40":-2.6259000301361,"01.12.10 04:45":-2.7309…
type: Question
has title: How do I create a custom date in tooltip and label in highcharts?
tagged with: highcharts

http://stackoverflow.com/q/27169475
downvote count: 0
tagged with: javascript
has title: window.print is blocking the javascript execution in the source window
has comment: http://stackoverflow.com/comment/42830160
has comment: http://stackoverflow.com/comment/79667179
has comment: http://stackoverflow.com/comment/90304617
favorite count: 0
upvote count: 5
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9516900
has comment: http://stackoverflow.com/comment/42831301
has body: In my web app i want to integrate a print functionality. When the user clicks the print button, a new window is opening and the print dialog appears. With this code i want to achieve this: var win = window.open(url, '_blank'); win.print(); It is working, but the problem is that in chrome the source window stops the javascript execution while the print dialog is open. How is it possible to prevent this?
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/94383471
score: 5
has comment: http://stackoverflow.com/comment/42830191

meteor-accounts
tags question: http://stackoverflow.com/q/27247648
tags question: http://stackoverflow.com/q/27255551
tag name: meteor-accounts
type: Tag

http://stackoverflow.com/a/27194802
upvote count: 2
has comment: http://stackoverflow.com/comment/42874952
has comment: http://stackoverflow.com/comment/42875127
has comment: http://stackoverflow.com/comment/42874969
score: 2
has comment: http://stackoverflow.com/comment/42889489
has comment: http://stackoverflow.com/comment/42912353
type: AcceptedAnswer
downvote count: 0
has body: You can do this with this code: var url = window.location.href; if (url == 'http://www.domain.com/') // or whatever it is { window.location.href = url + '#slide-01'; // etc... } within your slide function! EDIT: I don't use bxslider, so I'm not 100% sure if this will work, but it might fit your needs: $(document).ready(function(){ var url = window.location.href; var slide = url.split('#'); if (slide[1]) { var slidenumber = slide[1].replace(/([a-z,0,/-])/g, ''); } if (!slidenumber) { slidenumber = 0;} var sliderContent = $('.bxslider').bxSlider({ pager:false, startSlide: slidenumber, var urlWithoutAnchor = document.URL.replace(/#.*$/, ""); //location.hash.replace('#','') window.location.href = urlWithoutAnchor + '#' + newslide; }); });
type: Answer
accepted answer of: http://stackoverflow.com/q/27194750
has comment: http://stackoverflow.com/comment/42875002
answers question: http://stackoverflow.com/q/27194750

http://stackoverflow.com/q/27296227
answer count: 2
tagged with: ios
tagged with: javascript
has title: Why doesn't callback get called when the app is in background?
has comment: http://stackoverflow.com/comment/43087427
score: 0
possible better answer: http://stackoverflow.com/a/27433620
tagged with: push-notification
accepted answer: http://stackoverflow.com/a/27440962
tagged with: apple-push-notifications
has comment: http://stackoverflow.com/comment/43280432
favorite count: 0
has answer: http://stackoverflow.com/a/27440962
tagged with: titanium
upvote count: 1
has body: I'm developing a titanium app that needs to display a Banner Message under iOS when a push notification comes in. Therefore I used the following code to register on incoming push notifications: var callbacks = { types: [ Titanium.Network.NOTIFICATION_TYPE_BADGE, Titanium.Network.NOTIFICATION_TYPE_SOUND, Titanium.Network.NOTIFICATION_TYPE_ALERT ], success:function(e){ console.log("success"); }, error:function(e){ console.log("error"); }, callback: function(e){ console.log("new push notification") //code for displaying banner message would go here! } }; if(Ti.App.iOS.registerUserNotificationSettings){ //iOS 8 + function onUserNotificationSettings(){ delete callbacks.types; Ti.Network.registerForPushNotifications(callbacks); Ti.App.iOS.removeEventListener("usernotificationsettings",onUserNotificationSettings); } Ti.App.iOS.addEventListener("usernotificationsettings",onUserNotificationSettings) Ti.App.iOS.registerUserNotificationSettings(callbacks) }else{ //up to iOS 7 Ti.Network.registerForPushNotifications(callbacks) } But the callback function does not get called when the app is in background. So, I also can't display the banner message there, since the code won't get executed. What could be the reason why the callback does not get called when the app is in background? When it is in foreground, it works perfectly. Is it normal? If yes, where else would I put my code to display the banner message? I'm using SDK version 3.4.0 on an iPhone 5 with iOS 8.1.1 Please note that sending the banner text through the apn-payload is not the solution. There are other usecases. For example, when the server needs to tell the client that there is new content to sync, where the user does not even need to get notified for. The client should just download the new content in background just when the notification arrives.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27433620
has comment: http://stackoverflow.com/comment/43280454
has comment: http://stackoverflow.com/comment/43063450
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43063630

http://stackoverflow.com/comment/42978598
type: QuestionComment
has text: It's done, I edited my first post. Thx
comment on: http://stackoverflow.com/q/27251441
score: 0
type: Comment

http://stackoverflow.com/a/27184275
upvote count: 3
type: Answer
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/27184210
has body: if (col.Name == 'Foo') { json.Columns.splice(index,1); } will properly delete the object

http://stackoverflow.com/a/27196836
downvote count: 0
answers question: http://stackoverflow.com/q/27196753
score: 9
type: Answer
has comment: http://stackoverflow.com/comment/42879101
has body: By default, the browser will wait until the current thread of execution finishes and do one consolidated reflow and repaint (as this is considered more efficient than doing many reflows and repaints). This is not specified in any specification so the browser can implement as it wants to. But, there are some specific operations that will generally trigger a reflow (and sometimes a corresponding repaint). These operations are operations (requesting certain properties related to the position of elements) which can only be completed when an accurate reflow has been done. So, it is possible to manually trigger a reflow by requesting one of these properties. For example, requesting the .offsetHeight property of a non-absolutely positioned element will force a pending reflow at that point. Other properties that trigger a pending reflow here: Which DOM element properties can cause the browser to perform a reflow operation when modified? Another list of properties here: http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html
has comment: http://stackoverflow.com/comment/42878573
upvote count: 9
has comment: http://stackoverflow.com/comment/42878712

http://stackoverflow.com/comment/42824149
score: 0
comment on: http://stackoverflow.com/q/27166007
type: Comment
type: QuestionComment
has text: thanks.. but how did this simple solution made this function worked???

http://stackoverflow.com/q/27154030
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
has body: I have a library - call it SomeLib - which is defined to support various module loaders: (function(global, factory) { if (typeof define === 'function' &amp;&amp; define.amd) { define([], factory); } else if (typeof module !== 'undefined' &amp;&amp; module.exports) { module.exports = factory(); } else { global.UriTemplate = factory(); } })(this, function() { ... // returns constructor function }); I can easily load it with RequireJS like require.config({ paths: { 'theLibrary: '../path/to/the/lib' } }); Then I have another 3rd-party library - call it AnotherLib - which internally uses SomeLib like var the Lib = new SomeLib(...); That means SomeLib has to be available globally. AnotherLib is just a plain JavaScript module function (function(){ // the code })(); It is not compliant with particular module loaders. When I include AnotherLib with RequireJS, I do something like require.config({ paths: { 'theLibrary: '../path/to/the/lib', 'anotherLib: '../path/to/anotherLib' }, shim: { 'anotherLib: [ 'theLibrary' ] } }); The problem is that I get a undefined exception on the line within AnotherLib where it instantiates SomeLib (new SomeLib(...)). This is because SomeLib is not defined on the global object but rather published as an AMD module which AnotherLib doesn't "require". Can I solve this somehow, or does AnotherLib have to be AMD compliant and properly require SomeLib.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27154465
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27154465
tagged with: requirejs
has title: Use AMD defined module within 3rd party, non-AMD library

http://stackoverflow.com/comment/42958882
type: QuestionComment
comment on: http://stackoverflow.com/q/27240970
score: 0
type: Comment
has text: If I were you, I would not put function `playVideo` in Track.prototype. Because your Object Track itself CANNOT play. In your design, you may also need to add more to Track, like `sell`, `buy`, etc. These are business logic. I would just play it like: `player.playVideo(track)`.

http://stackoverflow.com/q/27287336
has comment: http://stackoverflow.com/comment/43041562
has title: TypeError: json is undefined in Asp.Net MVC
tagged with: javascript
tagged with: jquery
has body: I am trying to use Jquery dataTable in MVC 4. Below is my Code. Web Method : public JsonResult GetProjects() { // ............... // ............... return Json(new { sEcho = param.sEcho, iTotalRecords = result.Count(), iTotalDisplayRecords = result.Count(), aaData = result }, JsonRequestBehavior.AllowGet); } View Sno Name NameArabic Town StartDate EndDate StringType StringStatus JavaScritpt: $(document).ready(function () { var oTable = $("#JProject").dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers", "bServerSide": true, "sAjaxSource": "Project/GetProjects", "fnServerData": function (sSource, aoData, fnCallback) { $.ajax({ "type": "GET", "dataType": 'json', "contentType": "application/json; charset=utf-8", "url": sSource, "data": aoData, "success": function (data) { fnCallback(data.d); } }); }, "aoColumns": [ { "mDataProp": "NameArabic", "bSearchable": true, "bSortable": true, "sWidth": "20px" }, { "mDataProp": "Name", "bSearchable": true, "bSortable": true }, { "mDataProp": "NameArabic", "bSearchable": true, "bSortable": true }, { "mDataProp": "StartDate", "bSearchable": false, "bSortable": false }, { "mDataProp": "EndDate", "bSearchable": false, "bSortable": false }, { "mDataProp": "StringType", "bSearchable": false, "bSortable": false }, { "mDataProp": "StringStatus", "bSearchable": true, "bSortable": false }, { "mData": null, "sWidth": "20px", "bSearchable": false, "bSortable": false } ] }); }); Web Method is called successfully, and i can also see my required Data in FireBug, but it is not shown in dataTable. In FireBug i got the error TypeError: json is undefined if ( json.sEcho !== undefined )
score: 0
has comment: http://stackoverflow.com/comment/43041647
has comment: http://stackoverflow.com/comment/43041769
tagged with: asp.net
answer count: 0
type: UnansweredQuestion
tagged with: asp.net-mvc
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/43002307
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27265282
has text: @RobG Would that be a JQuery thing?

http://stackoverflow.com/a/27230496
score: 1
has comment: http://stackoverflow.com/comment/42978764
accepted answer of: http://stackoverflow.com/q/27230343
answers question: http://stackoverflow.com/q/27230343
upvote count: 1
has body: "this" is contextual to where you are in the stack, so "this" in an event is actually the event, if that makes sense. It's a common programming concept. I often use a cached version of "this" (i.e. the caller) to use if you need to call something on it. i.e. $.fn[pluginName] = function(options) { var caller = this; this.each(function() { if (!$.data(caller, "plugin_" + pluginName)) {
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42938554
downvote count: 0
has comment: http://stackoverflow.com/comment/42979097

http://stackoverflow.com/comment/42973083
has text: Perfect Riad. How would I run this for each individual ` `?
type: Comment
comment on: http://stackoverflow.com/a/27247611
score: 0
type: AnswerComment

http://stackoverflow.com/q/27288242
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43043348
has comment: http://stackoverflow.com/comment/43043789
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43044516
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27291584
has body: I am familiar with how everything works in angular js,but i am very much new to custom directives in angular js. I am working on a library to upload file from client(angular js) to amazon s3..i have succesfully uploaded it but i am trying to rerender the directive on button click and i have no idea oh how to do it...please help.. angular.module('ngS3upload.directives', []). directive('s3Upload', ['$parse', 'S3Uploader', 'ngS3Config', function ($parse, S3Uploader, ngS3Config) { return { restrict: 'AC', require: '?ngModel', replace: true, transclude: true, scope: true, controller: ['$scope', '$element', '$attrs', '$transclude', function ($scope, $element, $attrs, $transclude) { $scope.emptyfile=function() { alert("hello"); $scope.$apply(); }; }], compile: function (element, attr, linker) { return { pre: function ($scope, $element, $attr) { if (angular.isUndefined($attr.bucket)) { throw Error('bucket is a mandatory attribute'); } }, post: function (scope, element, attrs, ngModel) { // Build the opts array var opts = angular.extend({}, scope.$eval(attrs.s3UploadOptions || attrs.options)); opts = angular.extend({ submitOnChange: true, getOptionsUri: '/s3options', acl: 'public-read', uploadingKey: 'uploading', folder: '', enableValidation: true, targetFilename: null }, opts); {{ some code here}} } }; }, templateUrl: function(elm, attrs) { var theme = attrs.theme || ngS3Config.theme; return 'theme/' + theme + '.html'; } }; }]); angular.module('ngS3upload').run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('theme/bootstrap2.html', " \n" + " Choose file \n" +" Change "+ " \n"+" \n"+"{{progress}}%"+" \n"+ " \n"+ " " ); }]); when i click on 'change' button which is returned from directive template,emptyfile() function is called and there i would like to re-render my directive.
type: Question
has title: How to refesh a directive on button click in angular js

http://stackoverflow.com/comment/43098049
type: Comment
has text: Depends what you want to do in your exception handlers and what version you will use. Very unlikely that the fix will be backported to 0.9.2. So if you have to stick with 0.9.2 or earlier ... :-)
comment on: http://stackoverflow.com/a/27313767
type: AnswerComment
score: 0

http://stackoverflow.com/a/27303804
has comment: http://stackoverflow.com/comment/43070686
score: 2
has comment: http://stackoverflow.com/comment/43071146
answers question: http://stackoverflow.com/q/27303758
has body: Use this to get all elements with id's that start with Form_Page. $(document).ready(function() { $('[id^=Form_Page]').bootstrapValidator(); }); Docs: http://api.jquery.com/attribute-starts-with-selector/ If the above throws errors because .bootstrapValidator() doesn't support multiple objects, use the following: $(document).ready(function() { $('[id^=Form_Page]').each(function(){ $(this).bootstrapValidator(); }); });
has comment: http://stackoverflow.com/comment/43070654
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/42807871
comment on: http://stackoverflow.com/q/27156731
has text: yess...its working absolutely fine... thank you so much... :) :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27163424
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27164155
type: UnansweredQuestion
has title: http request and convert to json with comparision of json
score: 2
upvote count: 2
has body: I want to make a http request to a url lets say http://test1.com/info this will give me xml I want to convert this xml from 1 to json lets say json 1 Now I make a rest request to url lets say http://test2.com/myweb this returns a json lets say json 2 json 1 [ { "id": "123", "testname": "test123", "name": "John Doe", "active": true, "type": "test6" } { "id": "456", "testname": "test564", "name": "Ship Therasus", "active": true, "type": "test7" } .... some 100 entries ] and json 2 some like below [ { "id": "123", "country": "USA", "state": "KA", "age": 24, "group": "g1" } { "id": "456", "country": "UK", "state": "MA", "age": 28, "group": "G2" } ...... 100 entries ] Now Id is the constant thing between json1 and json2 I want to make a resultant json something like below lets call json3.I want to match the id and get country and state from json2 and append to json1 [ { "id": "123", "testname": "test123", "name": "John Doe", "active": true, "type": "test6", "country":"USA", "state":"KA" } { "id": "456", "testname": "test564", "name": "Ship Therasus", "active": true, "type": "test7", "country":"UK", "state":"MA" } ] Now wat i tried for 1 and 3 but for 2 dont know wat to do and to compare and combine I am not sure wat to do If any help will be greatful function fun() { var data="hello"; $.post('http://localhost/ws/service.asmx/HelloWord',{},function(response) { data = response; }).error(function(){ alert("Sorry could not proceed"); }); return data; }
type: Question

http://stackoverflow.com/comment/43061381
has text: You are right, I was surprised it doesn't though. The escaped version seems to work but anyway I would think it's easier to write the code without the plus sign.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27298392
type: Comment

http://stackoverflow.com/a/27287138
has body: You can get it like below: var array1 = [1,2,3,4,5]; var array2 = [3,4,5,6,7]; var foo1 = [], foo2=[]; var i = 0; jQuery.grep(array1, function(el) { if (jQuery.inArray(el, array2) == -1) foo1.push(el); i++; }); jQuery.grep(array2, function(el) { if (jQuery.inArray(el, array1) == -1) foo2.push(el); i++; }); alert(" the difference is " + foo1); alert(" the difference is " + foo2);
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43041225
answers question: http://stackoverflow.com/q/27287018
downvote count: 0

http://stackoverflow.com/comment/43054690
comment on: http://stackoverflow.com/a/27280660
score: 0
has text: @Godisgood: That should be better. If you were in a situation where you couldn't use that option, you could sanitize the input yourself using [character entities](http://dev.w3.org/html5/html-author/charref).
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27169268
has comment: http://stackoverflow.com/comment/43252423
score: 9
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42831732
accepted answer of: http://stackoverflow.com/q/27167350
answers question: http://stackoverflow.com/q/27167350
type: Answer
has comment: http://stackoverflow.com/comment/43251145
downvote count: 1
has body: tl;dr Not a problem with your specific machine, it's on all machines. Not a bug. This behavior exists in all memory allocation libraries. Not OS depended. All OS behave this way. If you need it initialized, then yes, clear it using Buffer.prototype.fill Yes, it's documented in the underlying libraries that nodejs/webkit use: see malloc(3) / stdlib This is most likely something that's to be expected when working with API that handles memory allocation, such as Buffer. Buffer is actually using the smalloc module, which you could think of as malloc(3) / free(3) from stdlib.h The principle behind malloc is that it only allocates/reserves memory for a pointer - in webkit it might look closer to calloc for ExternalArray on objects. See http://linux.die.net/man/3/malloc The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. Memory allocation/deallocation does not handle memory initialization, because it's more expensive to go through each byte and set it to 0. Besides 0 is not always the initial value you need for a byte. And since memory allocation can return a block of memory that has been used before by some other process, it's expected to have data in the newly allocated block. The general rule is: when allocating memory (such as Buffer does), if you need it initialized use buf.fill(0); although this is not always needed since in most scenarios when you need Buffer you already have knowledge of the length of the data, implicitly the contents. For instance, when you create new Buffer(30) you know your data is 30 bytes long, which means you already have an idea of what the data to be written looks like, so in the end you'll most likely end up with writing each byte, before passing the buffer to something else - therefore no need to prepend an additional initialization loop that will set each byte to 0. For buffers where you use bytes as flags/states for an object, you could only initialize those. E.g. if y…
upvote count: 10

http://stackoverflow.com/comment/42933345
type: QuestionComment
type: Comment
has text: We can understand more easily if you can post a sample fiddle of your code
score: 3
comment on: http://stackoverflow.com/q/27227987

http://stackoverflow.com/a/27228855
type: Answer
downvote count: 0
has body: Sure thing! http://codepen.io/desandro/pen/ByoQwN I changed Packery option rowHeight: slldeSize.outerWidth to columnWidth: slideSize.outerHeight, and Draggabilly option axis: 'y' to axis:'x'. Everything else is handled with CSS. var slidesElem = document.querySelector('.slides'); var slideSize = getSize( document.querySelector('.slide') ); var pckry = new Packery( slidesElem, { rowHeight: slideSize.outerHeight }); // get item elements var itemElems = pckry.getItemElements(); // for each item... for ( var i=0, len = itemElems.length; i &lt; len; i++ ) { var elem = itemElems[i]; // make element draggable with Draggabilly var draggie = new Draggabilly( elem, { axis: 'y' }); // bind Draggabilly events to Packery pckry.bindDraggabillyEvents( draggie ); }
score: 1
has comment: http://stackoverflow.com/comment/42935941
answers question: http://stackoverflow.com/q/27227436
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27227436

http://stackoverflow.com/comment/42880018
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27194130
has text: @ZhangNan, I don't notice any slowing but what you are asking d3.js to do is very CPU intensive, so on slower computers, it's going to be a problem. Your mouseover doesn't work because you've mapped your data to x/y using the `datum` function. See this [update](http://plnkr.co/edit/0ZtlEBGRqTOZ7arFYoRj?p=preview).
score: 0

http://stackoverflow.com/a/27232416
answers question: http://stackoverflow.com/q/27227976
type: Answer
accepted answer of: http://stackoverflow.com/q/27227976
score: 1
upvote count: 1
has body: Without your JavaScript code, it will be hard to give you the exact answer that will solve your issue, so I'll give you a more generic answer. Step 1: Create a div in your html code to contain the array &lt;div id="arrayStrContainer"&gt;&lt;/div&gt; Step 2: On click, put the stringified version of your object in the screen node = d3.selectAll('g node'); node.on('click', function(d) { // console.log(d.arrayAttr) // what you did before d3.select('#arrayStrContainer').text(JSON.stringify(d.arrayAttr)); // this will override whatever was in the div with the new array. })
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27289353
upvote count: 1
type: Answer
has body: function stop_it() { cancel == true; } This function seems to be wrong, you need to assign true to the cancel variable but you have mistakenly written comparison operator(equal to/==) instead it should be: function stop_it() { cancel = true; } I think you are calling this function while stopping AJAX in between the process.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27288371

http://stackoverflow.com/comment/43008629
has text: check out my answer. i am 99% sure it´s the reason why it does not work.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27266625
score: 0

import
type: Tag
tag name: import
tags question: http://stackoverflow.com/q/27295310

http://stackoverflow.com/q/27292375
tagged with: custom-element
has body: I created a custom element called "memory-box" like the below code. Please pay attention to the function "logthis" which is in "memory-box-template". memory-box.html Now, I uses the custom element "memory-box" like the below code. index.html As you can see, I putted a script in the index.html and called the function "logthis" just because I was curious. And no error occurred. Why? The function "logthis" is in each shadow doms. It's supposed not able to be called outside the shadow dom, I think.
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/27323645
tagged with: web-component
accepted answer: http://stackoverflow.com/a/27323645
answer count: 1
favorite count: 0
has title: Why can I call function which is in a shadow dom?
tagged with: shadow-dom

http://stackoverflow.com/comment/43083387
has text: thank you,but take a look at [here](http://jsfiddle.net/alirh/xryj8awk/) i'll try to refilter the results of the dom in the first input based on the second one,and my problem is they can't work with each other.
comment on: http://stackoverflow.com/a/27311318
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43084760
score: 0
type: Comment
type: QuestionComment
has text: wow, briliant! please put this comment in answer so that i can accept it
comment on: http://stackoverflow.com/q/27312073

http://stackoverflow.com/q/27271100
has title: Replace " \ " with null in JSON data
has comment: http://stackoverflow.com/comment/43012042
possible better answer: http://stackoverflow.com/a/27271184
tagged with: angularjs
type: AnsweredQuestion
has body: How can I replace all the " \ " with null in my JSON data and convet the below string to a JSON array object? "[ { \"id\": 2, \"data1\": 83, \"data2\": 2, \"data3\": [ { \"subdata1\": 62, \"subdata2\": 296, \"subdata3\": 2, }, ] }, { \"id\": 24, \"data4\": 83, \"data5\": \"ANY\", \"data6\": \"VALUE\", } ]"
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27271184
type: Question
tagged with: jsonp
answer count: 2
has answer: http://stackoverflow.com/a/27271221
accepted answer: http://stackoverflow.com/a/27271221
tagged with: javascript
score: 0

http://stackoverflow.com/a/27156212
type: Answer
answers question: http://stackoverflow.com/q/27154468
score: 1
has body: It looks like you never check the observable so you are always using the revert to value. If you do a check on the value accesor and if its provided dont overwrite it. &lt;input type="text" data-bind="serverValue:TheMeaningOfLife, defaultValue='42'" /&gt; ko.bindingHandlers.serverValue = { init: function (element, valueAccesor, allBindingsAccessor, viewModel) { var myValue = null; var observable = valueAccesor(); if (observable() == undefined) { observable(allBindingsAccessor.defaultValue); } ko.applyBindingsToNode(element, { value: observable }); } }
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27154468
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42815769

http://stackoverflow.com/comment/42979571
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27252657
has text: Isn't this just because [`foldr` and `foldl`](http://en.wikipedia.org/wiki/Fold_(higher-order_function)) operate from different directions? That's the point of having both, and non-commutative operations will necessarily return different results.
score: 0

http://stackoverflow.com/a/27401505
has body: Flux is great for manipulating global state because the Stores are globally accessible. Globals are known to be bad, but the way you interact with the Stores is through Actions. Actions make the state predictable and localized. So even though the state storage itself is global, Actions make the state interactions very local. At work we tend to do both reading &amp; writing through Actions, so every state change is an "event" that leads to easily programmable behavior. I really wouldn't compare Flux to Angular as their principles and flows are entirely different. Suggest you try Reflux.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27256128
answers question: http://stackoverflow.com/q/27256128
downvote count: 0
type: AcceptedAnswer
score: 1
type: Answer

http://stackoverflow.com/comment/43056217
has text: do you have a fiddle to play around?
comment on: http://stackoverflow.com/q/27295479
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42907594
score: 1
has text: inline styles or classes referenced through external stylesheet?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27213526

http://stackoverflow.com/a/27221611
answers question: http://stackoverflow.com/q/27221572
type: Answer
upvote count: 6
score: 6
accepted answer of: http://stackoverflow.com/q/27221572
has body: This could work for you // initialize var my_2d_array = {}; // add users my_2d_array["user1"] = ... my_2d_array["user2"] = ... // get number of users Object.keys(my_2d_array).length; //=&gt; 2 You should consider using users instead of my_2d_array though. It communicates better and the actual data type is an Object, not specifically an Array.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27228928
type: Answer
has comment: http://stackoverflow.com/comment/42945593
answers question: http://stackoverflow.com/q/27228350
score: 0
has body: You can try this. Demo on dabblet body { background-color: black; margin: 0 auto; overflow: hidden; } #overlay { border-top-left-radius: 1000px 100px; border-top-right-radius: 1000px 100px; border-bottom-left-radius: 1000px 100px; border-bottom-right-radius: 1000px 100px; width: 100%; height: 100px; background-color: white; margin: 0; position: absolute; top: calc(50% - 50px); -webkit-animation: anim 4s infinite; animation: anim 4s infinite; height: 800px; top: calc(50% - 400px); } @-webkit-keyframes anim { 0% { height: 1px; top: calc(50% - 0.5px); } 100% { height: 800px; top: calc(50% - 400px); } } @-moz-keyframes anim { 0% { height: 1px; top: calc(50% - 0.5px); } 100% { height: 800px; top: calc(50% - 400px); } } &lt;div id="overlay"&gt;&lt;/div&gt;

http://stackoverflow.com/comment/43113361
comment on: http://stackoverflow.com/a/27309460
score: 0
type: AnswerComment
has text: You can use mapreduce to insert claims and lab into the same document in mr_beneficiaries by setting the same "out" . But the output format won't be what you want
type: Comment

cryptography
tag name: cryptography
tags question: http://stackoverflow.com/q/27180914
tags question: http://stackoverflow.com/q/27283809
type: Tag
tags question: http://stackoverflow.com/q/27273961

http://stackoverflow.com/a/27284346
downvote count: 0
has comment: http://stackoverflow.com/comment/43094346
has comment: http://stackoverflow.com/comment/43053000
has comment: http://stackoverflow.com/comment/43072804
type: Answer
has body: Here's a general idea for how to do this (untested): var promises = []; for (var key in req.files) { if (req.files.hasOwnProperty(key)) { (function(file) { promises.push(easyimg.info(file.path).then(function(image) { return easyimg.resize({ src: file.path, dst: path + file.name, width: Math.max(image.width, 800), height: Math.max(image,height, 800), quality: 80 }).then(function(image) { fs.remove('./tmp-uploads/' + image.name, function(err) { if (err) { // logging error, but not stopping execution // since this is a non-fatal error console.log("err removing temp upload: ", err); } }); return {src: file.name, main: false}; }); })); })(req.files[key]); } } // now wait for all promises to finish // assumes you want to call next() no matter what when all image processing is done Promise.all(promises).then(function(results) { // all results are in the results array here // do whatever processing of the results array you want to do here res.sendStatus(200); next(); }, function() { // set some status to send when there's an error res.sendStatus(xxx); next(); }); I corrected several problems and made some improvements: Your variable file was being overwritten whenever processing more than one file because you were trying to use the same variable in multiple async callbacks. I put it into a closure so it's saved separately for each image that is being processed. This is probably the main issue that kept it from working with more than one image. You weren't calling next() at all the right times (sometimes calling it too many times). Your error handling had multiple issues because you can't just return out of an async method to stop processing. I decided that if you can't remove the temporary file that processing should continue rather than abort since that isn't a fatal issue. This code uses Promise.all() to get a callback when all your operations are done rather than using a manual counter. This also makes error handling much simpler.
accepted answer of: http://stackoverflow.com/q/27282757
has comment: http://stackoverflow.com/comment/43094592
upvote count: 1
answers question: http://stackoverflow.com/q/27282757
score: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42866619
type: Comment
comment on: http://stackoverflow.com/a/27190164
has text: @cloudfeet Absolutely.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42969886
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27246700
has text: That's true. Angular does not check ng-model value (which could be something else than a literal) to "select" option.
type: AnswerComment

http://stackoverflow.com/comment/42881395
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27198229
type: QuestionComment
has text: I see. You're conflating ` ` and HTML5. You can use HTML5 without canvas. What I think you *really* mean to say, then, is "I don't want to use canvas." I wouldn't want to use the raw canvas API either -- it's pretty bare-bones. But lots of good libraries build on it, as people have pointed out in this post. Don't confuse canvas and HTML5, though.

http://stackoverflow.com/comment/43024545
type: Comment
comment on: http://stackoverflow.com/q/27277637
has text: We ask that code samples and output HTML is provided as text, not images - this is generally good advice everywhere on the web. Here, you can select your code and press the "code" button to format it appropriately. Would you give it a go?
score: 0
type: QuestionComment

http://stackoverflow.com/q/27179120
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27180957
type: AnsweredQuestion
has title: JQuery datepicker and selectmenu on Google Apps Script
has body: How do I make datepicker and selectmenu work in GAS? This is my code: And it isn't working, no errors are logged. I tried with JQuery 1.9.1 and only datepicker works. I also tried this code in JSFiddle and it worked OK
type: Question
tagged with: google-apps-script
accepted answer: http://stackoverflow.com/a/27180957

http://stackoverflow.com/comment/42992277
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27259388
has text: @cherry_red: With the fiddle? Yes there are, more than one in fact. Open your web console, you'll see what popovitsj is talking about.
score: 0

http://stackoverflow.com/comment/74977409
type: QuestionComment
has text: This question is definitely not a duplicate, as this one addresses more than one level of depth
comment on: http://stackoverflow.com/q/27266550
score: 0
type: Comment

http://stackoverflow.com/comment/43055540
has text: yeah sorry thats what i ment to say, the code itself works very well but i cant use it without building complete new sneak logic
score: 0
comment on: http://stackoverflow.com/a/27279680
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27287450
has title: Error: [$compile:tpload] Failed to load template in Angular
answer count: 1
score: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27312114
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27312114
has body: Example : registry.html Name: app.js define(['angular', 'services','text', 'text!ang/templates/registry.html'], function(angular, services,textmod,template) { ........ angular.module('myApp.directives', ['myApp.services']) .directive('superd', function() { return { templateUrl:template, .......... } }) Eror : GET app_ang/%3Clabel%3EName:%3C/label%3E 403 (Forbidden) angular.js?bust=1417672731204137.41101580671966:10023 Error: [$compile:tpload] Failed to load template: Name: Note : 'text' is https://github.com/requirejs/text
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/43041998
has comment: http://stackoverflow.com/comment/43041850

http://stackoverflow.com/a/27242590
type: Answer
has body: The only property names you can access with the dot syntax are those that conform to JavaScript's rules for identifier names (first character is a letter, _, or $, and remaining characters are letters, numbers, _, or $). What you have there is a syntax error, and that's why it errors out. From MDN: Dot notation get = object.property; object.property = set; property must be a valid JavaScript identifier, i.e. a sequence of alphanumerical characters, also including the underscore ("_") and dollar sign ("$"), that cannot start with a number. For example, object.$1 is valid, while object.1 is not. You can use the square bracket notation to access a property with any name, so either of the following will return the item you want: x[2]; x["2"];
answers question: http://stackoverflow.com/q/27242516
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27242516
has comment: http://stackoverflow.com/comment/42961207
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42961242

http://stackoverflow.com/q/27242607
has title: Disable JQuery datepicker dates by picking a date from another datepicker
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27242963
score: 3
accepted answer: http://stackoverflow.com/a/27242662
downvote count: 0
has answer: http://stackoverflow.com/a/27242963
favorite count: 0
type: Question
tagged with: datepicker
upvote count: 3
answer count: 2
has body: 2 datepickers fromdate and todate My requirement is to select a fromdate and the todate should not be more than 30 days from the selected fromdate, so when I pick a fromdate it should only enable next 30 days in todate datepicker. i tried to implement this facility to these datepickers but not working //from date $("#txtTFromDateTeacherDailyReport").datepicker( { changeMonth : true, changeYear : true, dateFormat : "dd/mm/yy", maxDate : '0', beforeShow : function() { jQuery(this).datepicker( 'option', 'maxDate',jQuery('#txtTToDateTeacherDailyReport').val()); }, }).datepicker("setDate", "0"); //to date $("#txtTToDateTeacherDailyReport").datepicker( { changeMonth : true, changeYear : true, dateFormat : "dd/mm/yy", maxDate :'0', beforeShow : function() { jQuery(this).datepicker( 'option', 'minDate', jQuery( '#txtTFromDateTeacherDailyReport').val()); }, }).datepicker("setDate", "0"); Please help me to get rid of this.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27242662

http://stackoverflow.com/comment/43044801
type: Comment
comment on: http://stackoverflow.com/a/27274725
has text: Why are all codes in different pages? Why not make one page? Are the input and the radio buttons in a iframe? Also try to insert the external JS script in the bottom of the page.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27189936
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27188810
type: Answer
accepted answer of: http://stackoverflow.com/q/27188810
has body: try this one then back button is working while dialog is running pd = ProgressDialog.show(this,"Loading...","Please Wait..."); pd.setCancelable(true); By use asynctask you write code like this way @Override protected void onPreExecute() { // TODO Auto-generated method stub pd = ProgressDialog.show(ctx, null, "fetching ..."); pd.setCancelable(true); super.onPreExecute(); } @Override protected Void doInBackground(Void... arg0) { // TODO Auto-generated method stub try { //fetch response from internet and process here } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void result) { // TODO Auto-generated method stub pd.cancel(); //do next action here super.onPostExecute(result); }

http://stackoverflow.com/comment/42992174
type: Comment
score: 1
has text: Is there any error message in the console log?
type: QuestionComment
comment on: http://stackoverflow.com/q/27259388

http://stackoverflow.com/comment/43038270
comment on: http://stackoverflow.com/q/27281365
type: QuestionComment
has text: Glad you could find your answer :). Go ahead and post your own answer and you can accept it for posterity's sake.
type: Comment
score: 1

http://stackoverflow.com/q/27209777
has comment: http://stackoverflow.com/comment/42901795
has comment: http://stackoverflow.com/comment/42901380
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42901397
has comment: http://stackoverflow.com/comment/42901762
has body: In the script section, i get the Uncaught Type Error: Undefined is not a function JavaScript error. What might be wrong? I checked to see if the .js files have been called, and everything is in order. @model Crux.Models.Question @{ ViewBag.Title = "Create"; Layout = "~/Views/Shared/_Layout.cshtml"; } Create @using (Html.BeginForm()) { @Html.AntiForgeryToken() Question @Html.ValidationSummary(true) @Html.LabelFor(model => model.question, new { @class = "control-label col-md-2" }) @Html.EditorFor(model => model.question) @Html.ValidationMessageFor(model => model.question) Tags } @Html.ActionLink("Back to List", "Index") It gives the error on line: $("#hashtags").tagit({
has comment: http://stackoverflow.com/comment/42901413
type: Question
has comment: http://stackoverflow.com/comment/42901646
has comment: http://stackoverflow.com/comment/42901674
has answer: http://stackoverflow.com/a/27210213
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42901472
has title: Uncaught Type Error: Undefined is not a function JavaScript
has comment: http://stackoverflow.com/comment/42901716
score: 0
answer count: 1

http://stackoverflow.com/comment/42901596
has text: @lambdaFairy no, it doesn't Ill figure that out, thanks for pointing it out.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27209784

http://stackoverflow.com/q/27283145
answer count: 2
has answer: http://stackoverflow.com/a/27283654
has answer: http://stackoverflow.com/a/27283360
type: UnansweredQuestion
has body: I know this is a frequently asked question and I have looked at many related questions/answers, still I am not able to get it to work. I want to dim the entire screen except for certain portions. in one case the portion that should not be dimmed is the region between two concentric squares. I want a solution that uses only javascript and css. It should not use any 3rd party library like jquery. I am not worried about old browsers. As long as it works on latest browsers I am okay with whatever css3 it needs. Some other restrictions I have - I am using absolute positioning in my app. All elements are absolutely positioned. EDIT: thanks for helping me with you answers. I think I should have mentioned I want to dim the screen in response to an event like user clicking on a button. That event dims the screen except for certain areas that I want to highlight. When user clicks on the button again, the screen is restored. When the screen is dimmed user should not be able to do any interaction with DOM elements in the dimmed regions. This is my js fiddle: http://jsfiddle.net/z1Lj7h90/ HTML: Highlight CSS: #mybutton { position: absolute; top: 450px; left:100px; z-index:10; } #main { position: relative; z-index:10; width:500px; height:500px; overflow:hidden; } #darkness { z-index:5; width:100%; height:100%; position:absolute; left:0; top:0; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; } .fadein { background:rgba(0,0,0,0.75); } #outer { position:absolute; top:10px; left:10px; width:400px; height:400px; border:2px solid red; } #inner { position:absolute; top:40px; left:40px; width:340px; height:340px; border:2px solid blue; } JS: var button = document.getElementById("mybutton"); button.addEventListener("click", toggle); var ff = false; function toggle() { var darkness = document.getElementById("darkness"); darkness.classList.toggle("fadein"); if (ff) { dice.style.zIndex = original…
tagged with: css
score: 0
type: Question
has title: How to dim entire screen except for region between two concentric squares using pure javascript and css (no jquery)
tagged with: javascript

http://stackoverflow.com/a/36819852
answers question: http://stackoverflow.com/q/27244944
score: -2
type: Answer
upvote count: 0
has body: I just commented the AMD check and called the regular way /* // transport if ( typeof define === 'function' &amp;&amp; define.amd ) { // AMD define( classie ); } else { // browser global window.classie = classie; } */ window.classie = classie;
downvote count: 2

http://stackoverflow.com/a/27242399
upvote count: 0
answers question: http://stackoverflow.com/q/27242343
score: -1
has body: Javascript doesn't have a here-document syntax. You can escape the literal newline, however, which comes close: "foo \ bar" Ref taken from this
downvote count: 1
has comment: http://stackoverflow.com/comment/42963185
type: Answer

http://stackoverflow.com/a/43356739
downvote count: 4
has comment: http://stackoverflow.com/comment/80506595
has body: Taken from my blog: https://sergiotapia.me/pluralizing-strings-in-javascript-es6-b5d4d651d403 You can use the pluralize library for this. NPM: npm install pluralize --save Yarn: yarn add pluralize Wherever you want to use the lib, you can require it easily. var pluralize = require('pluralize') I like to add it to the window object so I can just invoke pluralize() wherever I need it. Within my application.js root file: window.pluralize = require('pluralize') Then you can just use it anywhere, React components, or just plain Javascript: &lt;span className="pull-left"&gt; {`${item.score} ${pluralize('point', item.score)}`} &lt;/span&gt; console.log(pluralize('point', item.score))
upvote count: 11
type: Answer
answers question: http://stackoverflow.com/q/27194359
score: 7

http://stackoverflow.com/q/27242998
upvote count: 2
has comment: http://stackoverflow.com/comment/43006507
answer count: 3
has comment: http://stackoverflow.com/comment/42961838
has body: I am having this problem when using plain Javascript mixed with jQuery(two different libraries I am using). So for a text input field, the plain Javascript library rely on the change event binding added using addEventListener method. The other jQuery Plugin(datetimepicker) is used to change the field and a jQuery.change() method is triggered after the value is updated. The problem is, the listener is not triggered by the jQuery event. Here is some simple code to illustrate the issue. abc abc. Given the very simple html page like this, the event listener actually will not be triggered by the jQuery.change() method, so the alert box will not be displayed. If I change the input field manually, the event works fine. Follow up: If use jQuery for event binding and triggering, there is no problem. The problem is, I am using one library that is written in plain Javascript(JSONEditor[https://github.com/jdorn/json-editor]), and the event binding is added using the Javascript API, and other libraries I am using changed some input field and triggered the event with jQuery, and the event is not captured.
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43006473
has answer: http://stackoverflow.com/a/27243052
has answer: http://stackoverflow.com/a/64159158
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27243050
has title: jQuery.change() not compatible with addEventListener?
has comment: http://stackoverflow.com/comment/42961855
type: Question
has comment: http://stackoverflow.com/comment/42961799
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27248419
has body: I've configured ELK stack for our system (.NET application). It works good but in current configuration it's not convenient to search for some text and display results with nearby application logs in the table (for example, I want to trace how particular object was moving through functions in code). I've made a dashboard that consists of a textbox, set of filters, a graph of events and two tables - one for search results and the second for all events. The task I want to complete: 1) Enter the query in the search box 2) Display results in both the graph and the first table. 3) By clicking a point in the graph or a row in the table (or maybe a link in ID field) second table should display item with the same id as clicked AND all next records (up to the page limit of the table). For now with the existing dashboard I can proceed with first two steps, but the third one is done manually by reducing the time period in the graph so that the table of events contains found record and several surrounding. Can this be done in Kibana? Probably, I can write some javascript code to complete the task. How could I filter the table with javascript to select a row by ID and also select PageLimit - 1 next reords? Or another way could be to filter the table by time so that its range becomes from the time of selected event to (for example) next five minutes. Is there any documentation with javascript API for Kibana? Thanks in advance!
score: 0
tagged with: elasticsearch
has title: Kibana - dashboard to find something and display nearby records from logs
type: UnansweredQuestion
tagged with: kibana
has answer: http://stackoverflow.com/a/27286620
type: Question
answer count: 1
tagged with: logstash
tagged with: javascript

http://stackoverflow.com/a/78399216
has body: Here's an approach which provides complex solutions (maths is from the same wikipedia article) class complex{ constructor(a,b) { this.a=a this.b=b } static sqrt(real){ if (real &gt;= 0){ return new complex(real**0.5,0) } else{ return new complex(0,(-1*real)**0.5) } } transform(transformationTheta,transformationR){ const r = transformationR((this.a**2+this.b**2)**0.5) const theta = transformationTheta(Math.atan2(this.b,this.a)) return new complex(r*Math.cos(theta),r*Math.sin(theta)) } addToComplex(complexInput){ return new complex(complexInput.a+this.a,complexInput.b+this.b) } addToReal(real){ return new complex(this.a+real,this.b) } multiplyWithReal(real){ return new complex(this.a*real,real*this.b) } realDividedByComplex(real){ const d = (-1*this.b*real)/(this.a**2+this.b**2) const c = (real+this.b*d)/this.a return new complex(c,d) } } function cubicFormula(a,b,c,d){ const p = b**2-3*a*c const q = 2*b**3-9*a*b*c+27*a**2*d const r0 = complex.sqrt(q ** 2 - 4 * p ** 3).addToReal(q).multiplyWithReal(0.5).transform( (x) =&gt; {return x/3},(x) =&gt;{return Math.cbrt(x)}) const r1 = r0.transform((x)=&gt;{return x+2*Math.PI/3},(x)=&gt;{return x}) const r2 = r0.transform((x)=&gt;{return x-2*Math.PI/3},(x)=&gt;{return x}) const cubeRoots = [r0,r1,r2] const roots = [] cubeRoots.forEach((cubeRoot) =&gt; { roots.push(cubeRoot.addToReal(b).addToComplex(cubeRoot.realDividedByComplex(p)).multiplyWithReal(-1/(3*a))) }) return roots }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27176423

http://stackoverflow.com/comment/42953403
has text: You're using scrollLeft but you're asking about scrollTop? Seems counterproductive..
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27238309
type: Comment

http://stackoverflow.com/q/27197126
has title: Modifying jquery NoUiSlider to lock dynamically multiple sliders of a certain class
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: nouislider
score: 3
has comment: http://stackoverflow.com/comment/127235954
upvote count: 3
has body: I am trying to find a modification to lock various sliders (noUiSliders) of class "active" together, which will be added or removed dynamically. How can I modify the script to make it lock only sliders with the class "active" at a time, based (or not) on the method provided on the script authors page? The following example locks only the two first sliders regardless to the class "active": http://jsfiddle.net/qtzwyqke/8/ Lock
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27304074
accepted answer: http://stackoverflow.com/a/33540880
answer count: 2
tagged with: jstl
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
has body: Can angular.js communicate with JSTL expression language? I want to create ng-options using an array. Something like this : &lt;select ng-model="detail" ng-init="Categories = '${Categories}'" ng-options="'${Category.code}' for Category in Categories"&gt;
has title: Can angular.js communicate with JSTL expression language?
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33540880
upvote count: 3
downvote count: 1
type: Question
tagged with: angularjs-ng-init
possible better answer: http://stackoverflow.com/a/31052252
tagged with: javascript
has answer: http://stackoverflow.com/a/31052252

http://stackoverflow.com/q/27197964
upvote count: 1
has title: Jquery Progress Bar: Issue with implementing progress Bar
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42884580
has comment: http://stackoverflow.com/comment/42880569
tagged with: progress-bar
answer count: 0
downvote count: 0
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/42881022
tagged with: jquery-ui-progressbar
has body: I'm having a problem with implementing the progress bar using the jquery UI progressbar widget. The actual bar in the widget is not loading in real time. It just jumps to the end bar when the timer is complete. I'm not sure to why its doing that. Any help is appreciated $(document).ready(function() { $("#start_timer").click( function () { var totalTime = $("#time").val(); var interval = $("#interval").val(); var isValid = true; $("#progressbar").progressbar({ value:0 }); // validate the time if (totalTime == "") { $("#time_error").text("This field is required."); isValid = false; } else if (isNaN(totalTime)) { $("#time_error").text("Time must be a number."); isValid = false; } else { $("#time_error").text(""); } // validate the interval if (interval == "") { $("#interval_error").text("This field is required."); isValid = false; } else if (isNaN(interval)) { $("#interval_error").text("Interval must be a number."); isValid = false; } else { $("#interval_error").text(""); } if (isValid) { totalTime = totalTime * 1000; interval = interval * 1000; var elapsedTime = 0; var displayMinutes = 0; var displaySeconds = 0; var timer = setInterval( function () { elapsedTime += interval; displaySeconds = elapsedTime / 1000; $("#progressbar").progressbar("value", elapsedTime); /*if (displaySeconds &lt; 60) { $("#elapsed").val(displaySeconds + " seconds"); } else { displayMinutes = parseInt(displaySeconds / 60); displaySeconds = displaySeconds % 60; if (displaySeconds == 0) { $("#elapsed").val(displayMinutes + " minutes"); } else { $("#elapsed").val(displayMinutes + " minutes " + displaySeconds + " seconds"); } } if (elapsedTime == totalTime) { clearInterval(timer); $("#complete span").text("Time is up!") }*/ }, interval ); } } ); $("#totalTime").focus(); });

http://stackoverflow.com/comment/42864143
type: QuestionComment
has text: @AndresCardenasPardo so i should get rid of the `onDestroy`method?
score: 1
comment on: http://stackoverflow.com/q/27188810
type: Comment

http://stackoverflow.com/a/27171495
has body: Have you tried this ? window.open(URL, '_self'); URL is the absolute URL of the file you want to download.
type: Answer
has comment: http://stackoverflow.com/comment/42833737
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42833641
upvote count: 1
has comment: http://stackoverflow.com/comment/42833596
answers question: http://stackoverflow.com/q/27171383

http://stackoverflow.com/q/27201103
has comment: http://stackoverflow.com/comment/42885698
has comment: http://stackoverflow.com/comment/42885682
has answer: http://stackoverflow.com/a/27201157
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27201212
score: 0
has comment: http://stackoverflow.com/comment/42885693
has title: Increasing a number is there a better way?
type: UnansweredQuestion
has body: I'm trying to work out how to increase a weird record numbering system I think I'm on the right track but is there a better way? The record numbering works like this member number - year - 4 digit number e.g. 1076-14-0081 I need to increase the 0081 part of the number to be the next number. When I load the input form up I call in the last number to a text field animalId and focus on the text field. Once they exit out of the field the code below is run and the field is updated. $(function() { $("#animalId").focusout(function() { curNum = $("#animalId").val(); animalIDArray = curNum.split('-'); memberNumber = animalIDArray[0]; var year = Number(animalIDArray[1]); animalNumber = Number(animalIDArray[2]); animalNumber = animalNumber +1; animalNumber = String("0000" + animalNumber).slice(-4); result = [memberNumber, year, animalNumber].join("-"); $("#animalId").val(result); }); }); I was wondering have I done it correctly or is there a better way I can do this automatically?
linked to: http://stackoverflow.com/q/2686855

http://stackoverflow.com/a/27289431
answers question: http://stackoverflow.com/q/27289041
accepted answer of: http://stackoverflow.com/q/27289041
has body: try this $("a").mouseover(function() { //console.log($(this).html()); $(this).click(); }); or use toggle option $('#users a').editable({ type: 'text', name: 'username', url: '/post', title: 'Enter username', toggle:'mouseenter' });
type: AcceptedAnswer
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/43046181
downvote count: 0
score: 1

http://stackoverflow.com/comment/42941521
has text: @Gimby And you're right about CORS. This is indeed browser-dependent. For instance, [Chrome does not support localhost CORS](https://code.google.com/p/chromium/issues/detail?id=67743). But still, you can get around this with lvh.me.
comment on: http://stackoverflow.com/a/27230430
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27245933
favorite count: 0
upvote count: 5
has body: In fullpage.js core functions How to customize such that when set option autoScrolling: true. 1.only disable mouse scroll behavior trigger in section scrolling control. 2.other keyboard scroll triggers still working. (such as keyup keydown end home etc) here is the fullpage.js code from git: https://github.com/ajgagnon/fullPage.js/blob/master/jquery.fullPage.js Explaination: why need to disable mouse scroll sometimes. Because there are scroll sensitivity issues in fullpage.js when "scrollOverflow: true". However, if you totally disabled the "autoScrolling: true" option, by default keyboard trigger still allow to scroll up down left right. ( "keyboardScrolling: true" by default; ) However, I discovered when "scrollOverflow: false" option together with "keyboardScrolling: true", the content will shake instantly the moment you press down the arrow keys. don't know how to fix, so it's my purpose to keep scrollOverflow:true while disable mouse scroll only. then will be no issue. )
type: UnansweredQuestion
downvote count: 0
type: Question
score: 5
has title: How to disable mouse scroll trigger in fullpage.js only
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27246417
has answer: http://stackoverflow.com/a/33616969
answer count: 3
tagged with: fullpage.js
has answer: http://stackoverflow.com/a/27275033

http://stackoverflow.com/q/27283810
score: 0
has answer: http://stackoverflow.com/a/27283891
tagged with: function
has title: Adding numbers in an Array. Getting weird output. Javascript
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/43035907
has answer: http://stackoverflow.com/a/27283892
accepted answer: http://stackoverflow.com/a/27283892
has answer: http://stackoverflow.com/a/27283898
has body: var array = []; getNum(); document.write(array); document.write("&lt;br&gt;Sum: " + sum(array)); //Function to Sum Array function sum(params){ var total = 0 ; for (i = 0; i &lt; params.length; i++){ total += params[i]; } return total; } //Function to get Numbers in Array function getNum(){ var count = 0; alert("Please enter 5 numbers"); while(count &lt; 5) { array[count] = prompt("Number " + (count + 1)); count++; } } Current Output 5,4,3,2,1 Sum: 054321 What I want 5,4,3,2,1 Sum: 15 I'm trying to make a program where the user adds numbers to an Array and the program calculates different things about those numbers. When I call sum(array); with a preset array such as var array = [5,4,3,2,1]; The summing works fine and outputs 15 as expected. However instead of having a preset array, when I include the function to get the set of numbers for the Array, the summation the output is 054321. I want to do the array calculations manually for my own understandings sake, rather than using reduce(); What am I doing wrong?
has answer: http://stackoverflow.com/a/27283979
has answer: http://stackoverflow.com/a/27283875
type: AnsweredQuestion
type: Question
tagged with: sum
has answer: http://stackoverflow.com/a/27283885
answer count: 6
possible better answer: http://stackoverflow.com/a/27283875

http://stackoverflow.com/q/27178451
answer count: 2
has body: We need to let the user enter a number in an &lt;input type='number'&gt; and, if it's negative, the negative style will apply, which will make the displayed text red. However, I am having trouble getting the if statement to work. HTML: &lt;span class="input"&gt; &lt;input type="text" value="-"&gt; &lt;input type="number" class="hidden"&gt; &lt;/span&gt;&lt;br&gt; &lt;span class="input"&gt; &lt;input type="text" value="-"&gt; &lt;input type="number" class="hidden"&gt; &lt;/span&gt; $(this).prev().addClass('negative'); doesn't work in the if statement in the following: $(document).ready(function(){ $('.input [type="text"]').on('focus', function(){ $(this).next().removeClass().focus(); $(this).addClass('hidden'); }); $('.input [type="number"]').on('blur', function(){ var number = Math.round($(this).val() * 100) / 100; var text = number.toFixed().toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); if (number &lt; 0) { $(this).prev().addClass('negative'); text = "("+text.replace(/-/g,"")+")"; } if (!number) {text = "-";} $(this).prev().val(text); $(this).prev().removeClass(); $(this).addClass('hidden'); }); }); Fiddle. It will work if you take it out of the if statement, so the issue seems to be that $(this) is not making its way into the if statement. (Edit: Seems my assumption about this was incorrect. See the comments below.) These two similar questions made use of .filter to resolve this issue, but I couldn't figure out how to make that work with the code above. So how do I get this to work?
linked to: http://stackoverflow.com/q/8222528
has title: Using $(this) in an if statement
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42845830
has comment: http://stackoverflow.com/comment/42846321
favorite count: 0
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10002256
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/27178637
has comment: http://stackoverflow.com/comment/42845963
score: -3
type: Question
linked to: http://stackoverflow.com/q/27181708
has comment: http://stackoverflow.com/comment/42851651
has answer: http://stackoverflow.com/a/27178637
has comment: http://stackoverflow.com/comment/42845776
has comment: http://stackoverflow.com/comment/42846027
linked to: http://stackoverflow.com/q/6586302
linked to: http://stackoverflow.com/q/18192166
has comment: http://stackoverflow.com/comment/42845769
possible better answer: http://stackoverflow.com/a/27178495
has answer: http://stackoverflow.com/a/27178495

http://stackoverflow.com/q/27230003
answer count: 0
score: 1
upvote count: 1
tagged with: syntax-highlighting
type: Question
has body: Is it possible to get the functionality (in any way) of highlighting all references of the 'selected' variable in nodejs (I'm using Visual Studio 2012 Premium with Node.js Tools 1.0 RC)? The very same functionality already exists for the C#, but for the unknown reasons to me, it's not possible for Node.js/JavaScript. I've searched web a little, and found solutions like Accent Occurrences extension, but to make it work I have to select the whole variable name (double click) - but what I desire is to trigger highlighting action just when I place the cursor onto the variable (single click). Thanks in advance for any help.
tagged with: javascript
tagged with: visual-studio-2012
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: Highlight reference in Visual Studio 2012 JavaScript (nodejs)?
tagged with: node.js

http://stackoverflow.com/comment/42887884
type: Comment
comment on: http://stackoverflow.com/a/27201872
has text: Thank you so much! you saved my time.It's worked perfectly. It is always sending 1 request more.That's bcz of empty array keyword value.I have checked it by if( typeof (array1[array1.length - length1]) !== 'undefined' ) { } then worked fine.Thanks again for your great answer.Accepted the answer and voted !
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43091464
type: Comment
has text: Which google analytics tracking code are you implementing?universal or classic?
type: QuestionComment
comment on: http://stackoverflow.com/q/27313067
score: 0

http://stackoverflow.com/a/27183423
type: Answer
has body: Once you have reached 0 on your countdown you could clear your current intervals using clearInterval() and restart the whole process after a minute. You could have another setInterval() which does this every minute. Here is a fiddle which resets counters every 12 seconds: http://jsfiddle.net/uo7jLf4b/1/
score: 0
answers question: http://stackoverflow.com/q/27182927

http://stackoverflow.com/comment/43075751
type: Comment
has text: You are correct, but explain why and how to fix it.
comment on: http://stackoverflow.com/a/27306697
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43054101
score: 0
type: AnswerComment
has text: It didnt worked for me. It is like this? `'chromeOptions': { 'args': ['--load-extension=' + 'C:/Users/QARJ/AppData/Local/Google/Chrome/User Data/Default/Extensions/dgpgkkfheijbcgjklcbnokoleebmeokn/1.1_0'] }`
type: Comment
comment on: http://stackoverflow.com/a/27282354

append
tags question: http://stackoverflow.com/q/27240951
tag name: append
tags question: http://stackoverflow.com/q/27292456
tags question: http://stackoverflow.com/q/27300917
tags question: http://stackoverflow.com/q/27299580
type: Tag

http://stackoverflow.com/comment/42840469
score: 0
type: AnswerComment
type: Comment
has text: Thank you , with your changes it worked .
comment on: http://stackoverflow.com/a/27175170

http://stackoverflow.com/a/27306856
type: Answer
score: 0
has body: Just for the fun of it. In this example using https://lodash.com. var people = [ { "id": 1, "username": "Joe Smith", "pic": "images/profile/Joe_smith.jpg" }, { "id": 2, "username": "Jane Smith", "pic": "images/profile/Jane_smith.jpg"}, { "id": 3, "username": "I play too much games", "pic": "images/profile/toomuch.jpg"} ]; var professions = [ { "id": 3, "userId": 1, "profession": "dentist" }, { "id": 4, "userId": 2, "profession": "pilot" } ]; var workers = _.map(people, function(human) { var work = _.findWhere(professions, { 'userId': human.id }); return _.extend(human, work ? work : { 'profession' : 'unemployed' }); }); console.log(workers);
answers question: http://stackoverflow.com/q/27305581

http://stackoverflow.com/q/27275214
has body: I'm creating a latex templating system using Node.js. As part of this system, I need to escape any characters with special meanings by prefixing them with a backslash. I've read that a double-backslash is used to insert a literal backslash: &gt; var input = "hello &amp; 100%" &gt; input.replace(/([&amp;%$#_{}])/g, "\\$1") 'hello \\&amp; 100\\%' Nope. I've also read that because it's inside a string, I need to double-escape the backslash: &gt; input.replace(/([&amp;%$#_{}])/g, "\\\\$1") 'hello \\\\&amp; 100\\\\%' Nope. And using just one backslash doesn't do it either: &gt; input.replace(/([&amp;%$#_{}])/g, "\$1") 'hello &amp; 100%' So how am I supposed to insert a single backslash using replace()?
tagged with: regex
tagged with: node.js
type: AnsweredQuestion
type: Question
score: 5
has title: Replace with a single backslash in javascript?
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/27275343
tagged with: replace
answer count: 1
downvote count: 0
favorite count: 0
tagged with: latex
has comment: http://stackoverflow.com/comment/43019745
accepted answer: http://stackoverflow.com/a/27275343

http://stackoverflow.com/a/27225305
has comment: http://stackoverflow.com/comment/42929076
has comment: http://stackoverflow.com/comment/42928967
score: 0
answers question: http://stackoverflow.com/q/27225215
has body: write a callback like this - function AddSessionID(e) { sessionId = e; sessionIdReadyCallback(); } function sessionIdReadyCallback(){ alert(sessionId); }
has comment: http://stackoverflow.com/comment/42929216
type: Answer
has comment: http://stackoverflow.com/comment/42928871
has comment: http://stackoverflow.com/comment/42929040
has comment: http://stackoverflow.com/comment/42929258

http://stackoverflow.com/q/27240524
tagged with: setinterval
has body: Maybe it seems an odd question... but I don´t know exactly how to program a task... o rather, I don´t know exactly wich one is the best solution. I just finish a web app and it needs everyweeks, every monday, execute a "special" piece of code, that it can´t be invoked from anywhere else. The cron solution looks much better, but the piece of code would be isolated, like if this code and the rest of the application were two diferents programs. And the worst handicap of the cron solution (even tough I suposse it can be solved), when I call the javascript file from the cli node cron.js it makes good its job, but it never ends... this is normal?? or it depends about the code?? Becouse I don´t want to execute one instance, and the next week, with the first instance still running, run the second, and everyweeks the same problem. The "setInteval" solution could be setting the time for a day, and testing if it is monday (on monday makes the action)... or maybe setting the time for a week (604800000 miliseconds)... This solution hasn´t these problems, especially the last, but it consumes a lot of resources (I think...no?). What is the best solution?? Any different?? And if the cron is the best... how to stop the task? (uuuuuhhhh maybe other programed task with cron -a shell- one minute after to kill the node task... uuummm a little botched job). Thank you very much.
favorite count: 0
has comment: http://stackoverflow.com/comment/42959580
answer count: 0
type: UnansweredQuestion
tagged with: node.js
score: 3
has comment: http://stackoverflow.com/comment/42995307
upvote count: 3
type: Question
has title: program a task with node.js... cron or setInterval?
downvote count: 0
tagged with: javascript
tagged with: cron

http://stackoverflow.com/comment/42886471
type: QuestionComment
score: 0
has text: in spring mvc project i got for the ko.applyBindings(viewModel); line this message: unredolved function or method applyBindings()
comment on: http://stackoverflow.com/q/27201492
type: Comment

http://stackoverflow.com/comment/43005525
has text: Please, provide some source code.
comment on: http://stackoverflow.com/q/27267168
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27289967
has answer: http://stackoverflow.com/a/27290462
has title: How to pass parameter to javascript function from kendo
tagged with: javascript
tagged with: jquery
answer count: 1
accepted answer: http://stackoverflow.com/a/27290462
type: AnsweredQuestion
has body: Here is the kendo grid I have &lt;href&gt; tag with onclick function().Now I want to pass filename as parameter to my onclick function.I want to pass that file name to the CallAjaxMethod Function as a parameter. How to do ths? @(Html.Kendo().Grid&lt;MVCAPPModels..AttachmentsModel&gt;() .Name("grid") .Columns(columns =&gt; { columns.Bound(p =&gt; p.FileName).ClientTemplate("&lt;a id='FileName' href='\\#' data-pdfurl='#= FileName #' onclick='CallAjaxMethod('#= FileName #');'&gt;/#= FileName #&lt;/a&gt;"); columns.Bound(c =&gt; c.CreatedDate).Width(70); columns.Bound(c =&gt; c.CreatedBy).Width(70); columns.Bound(c =&gt; c.UpdatedDate).Width(70); columns.Bound(c =&gt; c.UpdatedbBy).Width(70); }) .HtmlAttributes(new { style = "height: 350px;" }) .Scrollable() .Groupable() .Sortable() .Pageable(pageable =&gt; pageable .Refresh(true) .PageSizes(true) .ButtonCount(1)) .DataSource(dataSource =&gt; dataSource .Ajax() .ServerOperation(false) .Read(read =&gt; read.Action("Customers_Read", "Home")) ) ) JavaScript function : function CallAjaxMethod() { alert("page! CallAjax"); $.ajax({ type: "POST", url: "@Url.Action("Submit", "Home")", data: { fileName: "/pdfSample.pdf" }, type: 'GET', cache: false, success: function (result) { $('#partialView_div').data(result); } }); }
score: 0
tagged with: kendo-ui-mvc
type: Question

http://stackoverflow.com/comment/43022224
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27276537
type: AnswerComment
has text: The only problem is that if the modal re-size with the page, than I should have a listener for that and calculate the size of the grid again and again. I think this can lead to performance issues.

http://stackoverflow.com/comment/42825866
type: Comment
type: QuestionComment
has text: Your post not clear enough !
comment on: http://stackoverflow.com/q/27162250
score: 0

http://stackoverflow.com/q/27228660
type: Question
tagged with: c#
tagged with: google-analytics
tagged with: .net
tagged with: javascript
downvote count: 0
has title: Google analytics in WPF web browser control causing error
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42935644
has comment: http://stackoverflow.com/comment/42934863
tagged with: wpf
has body: I have WebBrowser control in my WPF application. I am loading several different pages into it. Each one has Google Analytics tracking code. Sometimes when I am refreshing (loading) same content I am getting this error: Translation: There is an error in script at this site Wiersz = Row Znak = Sign Błąd = Error Kod = Code Do you want to continue runnig scripts at this site? Yes/No EDIT: This page is not reachable from outside. This is only available in company LAN. Can it be the reason?
score: 1

http://stackoverflow.com/q/27294191
answer count: 3
has body: which is positioned 113px from the top, to be on top when users are scrolling the page. I know there is a similar question, but I am not sure where to put the js code. (Yes I am a newbie) Old question: How to "fixed" menu only when it get to the top? Let me know if you want to see an example. Best regards Carsten
linked to: http://stackoverflow.com/q/25475105
has answer: http://stackoverflow.com/a/27294259
type: UnansweredQuestion
tagged with: css
tagged with: menu
has comment: http://stackoverflow.com/comment/43053300
has comment: http://stackoverflow.com/comment/43053381
has comment: http://stackoverflow.com/comment/43152489
type: Question
has answer: http://stackoverflow.com/a/27294438
tagged with: javascript
tagged with: fixed
has answer: http://stackoverflow.com/a/27294302
has title: Keep menu on top when "fixed" in css
score: 0

http://stackoverflow.com/comment/43051233
has text: 1. is your code wrapped around tags? doesn't look to be so in the code you pasted. 2. Next to uncaught syntax error, you have the file name and line number corresponding to the code that failed to run. This is what you should use to debug, and this is what you should include in your question.
comment on: http://stackoverflow.com/a/27292103
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27320559
has body: I'm a developer evangelist for Twilio. I haven't tried anything in Chrome extensions with Twilio Client just yet, but I took a look at the permissions. It looks to me like you need to include the audioCapture permission in order to get access to the microphone via getUserMedia, which is what Client uses. I was looking up the available permissions here: https://developer.chrome.com/apps/declare_permissions I hope that helps, let me know if I can help any further. UPDATE: As discussed, that is the page for Chrome packaged apps, not extensions. The top answer to this question suggests making a call to getUserMedia in an options page for the extension. Otherwise, there is a bug on Chrome open to add these permissions to extensions.
has comment: http://stackoverflow.com/comment/43100455
downvote count: 0
has comment: http://stackoverflow.com/comment/43100989
score: 1
answers question: http://stackoverflow.com/q/27310569
upvote count: 1
type: Answer

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/27297067
tags question: http://stackoverflow.com/q/27176105
tags question: http://stackoverflow.com/q/27217778
type: Tag

http://stackoverflow.com/a/27199587
has body: It's hard to tell with the information given, but perhaps you're using the meta viewport tag: &lt;meta name="viewport" content="width=device-width"&gt; If you have something like that in your code, remove it. If your website isn't designed to be responsive, then adding in the meta viewport tag will awkwardly zoom users in.
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27199474
has comment: http://stackoverflow.com/comment/116636177
has comment: http://stackoverflow.com/comment/42883367
downvote count: 0

http://stackoverflow.com/comment/62436267
type: QuestionComment
comment on: http://stackoverflow.com/q/27242977
has text: Will you accept my answer or comment, if it misses essential information?
score: 0
type: Comment

http://stackoverflow.com/comment/42964689
has text: 1. where is your myFunction. 2. You are passing a string rather than a dom
comment on: http://stackoverflow.com/q/27244704
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/27263359
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27263418
possible better answer: http://stackoverflow.com/a/27263418
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27263557
accepted answer: http://stackoverflow.com/a/27263557
has title: HTML5/JavaScript Canvas Text Gradient Effect
has body: Is there a way to apply a gradient to a text inside a canvas using HTML5/JavaScript only? Hello World!
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/27299345
has title: How to show 10th to 20th child in jQuery
type: Question
accepted answer: http://stackoverflow.com/a/27299472
has comment: http://stackoverflow.com/comment/43062720
tagged with: javascript
tagged with: html-table
has body: I have a table with 100 entries for example. Now, as soon as the user clicks on a button, all table-entries (tr-tag) should hide and only 20. to 29. tr should be shown. How can I do that? What I found out: $('table tbody tr').eq(20).show(); This jQuery snippet finds me the 20th element of the table, but how can I tell jQuery, show 20-29? I don't want to hardcode it.
tagged with: jquery-selectors
downvote count: 0
answer count: 1
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43062698
favorite count: 0
linked to: http://stackoverflow.com/q/185966
has answer: http://stackoverflow.com/a/27299472
duplicate of: http://stackoverflow.com/q/185966
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/q/27165228
has comment: http://stackoverflow.com/comment/42822697
has comment: http://stackoverflow.com/comment/42822752
linked to: http://stackoverflow.com/q/7695044
has comment: http://stackoverflow.com/comment/42822867
has body: I am really confused. This piece of code works as fine as it should be on the local server on my computer. But after I uploaded it to my hostgator server, this function is not being executed anymore, since when I set the break point on firefox debugger, this function is not get called when I clicked on the class called deck-title. Yet locally, the break point do work and the function is called. // when click the decks, the current deck should change $(document).ready(function() { $(".deck-title").click(function() { var deckTitle = $(this).text(); $("#current-deck-span").html(deckTitle); if (deckTitle !== current_deck_global) { var deckID = getDeckIDFromTitle(deckTitle); updateDisplayingDeck(current_userID, deckID); } current_deck_global = $(this).text(); }); }); Any ideas on this click(function()? I mean, every other JQuery code worked fine on the hostgator server, except this one... Here is the in my web page: I am loading the JQuery script first before other script. So $(document).ready(function()) should work (I also checked by giving every css element a border after document is ready, and yea, the borders are shown. I really appreciate any help! Thanks!
has comment: http://stackoverflow.com/comment/42822635
type: Question
has comment: http://stackoverflow.com/comment/42822730
downvote count: 4
has comment: http://stackoverflow.com/comment/42822796
has comment: http://stackoverflow.com/comment/42822812
tagged with: javascript
has answer: http://stackoverflow.com/a/27165466
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42822841
has comment: http://stackoverflow.com/comment/42822762
answer count: 3
has answer: http://stackoverflow.com/a/27165465
has answer: http://stackoverflow.com/a/27165369
possible better answer: http://stackoverflow.com/a/27165466
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42822837
has comment: http://stackoverflow.com/comment/42822652
score: -3
has comment: http://stackoverflow.com/comment/42822753
upvote count: 1
has title: JQuery .click(function(){}) works locally but not on the server
has comment: http://stackoverflow.com/comment/42822717
has comment: http://stackoverflow.com/comment/42823087
accepted answer: http://stackoverflow.com/a/27165369
has comment: http://stackoverflow.com/comment/42822915
type: AnsweredQuestion

http://stackoverflow.com/comment/42988398
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27257336
has text: Is it a typo here or did you miss the `$`? `("#csvbtn")` should be `$("#csvbtn")` or `jQuery("#csvbtn")`. And what does your console say? Any errors?
score: 0

http://stackoverflow.com/comment/43122874
comment on: http://stackoverflow.com/a/27312431
score: 0
type: AnswerComment
type: Comment
has text: Hello, I have finished the form and completed the inserts for db. I only have a problem left now. As soon as I select the first box (provincie) an insert into database is done. The database insert needs to be done after making 3 selections from boxes and filling out several other boxes and press submitt. Any ideas on how to fix this ???

http://stackoverflow.com/a/27264352
has body: Since you want to replace the HTML here use $(this).html("new value");
answers question: http://stackoverflow.com/q/27264172
score: 0
type: Answer

http://stackoverflow.com/q/27304920
has comment: http://stackoverflow.com/comment/43090440
tagged with: javascript
score: 0
has body: I am referring to the documentation however it doesn't seem to work the way it is intended to. My code: $('#moveDown').click(function(){ $.fn.fullpage.moveSectionDown(); }); What i am trying to build is a clickable fixed element at the bottom right to navigate down each section for the user. It only seems to work with $.fn.fullpage.setAutoScrolling(true); set to true and with continuousVertical:true set to true and it wont move unless i scroll up and then click #moveDown. Any help out there? EDIT &lt;link rel="stylesheet" type="text/css" href="css/jquery.fullPage.css" /&gt; &lt;script&gt; //initialize fullpage scrolling $(document).ready(function(){ $('#fullpage').fullpage({ //Navigation menu: false, anchors: ['Home', 'Anonymous', 'Real Reviews', 'More', 'The App', 'Who'], autoScrolling:false, //Accessibility keyboardScrolling: true, //Design resize : false, }); //remove styles and scripts related to fullPage for mobile if (screen.width &lt; 479) { $.fn.fullpage.destroy('all'); $("section, .section, div").removeClass("mid-text"); } else{ $.fn.fullpage.reBuild('all'); } $('#moveDown').click(function(){ $.fn.fullpage.moveSectionDown(); }); }); &lt;/script&gt; This is how i have my full page code laid out. I checked my errors however there are just files i am not using. I removed those files and cleared some of the errors but cant seem to find the problem. The only thing i cant think is a conflict between plugins? UPDATE: In between each div with the class section i had &lt;div style="clear:both"&gt;&lt;/div&gt; which was the problem. Everything works perfect now.
has title: How to scroll down each section using fullpage.js
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43307711
tagged with: fullpage.js
answer count: 0
has comment: http://stackoverflow.com/comment/43322027
type: Question

http://stackoverflow.com/comment/42942593
has text: well, he's written, 'cannot even seem to get the alert to pop up' and I was able to replicate the situation only by accessing the page locally. But when I accessed it via python server, it worked. The one thing that I did overlook, however, is that there's a `'\` character in one of the JSON entries. My test json file was normal. So even if he were to try what i suggested, it still wouldn't have worked. PS: I did bother to read the question.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27232609
type: AnswerComment

http://stackoverflow.com/comment/42964988
type: Comment
has text: @MunanshuMadaan - I don't understand what doesn't work in my jsFiddle: http://jsfiddle.net/mpnraLzk/
comment on: http://stackoverflow.com/a/27227858
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47573353
score: 0
comment on: http://stackoverflow.com/a/27268741
has text: can you show me the code for computeItem function and postItem function ?
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27182549
type: Answer
has body: Write your function as below
has comment: http://stackoverflow.com/comment/42854725
score: 0
has comment: http://stackoverflow.com/comment/42854611
answers question: http://stackoverflow.com/q/27182451
accepted answer of: http://stackoverflow.com/q/27182451
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42854146

http://stackoverflow.com/q/27197053
tagged with: spring-mvc
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42879231
has title: angularjs $resource delete results in error
has comment: http://stackoverflow.com/comment/42879072
tagged with: javascript
tagged with: ajax
score: 0
tagged with: rest
has body: I'm trying to delete a resource using angular, which results in a SyntaxError in Chrome console. However, a correct server request is created and the resource does get deleted on the server. script: var libmsModule = angular.module('libmsModule', ['ngResource']); libmsModule.factory('Book', function($resource) { return $resource('/libms/books/:id', {id: '@id'}, { update: { method: 'PUT' } }); }); libmsModule.controller('BookCtrl', function($scope, Book) { $scope.deleteBook = function(index) { var bk = $scope.books[index]; $scope.book = new Book(); $scope.book.id = bk.id; $scope.book.$delete(function() { //console.log("deleting... " + index); //$scope.books.splice(index, 1); }); } $scope.books = Book.query(function(data) { }); }); html: Add Book {{book.id}} {{book.author}} {{book.title}} {{book.cost}} This results in: Request URL:http://localhost:8780/libms/books/44 Request Method:DELETE Server (Spring MVC): @RequestMapping(value = { "/books/{id}" }, method = RequestMethod.DELETE) public ResponseEntity<String> deleteBook(@PathVariable("id") Integer id, Model model) throws Exception { logger.entry(); bookSvc.deleteBook(new Book(id)); logger.exit(); return new ResponseEntity("Book deleted", HttpStatus.OK); } And the book is deleted accordingly, however the following is shown in the console: The response tab (chrome console) says: Book deleted. Do I need to add something for delete to the Book Factory?
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42879067
has comment: http://stackoverflow.com/comment/42879157

http://stackoverflow.com/a/27220296
has body: I have changed the approach to this problem by simply updating the subscription to subscribe to posts earlier than the currently loaded date. It is working, although seems like there should be a better way than having to waitOn the subscription when I want to load more.
answers question: http://stackoverflow.com/q/27162146
score: 0
type: Answer

http://stackoverflow.com/comment/42824295
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27165743
type: Comment
has text: Please see my updated post ..I have shared code..Where i can put your code so that i can see the dialogue box on page load

http://stackoverflow.com/comment/42908978
type: AnswerComment
type: Comment
has text: @Alexwood Are you using CakePHP by any chance? If so, try $this->header("Content-Type: text/javascript"); and $this->["url"]["callback"] . "(" . json_encode($data) . ")";
comment on: http://stackoverflow.com/a/27213828
score: 0

http://stackoverflow.com/comment/42831644
type: Comment
has text: _"I can use a for loop on filters array and within this for loop I can use another for loop to go over items array. I dont want this apporach"_ - Why?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27170380

http://stackoverflow.com/comment/42973931
has text: Can you show your HTML and maybe the Javascript as well. And what do you mean by the "the other styles of other tabs get all messed up"? - please be more specific.
comment on: http://stackoverflow.com/q/27249419
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27302184
score: -1
upvote count: 0
has body: I am not sure what are you trying to do. But since you are already injected $http services in your controller, you can directly use is in controller. .controller('Ctrlajax', ['$scope', 'version','$sce', '$resource', '$http',function ($scope, version,$sce,$resource,$http) { $scope.answer = 'Ожидание ответа от сервера.....'; $http.get(path+'res.php').success(function(data){ $scope.answer = data; }); }]) If you want to separate the logic, use custom services instead of require. Then inject the services to your controller to use it.
type: Answer
answers question: http://stackoverflow.com/q/27301932
downvote count: 1

http://stackoverflow.com/comment/43087909
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27313479
has text: Is there a work around or a possible fix??
score: 0

http://stackoverflow.com/comment/42923690
has text: thanks! i already got the answer before your post..:D Anyway thanks..:D
type: AnswerComment
comment on: http://stackoverflow.com/a/27221920
type: Comment
score: 0

http://stackoverflow.com/a/27216940
has body: Test this : Activate CORS (Cross-Origin Request) on your server. Apache example : in your .htaccess file Header set Access-Control-Allow-Origin "*" Or in code PHP header("Access-Control-Allow-Origin: *");
answers question: http://stackoverflow.com/q/27215641
type: Answer
score: 0

http://stackoverflow.com/q/27254134
score: 0
has title: AngularJS. Decorating model
tagged with: http://stackoverflow.com/tag/json
answer count: 1
accepted answer: http://stackoverflow.com/a/27254256
tagged with: javascript
type: AnsweredQuestion
tagged with: decorator
tagged with: angularjs
has answer: http://stackoverflow.com/a/27254256
has body: Backend returns json like this: [ { id: 1, name: "the name", countryIds: [ 1,2,3] }, ... ] As you can see there is countryIds property. On client side I already have cached country names with corresponding IDs: [ { id: 1, name: "USA" }, { id:2, name: "France" }... ] , so when retrieving this objects I just add new countries property where I assign country names: obj.countries = getCountryNamesByIds(obj.countryIds); so my initial object then looks like this: { id: 1, name: "the name", countryIds: [ 1,2,3], countries: ["USA", "France", "England"] } The problem is that when sending object to the server after updating (using PUT method) I don't want to send to the server the countries property. How I can handle this situation in more elegant way? To my mind comes few options: 1.When sending object to the server just remove all unnecessary properties (bad way, because if new property will be added to JSON then I need to apply same changes in controller logic too); 2.Don't decorate object with new countries proeprty, and expose some application-level methods like $rootScope.getCountryNamesByIds = getCountryNamesByIds; and then use it in templates: Countries {{getCountryNamesByIds(obj.countryIds)}} 3.Don't decorate object with new countries proeprty, and create directive called countryNameswhich will generate country names from country IDs (as in point 2): // There will be shown country names generated from their IDs How you think, what option is more elegant? Or what is other way to solve my challenge?
type: Question

http://stackoverflow.com/comment/42803163
comment on: http://stackoverflow.com/q/27154403
type: Comment
type: QuestionComment
has text: There are multiple duplicates... http://stackoverflow.com/questions/19369023/should-i-be-using-void-0-or-undefined-in-javascript Older versions used void 0
score: 0

http://stackoverflow.com/a/27258549
has comment: http://stackoverflow.com/comment/42991172
has comment: http://stackoverflow.com/comment/42990945
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27258398
score: 1
has comment: http://stackoverflow.com/comment/42991102
has comment: http://stackoverflow.com/comment/42991476
has comment: http://stackoverflow.com/comment/42991275
has comment: http://stackoverflow.com/comment/42990985
downvote count: 0
has body: You can use a simple array join, assuming I am reading this correctly. Try ingArrayTest.join("\n") ... in place of ingArrayTest above. Spaces could be used in place of the '\n' ... BASED ON DISCUSSION, try: var ingArrayTest = ["Milk", "Soy Milk", "Apple"]; var ingString = ingArrayTest.join(" "); $("#container").append("&lt;input type='text' id='ingredients' value='" + ingString + "'&gt;"); ...note the single quotes near value. Watch single quotes versus double; very important.

http://stackoverflow.com/comment/42984887
type: Comment
comment on: http://stackoverflow.com/a/27255190
has text: Wow, I was searching for that (simple) mistake like the whole day... At least I hope my answer will help others.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43177184
has text: @arturgrzesiak I'll edit my question to include the directive shortly.
score: 0
comment on: http://stackoverflow.com/q/27303692
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27233029
has answer: http://stackoverflow.com/a/27233124
upvote count: 2
has comment: http://stackoverflow.com/comment/42942780
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42942857
accepted answer: http://stackoverflow.com/a/27233124
answer count: 1
downvote count: 0
favorite count: 0
has body: I have a piece of code that listens for copy event, displays some animation (i.e: "successfully copied!"), and then unfocuses the text field. $('.textfield').on('copy', function() { doAnimation(); this.blur(); }); The problem that I'm running into is that this event is triggered before the text is copied to the clipboard so the blur() call causes the text selection to be lost and nothing copied onto the pasteboard. Is there anyway to have this event triggered after the text is copied?
has title: JavaScript - onCopy event and blur
type: AnsweredQuestion
score: 2

http://stackoverflow.com/a/27236892
answers question: http://stackoverflow.com/q/27236480
has body: You can use CSS's clip-path property to display the section of the video. You'll need to define inline svg clipPath element, add a path element with co-ordinates, give the clipPaths the ids and use them in your CSS to clip the video(clip-path: url(#id)). Fiddle HTML: <path d="M0,0 L640,0 L640,480 L0,480z" /> <path d="M212,0 L852,0 L852,480 L212,480z" /> <path d="M106,0 746,0 746,480 106,480z" /> <path d="M212,140 532,140 532,380 212,380z" /> CSS: #clip-1 { position: absolute; -webkit-clip-path: url(#one); clip-path: url(#one); } #clip-2 { position: absolute; top: 480px; -webkit-clip-path: url(#two); clip-path: url(#two); } #clip-3 { position: absolute; top: 960px; -webkit-clip-path: url(#three); clip-path: url(#three); } #clip-4 { position: absolute; top: 1440px; -webkit-clip-path: url(#four); clip-path: url(#four); } body { margin: 0 auto; }
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42950910
has comment: http://stackoverflow.com/comment/42955259
score: 3
has comment: http://stackoverflow.com/comment/42950845
upvote count: 3

http://stackoverflow.com/q/27199360
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42883003
upvote count: 1
has comment: http://stackoverflow.com/comment/42882870
has answer: http://stackoverflow.com/a/27199459
has title: Why the variable is not defined?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27199509
has body: Here invoke calcArea function, the function scope should be in the scope of the definition of it, but its scope has variables sideLength, why error? var square = { sideLength: 6, calcArea: function () { console.log(sideLength * sideLength); } }; square.calcArea(); Can you help me? and var square = { sideLength: 6, calcArea: function () { console.log(this.sideLength * this.sideLength); } }; square.calcArea(); this is ok, sorry for my bad english.
score: 1
possible better answer: http://stackoverflow.com/a/27199459
accepted answer: http://stackoverflow.com/a/27199509
type: Question
answer count: 2

http://stackoverflow.com/q/27247923
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: ajax
has answer: http://stackoverflow.com/a/27248038
has title: call code behind function from JS using DOM
type: Question
tagged with: asp.net
has body: Would like to call a code behind method from my JS page. have looked at few examples on the site but cant seem to get it working. Tried function () { ReloadUploadedImages_click();, also AJAX. On my JS page I am using DOM elements to create a button and display it on screen inside the 'DivHolding2Tabs' var button = document.createElement("input"); button.type = "button"; button.id = "myBtn"; button.value = "im a button"; DivHolding2Tabs.appendChild(button); When the button is clicked I want to call the ReloadUploadedImages_click(); on the MapUserControl.ascx.cs So far iv tried: button.onclick = function () { ReloadUploadedImages_click(); }; &amp; //button.addEventListener("click", myFunction); function myFunction() { alert("BEFORE"); //ReloadUploadedImages_click(); // PageMethods.ReloadUploadedImages_click(); $.ajax({ type: "POST", url: 'MapUserControl.ascx/ReloadUploadedImages_click', data: "", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { alert("SUCCESS"); }, error: function (e) { alert("fail"); } }); alert("AFTER"); } Can't get it working. Anyone have any idea as to what is wrong?
answer count: 3
has answer: http://stackoverflow.com/a/27248170
score: 0
has answer: http://stackoverflow.com/a/27248089

http://stackoverflow.com/q/27155162
accepted answer: http://stackoverflow.com/a/27155971
tagged with: angularjs
upvote count: 3
tagged with: angular-directive
type: AnsweredQuestion
score: 3
has title: Difference between bo-html and bo-text
tagged with: bindonce
type: Question
has body: While reading the documentation of the bindonce directive, I wonder what is the difference between bo-htmland bo-text. bo-html: evaluates "markup" and render it as html inside the element bo-text: evaluates "text" and print it as text inside the element So, I expected this code to work: But I got this: Error: [$parse:syntax] Syntax Error: Token '<' not a primary expression at column 1 of the expression being a basic markup, isn't it? If this can't work (maybe a syntax issue..), what is the real difference between bo-text and bo-html?
has answer: http://stackoverflow.com/a/27155971
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/27255139
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42984247
has answer: http://stackoverflow.com/a/27255408
tagged with: php
answer count: 4
possible better answer: http://stackoverflow.com/a/27255299
linked to: http://stackoverflow.com/q/8551754
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27255420
linked to: http://stackoverflow.com/q/1077041
type: Question
has answer: http://stackoverflow.com/a/27255368
accepted answer: http://stackoverflow.com/a/27255368
has body: I am learning to use JQuery and PHP. I simply want to display a text and an PHP generated image on a browser at a specific interval. HTML Page: Testing PHP loadPHP page <?php $rannum = mt_rand(1,100); echo $rannum; $thick = 10; // create a 200*200 image $img = imagecreatetruecolor(200, 200); // Add antialias imageantialias ($img, true); // allocate some colors $white = imagecolorallocate($img, 255, 255, 255); // draw the dashed circle for($t = 1;$t<($thick+1);$t++) { for($i = 0;$i<360;$i+=10) { imagearc($img, 100, 100, 200-($t/5), 200-($t/5), $i, $i+5, $white); imagearc($img, 100, 100, 200+($t/5), 200+($t/5), $i, $i+5, $white); } } // output image in the browser header("Content-type: image/png"); imagepng($img); // free memory imagedestroy($img); ?> When I call up the HTML Page I get this: The Random number seems to be working fine. I do see it changing every two seconds, but the image is all screwed up. All I see is binary characters. Is this because you can only return image from PHP and absolutely no TEXT along with the image? How can I fix this?
tagged with: javascript
tagged with: jquery
tagged with: image
has answer: http://stackoverflow.com/a/27255299
has title: Can a text and an Image be displayed on a browser using JQuery and PHP?

http://stackoverflow.com/comment/42828944
comment on: http://stackoverflow.com/q/27160814
score: 0
has text: And why are you even using `example3.css`? That's the code for the fullPage.js example website. You can use your own css styles.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27172416
has comment: http://stackoverflow.com/comment/42840208
has comment: http://stackoverflow.com/comment/42840134
type: Answer
has comment: http://stackoverflow.com/comment/42836816
answers question: http://stackoverflow.com/q/27172383
upvote count: 4
has comment: http://stackoverflow.com/comment/42839972
score: 4
has comment: http://stackoverflow.com/comment/42836496
has body: The error is in both versions of the JSON. You are missing the " at the start of the string c. http://jsonlint.com/ will help you track down where errors in JSON occur. As a rule of thumb, you should create JSON using a JSON serializer in a mature library and not by hand or string concatenation. Now i have like this in my json file That's completely wrong. The code you had in "Now i want to achieve like this" was right (aside from the error mentioned above).
downvote count: 0
has comment: http://stackoverflow.com/comment/42839859
has comment: http://stackoverflow.com/comment/42835585

http://stackoverflow.com/a/27246977
accepted answer of: http://stackoverflow.com/q/27244799
has comment: http://stackoverflow.com/comment/43004583
answers question: http://stackoverflow.com/q/27244799
has comment: http://stackoverflow.com/comment/42980938
score: 0
type: AcceptedAnswer
type: Answer
has body: It seems Parse do not provide a easy way to do this. Without any other fields, if you know all the items then you could do the following: var innerQuery = new Parse.Query('Item'); innerQuery.containedIn('relatedItems', [all items except someItem]); var query = new Parse.Query('Item'); query.equalTo('relatedItems', someItem); query.doesNotMatchKeyInQuery('objectId', 'objectId', innerQuery); ... Otherwise, you might need to get all records and do filtering. Update Because of the data type relation, there are no ways to include the relation content into the results, you need to do another query to get the relation content. The workaround might add a itemCount column and keep it updated whenever the item relation is modified and do: query.equalTo('relatedItems', someItem); query.equalTo('itemCount', 1);

http://stackoverflow.com/comment/42944110
has text: The original code would either show ALL divs or hide ALL divs.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27233578

http://stackoverflow.com/a/27196820
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27196557
has comment: http://stackoverflow.com/comment/42878587
has comment: http://stackoverflow.com/comment/42878885
type: Answer
has comment: http://stackoverflow.com/comment/42878705
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42879058
has comment: http://stackoverflow.com/comment/42879027
has comment: http://stackoverflow.com/comment/42878611
has comment: http://stackoverflow.com/comment/42878949
answers question: http://stackoverflow.com/q/27196557
has body: UPDATE: http://jsfiddle.net/rpxr4bjj/3/ $('.lvl').each(function () { var level = $(this).text(); $(this).animate({ width: level + '%', }, { progress: function () { if (level &lt; 80) { $(this).css('background-color', 'blue'); } else if (level &gt; 80) { $(this).css('background-color', 'yellow'); } } }, 3000); });
upvote count: 1
has comment: http://stackoverflow.com/comment/42878789

http://stackoverflow.com/comment/42935093
comment on: http://stackoverflow.com/a/27228757
type: Comment
has text: just change the selector `a:focus ~ div` to a class say `div.myclass`. Now apply this class in your code.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27412596
type: Answer
answers question: http://stackoverflow.com/q/27237324
has body: Look there : https://github.com/coffee-mug/tornado-sockjs-revealjs It will allow you to have your presentation updated in realtime on every kind of devices as you want :) Disclaimer: I am the owner of the repo :p It uses python Tornado for the backend but you can do exactly the same thing with javascript if you prefer. It's simple : I just adapted the code (full JS) of that tutorial to make it work with Tornado : http://www.sitepoint.com/create-multi-user-presentation-reveal-js/ Hope it'll help. By the way, if you eventually decide to use my repo, do not hesitate to ask me for help or to criticize it :)
score: 0

http://stackoverflow.com/a/28382346
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27167472
score: 1
accepted answer of: http://stackoverflow.com/q/27167472
has comment: http://stackoverflow.com/comment/45103599
type: AcceptedAnswer
has body: I had the same problem and I found a way to do it. I'm not sure its the correct way (I'm still very new to fabricjs!) but it does seem to work, at least for the trivial case. Basically the canvas isn't defined in initialise, but it is defined in _render, so if you set up your event handling code in there it should work :). It looks like this : _render: function(ctx) { this.callSuper('_render', ctx); // custom rendering code goes here ... this.canvas.on('mouse:down', function(e) { console.log('mouse down ' + e); }); } I updated your jsfiddle to demonstrate, it logs mouse clicks (mouse:down event) to the console (you get several events fired for one click so alert is pretty annoying - reckon you can stop it with cancelbubble or something but to keep it simple haven't bothered for the example) - http://jsfiddle.net/czcsj2fw/6/ HTH!

http://stackoverflow.com/a/48265680
type: Answer
answers question: http://stackoverflow.com/q/27173272
has comment: http://stackoverflow.com/comment/102352962
has body: You may not use FastClick.js nowadays: Note: As of late 2015 most mobile browsers - notably Chrome and Safari - no longer have a 300ms touch delay, so fastclick offers no benefit on newer browsers, and risks introducing bugs into your application. Consider carefully whether you really need to use it. (Taken from: https://github.com/ftlabs/fastclick docs)
score: 0

http://stackoverflow.com/comment/43068346
comment on: http://stackoverflow.com/q/27279488
has text: Are you sure this issue is triggered by Perf? In your error message nothing indicates to it. Do you output `counts` value somewhere in HTML?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27221694
has comment: http://stackoverflow.com/comment/42994926
type: AcceptedAnswer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27221604
answers question: http://stackoverflow.com/q/27221604
type: Answer
has comment: http://stackoverflow.com/comment/43002518
has comment: http://stackoverflow.com/comment/42922763
has comment: http://stackoverflow.com/comment/42999441
score: 6
has comment: http://stackoverflow.com/comment/85657257
has comment: http://stackoverflow.com/comment/42922236
downvote count: 0
has body: You could use mutation observers to restore the old attribute value. new MutationObserver(callback) .observe(elem, {attributes: true, attributeOldValue: true}); function callback(mutations, observer) { var target = mutations[0].target; observer.disconnect(); mutations.forEach(function(mutation) { target.setAttribute(mutation.attributeName, mutation.oldValue); }); observer.observe(target, {attributes: true, attributeOldValue: true}); } Thanks to @DoctorDestructo for the suggestions involving observer.disconnect which are necessary to avoid an infinite loop.
has comment: http://stackoverflow.com/comment/42989961

http://stackoverflow.com/comment/42849641
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27180572
has text: I can see it working on the demo (follow the link) - I added different sizes to make sure I could tell the difference between them - do you now see it working in the demo?

http://stackoverflow.com/a/27205283
answers question: http://stackoverflow.com/q/27205249
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27205249
upvote count: 2
type: Answer
score: 2
has body: I suppose your object look like this. and you need get member property, var myObject = { parameter: { member: {} } } this code should solve you problem var value = myObject.parameter[name];

http://stackoverflow.com/q/27281537
has answer: http://stackoverflow.com/a/27281626
type: Question
has body: So I've been using HTML canvas and Javascript to create random images. Most of it is running pretty smoothly, but recently I've been encountering problems. I am trying to add a user interface where users can create upper and lower bounds for the red, green and blue values of the pixels, as well as change the size of the pixels. The colors are giving me trouble. For some reason, the following function: function getRandomInt(min,max){ return Math.floor(Math.random() * (max - min + 1)) + min; } is returning values greater than max. I haven't quite been able to figure out why yet. For more information, @max and @min are sourced from &lt;input type="number"&gt; tags with code like: rmax = document.getElementById('rmax').value; in another function. Then, they are stored in an array of arrays of arrays (I know that is messy memory wise, but the array size should never be horribly large so it's not a problem for that reason currently.). IE: var height = canv.getAttribute("height"); var width = canv.getAttribute("width"); var tall = Math.floor(height/blockh)+1; var wide = Math.floor(width/blockw)+1; var mat = new Array(wide); for(var i = 0; i&lt;wide; i++){ mat[i] = new Array(tall); } for(var i = 0; i&lt;wide; i++){ for(var j = 0; j&lt;tall; j++){ r = getRandomInt(rmin,rmax); g = getRandomInt(gmin,gmax); b = getRandomInt(bmin,bmax); mat[i][j] = new Array(4); mat[i][j][0] = r; mat[i][j][1] = g; mat[i][j][2] = b; mat[i][j][3] = false; } } Finally, I run through mat and draw each pixel using canvas: for(var i = 0; i&lt;wide; i++){ for(var j = 0; j&lt;tall; j++){ drawBlock(ctx,mat[i][j][0],mat[i][j][1],mat[i][j][2],(i*blockw),(j*blockh)); mat[i][j][3] = true; } } //more code function drawBlock(canv,r,g,b,x,y) { color = "rgba("+r+","+g+","+b+","+"1)"; canv.beginPath(); canv.fillStyle=color; canv.moveTo(x,y); canv.lineTo(x+blockw,y); canv.lineTo(x+blockw,y+blockh); canv.lineTo(x,y+blockh); canv.lineTo(x,y); canv.fill(); canv.closePath(); } By the nature of the &lt;input&gt; tags, …
tagged with: arrays
tagged with: javascript
tagged with: random
downvote count: 0
accepted answer: http://stackoverflow.com/a/27281626
answer count: 1
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43031736
has title: (Math.random()*x)+y returns numbers greater than x+y
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/43082814
type: Comment
type: QuestionComment
has text: You should really just use the placeholder attribute.
comment on: http://stackoverflow.com/q/27310990
score: 0

http://stackoverflow.com/q/27202752
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/27203067
accepted answer: http://stackoverflow.com/a/27203067
has body: If I want to use Adobe build cloud for my Phonegap application should I commit the vendor js files like jquery-mobile in my git repository? Is there a way to avoid it like specifying dependencies?
answer count: 1
tagged with: javascript
has title: Phonegap - Should I include JS vendor files in my git repository?
favorite count: 0
tagged with: adobe
tagged with: cordova

http://stackoverflow.com/q/27175588
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27175620
accepted answer: http://stackoverflow.com/a/27177611
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27175620
tagged with: javascript
tagged with: jquery
has title: Is there a simpler to add multiple classes to different divs jquery
score: 0
has comment: http://stackoverflow.com/comment/42840800
has body: I am fading out a different divs on click for certain period of time at the moment I have a single function for each operation, I have named them .fade-a, .fade-b, .fade-c etc. Surely there must be a better way to do this as at the moment I just have along list that seems bloated. Sorry if I am not explaining this very well I don't use much jQuery. Thanks $('.fade-a').click(function() { $('.fade-a').addClass('fade'); var delay = setTimeout(function() { $(".fade-a").removeClass("fade"); }, 1000) }); $('.fade-b').click(function() { $('.fade-b').addClass('fade'); var delay = setTimeout(function() { $(".fade-b").removeClass("fade"); }, 1000) }); $('.fade-c').click(function() { $('.fade-c').addClass('fade'); var delay = setTimeout(function() { $(".fade-c").removeClass("fade"); }, 1000) }); $('.fade-d').click(function() { $('.fade-d').addClass('fade'); var delay = setTimeout(function() { $(".fade-d").removeClass("fade"); }, 1000) }); HTML: CSS: .fade-a, .fade-b, .fade-c, .fade-d, .fade-e, .fade-f, .fade-g, .fade-h, .fade-i { -webkit-transform: scale(1); -ms-transform: scale(1); -o-transform: scale(1); transform: scale(1); -webkit-transition: all 0.5s ease-in; -moz-transition: all 0.5s ease-in; -ms-transition: all 0.5s ease-in; -o-transition: all 0.5s ease-in; transition: all 0.5s ease-in; } .fade-a.fade, .fade-b.fade, .fade-c.fade, .fade-d.fade, .fade-e.fade, .fade-f.fade, .fade-g.fade, .fade-h.fade, .fade-i.fade { -webkit-transform: scale(0); -ms-transform: scale(0); -o-transform: scale(0); transform: scale(0); }
favorite count: 0
has answer: http://stackoverflow.com/a/27177611
has comment: http://stackoverflow.com/comment/42840499

http://stackoverflow.com/q/27180514
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42875001
has comment: http://stackoverflow.com/comment/42850204
has title: How do I stop Visual Studio 2013 from removing the spaces I've added to line code up?
tagged with: visual-studio-2013
tagged with: coding-style
answer count: 0
type: Question
has body: VS's autoformat settings appear to remove the spaces I add to line things up visually. So, if I have: var CANVAS_MARGIN = 10; CENTROID_INTERNAL_RADIUS = 10, FLUX_CAP_MFAD = 7, Then, when I press enter, it strips the spaces so that I wind up with: var CANVAS_MARGIN = 10; CENTROID_RADIUS = 10, FLUX_CAP_MFAD = 7, I've looked through the JavaScript and General settings for formatting under "Editor" preferences, but can't seem to find a setting to alter this. Many thanks, Dave
tagged with: javascript
has comment: http://stackoverflow.com/comment/42849518
score: 0

http://stackoverflow.com/q/27256128
has answer: http://stackoverflow.com/a/27401505
accepted answer: http://stackoverflow.com/a/27401505
type: AnsweredQuestion
has title: Custom events versus callbacks in ReactJS
downvote count: 0
type: Question
has body: I'm new to ReactJS and I'm trying to figure out how to store and manipulate global state. For example, I'm writing an editor app that has some global state: selected color/background, active tool, current selection, etc. I'm thinking about having a root interface component to store this information, and I'm ok with explicitly passing the state around using properties. I guess the idiomatic way for a children component to change global state is calling a callback received from the parent - personally I find this a bit annoying. Instead, I'm firing custom events at the children and setting listeners on the parent. So far it is working really well, but I looked at a lot of sample code and never saw people using this pattern. Is there any practical consequences I should consider?
score: 3
has comment: http://stackoverflow.com/comment/42996212
has comment: http://stackoverflow.com/comment/43153043
has comment: http://stackoverflow.com/comment/42992747
upvote count: 3
tagged with: reactjs
answer count: 1
tagged with: javascript
tagged with: dom-events
tagged with: callback
favorite count: 0
has comment: http://stackoverflow.com/comment/42988736

http://stackoverflow.com/comment/42904896
has text: view source of page. and open jquery link...it might be path issue
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27212023

http://stackoverflow.com/a/27250370
has body: This should work: $('.affiliation_add a.pl').click(function(e) { e.preventDefault(); $('#affiliation').append(' @foreach( $affiliation_array as $state_js ) {{ $state_js->value }} @endforeach '); num2++ }); $('.affiliation_add a.mi').click(function (e) { e.preventDefault(); if ($('#affiliation select').length > 1) { $('#affiliation').children().last().remove(); } }); You can copy and paste that into you project. You should just remember to change the variable name $state_js to any other name you like, or you could still leave it as that if you dont mind.You can also decide to add the option name and value to the option i put there. For example: value }}> {{ $state_js->value }}
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27249351
type: Answer
accepted answer of: http://stackoverflow.com/q/27249351

http://stackoverflow.com/comment/43016708
has text: That's a completely different task but I hope that my answer pointed you to the right direction :) You now have to make room for 2 bars per existing bar instead of 1 right now. Playing with the x attribute and the width should do the trick if I understood correctly your explanation.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27272835
type: AnswerComment

http://stackoverflow.com/comment/42877604
score: 0
type: Comment
type: QuestionComment
has text: Please describe in more detail what the problem is. Also, specify any PHP errors and JavaScript errors you get. That is: enable error reporting in PHP, and inspect the console tab of the developer tools in your browser.
comment on: http://stackoverflow.com/q/27194907

http://stackoverflow.com/a/27262787
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27262457
type: AcceptedAnswer
downvote count: 0
has body: Just have to iterate on each image and add magic's to each one. Then, you only have to click on each image to open the popup. Working fiddle function popnow(){ $('.image-popup-vertical-fit').each(function(){ var image = $(this).attr('src'); $(this).magnificPopup({ type: 'image', closeOnContentClick: true, mainClass: 'mfp-img-mobile', image: { verticalFit: true }, items: { src: image } }); }); } // Init function popnow(); PS: I've used the plugin from a CDN. When using jsfiddle, try to load your plugins or libraries from a CDN, not from the workspace.
accepted answer of: http://stackoverflow.com/q/27262457
type: Answer

http://stackoverflow.com/q/27276370
has comment: http://stackoverflow.com/comment/43022819
type: Question
tagged with: c#
tagged with: http://stackoverflow.com/tag/json
tagged with: jqgrid
has title: jqGrid - loading values from JSON
accepted answer: http://stackoverflow.com/a/27278087
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a jqGrid working OK using the local datatype, but I now want the values to be loaded via json but having trouble changing it. This is my jqGrid code jQuery("#grid").jqGrid({ datatype: "json", url: "/controller/getItems?id=2", width: 1405, colNames: ['id', 'surname'], colModel: [ { name: 'id', index: 'id', editable: false, hidden: false, hidedlg: true }, { name: 'surname', index: 'surname', editable: true } ], onSelectRow: function (id, status, e) { ... }, editurl: url, ... So the method to get the JSON is sucessfully fired. [HttpGet] public ActionResult getItems(string id) { List&lt;model&gt; items = method.getItems(id); string jsonText = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(items); return Json(jsonText, JsonRequestBehavior.AllowGet); } The column names in the JSON do match the colModel names Example of the json being returned - what the object jsonText above contains [{"id":434,"surname":"Woods"}, {"id":435,"surname":"Adams"}] Is there anything I have done wrong or am missing? Thanks
has comment: http://stackoverflow.com/comment/43022767
has comment: http://stackoverflow.com/comment/43025801
has answer: http://stackoverflow.com/a/27278087
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/27252467
score: 2
has body: If you are trying to assign the store name to a variable; var greeting = '{{config path="general/store_information/name"}}'; You can also create your own custom variable in admin: system > custom variables (from top menu), and call those in cms blocks or pages with; {{customvar code="my_custom_var"}} By the way, you shouldn't be adding the html and body tags to cms blocks.
accepted answer of: http://stackoverflow.com/q/27251854
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27251854
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/a/27232412
has comment: http://stackoverflow.com/comment/42941651
has comment: http://stackoverflow.com/comment/42941746
has comment: http://stackoverflow.com/comment/42942477
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27232155
answers question: http://stackoverflow.com/q/27232155
score: 0
has comment: http://stackoverflow.com/comment/42941607
type: Answer
has comment: http://stackoverflow.com/comment/42942128
has comment: http://stackoverflow.com/comment/42941836
has comment: http://stackoverflow.com/comment/42942010
has comment: http://stackoverflow.com/comment/42942134
has comment: http://stackoverflow.com/comment/42941957
has comment: http://stackoverflow.com/comment/42942614
has body: If you want to change the color of each character, you will have to wrap each character in its own element. You could solve it using s: var string = "My String"; var result = ""; /* Let's run through each letter and wrap it in a span. */ for(var i = 0; i < string.length; i++){ var color = getRandomColor(); result += '' + string[i] + ''; } /* Now write it to the document. It might be safer to add it to an existing ID as innerHTML because you might want to have control over this huge list of elements. */ document.write(result); This is not very good performance wise when the strings get very long, though. Heres a little improvement to your getRandomColor() function: function getRandomColor() { /* You don't need to split, as strings are already arrays (of characters, that is) */ var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++ ) { color += letters[Math.floor(Math.random() * 16)]; } return color; }

http://stackoverflow.com/comment/42856385
score: 0
type: Comment
type: QuestionComment
has text: You can use ajax to check the value of a php variable.
comment on: http://stackoverflow.com/q/27184612

http://stackoverflow.com/comment/43000301
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27262404
has text: which device you are using? clearcache or clearsessioncache is only for Android.

http://stackoverflow.com/comment/42829388
score: 3
type: Comment
type: QuestionComment
has text: I'd appreciate it if the person who down voted, at least specify explain my stupidity...
comment on: http://stackoverflow.com/q/27169042

http://stackoverflow.com/q/27218843
tagged with: css
type: AnsweredQuestion
has title: jquery ui bounce effect causing elements to fall out of place
type: Question
tagged with: jquery-ui
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27218909
answer count: 1
has body: I want to create a bounce effect but when I hover the mouse over the area the elements fall out of place. How do I ensure they stay in a line? I have three icons in a row like this %span =link_to image_tag("icons/github_alt.svg", class: '') %span =link_to image_tag("icons/last.fm.svg", class: '') %span =link_to image_tag("icons/soundcloud.svg", class: '') http://jsfiddle.net/tkn02tut/ Thanks
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27218909
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27278666
linked to: http://stackoverflow.com/q/15421669
has answer: http://stackoverflow.com/a/27278919
answer count: 2
tagged with: javascript
has title: focus on the same tab
tagged with: jquery
has body: I'm using jquery UI to create tabs. Requirement is when i select tab2 or any other tab and reload/refresh the page, focus should be on the selected tab. Please find the fiddle http://jsfiddle.net/CnEUh/500/ I have gone through many online forums but could not get the expected result. I followed the link Set Jquery ui active tab on page load/reload , but didn't got the result. Tried the below code : $(document).ready(function() { $("#tabs").tabs({active: tabs-2}); // Set active tab on page load var SelectedTab = tabs-2; if(tabSelectedId!=""){ $("#tabs").tabs({selected: tabSelectedId}); } }); Please suggest how can i keep the focus on the selected tab on page reload. My fiddle http://jsfiddle.net/CnEUh/500/
has answer: http://stackoverflow.com/a/27278752
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: tabs
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/27294136
score: 1
has comment: http://stackoverflow.com/comment/43053820
tagged with: ionic-framework
type: Question
has body: demo http://codepen.io/anon/pen/qEOJBp I can navigate from page 1 to page 2 by this link : GO but couldn't get back from page 2 to page 1 using Back? I wonder why? The code look flawless for me :
upvote count: 1
has title: Strange navigation behavior in angularjs with ionic framework
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43053407
accepted answer: http://stackoverflow.com/a/27294545
downvote count: 0
has answer: http://stackoverflow.com/a/27294545
has comment: http://stackoverflow.com/comment/43054487
type: AnsweredQuestion

http://stackoverflow.com/comment/42880994
has text: I have updated your code with 1,2,3,4 and changed the image to have 4 segments and now it doesn't work! is there anything else that needs to change apart from the amount of segments?! here is your code: http://jsfiddle.net/wf49mqaa/12/
comment on: http://stackoverflow.com/a/27193159
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27298212
answers question: http://stackoverflow.com/q/27298116
score: 0
has body: use this if ( username==null || username=="" &amp;&amp; password==null || password=="") instead of if ( username==null || username=="" &amp;&amp; password==null || password==""); and else ( username == "james1" &amp;&amp; password == "j1j22j3j" ) by else if ( username == "james1" &amp;&amp; password == "j1j22j3j" ) Hope you got success
type: Answer

http://stackoverflow.com/comment/43040837
has text: @CatherineGracey Also one thing that I missed to mention is the case of variable conflicts you mentioned. Dividing code into separate files **doesn't** make a difference as all javascript in a browser window gets executed in the same global `window` scope, you can take a look at articles on using `closures` to avoid globals and variable conflicts.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27246127
type: Comment

http://stackoverflow.com/comment/42924092
score: 0
type: Comment
type: QuestionComment
has text: It would be easier for us to help if you add a [Fiddle](http://www.jsfiddle.net/) or [Stack Snippet](http://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) to your post.
comment on: http://stackoverflow.com/q/27222681

http://stackoverflow.com/a/27231841
answers question: http://stackoverflow.com/q/27231806
score: 2
has body: Depends what you want to do with it. It's perfectly fine to leave it undefined, to set it to false, and if you plan to do some math with it, you can always set it to zero (0). Note that all of the above values are falsy, so the loose typing in JS make it matter even less. If you want to easily check whether it's been defined or not, then leave it undefined or false, but don't forget to compare by value AND type later to avoid errors: this.num = false; this.num == 0; // true - be careful with this this.num === 0; // false - the way to go
has comment: http://stackoverflow.com/comment/42940535
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27231806
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42941040
upvote count: 2
has comment: http://stackoverflow.com/comment/42940493
has comment: http://stackoverflow.com/comment/42940928

http://stackoverflow.com/q/27213551
tagged with: wordpress
has comment: http://stackoverflow.com/comment/42907542
has title: Tooltipster jQuery plugin doesn't work
has comment: http://stackoverflow.com/comment/42907486
has comment: http://stackoverflow.com/comment/42907607
type: Question
score: 0
tagged with: javascript
tagged with: jquery
has body: I'm using Tooltipster jQuery plugin in my WordPress theme but when I want to use it with HTML content it shows no result what's my problem? I wrote these in my main-function.js file jQuery(function($){ $(document).ready(function() { $('.tooltip').tooltipster( content: $('This text is in bold case !') ); }); }); HTML Sightly Newer This plugin works well but doesn't work with HTML content.
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27252942
upvote count: 10
has title: Open Source HTML5 Online Powerpoint Viewer
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38732870
tagged with: http://stackoverflow.com/tag/html
has body: I wondered if anyone is aware of any online powerpoint viewers that are open source? I've looked at http://www.accusoft.com/products/viewer/on-premise/info/overview/ which is the closest thing but it only works with web based documents, mine will be sitting behind an intranet firewall so now I've hit a blank. I've tried ViewerJS but this doesn't support PPT. If anyone could help me out with a js ppt viewer that is open source or has any other ideas then I would be very grateful Regards Sam
has comment: http://stackoverflow.com/comment/57281264
has comment: http://stackoverflow.com/comment/46689253
tagged with: powerpoint
tagged with: presentation
type: Question
score: 10
tagged with: javascript

http://stackoverflow.com/a/27187897
has body: If I'm following you, you want to ajax some JSON and create a list from that data? var data = json.data; var mylist = document.getElementById("myList"); for (var i = 0; i &lt; data.length; i++) { var listItem = document.createElement('li'); listItem.innerHTML = data[i].text; // assign data to new element html myList.appendChild(listItem); }
type: Answer
has comment: http://stackoverflow.com/comment/42862326
score: 1
downvote count: 0
upvote count: 1
answers question: http://stackoverflow.com/q/27187641

http://stackoverflow.com/comment/42944500
type: QuestionComment
comment on: http://stackoverflow.com/q/27195669
has text: @PatrickEvans Actually in the end I added a leading slash everywhere because the directives couldn't find the template when I had removed it.
score: 0
type: Comment

http://stackoverflow.com/comment/43081530
comment on: http://stackoverflow.com/q/27310014
has text: Your replacing all the contents of ` ` with what you return in the `Messages` method, so is `refreshedlist` the correct data? But why would you do this - your updating almost all of the page (hardly worth using ajax to update the DOM). Why not just save the message, and the append the new message to the DOM (and save having to call the database again also)?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43021839
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27276397
has text: Surely you would just have ``?
type: Comment

http://stackoverflow.com/q/27195589
answer count: 1
linked to: http://stackoverflow.com/q/1190642
has title: setTimeout with a local variable?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42876298
favorite count: 0
has comment: http://stackoverflow.com/comment/42876419
type: Question
has body: function doAnimation(element, stuff){ setTimeout(animate(element, stuff), 1000); } function animate(element, stuff) { } Is there a simple solution to my problem? I have looked all over the place but cannot find what I am looking for.
has answer: http://stackoverflow.com/a/27195608
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27195608
upvote count: 2
score: 0
has comment: http://stackoverflow.com/comment/42876570
downvote count: 2

http://stackoverflow.com/comment/89858064
type: QuestionComment
type: Comment
has text: have you found any solution yet to this ?
comment on: http://stackoverflow.com/q/27230385
score: 0

http://stackoverflow.com/q/27189676
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27189854
tagged with: css
has comment: http://stackoverflow.com/comment/42865457
has answer: http://stackoverflow.com/a/27189854
accepted answer: http://stackoverflow.com/a/27189751
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42865792
has comment: http://stackoverflow.com/comment/42865712
has answer: http://stackoverflow.com/a/27189835
has body: I have various elements and when I hover them, I want all of them to have a background with the exception of the first child. Here's my CSS selector: #OfficeUI .iconHolder img:hover:not(:first-child) { background-color: #CDE6F7; } What's wrong with this? Relevant HTML
has title: Apply hover on all elements except the first
type: Question
has comment: http://stackoverflow.com/comment/42865684
tagged with: javascript
has comment: http://stackoverflow.com/comment/42865822
tagged with: jquery
has answer: http://stackoverflow.com/a/27189751
has comment: http://stackoverflow.com/comment/42865420
score: 0
answer count: 3

series
tag name: series
type: Tag
tags question: http://stackoverflow.com/q/27153016

http://stackoverflow.com/q/27168591
type: Question
tagged with: polymer
tagged with: javascript
has title: Website only works completely when I cache refresh on Chrome, works fine on other browsers
score: 0
accepted answer: http://stackoverflow.com/a/27192873
answer count: 1
has body: having a bit of a weird bug. This just started happening in the last 2 days with Chrome only -- the website works fine with Firefox/Opera/IE11 etc. I have no code that messes with the caching of my website to my knowledge. I am using Google Polymer in order to load shadowDOM custom elements into my DOM. I have a script that still works fine for IE that detects whether the website is IE10 or below, and if it is, doesn't load the script, because if I load the platform.js in IE10 and below my website will just not load at all. Everything was working fine with the script until about 2 days ago when suddenly platform.js is not loading in Chrome, so none of my polymer elements are loading now UNLESS I shift+cmd+refresh my website, clearing the cache. Was something updated with Chrome / Polymer in the last few days that would have broken this for some reason? Has anyone encountered this kind of thing where a website will only work when you hard refresh it? I am so confused. Any help would be appreciated. Thanks!
tagged with: google-chrome
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27192873

http://stackoverflow.com/q/27256432
type: Question
has answer: http://stackoverflow.com/a/27257626
answer count: 2
score: 5
tagged with: websocket
linked to: http://stackoverflow.com/q/25352111
tagged with: javascript
has comment: http://stackoverflow.com/comment/42987022
has body: I'm currently using einaros' NodeJS WS module to create a websocket client. When initializing the socket client, I use the 'open' event to determine when the connection is open, but once it's open, how would I be able to check if it's still open? Is there a property on the 'WebSocket' object that I can use to quickly check the status of the socket? Is - websocketInstance.readyState - adequate?
possible better answer: http://stackoverflow.com/a/27256858
has title: Node JS - How Can You Tell If A Socket Is Already Open With The Einaros WS Socket Module?
tagged with: events
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/42987463
tagged with: node.js
favorite count: 0
upvote count: 5
downvote count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27257626
has comment: http://stackoverflow.com/comment/60218625
has answer: http://stackoverflow.com/a/27256858
has comment: http://stackoverflow.com/comment/60218598

http://stackoverflow.com/comment/43043230
type: Comment
comment on: http://stackoverflow.com/a/27267319
type: AnswerComment
has text: @theartofbeing: the thing is that you need to know which grocery_list item represents what DIV container. You need to remove the grocery_list item, so you need to remove it from array but from HTML as well. That's why I added a key to grocery_list item which is then rendered as attribute on DIV container. That's what joins them. The remove function then needs to find this key based on provided name (it is my understanding that you'd like to remove item by name). Hope this helps.
score: 0

http://stackoverflow.com/q/27223938
has comment: http://stackoverflow.com/comment/42926469
favorite count: 0
linked to: http://stackoverflow.com/q/1458633
has comment: http://stackoverflow.com/comment/42926465
linked to: http://stackoverflow.com/q/10808671
upvote count: 1
has answer: http://stackoverflow.com/a/27224833
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27224285
score: 1
has answer: http://stackoverflow.com/a/27224285
tagged with: mysql
has comment: http://stackoverflow.com/comment/42926941
has answer: http://stackoverflow.com/a/27224602
type: Question
has body: I have an object that has a money property with the datatype Decimal(10,2) on mySql. My javascript makes an http reques to retrieve those values and I process the data inside my javascript function to add up all the values into one $scope: $scope.expected = 0; for(var k = 0; k &lt; collection.length; k++) { $scope.expected += Number(collection[k].price); } price is the money value that contains 125.89 as the value from the DB. The iteration makes 31 iterations as collection.length returns me 31. I used the Number Reference because it starts out as a string. When The looping finishes, I end up with this sum: 3902.589999999999 But all I want is 3902.58 since this is money and it must be an exact representation. I researched around and the community seems to agree on using toFixed(2) but from my understanding, toFixed(2) rounds the number up which is something I do NOT want to do since this operation involves cash. Is there a way to keep the 2 decimal places without rounding? I also kept a log of the console.log throughout the entire loop. Here is the result: 125.89 251.78 377.67 503.56 629.45 755.34 881.23 1007.12 1133.01 1258.9 1384.7900000000002 1510.6800000000003 1636.5700000000004 1762.4600000000005 1888.3500000000006 2014.2400000000007 2140.1300000000006 2266.0200000000004 2391.9100000000003 2517.8 2643.69 2769.58 2895.47 3021.3599999999997 3147.2499999999995 3273.1399999999994 3399.0299999999993 3524.919999999999 3650.809999999999 3776.699999999999 3902.589999999999
tagged with: javascript
linked to: http://stackoverflow.com/q/588004
has title: Javascript addition gives me an output of more than 2 decimal places
answer count: 3
has comment: http://stackoverflow.com/comment/42926444
downvote count: 0
accepted answer: http://stackoverflow.com/a/27224602

http://stackoverflow.com/comment/43041717
type: QuestionComment
has text: Use $http service built in AngularJS
comment on: http://stackoverflow.com/q/27286992
score: 0
type: Comment

http://stackoverflow.com/a/27272670
has body: Selecting rows: You need to select TR element that contains the clicked cell, plus next siblings if the cell has a rowspan. You can use jQuery.nextAll(), jQuery.addBack() and jQuery.slice() together as follows: $(function() { $(".title1").on("click", function() { var rowspan = +$(this).attr("rowspan") || 1; $(this).closest("tr").nextAll().addBack().slice(0, rowspan).find("th, td").toggleClass("test1"); }); $(".title2").on("click", function() { var index1 = 0, index2 = +$(this).attr("colspan") || 1; $(this).prevAll().each(function() { var colspan = +$(this).attr("colspan") || 1; index1 += colspan; index2 += colspan; }); $("tr:gt(2)").find("th, td").filter(function() { var index = $(this).index(); // using heuristic, sorry if ($(this).closest("tr").hasClass("custTitle") === false) { index += 1; } return index >= index1 && index < index2; }).toggleClass("test2"); }); }); .title1 { background-color: #808080; } .title2 { background-color: #808080; } .test1 { background: #F99; } .test2 { background: #99F; } .test1.test2 { background: #F9F; } input { width: 5em; } LOCATION H1 H2 H3 H4 PRODUCT S1 S2 S3 S4 S5 S6 S7 S8 Product id 1 2 3 4 5 6 7 8 Q1 THIS TEST Q2 THIS TEST Q3 THIS TEST
answers question: http://stackoverflow.com/q/27271548
has comment: http://stackoverflow.com/comment/43017910
type: Answer
accepted answer of: http://stackoverflow.com/q/27271548
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43025900
upvote count: 2
has comment: http://stackoverflow.com/comment/43018941
type: AcceptedAnswer

http://stackoverflow.com/q/27181604
downvote count: 1
has comment: http://stackoverflow.com/comment/42852431
tagged with: http://stackoverflow.com/tag/json
has title: Blogger Recent Posts Console Error: Cannot read property 'title' of undefined
accepted answer: http://stackoverflow.com/a/27216557
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/42851773
favorite count: 0
type: Question
has body: I found this recent Blogger script that will show recent posts of a certain label or tag. The script works fine. However, if I use this script more than once, to show recent posts of a different label, and throws an error of: Cannot read property 'title' of undefined Looking at the script, I cannot figure out what is causing this, or how to fix it. There are a variety of these scripts available, some similar and some not. However, it appears as though they ALL throw this error. Is it possible the error is caused by the feed itself, or is it the script? Specifically though, the console says the error is with this variable: var posttitle = entry.title.$t;
has comment: http://stackoverflow.com/comment/42913101
score: 0
possible better answer: http://stackoverflow.com/a/27235079
answer count: 2
has answer: http://stackoverflow.com/a/27216557
tagged with: blogger
upvote count: 1
has answer: http://stackoverflow.com/a/27235079

http://stackoverflow.com/comment/42943982
score: 1
comment on: http://stackoverflow.com/q/27233629
has text: How about just using the title attribute for tool tip. http://jsfiddle.net/rm807wd6/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42992160
has text: I am assinging carPrice as value of getElememtbyId("txtEstpr")
comment on: http://stackoverflow.com/q/27259040
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42912714
type: QuestionComment
comment on: http://stackoverflow.com/q/27216448
has text: What do you mean _of a given option_?
score: 0
type: Comment

http://stackoverflow.com/q/27252944
type: Question
upvote count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: jquery-ui-tabs
has comment: http://stackoverflow.com/comment/42981408
has comment: http://stackoverflow.com/comment/42980778
has comment: http://stackoverflow.com/comment/42981136
answer count: 1
has answer: http://stackoverflow.com/a/27253913
favorite count: 0
accepted answer: http://stackoverflow.com/a/27253913
has comment: http://stackoverflow.com/comment/42980030
has comment: http://stackoverflow.com/comment/42980437
type: AnsweredQuestion
score: 2
has title: jQuery UI Vertical Tabs makes page scroll "stick"
tagged with: jquery-ui
tagged with: jquery-tabs
has body: I am currently using the jQuery UI Vertical Tabs snippet out of the box, and there is a weird issue with how it affects the overall page scroll. Every time you change the tab, then try to scroll up or down the page main page, it ends up "sticking" in place for a little bit then works as normal. You can see the effect here: http://investors.realcrowd.com/tab-tester Not sure what the problem is or how even to diagnose it...Is there any snippet of code I can add to fix this? Thanks for your help!

http://stackoverflow.com/a/35327521
has body: Use settimeout will not auto fire the $digest and the 2 way data binding may not aware of the update. user q and promise instead of timeout if timeout is required, use $timeout instead of settimeout.
has comment: http://stackoverflow.com/comment/58944641
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27154027

http://stackoverflow.com/comment/42864896
has text: no I my project about Edmonds‐Karp and queue and I want to improve it by do this method but I don't have algorithm for that so I need your help
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27188528
score: 0

http://stackoverflow.com/q/27298096
favorite count: 0
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/27298391
type: UnansweredQuestion
has title: Radio button ng-model to true/false (checked/unchecked)
has comment: http://stackoverflow.com/comment/43065551
score: 2
has body: I'm trying to bind a radio button to true when the radio button is selected and to false when the radio button is not selected. I must be missing something really obvious because I haven't been able to do it yet. I have a simple collection, eg: $scope.collection = [ { id: 1, selected: true}, { id: 2, selected: false}, { id: 3, selected: false}]; And I wish to bind the "selected" property to whether the radio button is checked or not. Sounds simple enough but ng-model binds to undefined. ng-checked almost works, it displays the correct result but never actually updates the value... Plunkr with the problem
type: Question
has answer: http://stackoverflow.com/a/27298802
has comment: http://stackoverflow.com/comment/43063003
tagged with: javascript
answer count: 2
downvote count: 0

http://stackoverflow.com/q/27264270
tagged with: sitecore-speak-ui
tagged with: javascript
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/27279684
tagged with: mvvm
tagged with: sitecore
possible better answer: http://stackoverflow.com/a/29142459
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29142459
tagged with: sitecore7
has answer: http://stackoverflow.com/a/27265756
has answer: http://stackoverflow.com/a/27279684
has title: How to build SPEAK component in Sitecore?
type: Question
has body: I'm trying to create a simple SPEAK component using Sitecore 7.5 and SPEAK 1.2. The documentation seems slim or outdated on the subject. I tried following this article, but there are lots of holes in it: http://www.dervalp.com/component-in-speak-1-2-client-side/ Can anyone recommend any steps to create a JavaScript SPEAK component?

http://stackoverflow.com/q/27201564
has comment: http://stackoverflow.com/comment/42888365
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42887365
has answer: http://stackoverflow.com/a/27202745
score: 1
has body: I've been using this tutorial online to try and save the input value for one of my form fields. So far without any success. Am I doing something wrong? &lt;script type="text/javascript"&gt; var today = new Date(); var expiry = new Date(today.getTime() + 30 * 24 * 3600 * 1000); // plus 30 days function setCookie(name, value) { document.cookie=name + "=" + escape(value) + "; path=/; expires=" + expiry.toGMTString(); } function storeValues(form) { setCookie("email", form.email-field.value); return true; } if(email = getCookie("email")) document.getElementById('login-form').email-field.value = email-field; function getCookie(name) { var re = new RegExp(name + "=([^;]+)"); var value = re.exec(document.cookie); return (value != null) ? unescape(value[1]) : null; } document.write(getCookie("email")); &lt;/script&gt; HTML: &lt;form action="" method="post" id="login-form"&gt; &lt;input class="field" type="text" name="email-field" placeholder="e-mail" style="text-transform: lowercase;" autofocus&gt; &lt;br&gt; &lt;input class="field" type="password" name="pass" placeholder="password"&gt; &lt;button type="submit"&gt;&lt;/button&gt;
has comment: http://stackoverflow.com/comment/42886954
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/155188
tagged with: cookies
accepted answer: http://stackoverflow.com/a/27202745
answer count: 1
downvote count: 0
tagged with: javascript
has title: JavaScript Cookie Save Form
favorite count: 0

http://stackoverflow.com/comment/43041976
type: QuestionComment
has text: So you want to add style while generating textbox ?
comment on: http://stackoverflow.com/q/27287549
score: 0
type: Comment

submit
tags question: http://stackoverflow.com/q/27204746
tags question: http://stackoverflow.com/q/27159654
tag name: submit
type: Tag

http://stackoverflow.com/comment/42963913
comment on: http://stackoverflow.com/a/27244286
type: AnswerComment
score: 0
type: Comment
has text: I meant message will be different for other items

http://stackoverflow.com/comment/42837045
score: 0
type: AnswerComment
type: Comment
has text: There isn't any error in my code, writing [selected: "selected"] to ["selected": "selected"] doesn't make any difference!. The output we need to generate is bla . Where 'selected' has no value. Its a property it self!!
comment on: http://stackoverflow.com/a/27173350

http://stackoverflow.com/q/27181896
has answer: http://stackoverflow.com/a/29383150
accepted answer: http://stackoverflow.com/a/29383150
has body: I am using a ASP.NET route (to intercept the call to the .js) and controller to generate some JS I want to use on my client. The reason I'm doing this is so as to not have to duplicate id's or constants on the client. Here's the output of my JS: app.serviceRootURL = 'http://localhost:65211/'; // set in my web.config app.ajaxResponseStatuses = [ { "status":"Success", "id":0 }, // set in my C# DTO { "status":"Failure", "id":1 }, ]; First of all, I am not sure if this is the best approach, so other suggestions to doing this would be beneficial. More importantly though, I'm wondering how I can bundle and minify this. As I understand it, even if I could minify the JS at compile or run-time, minification will change the names of my variables. So in the above JS, app.ajaxResponseStatuses could get changed to a.bc, and then in the actual JS files where I'm trying to access that variable, they could be looking for x.yz. Can I minify this code and get it to the server? Will I still be able to use the above properties in other minified files? (bonus points) Is this a good aproach to pass server-side-only values to be used on the client?
type: AnsweredQuestion
type: Question
tagged with: asp.net-mvc
answer count: 1
has title: Creating and minifying JavaScript dynamically in ASP.NET MVC server-side code
tagged with: javascript
tagged with: asp.net-bundling
score: 0
tagged with: bundling-and-minification
linked to: http://stackoverflow.com/q/8567070

http://stackoverflow.com/a/27196831
has body: Another way with of doing it with sort: [3,0,2,-1,0,-3].map(function () { return arguments; }).sort(function (a, b) { var aNum = a[0], bNum = b[0], bothNegative = aNum &lt; 0 &amp;&amp; aNum &lt; 0, bothPositive = aNum &gt; 0 &amp;&amp; bNum &gt; 0; if (bothNegative || bothPositive) return a[1] - b[1]; return aNum - bNum; }).map(function (arr) { return arr[0]; }); The initial items order is preserved, but they are now segregated in 3 groups. Negatives, zeros and positives.
upvote count: 1
answers question: http://stackoverflow.com/q/27196621
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/a/27277191
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27277066
accepted answer of: http://stackoverflow.com/q/27277066
upvote count: 2
has body: WIthin your loop, y % 3 == 0 will be true on the first iteration and every third after it, so output your &lt;p&gt; when y % 3 == 0 and your &lt;/p&gt; when y % 3 == 2 and after your loop if length % 3 != 0. But a nested loop is probably easier to do and maintain: var x, image, url; var fullString = ""; var y = 0; while (y &lt; randArray.length) { fullString += '&lt;p&gt;'; for (x = 0; x &lt; 3 &amp;&amp; y &lt; randArray.length; ++x, ++y) { image = affiliates[randArray[y]][0]; url = affiliates[randArray[y]][1]; fullString += '&lt;a href="' + url + '"&gt;&lt;img src="' + image + '"&gt;&lt;/a&gt;'; } fullString += '&lt;/p&gt;'; }
score: 2

http://stackoverflow.com/comment/43058310
score: 0
type: AnswerComment
has text: this is working in script editor but not working in separate file
type: Comment
comment on: http://stackoverflow.com/a/27296082

http://stackoverflow.com/a/27213557
has body: First you have to be sure that you have painted to the canvas after you defined the canvas variable and before you created the dataURL Second, it seems like you are looking for img in this php line: $img = $_POST['img']; but in your javascript you are defining it as imgBase64 in: data: { imgBase64: dataURL } lastly you should be adding console.log(dataURL) after the dataURL has been created to be sure that there is anything in it.
downvote count: 0
score: 5
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27213366
upvote count: 5
answers question: http://stackoverflow.com/q/27213366
type: Answer
has comment: http://stackoverflow.com/comment/42907598

http://stackoverflow.com/a/27312483
has body: You can create a lookup set from the object array, then you can use that to translate the dates to prices. This scales well, as it is an O(n+m) solution rather than the O(n*m) solution that you get if you use a loop in a loop to find the prices. var array = ['2014-10-09','2014-10-10','2014-10-11','2014-10-12']; var objArray = [{ date:"2014-10-09", model:"A", price:"100" },{ date:"2014-10-10", model:"A", price:"99" },{ date:"2014-10-12", model:"A", price:"102" }]; var lookup = {}; for (var i = 0; i &lt; objArray.length; i++) { lookup[objArray[i].date] = parseInt(objArray[i].price, 10); } var priceResult = []; for (var i = 0; i &lt; array.length; i++) { if (lookup.hasOwnProperty(array[i])) { priceResult.push(lookup[array[i]]); } else { priceResult.push('NULL'); } } // output result in StackOverflow snippet document.write(JSON.stringify(priceResult)); Note: Instead of the string 'NULL' you might want to use the value null instead, as it is generally easier to handle.
answers question: http://stackoverflow.com/q/27312357
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/27291109
answers question: http://stackoverflow.com/q/27245237
has comment: http://stackoverflow.com/comment/43081569
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: you can wrapp your code in to jquery click event like this $(document).on("click", "#dzopen", function(){ //initilize your dropzone here . });

http://stackoverflow.com/comment/42970719
score: 2
comment on: http://stackoverflow.com/a/27247967
type: AnswerComment
type: Comment
has text: `'no, you cant do that'` can always be an answer

http://stackoverflow.com/q/27235796
has comment: http://stackoverflow.com/comment/42948117
favorite count: 0
possible better answer: http://stackoverflow.com/a/27236069
has body: Im trying to use JsSIP, but when I use the RequireJS to enable require in the client side CHROME returns: XMLHttpRequest cannot load http://localhost/videochat/videonodejs/scripts/jssip. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. Its all in localhost, so what could be the origin problem? I do have the port number in my URL, could that be it?
accepted answer: http://stackoverflow.com/a/27235828
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27235828
tagged with: requirejs
has answer: http://stackoverflow.com/a/27236069
type: Question
has title: RequireJS + NodeJS returning XMLHttpRequest cannot load 'http' No 'Access-Control-Allow-Origin' header
has comment: http://stackoverflow.com/comment/42948288
tagged with: javascript
tagged with: jssip
score: 0
answer count: 2
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/42995716
comment on: http://stackoverflow.com/q/27260863
has text: @adeneo - NaN is not showing up, simply undefined. It's not run directly in the code, but after I run calculate value1 shows up as being undefined in the javascript console, whereas as the value of calculate('a', 'b', 'c', 'd') shows up correctly.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42820966
type: Comment
comment on: http://stackoverflow.com/q/27164145
type: QuestionComment
has text: @Kartikeya: When page loading and user is authenticated , this popup is shown
score: 0

http://stackoverflow.com/comment/42935864
score: 0
type: AnswerComment
has text: That's okay, in the meantime, here is a link to the jquery-ui dialog confirm-box: https://jqueryui.com/resources/demos/dialog/modal-confirmation.html
type: Comment
comment on: http://stackoverflow.com/a/27229249

http://stackoverflow.com/q/27154524
has body: I'm trying to use JavaScript to 'mark' a gap fill task that students of English could use. The students will input their answers in an HTML form in text input fields and if the answer is correct, a division to the left of the answer will display either a tick or a cross. I'm using if statements to check the answers. I've managed to get it to work but only for the first input. It will not check multiple inputs. This is the code I got to work for one input (but not multiple) Please type in the correct preposition, choose from the list on the left: As you walk this street, you can see: 'Pret A Manger' is the entrance of 'The Arches Shopping Arcade'. The Italian Restaurant, 'L'ulivo', is 'Pret A Manger' and 'Herman Ze German'. There is a large clock the entrance to 'The Arches Shopping Arcade'. 'Pret A Manger', there is a pub called 'The Pricess of Wales'. There is a bin 'EAT'. There is an outdoor terrace 'Gordon's Wine Bar'. There is a Japanese Restaurant a public garden. There is a Shoe-Repair shop a 'Starbucks'. There is a Watersports Shop and a Mini Supermarket the railway bridge. I'm trying to use arrays to hold the user input, correct answers and to grab each division to change the background picture: function checkAnswers(form) { var answers = new Array(10); answers[0] = "along"; answers[1] = "opposite"; answers[2] = "between"; answers[3] = "above"; answers[4] = "to the left of"; answers[5] = "in front of"; answers[6] = "to the right of"; answers[7] = "opposite"; answers[8] = "next to"; answers[9] = "under"; var uInput = new Array(10); uInput[0] = document.forms["gapfill1"]["prep1"].value;; uInput[1] = document.forms["gapfill1"]["prep2"].value; uInput[2] = document.forms["gapfill1"]["prep3"].value; uInput[3] = document.forms["gapfill1"]["prep4"].value; uInput[4] = document.forms["gapfill1"]["prep5"].value; uInput[5] = document.forms["gapfill1"]["prep6"].value; uInput[6] = document.forms["gapfill1"]["prep7"].value; uInput[7] = document.forms["gapfill1"]["prep8"].v…
tagged with: javascript
has title: HTML form checking in JavaScript using arrays
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42804262
has comment: http://stackoverflow.com/comment/42803636
answer count: 0
has comment: http://stackoverflow.com/comment/42803426
type: Question

http://stackoverflow.com/comment/42995158
has text: what does `error` hold?
comment on: http://stackoverflow.com/q/27261042
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42999812
type: QuestionComment
has text: How can I solve sensitivity issue. :(
type: Comment
comment on: http://stackoverflow.com/q/27263736
score: 0

http://stackoverflow.com/q/27230081
type: Question
has comment: http://stackoverflow.com/comment/42937265
tagged with: javascript
tagged with: jquery
has title: Cant figure out why my div output isn't working
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a basic hangman program. Click on the letter, it then tells you if its right or wrong by coloring the letter red or green. If its green, it replaces a dash in the hidden word with the letter. That part of my code works. The part that doesn't work is that I have an output section to a div that is supposed to tell you if you got the guess correct or not, and upon 6 failed guesses, you lose and it resets. It's currently not doing any of that. It's not even displaying anything in the div at all. TY ahead of time. If you have questions about something I didn't explain well enough, ill be back in about 1 hour to answer them. Thanks! Jsfiddle - http://jsfiddle.net/25b3fr4u/ HTML - JS - function hangman(word) { var trys = 0; var guess = 0; var alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $.each(alpha.split(''), function(i, val) { $('#alpha').append($('' + val + '')); }); $.each(word.split(''), function(i, val) { $('#word').append($('-')); }); $('.guess').click(function() { var count = $('#word [letter=' + $(this).text() + ']').each(function() { $(this).text($(this).attr('letter')); }).length; $(this).removeClass('guess').css('color', (count > 0 ? 'green' : 'red')).unbind('click'); if (guess > 0) { $('#win').text("Correct Guess"); } else if (guess < 0) { $(this).html(++trys); $('#win').text("You have tried to guess the word and failed " + trys + " times"); } if (trys == 6) { alert("You have guessed six times, you lose"); trys = 0; $("#win").text(""); } }); } $(document).ready(function() { $('#but').click(function() { var options = new Array("DOG", "CAT", "BAT", "HORSE", "TIGER", "LION", "BEAR", "LIGER", "DOOM", "SPIDER", "TREES", "LAPTOP"); var random = 1 + Math.floor(Math.random() * 12); hangman(options[random]); }); });
has answer: http://stackoverflow.com/a/27230262
type: UnansweredQuestion

http://stackoverflow.com/comment/42844382
score: 0
has text: Even with only 1 key:value ng-repeat is still going to be your best and cleanest option. If you are concernd with the number of watches use something to remove the watches such as https://github.com/EnzeyNet/NoBind
comment on: http://stackoverflow.com/q/27176292
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27302182
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27302379
tagged with: es6-promise
tagged with: javascript
downvote count: 0
answer count: 1
score: 1
has body: I'm looking to replace some of my existing code with JavaScript Promises and I just want to confirm that I'm not doing it wrong (or maybe there are better ways). I'm using the es6-promise library. What I have are three functions that I've updated to use JavaScript Promises (what was previously a nested, callback-ey mess). The functions are actually supposed to have dual modes i.e. I can use them like regular functions and have them return a result, or I could chain them together. function func_1() { return new Promise(function(resolve, reject){ if(condition) { resolve('1'); } else { console.log('start'); resolve(ajaxRequest(url)); } }); } function func_2(data) { return new Promise(function(resolve, reject){ if(condition) { resolve('2'); } else { console.log(data.response); resolve(ajaxRequest(url)); } }); } function func_3(data) { return new Promise(function(resolve, reject){ if(condition) { resolve('3'); } else { console.log(data.response); resolve(ajaxRequest(url)); } }); } func_1().then(func_2).then(func_3).then(function(data){}); The if is to check whether data is cached in localStorage/sessionStorage, and if so the function just returns the result. However, in circumstances where I am unsure if the values have been cached (e.g. first run of the script), then I plan to chain them and then have each subsequent function persist the result from its preceeding one to localStorage/sessionStorage (hence the promise chain on the last line). The final then gives me an opportunity to persist the data from func_3. Based on the tests I have run, everything seems to be working ok, but I was just wondering if this was the best way of doing this? And how do I handle the AJAX errors that could happen on one or more of the 3 listed functions? Note: My AjaxRequest function also uses the same Promise mechanism and 'resolves' a full XHR on success, and 'rejects' the same full XHR on failure/error. EDIT After a tip from @Bergi, I've updated the code to look like this (and it works …
favorite count: 0
tagged with: promise
accepted answer: http://stackoverflow.com/a/27302379
has title: Chaining JavaScript Promises that include nested AJAX calls
type: AnsweredQuestion

http://stackoverflow.com/q/27300000
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27300074
tagged with: xmlhttprequest
has title: Ajax POST XMLHttpRequest() can't send parameters with & characther
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27300074
tagged with: post
type: Question
answer count: 1
has body: In my code i have to send an ajax POST call like this: var http = new XMLHttpRequest(); var url = "get_data.php"; var params = "bac="+pa+"&amp;seid="+psid+"&amp;wh="+height; http.open("POST", url, true); the problem is that if, for example, the variable psid contain some &amp; char, like "test.php?P1=12&amp;P2=232&amp;P3=123" the call pass just part "test.php?P1=12", truncate at the first &amp;. I have to use this method and not jQuery $.post but i can't figure out how is possible pass variable with &amp; char within. Thanks in advance AM
tagged with: javascript

http://stackoverflow.com/a/27296855
downvote count: 0
answers question: http://stackoverflow.com/q/27296762
has comment: http://stackoverflow.com/comment/43060366
has body: Replace this: while($aa = mysql_fetch_array($wa)) { $cc = $aa['Coordinate_id']; $bb = $aa['city_name']; echo "[$cc,$bb],"; } to this: $result = ''; while($aa = mysql_fetch_array($wa)) { $cc = $aa['Coordinate_id']; $bb = $aa['city_name']; result.="[$cc,$bb],"; } echo trim($result,',');
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/30732929
answers question: http://stackoverflow.com/q/27168837
score: 1
upvote count: 1
downvote count: 0
has body: I think this is not possible, as the only way you can use the JavaScript API for kinect v2 is in a winJS store app. You could try to embed a web browser on the app. Check this: https://social.msdn.microsoft.com/Forums/en-US/c285b9ae-a8d3-4ed7-bcf6-0b05b03deebf/developing-with-javascript-vs-wpf-c?forum=kinectv2sdk
type: Answer

http://stackoverflow.com/q/27232964
tagged with: javascript
tagged with: jquery
score: 4
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42985653
favorite count: 0
has body: I have two datepickers: $(".From").datepicker({ dateFormat: 'dd/mm/yy', numberOfMonths: 1, autoclose: true, onClose: function(selectedDate) { $(".To").datepicker("option", "minDate", selectedDate); }}); $(".To").datepicker({ dateFormat: 'dd/mm/yy', numberOfMonths: 1, autoclose: true, onClose: function(selectedDate) { $(".From").datepicker("option", "maxDate", selectedDate); }}); View: @Html.TextBoxFor(model =&gt; model.From, new { @class = "form-control From" }) @Html.TextBoxFor(model =&gt; model.To, new { @class = "form-control To" }) Model: [Display(Name = "From")] public string From { get; set; } [Display(Name = "To")] public string To { get; set}; When the user manually enters the date, it fails. Is there a way to allow users to enter the date and validate it? option 1: Should I use regex?
linked to: http://stackoverflow.com/q/18548816
type: UnansweredQuestion
tagged with: datepicker
has comment: http://stackoverflow.com/comment/42945808
has comment: http://stackoverflow.com/comment/42985015
linked to: http://stackoverflow.com/q/14520336
has title: validating date in the datepicker
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/42944846
has answer: http://stackoverflow.com/a/27256302
tagged with: jquery-ui
tagged with: asp.net-mvc

declaration
tags question: http://stackoverflow.com/q/27159374
tag name: declaration
type: Tag
tags question: http://stackoverflow.com/q/27217854

conflict
tag name: conflict
tags question: http://stackoverflow.com/q/27302099
tags question: http://stackoverflow.com/q/27302239
type: Tag

http://stackoverflow.com/q/27216742
score: 1
has title: Node.js: how to listen to communication and respond on a single port
upvote count: 1
has comment: http://stackoverflow.com/comment/42914245
type: Question
has comment: http://stackoverflow.com/comment/42913883
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42918906
favorite count: 0
has comment: http://stackoverflow.com/comment/42913640
has comment: http://stackoverflow.com/comment/42914990
has comment: http://stackoverflow.com/comment/42924010
type: UnansweredQuestion
tagged with: sockets
tagged with: port
has comment: http://stackoverflow.com/comment/42914327
has body: I'm currently building a remote debugging client for PHP in Node.js. XDebug, a PHP library that allows for remote debugging, sends messages over port 9000 on localhost, so a remote debugging client can listen to messages and respond on the same host and port. So, I've made a TCP server, which listens to port 9000, and after parsing the data, responds accordingly: var net = require('net'); var transactionID = 1234; var parseXMLString = require('xml2js').parseString; /** * Create a server to respond to the debugger engine. * * @param {Socket} connection */ var server = net.createServer(function(socket) { //'connection' listener console.log('socket connected to server'); socket.on('end', function() { console.log('socket disconnected to server'); }); /** * When the debugger engine sends a message over port 9000, * send a response. * * @param {Buffer} data */ socket.on('data', function(data) { // Data comes through as a buffer, stringify it. var dataStringified = data.toString(), splitData = null, xmlStatement = null, dataLength = null; // Data comes through as a string separated by a null byte, so split it up. splitData = dataStringified.split('\u0000'); dataLength = splitData[0]; xmlStatement = splitData[1]; parseXMLString( xmlStatement, function( err, result ) { if ( 'init' in result ) { var command = 'run -i 1234'; socket.write( command ); } }); }); // socket.pipe(socket); }); /** * Listen to port 9000 to create connections from the debugger engine to the server. */ server.listen(9000, function() { //'listening' listener console.log('server listening on port 9000'); }); However, the socket/port is not written to. I've seen socket.pipe(socket) used in other server examples. With that line in the code uncommented, the port does get written to, however, it makes a circular connection, and any messages sent from XDebug get sent back to itself. What am I missing?
tagged with: node.js
answer count: 0

http://stackoverflow.com/a/27262062
downvote count: 0
type: Answer
score: 4
upvote count: 4
has body: The PHP code you put in your files is not executed at Javascript run time, it is executed even before the page gets sent to the client. So you can't access $_SESSION from anywhere within your content, you need to do that from Wordpress's code. Usually this is done via a plugin. You need to pass your Javascript variables to a server side PHP. As @Grasshopper said, the best (or at least most maintainable way) is through AJAX: // This is your JAVASCRIPT trackit function function trackIt(routine, day) { $.post( '/wp-setvar.php', { routine : routine, day : day }, // You can add as many variables as you want (well, within reason) function success(data) { // Here we should receive, given the code below, an object // such that data.result is a string saying "OK". // Just in case you need to get back something from the server PHP. // Otherwise just leave this function out. } ); }; On the server, you need to create a specific file to accept the incoming variables (it would be best if you did this from a plugin, in order not to add files outside the installation: such practices are frowned upon by security scanners such as WordFence). This here below is a butcher's solution. &lt;?php /** This is wp-setvar.php */ /** Set up WordPress environment, just in case */ require_once( dirname( __FILE__ ) . '/wp-load.php' ); session_id() || session_start(); nocache_headers(); // DO NOT, FOR ANY REASON, ACCESS DIRECTLY $_SESSION // ONLY USE A VARIABLE WITHIN $_SESSION (here, "ajjx") // OTHERWISE THIS MAY ALLOW ANYONE TO TAKE CONTROL OF YOUR INSTALLATION. $_SESSION['ajjx'] = $_POST; Header('Content-Type: application/json;charset=utf8'); die(json_encode(array( 'result' =&gt; 'OK', // This in case you want to return something to the caller ))); Now whenever you need the session-saved variable, e.g. "routine", you put &lt;?php ... $value = ''; if (array_key_exists('ajjx', $_SESSION)) { if (array_key_exists('routine', $_SESSION['ajjx']) { $value = $_SESSION['ajjx']['routine']; } } Or you can d…
accepted answer of: http://stackoverflow.com/q/27261240
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27261240

http://stackoverflow.com/q/27207390
type: Question
has body: the following javascript code will enable the creation of markers on the map on map click local and global in realtime with node.js / socket.io. This works fine but each added marker is visible. like this example: http://jsfiddle.net/brettdewoody/LK35U/ Now, when the second marker has been added to the map, I need to remove the previous marker (first one) automatically, then add 3rd marker -> remove 2nd marker and so on. Can anyone help me understand how to do this? Maybe with grouplayer? How does it work? // generate unique user id var userId = Math.random().toString(16).substring(2,15); var socket = io.connect('http://localhost:4000'); var doc = $(document); // custom marker's icon styles var tinyIcon = L.Icon.extend({ options: { iconSize: [25, 39], iconAnchor: [12, 36], shadowSize: [41, 41], shadowAnchor: [12, 38], popupAnchor: [0, -30] } }); var anyIcon = new tinyIcon({ iconUrl: "assets/img/icon.png" }); var sentData = {} var connects = {}; var markers = {}; var active = false; // for node.js send coords and set marker (global) socket.on("load:coords", function(data) { setMarker(data); connects[data.id] = data; connects[data.id].updated = $.now(); // shorthand for (new Date).getTime() console.log(data); }); // set marker (local) function addMarker(position) { var lat = position.latlng.lat; var lng = position.latlng.lng; // mark user's position var userMarker = L.marker([lat, lng], { icon: myIcon, }); userMarker.addTo(map); userMarker.bindPopup(" Your ID is " + userId + " ").openPopup(); // send coords on when user is active doc.on("click", function() { active = true; sentData = { id: userId, active: active, coords: [{ lat: lat, lng: lng, }] } socket.emit("send:coords", sentData); }); } doc.bind("mouseup mouseleave", function() { active = false; }); // showing markers for connections function setMarker(data) { for (i = 0; i < data.coords.length; i++) { var marker = L.marker([data.coords[i].lat, data.coords[i].lng], { icon: yellowIcon}).addTo(map); marker.bindPopu…
downvote count: 0
tagged with: javascript
score: 2
has comment: http://stackoverflow.com/comment/42897198
has answer: http://stackoverflow.com/a/27207685
answer count: 1
has comment: http://stackoverflow.com/comment/42928340
favorite count: 0
tagged with: mapbox
upvote count: 2
has title: Leaflet - how to remove previous marker automatically
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27207685
tagged with: leaflet
linked to: http://stackoverflow.com/q/9912145
has comment: http://stackoverflow.com/comment/42910047

http://stackoverflow.com/comment/42866199
has text: @Stefan This one looks brilliant and what I'm looking for ill check other ideas people have sent in aswell.
score: 0
comment on: http://stackoverflow.com/q/27189795
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42808059
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27156304
has text: Please refrain from asking questions that amount to "can you fix this for me?"
score: 0

http://stackoverflow.com/comment/43073931
type: Comment
comment on: http://stackoverflow.com/a/27305048
has text: Well, it's misleading because there's a widespread naming convention which states that upper-cased functions should be constructors, but even if you do fix that, your code is still inefficient in terms of memory because you aren't sharing anything through prototypes. It's also inefficient in terms of execution e.g. you will have to mutate the newly created shape object everytime to create to rectangle instances. All these are solved by using `Object.create` like I suggested, which is the standard way of avoiding constructors.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27240914
has comment: http://stackoverflow.com/comment/49816294
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27240776
has comment: http://stackoverflow.com/comment/49921914
answers question: http://stackoverflow.com/q/27240776
has comment: http://stackoverflow.com/comment/42958499
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Plunker: http://plnkr.co/edit/bzhCwjXdll3ibxc7qsMY?p=preview Try using transclude:true and then ng-transclude to display the markup between custom element tags. Also, I'm not familiar with using show(), so instead set html ng-show='showEl' and define showEl = true in the timeout. angular.module("app", []); function MyCtrl($scope) {} angular.module("app").directive('hideme', function($timeout) { return { transclude: true, restrict: 'E', template: '&lt;div ng-show="showEl"&gt;&lt;div ng-transclude&gt;&lt;/div&gt;&lt;/div&gt;', link: function(scope, element, attrs) { $timeout(function() { scope.showEl = true; }, 1000); } }; });
has comment: http://stackoverflow.com/comment/42958393
score: 1

http://stackoverflow.com/q/27233943
upvote count: 1
tagged with: unit-testing
tagged with: object
tagged with: javascript
type: AnsweredQuestion
has body: I found a strange behavior when I cloned simple JSON objects with property that's name is "must" when the unit.js library is used. See the example: var test = require("unit.js"); // delete this line and the result will be good var input = { "parameter": "value", "must": { "parameter_in": "value_in" } }; console.log("Input: " + JSON.stringify(input, undefined, 2)); var result = clone(input); console.log("Result: " + JSON.stringify(result, undefined, 2)); // no "must" element console.log("Result (must): " + JSON.stringify(result.must, undefined, 2)); function clone(obj) { var copy; // Handle the 3 simple types, and null or undefined if (null == obj || "object" != typeof obj) return obj; // Handle Date if (obj instanceof Date) { copy = new Date(); copy.setTime(obj.getTime()); return copy; } // Handle Array if (obj instanceof Array) { copy = []; for (var i = 0, len = obj.length; i &lt; len; i++) { copy[i] = clone(obj[i]); } return copy; } // Handle Object if (obj instanceof Object) { copy = {}; for (var attr in obj) { if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]); } return copy; } throw new Error("Unable to copy obj! Its type isn't supported."); } Result: Input: { "parameter": "value", "must": { "parameter_in": "value_in" } } Result: { "parameter": "value" } Result (must): { "parameter_in": "value_in" } The JSON.stringify doesn't print the must property of result, but it is in the cloned object because JSON.stringify is working for result.must. If I delete the unit.js line, everything is ok. (I use unit.js@0.1.8) What is the reason of this, does unit.js add something to Object.prototype? Whatever it is, is it a way to protect our application against this kind of errors? It's very strange that a 3rd party library can cause such an error. Any help would be appreciated! Ps.: I used the clone function suggested in How do I correctly clone a JavaScript object? but it's also the same with lodash's cloneDeep method. Update: I've tried some more queries: use for i…
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/728360
favorite count: 0
has answer: http://stackoverflow.com/a/27331398
type: Question
accepted answer: http://stackoverflow.com/a/27331398
answer count: 1
has title: Cloning objects works strange when unit.js library is used

combobox
tags question: http://stackoverflow.com/q/27164209
type: Tag
tag name: combobox
tags question: http://stackoverflow.com/q/27277344

http://stackoverflow.com/comment/116301948
score: 1
type: AnswerComment
has text: "Env cannot be imported" - try using `process.env.YOUR_ENV_VAR_NAME`
type: Comment
comment on: http://stackoverflow.com/a/55240594

http://stackoverflow.com/q/27191193
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: My script does the job correct on the first click but not for the return and especially in the 2nd round. I want to perform that what happens in the first turn again and again especially reversed. Furthermore I think I made it more complicated than necessary or? Does anyone have an idea how to improve this to become a loop? [ jsfiddle here ] function goto(id, t){ //animate to the div id. $(".slider_box_vert_mid") .animate( {"left": -($(id).position().left)}, { duration: 400, easing: 'easeInOutCubic', queue: false }); $(".slider_box_vert_mid2") .animate( {"right": -($(id).position().left)}, { duration: 400, easing: 'easeInOutCubic', queue: false, complete: function() { $(".slider_box_vert_mid").toggleClass("hidebox"); $(".slider_box_vert_mid2").toggleClass("hidebox"); $(".slider_inner_slide") .animate( {"left": -($(id).position().left)}, { duration: 1000, easing: 'easeInOutCubic', queue: false, complete: function() { $(".slider_box_vert_mid3").toggleClass("showbox"); $(".slider_box_vert_mid3") .animate( {left: '0'}, { duration: 400, easing: 'easeInOutCubic', queue: false }); $(".slider_box_vert_mid4").toggleClass("showbox"); $(".slider_box_vert_mid4") .animate( {right: '0'}, { duration: 400, easing: 'easeInOutCubic', queue: false }); }}); } }); // add active class to the current link $(t).addClass('active'); } CHANGE 1 Doubeling the function for doing it back is possible for sure but not a real solution of course
has title: jquery slide animation do not loop
has comment: http://stackoverflow.com/comment/42871362
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/42870463
tagged with: toggle

http://stackoverflow.com/q/27228826
has comment: http://stackoverflow.com/comment/42935251
score: 1
has body: I set a cookie using jQuery: $.cookie('COOK', resp.cookieValue, { expires: 10000, path : '/', domain : '.mydomain.com'}); After it I close the browser and open it again trying to get saved cookie. The result is the following: var myCookie = $.cookie('COOK'); //myCookie is null In Chrome this code works perfectly and cookie exists after reopen of browser, but not in IE. I looked over all settings in browser, but don't found any checked options of deleting temporary files.
has comment: http://stackoverflow.com/comment/42934986
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42935142
upvote count: 1
tagged with: internet-explorer
tagged with: cookies
has comment: http://stackoverflow.com/comment/42934916
type: Question
has comment: http://stackoverflow.com/comment/42940229
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Why do IE kills cookie after closing it?
has comment: http://stackoverflow.com/comment/42935457

http://stackoverflow.com/comment/42990685
score: 0
type: AnswerComment
type: Comment
has text: http://stackoverflow.com/questions/27258609/drying-up-protractor-clicks-tests-using-a-for-loops @alecxe
comment on: http://stackoverflow.com/a/27240883

http://stackoverflow.com/comment/43037316
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27284699
has text: Are you able to use jQuery or straight JavScript?
type: Comment

http://stackoverflow.com/q/27199995
tagged with: javascript
tagged with: google-signin
has title: Google+ Sign-In flow with JavaScript Not Working in Internet Explorer
upvote count: 1
tagged with: google-plus
has body: I am implementing google+ signin with javascript with help of nice article developers.google.com they have provided a working example at url https://google-developers.appspot.com/+/demos/signin_demo_trigger with works well in internet explorer also. But when i copy the source code of same example and try to run it by changing client id , it is working fine in all browser except internet explorer. here is the source code: Google+ Sign-in button demo: JavaScript flow Click me to trigger the sign-in flow with gapi.auth.signIn() Reload the example or open in a new window My local host url is :https://localhost/index.html please suggest what should I do ? I need java script google login for my application which run in all browser.
favorite count: 0
type: UnansweredQuestion
downvote count: 0
answer count: 0
score: 1
tagged with: authentication
type: Question

http://stackoverflow.com/comment/42981705
score: 0
type: QuestionComment
type: Comment
has text: @haim770 Thank you for the clarification. I was told my first example was polluting the global context. I was under the impression it was not, but I was told by most of the back end engineering staff recently that it was and to do it the second way.
comment on: http://stackoverflow.com/q/27253705

http://stackoverflow.com/q/27168331
tagged with: angularjs
has answer: http://stackoverflow.com/a/27168430
has body: I am using angular JS. Below is my Angular code $scope.remove = function (index) { var name = $scope.data.Filters[index].FilterName; // value of name = 'AAAA' or 'BBBB' and so on $scope. data. Filters. splice (index, 1); $scope.Json = angular.toJson($scope.data); }; And my HTML is {{AAAA}} {{BBBB}} .... .... Based on the value of name i want to reset the {{ }} vale in my view. Say for an example Example reset the value of {{AAAA}} if name = AAAA so how can i use the variable name like below UPDATED var name = $scope.data.Filters[index].FilterName; $scope.name = "" /// How can i do like this $(name).selectpicker('deselectAll'); Can anyone help me Thanks,
type: AnsweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27168426
tagged with: javascript
answer count: 2
has title: $scope how to use variable in angular js
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/27168426
favorite count: 0
possible better answer: http://stackoverflow.com/a/27168430

http://stackoverflow.com/comment/43703419
score: 0
comment on: http://stackoverflow.com/q/27216148
type: Comment
type: QuestionComment
has text: Create a directive - see this answer: http://stackoverflow.com/a/25513865/2792555

http://stackoverflow.com/a/27207685
score: 14
answers question: http://stackoverflow.com/q/27207390
upvote count: 14
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27207390
downvote count: 0
has body: You can remove layers from the map using the removeLayer function of L.Map. A marker is also seen as a layer in Leaflet. So in your onclick handler, first remove the current marker, then create a new marker and add to the map. Something like this will do the trick: var marker = null; map.on('click', function (e) { if (marker !== null) { map.removeLayer(marker); } marker = L.marker(e.latlng).addTo(map); }); Working example on Plunker: http://plnkr.co/edit/NRl0VQi3wSGK3p8aHlHs?p=preview EDIT: After rereading your question i've got a better understanding of what you are trying to accomplish. I think this is what you are looking for: var myId = 'abc'; // My user id // other user id's and their markers var markers = { 'def': L.marker([51.441767, 5.470247]).addTo(map), 'ghi': L.marker([51.441767, 5.480247]).addTo(map), 'jkl': L.marker([51.441767, 5.490247]).addTo(map) }; map.on('click', function (e) { // check if my user id in marker object and thus on the map if (markers.hasOwnProperty(myId)) { // remove the marker map.removeLayer(markers[myId]); } // place (or overwrite) marker with my uid in object and add to map markers[myId] = L.marker(e.latlng).addTo(map); }); Here's another working example on Plunker: http://plnkr.co/edit/X8NQVF1FDbNKTV5a5nwn?p=preview
type: Answer

http://stackoverflow.com/comment/42929072
type: Comment
type: QuestionComment
has text: On what condition (which rule) the event is supposed to be fired ? Do you use the tag template for ga code or a custom html tag ?
comment on: http://stackoverflow.com/q/27224906
score: 0

http://stackoverflow.com/comment/57734044
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27188875
has text: The problem with this version is that it doesn't work with manually typing in data. If the user tabs or clicks away without touching the datepicker, the update function does not trigger.

http://stackoverflow.com/a/27182938
score: 3
has comment: http://stackoverflow.com/comment/42853874
upvote count: 3
answers question: http://stackoverflow.com/q/27182628
type: Answer
downvote count: 0
has body: Personally I would use the jquery countdown timer integration. It is simple and having number of options to display in different formats. Since I am fairly new to JS as well, this was the easiest way I found to get a count/timer. http://keith-wood.name/countdown.html

http://stackoverflow.com/a/27282847
has comment: http://stackoverflow.com/comment/43034641
upvote count: 1
has comment: http://stackoverflow.com/comment/43034848
type: Answer
answers question: http://stackoverflow.com/q/27282792
has body: Well normally you declare variables somewhere and set them back to null when you leave. $scope is a normal JavaScript object with key values so it should be possible to delete $scope.key; delete $scope.keyTwo;
has comment: http://stackoverflow.com/comment/43034888
downvote count: 0
score: 1

http://stackoverflow.com/q/27268319
score: 0
has answer: http://stackoverflow.com/a/40620883
tagged with: cordova
type: UnansweredQuestion
has title: Google Map v3 - Cordova - map center is not changed on drag
has comment: http://stackoverflow.com/comment/43018729
has body: I am trying to keep a marker in the center of the map during a drag. I've tried to use the drag event, But to no avail. I also started a setInterval routine to print the center and it did not change during the drag. Am I doing something wrong ? Is there another way to keep a marker in the center ? Here is my event listener. google.maps.event.addListener(MapPage.map,'center_changed', function() { if (MapPage.el.find('.selectedMenu').hasClass("rdv")){ var center = MapPage.map.getCenter(); MapPage.rdvMarker.setPosition(center); //setInterval(function(){google.maps.event.trigger(map, 'dragend');console.log(MapPage.map.getCenter())},200); } });
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/43008408
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/27167469
tagged with: xpages
score: 0
answer count: 3
tagged with: field
has answer: http://stackoverflow.com/a/27167719
tagged with: css
type: UnansweredQuestion
tagged with: hide
type: Question
has title: xpages how to hide element (field) using java script
has body: in xpages, as i know that only editable field able to get value (retrieve) from context. My question: how hide field using css or java script in xpages so i can still get value from context? Thank you
has answer: http://stackoverflow.com/a/27167526
has answer: http://stackoverflow.com/a/27310248
tagged with: javascript

http://stackoverflow.com/q/27189040
tagged with: javascript
has title: ExtJS error in initial page load due to Ext.getBody() not yet being defined
tagged with: extjs
accepted answer: http://stackoverflow.com/a/27189306
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27190018
score: 0
has answer: http://stackoverflow.com/a/27190018
type: Question
tagged with: extjs4.1
has body: I'm trying to create a dialog window in ExtJS to perform a save function, but I'm getting problems loading the page. A (reduced) example of the code window definition is: Ext.define('MyRequest.SaveDraftOrTemplateWindow', { extend: 'Ext.window.Window', alias: 'widget.saveDraftOrTemplateWindow', requires: ['Ext.toolbar.Toolbar'], modal: true, initComponent: function() { this.items = [ saveDraftOrTemplateForm ]; Ext.apply(this, { dockedItems: [{ xtype: 'toolbar', items: [ { iconCls: 'saveas-draft', text: 'Save', id: 'saveDraftTemplate', handler: saveAsDraftRequest(textFieldDraftOrTemplateName.getValue(), checkBoxSaveAsTemplate.getValue()), scope: this } ] }] }); this.callParent(); } }); function saveAsDraftRequest(draftName, isTemplate) { Ext.getBody().mask('Saving draft request...'); // Errors actually occurs on this line } // This line is the start of the stack causing the problem... var saveDraftOrTemplateWindowInstance = Ext.create('MyRequest.SaveDraftOrTemplateWindow', { Id: 'saveDraftOrTemplateWindow', xtype: 'saveDraftOrTemplateWindow', width: 400, height: 180, bodyPadding: 0 }); The problem is that is seems to be 'calling' the saveAsDraftRequest() function when the page initially loads which gives the Javascript error "Uncaught TypeError: Cannot read property 'mask' of null", and prevents the page loading. I don't really understand why the function is getting called at this point, as the handler presumably shouldn't be called until the button is actually clicked. I assume that if the page were already correctly loaded then Ext.getBody() would correctly return a result instead of null, but why is this getting called during the initial page load?
has answer: http://stackoverflow.com/a/27189306
answer count: 2

http://stackoverflow.com/a/27329478
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27305559
type: Answer
has body: use float:left; instead of display: inline-block;
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27305559

http://stackoverflow.com/q/27305290
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
upvote count: 7
has title: Is it possible to modify background svg images with javascript and or css?
linked to: http://stackoverflow.com/q/10768451
has answer: http://stackoverflow.com/a/27305358
score: 7
tagged with: image
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27305371
has body: In my case, I have a background-image that's set to repeat x. I was wondering if the background-image could be a svg, and if so, is there a way to control it's nodes via css or javascript? I have been using the SVGInjection to animate svg images that are inserted with tag, but I haven't been able to find a way to do the same thing when the svg is a background-image.
tagged with: css

http://stackoverflow.com/a/27181694
answers question: http://stackoverflow.com/q/27181121
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27181121
has comment: http://stackoverflow.com/comment/42851946
has body: It's because you are using same handler for all 5 processes, you need individual handler for each. Then you can use shared scope to calculate overall progress: var xhr = []; var progress = []; for (i = 0; i &lt; 5; i++) { (function(i) { var start = new Date().getTime(); xhr[i] = new XMLHttpRequest(); url = "/" + "?n=" + Math.random(); xhr[i].open("POST", url, true); xhr[i].setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); xhr[i].upload.addEventListener("progress", createProgressHandler(start, i), false); xhr[i].send(UploadData); // Initialize progress: progress[i] = { bytes: 0 }; }; function createProgressHandler(start, i) { return function (event) { end = new Date().getTime(); time = (end - start) / 1000; var duration = time; var bytes = event.loaded; progress[i].bytes = bytes; console.log('Event from upload #' + i + ', bytes loaded: ' + bytes); } }
type: Answer
has comment: http://stackoverflow.com/comment/42852137
has comment: http://stackoverflow.com/comment/42874996
has comment: http://stackoverflow.com/comment/42852202
has comment: http://stackoverflow.com/comment/42852616
score: 0
has comment: http://stackoverflow.com/comment/42877562
has comment: http://stackoverflow.com/comment/42851974

http://stackoverflow.com/q/27290587
type: Question
tagged with: nvd3.js
has comment: http://stackoverflow.com/comment/43047374
tagged with: d3.js
has title: Is it possible to increase labels padding (NVD3)
has comment: http://stackoverflow.com/comment/43048280
linked to: http://stackoverflow.com/q/21263742
has body: Labels on X Axis are to close to each other. They almost overlap. if you decrease chart width some labels disappear. Is it possible to make them disappear a bit earlier? I'm using nv.models.lineChart with custom scale: var scale = d3.time.scale.utc(); chart.xScale(scale);
score: 0
has comment: http://stackoverflow.com/comment/43047870
has comment: http://stackoverflow.com/comment/43048013
has comment: http://stackoverflow.com/comment/43047755
tagged with: charts
answer count: 0
has comment: http://stackoverflow.com/comment/43048180
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43047938

http://stackoverflow.com/comment/54518857
score: 0
comment on: http://stackoverflow.com/q/27196851
has text: Hi! were you able to get through this ? I am also struggling with somewhat similar problem, I just need page transition with sliding animation something like this : http://coenraets.org/samples/pageslider/index.html. I tried ReactCSSTransition but it doesnt work with phonegap. detail description : http://stackoverflow.com/questions/33297658/how-to-make-reactcsstransitiongroup-work-in-phonegap any help will be appreciated. thanks in advance.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43053106
comment on: http://stackoverflow.com/a/27293949
type: AnswerComment
has text: I think you are not answering his question. Didn't he asked for a delay between the different array elements?
score: 0
type: Comment

http://stackoverflow.com/comment/42957626
has text: Also Robben, the whole script could be even simpler if you only used one character to replace `e`
comment on: http://stackoverflow.com/a/27240262
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/43023737
comment on: http://stackoverflow.com/a/27261703
score: 0
type: AnswerComment
type: Comment
has text: @TomášZato there was something I had missed when reporting when it go fixed I was just way too excited that I neglected that the request method was still OPTIONS when I set the req.setRequestHeader ELse it is correct as GET. Is there any other way to set request header?? I guess that would fix my issue

http://stackoverflow.com/comment/42837028
comment on: http://stackoverflow.com/a/27173251
score: 0
type: AnswerComment
type: Comment
has text: This looks very nice. However, I'm using bootstrap (check my edit) and bootstraps default body font size is 14px. Additionally, bootstrap defines each HTML element with some kind of default font size values, also in px. How will this affect this solution?

http://stackoverflow.com/comment/43068105
type: Comment
type: QuestionComment
has text: It's not the same because I cannot use this method. I have a header which I use in every page and on the other side, I have specific functions in each page. So I cannot put the specific function in the top because the top is the same for every page. And also because I load views, and when I load the view of this page I just load the contain of the div main, so I have no access to the rest of the page.
comment on: http://stackoverflow.com/q/27302242
score: 0

http://stackoverflow.com/comment/43057555
type: QuestionComment
comment on: http://stackoverflow.com/q/27296493
score: 1
has text: Why do you need to do that? Maybe you can accomplish the same thing in another way. I don't think that what you are trying to accomplish is possible.
type: Comment

http://stackoverflow.com/q/27171572
tagged with: variables
tagged with: jquery
has title: Passing variable to ON method (in jquery)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27171652
type: Question
tagged with: function
tagged with: javascript
has body: I'm trying to pass a variable(present in global scope) to a function(present in on method). I'm passing a data object to the on but it's not working. It's working if i take variable inside the function. Here's the code: var firstName = $("#firstName").val(); $("#firstName").on("blur keyup paste", {firstName: firstName}, function(){ //access firstName }) Also, what is the best way of using on method. Should i use it like i have used above or should i use it like this? var firstName = $("#firstName").val(); $(document).on("blur keyup paste", "#firstName", {firstName: firstName}, function(){ //access firstName })
score: 0
accepted answer: http://stackoverflow.com/a/27171652
answer count: 1
tagged with: events

http://stackoverflow.com/a/27249719
has comment: http://stackoverflow.com/comment/43011828
has comment: http://stackoverflow.com/comment/43010050
type: Answer
has comment: http://stackoverflow.com/comment/43008701
has comment: http://stackoverflow.com/comment/43011128
has comment: http://stackoverflow.com/comment/42976970
has comment: http://stackoverflow.com/comment/43010960
answers question: http://stackoverflow.com/q/27247228
score: 0
has comment: http://stackoverflow.com/comment/43010759
has comment: http://stackoverflow.com/comment/43025839
has body: jsplayer takes the id ..you are giving class change the class to id: &lt;div id="descrizioneDxDown"&gt; // you are not doing this &lt;/div&gt; Now you have to build a playlist and put it: &lt;script&gt; jwplayer("descrizioneDxDown").setup({ playlist: "/path_to_your_Playlist.rss", width: 720, height: 270, listbar: { position: "right", size: 240 } }); &lt;/script&gt; Found Here

http://stackoverflow.com/q/27302706
answer count: 2
has answer: http://stackoverflow.com/a/27303144
upvote count: 5
possible better answer: http://stackoverflow.com/a/27303072
has comment: http://stackoverflow.com/comment/43069030
tagged with: javascript
linked to: http://stackoverflow.com/q/27094361
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/27303072
linked to: http://stackoverflow.com/q/3050830
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
accepted answer: http://stackoverflow.com/a/27303144
has body: I have a div table like for a page, is it possible to make it sortable like html table with javascript? I moved from normal table because it was not possible for me to continue using it due to this How to add td rowspans to a table? and thus used the div table. so I used this div table and the only thing im missing is how to make it sortable so I can sort it by item or price.. like datatables, tablesorter e.t.c Item Description Price Status Item 1 Description 1 $79 16 in stock full code here http://codepen.io/anon/pen/empqyN?editors=110 and here http://jsfiddle.net/a4fcxzra/
downvote count: 1
has comment: http://stackoverflow.com/comment/43069827
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43069090
has title: how to make a div sortable?
type: Question

http://stackoverflow.com/a/27288575
score: 0
upvote count: 1
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/43081622
has body: check link describe how you abort(stop/cancle) ajax request. Jquery allows you to stop ajax request with .abort() method. Aborting an AJAX request
has comment: http://stackoverflow.com/comment/43081064
answers question: http://stackoverflow.com/q/27288371

http://stackoverflow.com/comment/43039768
has text: I see, it's [**here**](https://chrome.google.com/webstore/detail/roblox-group-enhancer-by/ddjfhkkpgfghimddaekfocbahebohdim), I just viewed its source code. The HTML is constructed with JS, and injected by content_script. Still the same. :D
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27284400

http://stackoverflow.com/comment/42859478
type: Comment
comment on: http://stackoverflow.com/q/27186172
has text: @Alex Thomas No, it only transposes the table. I need to modify it so it has two columns only as shown in the example with cities above.
score: 0
type: QuestionComment

http://stackoverflow.com/a/27230395
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27230360
has comment: http://stackoverflow.com/comment/42937746
accepted answer of: http://stackoverflow.com/q/27230360
type: Answer
score: 4
has body: JavaScript is loaded synchronously by default in the DOM. Meaning, that the order that you load the scripts in your page, is the order that they are available. As long as your script file is loaded after the jQuery files, then all globally available functions in the jQuery files would be available to your JavaScript file. This applies to all JavaScript files and libraries, not only to jQuery. However, if a script file is set to load asynchronously, this would not necessarily be the case.
upvote count: 4

http://stackoverflow.com/comment/46327414
comment on: http://stackoverflow.com/a/29037216
score: 0
type: Comment
type: AnswerComment
has text: Wow, that looks like exactly the right thing! I've tinkered with other possible approaches, but not deployed any yet, so this is a great help.

http://stackoverflow.com/q/27181228
linked to: http://stackoverflow.com/q/17951294
downvote count: 0
has body: Perhaps this question has been asked before several times but I didn't found any answer that helps me. I know also the existence of OneUpUploaderBundle but I think my situation will not work with this plugin (if any knows how to do it, let me know). I need to upload several files but also I'll have dynamic file inputs as you'll see on the code below. So the only idea I get to do this is onchange event from the select build dynamic file fields. This is what I've right now and it works: $(document).ready(function () { var tipoRecaudo = $('#tipoRecaudo'), tipo_recaudo = tipoRecaudo.val(), selectedIdsTipoRecaudo = []; tipoRecaudo.select2({ ajax: { dataType: 'json', url: function () { return Routing.generate('obtenerRecaudosTramite'); }, data: function (tipo_recaudo) { return { filtro: tipo_recaudo } }, results: function (data) { var myResults = []; $.each(data.entities, function (index, item) { if (selectedIdsTipoRecaudo.indexOf(item.id.toString()) === -1) { myResults.push({ 'id': item.id, 'text': item.nombre }); } }); return { results: myResults }; } }, formatAjaxError: function () { return Translator.trans('mensajes.msgNoConexionServidor', {}, 'AppBundle'); } }).change(function () { var id = $(this).val(), selectedData = tipoRecaudo.select2("data"), baseFilUploadHTML = '' + '' + 'Agregar archivos ...' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ', uploadButton = $(' ').addClass('btn btn-primary').prop('disabled', true).text('Procesando...').on('click', function () { var $this = $(this), data = $this.data(); $this.off('click').text('Abort').on('click', function () { $this.remove(); data.abort(); }); data.submit().always(function () { $this.remove(); }); }); selectedIdsTipoRecaudo.push(id); if (id == 1) { // Rif } else if (id == 2) { // Registro Mercantil } else { $('#uploadArea').append(baseFilUploadHTML); } $('#fileUpload' + selectedData.id).fileupload({ url: url, dataType: 'json', autoUpload: false, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, maxFileSize: 2000000, // 2 …
tagged with: jquery
tagged with: file-upload
favorite count: 0
linked to: http://stackoverflow.com/q/18701684
type: UnansweredQuestion
tagged with: symfony
tagged with: php
has title: Handle multiple files upload with Symfony2 + jQuery FileUpload
answer count: 0
score: 1
linked to: http://stackoverflow.com/q/10445408
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42853048

http://stackoverflow.com/comment/42917950
type: AnswerComment
score: 0
type: Comment
has text: I thougt... +1 for you!
comment on: http://stackoverflow.com/a/27219318

http://stackoverflow.com/q/27225576
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27226352
has answer: http://stackoverflow.com/a/27225750
accepted answer: http://stackoverflow.com/a/27225750
has body: jsfiddle : http://jsfiddle.net/zrqjLrjf/ html code : &lt;div class="ListViewLayout_dv"&gt; &lt;a href="javascript:void(0)" onclick="swipeDisplay('list')" id="lb_ListView" title="List" style="position: relative;top: 3px;"&gt;&lt;span class="grid-listView1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt; &amp;nbsp; &lt;a href="javascript:void(0)" onclick="swipeDisplay('grid')" id="A1" title="Grid" style="position: relative;top: 3px;"&gt;&lt;span class="grid-GridView"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt; &lt;/div&gt; script : function swipeDisplay(view) { if (view == "list") { $(".grid-listView1").each(function () { $(this).removeAttr("class"); $(this).addClass("grid-listView"); }); $(".grid-GridView1").each(function () { $(this).removeAttr("class"); $(this).addClass("grid-GridView"); }); } else { $(".grid-GridView").each(function () { $(this).removeAttr("class"); $(this).addClass("grid-GridView1"); }); } } I am having a problem swiping between images when clicking on them , what i want to do basically is when i click on the list image it should get unfocused and the grid image should be focused and vise-versa
has answer: http://stackoverflow.com/a/27226076
possible better answer: http://stackoverflow.com/a/27225666
type: Question
has title: swiping images between span on click using javascript
has answer: http://stackoverflow.com/a/27225666
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4

http://stackoverflow.com/comment/43070016
comment on: http://stackoverflow.com/q/27303369
has text: Why don't you want to use recursion?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43044165
has text: the first `undefined` is the return value of `chrome.tabs.query`
comment on: http://stackoverflow.com/q/27287403
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42971025
type: QuestionComment
has text: can you provide jsFiddle
comment on: http://stackoverflow.com/q/27248242
score: 0
type: Comment

http://stackoverflow.com/comment/43002674
comment on: http://stackoverflow.com/q/27265456
score: 0
type: Comment
type: QuestionComment
has text: @CerlinBoss - no i don't get error.

http://stackoverflow.com/comment/42807288
has text: function changesCount in the controller and UWRLSErvice.getChangesCount in that function and getChangesCount in the service (UWRLService).
score: 0
comment on: http://stackoverflow.com/q/27156041
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27207129
has comment: http://stackoverflow.com/comment/138829285
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/55778238
linked to: http://stackoverflow.com/q/44234623
has answer: http://stackoverflow.com/a/55778238
linked to: http://stackoverflow.com/q/26140443
linked to: http://stackoverflow.com/q/9515704
score: 14
type: AnsweredQuestion
upvote count: 14
has answer: http://stackoverflow.com/a/27207186
has title: Why is chrome.runtime undefined when running JS inside a page from a content script?
type: Question
linked to: http://stackoverflow.com/q/35123117
tagged with: javascript
linked to: http://stackoverflow.com/q/26739774
answer count: 2
has body: I am creating a Google Chrome extension (my first one) and I want to send messages from the extension to the current tab. I am following the documentation: https://developer.chrome.com/apps/runtime#event-onMessage The extension loads a small external JS into the tab's HTML, which contains the following code: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { console.log(request) } ); As soon as the JS is loaded I get the following error: Uncaught TypeError: Cannot read property 'onMessage' of undefined. Opening console and typing chrome, I can see that the runtime is not a property of chrome. It looks like I am doing something wrong, but what? Do I need to add something to the manifest.json file? Chrome Version 39.0.2171.71 m Thank you.
accepted answer: http://stackoverflow.com/a/27207186
tagged with: google-chrome-extension

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/27244773
tags question: http://stackoverflow.com/q/27214088
tags question: http://stackoverflow.com/q/27281825
tags question: http://stackoverflow.com/q/27193178
tags question: http://stackoverflow.com/q/27181630
tags question: http://stackoverflow.com/q/27234695
tags question: http://stackoverflow.com/q/27254958

http://stackoverflow.com/comment/42858308
has text: @lonecoder you should return false in javascript function
score: 0
comment on: http://stackoverflow.com/q/27185595
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27234473
downvote count: 0
answers question: http://stackoverflow.com/q/27234185
type: Answer
has body: In its simplest form: Create a javascript Image() object: var img=new Image() ... Draw that image onto the canvas using context.drawImage(img,0,0) Set the canvas fill color as desired: context.fillStyle='#E54864' Fill pixel[3,6] with the desired color: context.fillRect(3,6,1,1) Example code and a Demo: var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; // create an Image() object var img=new Image(); img.onload=start; img.src="https://dl.dropboxusercontent.com/u/139992952/multple/colorwheel1.png"; function start(){ // draw the image onto the canvas ctx.drawImage(img,0,0); // change pixel[3,6] to #E54864 ctx.fillStyle='#E54864'; ctx.fillRect(3,6,1,1); } body{ background-color: ivory; padding:10px; } #canvas{border:1px solid red;} Pixel[3,6] is now colored #E54864
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27234185
type: AcceptedAnswer

http://stackoverflow.com/q/27243789
has comment: http://stackoverflow.com/comment/43131897
has comment: http://stackoverflow.com/comment/43157659
has answer: http://stackoverflow.com/a/27367588
has comment: http://stackoverflow.com/comment/43130324
has comment: http://stackoverflow.com/comment/43186669
has comment: http://stackoverflow.com/comment/43162330
linked to: http://stackoverflow.com/q/25065699
accepted answer: http://stackoverflow.com/a/27367588
has comment: http://stackoverflow.com/comment/43168226
upvote count: 4
type: AnsweredQuestion
tagged with: angular-routing
has title: Angular View automatically redirecting to default (otherwise) view
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43116093
favorite count: 0
tagged with: angularjs
type: Question
has body: My view is automatically redirecting to default (otherwise) view and I have no idea why. When I click, it goes from View1 to View2 and then automatically redirects to default View3. I checked by putting console.log() in View2 View1 -> View2 -> View3 myApp.config(function ($stateProvider, $urlRouterProvider) { $stateProvider .state('view1', { url: "/view1", templateUrl: "App/Views/start/view1.html", controller: 'MyController' }) .state('view2', { url: "/view2/:details", templateUrl: "App/Views/start/view2.html", controller: 'MyController' }); $urlRouterProvider.otherwise('/view3'); }); And I am calling $state.go like this. $state.go('view2', { details: JSON.stringify(response.details) }); I tried to intercept it by preventing default on $stateChangeStart but ran into an error : $digest() iterations reached. aborting which is due to an interaction issue between $urlRouterProvider and $stateProvider as explained here. But even if I intercept it successfully, I am not sure if that's the correct way. So what is actually causing it? Or How can I find out what's causing the redirect. By the way I have already checked for $stateChangeError and there are none. myApp.controller('MyController', ['$scope', '$stateParams', '$state', function ($scope, $stateParams, $state) { $scope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) { if (toState.name == "view3" &amp;&amp; fromState.name == "view2") { event.preventDefault(); } }); });
has answer: http://stackoverflow.com/a/27364639
has answer: http://stackoverflow.com/a/27364831
score: 4
has comment: http://stackoverflow.com/comment/43195034
has comment: http://stackoverflow.com/comment/43108979
possible better answer: http://stackoverflow.com/a/27364639
answer count: 3
tagged with: http-redirect

http://stackoverflow.com/q/27191267
tagged with: javascript
has answer: http://stackoverflow.com/a/27191358
answer count: 3
tagged with: http://stackoverflow.com/tag/html
upvote count: 24
favorite count: 0
has comment: http://stackoverflow.com/comment/42868542
tagged with: css
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/34163746
score: 24
has body: I would like to use lowsrc with the img tag to show a low resolution image first (and faster) while the larger resolution image loads. My large resolution images are @800KB and the low res versions @50KB. Given that lowsrc has been deprecated and many browsers do not apparently support it I am looking for a solution that does the same thing, preferably with as little code as possible. Is there a good replacement for lowsrc?
has answer: http://stackoverflow.com/a/34163746
has answer: http://stackoverflow.com/a/29125722
has title: What is the best alternative to the deprecated lowsrc for images?
type: Question
accepted answer: http://stackoverflow.com/a/27191358

http://stackoverflow.com/comment/128411394
type: AnswerComment
score: 0
type: Comment
has text: Attaching the 'ready' event handler with `.on` actually is an answer to OP's question. That makes it possible to later trigger the event manually, including the way OP wants to use it. This answer should be marked the accepted answer. See docs for jquery `.trigger`. BTW, you saved my day, Cerlin.
comment on: http://stackoverflow.com/a/27247967

http://stackoverflow.com/comment/42842118
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27176502
has text: I think you need to provide more information: What's the input? What's the expected output? Where does your solution fail?
score: 0

http://stackoverflow.com/comment/42905153
type: QuestionComment
type: Comment
has text: You aren't clear. Please describe **what** you're trying to do, not **how**. See the [XY Problem](http://meta.stackoverflow.com/q/66377/166899)
comment on: http://stackoverflow.com/q/27212188
score: 0

http://stackoverflow.com/comment/42803860
score: 0
comment on: http://stackoverflow.com/q/27154361
type: Comment
type: QuestionComment
has text: I have a service that returns results for 'ap' (relevant) as soon as the user types it. But this service works very slow for mobile EDGE and 2G connections so i thought to store all the keywords in a txt file(on server) where when a user types 'ap' it makes 1 HTTP request and loads all the values in a JS variable and serves his first request. Now for next search the for ex 'sa' it does not make any HTTP request is searches this JS variable and serves the user. (Just a thought) Did not work either moreover the JS file gets loaded with heavy data

http://stackoverflow.com/comment/43469419
score: 0
comment on: http://stackoverflow.com/q/27290671
type: Comment
type: QuestionComment
has text: No, I haven't written that code. Ok adding the code in the question now.

http://stackoverflow.com/comment/42959539
score: 0
has text: **Would this be your class homework?** Aren't at least supposed to attempt to solve it and show how far you were able to go?
comment on: http://stackoverflow.com/q/27241574
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43028285
type: AnswerComment
has text: @user198989 Ya I'm not sure why it does that in ie...why not create another html page with your content and javascript then set that page as the src for your iframe?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27279556

http://stackoverflow.com/q/27301676
tagged with: testing
tagged with: protractor
tagged with: nightwatch.js
tagged with: javascript
has comment: http://stackoverflow.com/comment/43070109
score: 33
accepted answer: http://stackoverflow.com/a/27303695
answer count: 2
has title: What are the differences between using Nightwatch.js vs Protractor
has comment: http://stackoverflow.com/comment/43070744
upvote count: 35
has answer: http://stackoverflow.com/a/42493241
has body: What are the differences? What are the advantages of using one over the other for an Angular project? Nightwatch.js vs Protractor
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/42493241
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27303695
has comment: http://stackoverflow.com/comment/43070260
downvote count: 2
linked to: http://stackoverflow.com/q/26987238
type: Question

http://stackoverflow.com/q/27157862
has body: I'm developing an hybrid mobile app using a SPA with angularjs, so I'm using routes to determine which page will be displayed and I'm using transitions (angular style, with ng-enter, ng-leave, etc) to change between pages. However I'm having problem when users try to go back in the application. First of all, I can't use window.history.back because not always the last page seen is the page that the back button must lead on, so I have to change the route to the correct location. Anyone is willing to wait a bit when clicking in a item that will lead to another page, but the opposite is not real. When users tap the back button and the app change the route, it takes some time to render the page as if it were a new page, but users keep tapping the back button because they feel like the app has stopped working. I wanna know if there is a way to keep in memory the elements of the page that were already rendered to fasten the process of going back on the application. P.S.: I know this way I will need a good memory consumption tracking to prevent memory leaks and a expensive usage that would make the application even slower.
type: Question
has answer: http://stackoverflow.com/a/27158245
tagged with: javascript
tagged with: routes
has title: How to keep the dom and scope on memory for the last seen page?
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/42849498
type: QuestionComment
comment on: http://stackoverflow.com/q/27180199
has text: you are placing the ENTIRE string inside an attribute 'update-confirm'.. please send over the code that **prints** it to the screen
score: 0
type: Comment

http://stackoverflow.com/q/27288967
has title: Register multiple partials from single HTML *string*
accepted answer: http://stackoverflow.com/a/27292644
has body: Imagine, I have a string containing multiple HTML partials, like so: Note that this is not currently part of the DOM. It is in a string variable. Can I somehow, easily, have all partials registered with the $templateCache service, and without custom string manipulation? Imagine that the HTML string is a whole lot more complex, as to totally abandon the string manipulation idea. I was hoping that there is a simpler way to do this? I am getting the feeling that I won't get around fiddling with $compile...
type: Question
tagged with: partials
has comment: http://stackoverflow.com/comment/43045702
has comment: http://stackoverflow.com/comment/43045286
tagged with: javascript
has answer: http://stackoverflow.com/a/27292644
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/a/27263557
score: 2
accepted answer of: http://stackoverflow.com/q/27263359
upvote count: 2
has comment: http://stackoverflow.com/comment/42999705
has body: &lt;canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;"&gt; &lt;/canvas&gt; &lt;script&gt; var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.font = "20px Georgia"; ctx.fillText("Hello World!", 10, 50); ctx.font = "30px Verdana"; // Create gradient var gradient = ctx.createLinearGradient(0, 0, c.width, 0); gradient.addColorStop("0", "magenta"); gradient.addColorStop("0.5", "blue"); gradient.addColorStop("1.0", "red"); // Fill with gradient ctx.fillStyle = gradient; ctx.fillText("Hello World!", 10, 90); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43000403
has comment: http://stackoverflow.com/comment/43000242
has comment: http://stackoverflow.com/comment/43000363
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27263359

http://stackoverflow.com/comment/43006534
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27267629
has text: don't use inline javascript. it's not 2003

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/27176138
type: Tag
tags question: http://stackoverflow.com/q/27281445

http://stackoverflow.com/comment/42916398
comment on: http://stackoverflow.com/q/27218032
score: 0
type: Comment
has text: Oh. Before you spotted the error, I had my canvas element placed after the script has been defined but why the order in which the canvas element and script is arranged matters? @Shomz
type: QuestionComment

http://stackoverflow.com/comment/42823994
type: QuestionComment
comment on: http://stackoverflow.com/q/27165845
has text: just google [html5 ajax history] ....
score: 0
type: Comment

http://stackoverflow.com/comment/42888611
score: 0
type: Comment
has text: Unfortunately I need the click event
comment on: http://stackoverflow.com/a/27193559
type: AnswerComment

http://stackoverflow.com/comment/43015543
type: QuestionComment
comment on: http://stackoverflow.com/q/27272996
score: 0
has text: do you have access to any libraries like jQuery or Angular? What have you tried so far? The tags definitely should not have the same value for the `name` attribute and should ideally have an `id` attribute.
type: Comment

http://stackoverflow.com/a/27299282
answers question: http://stackoverflow.com/q/27290845
has body: $rootScope.$on('$stateChangeSuccess', function (event, to, toParams, from, fromParams) { $rootScope.$previousState = from; $rootScope.$previousStateParams = fromParams; }); On my project I have used ui.router, but main idea is: Catch change state event and save data to root scope. And you will always have an ability back to previous sate.
score: 0
type: Answer

http://stackoverflow.com/comment/42976399
has text: yes:
comment on: http://stackoverflow.com/a/27250983
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/111925717
comment on: http://stackoverflow.com/a/27299120
type: Comment
has text: Doesn't seem to work for `top:50%`, anyone got a solution for that?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42909484
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27214718
has text: Please see my earlier question: http://stackoverflow.com/questions/27214456/execution-contexts-in-javascript/27214701#27214701

http://stackoverflow.com/q/27284978
answer count: 2
has answer: http://stackoverflow.com/a/27286185
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27285408
tagged with: css
has body: I was wondering if there was any way to achieve this look for navigation hover with CSS? I've tried using a box-shadow effect, but the blur effect would bleed to the sides. As shown in the image, I really want the cut-off look along the edges as well as the gradient applied ONLY to the bottom edge. Also, this doesn't need to be achieved with CSS; JS or JQ is acceptable.
tagged with: hover
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27285408
accepted answer: http://stackoverflow.com/a/27286185
tagged with: javascript
has title: CSS Navigation Link Hover
score: 0

http://stackoverflow.com/q/27233841
has title: __proto__ chain in JS, property is undefined
downvote count: 0
score: 1
has body: I am confused with the proto chain in javascript. In the following code, only A has the property name while B and C don't. And the __proto__ are set for b and c, correctly I believe. Why is the output of name property for b and c are "undefined"? How do I make them print out "Tom"? function A(name) { this.name = name; } function B() { A.call(this, this.name); } function C() { B.call(this); } var a = new A("Tom"); var b = new B(); var c = new C(); b.__proto__ = a; c.__proto__ = b; console.log("c.name = " + c.name); // undefined console.log("b.name = " + b.name); // undefined console.log("a.name = " + a.name); // Tom
type: AnsweredQuestion
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/42945016
accepted answer: http://stackoverflow.com/a/27233951
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27233951

http://stackoverflow.com/a/27203085
has comment: http://stackoverflow.com/comment/42889010
has comment: http://stackoverflow.com/comment/42889012
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42888961
has body: The size of the array is not an array entry (aka array "element"). It is a property, length, but it's not an entry. An empty array is exactly that: empty. The code you posted in a comment: array = { text:[10] } does not create an empty array. It creates an array of length 1 with the entry 10 in it. If you want to create an empty array with a specific length, you can't do that in a single statement with an array literal ([]). You have two ways you can do it: Using an array literal and assigning to length: var a = []; a.length = 10; or using new Array: var a = new Array(10); But there's virtually never any reason, in JavaScript, to predefine the length of the array, because standard JavaScript arrays aren't really arrays at all. It does make sense with the new typed arrays (Uint32Array and such), and to do it you have to use the array constructor (new Uint32Array(10)).
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42888981
downvote count: 0
answers question: http://stackoverflow.com/q/27203073
accepted answer of: http://stackoverflow.com/q/27203073
has comment: http://stackoverflow.com/comment/42888948
type: Answer

http://stackoverflow.com/a/27253649
type: Answer
upvote count: 1
score: 1
has body: You can create a param in your route configuration. For my example, needConfirmation. $routeProvider .when('/route1', { templateUrl: 'page1.html', controller: 'Page1Ctrl' }) .when('/route2', { templateUrl: 'page2.html', controller: 'Page2Ctrl', needConfirmation: true }) .otherwise({ redirectTo: '/route1' }); Then in your run() phase : $rootScope.$on('$routeChangeStart', function (event, next) { if (next.needConfirmation) { if (!confirm('Are you sure?')) { event.preventDefault(); } } }); Here is a fully working example : angular.module('demo', ['ngRoute']); angular.module('demo') .config(function ($routeProvider) { $routeProvider .when('/route1', { template: ' this is the page 1 go to page 2', controller: 'Page1Ctrl' }) .when('/route2', { template: ' this is the page 2 go to page 1', controller: 'Page2Ctrl', needConfirmation: true }) .otherwise({ redirectTo: '/route1' }); }); angular.module('demo') .run(function ($rootScope) { $rootScope.$on('$routeChangeStart', function (event, next) { if (next.needConfirmation) { if (!confirm('Are you sure?')) { event.preventDefault(); } } }); }); angular.module('demo') .controller('Page1Ctrl', function () { }); angular.module('demo') .controller('Page2Ctrl', function () { });
answers question: http://stackoverflow.com/q/27252500
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27252500
type: AcceptedAnswer

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/27238018
tags question: http://stackoverflow.com/q/27168678
tags question: http://stackoverflow.com/q/27172953
tags question: http://stackoverflow.com/q/27251992
type: Tag
tags question: http://stackoverflow.com/q/27195976
tags question: http://stackoverflow.com/q/27164974
tags question: http://stackoverflow.com/q/27221678
tags question: http://stackoverflow.com/q/27299580

http://stackoverflow.com/comment/42828467
has text: There are to many ways to fix this... What is your definition of simple? What have you tried already? And yes... it is possible to do this without plugins and libraries... tl;dr your question is too broad
score: 0
comment on: http://stackoverflow.com/q/27168501
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27157229
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27162075
has answer: http://stackoverflow.com/a/27173452
score: 1
upvote count: 1
type: Question
answer count: 2
tagged with: stomp
tagged with: spring-websocket
tagged with: javascript
has title: Web socket item remove convention
downvote count: 0
tagged with: websocket
favorite count: 0
has body: I am implementing a WebSocket client to display a list of items synchronized with the server state. I am using Spring on the backend and AngularJS for the front-end. I have gone through many examples and so far all discuss how to add items on the client side. I am however wondering if there is a convention on how to handle both additions and removals. I was thinking about using STOMP and subscribing to add and remove topics. Are there any established alternatives?
tagged with: angularjs

http://stackoverflow.com/comment/42833357
score: 0
comment on: http://stackoverflow.com/a/27171163
type: Comment
has text: Hehe, updated question again. I have a stubborn need to know why they behave differently. I know they do behave differently and there is probably a good reason, but what is that good reason?
type: AnswerComment

http://stackoverflow.com/a/45915479
has body: Actually, the margin-bottom in bootstrap is assigned to ol and ul elements, not the nav or navbar classes, which is why this didn't work. So, instead of adding "margin-bottom: 0px !important;" to .navbar, try assigning it to an ol or ul element. Also, if all goes well and the css file is linked after the bootstrap file, the !important is no longer neccessary.
answers question: http://stackoverflow.com/q/27188438
has comment: http://stackoverflow.com/comment/80838261
score: 0
type: Answer

http://stackoverflow.com/a/27175395
upvote count: 1
has body: You have to create StringLiteral as a argument and add it to functionCall, in othere case it could be NumberLiteral, ArrrayLiteral etc. (see: http://javadox.com/org.mozilla/rhino/1.7R4/org/mozilla/javascript/ast/AstNode.html) private FunctionCall getFunctionCall() { FunctionCall functionCall = new FunctionCall(); Name name = new Name(); name.setIdentifier("initialize"); functionCall.setTarget(name); StringLiteral arg = new StringLiteral(); arg.setValue("value"); arg.setQuoteCharacter('"'); functionCall.addArgument(arg); return functionCall; } class FunctionVisitor implements NodeVisitor { @Override public boolean visit(AstNode node) { if (node.getClass() == FunctionNode.class) { FunctionNode fun = (FunctionNode) node; if(fun.getName().equals("initialize")) //prevents infinit loop { return true; } fun.getBody().addChildrenToFront(new EmptyStatement()); // adds ';', I don't know if required fun.getBody().addChildrenToFront(getFunctionCall());//no fun.addChildrenToFront } return true; } } You can print every corect AstNode by toSource() method. I hope this will help.
has comment: http://stackoverflow.com/comment/42861908
has comment: http://stackoverflow.com/comment/42868153
has comment: http://stackoverflow.com/comment/42925330
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27165521
has comment: http://stackoverflow.com/comment/43480778
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27165521

http://stackoverflow.com/q/27240776
has answer: http://stackoverflow.com/a/27241162
has title: AngularJS: element.show() in directive not working
has answer: http://stackoverflow.com/a/27240914
possible better answer: http://stackoverflow.com/a/27241095
accepted answer: http://stackoverflow.com/a/27240914
tagged with: javascript
has body: I have a directive (see plunk) that wraps a DIV with style display:none and after one second shows its content. I tried to make it display with element.show() and $(element).show() (including jQuery) but it never worked. The timeout works, what's wrong with this code? This is the HTML: &lt;hideme&gt; Show this after one second &lt;/hideme&gt; and this is the javascript: angular.module("app", []); function MyCtrl($scope) {} angular.module("app").directive('hideme', function($timeout) { return { restrict: 'E', template: '&lt;div style="display: none !important"&gt;&lt;/div&gt;', link: function(scope, element, attrs) { $timeout(function() { element.show(); }, 1000); } }; });
has answer: http://stackoverflow.com/a/40738842
has answer: http://stackoverflow.com/a/36175724
upvote count: 3
favorite count: 0
downvote count: 0
tagged with: angularjs
answer count: 5
has answer: http://stackoverflow.com/a/27241095
type: Question
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/27271489
tagged with: javascript
favorite count: 0
score: 0
tagged with: angularjs
has title: $state returned blank result in Angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has body: I follow the tutorial here : http://learn.ionicframework.com/formulas/navigation-and-routing-part-1/ but gotten blank result. I have no idea why it won't render. broken demo http://codepen.io/anon/pen/azvLRa
has comment: http://stackoverflow.com/comment/43018144
tagged with: ionic-framework
has comment: http://stackoverflow.com/comment/43013938

http://stackoverflow.com/a/27286403
downvote count: 0
has body: The mouse event object contains the target you were clicking on. So you can access that, pass it to jQuery and do whatever you want with it, eg. accessing the ID of the input. $(e.target).find('input').attr('id'); And as the other commentators, I'm hoping that your IDs are different ;) Edit: I re-read your question, you just want the value. So you don't need the ID theid in your markup overall (for this usecase). Getting the value from the clicked element: $(e.target).find('input').val(); And working, see the alert(): See this jsfiddle
has comment: http://stackoverflow.com/comment/43040313
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43057834
type: Answer
has comment: http://stackoverflow.com/comment/43041889
has comment: http://stackoverflow.com/comment/43040361
has comment: http://stackoverflow.com/comment/43040373
score: 3
has comment: http://stackoverflow.com/comment/43040220
upvote count: 3
has comment: http://stackoverflow.com/comment/43040138
answers question: http://stackoverflow.com/q/27286320
accepted answer of: http://stackoverflow.com/q/27286320

http://stackoverflow.com/q/27293537
has answer: http://stackoverflow.com/a/27293740
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has title: parse JSON date to another format
has answer: http://stackoverflow.com/a/27293777
possible better answer: http://stackoverflow.com/a/27293740
has answer: http://stackoverflow.com/a/27293619
has answer: http://stackoverflow.com/a/27293751
tagged with: jquery
favorite count: 0
has body: If I receive all records from DB with JSON how I can change format 2014-09-04 23:20:00 (this is stored on DB) to 04/09/2014. At the moment date are parsed to Thu Jan 01 1970 00:00:02 GMT+0000 (GMT Standard Time)
tagged with: php
answer count: 4
accepted answer: http://stackoverflow.com/a/27293619
type: AnsweredQuestion
upvote count: 2
score: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/42940736
comment on: http://stackoverflow.com/a/27230262
has text: I appreciate the help regardless. I need to learn some from what he posted. Wasn't a waste, thank you!
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/43022594
comment on: http://stackoverflow.com/a/27276820
score: 0
type: AnswerComment
has text: Here is the if statement: if ((month==4 || month==6 || month==9 || month==11) && day==31) { alert("Month "+month+" doesn't have 31 days!") return false; }
type: Comment

http://stackoverflow.com/q/27228750
tagged with: javascript
has body: I'm trying to use Google charts in my Polls' website. Everything works fine, until I have no votes to show ( for example, no one has answered the question). The chart doesn't even appear, as you can see in this example: http://jsfiddle.net/au9prxsg/3/ google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 0], ['Eat', 0], ['Commute', 0], ['Watch TV', 0], ['Sleep', 0] ]); var options = { title: 'My Daily Activities', sliceVisibilityThreshold: 0 }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } I even put the property sliceVisibilityThreshold: 0. Is it possible to have a pie chart with any data?
score: 0
possible better answer: http://stackoverflow.com/a/27229061
answer count: 3
has answer: http://stackoverflow.com/a/27229061
accepted answer: http://stackoverflow.com/a/27343492
tagged with: php
has answer: http://stackoverflow.com/a/27228856
type: AnsweredQuestion
has title: Google charts Pie without data
type: Question
tagged with: charts
has answer: http://stackoverflow.com/a/27343492
tagged with: google-visualization
has comment: http://stackoverflow.com/comment/42934598

http://stackoverflow.com/a/35618021
upvote count: 0
has body: var someVr= element[0].querySelector('#showSelector'); myfunction(){ alert("hi"); } angular.element(someVr).ready(function () { myfunction(); }); This will do the job.
score: -3
type: Answer
downvote count: 3
answers question: http://stackoverflow.com/q/27194805

http://stackoverflow.com/q/27175840
has title: setTimeout(x, 0) not delaying in Chrome
has comment: http://stackoverflow.com/comment/42844053
has comment: http://stackoverflow.com/comment/42847774
tagged with: google-chrome
type: Question
tagged with: javascript
has body: I have a web page with a form on it; I want to warn the user if they move away. I haven't implemented dirty checking so my onbeforeunload code is simply window.onbeforeunload = function () { return 'message' }; I don't want this warning when they submit the form, so I remove the event on submit. However, the submit may fail, so I need to put the event back afterwards (so if they then navigate away they still get warned). To that end I have done the following: var tempDisableBeforeUnload = function() { var obu = window.onbeforeunload; if (obu) { window.onbeforeunload = null; setTimeout(function() { window.onbeforeunload = obu; }, 0); } } $("form.noWarnOnSubmit").submit(tempDisableBeforeUnload); This works fine in Firefox and IE - the setTimeout(x, 0) defers the restoration of the event handler until after the submit has decided whether it is successful or not. However, in Chrome, the timeout appears to occur immediately, and I get the warning when I submit my form. How can I make this work on Chrome, or how else can I achieve the end of "don't warn on submit, but put the warning back if the submit fails"?
has comment: http://stackoverflow.com/comment/42843818
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27175893
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27186178
favorite count: 0
has comment: http://stackoverflow.com/comment/42843926
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42841393
has comment: http://stackoverflow.com/comment/42841331

http://stackoverflow.com/comment/43577148
comment on: http://stackoverflow.com/a/27551174
type: AnswerComment
type: Comment
has text: Thanks for the example. (One thing: you don't need the setTimeout)
score: 1

http://stackoverflow.com/comment/45722348
type: AnswerComment
comment on: http://stackoverflow.com/a/27269753
score: 0
type: Comment
has text: hi @ Ravi kumar Raman if possible can you look to this question http://stackoverflow.com/questions/28670644/how-to-pass-the-list-of-radio-buttons-name-to-spring-controller-and-show-them-to

http://stackoverflow.com/q/27241543
has answer: http://stackoverflow.com/a/27241687
has answer: http://stackoverflow.com/a/27241660
tagged with: post
score: 0
has answer: http://stackoverflow.com/a/27241724
has answer: http://stackoverflow.com/a/27241737
has comment: http://stackoverflow.com/comment/42959517
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27241724
tagged with: ajax
has title: I can't pass a variable from my jQuery code to my PHP code
answer count: 5
has body: I'm trying to pass a variable from my jQuery code to my HTML/PHP code using AJAX and POST, but I get the error message "Notice: Undefined index: testData in C:\xampp\htdocs\teszt\test1.php on line 9". I'm using XAMPP, I'm running the code in localhost, I'm using Mozilla Firefox and here's my HTML/PHP code (test1.php): Test <?php echo " " . $_POST['testData'] . " ";?> And here's my jQuery code (script1.js): $(document).ready(function() { var temporaryVariable = "temporary variable"; $.ajax({ type: "POST", url: "test1.php", data: { testData:"2" }, success: function (result) { alert('success'); } }).done(function() { $('.testParagraph').addClass( temporaryVariable ); }); }); What I tried changing so far (but didn't work of course): test1.php: charset was previously iso-8859-2 GET instead of POST in both codes commenting out the script tag includes script1.js: commenting out the $(document).ready(function() {... lines in data: I tried changing the quote symbols from ' to " or no quote symbols at all commenting out the success: function... line and the two lines below it Also, when I run the PHP code, the p tag gets the temporaryVariable class from the jQuery code. Still, I get the error message written above. I would appreciate any help I get.
tagged with: php
possible better answer: http://stackoverflow.com/a/27241615
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42959663
has answer: http://stackoverflow.com/a/27241615
has comment: http://stackoverflow.com/comment/42959566
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42959519

http://stackoverflow.com/comment/42856146
comment on: http://stackoverflow.com/q/27184376
type: Comment
type: QuestionComment
has text: Here auto-complete is not transforming `numeric source` to `string search text`.
score: 0

http://stackoverflow.com/a/27221577
score: 2
downvote count: 0
has body: You need to qualify your line height value, probably with px. Also you could just clear your div using innerHTML. If you also wanted 577px to be you minimum height when you have no content make sure you set the minHeight of the element. This is because if there are no lines, line height won't affect anything. function Changecon() { var element = document.getElementById("myList"); element.innerHTML = ""; element.style.lineHeight = "577px"; element.style.minHeight = "577px"; }
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27221521
answers question: http://stackoverflow.com/q/27221521
type: Answer

http://stackoverflow.com/comment/42937005
type: QuestionComment
has text: I believe the question is, how can this plugin only act on the desired `img` tag, and not all `img` tags in the page.
score: 0
comment on: http://stackoverflow.com/q/27229946
type: Comment

http://stackoverflow.com/a/27191978
downvote count: 0
has body: In safari and google-chrome, you should use selectText.removeAllRanges(rng) Working fiddle
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27191467
score: 1
has comment: http://stackoverflow.com/comment/42869970

http://stackoverflow.com/comment/42938844
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27230543
type: QuestionComment
has text: I can't imagine jQuery likes `$changeicon .hasclass("glyphicon-chevron-down")` very much. You should really, really learn to use your JS console window when you run into issues. Everything that people have posted is irrelevant until you fix this.

http://stackoverflow.com/a/35543188
answers question: http://stackoverflow.com/q/27266857
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/60433102
has body: The only thing you need to change is the @param {Function} next to @param {Object}. Also, @return should describe what the function returns; e.g, (Object, Array) or a combination ({Object|Null})

tabs
type: Tag
tags question: http://stackoverflow.com/q/27212990
tags question: http://stackoverflow.com/q/27295843
tags question: http://stackoverflow.com/q/27154151
tags question: http://stackoverflow.com/q/27313302
tags question: http://stackoverflow.com/q/27293972
tags question: http://stackoverflow.com/q/27227987
tags question: http://stackoverflow.com/q/27211497
tags question: http://stackoverflow.com/q/27276534
tags question: http://stackoverflow.com/q/27201301
tags question: http://stackoverflow.com/q/27253432
tags question: http://stackoverflow.com/q/27278666
tag name: tabs
tags question: http://stackoverflow.com/q/27274238
tags question: http://stackoverflow.com/q/27158288

http://stackoverflow.com/q/27213025
has body: i have node js + express 4 issues. i'm trying to call a function in index.js from login.js and get an answer printed out, but it doesn't even give me an error cause. console log gives me what i want in the console , but it doesn't render on the page. index.js: var express = require('express'); var router = express.Router(); var login = require('./login.js'); /* GET home page. */ router.get('/', function(req, res) { res.render('index', { title: 'Express' }); }); /* Check login status */ router.get('/login', function(req, res) { var response = login.logintest(); res.send(response); }); module.exports = router; login.js: /* LOAD all requires needed here */ var request = require('request'); request = request.defaults({jar: true}); var cheerio = require('cheerio'); /* * GET logincheck check if user needs to login */ exports.logintest = logintest; function logintest(req, res) { request.get('http://internalbusinessdomain.com/', getStatus); }; function getStatus(err, mess, body) { if (!err &amp;&amp; mess.statusCode == 200) { // console.log(body) ; var $Cheers=cheerio.load(body); // console.log($Cheers('li').text()); if ($Cheers('li').text().substring(0,8) == "Inloggen"){ console.log("htli") return "hastologin"; } else {console.log("verbonden"); return "connected"; }; } else { console.log("niet verbonden met tln"); return "notconnected"; }; };
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27213254
answer count: 1
downvote count: 0
tagged with: callback
favorite count: 0
tagged with: node.js
has title: Page not returning results
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27213254
upvote count: 1

http://stackoverflow.com/comment/42850205
type: QuestionComment
type: Comment
has text: Are you happy with it? (p.s, I'd suggest to put also a `home` or `back` something button at the top cause it's not logic at first that to return to the main screen you need to click i.e: `button2` (again)) think about UX while building UI.
comment on: http://stackoverflow.com/q/27180216
score: 0

http://stackoverflow.com/a/64450043
upvote count: 3
has comment: http://stackoverflow.com/comment/114446205
downvote count: 1
has comment: http://stackoverflow.com/comment/126963649
has body: This problem was bugging me for hours. I was using Nextjs and trying to convert canvas to an image file. I used the other guy's solution but the created file was empty. So if this is your problem you should mention the size property in the file object. new File([Blob], `my_image${new Date()}.jpeg`, { type: "image/jpeg", lastModified: new Date(), size: 2, }); Just add the key the value it's not important.
answers question: http://stackoverflow.com/q/27159179
has comment: http://stackoverflow.com/comment/139087332
type: Answer
score: 2

http://stackoverflow.com/q/27236625
has comment: http://stackoverflow.com/comment/42950100
favorite count: 0
has title: JavaScript webpage
has comment: http://stackoverflow.com/comment/42950101
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42950247
has body: I am having trouble debugging my JavaScript webpage. Where I am having difficulty is where I marked (...). I get errors of undefined. Do I place my parameters from my function countDown(start, increment) which are start and increment into (...)? &lt;dl&gt; startNum:&amp;nbsp;&amp;nbsp;&lt;input type="text" id="&lt;!-- (...) --&gt;"/&gt; countBy:&amp;nbsp;&amp;nbsp;&lt;input type="text" id="&lt;!-- (...) --&gt;"/&gt; &lt;br/&gt; &lt;input type="button" value="Run Function" onClick="onClickFunc5()" /&gt; &lt;script&gt; function onClickFunc5() { var startNum = document.getElementById('&lt;!-- (...) --&gt;').value; var countBy = document.getElementById('&lt;!-- (...) --&gt;').value; &lt;!-- countDown(start, increment) --&gt; &lt;!-- (...) --&gt; } &lt;/script&gt;
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/27236699
has comment: http://stackoverflow.com/comment/42950003
accepted answer: http://stackoverflow.com/a/27236699
tagged with: javascript
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42950226
downvote count: 1

http://stackoverflow.com/q/27274533
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: angularjs
has body: I'm trying to create a service to initialize my whole application. It should for example calls for the first time my function "refreshDatas" which will try to refresh datas every 7seconds : app.service('dataRefreshServices', function($http, userService, serverConfigService) { $this = this; var listDatas = []; var listMessages = []; // Communication with the server $this.getServerUri = function() { return serverConfigService.getServerUri()+"majsvc/"; }; // Fonctions de rafraichissement $this.GetDataFromServer = function() { alert('Im here'); var uri = this.getServerUri(); var promises = {}; /* Commenting this part the time the function calling isn't working if(userService.user().isLogged()) { promises = $http.get(uri) .success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available return data; }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. return ""; }); }*/ return promises; }; $this.RefreshDatas = function () { alert('im here 1'); $this.listDatas = $this.GetDataFromServer().then(function(promise){ alert('refreshing the list'); $timeout(this.RefreshDatas , 7000); }); }(); }); My application controller : app.controller('ApplicationController', function($scope, $rootScope, $location, userService, serverConfigService, serverConnexionServices, dataRefreshServices, InitializationServices){ $scope.message = 'Everyone come and see how good I look! Logged :'+ userService.user().isLogged; this.IsUserLogged = function() { return userService.user().isLogged; }; this.InitializeApplicationConfiguration = function() { // Start the initialization of the server's configuration dataRefreshServices.RefreshDatas(); }; this.LogOut = function() { serverConnexionServices.LogOut(); }; }); The initialize function is called in the body of my index.html : &lt;body data-ng-controller="ApplicationController as controller" ng-ini…
has answer: http://stackoverflow.com/a/27274809
type: UnansweredQuestion
has title: Create a service to initialize my application with Angular

http://stackoverflow.com/q/27236090
has title: React/JSX Scope
tagged with: scope
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27773062
type: Question
tagged with: javascript
has body: Okay so I'm trying to intergrate React into an existing codebase. Currently we have a single page web-app that is operated by a common.js, however I have noticed that if JSX files or at least script files that are loaded as 'type="text/jsx"' in the HTMl file fail to appear within the scope of JS files. This creates a problem as we now have no way of manipulating the React components after initialization without refactoring an obscene amount of code. Common.js can't be transformed to JSX because we have external files/libraries that rely on it's scope.
score: 0
tagged with: reactjs
answer count: 1

http://stackoverflow.com/a/27307986
type: Answer
downvote count: 0
score: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27307834
has body: The simplest way is to put the code in a function that takes in (at least) a callback. You'll also want to buffer data from all data events since you cannot assume there will be only one. Example: // you may want to add other parameters too depending on your needs of course ... function linodeReq(cb) { var options = { hostname: 'api.linode.com', path: '', port: 443, method: 'GET' } https.get(options, function(response) { var buffer = ''; response.on('data', function(d) { buffer += d; }).on('end', function() { var body; try { body = JSON.parse(buffer) } catch (err) { return cb(err); } cb(null, body); }).setEncoding('utf8'); }); } // then use it like ... linodeReq(function(err, result) { // check for `err` first ... }); You should also handle the error events on the request (and response) object too, passing them to the callback if they occur. This could happen for example if the hostname couldn't be resolved or some other connection error.
accepted answer of: http://stackoverflow.com/q/27307834
upvote count: 3

http://stackoverflow.com/q/27258880
type: AnsweredQuestion
score: 4
has body: A friend of mine is renting a webshop from a company. He is able to choose from different templates, and has the ability to override the predefined CSS and add javascript snippets. He asked me to help her making several changes, but there is something I cannot deal with: the add to cart button. In the below CSS there is a "content" property that holds a predefined value. I would like to change the value of this property dinamically, based on the HTML lang attribute. Do you have any idea how could I achieve this? (I know how to get the value of the lang attribute. My problem is changing the value of the "content" property) #add_to_cart:before { display: block; font-family: 'sosa'; font-size: 35px; content: "Ä"; padding-right: 5px; font-weight: 400; width: 71px; height: 71px; line-height: 65px; text-align: center; text-indent: 0; text-shadow: none; color: #fff; }
has answer: http://stackoverflow.com/a/27259348
type: Question
has title: Changing CSS content property dynamically
tagged with: javascript
has answer: http://stackoverflow.com/a/27258913
upvote count: 4
answer count: 2
possible better answer: http://stackoverflow.com/a/27258913
downvote count: 0
has comment: http://stackoverflow.com/comment/42992517
accepted answer: http://stackoverflow.com/a/27259348
tagged with: jquery
has comment: http://stackoverflow.com/comment/42991560
favorite count: 0
linked to: http://stackoverflow.com/q/5041494
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42993149
tagged with: css

http://stackoverflow.com/q/27278003
score: 11
has title: Extending jshint with custom checks
possible better answer: http://stackoverflow.com/a/27347389
accepted answer: http://stackoverflow.com/a/27465539
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27465539
type: Question
tagged with: jshint
has body: In the Python world there are multiple static code analysis tools that can be easily extended with custom checks via writing plugins or extensions, for example: pylint flake8 In the JavaScript world, as far as I understand, jshint is the number one tool for static code analysis. I've been using it for a while and it definitely helps to find lots of code style violations, but, recently, I've encountered the need to extend jshint with a custom check. How can I do that? Is it extendable? I've looked through the documentation and the only thing I've found is how to write a custom reporter which is not what I'm looking for. As a workaround, I guess I can fork the jshint repo, implement the check, and use the fork in the project maintaining updates from the upstream.
answer count: 2
tagged with: static-code-analysis
tagged with: javascript
upvote count: 11
has answer: http://stackoverflow.com/a/27347389
has comment: http://stackoverflow.com/comment/43139224
favorite count: 0

http://stackoverflow.com/comment/42917249
comment on: http://stackoverflow.com/q/27218972
type: QuestionComment
type: Comment
has text: It is not a good idea to have the IDs begin with numerals.
score: 0

http://stackoverflow.com/comment/112467091
has text: My favorite answer in this list because it doesn't require a third party library to achieve what the OP is asking for.
comment on: http://stackoverflow.com/a/54738766
type: Comment
score: 2
type: AnswerComment

http://stackoverflow.com/q/27197337
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 3
has body: I have a simple pie chart, that animates on load out of the box from chart.js -- I am trying to allow the animation to que via a certain scroll point in a long vertical webpage -- the idea is for the below code to execute, only one time once a new users scrolls or hits page position -- the animation would que once and that's it. This is causing a lot of trouble -- as I have been able to execute and show / hide elements at page position with breakpoints and window scroll, but this animation will not execute inline with that, instead every which way I try to achieve this; what happens is the animation refreshes and replays everytime the browser scroll bar is adjusted the slightest. It just refreshes, scroll > animation refreshes > scroll > animation refreshes. Any pointers out there; the chart.js docs isn't very helpful in this since either as most of the demos are with onDomready. I have discovered ways to execute jQuery with breakpoints as you can see in the commented code below, but the actual animation within just ignores and fires at every scroll adjustment. Also here is main external chart.js file that powers the below. Chart.JS external JS var breakpoint = false; $(window).scroll(function() { if ($(this).scrollTop() &gt; 1300 &amp;&amp; !breakpoint ) { // do stuff // $(window).scroll(function() { // if ($(this).scrollTop() &gt; 1100) { // $(function () { // $(document).ready(function () { var chart = null; var colors = Highcharts.getOptions().colors, categories = ['Shop', 'Buy', 'Own'], name = 'Browser brands', data = [{ // y: 55.11, // color: colors[0], // drilldown: { // name: 'MSIE versions', // categories: ['MSIE 6.0', 'MSIE 7.0', 'MSIE 8.0', 'MSIE 9.0'], // data: [10.85, 7.35, 33.06, 2.81], // color: colors[0] // } // }, { y: 3, color: colors[8], drilldown: { name: 'Buy', // categories: ['Firefox 2.0', 'Firefox 3.0', 'Firefox 3.5', 'Firefox 3.6', 'Firefox 4.0'], data: [10.20, 10.83, 11.58, 13.12, 5.43], color: colors[8] } }, { y: 7, color: colors[8], drill…
accepted answer: http://stackoverflow.com/a/27198169
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27198169
tagged with: animation
has title: chart.js pie animation, play one time, when at certain position in page via vertical scroll
type: AnsweredQuestion
score: 3
downvote count: 0

http://stackoverflow.com/comment/49969784
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/30968798
score: 1
has text: Try to include an explanation on what your code does so OP actually understands it.

http://stackoverflow.com/comment/42962033
type: QuestionComment
comment on: http://stackoverflow.com/q/27242821
has text: Thanks but same delay on mobile devices, works fine on PC
score: 0
type: Comment

http://stackoverflow.com/comment/43075263
comment on: http://stackoverflow.com/q/27305747
score: 0
has text: You may find this article on macro and micro tasks useful: https://github.com/YuzuJS/setImmediate
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43016328
type: Comment
comment on: http://stackoverflow.com/q/27273415
type: QuestionComment
score: 0
has text: Is that a typo, You are missing the last single quote at `console.log($(this).hasClass('nv-slice')) ` ?

http://stackoverflow.com/q/27187360
type: Question
has body: I want to change the css and script tags file of header part of master page without the post back. I have a tab control on the aspx page, when changing each tab then scripts tag on the master page should change wrt to that tabs without post back. How can I do that?
linked to: http://stackoverflow.com/q/2024486
has title: How to change the css file and scripts on the master page without the post back
tagged with: javascript
tagged with: asp.net
score: 0
has comment: http://stackoverflow.com/comment/42861718
has comment: http://stackoverflow.com/comment/42861591
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42861253

http://stackoverflow.com/a/27298685
has comment: http://stackoverflow.com/comment/43063133
has comment: http://stackoverflow.com/comment/43062455
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27298524
type: Answer
has comment: http://stackoverflow.com/comment/43062002
answers question: http://stackoverflow.com/q/27298524
has body: Actually if you see your console you will some errors, those are jQuery Migrate Plugin - Warning Messages. To resolve all these warning have a look at this link: jQuery Migrate Plugin - Warning Messages

http://stackoverflow.com/q/27203918
has title: How to apply css style on the list of div by defending on the class name using javascript
has answer: http://stackoverflow.com/a/27203940
tagged with: javascript
has answer: http://stackoverflow.com/a/27204241
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42890547
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27204241
type: Question
tagged with: css
has comment: http://stackoverflow.com/comment/42890724
score: 0
answer count: 2
has body: I got list of li tag that have 2 kinds of class name coding and design. The result that i want is if the li is design the post-link is display block and the site-link is display none while coding class name will have opposite effect. I store the li class into array then the condition will loop to find out what li tag have class name of design and coding. The result is the condition only read the last element of the array. Can you help me on this... sorry not good in asking question in english. HTML var workArray = []; var $work = jQuery('.slide-container li'); var $workClass = $work.attr('class'); $work.each(function(){ workArray.push($workClass); for(i = 0; i < workArray.length; i++){ if(jQuery(this).hasClass('Design')){ jQuery('.post-link').css('display','block'); }else{ jQuery('.post-link').css('display','none'); } } });
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/27203940

http://stackoverflow.com/q/27158686
score: 0
type: Question
has title: this JavaScript log in wont work
tagged with: javascript
has comment: http://stackoverflow.com/comment/42811840
has comment: http://stackoverflow.com/comment/42811452
has comment: http://stackoverflow.com/comment/42811926
has body: i found and edited this code from this website for practice but the code wont work with me. the goal of the code is to create a username and password on one page (which for now is limited to premade usernames and passwords) and send that array of information to another page where you can log in using the username and password from the other page. the code looks fine to me but i am an amateur and want to know what is wrong with it. thank you for your answer. the code for where the username and password are defined is: create account the code for taking the already created username and password from the above page and using that for a log in page is this: log on page ENTER USER NAME ENTER PASSWORD
answer count: 1
has comment: http://stackoverflow.com/comment/42812934
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27158754
has comment: http://stackoverflow.com/comment/42812351
has comment: http://stackoverflow.com/comment/42812118

http://stackoverflow.com/q/27191961
tagged with: jquery
has title: In a Rails form how to use Jquery to hide and unhide form elements? My scripts won't work
type: AnsweredQuestion
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/27192277
accepted answer: http://stackoverflow.com/a/27192277
has body: In Rails I have a form which edit multiple records at a time. I want to show some elements only if a checkbox is ticked. Here's the javascript I wrote : &lt;script type="text/javascript"&gt; $(document).ready(function() { // Initially if free is checked hide nonfree options else show if ($('&lt;%= "#submits_#{submitid}_free" %&gt;').attr('value') == '1') { $('&lt;%= "#submits_#{submitid}_revealnonfree" %&gt;').hide(); } else { $('&lt;%= "#submits_#{submitid}_revealnonfree" %&gt;').show(); } // Initiall if sell rights is checked show prices or else hide if ($('&lt;%= "#submits_#{submitid}_sellrights" %&gt;').attr('value') == '1') { $('&lt;%= "#submits_#{submitid}_revealrights" %&gt;').show(); } else { $('&lt;%= "#submits_#{submitid}_revealrights" %&gt;').hide(); } // If free checked hide nonfree $('&lt;%= "#submits_#{submitid}_free" %&gt;').change(function() { if (this.checked) { $('&lt;%= "#submits_#{submitid}_revealnonfree" %&gt;').fadeOut('slow'); } else { $('&lt;%= "#submits_#{submitid}_revealnonfree" %&gt;').fadeIn('slow'); } }); //If sell rights checked show prices $('&lt;%= "#submits_#{submitid}_sellrights" %&gt;').change(function() { if (this.checked) { $('&lt;%= "#submits_#{submitid}_revealrights" %&gt;').fadeIn('slow'); } else { $('&lt;%= "#submits_#{submitid}_revealrights" %&gt;').fadeOut('slow'); } }); }); &lt;/script&gt; I load it after every record. The script does hide and unhide elements when the correct check box values are changed. But if the checkbox is ticked on the beginning when the page loads, the script won't show the necessary elements. The first part of the script should do that but it doesn't. Here's my form source code without the scripts : http://pastebin.com/Vj9HbrEB
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/27231896
tagged with: c#
has body: I have a question about getting Javascript Variables from a local PC JS File to a Local C# Program. I'm writing a C# Program for the PC which needs some Variables from a Webpage which is locally located on my PC with just HTML CSS and JS which is displayed in a webview function in my C# Form. Now I'm reading a Value from the User in my "Webpage" and want to pass this variables to my C# Code so I can use this variables further.
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42940865
has answer: http://stackoverflow.com/a/27231955
answer count: 2
upvote count: 0
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26431948
has title: Javascript Variable to C#
downvote count: 2
has comment: http://stackoverflow.com/comment/42942302
linked to: http://stackoverflow.com/q/15384416
has answer: http://stackoverflow.com/a/27232052
type: Question

http://stackoverflow.com/comment/43011956
has text: Although it works in your fiddle it somehow doesn't work in my code. Maybe it has something to do with bootstrap or one of the (too many) js libraries I load?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27270952

http://stackoverflow.com/a/27258955
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: The observable self.Participants is instantiated with an empty array and has a value from the very beginning. However, self.Location is not supplied any initial value and will initialize without a value resulting in undefined. That said, at what point prior to calling self.Location().Address1(model.Address1); does your code supply a value to populate the self.location observable?
accepted answer of: http://stackoverflow.com/q/27257145
score: 1
has comment: http://stackoverflow.com/comment/42992179
upvote count: 1
answers question: http://stackoverflow.com/q/27257145

http://stackoverflow.com/a/27226040
accepted answer of: http://stackoverflow.com/q/27225769
answers question: http://stackoverflow.com/q/27225769
score: 0
type: AcceptedAnswer
type: Answer
has body: In order to access the selected file using JS File API, you must use plain javascript : $("#file_upload_field").val() will return C:/fakepath/xxx You must fetch the JS object using get(0), only then you can access the actual selected file using .files attribute, which will return an array of selected files. Append [0] to fetch the first selected file. $("#view_attachment_btn").on( 'click', function() { var fr = new FileReader(); fr.onload = function () { window.open(fr.result); }; fr.readAsDataURL($("#file_upload_field").get(0).files[0]); }

http://stackoverflow.com/comment/48416413
type: QuestionComment
comment on: http://stackoverflow.com/q/27154988
score: 0
has text: Hi Nikola, my solution was not to use spine animation and convert my animation to other format supported by Phaser. Because it seems that Phaser developers did not add spine support to Phaser for some strong reasons. So just convert the animations into other format and move one. Good luck.
type: Comment

http://stackoverflow.com/q/27251013
has answer: http://stackoverflow.com/a/27252052
type: AnsweredQuestion
tagged with: codeigniter
tagged with: php
has comment: http://stackoverflow.com/comment/42976203
has comment: http://stackoverflow.com/comment/42976378
type: Question
has comment: http://stackoverflow.com/comment/42977522
has title: Ajax and json_encode echoing text instead of json in Firefox
score: 0
tagged with: firefox
answer count: 1
has comment: http://stackoverflow.com/comment/42977423
tagged with: javascript
has body: I have a small script that returns shipping costs into an HTML , from PHP/CodeIgniter. Here's the PHP code, with some example data for the Array: public function atualiza_frete_ajax() { $response_array = array( 'html_select_frete' =&gt; "&lt;form&gt;&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;" ); header("Content-Type: application/json", true); echo json_encode($response_array); } And the JS/jQuery function atualizar_frete_ajax() { var $form = $("#form-cep"); $(".loading").fadeIn(); $.ajax({ type: $form.attr("method"), url: $form.attr("action"), dataType: "json", data: $form.serialize() }).done(function(data){ $(".frete-valor").html(data.html_select_frete) $(".loading").hide() }); event.preventDefault(); } Now the issue is: it works great in Chrome, but in Firefox I just get this nasty text output. Here the printscreen of how FF outputs it: http://prntscr.com/5cfcgc I've made sure the file encoding is UTF8 and no BOM, and I'm using the correct header before I echo the response. Any clues?
accepted answer: http://stackoverflow.com/a/27252052
tagged with: ajax
has comment: http://stackoverflow.com/comment/42976341
has comment: http://stackoverflow.com/comment/42976316

http://stackoverflow.com/a/27231875
answers question: http://stackoverflow.com/q/27231108
type: AcceptedAnswer
upvote count: 2
type: Answer
has body: Your .indexOf() search is looking for a string of "The Matrix_1999", but the basket doesn't hold strings. It holds objects with all the movie info. So your .indexOf() was returning -1. You need a function that will search for the right object in the basket based on the name and year that you give it. Also, there's no need to add the name/year as properties to the basket. var master_basket = new Array(); /*** This will receive the movie name/year, and return the index or -1 if not found ***/ function get_index_of_item(movie_name, movie_year) { for (var i = 0; i &lt; master_basket.length; i++) { if (master_basket[i].movie_name == movie_name &amp;&amp; master_basket[i].movie_year == movie_year { return i; } } return -1; } function addToBasket(item) { master_basket.push(item); showBasketObjects(); } // We need to pass along the movie name and year so it can be used to // fetch the right index from the array. function showBasketObjects() { $("#basket_content").empty(); $.each(master_basket, function(k, v) { var name_and_year = v.movie_name + "_" + v.movie_year; $("#basket_content").append("&lt;div class='item_list'&gt;" + v.movie_name + "&lt;a class='remove_link' href='" + name_and_year + "'&gt;&lt;img width='20' src='http://i61.tinypic.com/4n9tt.png'&gt;&lt;/a&gt;&lt;/div&gt;"); }); $(".remove_link").on('click', function (e) { // Split the `href` on the `_` character to get the name and year var name_year = $(this).attr("href").split("_"); // The split gave us an Array. The name is at the first index, // and the year is at the second var index = get_index_of_item(name_year[0], name_year[1]); // We check to see if it returned `-1`, and if not, we remove it if (index !== -1) { master_basket.splice(index, 1); console.log(master_basket); $(this).closest('.item_list').remove(); } else { console.log("DEBUG: For some reason it was not in the list"); } return false; }); } // I think the `movieName` is getting `"The Matrix_1999"`, so split it on `"_"` function addmovie(movieName…
score: 2
accepted answer of: http://stackoverflow.com/q/27231108
downvote count: 0

http://stackoverflow.com/comment/42807534
has text: I agree. But that's the original CSS selector the OP used.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27156532

http://stackoverflow.com/a/27201313
has body: Considering you're using WAMP on localhost, give your /www/ directory full permissions by right clicking on it and clicking on Properties then Security.
answers question: http://stackoverflow.com/q/27201142
score: 0
type: Answer

http://stackoverflow.com/q/27216697
score: 1
has answer: http://stackoverflow.com/a/27216734
tagged with: html-table
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: sorting
tagged with: http://stackoverflow.com/tag/html
has title: PHP and html table, using tablesorter javascript
accepted answer: http://stackoverflow.com/a/27216734
favorite count: 0
has body: I've setup tablesorter which works when using a basic html table. I'm now trying to call in data from a database which works but for some reason each set has its own heading which then stops me from being able to sort the data. link to screenshot due to rep : http://awesomescreenshot.com/0f13xu5l6f This is the code that is being used... echo ' '; while($info = mysql_fetch_array($queryRetrieve, MYSQL_ASSOC)) { echo ' '; echo ' '; echo ' '; echo ' Fullname '; echo ' Age '; echo ' Email '; echo ' Contact no. '; echo ' Date Joined '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '.$info["mFN"].''; echo ' &nbsp'.$info["mSN"].''; echo ' '.$info["mAge"].' '; echo ' '.$info["mEmail"].' '; echo ' '.$info["mPhone"].' '; echo ' '.$info["mDateJoined"].' '; echo ' '; echo ' '; echo ' '; } Anyone have any ideas? quite new to coding and this is really bugging me now as I've tried quite a few methods and nothing seems to work when calling in data.
upvote count: 1
tagged with: php
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/42835963
type: AnswerComment
score: 0
type: Comment
has text: yes your fiddle would be the best, but I do not want to write js for it, so I am going with the css content solution. Thank you
comment on: http://stackoverflow.com/a/27171811

http://stackoverflow.com/a/27201216
score: 0
answers question: http://stackoverflow.com/q/27197596
type: AcceptedAnswer
has body: So I ended up with a directive-usage solution css: a.disabled { color: #cccccc; cursor: default; text-decoration: none; } html: nicename js .directive('lockBeforeResolved', function() { return { restrict: 'C', //check as a class link: function(scope, element, attrs, controller) { attrs.$observe('href',function(){ element.toggleClass("disabled"); }); element.on("click", function(e) { if (element.hasClass("disabled")) { e.stopPropagation();; return false; } }); }, } }) Initially, when sref isnt yet resolved, the link stays unclickable. After resolve events, the class disabled is removed which allows clicking on a link. Hope it helps someone
accepted answer of: http://stackoverflow.com/q/27197596
type: Answer

http://stackoverflow.com/comment/42973497
has text: are you sure that `$('#searchSubmit')` is present in the DOM when you initialize the click event?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27249094

http://stackoverflow.com/comment/43084021
type: Comment
has text: @user1850796 what do you get when you do `alert(JSON.stringify(file))` ?
type: AnswerComment
comment on: http://stackoverflow.com/a/27311086
score: 0

http://stackoverflow.com/comment/42810329
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27158094
has text: The chord layout doesn't expose anything to do this. You'd have to modify the source.
score: 1

http://stackoverflow.com/q/27161165
tagged with: ruby-on-rails
tagged with: checkbox
has title: Checkbox state control - best option? (javascript/jquery, database or other)
has comment: http://stackoverflow.com/comment/42833640
type: Question
has body: I'm trying to find the best way to implement a solution and I want to hear your opinion on this. I have a form (rails - simpleform) with several fields. Some of these fields have a checkbox associated. The use for the checkbox is simple: if the user wants to leave the field blank (the data might be missing) he needs to check the checkbox, this is to make sure that he left the field in blank for purpose. Right now I'm controling the checkboxes with javascript and jquery validations. And for the fields I use on the model the following validation validates :field, acceptance: true, :unless => :field? This is working except if the user forgets to input some data, and rails throws back some error (for example: "field must be accepted"), then the pages refreshes and the checkbox state is lost. To control this on the "edit" or "update" action I have a script running on document load that checks if the content of the field is empty, if it is, then it's a sign that the checkbox should be checked... Besides this not being very efficient, it doesn't work on the "new" or "create" action, when an error occurs and the page gets refreshed. So I'm looking for better solutions... Should I use something like jquery.cookie and store the checkbox state on a cookie? Should I add all checkboxes to the database and control the state that way? (i don't like the idea of having gigantic tables to control everything on the database...) Should I pass the state as parameters on the form? What's your thoughts on the best solution to accomplish this? --- Update --- Here's the controller code: respond_to do |format| if @sample.save format.html { redirect_to @sample, notice: 'Sample was successfully created.' } format.json { render json: @sample, status: :created, location: @sample } else format.html { render action: "new" } format.json { render json: @sample.errors, status: :unprocessable_entity } end end And on the view: <% if @sample.errors.any? %> Não foi possível gravar o registo. Erro(s) enco…
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42833915
has comment: http://stackoverflow.com/comment/42816572
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42816692

http://stackoverflow.com/q/27216454
tagged with: web
linked to: http://stackoverflow.com/q/23272611
favorite count: 0
has comment: http://stackoverflow.com/comment/42912764
type: UnansweredQuestion
tagged with: request
has answer: http://stackoverflow.com/a/27216511
score: 1
tagged with: java
has title: Cross Site Form Request in Javascript
tagged with: forms
upvote count: 1
type: Question
tagged with: javascript
has body: I have a requirement from my supervisors to make a form request in a form that resides in an external website, get the results and show them in our site. Is that even possible with Javascript ?. They have done this in Java so the requirement is based on the fact that they have done it before but my guess is that there might be security implications/restrictions on doing this. Any help or clue would be highly appreciated Thanks in advance Luis Santos
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27213225
has comment: http://stackoverflow.com/comment/42906882
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27213242
has body: I'm trying to change the id of the select field with a JS function, please take a look at my HTML and JS code. HTML: Category 2 Category 3 Category 4 Category 2 Category 1 JS: function change_id(){ var idSuffix = jQuery(this).val(); return 'example' + idSuffix; }
type: Question
has title: jQuery - Change id according to the value selected from the select field
has comment: http://stackoverflow.com/comment/42906887
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27213242
score: 0
answer count: 1

jquery-countdown
tag name: jquery-countdown
type: Tag
tags question: http://stackoverflow.com/q/27210029

livereload
type: Tag
tags question: http://stackoverflow.com/q/27278863
tag name: livereload
tags question: http://stackoverflow.com/q/27175835

http://stackoverflow.com/comment/42966931
score: 0
type: Comment
has text: ReferenceError: slider is not defined slider.stopShow();
comment on: http://stackoverflow.com/a/27244532
type: AnswerComment

http://stackoverflow.com/q/27279826
has body: I made a PHP form that has jquery inside, for input mask and a Postal code search. On my local machine, it runs fine. But once i send to my server via FTP, it doesn't.
upvote count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43028421
has comment: http://stackoverflow.com/comment/43028497
has answer: http://stackoverflow.com/a/27279955
tagged with: twitter-bootstrap
has title: Jquery/JavaScript runs locally, but not on server
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27279956
has comment: http://stackoverflow.com/comment/43028760
has comment: http://stackoverflow.com/comment/43028487
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/61699880
has text: Also, two other cases it doesn't handle correctly: **data** (although it does handle datum correctly!) and **alumnus** vs. **alumni**
type: Comment
comment on: http://stackoverflow.com/a/27194360
score: 0
type: AnswerComment

http://stackoverflow.com/q/27240557
has title: Applying dynamic arguments to JavaScript function but deferring invocation
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27240598
downvote count: 0
score: 1
has body: Consider this JavaScript code: var someArg = "Hello"; elem1.onclick = function() { foo(someArg); }; someArg = "Bye"; elem2.onclick = function() { foo(someArg); }; I would like to invoke foo with the argument "Hello" when I click on elem1, however, the way above code works, foo is invoked with "Bye" every time. Basically, I'd like to apply someArg to foo but not actually invoke foo until later.
type: Question
has answer: http://stackoverflow.com/a/27240615
upvote count: 1
tagged with: javascript
tagged with: dom-events
favorite count: 0
possible better answer: http://stackoverflow.com/a/27240615
answer count: 3
has answer: http://stackoverflow.com/a/27240632
accepted answer: http://stackoverflow.com/a/27240598

http://stackoverflow.com/q/27188795
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
has comment: http://stackoverflow.com/comment/42864156
has body: I have an iFrame (without id and name) I need to get the iFrame Object from within an iFrame to apply css. If there is a name, I could do window.name, but, there is no Id and name. So, is there a way to get iFrame object?
favorite count: 0
has answer: http://stackoverflow.com/a/27189079
has comment: http://stackoverflow.com/comment/42863830
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27189079
score: 1
has comment: http://stackoverflow.com/comment/42864264
upvote count: 1
type: Question
has title: jQuery: Get iFrame Object from within an iFrame

http://stackoverflow.com/comment/67685811
type: Comment
type: QuestionComment
has text: Possible duplicate of [Check whether user has a Chrome extension installed](http://stackoverflow.com/questions/6293498/check-whether-user-has-a-chrome-extension-installed)
score: 0
comment on: http://stackoverflow.com/q/27166278

http://stackoverflow.com/a/27214629
has body: the way I can think of is to use the same way as css sprites suppose you have the image, and create different css for 'n' pieces. .pieces1 { left: 0px; width: 46px; background: url('img_navsprites.gif') 0 0; } .pieces2 { left: 63px; width: 43px; background: url('img_navsprites.gif') -47px 0; } .pieces3 { left: 129px; width: 43px; background: url('img_navsprites.gif') -91px 0; } then you can use &lt;div class="container"&gt;&lt;div class="pieces2"&gt;&lt;/div&gt;&lt;div class="piece3"&gt;&lt;/div&gt;&lt;/div&gt; to jumble them
accepted answer of: http://stackoverflow.com/q/27214564
score: 5
type: Answer
answers question: http://stackoverflow.com/q/27214564
upvote count: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27227740
has body: I have an app, where I load data from a server, and display it to the user. The problem is, that the server returns some special characters like ܘ (code 1816 in UTF-8), which seems to be some arabic letters that are right to left. When I try to bind them to my views like this &lt;pre ng-bind="json"&gt;&lt;/pre&gt; my Chrome crashes. I've created a Plnkr here http://plnkr.co/edit/CvbU7VTEl3dmj1JElIz5?p=preview It works fine in Firefox 33 and Safar 7.1 on my Mac. However, Chrome 40 on my Mac crashes most of the time (try to reload it a few times). If it is a browser issue, is there a workaround, to replace this characters when they are returned by the server? And if it is an angular problem, how could I debug this behaviour when the whole tab crashes?
tagged with: firefox
tagged with: javascript
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42934000
answer count: 0
has title: app crashes with special characters binding
type: UnansweredQuestion
tagged with: google-chrome
tagged with: character-encoding
has comment: http://stackoverflow.com/comment/42936148
type: Question
has comment: http://stackoverflow.com/comment/42936620

http://stackoverflow.com/comment/42882017
type: Comment
type: QuestionComment
has text: Okay, i'll try some more. Thankyou.
comment on: http://stackoverflow.com/q/27198736
score: 0

http://stackoverflow.com/comment/42930273
comment on: http://stackoverflow.com/a/27217265
has text: I went the defineProperty route and it seems to be working a treat. So much more logical, and no unnecessary $watch statements. Thanks for the suggestion.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27221767
answer count: 3
has title: How to display page title in form field?
has body: I'd like to display the page title in a form input field using plain javascript. I've tried this but it doesn't work. What am I doing wrong? &lt;input type="text" value="javascript:document.title;"/&gt; Also, how can I check if the input field is actually there and do nothing if so. I'd like to do this check to avoid JS errors.
possible better answer: http://stackoverflow.com/a/27221813
has answer: http://stackoverflow.com/a/27221813
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27221793
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27221793
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/27221812
tagged with: javascript
score: 0

http://stackoverflow.com/comment/56301109
score: 0
type: AnswerComment
type: Comment
has text: I wish there was `startAt`/`endAt` in combination with limit to retrive specific number of elements. So it could be done with first page using `limitToLast` 100+1 elements and then using the 101st element key to get elements 101-200 with `endAt=101st element` and limiting result for 100 elements.
comment on: http://stackoverflow.com/a/33484784

http://stackoverflow.com/comment/42909769
score: 0
has text: i've been thinking if the link is incorrect
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27214262

http://stackoverflow.com/comment/43041451
type: AnswerComment
comment on: http://stackoverflow.com/a/27287164
has text: Added `dataType: 'html',` - still returns '0'
score: 0
type: Comment

http://stackoverflow.com/q/27290834
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43096628
has comment: http://stackoverflow.com/comment/43095557
has title: Grouped-categories chart styling
has comment: http://stackoverflow.com/comment/43052475
tagged with: highcharts
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/43057047
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43058693
has body: I'm creating a chart that has a range [2010 January, 2014 December]. I might have data for each month in between (if no data, it's null) and my idea was to use the grouped-categories plugin in order to create a x axis that shows every month (not the label itself) and group the months in years. I achieved it using the grouped-categories plugin. I'm using primefaces that calls a Javascript function to display the JSON content as a chart. [a link] http://jsfiddle.net/TFhd7/161/ The main issue is that in the x-axis I'd like to make it like a ruler: - decrease the x-axis height (the thicks size) I tried tickLength but it doesn't work for grouped-categories chart. Any ideas?

http://stackoverflow.com/comment/42980997
type: Comment
type: QuestionComment
score: 1
has text: I just created a jsFiddle and couldn't get it to do anything. Can you crate a snippet here or a jsFiddle that reproduces the issue?
comment on: http://stackoverflow.com/q/27253361

http://stackoverflow.com/q/27307432
has comment: http://stackoverflow.com/comment/43077178
score: 0
answer count: 3
has title: Creating Google Maps LatLng classes dynamically
accepted answer: http://stackoverflow.com/a/27307524
has comment: http://stackoverflow.com/comment/43077199
linked to: http://stackoverflow.com/q/18464174
possible better answer: http://stackoverflow.com/a/27307464
upvote count: 1
has answer: http://stackoverflow.com/a/27307464
has answer: http://stackoverflow.com/a/27307476
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27307524
type: Question
tagged with: google-maps
has body: I'm trying to create markers on a google map using google's own API. My issue is that I'm reading JSON data from a text file then trying to break it down to the latitudes and longitudes so I can place markers on the map. You can see my code below. var oReq = new XMLHttpRequest(); //New request object oReq.onload = function() { //This is where you handle what to do with the response. //The actual data is found on this.responseText //alert(this.responseText); //Will alert: the location latitude and longitude in JSON locations = JSON.parse(this.responseText); //alert(locations); for(var i = 0; i &lt; locations.length; i++ ){ var tempLocation = locations[i]; //alert(tempLocation); var tempLat = tempLocation.latitude; var tempLong = tempLocation.longitude; tempLat = tempLat.toString(); tempLong = tempLong.toString(); pictureLocations[i] = new google.maps.LatLng(tempLat + ", " + tempLong); } var tempPictureLocation = pictureLocations.toString(); alert(tempPictureLocation); }; My issue is that the variable pictureLocations returns NaN. I believe that their is something wrong with my constructing statement but not sure exactly what's wrong. If I hardcode in some coordinates it also doesn't work. Thanks for the help!
tagged with: javascript
has comment: http://stackoverflow.com/comment/43077281
favorite count: 0
tagged with: google-maps-api-3

http://stackoverflow.com/comment/43048303
comment on: http://stackoverflow.com/a/27291261
type: Comment
score: 0
has text: Thanks, I already tried, but I does not work. But I remove the class carousel and It works, so thanks for the idea
type: AnswerComment

http://stackoverflow.com/comment/42952709
has text: As I said in the morning, I had some similar code, but can’t get it right. I came up with the following: http://snippi.com/s/97csrlj This code will (for now) display all custom post types (only not the default post type of Wordpress) and the latest post of them. I think this is where you point out your answer, only this isn’t what you suggest. Hope you can help me further with my code to realize your answer :) Look out to your response! Thank you for your time and help!
type: Comment
comment on: http://stackoverflow.com/a/27219272
score: 0
type: AnswerComment

http://stackoverflow.com/a/27312120
has comment: http://stackoverflow.com/comment/43084888
type: Answer
has comment: http://stackoverflow.com/comment/43084771
score: 0
has body: Just fade in the message on page load and then set a timeout in order to fade out after 3 seconds Check the DEMO EDIT $('#message').fadeIn() .queue(function() { setTimeout(function() { $('#message').fadeOut(); }, 3000); $(this).dequeue(); });
answers question: http://stackoverflow.com/q/27311956

http://stackoverflow.com/comment/42907138
comment on: http://stackoverflow.com/a/27213364
score: 0
type: AnswerComment
has text: echo with json_encode doesn't mean it will become json format?
type: Comment

http://stackoverflow.com/comment/42832491
has text: Is it easy on .net? I don't know. Please Guide me . @MihaiC
comment on: http://stackoverflow.com/q/27170632
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27238115
has comment: http://stackoverflow.com/comment/42953029
has body: The tests are equivalent to these: (true==1) true (false==2) false (true==0) false which is equivalent to these: (1==1) true (0==2) false (1==0) false In each case the == converts the boolean to a number 1 or 0. So the first == in each one gives the initial true/false value, which is then used as the first operand for the second ==. Or to put it all inline: ((1==true)==1) ((1==1) ==1) ((true) ==1) ((1) ==1) true ((2==true)==2) ((2==1) ==2) ((false) ==2) ((0) ==2) false ((0==false)==0) ((0==0) ==0) ((false) ==0) ((0) ==0) false
type: AcceptedAnswer
downvote count: 1
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/27238071
score: 3
answers question: http://stackoverflow.com/q/27238071
has comment: http://stackoverflow.com/comment/42953063
has comment: http://stackoverflow.com/comment/42952948
has comment: http://stackoverflow.com/comment/42953078

http://stackoverflow.com/q/27169129
accepted answer: http://stackoverflow.com/a/27169279
tagged with: jquery
has title: How to access json data and use in if condition in following scenario?
tagged with: ajax
tagged with: php
has comment: http://stackoverflow.com/comment/42829561
type: AnsweredQuestion
has body: Following is my AJAX function code: $('#request_form').submit(function(e) { var form = $(this); var formdata = false; if (window.FormData) { formdata = new FormData(form[0]); } var formAction = form.attr('action'); $.ajax({ url : 'xyz.php', type : 'POST', cache : false, data : formdata ? formdata : form.serialize(), contentType : false, processData : false, success: function(response) { //Here I'm facing issue in checking whether the $response[error_message] is empty or not if (!response.error_message) alert(response.error_message); } }); e.preventDefault(); }); Here in response following is the content coming from PHP. This content is already converted into json format using the method json_encode() { "error_message": "Id can't be blank&lt;br&gt;Please select Date&lt;br&gt;Image can't be blank&lt;br&gt;" } I want to check whether the array response[error_message] and if it's not empty then I want to show the content in alert box otherwise do nothing. Please help me in this regard. thanks in advance.
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42829562
has answer: http://stackoverflow.com/a/27169279
type: Question
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27169779
has answer: http://stackoverflow.com/a/27169779

http://stackoverflow.com/a/27297734
type: Answer
answers question: http://stackoverflow.com/q/27297675
score: 1
upvote count: 1
downvote count: 0
has body: Parameters must be passed to a function in the same order that they are defined. So; setupSlideshow('.new-slideshow'); The parameter here is being passed to the t variable in your function. What you want to do is this: setUpSlideshow(false, '.new-slideshow', '.slide'); this will pass false to the t variable and it will get changed to your default value. Alternatively, you may want to consider using an 'options'/'arguments' object... : function setupSlideshow(args) { e = e in args ? args.e : '.slideshow'; s = s in args ? args.s : '&gt; li'; t = t in args ? args.t : 70; ... } args = { e: '.new-slideshow', s: '.slide' }; setupSlideshow( args );

http://stackoverflow.com/comment/43044902
has text: Toress Pamudith Its Working, but when it show the sub items over the main items...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27288439

http://stackoverflow.com/a/27314564
has comment: http://stackoverflow.com/comment/43090207
score: 0
has body: Try to paste the below code and your problem will be solved:) Select Value one two three four five Live Working Here
accepted answer of: http://stackoverflow.com/q/27312834
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27312834
has comment: http://stackoverflow.com/comment/43089856
type: Answer

http://stackoverflow.com/comment/42950779
comment on: http://stackoverflow.com/q/27237024
has text: @KevinB, yes exactly. It's a really weird problem and I was positive it was just a bug. But to happen on 2 computers is weird.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42855127
has text: getParameterMap() returns Map<String, String[]> only. iterate through string to get other values using json or jackson library
comment on: http://stackoverflow.com/a/27183712
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42996160
comment on: http://stackoverflow.com/q/27261578
has text: that doesn't work out
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27240511
has body: I found this animation example on w3schools.com: Animate height Reset height (This can be run here) However if I try to change this to animate the background color instead of the height, it doesn't work. Here is my code: Animate height Reset height (This can be run here) This jQuery tutorial (http://jqueryui.com/animate/) makes it seem like this should work, so where am I going wrong? Thanks!!
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42957561
score: 0
answer count: 3
tagged with: jquery-animate
has answer: http://stackoverflow.com/a/27240561
tagged with: jquery
has answer: http://stackoverflow.com/a/27240537
has comment: http://stackoverflow.com/comment/42957511
has answer: http://stackoverflow.com/a/27240539
type: UnansweredQuestion
has title: Why won't jQuery let me animate the background color of a div?

http://stackoverflow.com/q/27287403
favorite count: 0
tagged with: google-chrome-extension
tagged with: opera
has body: I have developed a Chrome extension, it works fine in Chrome 39 but gives an error in Opera developer 24 on Ubuntu 14.04 (64 bit). Error in response to tabs.query: TypeError: Cannot read property 'id' of undefined at HTMLLIElement.click So I tested chrome.tabs.query on both browser consoles: chrome.tabs.query( { active: true, highlighted: true, currentWindow: true }, function(thisTab) { console.log(thisTab); } ); In Chrome it returns a complete Tab object. But in Opera it returns a blank array []. Why this is happening?
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43041729
has comment: http://stackoverflow.com/comment/43044165
type: Question
has answer: http://stackoverflow.com/a/27289000
accepted answer: http://stackoverflow.com/a/27289000
tagged with: opera-extension
linked to: http://stackoverflow.com/q/29681477
tagged with: javascript
has title: No result from chrome.tabs.query in Opera
upvote count: 2
answer count: 1

http://stackoverflow.com/q/27182759
has body: I have a floating menu that works, but my problem is when I click on any link within the menu, it redirects to the requested data and the Menu disappears. An ideas how to ajax my menu so that it stay o the page. I am using ASP.Net Genres @foreach (var genre in Model) { @Html.ActionLink(genre.Name, "Browse", "Store", new { Genre = genre.Name }, null) }
score: 0
has comment: http://stackoverflow.com/comment/42873100
tagged with: jquery
tagged with: asp.net
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42984617
answer count: 0
has comment: http://stackoverflow.com/comment/42853323
type: Question
has title: I am trying to ajax my floating menu asp.net
tagged with: javascript

http://stackoverflow.com/a/27228312
has body: Try exploring SignalR Hope this helps.
score: 0
has comment: http://stackoverflow.com/comment/42933953
type: Answer
answers question: http://stackoverflow.com/q/27228237

http://stackoverflow.com/comment/42865949
has text: That was helpfull. However there is no need to the interval because it is already fired before. It worked like this without getTime() since it is already in the same format: if($scope.sales[i].vtimer <= 1000){ alert("Timer is over"); }
type: AnswerComment
comment on: http://stackoverflow.com/a/27189817
score: 0
type: Comment

http://stackoverflow.com/a/27212218
has comment: http://stackoverflow.com/comment/42909165
type: Answer
answers question: http://stackoverflow.com/q/27212156
score: 0
has body: That's because you're misunderstanding a fundamental thing: window.onopen = window.alert("opened"); Is assigning window.onopen the result of calling window.alert("opened"), which will call the function regardless. The second way is the correct way of assigning functions, but there is no such event as onopen. If you want to call a function on each page load, just call it in your .js file without anything else. The file will be parsed and executed every time the page loads. So basically, you want: window.onresize = winopen; function winopen() { alert("opened"); } winopen(); //Call it now. In some cases, you may want for the DOM to finish loading (all HTML was parsed, browser is ready for DOM manipulation), in that case, you can use window.onload instead of window.onopen in your example.

http://stackoverflow.com/comment/43075408
type: AnswerComment
has text: and if you have multiple menus this would be an awful approach. Is there any way to target $(this) from the hover function but only specifying this instance of the .dropdown-menu?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27306441

http://stackoverflow.com/comment/43005269
score: 0
type: Comment
type: QuestionComment
has text: Done, added in the edit :)
comment on: http://stackoverflow.com/q/27266696

http://stackoverflow.com/comment/42886659
type: QuestionComment
has text: Is `notification.html` a separate document or is it the one you're working with..? `load()` will always load the **same** static content which is inside `notification.html`. Or is that file generated by a server side script such as `php`..?
comment on: http://stackoverflow.com/q/27201424
score: 0
type: Comment

http://stackoverflow.com/q/27238973
tagged with: javascript
tagged with: bing-api
has body: I have this one big multi-functional function: function trans() { var credentials = { clientId: 'TurboFanTrans', /* Client ID from the registered app */ clientSecret: 'Gkqa2Ru37DeHAfR4AdH/sj94J5Ge1S8Ad7Spp89MMIs=' /* Client Secret from the registered app */ }; translator.detect(credentials, text, detectCb); function detectCb(err, from) { if (err) { sendMain('error', err); return; } translator.translate(credentials, text, from, lang, translateCb); } function translateCb(err, translated) { if (err) { sendMain('error', err); return; } console.log(text + lang + "=&gt;" + translated); } } Assume everything is declared, since its multifunctional, I am doing something wrong when I am calling trans() here is the code snippet: case 'translate': text += args[1]; lang += args[2]; trans(); text = ""; lang = ""; break; When called, since its all messed up, text and lang return as empty strings(they are originally). Can anyone of you guys help me sort this out whether in code or in my brain? the end result should be the translated text of text in the language of anything in lang. Thank in advance!
has comment: http://stackoverflow.com/comment/42954804
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42955116
tagged with: function
answer count: 1
accepted answer: http://stackoverflow.com/a/27239314
has title: Multiple functions in Node.js
tagged with: node.js
has comment: http://stackoverflow.com/comment/42955023
has answer: http://stackoverflow.com/a/27239314
type: AnsweredQuestion

http://stackoverflow.com/comment/43008423
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27268579
has text: What `markerA` states for in your update? It seems to be a typo, the var name is still `marker`?

http://stackoverflow.com/q/27236731
has title: Why wont it recognize the clicks in java script?
downvote count: 4
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27237764
has comment: http://stackoverflow.com/comment/42950178
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42950725
has comment: http://stackoverflow.com/comment/42951758
tagged with: css
favorite count: 0
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/27237764
has body: When I run my website in brackets (the HTML writing software) it recognizes the clicks on the DIVS but when I run it normally it won't. Any help would be appreciated. I think it might be because brackets hosts it on a local server whereas it isn't hosted if not.
score: -3

http://stackoverflow.com/a/27167023
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27166919
has body: You can try selectize.js at "City / State Selection" Section.

http://stackoverflow.com/comment/42994104
has text: It looks like the Angular tutorial is using the id field but the value is actually a string title. Not a true ID field IMO.
type: QuestionComment
comment on: http://stackoverflow.com/q/27260394
type: Comment
score: 0

http://stackoverflow.com/q/27178330
answer count: 1
has comment: http://stackoverflow.com/comment/42846378
linked to: http://stackoverflow.com/q/25778469
has body: Can somebody help me loop the following function and make it run every 5 seconds: javascript:listAction( 'editObjectSingle','inforUpdateAction','divEditObjectSingle','formEditObjectSingle' ); for the specific website google.com? I'm still new to this and unsure how to write it // ==UserScript== // @name Google // @description Google // @include Google.com // ==/UserScript== // initiate This is what I have so far, not sure how to add other stuff. Thanks!
linked to: http://stackoverflow.com/q/15048223
favorite count: 0
has answer: http://stackoverflow.com/a/27178780
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42846415
has comment: http://stackoverflow.com/comment/42845456
upvote count: 1
downvote count: 1
type: Question
has title: How to make greasemonkey run a specfic javascript: function?
tagged with: function
tagged with: greasemonkey
tagged with: javascript
linked to: http://stackoverflow.com/q/13485122
score: 0

http://stackoverflow.com/comment/43516184
type: Comment
comment on: http://stackoverflow.com/a/27434076
score: 0
type: AnswerComment
has text: Thanks for this, explained nicely. Nowhere in the docs does it really go into detail of the flow like that.

http://stackoverflow.com/comment/42899002
type: Comment
has text: OK but how to get data php file? Becuase when putting this and php code on the top of my page it loads the page main page again but i just want to grab some values from mysql
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27208550

http://stackoverflow.com/comment/42802624
type: Comment
comment on: http://stackoverflow.com/q/27153547
score: 0
type: QuestionComment
has text: Well, that was quick. Anyway, if someone else is interested, [App.net supports JSONP](https://developers.app.net/reference/make-request/responses/#jsonp), so there’s an easy way out.

http://stackoverflow.com/comment/43074856
comment on: http://stackoverflow.com/q/27304778
has text: No worries, man. But it's seriously not uncommon that I write entire sites in codepen. lol. https://stre.am -- codepen -> sublime for tab indents -> repo
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42869233
comment on: http://stackoverflow.com/q/27191305
type: Comment
type: QuestionComment
score: 0
has text: Here: http://jsfiddle.net/matjazmav/86h4Lo8L/

http://stackoverflow.com/q/27231536
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/27232177
has comment: http://stackoverflow.com/comment/42940610
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42940816
has title: Asp.net code fails to call javascript function
linked to: http://stackoverflow.com/q/6602650
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42940849
has comment: http://stackoverflow.com/comment/42940947
has comment: http://stackoverflow.com/comment/42940669
score: 1
has body: This is the code to call the javascript function from asp.net code: aspx File: <%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Restaurants.aspx.cs" Inherits="WebApplication1.WebForm1" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="body" runat="Server"> </asp:Content> aspx.cs File: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction","alertMe()", true); } } Problem: The asp.net code fails to call javascript function I searched for the solution few links are: http://www.dotnetcurry.com/showarticle.aspx?ID=273 Calling JavaScript Function From CodeBehind http://www.devcurry.com/2009/01/execute-javascript-function-from-aspnet.html but could not find the solution. Can anyone help me. PAGE SOURCE <!--[if lt IE 9]> <![endif]--> Toggle navigation Home About Contact
has comment: http://stackoverflow.com/comment/42962844
has comment: http://stackoverflow.com/comment/42940028
upvote count: 1
has comment: http://stackoverflow.com/comment/42940738
has comment: http://stackoverflow.com/comment/42940646
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/42940943
has comment: http://stackoverflow.com/comment/42940227
linked to: http://stackoverflow.com/q/5731224
tagged with: javascript
has comment: http://stackoverflow.com/comment/42940500

phantomjs
tags question: http://stackoverflow.com/q/27246710
tags question: http://stackoverflow.com/q/27260702
type: Tag
tags question: http://stackoverflow.com/q/27178104
tags question: http://stackoverflow.com/q/27255777
tags question: http://stackoverflow.com/q/27223088
tag name: phantomjs
tags question: http://stackoverflow.com/q/27283466
tags question: http://stackoverflow.com/q/27184914
tags question: http://stackoverflow.com/q/27167657
tags question: http://stackoverflow.com/q/27165792
tags question: http://stackoverflow.com/q/27168074
tags question: http://stackoverflow.com/q/27155800
tags question: http://stackoverflow.com/q/27247771
tags question: http://stackoverflow.com/q/27170294

http://stackoverflow.com/comment/43037563
type: AnswerComment
has text: Thank you very much :) i use first solution. It works You can check in my site fulfo.com
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27283217

http://stackoverflow.com/comment/42920646
comment on: http://stackoverflow.com/a/27203053
score: 0
type: Comment
type: AnswerComment
has text: So what you are saying is that there is no way of sayin to Angular **Please stop changing the selected value of my drop down list when I create a model** without using the `ng-selected` attribute ? Because it would also feel like a job done twice. I would prefer not to edit anything (except maybe a function in my JS like the linked SO post) because MVC is already setting the selected values in my drop down lists...

http://stackoverflow.com/comment/42958302
has text: Span elements do not have values. Only form input fields have a value. You're using a non-standard attribute. Don't do that.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27240889

http://stackoverflow.com/q/27196686
tagged with: jquery-validate
answer count: 2
accepted answer: http://stackoverflow.com/a/27235968
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a select "ArrearsLHOLocation" that has an option "None Selected" with a value of -1 and all other selectable values are greater than 0. Here is the rule defined in my javascript $("#ArrearsLHOLocation").rules("add", { min: { depends: function (elem) { return $("#rbArrearsLHO[value='True']").is(":checked") ? 0 : -1; } }, messages: { min: "You have stated that the applicant/coapplicant have LHO arrears but you have not stated where!" } }); Here are the watches as observed in Chrome. $("#rbArrearsLHO[value='True']").is(":checked") ? 0 : -1: 0 $("#rbArrearsLHO[value='True']").is(":checked"): true $("#ArrearsLHOLocation").val(): "-1" $("#ArrearsLHOLocation").val() >=($("#rbArrearsLHO[value='True']").is(":checked") ? 0 : -1): false This page successfully submits, incorrectly. If I toggle the radio button and the watches appear like this: $("#rbArrearsLHO[value='True']").is(":checked") ? 0 : -1: -1 $("#rbArrearsLHO[value='True']").is(":checked"): false $("#ArrearsLHOLocation").val(): "-1" $("#ArrearsLHOLocation").val() >=($("#rbArrearsLHO[value='True']").is(":checked") ? 0 : -1): true This page is stopped from being submitted and my error message is displayed. What am I doing wrong? Steve --Snippet of HTML as requested-- Do they have arrears? Yes No If YES, Where? None Selected Location 1 Location 2 Location 3 Location 4
possible better answer: http://stackoverflow.com/a/27199248
has answer: http://stackoverflow.com/a/27199248
has answer: http://stackoverflow.com/a/27235968
has title: JQuery Validation min depends on other field, not working
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/27279811
answers question: http://stackoverflow.com/q/27279522
score: 0
type: Answer
has body: You need to use fixed position for you menu. http://www.w3schools.com/css/css_positioning.asp And to scroll to a particular spot in the page use link anchor. http://www.echoecho.com/htmllinks08.htm I could code the ole thing for you but you will learn nothing.

http://stackoverflow.com/a/27163681
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: Use: elem.domEl.setAttribute("class", "reveal");
answers question: http://stackoverflow.com/q/27163587

http://stackoverflow.com/a/27245992
has comment: http://stackoverflow.com/comment/42967434
has body: This works for me: &lt;html&gt; &lt;body&gt; &lt;div id="oInput"&gt; &lt;input id="1" type="text"&gt; &lt;input id="2" type="text"&gt; &lt;input id="3" type="text"&gt; &lt;input id="4" type="text"&gt; &lt;input id="5" type="text"&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; var oInput = document.getElementById('oInput'), oChild; for(i = 0; i &lt; oInput.childNodes.length; i++){ oChild = oInput.childNodes[i]; if(oChild.nodeName == 'INPUT'){ alert(oChild.id); } } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; If I put the 'script' tag in the header it didn't work because the page hadn't fully loaded and the div did not exist yet - perhaps that was your problem? Tested in Internet Explorer 11 and Chrome.
upvote count: 7
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27245606
answers question: http://stackoverflow.com/q/27245606
type: Answer
score: 7

http://stackoverflow.com/q/27277151
has answer: http://stackoverflow.com/a/27277553
type: UnansweredQuestion
tagged with: php
has title: AJAX call returns results, but in a blank page
has answer: http://stackoverflow.com/a/27277807
has body: There are a couple of questions that are somewhat similar to this, but I haven't been able to get their solutions to work for me. Basically, I am making an AJAX call that is working properly--the result is coming back through. The issue is that instead of processing the result, the result-array is printed back to the screen (and deletes everything else). Clearly, it is not handling the incoming result properly, but I'm not sure why. This is the form being sent: …hidden inputs... Use The PHP that is processing the AJAX: case "removeAndApply_PromoCode": …Get data from $_POST…. …process stuff... $response = …..; $finalPrice = ….; $dataArray = array('response'=>$response, 'finalPrice'=>$finalPrice); header('Content-type: application/json'); echo json_encode( $dataArray ); exit(); break; Here is a sample result text, as printed on my screen during failure: {"response":{"Col1":"13","0":"13","Col2":"PC2","1":"PC2","Col3":"1","2":"1","Col4":"45.89","3":"45.89","col5":null,"4":null,"Col6":"1","5":"1"},"finalPrice":0} And this is the javascript function that is supposed to handle it: $('.removeAndApply').ajaxForm({url: this.href, type:'post', data: this.serialize, dataType: 'json', success: function(response){ alert("asdf"); } }); Thanks.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43023212
type: Question
has comment: http://stackoverflow.com/comment/43023337
has comment: http://stackoverflow.com/comment/43023284
has comment: http://stackoverflow.com/comment/68552226
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/43023464
has comment: http://stackoverflow.com/comment/43023540
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/42965237
has text: is page source is showing the content of `file_get_contents("../adminpanel/pagecounters/totalviewsDecember.txt")` and show the content of file `totalviewsDecember`
score: 0
comment on: http://stackoverflow.com/q/27244963
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42920021
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27198224
type: Comment
has text: They are being parsed! here: var data_JSON = document.getElementById('JSON').value; var obj = JSON.parse(data_JSON); var data2_JSON = document.getElementById('JSON2').value; var obj2 = JSON.parse(data2_JSON); my problem now is to get the axis to be logarithmic you can see my fiddle on how far I am now. http://jsfiddle.net/3L4humdv/ I tried to use your solution but I can't seem to get the normalize function to work properly so that the points in my canvas are shown correctly

http://stackoverflow.com/a/27249988
answers question: http://stackoverflow.com/q/27249674
type: Answer
has body: Or maybe &lt;script&gt; var myBal = &lt;% out.print(myBal); %&gt; document.write(myBal.amount); // or document.write($.parseJSON(myBal.amount)); &lt;/script&gt;
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27249674

http://stackoverflow.com/comment/43016608
type: QuestionComment
comment on: http://stackoverflow.com/q/27177661
score: 0
has text: Maybe java applet. Or flash? I haven't ever done flash though.
type: Comment

http://stackoverflow.com/q/27297086
has comment: http://stackoverflow.com/comment/43058876
has body: I have a (section of a)page that scrolls horizontally using the following JS: $(document).ready(function () { var sildeNum = $('.page').length, wrapperWidth = 100 * sildeNum, slideWidth = 100/sildeNum; $('.wrapper').width(wrapperWidth + '%'); $('.page').width(slideWidth + '%'); $('a.scrollitem').click(function(){ $('a.scrollitem').removeClass('selected'); $(this).addClass('selected'); var slideNumber = $($(this).attr('href')).index('.page'), margin = slideNumber * -100 + '%'; $('.wrapper').animate({marginLeft: margin},500); return false; }); }); My primary nav scrolls the page vertically, and subnav scrolls horizontally. How can I create prev/next links for the horizontal section (moving between panels)? Here's a demo to explain: http://cloudlevel.me/test
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27299685
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27299685
tagged with: jquery
has comment: http://stackoverflow.com/comment/43060345
has answer: http://stackoverflow.com/a/27299083
score: 0
possible better answer: http://stackoverflow.com/a/27299083
type: AnsweredQuestion
has title: Previous & Next links on horizontally scrolling pages

http://stackoverflow.com/a/27295452
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27295393
type: Answer
has body: You need to use preg_match_all. preg_match returns only first match. Also, fix your regexp to match the actual text: $pattern = '/[$](\w+)/'; preg_match_all($pattern, $input, $matches); foreach($matches as $match) { echo $match[0] . ': ' . $match[1]; } This will output: $firstname : firstname $username : username $email : email $password : password
score: 1

http://stackoverflow.com/q/27172876
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43241789
has title: Why is my JQuery function not being called inside bootstrap html template
answer count: 0
tagged with: twitter-bootstrap
score: 0
has comment: http://stackoverflow.com/comment/42852479
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42836098
has comment: http://stackoverflow.com/comment/42836047
has comment: http://stackoverflow.com/comment/42836124
tagged with: jquery
has body: I have just recently started developing websites and facing some issues. I am trying to include a jquery plugin into my html which is a thumbnail carousel bar. My issue is that the jq function is not being called. I tried using other plugins but facing the same issue. Here is my code. thanks // this junction is working INDIVIDUAL LESSONS PLAYER DEVELOPMENT PROGRAM claritatem claritatem
type: UnansweredQuestion

http://stackoverflow.com/q/27272913
type: Question
tagged with: location
tagged with: window
has comment: http://stackoverflow.com/comment/43015433
possible better answer: http://stackoverflow.com/a/27273043
tagged with: javascript
has comment: http://stackoverflow.com/comment/43020701
has body: This is a snippet of my `index.html &lt;div class="maincontainer"&gt; &lt;h2 id="heading" class="heading"&gt;&lt;/h2&gt; &lt;input type="button" id="resetPassword" class="resetPassword" onclick="resetPassword()" value= "Reset Password" /&gt; &lt;form method="post" onsubmit="return submitform()"&gt; &lt;div&gt; &lt;input type="password" id="password" name="password" class="patternlock" /&gt; &lt;input type="submit" value="login"/&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; This is a snippet of my script.js which I included in my index.html function submitform(){ var passwordvalue = document.getElementById("password").value; var digits = getlength(passwordvalue); if(digits&lt;5) { raiseerror("lengthTooSmall"); } checkduplicatedigits(passwordvalue); if (errorraised == false &amp;&amp; passwordset == false) { localStorage.setItem("passwordvalue", passwordvalue); successmessage("patternStored"); } else if ( errorraised == false &amp;&amp; passwordset == true) { if (localStorage.getItem("passwordvalue") == passwordvalue) { successmessage("screenUnlocked"); } else { raiseerror("IncorrectPattern"); } } return true; }; function successmessage(successcode) { if(successcode == "screenUnlocked") { alert("You have unlocked the screen!"); window.location = "./welcome.html"; //bug to be fixed } if (successcode == "patternStored") { alert("Your pattern is stored. Thanks."); passwordset = true; } if (successcode == "resetSuccess") { alert("Pattern Reset Success!"); } location.reload(); }; Here whenever, successcode == "screenUnlocked" is triggered, I am able to get the alert message alert("You have unlocked the screen!"); but the next line window.location = "./welcome.html"; is not working. Why isn't it working in this case? Are there any specific requirements for window.location to work? If so, please specify. Checked this code on Google Chrome 39.0.2171.71. I have checked my console for errors but there aren't any. There are only a few warnings but they are not related to this. Or…
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27273013
has answer: http://stackoverflow.com/a/27273027
has answer: http://stackoverflow.com/a/27273043
has answer: http://stackoverflow.com/a/27273013
has comment: http://stackoverflow.com/comment/43020659
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/503093
has comment: http://stackoverflow.com/comment/43015509
has title: JavaScript window.location not redirecting to a different page

http://stackoverflow.com/comment/42952424
comment on: http://stackoverflow.com/q/27237832
has text: Show us more of your code...the relevant parts. How are you getting `rightDown`?
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/a/29815154
upvote count: 0
downvote count: 5
has body: //**Server Side Code** package myPack; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.codec.binary.Base64; @WebServlet("/MyServlet") @MultipartConfig public class MyServlet extends HttpServlet { private static final long serialVersionUID = 1L; public MyServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { String name = request.getParameter("fname"); String url = request.getParameter("myUrl"); url = url.replace("data:audio/wav;base64,", ""); url = url.replace(" ", "+"); byte[] bytes = url.getBytes(); byte[] valueDecoded = Base64.decodeBase64(bytes); FileOutputStream os = new FileOutputStream(new File("D://" + name + ".wav")); os.write(valueDecoded); os.close(); } catch (Exception e) { e.printStackTrace(); } } } **Client Side Code** MP3 Recorder test Recorder 1 <!-- Recorder 2 <!-- type="button" class="stop" value="Stop" /> --> **// Required JS 1)jquery.min.js 2) recorder.js** **recorder.js is below** (function(window){ var RECORDER_WORKER_PATH = 'js/recorderWorker.js'; var ENCODER_WORKER_PATH = 'js/mp3Worker.js'; var MP3Recorder = function(context, stream, cfg) { var config = cfg || { statusContainer: null, statusMethod: 'append' } var bufferLen = 4096; var recording = false; this.source = context.createMediaStreamSource(stream); this.node = (context.createScriptProcessor || context.createJavaScriptNode).call(context, bufferLen, 1, 1); var recorderWorker = new Worker(RECORDER_WORKER_PATH); var encoderWorker = new Worker(ENCODER_WORKER_PAT…
score: -5
answers question: http://stackoverflow.com/q/27220859
type: Answer

http://stackoverflow.com/q/27234005
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27234057
score: 1
has title: Call action of another control using jQuery $.ajax
has body: I have two controller, C1 and C2. C2 has a method named M2 which is returning a JsonResult. Now i am calling method M2 from view V1 using $.ajax call but I guess that the relative path to C2/M2 is not working fine. $.ajax({ type: "GET", url: "/C2/M2", success: function (data) { alert(data); } }); Notice: View V1 is rendered using controller C1 What is wrong with this call ? public class C1 : Controller { public ActionResult Package(object Id) { return View("PackageO"); } } public class C2: Controller { public JsonResult SelectAll() { return Json(_rep.SelectAll(), JsonRequestBehavior.AllowGet); } } Under ready() of jQuery in View 'PackageO' i am using IIFE $(function () { var resultant = ""; $.ajax({ type: "GET", url: "./C2/SelectAll", //url: "@Url.Action('SelectAll', 'C2')", done: function (data) { alert("success"); }, fail: function (ex) { alert("fail"); } }); });
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/27170061
has answer: http://stackoverflow.com/a/27170197
type: UnansweredQuestion
tagged with: jquery-ui
has title: How to add a Button/Link to the last item in a list of search results
type: Question
score: 0
has body: I'm trying to add a button to the last item in the list of results I am generating using JQuery Autocomplete. Currently, each list item is created like so: create: function(item) { $(this).data('ui-autocomplete')._renderItem = function (ul, item) { return $('&lt;li&gt;') .append('&lt;a&gt;' + item.label + " " + " - " + item.type +'&lt;/a&gt;') .appendTo(ul); }; }, What I'd like to do is when I get to the last element in the list add a button, however I can't figure out how to do that. I'd appreciate any help.
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42885599
has text: wow! Awesome thanks :). No my intention was to rebuild that fiddle to load two json objects: one with the p0 values and one with the p1 values { 'dataset1' [ { "p0" : "0.69", "log(p0)" : "14", "p0_name" : "cn95" }, ] the csv can be removed and my data needs to be rebuild but that I can do I just need to find a way that when my data is structured like that how do I then plot that data, the name for example I want to use to show on a tooltip but that something to worry about later. My first priority is to show the data :) thanks tho and I hope you understand my problem!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27198224

http://stackoverflow.com/comment/42924585
type: QuestionComment
comment on: http://stackoverflow.com/q/27189747
has text: Can You please suggest then how to do in MVC4 in asp.net?
score: 0
type: Comment

http://stackoverflow.com/comment/42854074
comment on: http://stackoverflow.com/q/27183204
score: 0
has text: The first part of your if statement, `if(a === a){...`, will **always** resolve to true and nothing else will be evaluated. What are you trying to check with that comparison?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27156746
upvote count: 1
score: 1
has body: I believe you get the latest 25 entries, you need to implement paging to get access to all of them: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#paging
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27156701
type: Answer
accepted answer of: http://stackoverflow.com/q/27156701

http://stackoverflow.com/a/32723976
has comment: http://stackoverflow.com/comment/60289805
score: 10
has body: Here is my attempt to make it full angularjs : JS .directive('setClassWhenAtTop', ['$window', function($window) { var $win = angular.element($window); // wrap window object as jQuery object return { restrict: 'A', link: function (scope, element, attrs) { var topClass = attrs.setClassWhenAtTop, // get CSS class from directive's attribute value topPadding = parseInt(attrs.paddingWhenAtTop, 10), offsetTop = element.prop('offsetTop'); // get element's offset top relative to document $win.on('scroll', function (e) { if ($window.pageYOffset + topPadding &gt;= offsetTop) { element.addClass(topClass); } else { element.removeClass(topClass); } }); } }; }]) CSS .fix-to-top { position: fixed; top: 55px; height: 50px; z-index: 999; width: 100%; } HTML &lt;div class="navigation-bar" set-class-when-at-top="fix-to-top" padding-when-at-top="55"&gt; ... Main changes to skip jquery : parent.offset().top =&gt; element.prop('offsetTop') $win.scrollTop() =&gt; $window.pageYOffset Tip of the day : Would you please stop always giving angularjs title questions jquery answers ! Or at least indicate it clearly in your title or in your answer requirements ;-)
has comment: http://stackoverflow.com/comment/59194339
has comment: http://stackoverflow.com/comment/75641671
upvote count: 10
type: Answer
answers question: http://stackoverflow.com/q/27211881
downvote count: 0

http://stackoverflow.com/q/27191540
has body: According to AngularJS documentation the application bootstrapping starts upon DOMContentLoaded event. According to MDN the DOMContentLoaded event doesn't mean that all external scripts has been loaded. So what if: I have different parts of my application in separate files (directives, controllers) and DOMContentLoaded event is fired before all of my scripts are loaded Shouldn't that cause an error: undefined functions etc? If not then... do I miss something?
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/27192992
score: 2
type: AnsweredQuestion
has title: AngularJS, DOMContentLoaded and script loading
type: Question
has comment: http://stackoverflow.com/comment/42869138
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27192992

http://stackoverflow.com/comment/42957047
score: 0
has text: My outcome would be, if i set the value $scope.Gender anywhere on my code even if before dataBound or after dataBound, the combobox would respond or select the item automatically
comment on: http://stackoverflow.com/q/27240185
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43038254
type: QuestionComment
has text: @bvx89 hi, I tried to insert "console.log()" inbetween lines of the javascript file. But I'm not entirely sure how to view the output for the debugging purposes. Just to clarify, when I check the checkbox of id "selectall", all the checkboxes above should be checked. Here's a screenshot to represent the output: http://i.imgur.com/E4MbF8t.jpg
type: Comment
comment on: http://stackoverflow.com/q/27284905
score: 0

http://stackoverflow.com/comment/42818364
comment on: http://stackoverflow.com/q/27156304
score: 0
type: QuestionComment
type: Comment
has text: What if you flip the order of your "code for calling overlay screen" and blurElement() ?

http://stackoverflow.com/comment/42880795
has text: @FabricioNahuelRori: `el.value = el.value.replace("y", "p");`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27193876
type: AnswerComment

http://stackoverflow.com/comment/42880320
comment on: http://stackoverflow.com/q/27197695
score: 1
type: Comment
type: QuestionComment
has text: The author of the article who said `in the code of unexperienced developers` seems to have a bit of an inferiority complex, or something, and is trying to prove his level of experience and intelligence. `var f = function() { }` and `function f() { }` are both valid and each have their own unique pros and cons. But to suggest that one syntax is only found in the code of `unexperienced` developers while the other is the `correct` way to declare a function is just silliness.

http://stackoverflow.com/a/27156529
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42808237
has comment: http://stackoverflow.com/comment/42816314
upvote count: 1
has body: The content property can only be applied to pseudo elements. Instead, use a background-image on a div: div[alt="Link1"]{ background-image: url("http://images/Link1.png"); } div[alt="Link1"]:hover { background-image: url("http://Link1Pressed.png"); }
type: Answer
answers question: http://stackoverflow.com/q/27156483
has comment: http://stackoverflow.com/comment/42807212

http://stackoverflow.com/comment/45462277
score: 4
comment on: http://stackoverflow.com/a/28530259
type: Comment
has text: Thanks, but from my reading of that link, it only handles entry/exit of items – not re-sort to a new position. Nor do I see a way to extend it, without the kind of outside-React positional-calculations mentioned in the question or other answers. (A series of fade-ins/fade-outs, even simultaneous, isn't the effect I'm seeking.)
type: AnswerComment

http://stackoverflow.com/a/27166423
has body: One solution is to declare the constants as a plain javascript variable: var CONTROLLERS = { "LOGIN_CONTROLLER" : "loginCtrl", "HOME_PAGE_CONTROLLER" : "homePageCtrl" } In this way your code could work. Here's an example: http://jsfiddle.net/43fu3poz/
score: 0
answers question: http://stackoverflow.com/q/27166236
type: Answer

http://stackoverflow.com/a/27258822
has comment: http://stackoverflow.com/comment/43017805
has comment: http://stackoverflow.com/comment/43001039
answers question: http://stackoverflow.com/q/27258448
score: 0
has body: I don't think this is possible with pure CSS. But you could do it with JavaScript. Example: HTML: (A bit different than yours, but same concept) This was the first message Another message A third message about something a bit longer New message JS: (I used jQuery in this example) var button = $('button'); var container = $(".message"); button.on('click', function() { container.append(' A new message '); container.scrollTop(container[0].scrollHeight); }); Demo: http://jsfiddle.net/u4u33286/3/
type: Answer

http://stackoverflow.com/comment/43032837
score: 0
comment on: http://stackoverflow.com/a/27281736
has text: Hello Philtune, I changed the code as you mentioned but now when I click on "Value Selected" button, it doesn't do anything. URL that i'm testing is http://glysomed.bydecosta.com/test.php
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42937702
type: AnswerComment
has text: @PeterKA Oops, you are right, thank you for reminding.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27230052

http://stackoverflow.com/a/27204402
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27200897
accepted answer of: http://stackoverflow.com/q/27200897
has body: I don't see anything major in your code. A couple of things: 1.) The sorting on your y-axis is fine. It's sorted in the order they appear in your data. As @mdml says in the comments, you can sort them differently if you desire. 2.) You have an "odd" point in your data. Everything is occurring around Nov-27-2014-12:33 except for one point on the 28th. This is causing d3 to pick a larger range for the x-axis and plotting most your data points on top of each other. 3.) You should probably "center" your points in relation to you y-axis: .attr("cy", function(d) { return y(d.user) + y.rangeBand() / 2; }) Here's an example tweaking some things.

http://stackoverflow.com/q/27281117
has body: I am beginning to work with the D3.js Hive Plot example. I would like to modify this hive plot so that the three axes are vertical (a, b, c) and connections can be made between axis a and axis b or between axis b and axis c. But not between axis a and c. Do you think this hive plot code is what I should use to do this, or should I write something else on my own? I'm just beginning with D3 so I would prefer to make small changes to existing the hive plot code to get this to work.
type: Question
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29873448
has title: Modify d3.js Hive Plot to have 3 vertical axes and only A-B or B-C linkages
tagged with: d3.js
type: UnansweredQuestion
tagged with: plot

http://stackoverflow.com/a/27219062
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42917504
has comment: http://stackoverflow.com/comment/43003324
has comment: http://stackoverflow.com/comment/42917374
answers question: http://stackoverflow.com/q/27218996
has body: I only took a quick look but I didn't see anything that ever fired your countdown timer to start. Your solution might be as simple as : countDown(); } &lt;/script&gt;

http://stackoverflow.com/q/27299311
possible better answer: http://stackoverflow.com/a/34734347
type: AnsweredQuestion
tagged with: angular-ui-router
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: Does anybody know how to change the ui-router state without changing the url? As the code below shows; in some cases the user needs to be redirected to 403 or 401 states. I would like to be able to do this redirect without changing the url. Regards, klmdb // make sure authGetCurrent has ran before routing starts $rootScope.$on("$locationChangeSuccess", function(event, next) { event.preventDefault(); AuthService.loadCurrentAuth().then(function(){ $urlRouter.sync(); }, function(){ console.log("BIG ERROR!!!"); }); }); // Configures $urlRouter's listener *after* your custom listener $urlRouter.listen(); $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams) { var requiredLogin = (toState &amp;&amp; toState.data ? toState.data.requiredLogin : false ), requiredGroupRights = (toState &amp;&amp; toState.data ? toState.data.requiredGroupRights : false ); // require the user to have at least one of these rights in the current group if (requiredLogin &amp;&amp; !AuthService.isLoggedIn()) { event.preventDefault(); $state.transitionTo('401'); return; } if(requiredGroupRights){ var i, hasRight = false; for(i=0;i&lt;requiredGroupRights.length;i++){ if(GroupService.checkGroupRights(toParams.groupId, requiredGroupRights[i])){ hasRight = true; break; } } if(!hasRight){ event.preventDefault(); $state.transitionTo('403'); return; } } });
score: 15
has answer: http://stackoverflow.com/a/34734347
has answer: http://stackoverflow.com/a/27302840
accepted answer: http://stackoverflow.com/a/27302840
upvote count: 15
favorite count: 0
tagged with: angularjs
has title: UI-router change state without changing url

http://stackoverflow.com/q/27156904
has body: I am getting a very strange error after upgrading dojo code to 2.x. The function is defined as: var map; //Globally defined Require(["esri/map", "esri/geometry/Point"], function(Map, Point) { map = new Map("map", {infoWindow: popupWin, extent: initialExtent, sliderStyle: 'small', sliderPosition: "bottom-right", navigationMode: 'css-transforms'}); var a = (map.toMap(new Point(0, 0)); }); However, as I execute map.toMap() function in console, it works fine. Does anyone have any idea where I'm going wrong? It's been getting so confusing...
favorite count: 0
has answer: http://stackoverflow.com/a/27157027
type: UnansweredQuestion
upvote count: 1
tagged with: dojo
has title: Type error: Undefined is not a function (esri map)
score: 1
type: Question
tagged with: arcgis-js-api
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: esri

http://stackoverflow.com/a/27209712
type: Answer
has comment: http://stackoverflow.com/comment/42901337
answers question: http://stackoverflow.com/q/27209635
has body: Ok, so a few issues with what you are doing. Firstly you are needing to execute your code every time one of those text boxes changes. You can wrap that functionality into a function and add it to the change event on each of the textboxes. I have added an example below. NB the example could be alot better than explicitly adding the change to each of the textboxes but I'll leave that for you to do. Secondly you were executing your comparison for if the length was greater than 0 inside a jquery wrapper ($(name.length >= 1)) -> Don't. I've removed that as well in the code sample. Thirdly I'm a little confused by the requirement. Are you wanting it to toggle disabled/not disabled for just the first text box? REading your code that's what it looked like you were trying to achieve. If you are wanting to disable all of the rest of the text boxes then Arun P Johny's function will do what you want. function onTextChange(){ console.log('running'); $('.main-wrapper').each(function(){ var name = $('#text4', this).val(); var disForm = $('#text1'); if (name.length &gt;= 1) { $(disForm, this).attr('disabled', 'disabled'); } else { $(disForm, this).removeAttr('disabled'); } }); } $('#text1').on('change', onTextChange); $('#text2').on('change', onTextChange); $('#text3').on('change', onTextChange); $('#text4').on('change', onTextChange); http://jsfiddle.net/jtgs5kcj/1/
score: 0

http://stackoverflow.com/q/27263736
type: Question
has comment: http://stackoverflow.com/comment/43002666
has title: Why my Javascript file is not working at all?
tagged with: javascript
score: 0
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42999812
has answer: http://stackoverflow.com/a/27263778
has comment: http://stackoverflow.com/comment/43000881
has comment: http://stackoverflow.com/comment/42999784
has body: My website works fine and all javascript files also work in my computer, but after publishing to the server all files work except super.js file. Links in menu supposed to work but it shows just "#". ** ** Here is a snippet code to my file [a link] (http://jsfiddle.net/programmer777/oxj69tum/embedded/result/)! i don't understand a problem, looked everywhere, but couldn't find a solution. $(document).ready(function () { var menuLinksNew = $(".menuH>li>a"); var pathname = $(location).attr('pathname'); if (pathname.substring(1, 3) == "eng") { $(menuLinksNew[0]).attr("href", "/about"); $(menuLinksNew[0]).text("About"); } else if (pathname.substring(1, 3) == "fr") { $(menuLinksNew[0]).attr("href", "/about"); $(menuLinksNew[0]).text('About'); } var submenuNew1 = $(".menuH ul a"); if (pathname.substring(1, 3) == "eng") { $(submenuNew1[0]).attr("href", "/eng/about/info"); $(submenuNew1[0]).children("h5").text("blah"); $(submenuNew1[1]).attr("href", "/eng/about/info/1"); $(submenuNew1[1]).children("h5").text("blah"); $(submenuNew1[2]).attr("href", "/eng/about/info"); $(submenuNew1[2]).children("small").text('blah'); $(submenuNew1[3]).attr("href", "/eng/about/info"); $(submenuNew1[3]).children("small").text('blah'); } else if (pathname.substring(1, 3) == "fr") { $(submenuNew1[0]).attr("href", "/fr/about/info"); $(submenuNew1[0]).children("h5").text("blah"); $(submenuNew1[1]).attr("href", "/fr/about/info/1"); $(submenuNew1[1]).children("h5").text("blah"); $(submenuNew1[2]).attr("href", "/fr/about/info"); $(submenuNew1[2]).children("small").text('blah'); $(submenuNew1[3]).attr("href", "/fr/about/info"); $(submenuNew1[3]).children("small").text('blah'); });
has comment: http://stackoverflow.com/comment/42999826
has comment: http://stackoverflow.com/comment/42999931

http://stackoverflow.com/a/27280044
type: Answer
answers question: http://stackoverflow.com/q/27279870
has body: You could try to call __doPostBack() by sending the UniqueID of the button. function RaiseEvent_Click() { __doPostBack('&lt;%=GridViewLBClicked.UniqueID%&gt;', ''); alert('It was clicked'); } Edit: I tried this code snippet and it works fine: &lt;input type="button" id="btnClickMe" value="Click me" /&gt; &lt;asp:UpdatePanel runat="server" ID="uPanel1"&gt; &lt;ContentTemplate&gt; &lt;asp:TextBox runat="server" ID="txtInside"&gt;&lt;/asp:TextBox&gt; &lt;asp:Button runat="server" ID="btnPostInside" /&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;script type="text/javascript"&gt; $("#btnClickMe").on("click", function() { $get("&lt;%=btnPostInside.ClientID %&gt;").click(); }); &lt;/script&gt; Can you give us more of your code?
upvote count: 1
has comment: http://stackoverflow.com/comment/43029079
score: 1
downvote count: 0

http://stackoverflow.com/q/27241108
has body: Is there a way to store data to a variable? I tried: $scope.another = function(){ var new_data; userService.getInfo().success(function(data){ new_data = data; }); return new_data; }; var data = $scope.another(); but it returns 'undefined' in the console log. Thank you EDIT I now get an empty array for new_data . var new_data = []; $scope.another = function(callback){ userService.getInfo().success(function(data){ paymentService.getCashierParams({ "cardNumber": data.cardNumber}).success(function(data){ gameService.getAllgames({ "PID":data.GetCashierParameters.PID, "limit": 6, "skinID": 1}).success(function(data) { callback(data.data.GetFlashGamesResult.Data.FlashGame); }); }); }); }; $scope.another(function(result){ new_data = result; }); console.log(new_data);
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42958610
has answer: http://stackoverflow.com/a/27241163
linked to: http://stackoverflow.com/q/6847697
has comment: http://stackoverflow.com/comment/42958604
type: Question
has answer: http://stackoverflow.com/a/27241447
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42958691
score: 0
answer count: 2
has title: AngularJS service to variable

http://stackoverflow.com/comment/42845570
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27178382
has text: did you checked this link, http://stackoverflow.com/questions/10003683/javascript-get-number-from-string
score: 0

http://stackoverflow.com/comment/42937925
type: Comment
type: QuestionComment
score: 1
has text: @Karl-AndréGagnon yeah, you're right. I deleted my comment shortly after writing it because of this reason.
comment on: http://stackoverflow.com/q/27230137

http://stackoverflow.com/q/27295164
has comment: http://stackoverflow.com/comment/43058494
tagged with: angularjs
has title: Variable is not updating after changing the input
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27295227
has answer: http://stackoverflow.com/a/27296588
score: 0
has comment: http://stackoverflow.com/comment/43055753
has body: My controller: .controller('ExampleController', ['$scope', function($scope) { $scope.barcode = 111; $scope.scanBarcode = function() { $scope.barcode = 123123123; }; $scope.scanThis = function() { $scope.barcode = 456456456; }; }]) My view: {{barcode}} Scan! Scan this! Is as simple as one input and two buttons to set the "barcode" var value. It works when I load the view, I can click the buttons and the value changes, but as soon as I change the input value the functions stop working.... EDIT 1: No, I did not forgot to "link" the view to the controller, I have the following code: .state('tab.dash', { url: '/dash', views: { 'tab-dash': { templateUrl: 'templates/tab-dash.html', controller: 'ExampleController' } } }) EDIT 2: If i use: It works, as well as if I use "$parent" like this: This means that using the "state" is not working as I expected... It's creating a "local" scope for the input when is modified...
type: Question
has comment: http://stackoverflow.com/comment/43057377
tagged with: javascript
tagged with: angularjs-scope
answer count: 2

http://stackoverflow.com/a/27203476
has body: Use index number. ie, ng-repeat="(ind, item) ...". Example: Date Amount Member Name {{item.product}} {{item.date}} {{item.member}} {{info.id === item.member ? info.name : ''}}
has comment: http://stackoverflow.com/comment/42890000
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27203374
has comment: http://stackoverflow.com/comment/42889958
has comment: http://stackoverflow.com/comment/42890029
accepted answer of: http://stackoverflow.com/q/27203374
has comment: http://stackoverflow.com/comment/42890655
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/a/27169633
has body: if i get it right: var MyPlugin; ;(function ($, window, document, undefined) { 'use strict'; MyPlugin = function(element, options) { this.settings = $.extend({}, options); this.$el = $(element); this.init(); return this; } // rest of code goes here
has comment: http://stackoverflow.com/comment/42830210
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27169551

http://stackoverflow.com/comment/42875623
comment on: http://stackoverflow.com/q/27194874
score: 0
type: Comment
type: QuestionComment
has text: I'm not sure what you're actually asking for, something like [this](http://jsfiddle.net/my6e9sth/)?

http://stackoverflow.com/q/27276349
has comment: http://stackoverflow.com/comment/43021686
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27276380
type: Question
possible better answer: http://stackoverflow.com/a/27276380
has body: I am trying to link to divs together by linking the data-attribute name with the id but seem to receive an error Hello World I'm referencing jQuery 1.8.3 and using the following code to identify the data attribute on the div i click but when it is logged in the console I get. #george testdoc.html:123 undefined testdoc.html:123
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43021833
score: 0
tagged with: jquery-data
answer count: 3
has answer: http://stackoverflow.com/a/27276400
tagged with: http://stackoverflow.com/tag/html
has title: Recieving two values from data attribute one being undefined
has answer: http://stackoverflow.com/a/27276382
accepted answer: http://stackoverflow.com/a/27276382

http://stackoverflow.com/comment/42918330
type: QuestionComment
score: 0
has text: True - im happy to call them id="post-5882120439717312684" etc...
comment on: http://stackoverflow.com/q/27218972
type: Comment

http://stackoverflow.com/comment/43029422
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27280258
has text: What is your result with that code? Does it error? What's the problem?

http://stackoverflow.com/comment/42831228
score: 1
comment on: http://stackoverflow.com/q/27170179
type: Comment
has text: `forEach` comes to mind ?
type: QuestionComment

http://stackoverflow.com/a/27242583
answers question: http://stackoverflow.com/q/27223512
has body: nevermind I figured it out already. I used the ontextChanged for the textbox when user select the date from calendar, and removed OnClientDateSelectionChanged, triggers and dummy button. I keep the UpdatePanel and it works just the way I wanted.
score: 0
type: Answer

http://stackoverflow.com/comment/43021412
has text: because its not an array, its a list
type: Comment
comment on: http://stackoverflow.com/a/27268997
score: 0
type: AnswerComment

http://stackoverflow.com/a/27219153
type: Answer
downvote count: 0
has body: It's the same answer as in C++, or most other languages. Basically, you just add a flag to tell your loop that it's done. var input = prompt(); var keepGoing = true; while(keepGoing) { switch(input) { case 'hi': break; case 'bye': //I want to break out of the switch and the loop here keepGoing = false; break; } // If you need to skip other code, then use this: if (!keepGoing) break; /*Other code*/ } Make sense?
has comment: http://stackoverflow.com/comment/42917543
answers question: http://stackoverflow.com/q/27219087
score: 1
has comment: http://stackoverflow.com/comment/42917750
has comment: http://stackoverflow.com/comment/42917740
upvote count: 1

http://stackoverflow.com/a/27190554
answers question: http://stackoverflow.com/q/27190484
upvote count: 1
has body: The problem can be solved by using the following implementation. function doSomething(){ var Result = a; if ( b.length &lt; Result.length ) Result = b; if ( c.length &lt; Result.length ) Result = c; return Result; }
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/43163450
comment on: http://stackoverflow.com/a/27299649
type: Comment
score: 0
type: AnswerComment
has text: @Iwang135: Sorry buddy for late reply, I was on holiday I didn't check it. I'll check it today at the office reply here. Thanks again :)

http://stackoverflow.com/comment/42952537
comment on: http://stackoverflow.com/a/27230835
score: 0
type: AnswerComment
type: Comment
has text: Just to add something else to this which you should get into the habit of doing with KO. Hint your observables. If you intend to put strings in then "blah = ko.observable('')" , if a bool then "ko.observable(false)" and so on, it helps KO prepare a few things ahead of time if it knows what to expect.

oauth-2.0
tag name: oauth-2.0
tags question: http://stackoverflow.com/q/27300611
tags question: http://stackoverflow.com/q/27279564
type: Tag
tags question: http://stackoverflow.com/q/27254488

http://stackoverflow.com/q/27196625
favorite count: 0
accepted answer: http://stackoverflow.com/a/27197519
type: AnsweredQuestion
score: 1
has title: Improving Javascript and Modal HTML
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/67859739
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27197519
has body: I have a bootstrap modal that was modified to be displayed to get a confirmation when a user clicks on a button to delete the item. After thinking about it I want to be able to use the same bootstrap modal template when I want to get confirmation from the user when they try to create a new item or update and item. What I would like to do is be able to use the same modal template but just modify the text with jQuery based on the situation needed (create, update, delete). What I think would be easier is to also have a javascript function for create, update, delete. I am also using the gritter jQuery plugin and have duplicating code I would like to move out. What can I do to my modal HTML to work with this. As well as what can I do to my javascript so that it can know if this was coming from a create, update, delete method. Also how do I modify the gritter code so that I don't have duplicating code. The time should be the same as well as the sticky and image. &lt;!-- Modal --&gt; &lt;div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Delete Confirmation&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;p&gt;Are you sure?&lt;/p&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" id="deleteModalCancel" class="btn btn-default" data-dismiss="modal"&gt;No&lt;/button&gt; &lt;button type="button" id="deleteModalConfirm" class="btn btn-primary"&gt;Yes&lt;/button&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- modal-content --&gt; &lt;/div&gt;&lt;!-- modal-dialog --&gt; &lt;/div&gt;&lt;!-- modal --&gt; $(document).ready(function(){ $(function() { var $modal = $('#deleteModal'); $('.js-ajax-delete').on('click', function(e) { e.preve…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
tagged with: bootstrap-modal

http://stackoverflow.com/a/27197323
type: Answer
has body: Try this: $(document).ready(function() { $("#showButton").click(function() { $("#text").show(); }); $("#hideButton").click(function() { $("#text").hide(); }); }); #text { display: none; } Show Hide Some text
accepted answer of: http://stackoverflow.com/q/27197301
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27197301
score: 0

http://stackoverflow.com/comment/43071021
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27300695
has text: The callback receives the contents of the file. If you mean you want the user to then save a copy of that file to their local computer, maybe the [File API](http://www.w3.org/TR/FileAPI/) is an option?

http://stackoverflow.com/a/27283108
has body: title content close $scope.isModelShown = true
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27282706
accepted answer of: http://stackoverflow.com/q/27282706
type: AcceptedAnswer

wcf
type: Tag
tag name: wcf
tags question: http://stackoverflow.com/q/27218440
tags question: http://stackoverflow.com/q/27248022

http://stackoverflow.com/a/30216803
answers question: http://stackoverflow.com/q/27221046
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27221046
has body: The thing that makes the deeper lookup be faster is the fact that the JavaScript engine is able to better optimise the code for performance, as it knows exactly what object it is receiving. Unlike using Object.create, where the engine is unable to perform its regular optimisation cycle, using a plain old empty object to initialise the z property of the q object, basically allows the engine to allocate appropriate memory and index it accordingly. This piece of code var q=Object.create(pro); basically tells the JS engine: "Hey, you're getting an instance of an Object but I don't have a clue what type it is. Could be an Array, Objec, RegExp, Date.", while this piece of code -- q.z={}; says -- "Hey, you're getting an Object object here! Make sure to put aside some memory in accordance to this datatype".
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42949862
score: 1
has text: I think I may have just found my solution... `module.parent` [http://nodejs.org/api/modules.html]
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27236542

google-closure-compiler
tags question: http://stackoverflow.com/q/27186526
tags question: http://stackoverflow.com/q/27248185
tags question: http://stackoverflow.com/q/27301007
type: Tag
tag name: google-closure-compiler
tags question: http://stackoverflow.com/q/27159919

http://stackoverflow.com/q/27164525
has comment: http://stackoverflow.com/comment/42836156
tagged with: css
has body: I am trying to append span tag inside .block-leftnav ul li .parent a, so the tag gets added only after the .parent a but what jquery does is, it adds the span tag after every a href tag on my page. Below is the code I am using to acheive what I want: jQuery(document).ready(function() { jQuery('.block-leftnav ul li .parent &gt; a').append('&lt;span class="glyphicon arrow"&gt;&lt;/span&gt;'); }); It was a simple fix, I figured it out myself and also updated the above code. Just had to add the ">" before the "a" to target the anchor tags of that particular div. Thanks Guys for your prompt response.
favorite count: 0
has comment: http://stackoverflow.com/comment/42821675
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42821693
has comment: http://stackoverflow.com/comment/42821710
downvote count: 1
answer count: 4
has answer: http://stackoverflow.com/a/27164627
has title: Append tag inside of tag using Jquery
has answer: http://stackoverflow.com/a/27164689
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27164678
has answer: http://stackoverflow.com/a/27164683
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42821696
score: 0
has comment: http://stackoverflow.com/comment/42821663
tagged with: http://stackoverflow.com/tag/html

codemirror
tags question: http://stackoverflow.com/q/27214363
tags question: http://stackoverflow.com/q/27200018
type: Tag
tag name: codemirror
tags question: http://stackoverflow.com/q/27233866

http://stackoverflow.com/a/55240594
upvote count: 5
has comment: http://stackoverflow.com/comment/104843161
type: Answer
has comment: http://stackoverflow.com/comment/116340907
has comment: http://stackoverflow.com/comment/116318967
downvote count: 0
has body: As of version 59 Chrome no longer supports URLs with embedded credentials. To work around this I wrote the authenticator-browser-extension Node module, which might be useful if you're using Protractor, WebDriver.io or similar test runners. To use the module install it from npm: npm install --save-dev authenticator-browser-extension And import in the protractor.conf.js: const { Authenticator } = require('authenticator-browser-extension'); exports.config = { capabilities: { browserName: 'chrome', chromeOptions: { extensions: [ Authenticator.for('username', 'password').asBase64() ] } }, } Pro tip: remember not to commit your credentials with your code, consider using env variables instead. Hope this helps! Jan
has comment: http://stackoverflow.com/comment/116299637
has comment: http://stackoverflow.com/comment/104847850
answers question: http://stackoverflow.com/q/27234785
score: 5
has comment: http://stackoverflow.com/comment/116301948

http://stackoverflow.com/comment/42934000
comment on: http://stackoverflow.com/q/27227740
has text: The character “ܘ” is U+0718 SYRIAC LETTER WAW (which is a right-to-left character).
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43056650
has text: C:\Users\Dito\AppData\Roaming\npm └── express@4.10.4
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27295690

http://stackoverflow.com/comment/43070975
type: Comment
has text: Thanks for the link! Moving the script's "link" to the bottom of the body fixed it!
type: AnswerComment
comment on: http://stackoverflow.com/a/27303609
score: 0

http://stackoverflow.com/comment/42911904
type: Comment
type: QuestionComment
has text: If the player moves more than 1 pixel per frame the only option for him is to `jump`. You can not add an intermediate frame between two movements, but you can add some transparent trails so that the jump is not that obvious, but more like a motion blur effect.
comment on: http://stackoverflow.com/q/27215972
score: 0

http://stackoverflow.com/q/27168875
has comment: http://stackoverflow.com/comment/42829576
has comment: http://stackoverflow.com/comment/42829229
type: Question
has comment: http://stackoverflow.com/comment/42829532
has body: I have created a a force directed graph that when i click a button it changes to a layout i chose myself and when i click a different button it goes back to force layout. I have done a transition so it does this over time, but the thing is the links don't move correctly. They move differently to the nodes. How do i get it so the links are in the same position as the nodes all the time ? Also, i have a button which goes back to the force layout. But i am unable to go back overtime ? How do i put a delay/duration on bringing the force layout back into play?
tagged with: javascript
score: 0
tagged with: d3.js
type: UnansweredQuestion
has title: Moving links and nodes accordingly with a click of a button D3
has comment: http://stackoverflow.com/comment/42829293
has comment: http://stackoverflow.com/comment/42829341
has comment: http://stackoverflow.com/comment/42829479
answer count: 0
linked to: http://stackoverflow.com/q/21122811
linked to: http://stackoverflow.com/q/13463053

http://stackoverflow.com/a/27214668
answers question: http://stackoverflow.com/q/27214647
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: The ngBindHtml directive takes an expression and evaluates it. So you should not put it into {{ }}. Try this: &lt;p ng-bind-html="content.content"&gt;&lt;/p&gt; Curly braces are used for expression interpolation, so its result is not an expression any more. However ngBindHtml needs an expression, because it passes this expression to some sanitize services to clean up from unsafe content.

http://stackoverflow.com/a/27250065
has body: So this has worked for me ... function calDataBound(e) { var scheduler = this; var view = scheduler.view(); var dataSourceData = scheduler.dataSource.data(); // For every element that has the more events ellipses '...' view.table.find(".k-more-events span").each(function () { if ($(this) != null) { var element = $(this); if (element != null) { var slot = scheduler.slotByElement(element); if (slot != null) { var slotStart = slot.startDate; var slotEnd = slot.endDate; var totalAppts = 0; var visibleAppts = 0; for (var i = 0; i &lt; dataSourceData.length; i++) { var appt = dataSourceData[i]; var apptStartDt = appt.start; var apptEndDt = appt.end; // Include only appointments that are in or overlap the entire day if (slotStart &lt; apptEndDt &amp;&amp; slotEnd &gt; apptStartDt) { totalAppts += 1; var selector = 'div[data-uid="' + appt.uid + '"]'; if ($(selector).length &gt; 0) { visibleAppts += $(selector).length; } } } var totalHidden = totalAppts - visibleAppts; if (totalHidden &gt; 0) { element.text(totalHidden + ' more ...'); } } } } }); } I also had to tweak the css for .k-more-events so that the panel was big enough to show the text e.g. .k-more-events &gt; span { margin-top: 0em; height: 20px; } div.k-more-events { font-size: 12px; height: 20px; }
accepted answer of: http://stackoverflow.com/q/27233493
downvote count: 0
answers question: http://stackoverflow.com/q/27233493
score: 5
type: AcceptedAnswer
type: Answer
upvote count: 5

http://stackoverflow.com/q/27309668
has body: How can we enforce to return image type(if in case it is not returning) while using readAsDataURL to read the image, window.onload = function() { if (window.File && window.FileList && window.FileReader) { $("#file").on("change", function(event) { event.preventDefault(); var output = document.getElementById("result"); existingNode = document.getElementById("addMore"); var files = event.target.files; for (var i = 0; i < files.length; i++) { var file = files[i]; var picReader = new FileReader(); picReader.onload = function(event) { var picFile = event.target; var formElement = document.getElementById("submitForm"); var dataToBeSent = new FormData(formElement); count++; var div = document.createElement("div"); div.innerHTML = ' ' + ' ' + ' Retry ' + " " + ' ' + ' ' + ' ' + ' ' + ' '; output.insertBefore(div, existingNode); generatingDiv.innerHTML = ""; formDataArray[count] = dataToBeSent; }; picReader.readAsDataURL(file); //Read the image }
answer count: 1
score: 1
type: UnansweredQuestion
upvote count: 1
tagged with: filereader
has title: readAsDataURL not returning image type
has answer: http://stackoverflow.com/a/27311086
has comment: http://stackoverflow.com/comment/43081275
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/42878127
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27196596
has text: Perfect!!! thanks a million also helps as you stated as i will be adding to this in the future. massive thanks.

http://stackoverflow.com/comment/42946211
score: 0
type: Comment
type: QuestionComment
has text: I see `paxlist` in the controller and `stafflist` in the template. What is the connection between the 2?
comment on: http://stackoverflow.com/q/27234643

http://stackoverflow.com/comment/42971929
has text: `e.preventDefault();` should be inside the `if` condition. He wants to redirect if `n != 2`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27248817
type: Comment

http://stackoverflow.com/comment/42874794
type: Comment
type: QuestionComment
has text: Combine those two suggestions, should work :)
comment on: http://stackoverflow.com/q/27194070
score: 0

http://stackoverflow.com/comment/42993907
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27259429
has text: @RaihanAlam Are you using .NET for the server technology?

evaporate.js
tags question: http://stackoverflow.com/q/27199714
tags question: http://stackoverflow.com/q/27243922
type: Tag
tag name: evaporate.js

http://stackoverflow.com/comment/43037620
score: 0
comment on: http://stackoverflow.com/q/27272797
type: Comment
type: QuestionComment
has text: Thanks Jeff! I'll try it out! Thanks everybody for your help!!

http://stackoverflow.com/a/27285806
has body: setInterval() and setTimeout() return timer IDs. These help the browser recognize them again if you clear them, but you don't need to worry about their specific values. The function/code that is run has nothing to do with the return value of setInterval() or setTimeout(). The return value of the code, AFAIK, will be thrown away unless you put it somewhere. As Thilo said in the comments, the code will not even have been run by the time setInterval() and setTimeout() returns.
accepted answer of: http://stackoverflow.com/q/27285766
answers question: http://stackoverflow.com/q/27285766
has comment: http://stackoverflow.com/comment/43039134
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42933530
score: 0
has text: @MunanshuMadaan - is because `$("div.container")` find all divs with the `container` class, you can try with the jQuery function `next` (https://api.jquery.com/next/) that finds the next sibling element, in your case the div
type: AnswerComment
comment on: http://stackoverflow.com/a/27227858
type: Comment

http://stackoverflow.com/q/27152872
tagged with: ajax
has comment: http://stackoverflow.com/comment/42801913
score: 0
has body: So i have a weird problem in a site im building. In the "about" page, theres a small gallery showing some pictures. The first time you enter the page, everything works as intended. Now, Lets say i exit the "about" page and go to any other page in the website, the moment ill re enter the "about" page again, it will stop working. It will work again once i refresh the page, and the problem continues again. this is how the gallery is built: HTML: CSS: .about_slide_show{ width: 50%; min-width: 650px; height: 50%; margin: 20px auto 20px auto; background-color: #fafafa; box-shadow: 0px 5px 10px #cacaca; background-image: url('./images/about/2.jpg'); background-repeat: no-repeat; background-position: center; background-size: cover; position: relative; } .gc_next_arrow{ position: absolute; top: 45%; right: 0; } .gc_prev_arrow{ position: absolute; top: 45%; left: 0; } .arrow_block{ color: #000; width: 50px; height: 50px; margin: 0 10px 0 10px; background-color: #000; border-radius: 120px; opacity: 0.8; } JavaScript: PHP: <?php $folder_path = "./images/about/"; $files = preg_grep('/^([^.])/', scandir($folder_path)); $sort_flags = 1; sort($files,$sort_flags); echo count($files); foreach ($files as $key => $value) { echo '+'.$value; } echo '/null'; foreach ($files as $key => $value) { $temp_files = explode(".", $value); echo "+".$temp_files['0']; } ?> The AJAX call inside the $(document).ready function simply gets a string which contains the number of pictures in the about folder, the picture file names, and their names without extension. the string the AJAX call returns look something like this: 2+1.jpg+2.jpg/null+1+2 Then i just break the string and insert it into arrays. The JavaScript after is just for navigating through the gallery (next pic and previous). Could anyone have an idea why im having this issue? I'll provide any extra info if necessary. Thanks.
tagged with: http://stackoverflow.com/tag/html
has title: Gallery stops working after 2nd use
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/27153842
has comment: http://stackoverflow.com/comment/42801056
type: Question
has comment: http://stackoverflow.com/comment/42801286
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27230944
type: AnsweredQuestion
has body: I just have a quick question there: I am using Node.JS to write a commandline tool that validates JSON Files with JSON Schemas. So, now I have a problem that when wanting to get all the schemas, that I always get "undefined" for using a async function but otherwise only sync functions. For this commandline tool async is NOT needed. Could someone help me out and give me a hand on how to make it work just fine? var getJSONSchemaFiles = function (dir) { results2 = []; var recursive = require('recursive-readdir'); recursive(dir, function (err, files) { // Files is an array of filename // console.log(files); files.forEach(function (entry) { if (entry.indexOf(".schema.json") &gt; -1) { results2.push(entry); } }); console.log(results2); }); return results2; }; I am using the npm "recursive-readdir" but I think that I do not even need a npm for this kind of thing?
has title: Syncchronously and recursive filesystem file finding
linked to: http://stackoverflow.com/q/6847697
accepted answer: http://stackoverflow.com/a/27231383
has comment: http://stackoverflow.com/comment/42938834
type: Question
answer count: 2
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/27231802
has answer: http://stackoverflow.com/a/27231802
has answer: http://stackoverflow.com/a/27231383
tagged with: node.js
has comment: http://stackoverflow.com/comment/42939180
tagged with: npm
has comment: http://stackoverflow.com/comment/42938683
has comment: http://stackoverflow.com/comment/42939196

http://stackoverflow.com/comment/42849700
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27180603
has text: @RocoCTZ, no its not an array but you can access its properties by using array syntax. And since you cannot do `employees.1000` etc you have to do it with the array syntax
score: 1

http://stackoverflow.com/comment/43078143
comment on: http://stackoverflow.com/q/27307910
type: Comment
type: QuestionComment
score: 0
has text: Have you thought about if one of your users has diacritics in the name what than? i.e: `franois-font` instead of `francois-fonte`, not to talk about Germans, they have ümlauts all over the place :)

http://stackoverflow.com/q/27305183
has answer: http://stackoverflow.com/a/27904526
type: Question
downvote count: 0
tagged with: javascript
answer count: 3
tagged with: swiper.js
has answer: http://stackoverflow.com/a/38219135
has answer: http://stackoverflow.com/a/31721746
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: plugins
has body: It is possible to display the number of the slide in each "swiper-pagination-switch" span ? (like : 1,2,3, ...) ? By default, the plugin creat a part of HTML like this : I would like ton insert into each span the number of slide which it relates, like this : 1 2 3 How I can do this ? thanks.
score: 2
has title: idangerous swiper, numbers in pagination

http://stackoverflow.com/comment/43117894
has text: @Omar I made an edit. Does it clarify?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27265137

http://stackoverflow.com/q/27199031
type: Question
linked to: http://stackoverflow.com/q/10610282
has body: My question is very similar to this one : AngularJS - Value attribute on an input text box is ignored when there is a ng-model used? Considering that answer : https://stackoverflow.com/a/20522955/1598891 I would like to know if there's a way to do the same treatment for a &lt;select&gt; ? If you set a ng-model to an &lt;input type="text"&gt;, the value of the input is reset to null (because of Angular) There's a similar behavior for drop down lists. If you set a "selected option" in a &lt;select&gt;, it will be ignored if you also had the ng-model attribute. I'm new to angular, but I found this really annoying. Since I'm working with ASP MVC, MVC already defines all the values if I do : @Html.DropDownListFor(model =&gt; model.MyModel, new SelectList(/*...*/), "Select an options", new { @class = "form-control", ng_model = "MyModelProperty"}) I know that I could do something like : ng_model = @String.Format("myModel = {0}", Model.MyModelProperty) but it would be kind of annoying to repeat that information since MVC should already do it properly.
answer count: 2
linked to: http://stackoverflow.com/q/17645620
tagged with: javascript
has answer: http://stackoverflow.com/a/27203053
accepted answer: http://stackoverflow.com/a/27252180
tagged with: asp.net
score: 0
possible better answer: http://stackoverflow.com/a/27203053
has title: AngularJS - Value attribute on an select/dropdownlist is ignored when there is a ng-model used
tagged with: angularjs
has answer: http://stackoverflow.com/a/27252180
type: AnsweredQuestion
tagged with: asp.net-mvc

http://stackoverflow.com/q/27268949
answer count: 3
has comment: http://stackoverflow.com/comment/43009566
has comment: http://stackoverflow.com/comment/43008805
possible better answer: http://stackoverflow.com/a/27269167
has answer: http://stackoverflow.com/a/27269567
has answer: http://stackoverflow.com/a/27269167
has answer: http://stackoverflow.com/a/27270272
upvote count: 1
type: AnsweredQuestion
has body: I was working on JQuery UI Date Picker. before it was working great but now the calendar won't show up. any ideas? here's my code. http://pastebin.com/L4j2TmyY my code is too long so i placed it in pastebin. I follow this exactly but calendar is not showing http://jqueryui.com/datepicker/
accepted answer: http://stackoverflow.com/a/27269567
type: Question
has comment: http://stackoverflow.com/comment/43008596
has comment: http://stackoverflow.com/comment/43009758
has title: JQUERY UI DatePicker Calendar not showing
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0

date
tags question: http://stackoverflow.com/q/27267565
tags question: http://stackoverflow.com/q/27312587
tag name: date
tags question: http://stackoverflow.com/q/27297589
tags question: http://stackoverflow.com/q/27278372
tags question: http://stackoverflow.com/q/27311756
tags question: http://stackoverflow.com/q/27215173
tags question: http://stackoverflow.com/q/27159534
tags question: http://stackoverflow.com/q/27300739
tags question: http://stackoverflow.com/q/27199074
tags question: http://stackoverflow.com/q/27293347
tags question: http://stackoverflow.com/q/27243282
tags question: http://stackoverflow.com/q/27199783
tags question: http://stackoverflow.com/q/27191305
tags question: http://stackoverflow.com/q/27216946
tags question: http://stackoverflow.com/q/27293107
tags question: http://stackoverflow.com/q/27231220
tags question: http://stackoverflow.com/q/27193232
tags question: http://stackoverflow.com/q/27288515
type: Tag
tags question: http://stackoverflow.com/q/27254799
tags question: http://stackoverflow.com/q/27272996
tags question: http://stackoverflow.com/q/27218859
tags question: http://stackoverflow.com/q/27294046
tags question: http://stackoverflow.com/q/27291385
tags question: http://stackoverflow.com/q/27239717
tags question: http://stackoverflow.com/q/27224717
tags question: http://stackoverflow.com/q/27185878

http://stackoverflow.com/q/27182829
has body: I am using Chart.js to generate maps and have customised it to a good extent. But I am not able to remove the vertical grid line no matter what. Has anyone come across a situation like this? Help much appreciated. JavaScript var ChartDataHome = { labels: ["", "NOV", "DEC", "JAN", "FEB"], datasets: [{ strokeColor: "rgba(255.255,255,1)", pointColor: "rgba(159,209,154,1)", pointStrokeColor: "rgba(255,255,255,1.00)", data: [4.5, 8.8, 7.5, 9.5, 7.8, 9] }] }; var step = 2; var max = 10; var start = 0; ChartOptionsHome = { scaleLabel: "<%= value + ' K ' %>", pointDot: false, bezierCurve: false, scaleOverride: true, scaleSteps: 10, scaleSteps: Math.ceil((max - start) / step), scaleStepWidth: step, scaleStartValue: start, scaleShowGridLines: true, scaleGridLineWidth: 0, scaleGridLineColor: "rgba(0,0,0,0.1)", datasetFill: false, animation: true, animationSteps: 60, scaleFontColor: "#ffffff", scaleFontSize: 14, scaleLineColor: "rgba(255,255,255,1)", datasetStrokeWidth: 6, responsive: true, } if ($("#chartHome")[0]) { DrawTheChart(ChartDataHome, ChartOptionsHome, "chartHome", "Line"); }
tagged with: javascript
tagged with: jquery
score: 42
has answer: http://stackoverflow.com/a/27871211
has answer: http://stackoverflow.com/a/71598541
has answer: http://stackoverflow.com/a/37301238
has answer: http://stackoverflow.com/a/27185825
has answer: http://stackoverflow.com/a/27182928
downvote count: 1
answer count: 7
favorite count: 0
upvote count: 43
type: AnsweredQuestion
tagged with: chart.js
possible better answer: http://stackoverflow.com/a/68576615
accepted answer: http://stackoverflow.com/a/37301238
type: Question
has answer: http://stackoverflow.com/a/68576615
has title: Remove the vertical line in the chart js line chart
has answer: http://stackoverflow.com/a/36940471

http://stackoverflow.com/comment/72608780
has text: @timothygu can you explain how will you describe time and space complexity of both solutions in Big-O Notation?
comment on: http://stackoverflow.com/a/34757676
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/27173445
has comment: http://stackoverflow.com/comment/42837038
has title: AngularJs sends an OPTION instead of a POST request
score: 0
has comment: http://stackoverflow.com/comment/42837626
has comment: http://stackoverflow.com/comment/42837418
has comment: http://stackoverflow.com/comment/42837240
tagged with: javascript
type: UnansweredQuestion
tagged with: xss
has comment: http://stackoverflow.com/comment/42837698
type: Question
has body: I've googlin' around about this issue. It seems that this is a normal behaviour, since I'm tryng to make a cross-site request. I have created my WebService based on everything I read round here: <WebMethod()> _ <ScriptMethod(ResponseFormat:=ResponseFormat.Xml, UseHttpGet:=False)> _ Public Function Test() As String Me.Context.Response.Clear() Me.Context.Response.AddHeader("Access-Control-Allow-Origin", "*") Me.Context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type") Me.Context.Response.ContentType = "text/plain" Return " aRetStr " End Function And this is a simple angularJS script: var myModule = angular.module('myModule', []) myModule.controller('myController', function($scope, userRepository) { userRepository.getAllUsers().success(function(users) { alert("success"); var myjson = JSON.parse(users); $scope.users = myjson}) .error(function(data, status, headers, config) { alert("error"); }); }); myModule.factory('userRepository', function($http) { return { getAllUsers: function() { $http.defaults.headers.common["X-Requested-With"] = 'XMLHttpRequest'; var url = "http://localhost:2693/service.asmx/Test"; var xml = $http.post(url, {test: 'test'}); return xml; } }; }); The X-Requested-With = XMLHttpRequest and Access-Control-Allow-Origin = * and text/plain too are thinks suggested round here that doesn't worked in my case. Really, Firebug show me an OPTIONS request, and no XSS error but a following POST never happens. The error alert is triggered and when that happens the config in the callback look like following: Accept : application/json, text/plain, */* Content-Type : application/json;charset=utf-8 X-Requested-With : XMLHttpRequest method : POST What can I do, why nothing happens?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42837075
has answer: http://stackoverflow.com/a/27174215
answer count: 1

http://stackoverflow.com/a/38979311
type: Answer
downvote count: 0
score: 1
has body: Better handling of this was introduced in this commit, so you now get the handle index as an event callback argument: $('#range-slider').noUiSlider({ start: [0, 100], range: { 'min': [0], 'max': [100] } }).on('slide', function(values, handle, unencoded, tap, positions) { // 'handle' will either be 0 or 1 depending on which handle caused the event to fire var whichHandle = handle === 0 ? 'LEFT' : 'RIGHT'; output.html(values.join(' - ')); }); There is more information about the other callback arguments in the documentation.
answers question: http://stackoverflow.com/q/27154428
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27154428

http://stackoverflow.com/comment/42801508
type: Comment
type: QuestionComment
has text: Don't quote the regex as string
score: 3
comment on: http://stackoverflow.com/q/27153578

http://stackoverflow.com/comment/42977833
has text: You cannot control the appearance of the native browser "print" dialog.
type: Comment
score: 3
comment on: http://stackoverflow.com/q/27251921
type: QuestionComment

http://stackoverflow.com/q/27189849
score: 13
type: Question
has title: How to use curl with exec nodejs
tagged with: javascript
has answer: http://stackoverflow.com/a/27190062
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/27190253
has comment: http://stackoverflow.com/comment/47449794
favorite count: 0
has answer: http://stackoverflow.com/a/33422997
type: UnansweredQuestion
tagged with: node.js
upvote count: 13
tagged with: curl
has body: I try to do the following in node js var command = " -d '{'title': 'Test' }' -H 'Content-Type: application/json' http://125.196.19.210:3030/widgets/test"; exec(['curl', command], function(err, out, code) { if (err instanceof Error) throw err; process.stderr.write(err); process.stdout.write(out); process.exit(code); }); It works when I do the below in command line.: curl -d '{ "title": "Test" }' -H "Content-Type: application/json" http://125.196.19.210:3030/widgets/test But when I do it in nodejs it tells me that curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information child process exited with code 2

http://stackoverflow.com/a/27167526
has comment: http://stackoverflow.com/comment/42828328
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27167469
has comment: http://stackoverflow.com/comment/42828183
downvote count: 0
has body: Use style="display:none" as inputText control's property. This will render the control but will hide it. You can assign values on client side to this control. &lt;xp:inputText id="inputText1" style="display:none" value="#{...}"&gt; &lt;/xp:inputText&gt; In client side JavaScript you can hide an inputText control with document.getElementById("#{id:inputText1}").style.display = 'none' but this is only necessary if you want to show it first and hide it later by a e.g. button click.
type: Answer

http://stackoverflow.com/comment/42837012
type: Comment
has text: It's a workaround. It solves your particular problem, but not a general problem of rendering multiple partials with the same template.
type: AnswerComment
comment on: http://stackoverflow.com/a/27173391
score: 0

http://stackoverflow.com/comment/42958375
score: 1
comment on: http://stackoverflow.com/q/27238545
type: Comment
type: QuestionComment
has text: Did you step through the code in a debugger yet? Does it reach your `userExistsCallback`? With the correct value for `exists`?

http://stackoverflow.com/comment/42809340
type: Comment
type: QuestionComment
has text: your row length is relative to your #negotiation-buttons container and this container's width is varying. That's why
comment on: http://stackoverflow.com/q/27157476
score: 0

http://stackoverflow.com/a/27290233
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43194734
has comment: http://stackoverflow.com/comment/43048175
has comment: http://stackoverflow.com/comment/43063881
type: Answer
accepted answer of: http://stackoverflow.com/q/27289398
score: 2
upvote count: 2
has body: It's ok that maven compiles your .java files and produces .class using javac, that guarantees that your java syntax is correct and that you can use your sources in any IDE. So ignore them. In order to compile your code to JS, you have to configure maven to execute the GWT compiler, it's done using the gwt-maven plugin. Note that your java code should be compatible with the emulated GWT JRE, so there are some constrains to consider. Once you have everything working, you will get your JS code in the folder target/artifactId-version/moduleName. You will get all the stuff you need to publish in your webserver. So you will get one module.nocache.js file which is the bootstrap script to load your code, and some MD5.cache.js or MD5.cache.html files depending on what linker you use in your project and the number of permutations you select. Of course you could collapse all permutations and produce an unique output file if you use the single script linker. Based on your configuration, it seems you want to export your java api to js using gwt-exporter, you can use jsUpload maven project as reference which is the JS exported version of the gwtupload library written in GWT. [EDIT] For a web service producing JS, I will call the compiler directly instead of doing through maven. It will save a lot of the time mvn spends parsing config, checking dependencies, running unneeded tasks, etc. You can simply run maven compile and grab the output of the ps -feawww or take a look to gwt-maven CompileMojo to figure out how to compose the args list. I will consider using draft-mode compilation with incremental option.
has comment: http://stackoverflow.com/comment/43084465
answers question: http://stackoverflow.com/q/27289398

http://stackoverflow.com/q/27266481
type: AnsweredQuestion
has body: I am trying to get the count of number of junctions involved in the driving route between 2 points but I am getting 0 has the answer. &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="FYP.WebForm1" %&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no"&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Directions service&lt;/title&gt; &lt;style&gt; #panel { position: absolute; top: 5px; left: 50%; margin-left: -180px; z-index: 5; background-color: #fff; padding: 5px; border: 1px solid #999; } &lt;/style&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp"&gt;&lt;/script&gt; &lt;script&gt; var directionsService; var markerArray = []; function initialize() { // Instantiate a directions service. directionsService = new google.maps.DirectionsService(); } function calcRoute() { // First, remove any existing markers from the map. for (var i = 0; i &lt; markerArray.length; i++) { markerArray[i].setMap(null); } // Now, clear the array itself. markerArray = []; // Retrieve the start and end locations and create // a DirectionsRequest using DRIVING directions. var request = { origin: "33.688782,72.980038", destination: "33.689023,72.982422", travelMode: google.maps.TravelMode.DRIVING }; // Route the directions and use the response directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { var warnings = document.getElementById('warnings_panel'); warnings.innerHTML = '&lt;b&gt;' + response.routes[0].warnings + '&lt;/b&gt;'; // directionsDisplay.setDirections(response); var myRoute = response.routes[0].legs[0]; for (var i = 0; i &lt; myRoute.steps.length; i++) { var marker = new google.maps.Marker({ position: myRoute.steps[i].start_location, map: map }); markerArray[i] = marker; } } }); alert("Length= " + markerArray.length); } &lt;/script&gt; &lt;/head&gt; &lt;body onload="initialize();"&gt; &lt;div id="pan…
type: Question
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27269177
accepted answer: http://stackoverflow.com/a/27269177
has title: Place marker on each junction between 2 points and get their coordinates

http://stackoverflow.com/a/27272332
type: Answer
has body: Is this what you are looking for? You just have to make $('.light-box').css('z-index', '2'); before it fades in. What is happening is that you are putting the z-index: 2 while it fades in that's why it acts weird.
score: 0
answers question: http://stackoverflow.com/q/27271967

http://stackoverflow.com/q/27311221
favorite count: 0
has title: HighCharts dateformat does not have microseconds (%f)
has comment: http://stackoverflow.com/comment/43084758
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: strftime
has body: I want microsecond accuracy in my HighChart plot. Something like this xDateFormat: '%e/%b/%Y - %H:%M:%S:%f' However I get the "%f" printed as is instead.. Since this library uses PHP's strftime date format, I went over to http://php.net/manual/en/function.strftime.php and found that this indeed doesn't have any option for microsecond. Any help would be appreciated.
type: Question
has answer: http://stackoverflow.com/a/27312180
accepted answer: http://stackoverflow.com/a/27312180
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/43083309
upvote count: 1
answer count: 1

http://stackoverflow.com/q/27283453
type: Question
tagged with: intellij-idea
tagged with: javascript
score: 0
answer count: 1
has title: IntelliJ Maven WAR with Chrome Developer Workspaces
tagged with: maven
type: AnsweredQuestion
has body: I'm trying to use IntelliJ to do my web development. With Eclipse I didn't use a Maven build and simply changed between Chrome Dev Tools and Eclipse when I would need to switch between frontend and backend changes and was able to map the Chrome workspace to a static webapp folder that wasn't part of a Maven build. Now I've switched to IntelliJ (mainly for its Java tools) but now I'm unable to use it alongside Chrome Dev Tools. I have the 'Update Resources' on frame deactivation set, which works if I edit a local javascript file and then move away or save the file, but if I try to use Chrome Dev Tools Workspaces to save it, obviously IntelliJ doesn't pick up that the file has been externally updated and therefore doesn't update the file in the exploded WAR. Is there some way I can do these together? I like a lot of things about IntelliJ for Java development, but I find that Chrome is far and away the best IDE for Javascript/CSS/HTML changes and would like to use it alongside IntelliJ.
has answer: http://stackoverflow.com/a/29313955
accepted answer: http://stackoverflow.com/a/29313955
tagged with: java

http://stackoverflow.com/q/27177744
linked to: http://stackoverflow.com/q/227552
has title: document.querySelector not working
has comment: http://stackoverflow.com/comment/42844579
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42844340
has body: can someone tell me what is wrong here,beacuse i tried everything,removing brackets/ading aditional,nothing works,i have working example of javascript,but it uses IDs instead of classes nad has only one reaction on condition,im writing all my code in Webstorm. function show_privacy_selector(){ if(document.querySelector(".privacy_selector").style.display == 'none'){ document.querySelector(".privacy_selector").style.display = 'block'; document.querySelector(".general_info").style.display = 'none'; document.querySelector(".security_selector").style.display = 'none'; document.querySelector(".name_change").style.display = 'none'; document.querySelector(".email_change").style.display = 'none'; document.querySelector(".password_change").style.display = 'none';} else {privacy_selector.style.display = 'block';}}
has answer: http://stackoverflow.com/a/27177892
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42844417
answer count: 1

http://stackoverflow.com/a/27270361
type: Answer
has comment: http://stackoverflow.com/comment/43873842
has body: @m.dorian - This is a very bad idea! Please do not try to implement this in any way if you value security and best practices. I would suggest that you read up on the subject thoroughly. In addition, you should ALWAYS hash your user's password and not encrypt them. Passwords should be one-way hashed etc etc. If you don't know the specifics of data security, I would recommend that you take a step back and either speak to someone that knows what they're doing, or you educate yourself. Especially after all the data compromises reported in the last couple of years. Useful post by Troy Hunt can be found here and this should only be the start!
score: 1
answers question: http://stackoverflow.com/q/27266120
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27266120
has comment: http://stackoverflow.com/comment/43014795
has comment: http://stackoverflow.com/comment/43015639
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27189412
upvote count: 1
has body: PHP runs on the server, Javascript runs on the browser, and they don't run concurrently, so you'll have to send your Javascript variable to the PHP script (and re-run the PHP script), which involves reloading the page. You can e.g. a GET request (by loading script.php?yourvariable=value).
answers question: http://stackoverflow.com/q/27189317
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/a/27234369
downvote count: 0
has comment: http://stackoverflow.com/comment/42982262
type: Answer
has comment: http://stackoverflow.com/comment/43006220
score: 1
upvote count: 1
has body: Be sure that the ajax search script does not override values when user go through pages, in case the search script run on every page give some sort of unique identifier together with the last position value. ex ( setCookie({ id : my-unique-page-name , offset : 0, limit : 50 }) ) when user hit "load more results" keep track of the position and increment the LIMIT and OFFSET values ( if you start with 50 then your SQL query will be something like SELECT * FROM blah WHERE blah LIMIT 0, 50 ) the next will be SELECT * FROM blah WHERE blah LIMIT 50, 100 and so on. from your code i see //increment lastPageLoadCount when ajax returns success this is useless. just track it from point 2. from your code i see while ( that is not needed also consider to keep track of the offset DOM position $(document).on( 'scroll', since the unload window event is not that much reliable. a pseudo code will look something like this : defaultLimit = 50, defaultOffset = 0; on(beforeWindowUnload){ setCookie({ DOMOffsetPosFromCoockie : ($(window).scrollTop() + $(window).height()) }); } // when user click more results if (userClickMoreResults) { var offset = offsetFromCoockieNotSet ? defaultOffset : offsetFromCoockie; var limit = limitFromCoockieNotSet ? defaultLimit : limitFromCoockie; setCookie({ id: myUniquePageName, // if your code is designed to load results not replacing the previous loaded content // ( ex.: you load all the results from 0 to a max viewed in a certain moment) // offset: offset + 50, otherwise offset is always 0 offset: offset, limit: limit + 50 }); } // when page load if (myUniquePageName == myUniquePageIDFromCoockie){ if (limitFromCoockieNotSet &amp;&amp; offsetFromCoockieNotSet) { loadAjaxResults(defaultLimit, defaultOffset); } else { loadAjaxResults(limitFromCoockie, offsetFromCoockie); } setInterval(function(){ $('html, body').animate({scrollTop: DOMOffsetPosFromCoockie}, 2000); },200); }
answers question: http://stackoverflow.com/q/27233313

http://stackoverflow.com/comment/42963152
has text: you are giving answer that suggest there should be a controller bond to the ionic-ng-view, I gave an example to prove that wouldn't solve my problem.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27241547
type: Comment

http://stackoverflow.com/comment/43108950
has text: What is your script error?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27167748

http://stackoverflow.com/comment/42952242
comment on: http://stackoverflow.com/a/27236811
type: Comment
has text: @Jordonias The only solution we can come up with is to find a way to recursively make the request available for that execution chain. But this is tedious and highly coupling. There doesn't seem to be a way to simply say "for this chain of execution, we'll create and then use all these instances".
score: 0
type: AnswerComment

http://stackoverflow.com/a/27276598
accepted answer of: http://stackoverflow.com/q/27276545
answers question: http://stackoverflow.com/q/27276545
has body: You need to give a name to the form before trying to access it, something like this: //create the name attribute for the form &lt;form onsubmit="changeText()" method="post" name="myForm"&gt; Name: &lt;input type="text" name="fname"&gt; &lt;input type="submit"&gt; &lt;/form&gt; &lt;script&gt; function changeText() { //access myForm using document object var name = document.name.fname.value; var welcome = "Welcome, " + name; document.getElementById("welcomeText").innerHTML = welcome; } &lt;/script&gt;
score: 0
has comment: http://stackoverflow.com/comment/43022348
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/27290411
has comment: http://stackoverflow.com/comment/43047347
has body: The problem is that var orig = { lat: 37.388769, lng: -122.158954 }; var dest = { lat: 37.391979, lng: -122.167891 }; Are not google.maps.LatLng objects. Change thoses lines by this : var orig = new google.maps.LatLng(37.388769, -122.158954); var dest = new google.maps.LatLng(37.391979, -122.167891); Check out the example below : Directions Exemple
type: Answer
has comment: http://stackoverflow.com/comment/43047804
has comment: http://stackoverflow.com/comment/43047442
accepted answer of: http://stackoverflow.com/q/27288787
score: 4
answers question: http://stackoverflow.com/q/27288787
upvote count: 4
has comment: http://stackoverflow.com/comment/43047600
has comment: http://stackoverflow.com/comment/43047426
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42881588
has text: ok, that makes sense now. Unfortunately I am calling test from an HTML button. Any way I can call a new instance of it from an HTML onclick event?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27198585

http://stackoverflow.com/comment/42909661
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27214718
type: QuestionComment
has text: You should probably distinguish between the actions visible to the programming environment, and the actions mandated by the ECMAscript spec to dictate key implementation details of that programming environment. Things like the `Function` constructor are part of the latter. If there is an execution context involved there, it disappears before you as the programmer ever see it, and it's not related to the execution context of the function `Foo` when `Foo()` is invoked.

http://stackoverflow.com/a/27228946
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27226438
upvote count: 1
has body: Initilize in beforeEach, modalInstance = { close: jasmine.createSpy('modalInstance.close'), dismiss: jasmine.createSpy('modalInstance.dismiss') }, and then expect.
type: Answer

http://stackoverflow.com/q/27178065
favorite count: 0
has title: How to assign data returned from $promise to global variable
tagged with: promise
tagged with: angularjs
type: AnsweredQuestion
has body: I've two services, service1 and service2, and I would like to invoke a method of service1 into service2. Ideally, I would like to assign the returned data from service1.getMethod() to a global variable declared as var result = []. Here is the code: service1 .factory('service1', function (dependencies...) { var getMethod1 = function () { ...//making http get call return deferred.promise(); }; return { getMethod1 : getMethod1 }; }); service2 .factory('service2', function (dependencies...) { var result = []; var getMethod2 = function () { Service1.getMethod1().then(function (data) { result = data; }); //RUN METHOD getMethod2(); //Here ideally, I would like result to contain `[object, object, object]` console.log(result); //instead it prints `undefined` }); So ideally, I would like to use what's will be in result in service2's other functions i.e. result[0].name etc. Not sure if what I'm doing is the right approach. Please provide an plunker demo or code snippet example and if not sure about something, please write comment below. Thanks!
has answer: http://stackoverflow.com/a/27178217
type: Question
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27178217
answer count: 1

http://stackoverflow.com/comment/42904633
has text: Which is, of course, O(N^2). So the OP will still feel guilty :)
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27211842
type: AnswerComment

evercookie
tags question: http://stackoverflow.com/q/27209474
type: Tag
tags question: http://stackoverflow.com/q/27213533
tag name: evercookie